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

github.com/jgraph/drawio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benson [draw.io] <david@jgraph.com>2021-09-16 21:28:15 +0300
committerDavid Benson [draw.io] <david@jgraph.com>2021-09-16 21:28:15 +0300
commit25a8888ed6111d06a0e3dcd8d9a8f11f5319b9cb (patch)
treefe034522e5615f5e9966c7ddc912d19af5bc3aab
parent4a4a2ed0c9905a5cb680076f7e369cebfe7ea235 (diff)
15.2.9 releasev15.2.9
-rw-r--r--ChangeLog17
-rw-r--r--VERSION2
-rw-r--r--etc/build/build.xml4
-rw-r--r--src/main/webapp/js/app.min.js2663
-rw-r--r--src/main/webapp/js/diagramly/App.js21
-rw-r--r--src/main/webapp/js/diagramly/Dialogs.js15
-rw-r--r--src/main/webapp/js/diagramly/Editor.js31
-rw-r--r--src/main/webapp/js/diagramly/EditorUi.js30
-rw-r--r--src/main/webapp/js/diagramly/Menus.js2
-rw-r--r--src/main/webapp/js/diagramly/Minimal.js15
-rw-r--r--src/main/webapp/js/diagramly/OneDriveClient.js7
-rw-r--r--src/main/webapp/js/diagramly/sidebar/Sidebar-C4.js3
-rw-r--r--src/main/webapp/js/grapheditor/Format.js162
-rw-r--r--src/main/webapp/js/grapheditor/Graph.js120
-rw-r--r--src/main/webapp/js/grapheditor/Menus.js44
-rw-r--r--src/main/webapp/js/grapheditor/Shapes.js38
-rw-r--r--src/main/webapp/js/viewer-static.min.js1650
-rw-r--r--src/main/webapp/js/viewer.min.js1650
-rw-r--r--src/main/webapp/mxgraph/mxClient.js6
-rw-r--r--src/main/webapp/service-worker.js2
-rw-r--r--src/main/webapp/service-worker.js.map2
-rw-r--r--src/main/webapp/styles/grapheditor.css3
22 files changed, 3343 insertions, 3144 deletions
diff --git a/ChangeLog b/ChangeLog
index 76a7fbf8..d6d5fed2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+16-SEP-2021: 15.2.9
+
+- Fixes OneDrive inline picker script not loaded
+
+16-SEP-2021: 15.2.8
+
+- Moves enableWebFonts switch to Editor
+- Fixes inconsistent naming for shadowOptionEnabled
+- Adds more label flexibility to C4 Database shape
+- Uses SVG for spinner in sketch and min theme
+- Hides title and container option for HTML table
+- Adds colspan in test mode
+- Fixes duplicate rounded style for flexArrow
+- [gliffy import] Fixes svg image clipping (#DID-1443 and #DID-3137)
+- Adds comment for embedded SVG files
+- Using OneDrive inline picker by default
+
14-SEP-2021: 15.2.7
- Fixes possible use of undefined FontDialog
diff --git a/VERSION b/VERSION
index 374989bb..bd4322ec 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-15.2.7 \ No newline at end of file
+15.2.9 \ No newline at end of file
diff --git a/etc/build/build.xml b/etc/build/build.xml
index ad10b16b..5c6f3452 100644
--- a/etc/build/build.xml
+++ b/etc/build/build.xml
@@ -431,6 +431,10 @@
<file name="DriveComment.js" />
</sources>
+ <sources dir="${war.dir}/js/onedrive">
+ <file name="mxODPicker.js" />
+ </sources>
+
<sources dir="${war.dir}/js/diagramly">
<file name="App.js" />
<file name="Menus.js" />
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index 95390bae..cb835d7c 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -234,7 +234,7 @@ null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=
if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent)&&(urlParams.gapi="0");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"15.2.7",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"15.2.9",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||
0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_WIN:0<navigator.appVersion.indexOf("Win"),IS_MAC:0<navigator.appVersion.indexOf("Mac"),
@@ -662,8 +662,8 @@ var mxStencilRegistry={stencils:{},addStencil:function(a,b){mxStencilRegistry.st
(function(){function a(a){a=null!=a?a:2;return function(b,c,d,k,l,m,n,p,q,r){c=l*q*1.118;p=m*q*1.118;l*=n+q;m*=n+q;var e=k.clone();e.x-=c;e.y-=p;n=d!=mxConstants.ARROW_CLASSIC&&d!=mxConstants.ARROW_CLASSIC_THIN?1:.75;k.x+=-l*n-c;k.y+=-m*n-p;return function(){b.begin();b.moveTo(e.x,e.y);b.lineTo(e.x-l-m/a,e.y-m+l/a);d!=mxConstants.ARROW_CLASSIC&&d!=mxConstants.ARROW_CLASSIC_THIN||b.lineTo(e.x-3*l/4,e.y-3*m/4);b.lineTo(e.x+m/a-l,e.y-m-l/a);b.close();r?b.fillAndStroke():b.stroke()}}}function b(a){a=
null!=a?a:2;return function(b,c,d,k,l,m,n,p,q,r){c=l*q*1.118;d=m*q*1.118;l*=n+q;m*=n+q;var e=k.clone();e.x-=c;e.y-=d;k.x+=2*-c;k.y+=2*-d;return function(){b.begin();b.moveTo(e.x-l-m/a,e.y-m+l/a);b.lineTo(e.x,e.y);b.lineTo(e.x+m/a-l,e.y-m-l/a);b.stroke()}}}function c(a,b,c,g,k,l,m,n,p,q){n=c==mxConstants.ARROW_DIAMOND?.7071:.9862;b=k*p*n;n*=l*p;k*=m+p;l*=m+p;var d=g.clone();d.x-=b;d.y-=n;g.x+=-k-b;g.y+=-l-n;var e=c==mxConstants.ARROW_DIAMOND?2:3.4;return function(){a.begin();a.moveTo(d.x,d.y);a.lineTo(d.x-
k/2-l/e,d.y+k/e-l/2);a.lineTo(d.x-k,d.y-l);a.lineTo(d.x-k/2+l/e,d.y-l/2-k/e);a.close();q?a.fillAndStroke():a.stroke()}}mxMarker.addMarker("classic",a(2));mxMarker.addMarker("classicThin",a(3));mxMarker.addMarker("block",a(2));mxMarker.addMarker("blockThin",a(3));mxMarker.addMarker("open",b(2));mxMarker.addMarker("openThin",b(3));mxMarker.addMarker("oval",function(a,b,c,g,k,l,m,n,p,q){var d=m/2,e=g.clone();g.x-=k*d;g.y-=l*d;return function(){a.ellipse(e.x-d,e.y-d,m,m);q?a.fillAndStroke():a.stroke()}});
-mxMarker.addMarker("diamond",c);mxMarker.addMarker("diamondThin",c)})();function mxActor(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxActor,mxShape);mxActor.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();this.redrawPath(a,b,c,d,e);a.fillAndStroke()};
-mxActor.prototype.redrawPath=function(a,b,c,d,e){b=d/3;a.moveTo(0,e);a.curveTo(0,3*e/5,0,2*e/5,d/2,2*e/5);a.curveTo(d/2-b,2*e/5,d/2-b,0,d/2,0);a.curveTo(d/2+b,0,d/2+b,2*e/5,d/2,2*e/5);a.curveTo(d,2*e/5,d,3*e/5,d,e);a.close()};function mxCloud(a,b,c,d){mxActor.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxCloud,mxActor);
+mxMarker.addMarker("baseDash",function(a,b,c,g,k,l,m,n,p,q){var d=k*(m+p+1),e=l*(m+p+1);return function(){a.begin();a.moveTo(g.x-e/2,g.y+d/2);a.lineTo(g.x+e/2,g.y-d/2);a.stroke()}});mxMarker.addMarker("diamond",c);mxMarker.addMarker("diamondThin",c)})();function mxActor(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxActor,mxShape);
+mxActor.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();this.redrawPath(a,b,c,d,e);a.fillAndStroke()};mxActor.prototype.redrawPath=function(a,b,c,d,e){b=d/3;a.moveTo(0,e);a.curveTo(0,3*e/5,0,2*e/5,d/2,2*e/5);a.curveTo(d/2-b,2*e/5,d/2-b,0,d/2,0);a.curveTo(d/2+b,0,d/2+b,2*e/5,d/2,2*e/5);a.curveTo(d,2*e/5,d,3*e/5,d,e);a.close()};function mxCloud(a,b,c,d){mxActor.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxCloud,mxActor);
mxCloud.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(.25*d,.25*e);a.curveTo(.05*d,.25*e,0,.5*e,.16*d,.55*e);a.curveTo(0,.66*e,.18*d,.9*e,.31*d,.8*e);a.curveTo(.4*d,e,.7*d,e,.8*d,.8*e);a.curveTo(d,.8*e,d,.6*e,.875*d,.5*e);a.curveTo(d,.3*e,.8*d,.1*e,.625*d,.2*e);a.curveTo(.5*d,.05*e,.3*d,.05*e,.25*d,.25*e);a.close()};function mxRectangleShape(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxRectangleShape,mxShape);
mxRectangleShape.prototype.isHtmlAllowed=function(){var a=!0;null!=this.style&&(a="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));return!this.isRounded&&!this.glass&&0==this.rotation&&(a||null!=this.fill&&this.fill!=mxConstants.NONE)};
mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?f=Math.min(d/2,Math.min(e/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
@@ -2089,18 +2089,18 @@ Editor.prototype.setFilename=function(a){this.filename=a};
Editor.prototype.createUndoManager=function(){var a=this.graph,c=new mxUndoManager;this.undoListener=function(a,b){c.undoableEditHappened(b.getProperty("edit"))};var b=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,b);a.getView().addListener(mxEvent.UNDO,b);b=function(b,c){var e=a.getSelectionCellsForChanges(c.getProperty("edit").changes,function(a){return!(a instanceof mxChildChange)});if(0<e.length){a.getModel();for(var d=[],h=0;h<
e.length;h++)null!=a.view.getState(e[h])&&d.push(e[h]);a.setSelectionCells(d)}};c.addListener(mxEvent.UNDO,b);c.addListener(mxEvent.REDO,b);return c};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};
OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
-function Dialog(a,c,b,e,d,f,k,h,g,l,m){var n=g?57:0,p=b,r=e,u=g?0:64,t=mxUtils.getDocumentSize();null!=window.innerHeight&&(t.height=window.innerHeight);var v=t.height,y=Math.max(1,Math.round((t.width-b-u)/2)),x=Math.max(1,Math.round((v-e-a.footerHeight)/3));c.style.maxHeight="100%";b=null!=document.body?Math.min(b,document.body.scrollWidth-u):b;e=Math.min(e,v-u);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",
-this.bg.style.background=Dialog.backdropColor,this.bg.style.height=v+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));t=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=t.x+"px";this.bg.style.top=t.y+"px";y+=t.x;x+=t.y;d&&document.body.appendChild(this.bg);var B=a.createDiv(g?"geTransDialog":"geDialog");d=this.getPosition(y,x,b,e);y=d.x;x=d.y;B.style.width=b+"px";B.style.height=e+"px";B.style.left=y+"px";B.style.top=x+"px";B.style.zIndex=
-this.zIndex;B.appendChild(c);document.body.appendChild(B);!h&&c.clientHeight>B.clientHeight-u&&(c.style.overflowY="auto");if(f&&(f=document.createElement("img"),f.setAttribute("src",Dialog.prototype.closeImage),f.setAttribute("title",mxResources.get("close")),f.className="geDialogClose",f.style.top=x+14+"px",f.style.left=y+b+38-n+"px",f.style.zIndex=this.zIndex,mxEvent.addListener(f,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(f),this.dialogImg=f,!m)){var E=!1;
-mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){E=!0}),null,mxUtils.bind(this,function(b){E&&(a.hideDialog(!0),E=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var d=l();null!=d&&(p=b=d.w,r=e=d.h)}d=mxUtils.getDocumentSize();v=d.height;this.bg.style.height=v+"px";y=Math.max(1,Math.round((d.width-b-u)/2));x=Math.max(1,Math.round((v-e-a.footerHeight)/3));b=null!=document.body?Math.min(p,document.body.scrollWidth-u):p;e=Math.min(r,v-u);d=this.getPosition(y,x,b,
-e);y=d.x;x=d.y;B.style.left=y+"px";B.style.top=x+"px";B.style.width=b+"px";B.style.height=e+"px";!h&&c.clientHeight>B.clientHeight-u&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=x+14+"px",this.dialogImg.style.left=y+b+38-n+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=k;this.container=B;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+function Dialog(a,c,b,e,d,f,k,h,g,l,m){var n=g?57:0,p=b,q=e,t=g?0:64,v=mxUtils.getDocumentSize();null!=window.innerHeight&&(v.height=window.innerHeight);var u=v.height,w=Math.max(1,Math.round((v.width-b-t)/2)),x=Math.max(1,Math.round((u-e-a.footerHeight)/3));c.style.maxHeight="100%";b=null!=document.body?Math.min(b,document.body.scrollWidth-t):b;e=Math.min(e,u-t);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",
+this.bg.style.background=Dialog.backdropColor,this.bg.style.height=u+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));v=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=v.x+"px";this.bg.style.top=v.y+"px";w+=v.x;x+=v.y;d&&document.body.appendChild(this.bg);var A=a.createDiv(g?"geTransDialog":"geDialog");d=this.getPosition(w,x,b,e);w=d.x;x=d.y;A.style.width=b+"px";A.style.height=e+"px";A.style.left=w+"px";A.style.top=x+"px";A.style.zIndex=
+this.zIndex;A.appendChild(c);document.body.appendChild(A);!h&&c.clientHeight>A.clientHeight-t&&(c.style.overflowY="auto");if(f&&(f=document.createElement("img"),f.setAttribute("src",Dialog.prototype.closeImage),f.setAttribute("title",mxResources.get("close")),f.className="geDialogClose",f.style.top=x+14+"px",f.style.left=w+b+38-n+"px",f.style.zIndex=this.zIndex,mxEvent.addListener(f,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(f),this.dialogImg=f,!m)){var E=!1;
+mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){E=!0}),null,mxUtils.bind(this,function(b){E&&(a.hideDialog(!0),E=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var d=l();null!=d&&(p=b=d.w,q=e=d.h)}d=mxUtils.getDocumentSize();u=d.height;this.bg.style.height=u+"px";w=Math.max(1,Math.round((d.width-b-t)/2));x=Math.max(1,Math.round((u-e-a.footerHeight)/3));b=null!=document.body?Math.min(p,document.body.scrollWidth-t):p;e=Math.min(q,u-t);d=this.getPosition(w,x,b,
+e);w=d.x;x=d.y;A.style.left=w+"px";A.style.top=x+"px";A.style.width=b+"px";A.style.height=e+"px";!h&&c.clientHeight>A.clientHeight-t&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=x+14+"px",this.dialogImg.style.left=w+b+38-n+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=k;this.container=A;a.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(a,c){return new mxPoint(a,c)};Dialog.prototype.close=function(a,c){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,c))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
var ErrorDialog=function(a,c,b,e,d,f,k,h,g,l,m){g=null!=g?g:!0;var n=document.createElement("div");n.style.textAlign="center";if(null!=c){var p=document.createElement("div");p.style.padding="0px";p.style.margin="0px";p.style.fontSize="18px";p.style.paddingBottom="16px";p.style.marginBottom="10px";p.style.borderBottom="1px solid #c0c0c0";p.style.color="gray";p.style.whiteSpace="nowrap";p.style.textOverflow="ellipsis";p.style.overflow="hidden";mxUtils.write(p,c);p.setAttribute("title",c);n.appendChild(p)}c=
-document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=b;n.appendChild(c);b=document.createElement("div");b.style.marginTop="12px";b.style.textAlign="center";null!=f&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();f()}),c.className="geBtn",b.appendChild(c),b.style.textAlign="center");null!=l&&(l=mxUtils.button(l,function(){null!=m&&m()}),l.className="geBtn",b.appendChild(l));var r=mxUtils.button(e,function(){g&&a.hideDialog();null!=d&&d()});
-r.className="geBtn";b.appendChild(r);null!=k&&(e=mxUtils.button(k,function(){g&&a.hideDialog();null!=h&&h()}),e.className="geBtn gePrimaryBtn",b.appendChild(e));this.init=function(){r.focus()};n.appendChild(b);this.container=n},PrintDialog=function(a,c){this.create(a,c)};
+document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=b;n.appendChild(c);b=document.createElement("div");b.style.marginTop="12px";b.style.textAlign="center";null!=f&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();f()}),c.className="geBtn",b.appendChild(c),b.style.textAlign="center");null!=l&&(l=mxUtils.button(l,function(){null!=m&&m()}),l.className="geBtn",b.appendChild(l));var q=mxUtils.button(e,function(){g&&a.hideDialog();null!=d&&d()});
+q.className="geBtn";b.appendChild(q);null!=k&&(e=mxUtils.button(k,function(){g&&a.hideDialog();null!=h&&h()}),e.className="geBtn gePrimaryBtn",b.appendChild(e));this.init=function(){q.focus()};n.appendChild(b);this.container=n},PrintDialog=function(a,c){this.create(a,c)};
PrintDialog.prototype.create=function(a){function c(a){var c=h.checked||l.checked,e=parseInt(n.value)/100;isNaN(e)&&(e=1,n.value="100%");var e=.75*e,d=b.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,f=1/b.pageScale;if(c){var g=h.checked?1:parseInt(m.value);isNaN(g)||(f=mxUtils.getScaleForPageCount(g,b,d))}b.getGraphBounds();var k=g=0,d=mxRectangle.fromRectangle(d);d.width=Math.ceil(d.width*e);d.height=Math.ceil(d.height*e);f*=e;!c&&b.pageVisible?(e=b.getPageLayout(),g-=e.x*d.width,k-=e.y*d.height):
c=!0;c=PrintDialog.createPrintPreview(b,f,d,0,g,k,c);c.open();a&&PrintDialog.printPreview(c)}var b=a.editor.graph,e,d,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var k=document.createElement("tbody");e=document.createElement("tr");var h=document.createElement("input");h.setAttribute("type","checkbox");d=document.createElement("td");d.setAttribute("colspan","2");d.style.fontSize="10pt";d.appendChild(h);var g=document.createElement("span");mxUtils.write(g," "+mxResources.get("fitPage"));
d.appendChild(g);mxEvent.addListener(g,"click",function(a){h.checked=!h.checked;l.checked=!h.checked;mxEvent.consume(a)});mxEvent.addListener(h,"change",function(){l.checked=!h.checked});e.appendChild(d);k.appendChild(e);e=e.cloneNode(!1);var l=document.createElement("input");l.setAttribute("type","checkbox");d=document.createElement("td");d.style.fontSize="10pt";d.appendChild(l);g=document.createElement("span");mxUtils.write(g," "+mxResources.get("posterPrint")+":");d.appendChild(g);mxEvent.addListener(g,
@@ -2110,32 +2110,32 @@ d.style.paddingTop="20px";d.setAttribute("align","right");g=mxUtils.button(mxRes
d.appendChild(g);e.appendChild(d);k.appendChild(e);f.appendChild(k);this.container=f};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var c=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}}catch(b){}};
PrintDialog.createPrintPreview=function(a,c,b,e,d,f,k){c=new mxPrintPreview(a,c,b,e,d,f);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=k;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";c.backgroundColor=a;var h=c.writeHead;c.writeHead=function(a){h.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return c};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function c(){null==m||m==mxConstants.NONE?(l.style.backgroundColor="",l.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(l.style.backgroundColor=m,l.style.backgroundImage="")}function b(){var b=u;null!=b&&Graph.isPageLink(b.src)&&(b=a.createImageForPageLink(b.src,null));null!=b&&null!=b.src?(r.setAttribute("src",b.src),r.style.display=""):(r.removeAttribute("src"),r.style.display="none")}var e=a.editor.graph,d,f,k=document.createElement("table");k.style.width=
+var PageSetupDialog=function(a){function c(){null==m||m==mxConstants.NONE?(l.style.backgroundColor="",l.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(l.style.backgroundColor=m,l.style.backgroundImage="")}function b(){var b=t;null!=b&&Graph.isPageLink(b.src)&&(b=a.createImageForPageLink(b.src,null));null!=b&&null!=b.src?(q.setAttribute("src",b.src),q.style.display=""):(q.removeAttribute("src"),q.style.display="none")}var e=a.editor.graph,d,f,k=document.createElement("table");k.style.width=
"100%";k.style.height="100%";var h=document.createElement("tbody");d=document.createElement("tr");f=document.createElement("td");f.style.verticalAlign="top";f.style.fontSize="10pt";mxUtils.write(f,mxResources.get("paperSize")+":");d.appendChild(f);f=document.createElement("td");f.style.verticalAlign="top";f.style.fontSize="10pt";var g=PageSetupDialog.addPageFormatPanel(f,"pagesetupdialog",e.pageFormat);d.appendChild(f);h.appendChild(d);d=document.createElement("tr");f=document.createElement("td");
mxUtils.write(f,mxResources.get("background")+":");d.appendChild(f);f=document.createElement("td");f.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var l=document.createElement("button");l.style.width="22px";l.style.height="22px";l.style.cursor="pointer";l.style.marginRight="20px";l.style.backgroundPosition="center center";l.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(l.style.position="relative",l.style.top="-6px");var m=e.background;c();mxEvent.addListener(l,
"click",function(b){a.pickColor(m||"none",function(a){m=a;c()});mxEvent.consume(b)});f.appendChild(l);mxUtils.write(f,mxResources.get("gridSize")+":");var n=document.createElement("input");n.setAttribute("type","number");n.setAttribute("min","0");n.style.width="40px";n.style.marginLeft="6px";n.value=e.getGridSize();f.appendChild(n);mxEvent.addListener(n,"change",function(){var a=parseInt(n.value);n.value=Math.max(1,isNaN(a)?e.getGridSize():a)});d.appendChild(f);h.appendChild(d);d=document.createElement("tr");
-f=document.createElement("td");mxUtils.write(f,mxResources.get("image")+":");d.appendChild(f);f=document.createElement("td");var p=document.createElement("button");p.className="geBtn";p.style.margin="0px";mxUtils.write(p,mxResources.get("change")+"...");var r=document.createElement("img");r.setAttribute("valign","middle");r.style.verticalAlign="middle";r.style.border="1px solid lightGray";r.style.borderRadius="4px";r.style.marginRight="14px";r.style.maxWidth="100px";r.style.cursor="pointer";r.style.height=
-"60px";r.style.padding="4px";var u=e.backgroundImage,t=function(c){a.showBackgroundImageDialog(function(a,c){c||(u=a,b())},u);mxEvent.consume(c)};mxEvent.addListener(p,"click",t);mxEvent.addListener(r,"click",t);b();f.appendChild(r);f.appendChild(p);d.appendChild(f);h.appendChild(d);d=document.createElement("tr");f=document.createElement("td");f.colSpan=2;f.style.paddingTop="16px";f.setAttribute("align","right");p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";
-a.editor.cancelFirst&&f.appendChild(p);t=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=parseInt(n.value);isNaN(b)||e.gridSize===b||e.setGridSize(b);b=new ChangePageSetup(a,m,u,g.get());b.ignoreColor=e.background==m;b.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=u?u.src:null);e.pageFormat.width==b.previousFormat.width&&e.pageFormat.height==b.previousFormat.height&&b.ignoreColor&&b.ignoreImage||e.model.execute(b)});t.className="geBtn gePrimaryBtn";
-f.appendChild(t);a.editor.cancelFirst||f.appendChild(p);d.appendChild(f);h.appendChild(d);k.appendChild(h);this.container=k};
-PageSetupDialog.addPageFormatPanel=function(a,c,b,e){function d(a,c,e){if(e||n!=document.activeElement&&p!=document.activeElement){a=!1;for(c=0;c<u.length;c++)e=u[c],x?"custom"==e.key&&(h.value=e.key,x=!1):null!=e.format&&("a4"==e.key?826==b.width?(b=mxRectangle.fromRectangle(b),b.width=827):826==b.height&&(b=mxRectangle.fromRectangle(b),b.height=827):"a5"==e.key&&(584==b.width?(b=mxRectangle.fromRectangle(b),b.width=583):584==b.height&&(b=mxRectangle.fromRectangle(b),b.height=583)),b.width==e.format.width&&
+f=document.createElement("td");mxUtils.write(f,mxResources.get("image")+":");d.appendChild(f);f=document.createElement("td");var p=document.createElement("button");p.className="geBtn";p.style.margin="0px";mxUtils.write(p,mxResources.get("change")+"...");var q=document.createElement("img");q.setAttribute("valign","middle");q.style.verticalAlign="middle";q.style.border="1px solid lightGray";q.style.borderRadius="4px";q.style.marginRight="14px";q.style.maxWidth="100px";q.style.cursor="pointer";q.style.height=
+"60px";q.style.padding="4px";var t=e.backgroundImage,v=function(c){a.showBackgroundImageDialog(function(a,c){c||(t=a,b())},t);mxEvent.consume(c)};mxEvent.addListener(p,"click",v);mxEvent.addListener(q,"click",v);b();f.appendChild(q);f.appendChild(p);d.appendChild(f);h.appendChild(d);d=document.createElement("tr");f=document.createElement("td");f.colSpan=2;f.style.paddingTop="16px";f.setAttribute("align","right");p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";
+a.editor.cancelFirst&&f.appendChild(p);v=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=parseInt(n.value);isNaN(b)||e.gridSize===b||e.setGridSize(b);b=new ChangePageSetup(a,m,t,g.get());b.ignoreColor=e.background==m;b.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=t?t.src:null);e.pageFormat.width==b.previousFormat.width&&e.pageFormat.height==b.previousFormat.height&&b.ignoreColor&&b.ignoreImage||e.model.execute(b)});v.className="geBtn gePrimaryBtn";
+f.appendChild(v);a.editor.cancelFirst||f.appendChild(p);d.appendChild(f);h.appendChild(d);k.appendChild(h);this.container=k};
+PageSetupDialog.addPageFormatPanel=function(a,c,b,e){function d(a,c,e){if(e||n!=document.activeElement&&p!=document.activeElement){a=!1;for(c=0;c<t.length;c++)e=t[c],x?"custom"==e.key&&(h.value=e.key,x=!1):null!=e.format&&("a4"==e.key?826==b.width?(b=mxRectangle.fromRectangle(b),b.width=827):826==b.height&&(b=mxRectangle.fromRectangle(b),b.height=827):"a5"==e.key&&(584==b.width?(b=mxRectangle.fromRectangle(b),b.width=583):584==b.height&&(b=mxRectangle.fromRectangle(b),b.height=583)),b.width==e.format.width&&
b.height==e.format.height?(h.value=e.key,f.setAttribute("checked","checked"),f.defaultChecked=!0,f.checked=!0,k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1,a=!0):b.width==e.format.height&&b.height==e.format.width&&(h.value=e.key,f.removeAttribute("checked"),f.defaultChecked=!1,f.checked=!1,k.setAttribute("checked","checked"),k.defaultChecked=!0,a=k.checked=!0));a?(g.style.display="",m.style.display="none"):(n.value=b.width/100,p.value=b.height/100,f.setAttribute("checked","checked"),
h.value="custom",g.style.display="none",m.style.display="")}}c="format-"+c;var f=document.createElement("input");f.setAttribute("name",c);f.setAttribute("type","radio");f.setAttribute("value","portrait");var k=document.createElement("input");k.setAttribute("name",c);k.setAttribute("type","radio");k.setAttribute("value","landscape");var h=document.createElement("select");h.style.marginBottom="8px";h.style.width="202px";var g=document.createElement("div");g.style.marginLeft="4px";g.style.width="210px";
g.style.height="24px";f.style.marginRight="6px";g.appendChild(f);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));g.appendChild(c);k.style.marginLeft="10px";k.style.marginRight="6px";g.appendChild(k);var l=document.createElement("span");l.style.width="100px";mxUtils.write(l,mxResources.get("landscape"));g.appendChild(l);var m=document.createElement("div");m.style.marginLeft="4px";m.style.width="210px";m.style.height="24px";var n=document.createElement("input");
-n.setAttribute("size","7");n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in x ");var p=document.createElement("input");p.setAttribute("size","7");p.style.textAlign="right";m.appendChild(p);mxUtils.write(m," in");g.style.display="none";m.style.display="none";for(var r={},u=PageSetupDialog.getFormats(),t=0;t<u.length;t++){var v=u[t];r[v.key]=v;var y=document.createElement("option");y.setAttribute("value",v.key);mxUtils.write(y,v.title);h.appendChild(y)}var x=!1;d();a.appendChild(h);mxUtils.br(a);
-a.appendChild(g);a.appendChild(m);var B=b,E=function(a,c){var d=r[h.value];null!=d.format?(n.value=d.format.width/100,p.value=d.format.height/100,m.style.display="none",g.style.display=""):(g.style.display="none",m.style.display="");d=parseFloat(n.value);if(isNaN(d)||0>=d)n.value=b.width/100;d=parseFloat(p.value);if(isNaN(d)||0>=d)p.value=b.height/100;d=new mxRectangle(0,0,Math.floor(100*parseFloat(n.value)),Math.floor(100*parseFloat(p.value)));"custom"!=h.value&&k.checked&&(d=new mxRectangle(0,0,
-d.height,d.width));c&&x||d.width==B.width&&d.height==B.height||(B=d,null!=e&&e(B))};mxEvent.addListener(c,"click",function(a){f.checked=!0;E(a);mxEvent.consume(a)});mxEvent.addListener(l,"click",function(a){k.checked=!0;E(a);mxEvent.consume(a)});mxEvent.addListener(n,"blur",E);mxEvent.addListener(n,"click",E);mxEvent.addListener(p,"blur",E);mxEvent.addListener(p,"click",E);mxEvent.addListener(k,"change",E);mxEvent.addListener(f,"change",E);mxEvent.addListener(h,"change",function(a){x="custom"==h.value;
-E(a,!0)});E();return{set:function(a){b=a;d(null,null,!0)},get:function(){return B},widthInput:n,heightInput:p}};
+n.setAttribute("size","7");n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in x ");var p=document.createElement("input");p.setAttribute("size","7");p.style.textAlign="right";m.appendChild(p);mxUtils.write(m," in");g.style.display="none";m.style.display="none";for(var q={},t=PageSetupDialog.getFormats(),v=0;v<t.length;v++){var u=t[v];q[u.key]=u;var w=document.createElement("option");w.setAttribute("value",u.key);mxUtils.write(w,u.title);h.appendChild(w)}var x=!1;d();a.appendChild(h);mxUtils.br(a);
+a.appendChild(g);a.appendChild(m);var A=b,E=function(a,c){var d=q[h.value];null!=d.format?(n.value=d.format.width/100,p.value=d.format.height/100,m.style.display="none",g.style.display=""):(g.style.display="none",m.style.display="");d=parseFloat(n.value);if(isNaN(d)||0>=d)n.value=b.width/100;d=parseFloat(p.value);if(isNaN(d)||0>=d)p.value=b.height/100;d=new mxRectangle(0,0,Math.floor(100*parseFloat(n.value)),Math.floor(100*parseFloat(p.value)));"custom"!=h.value&&k.checked&&(d=new mxRectangle(0,0,
+d.height,d.width));c&&x||d.width==A.width&&d.height==A.height||(A=d,null!=e&&e(A))};mxEvent.addListener(c,"click",function(a){f.checked=!0;E(a);mxEvent.consume(a)});mxEvent.addListener(l,"click",function(a){k.checked=!0;E(a);mxEvent.consume(a)});mxEvent.addListener(n,"blur",E);mxEvent.addListener(n,"click",E);mxEvent.addListener(p,"blur",E);mxEvent.addListener(p,"click",E);mxEvent.addListener(k,"change",E);mxEvent.addListener(f,"change",E);mxEvent.addListener(h,"change",function(a){x="custom"==h.value;
+E(a,!0)});E();return{set:function(a){b=a;d(null,null,!0)},get:function(){return A},widthInput:n,heightInput:p}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,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(a,c,b,e,d,f,k,h,g,l,m,n){g=null!=g?g:!0;var p,r,u=document.createElement("table"),t=document.createElement("tbody");u.style.position="absolute";u.style.top="30px";u.style.left="20px";p=document.createElement("tr");r=document.createElement("td");r.style.textOverflow="ellipsis";r.style.textAlign="right";r.style.maxWidth="100px";r.style.fontSize="10pt";r.style.width="84px";mxUtils.write(r,(d||mxResources.get("filename"))+":");p.appendChild(r);var v=document.createElement("input");
-v.setAttribute("value",c||"");v.style.marginLeft="4px";v.style.width=null!=n?n+"px":"180px";var y=mxUtils.button(b,function(){if(null==f||f(v.value))g&&a.hideDialog(),e(v.value)});y.className="geBtn gePrimaryBtn";this.init=function(){if(null!=d||null==k)if(v.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?v.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=u.parentNode;if(null!=a){var b=null;mxEvent.addListener(a,"dragleave",function(a){null!=b&&(b.style.backgroundColor=
-"",b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=v,b.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=b&&(b.style.backgroundColor="",b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(v.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),y.click());a.stopPropagation();
-a.preventDefault()}))}}};r=document.createElement("td");r.style.whiteSpace="nowrap";r.appendChild(v);p.appendChild(r);if(null!=d||null==k)t.appendChild(p),null!=m&&(r.appendChild(FilenameDialog.createTypeHint(a,v,m)),null!=a.editor.diagramFileTypes&&(p=document.createElement("tr"),r=document.createElement("td"),r.style.textOverflow="ellipsis",r.style.textAlign="right",r.style.maxWidth="100px",r.style.fontSize="10pt",r.style.width="84px",mxUtils.write(r,mxResources.get("type")+":"),p.appendChild(r),
-r=document.createElement("td"),r.style.whiteSpace="nowrap",p.appendChild(r),c=FilenameDialog.createFileTypes(a,v,a.editor.diagramFileTypes),c.style.marginLeft="4px",c.style.width="198px",r.appendChild(c),v.style.width=null!=n?n-40+"px":"190px",p.appendChild(r),t.appendChild(p)));null!=k&&(p=document.createElement("tr"),r=document.createElement("td"),r.colSpan=2,r.appendChild(k),p.appendChild(r),t.appendChild(p));p=document.createElement("tr");r=document.createElement("td");r.colSpan=2;r.style.paddingTop=
-null!=m?"12px":"20px";r.style.whiteSpace="nowrap";r.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=l&&l()});m.className="geBtn";a.editor.cancelFirst&&r.appendChild(m);null!=h&&(n=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(h)}),n.className="geBtn",r.appendChild(n));mxEvent.addListener(v,"keypress",function(a){13==a.keyCode&&y.click()});r.appendChild(y);a.editor.cancelFirst||r.appendChild(m);p.appendChild(r);t.appendChild(p);
-u.appendChild(t);this.container=u};FilenameDialog.filenameHelpLink=null;
+var FilenameDialog=function(a,c,b,e,d,f,k,h,g,l,m,n){g=null!=g?g:!0;var p,q,t=document.createElement("table"),v=document.createElement("tbody");t.style.position="absolute";t.style.top="30px";t.style.left="20px";p=document.createElement("tr");q=document.createElement("td");q.style.textOverflow="ellipsis";q.style.textAlign="right";q.style.maxWidth="100px";q.style.fontSize="10pt";q.style.width="84px";mxUtils.write(q,(d||mxResources.get("filename"))+":");p.appendChild(q);var u=document.createElement("input");
+u.setAttribute("value",c||"");u.style.marginLeft="4px";u.style.width=null!=n?n+"px":"180px";var w=mxUtils.button(b,function(){if(null==f||f(u.value))g&&a.hideDialog(),e(u.value)});w.className="geBtn gePrimaryBtn";this.init=function(){if(null!=d||null==k)if(u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?u.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=t.parentNode;if(null!=a){var b=null;mxEvent.addListener(a,"dragleave",function(a){null!=b&&(b.style.backgroundColor=
+"",b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=u,b.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=b&&(b.style.backgroundColor="",b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(u.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),w.click());a.stopPropagation();
+a.preventDefault()}))}}};q=document.createElement("td");q.style.whiteSpace="nowrap";q.appendChild(u);p.appendChild(q);if(null!=d||null==k)v.appendChild(p),null!=m&&(q.appendChild(FilenameDialog.createTypeHint(a,u,m)),null!=a.editor.diagramFileTypes&&(p=document.createElement("tr"),q=document.createElement("td"),q.style.textOverflow="ellipsis",q.style.textAlign="right",q.style.maxWidth="100px",q.style.fontSize="10pt",q.style.width="84px",mxUtils.write(q,mxResources.get("type")+":"),p.appendChild(q),
+q=document.createElement("td"),q.style.whiteSpace="nowrap",p.appendChild(q),c=FilenameDialog.createFileTypes(a,u,a.editor.diagramFileTypes),c.style.marginLeft="4px",c.style.width="198px",q.appendChild(c),u.style.width=null!=n?n-40+"px":"190px",p.appendChild(q),v.appendChild(p)));null!=k&&(p=document.createElement("tr"),q=document.createElement("td"),q.colSpan=2,q.appendChild(k),p.appendChild(q),v.appendChild(p));p=document.createElement("tr");q=document.createElement("td");q.colSpan=2;q.style.paddingTop=
+null!=m?"12px":"20px";q.style.whiteSpace="nowrap";q.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=l&&l()});m.className="geBtn";a.editor.cancelFirst&&q.appendChild(m);null!=h&&(n=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(h)}),n.className="geBtn",q.appendChild(n));mxEvent.addListener(u,"keypress",function(a){13==a.keyCode&&w.click()});q.appendChild(w);a.editor.cancelFirst||q.appendChild(m);p.appendChild(q);v.appendChild(p);
+t.appendChild(v);this.container=t};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createTypeHint=function(a,c,b){var e=document.createElement("img");e.style.backgroundPosition="center bottom";e.style.backgroundRepeat="no-repeat";e.style.margin="2px 0 0 4px";e.style.verticalAlign="top";e.style.cursor="pointer";e.style.height="16px";e.style.width="16px";mxUtils.setOpacity(e,70);var d=function(){e.setAttribute("src",Editor.helpImage);e.setAttribute("title",mxResources.get("help"));for(var a=0;a<b.length;a++)if(0<b[a].ext.length&&c.value.toLowerCase().substring(c.value.length-
b[a].ext.length-1)=="."+b[a].ext){e.setAttribute("title",mxResources.get(b[a].title));break}};mxEvent.addListener(c,"keyup",d);mxEvent.addListener(c,"change",d);mxEvent.addListener(e,"click",function(b){var c=e.getAttribute("title");e.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=c&&a.showError(null,c,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(b)});
d();return e};
@@ -2148,33 +2148,33 @@ mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,b=nul
")";var f=c=0;null!=a.view.backgroundPageShape&&(f=this.getBackgroundPageBounds(),c=1+f.x,f=1+f.y);d=-Math.round(d-mxUtils.mod(this.translate.x*this.scale-c,d))+"px "+-Math.round(d-mxUtils.mod(this.translate.y*this.scale-f,d))+"px"}c=a.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=d,a.view.backgroundPageShape.node.style.backgroundImage=e,a.view.backgroundPageShape.node.style.backgroundColor=b,a.view.backgroundPageShape.node.style.borderColor=
a.defaultPageBorderColor,a.container.className="geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=d,c.style.backgroundColor=b,c.style.backgroundImage=e)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var c=this.gridSteps*b,e=[],d=1;d<this.gridSteps;d++){var f=d*b;e.push("M 0 "+f+" L "+c+" "+f+" M "+f+" 0 L "+f+
" "+c)}return'<svg width="'+c+'" height="'+c+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+c+'" height="'+c+'" patternUnits="userSpaceOnUse"><path d="'+e.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+c+" 0 L 0 0 0 "+c+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,c){a.apply(this,arguments);
-if(null!=this.shiftPreview1){var e=this.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);var d=this.gridSize*this.view.scale*this.view.gridSteps,d=-Math.round(d-mxUtils.mod(this.view.translate.x*this.view.scale+b,d))+"px "+-Math.round(d-mxUtils.mod(this.view.translate.y*this.view.scale+c,d))+"px";e.style.backgroundPosition=d}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,e=this.view.translate,f=this.pageFormat,g=d*this.pageScale,k=this.view.getBackgroundPageBounds();
-b=k.width;c=k.height;var h=new mxRectangle(d*e.x,d*e.y,f.width*g,f.height*g),t=(a=a&&Math.min(h.width,h.height)>this.minPageBreakDist)?Math.ceil(c/h.height)-1:0,v=a?Math.ceil(b/h.width)-1:0,y=k.x+b,x=k.y+c;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?t:v,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(k.x),
-Math.round(k.y+(c+1)*h.height)),new mxPoint(Math.round(y),Math.round(k.y+(c+1)*h.height))]:[new mxPoint(Math.round(k.x+(c+1)*h.width),Math.round(k.y)),new mxPoint(Math.round(k.x+(c+1)*h.width),Math.round(x))];null!=a[c]?(a[c].points=d,a[c].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[c]=d)}for(c=b;c<a.length;c++)a[c].destroy();a.splice(b,a.length-b)}});a(this.horizontalPageBreaks);
-a(this.verticalPageBreaks)};var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,d){for(var e=0;e<b.length;e++){if(this.graph.isTableCell(b[e])||this.graph.isTableRow(b[e]))return!1;if(this.graph.getModel().isVertex(b[e])){var f=this.graph.getCellGeometry(b[e]);if(null!=f&&f.relative)return!1}}return c.apply(this,arguments)};var b=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=
-b.apply(this,arguments);a.intersects=mxUtils.bind(this,function(b,c){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,
-e=this.graph.pageScale,f=d.width*e,d=d.height*e,e=Math.floor(Math.min(0,b)/f),p=Math.floor(Math.min(0,c)/d);return new mxRectangle(this.scale*(this.translate.x+e*f),this.scale*(this.translate.y+p*d),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/f)-e)*f,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/d)-p)*d)};var e=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){e.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
+if(null!=this.shiftPreview1){var e=this.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);var d=this.gridSize*this.view.scale*this.view.gridSteps,d=-Math.round(d-mxUtils.mod(this.view.translate.x*this.view.scale+b,d))+"px "+-Math.round(d-mxUtils.mod(this.view.translate.y*this.view.scale+c,d))+"px";e.style.backgroundPosition=d}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var e=this.view.scale,d=this.view.translate,f=this.pageFormat,g=e*this.pageScale,k=this.view.getBackgroundPageBounds();
+b=k.width;c=k.height;var h=new mxRectangle(e*d.x,e*d.y,f.width*g,f.height*g),v=(a=a&&Math.min(h.width,h.height)>this.minPageBreakDist)?Math.ceil(c/h.height)-1:0,u=a?Math.ceil(b/h.width)-1:0,w=k.x+b,x=k.y+c;null==this.horizontalPageBreaks&&0<v&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<u&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?v:u,c=0;c<=b;c++){var e=a==this.horizontalPageBreaks?[new mxPoint(Math.round(k.x),
+Math.round(k.y+(c+1)*h.height)),new mxPoint(Math.round(w),Math.round(k.y+(c+1)*h.height))]:[new mxPoint(Math.round(k.x+(c+1)*h.width),Math.round(k.y)),new mxPoint(Math.round(k.x+(c+1)*h.width),Math.round(x))];null!=a[c]?(a[c].points=e,a[c].redraw()):(e=new mxPolyline(e,this.pageBreakColor),e.dialect=this.dialect,e.isDashed=this.pageBreakDashed,e.pointerEvents=!1,e.init(this.view.backgroundPane),e.redraw(),a[c]=e)}for(c=b;c<a.length;c++)a[c].destroy();a.splice(b,a.length-b)}});a(this.horizontalPageBreaks);
+a(this.verticalPageBreaks)};var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,e){for(var d=0;d<b.length;d++){if(this.graph.isTableCell(b[d])||this.graph.isTableRow(b[d]))return!1;if(this.graph.getModel().isVertex(b[d])){var f=this.graph.getCellGeometry(b[d]);if(null!=f&&f.relative)return!1}}return c.apply(this,arguments)};var b=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=
+b.apply(this,arguments);a.intersects=mxUtils.bind(this,function(b,c){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,e=this.graph.pageFormat,
+d=this.graph.pageScale,f=e.width*d,e=e.height*d,d=Math.floor(Math.min(0,b)/f),p=Math.floor(Math.min(0,c)/e);return new mxRectangle(this.scale*(this.translate.x+d*f),this.scale*(this.translate.y+p*e),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/f)-d)*f,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/e)-p)*e)};var e=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){e.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=a+"px",this.view.backgroundPageShape.node.style.marginTop=b+"px")};var d=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,b,c,e,f,n){var g=d.apply(this,arguments);null==n||n||mxEvent.addListener(g,"mousedown",function(a){mxEvent.consume(a)});return g};var f=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(a,b,c){var d,e=this.graph.model.getParent(a);if(b)d=this.graph.model.isEdge(a)?null:this.graph.getCellGeometry(a),d=!this.graph.model.isEdge(e)&&!this.graph.isSiblingSelected(a)&&(null!=d&&d.relative||!this.graph.isContainer(e)||this.graph.isPart(a));else if(d=f.apply(this,arguments),this.graph.isTableCell(a)||this.graph.isTableRow(a))d=e,this.graph.isTable(d)||(d=this.graph.model.getParent(d)),d=!this.graph.selectionCellsHandler.isHandled(d)||this.graph.isCellSelected(d)&&this.graph.isToggleEvent(c.getEvent())||
-this.graph.isCellSelected(a)&&!this.graph.isToggleEvent(c.getEvent())||this.graph.isTableCell(a)&&this.graph.isCellSelected(e);return d};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var b=this.graph.getModel(),c=b.getParent(a),d=this.graph.view.getState(c),e=this.graph.isCellSelected(a);null!=d&&(b.isVertex(c)||b.isEdge(c));){var f=this.graph.isCellSelected(c),e=e||f;if(f||!e&&(this.graph.isTableCell(a)||this.graph.isTableRow(a)))a=c;c=b.getParent(c)}return a}})();EditorUi=function(a,c,b){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=c||document.body;var e=this.editor.graph;e.lightbox=b;this.initialDefaultVertexStyle=mxUtils.clone(e.defaultVertexStyle);this.initialDefaultEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);if(b){var d=e.getGraphBounds;e.getGraphBounds=function(a){var b=d.apply(this,arguments);a=this.backgroundImage;if(null!=a){var c=this.view.translate,e=this.view.scale;b.add(new mxRectangle((c.x+a.x)*e,
+function(a,b,c){var e,d=this.graph.model.getParent(a);if(b)e=this.graph.model.isEdge(a)?null:this.graph.getCellGeometry(a),e=!this.graph.model.isEdge(d)&&!this.graph.isSiblingSelected(a)&&(null!=e&&e.relative||!this.graph.isContainer(d)||this.graph.isPart(a));else if(e=f.apply(this,arguments),this.graph.isTableCell(a)||this.graph.isTableRow(a))e=d,this.graph.isTable(e)||(e=this.graph.model.getParent(e)),e=!this.graph.selectionCellsHandler.isHandled(e)||this.graph.isCellSelected(e)&&this.graph.isToggleEvent(c.getEvent())||
+this.graph.isCellSelected(a)&&!this.graph.isToggleEvent(c.getEvent())||this.graph.isTableCell(a)&&this.graph.isCellSelected(d);return e};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var b=this.graph.getModel(),c=b.getParent(a),e=this.graph.view.getState(c),d=this.graph.isCellSelected(a);null!=e&&(b.isVertex(c)||b.isEdge(c));){var f=this.graph.isCellSelected(c),d=d||f;if(f||!d&&(this.graph.isTableCell(a)||this.graph.isTableRow(a)))a=c;c=b.getParent(c)}return a}})();EditorUi=function(a,c,b){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=c||document.body;var e=this.editor.graph;e.lightbox=b;this.initialDefaultVertexStyle=mxUtils.clone(e.defaultVertexStyle);this.initialDefaultEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);if(b){var d=e.getGraphBounds;e.getGraphBounds=function(a){var b=d.apply(this,arguments);a=this.backgroundImage;if(null!=a){var c=this.view.translate,e=this.view.scale;b.add(new mxRectangle((c.x+a.x)*e,
(c.y+a.y)*e,a.width*e,a.height*e))}return b}}e.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,e.isEnabled=
function(){return!1},e.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!e.standalone){var f="rounded shadow glass dashed dashPattern labelBackgroundColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),k="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" ");
-this.setDefaultStyle=function(a){try{var b=e.view.getState(a);if(null!=b){var c=a.clone();c.style="";var d=e.getCellStyle(c);a=[];var c=[],f;for(f in b.style)d[f]!=b.style[f]&&(a.push(b.style[f]),c.push(f));for(var g=e.getModel().getStyle(b.cell),k=null!=g?g.split(";"):[],g=0;g<k.length;g++){var h=k[g],l=h.indexOf("=");if(0<=l){f=h.substring(0,l);var m=h.substring(l+1);null!=d[f]&&"none"==m&&(a.push(m),c.push(f))}}e.getModel().isEdge(b.cell)?e.currentEdgeStyle={}:e.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged",
+this.setDefaultStyle=function(a){try{var b=e.view.getState(a);if(null!=b){var c=a.clone();c.style="";var d=e.getCellStyle(c);a=[];var c=[],f;for(f in b.style)d[f]!=b.style[f]&&(a.push(b.style[f]),c.push(f));for(var g=e.getModel().getStyle(b.cell),k=null!=g?g.split(";"):[],g=0;g<k.length;g++){var h=k[g],m=h.indexOf("=");if(0<=m){f=h.substring(0,m);var l=h.substring(m+1);null!=d[f]&&"none"==l&&(a.push(l),c.push(f))}}e.getModel().isEdge(b.cell)?e.currentEdgeStyle={}:e.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged",
"keys",c,"values",a,"cells",[b.cell]))}}catch(ea){this.handleError(ea)}};this.clearDefaultStyle=function(){e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var h=["fontFamily","fontSource","fontSize","fontColor"];for(c=0;c<h.length;c++)0>mxUtils.indexOf(f,h[c])&&f.push(h[c]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),
l=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["align","verticalAlign"],["opacity"],["html"]];for(c=0;c<l.length;c++)for(b=0;b<l[c].length;b++)f.push(l[c][b]);for(c=0;c<k.length;c++)0>mxUtils.indexOf(f,k[c])&&f.push(k[c]);var m=function(a,b,c,d,g,h,m){d=null!=d?d:e.currentVertexStyle;g=null!=g?g:e.currentEdgeStyle;c=null!=c?c:e.getModel();
-if(m){m=[];for(var p=0;p<a.length;p++)m=m.concat(c.getDescendants(a[p]));a=m}c.beginUpdate();try{for(p=0;p<a.length;p++){var n=a[p],r;if(b)r=["fontSize","fontFamily","fontColor"];else{var u=c.getStyle(n),v=null!=u?u.split(";"):[];r=f.slice();for(var t=0;t<v.length;t++){var aa=v[t],y=aa.indexOf("=");if(0<=y){var O=aa.substring(0,y),ba=mxUtils.indexOf(r,O);0<=ba&&r.splice(ba,1);for(m=0;m<l.length;m++){var z=l[m];if(0<=mxUtils.indexOf(z,O))for(var E=0;E<z.length;E++){var J=mxUtils.indexOf(r,z[E]);0<=
-J&&r.splice(J,1)}}}}}var x=c.isEdge(n);m=x?g:d;for(var B=c.getStyle(n),t=0;t<r.length;t++){var O=r[t],A=m[O];null!=A&&("shape"!=O||x)&&(!x||h||0>mxUtils.indexOf(k,O))&&(B=mxUtils.setStyle(B,O,A))}Editor.simpleLabels&&(B=mxUtils.setStyle(mxUtils.setStyle(B,"html",null),"whiteSpace",null));c.setStyle(n,B)}}finally{c.endUpdate()}};e.addListener("cellsInserted",function(a,b){m(b.getProperty("cells"))});e.addListener("textInserted",function(a,b){m(b.getProperty("cells"),!0)});this.insertHandler=m;this.createDivs();
+if(m){m=[];for(var p=0;p<a.length;p++)m=m.concat(c.getDescendants(a[p]));a=m}c.beginUpdate();try{for(p=0;p<a.length;p++){var n=a[p],q;if(b)q=["fontSize","fontFamily","fontColor"];else{var t=c.getStyle(n),u=null!=t?t.split(";"):[];q=f.slice();for(var v=0;v<u.length;v++){var ba=u[v],w=ba.indexOf("=");if(0<=w){var O=ba.substring(0,w),E=mxUtils.indexOf(q,O);0<=E&&q.splice(E,1);for(m=0;m<l.length;m++){var y=l[m];if(0<=mxUtils.indexOf(y,O))for(var A=0;A<y.length;A++){var x=mxUtils.indexOf(q,y[A]);0<=x&&
+q.splice(x,1)}}}}}var J=c.isEdge(n);m=J?g:d;for(var B=c.getStyle(n),v=0;v<q.length;v++){var O=q[v],ca=m[O];null!=ca&&("shape"!=O||J)&&(!J||h||0>mxUtils.indexOf(k,O))&&(B=mxUtils.setStyle(B,O,ca))}Editor.simpleLabels&&(B=mxUtils.setStyle(mxUtils.setStyle(B,"html",null),"whiteSpace",null));c.setStyle(n,B)}}finally{c.endUpdate()}};e.addListener("cellsInserted",function(a,b){m(b.getProperty("cells"))});e.addListener("textInserted",function(a,b){m(b.getProperty("cells"),!0)});this.insertHandler=m;this.createDivs();
this.createUi();this.refresh();var n=mxUtils.bind(this,function(a){null==a&&(a=window.event);return e.isEditing()||null!=a&&this.isSelectionAllowed(a)});this.container==document.body&&(this.menubarContainer.onselectstart=n,this.menubarContainer.onmousedown=n,this.toolbarContainer.onselectstart=n,this.toolbarContainer.onmousedown=n,this.diagramContainer.onselectstart=n,this.diagramContainer.onmousedown=n,this.sidebarContainer.onselectstart=n,this.sidebarContainer.onmousedown=n,this.formatContainer.onselectstart=
n,this.formatContainer.onmousedown=n,this.footerContainer.onselectstart=n,this.footerContainer.onmousedown=n,null!=this.tabContainer&&(this.tabContainer.onselectstart=n));!this.editor.chromeless||this.editor.editable?(c=function(a){if(null!=a){var b=mxEvent.getSource(a);if("A"==b.nodeName)for(;null!=b;){if("geHint"==b.className)return!0;b=b.parentNode}}return n(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",
-c):this.diagramContainer.oncontextmenu=c):e.panningHandler.usePopupTrigger=!1;e.init(this.diagramContainer);mxClient.IS_SVG&&null!=e.view.getDrawPane()&&(c=e.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=e.graphHandler){var p=e.graphHandler.start;e.graphHandler.start=function(){null!=F.hoverIcons&&F.hoverIcons.reset();p.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var b=
-mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-b.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-b.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var r=!1,u=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,b){return r||u.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32!=a.which||e.isEditing()?mxEvent.isConsumed(a)||
-27!=a.keyCode||this.hideDialog(null,!0):(r=!0,this.hoverIcons.reset(),e.container.style.cursor="move",e.isEditing()||mxEvent.getSource(a)!=e.container||mxEvent.consume(a))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){e.container.style.cursor="";r=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var t=e.panningHandler.isForcePanningEvent;e.panningHandler.isForcePanningEvent=function(a){return t.apply(this,arguments)||r||mxEvent.isMouseEvent(a.getEvent())&&
-(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var v=e.cellEditor.isStopEditingEvent;e.cellEditor.isStopEditingEvent=function(a){return v.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var y=e.isZoomWheelEvent;e.isZoomWheelEvent=function(){return r||
-y.apply(this,arguments)};var x=!1,B=null,E=null,G=null,A=mxUtils.bind(this,function(){if(null!=this.toolbar&&x!=e.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var c=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=c}a=this.toolbar.fontMenu;c=this.toolbar.sizeMenu;if(null==G)this.toolbar.createTextToolbar();else{for(var d=0;d<G.length;d++)this.toolbar.container.appendChild(G[d]);this.toolbar.fontMenu=
-B;this.toolbar.sizeMenu=E}x=e.cellEditor.isContentEditing();B=a;E=c;G=b}}),F=this,z=e.cellEditor.startEditing;e.cellEditor.startEditing=function(){z.apply(this,arguments);A();if(e.cellEditor.isContentEditing()){var a=!1,b=function(){a||(a=!0,window.setTimeout(function(){var b=e.getSelectedEditingElement();null!=b&&(b=mxUtils.getCurrentStyle(b),null!=b&&null!=F.toolbar&&(F.toolbar.setFontName(Graph.stripQuotes(b.fontFamily)),F.toolbar.setFontSize(parseInt(b.fontSize))));a=!1},0))};mxEvent.addListener(e.cellEditor.textarea,
-"input",b);mxEvent.addListener(e.cellEditor.textarea,"touchend",b);mxEvent.addListener(e.cellEditor.textarea,"mouseup",b);mxEvent.addListener(e.cellEditor.textarea,"keyup",b);b()}};var H=e.cellEditor.stopEditing;e.cellEditor.stopEditing=function(a,b){try{H.apply(this,arguments),A()}catch(J){F.handleError(J)}};e.container.setAttribute("tabindex","0");e.container.style.cursor="default";if(window.self===window.top&&null!=e.container.parentNode)try{e.container.focus()}catch(L){}var K=e.fireMouseEvent;
+c):this.diagramContainer.oncontextmenu=c):e.panningHandler.usePopupTrigger=!1;e.init(this.diagramContainer);mxClient.IS_SVG&&null!=e.view.getDrawPane()&&(c=e.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=e.graphHandler){var p=e.graphHandler.start;e.graphHandler.start=function(){null!=G.hoverIcons&&G.hoverIcons.reset();p.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var b=
+mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-b.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-b.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var q=!1,t=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,b){return q||t.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32!=a.which||e.isEditing()?mxEvent.isConsumed(a)||
+27!=a.keyCode||this.hideDialog(null,!0):(q=!0,this.hoverIcons.reset(),e.container.style.cursor="move",e.isEditing()||mxEvent.getSource(a)!=e.container||mxEvent.consume(a))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){e.container.style.cursor="";q=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var v=e.panningHandler.isForcePanningEvent;e.panningHandler.isForcePanningEvent=function(a){return v.apply(this,arguments)||q||mxEvent.isMouseEvent(a.getEvent())&&
+(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var u=e.cellEditor.isStopEditingEvent;e.cellEditor.isStopEditingEvent=function(a){return u.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var w=e.isZoomWheelEvent;e.isZoomWheelEvent=function(){return q||
+w.apply(this,arguments)};var x=!1,A=null,E=null,H=null,B=mxUtils.bind(this,function(){if(null!=this.toolbar&&x!=e.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var c=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=c}a=this.toolbar.fontMenu;c=this.toolbar.sizeMenu;if(null==H)this.toolbar.createTextToolbar();else{for(var d=0;d<H.length;d++)this.toolbar.container.appendChild(H[d]);this.toolbar.fontMenu=
+A;this.toolbar.sizeMenu=E}x=e.cellEditor.isContentEditing();A=a;E=c;H=b}}),G=this,y=e.cellEditor.startEditing;e.cellEditor.startEditing=function(){y.apply(this,arguments);B();if(e.cellEditor.isContentEditing()){var a=!1,b=function(){a||(a=!0,window.setTimeout(function(){var b=e.getSelectedEditingElement();null!=b&&(b=mxUtils.getCurrentStyle(b),null!=b&&null!=G.toolbar&&(G.toolbar.setFontName(Graph.stripQuotes(b.fontFamily)),G.toolbar.setFontSize(parseInt(b.fontSize))));a=!1},0))};mxEvent.addListener(e.cellEditor.textarea,
+"input",b);mxEvent.addListener(e.cellEditor.textarea,"touchend",b);mxEvent.addListener(e.cellEditor.textarea,"mouseup",b);mxEvent.addListener(e.cellEditor.textarea,"keyup",b);b()}};var I=e.cellEditor.stopEditing;e.cellEditor.stopEditing=function(a,b){try{I.apply(this,arguments),B()}catch(J){G.handleError(J)}};e.container.setAttribute("tabindex","0");e.container.style.cursor="default";if(window.self===window.top&&null!=e.container.parentNode)try{e.container.focus()}catch(M){}var K=e.fireMouseEvent;
e.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();K.apply(this,arguments)};e.popupMenuHandler.autoExpand=!0;null!=this.menus&&(e.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){e.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};e.connectionHandler.addListener(mxEvent.CONNECT,function(a,
-b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&(c.push(b.getProperty("terminal")),window.setTimeout(function(){null!=F.hoverIcons&&F.hoverIcons.update(e.view.getState(c[c.length-1]))},0));m(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,b){var c=b.getProperty("cells"),d=!1,m=!1;if(0<c.length)for(var l=0;l<c.length&&(d=e.getModel().isVertex(c[l])||d,!(m=e.getModel().isEdge(c[l])||m)||!d);l++);else m=d=!0;for(var c=b.getProperty("keys"),p=b.getProperty("values"),
+b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&(c.push(b.getProperty("terminal")),window.setTimeout(function(){null!=G.hoverIcons&&G.hoverIcons.update(e.view.getState(c[c.length-1]))},0));m(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,b){var c=b.getProperty("cells"),d=!1,m=!1;if(0<c.length)for(var l=0;l<c.length&&(d=e.getModel().isVertex(c[l])||d,!(m=e.getModel().isEdge(c[l])||m)||!d);l++);else m=d=!0;for(var c=b.getProperty("keys"),p=b.getProperty("values"),
l=0;l<c.length;l++){var n=0<=mxUtils.indexOf(h,c[l]);if("strokeColor"!=c[l]||null!=p[l]&&"none"!=p[l])if(0<=mxUtils.indexOf(k,c[l]))m||0<=mxUtils.indexOf(g,c[l])?null==p[l]?delete e.currentEdgeStyle[c[l]]:e.currentEdgeStyle[c[l]]=p[l]:d&&0<=mxUtils.indexOf(f,c[l])&&(null==p[l]?delete e.currentVertexStyle[c[l]]:e.currentVertexStyle[c[l]]=p[l]);else if(0<=mxUtils.indexOf(f,c[l])){if(d||n)null==p[l]?delete e.currentVertexStyle[c[l]]:e.currentVertexStyle[c[l]]=p[l];if(m||n||0<=mxUtils.indexOf(g,c[l]))null==
p[l]?delete e.currentEdgeStyle[c[l]]:e.currentEdgeStyle[c[l]]=p[l]}}null!=this.toolbar&&(this.toolbar.setFontName(e.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(e.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==e.currentEdgeStyle.edgeStyle&&"1"==e.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==e.currentEdgeStyle.edgeStyle||
"none"==e.currentEdgeStyle.edgeStyle||null==e.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==e.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==e.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==e.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==e.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==e.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),
@@ -2214,13 +2214,13 @@ b==mxConstants.ARROW_DIAMOND_THIN?"1"==e?"geSprite geSprite-"+a+"thindiamond":"g
b?"geSprite geSprite-"+a+"eronetoone":"ERmany"==b?"geSprite geSprite-"+a+"ermany":"ERoneToMany"==b?"geSprite geSprite-"+a+"eronetomany":"ERzeroToOne"==b?"geSprite geSprite-"+a+"eroneopt":"ERzeroToMany"==b?"geSprite geSprite-"+a+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,c=this.actions.get("paste"),b=this.actions.get("pasteHere");c.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));b.setEnabled(c.isEnabled())};
EditorUi.prototype.initClipboard=function(){var a=this,c=mxClipboard.cut;mxClipboard.cut=function(b){b.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):c.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(b){var c=null;if(b.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{for(var c=c||b.getSelectionCells(),c=b.getExportableCells(b.model.getTopmostCells(c)),d={},e=b.createCellLookup(c),f=b.cloneCells(c,null,d),m=new mxGraphModel,n=m.getChildAt(m.getRoot(),
-0),p=0;p<f.length;p++){m.add(n,f[p]);var r=b.view.getState(c[p]);if(null!=r){var u=b.getCellGeometry(f[p]);null!=u&&u.relative&&!m.isEdge(c[p])&&null==e[mxObjectIdentity.get(m.getParent(c[p]))]&&(u.offset=null,u.relative=!1,u.x=r.x/r.view.scale-r.view.translate.x,u.y=r.y/r.view.scale-r.view.translate.y)}}b.updateCustomLinks(b.createCellMapping(d,e),f);mxClipboard.insertCount=1;mxClipboard.setCells(f)}a.updatePasteActionStates();return c};var b=mxClipboard.paste;mxClipboard.paste=function(c){var d=
+0),p=0;p<f.length;p++){m.add(n,f[p]);var q=b.view.getState(c[p]);if(null!=q){var t=b.getCellGeometry(f[p]);null!=t&&t.relative&&!m.isEdge(c[p])&&null==e[mxObjectIdentity.get(m.getParent(c[p]))]&&(t.offset=null,t.relative=!1,t.x=q.x/q.view.scale-q.view.translate.x,t.y=q.y/q.view.scale-q.view.translate.y)}}b.updateCustomLinks(b.createCellMapping(d,e),f);mxClipboard.insertCount=1;mxClipboard.setCells(f)}a.updatePasteActionStates();return c};var b=mxClipboard.paste;mxClipboard.paste=function(c){var d=
null;c.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):d=b.apply(this,arguments);a.updatePasteActionStates();return d};var e=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){e.apply(this,arguments);a.updatePasteActionStates()};var d=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,c){d.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),b=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,
-this.scale*a.height*b.height)};a.getPreferredPageSize=function(a,b,c){a=this.getPageLayout();b=this.getPageSize();return new mxRectangle(0,0,a.width*b.width,a.height*b.height)};var c=null,b=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(b,c,d,e){if(null!=a.container&&!a.isViewer()){d=null!=d?d:0;e=null!=e?e:0;var f=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),g=mxUtils.hasScrollbars(a.container),k=a.view.translate,h=a.view.scale,l=mxRectangle.fromRectangle(f);
-l.x=l.x/h-k.x;l.y=l.y/h-k.y;l.width/=h;l.height/=h;var k=a.container.scrollTop,m=a.container.scrollLeft,p=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)p+=3;var n=a.container.offsetWidth-p,p=a.container.offsetHeight-p;b=b?Math.max(.3,Math.min(c||1,n/l.width)):h;c=(n-b*l.width)/2/b;var r=0==this.lightboxVerticalDivider?0:(p-b*l.height)/this.lightboxVerticalDivider/b;g&&(c=Math.max(c,0),r=Math.max(r,0));if(g||f.width<n||f.height<p)a.view.scaleAndTranslate(b,Math.floor(c-
-l.x),Math.floor(r-l.y)),a.container.scrollTop=k*b/h,a.container.scrollLeft=m*b/h;else if(0!=d||0!=e)f=a.view.translate,a.view.setTranslate(Math.floor(f.x+d/h),Math.floor(f.y+e/h))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var e=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",e);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",e)});this.editor.addListener("resetGraphView",mxUtils.bind(this,
+this.scale*a.height*b.height)};a.getPreferredPageSize=function(a,b,c){a=this.getPageLayout();b=this.getPageSize();return new mxRectangle(0,0,a.width*b.width,a.height*b.height)};var c=null,b=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(b,c,d,e){if(null!=a.container&&!a.isViewer()){d=null!=d?d:0;e=null!=e?e:0;var f=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),g=mxUtils.hasScrollbars(a.container),k=a.view.translate,h=a.view.scale,m=mxRectangle.fromRectangle(f);
+m.x=m.x/h-k.x;m.y=m.y/h-k.y;m.width/=h;m.height/=h;var k=a.container.scrollTop,l=a.container.scrollLeft,p=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)p+=3;var n=a.container.offsetWidth-p,p=a.container.offsetHeight-p;b=b?Math.max(.3,Math.min(c||1,n/m.width)):h;c=(n-b*m.width)/2/b;var q=0==this.lightboxVerticalDivider?0:(p-b*m.height)/this.lightboxVerticalDivider/b;g&&(c=Math.max(c,0),q=Math.max(q,0));if(g||f.width<n||f.height<p)a.view.scaleAndTranslate(b,Math.floor(c-
+m.x),Math.floor(q-m.y)),a.container.scrollTop=k*b/h,a.container.scrollLeft=l*b/h;else if(0!=d||0!=e)f=a.view.translate,a.view.setTranslate(Math.floor(f.x+d/h),Math.floor(f.y+e/h))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var e=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",e);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",e)});this.editor.addListener("resetGraphView",mxUtils.bind(this,
function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(b){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(b){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var d=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing=
"border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
"transition","opacity 600ms ease-in-out");var f=mxUtils.bind(this,function(){var b=mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=b?parseInt(b["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",f);f();var k=0,f=mxUtils.bind(this,function(a,b,c){k++;var d=document.createElement("span");d.style.paddingLeft="8px";d.style.paddingRight=
@@ -2228,27 +2228,27 @@ function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils
function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousImage,mxResources.get("previousPage")),g=document.createElement("div");g.style.fontFamily=Editor.defaultHtmlFont;g.style.display="inline-block";g.style.verticalAlign="top";g.style.fontWeight="bold";g.style.marginTop="8px";g.style.fontSize="14px";g.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(g);var l=f(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();
mxEvent.consume(a)}),Editor.nextImage,mxResources.get("nextPage")),m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(g.innerHTML="",mxUtils.write(g,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});h.style.paddingLeft="0px";h.style.paddingRight="4px";l.style.paddingLeft="4px";l.style.paddingRight="0px";var n=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(l.style.display="",h.style.display=
"",g.style.display="inline-block"):(l.style.display="none",h.style.display="none",g.style.display="none");m()});this.editor.addListener("resetGraphView",n);this.editor.addListener("pageSelected",m)}f(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");f(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");
-f(mxUtils.bind(this,function(b){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(b)}),Editor.zoomFitImage,mxResources.get("fit"));var p=null,r=null,u=mxUtils.bind(this,function(a){null!=p&&(window.clearTimeout(p),p=null);null!=r&&(window.clearTimeout(r),r=null);p=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);p=null;r=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display=
-"none";r=null}),600)}),a||200)}),t=mxUtils.bind(this,function(a){null!=p&&(window.clearTimeout(p),p=null);null!=r&&(window.clearTimeout(r),r=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var v=f(mxUtils.bind(this,function(b){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,
-"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var c=v.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="4px 2px 4px 2px";this.layersDialog.style.left=c.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
+f(mxUtils.bind(this,function(b){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(b)}),Editor.zoomFitImage,mxResources.get("fit"));var p=null,q=null,t=mxUtils.bind(this,function(a){null!=p&&(window.clearTimeout(p),p=null);null!=q&&(window.clearTimeout(q),q=null);p=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);p=null;q=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display=
+"none";q=null}),600)}),a||200)}),v=mxUtils.bind(this,function(a){null!=p&&(window.clearTimeout(p),p=null);null!=q&&(window.clearTimeout(q),q=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var u=f(mxUtils.bind(this,function(b){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,
+"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var c=u.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=c.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));c=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=c.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(b)}),
-Editor.layersImage,mxResources.get("layers")),y=a.getModel();y.addListener(mxEvent.CHANGE,function(){v.style.display=1<y.getChildCount(y.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(f);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||f(mxUtils.bind(this,function(b){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,
+Editor.layersImage,mxResources.get("layers")),w=a.getModel();w.addListener(mxEvent.CHANGE,function(){u.style.display=1<w.getChildCount(w.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(f);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||f(mxUtils.bind(this,function(b){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,
"editWindow");mxEvent.consume(b)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(n=0;n<this.lightboxToolbarActions.length;n++){var x=this.lightboxToolbarActions[n];x.elem=f(x.fn,x.icon,x.tooltip)}null!=d.refreshBtn&&f(mxUtils.bind(this,function(a){d.refreshBtn.url?window.location.href=d.refreshBtn.url:window.location.reload();mxEvent.consume(a)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=d.fullscreenBtn&&window.self!==window.top&&f(mxUtils.bind(this,
function(b){d.fullscreenBtn.url?a.openLink(d.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(b)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(d.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&f(mxUtils.bind(this,function(a){"1"==urlParams.close||d.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display=
-"none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||t(30),u())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",
-mxUtils.bind(this,function(b){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(b)?u():t(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?u():t(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||t(30)}));var B=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=
-c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(c,d){mxEvent.isTouchEvent(d.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<B&&Math.abs(this.scrollTop-a.container.scrollTop)<B&&Math.abs(this.startX-d.getGraphX())<B&&Math.abs(this.startY-d.getGraphY())<B&&(0<parseFloat(b.chromelessToolbar.style.opacity||0)?u():t(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var E=
-a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}E.apply(this,arguments)};if(!a.isViewer()){var G=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),c=this.getPagePadding(),d=this.getPageSize(),e=Math.ceil(2*
-c.x+b.width*d.width),f=Math.ceil(2*c.y+b.height*d.height),g=a.minimumGraphSize;if(null==g||g.width!=e||g.height!=f)a.minimumGraphSize=new mxRectangle(0,0,e,f);e=c.x-b.x*d.width;c=c.y-b.y*d.height;this.autoTranslate||this.view.translate.x==e&&this.view.translate.y==c?G.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(e,c),a.container.scrollLeft+=Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((c-
-d)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var A=a.view.getBackgroundPane(),F=a.view.getDrawPane();a.cumulativeZoomFactor=1;var z=null,H=null,K=null,L=null,O=null,J=function(d){null!=z&&window.clearTimeout(z);window.setTimeout(function(){if(!a.isMouseDown||L)z=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,
-"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),F.style.transformOrigin="",A.style.transformOrigin="",mxClient.IS_SF?(F.style.transform="scale(1)",A.style.transform="scale(1)",window.setTimeout(function(){F.style.transform="";A.style.transform=""},0)):(F.style.transform="",A.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var d=new mxPoint(a.container.scrollLeft,a.container.scrollTop),
-e=mxUtils.getOffset(a.container),f=a.view.scale,g=0,k=0;null!=H&&(g=a.container.offsetWidth/2-H.x+e.x,k=a.container.offsetHeight/2-H.y+e.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=f&&(null!=K&&(g+=d.x-K.x,k+=d.y-K.y),null!=c&&b.chromelessResize(!1,null,g*(a.cumulativeZoomFactor-1),k*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==g&&0==k||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-1),a.container.scrollTop-=k*(a.cumulativeZoomFactor-1)));null!=O&&F.setAttribute("filter",
-O);a.cumulativeZoomFactor=1;O=L=H=K=z=null}),null!=d?d:a.isFastZoomEnabled()?b.wheelZoomDelay:b.lazyZoomDelay)},0)},U=Date.now();a.lazyZoom=function(c,d,e){(d=d||!a.scrollbars)&&(H=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));if(mxClient.IS_IOS||!(15>Date.now()-U)){U=Date.now();c?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,
+"none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||v(30),t())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",
+mxUtils.bind(this,function(b){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(b)?t():v(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():v(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||v(30)}));var A=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=
+c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(c,d){mxEvent.isTouchEvent(d.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<A&&Math.abs(this.scrollTop-a.container.scrollTop)<A&&Math.abs(this.startX-d.getGraphX())<A&&Math.abs(this.startY-d.getGraphY())<A&&(0<parseFloat(b.chromelessToolbar.style.opacity||0)?t():v(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var E=
+a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}E.apply(this,arguments)};if(!a.isViewer()){var H=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),c=this.getPagePadding(),d=this.getPageSize(),e=Math.ceil(2*
+c.x+b.width*d.width),f=Math.ceil(2*c.y+b.height*d.height),g=a.minimumGraphSize;if(null==g||g.width!=e||g.height!=f)a.minimumGraphSize=new mxRectangle(0,0,e,f);e=c.x-b.x*d.width;c=c.y-b.y*d.height;this.autoTranslate||this.view.translate.x==e&&this.view.translate.y==c?H.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(e,c),a.container.scrollLeft+=Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((c-
+d)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var B=a.view.getBackgroundPane(),G=a.view.getDrawPane();a.cumulativeZoomFactor=1;var y=null,I=null,K=null,M=null,O=null,J=function(d){null!=y&&window.clearTimeout(y);window.setTimeout(function(){if(!a.isMouseDown||M)y=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,
+"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),G.style.transformOrigin="",B.style.transformOrigin="",mxClient.IS_SF?(G.style.transform="scale(1)",B.style.transform="scale(1)",window.setTimeout(function(){G.style.transform="";B.style.transform=""},0)):(G.style.transform="",B.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var d=new mxPoint(a.container.scrollLeft,a.container.scrollTop),
+e=mxUtils.getOffset(a.container),f=a.view.scale,g=0,k=0;null!=I&&(g=a.container.offsetWidth/2-I.x+e.x,k=a.container.offsetHeight/2-I.y+e.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=f&&(null!=K&&(g+=d.x-K.x,k+=d.y-K.y),null!=c&&b.chromelessResize(!1,null,g*(a.cumulativeZoomFactor-1),k*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==g&&0==k||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-1),a.container.scrollTop-=k*(a.cumulativeZoomFactor-1)));null!=O&&G.setAttribute("filter",
+O);a.cumulativeZoomFactor=1;O=M=I=K=y=null}),null!=d?d:a.isFastZoomEnabled()?b.wheelZoomDelay:b.lazyZoomDelay)},0)},U=Date.now();a.lazyZoom=function(c,d,e){(d=d||!a.scrollbars)&&(I=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));if(mxClient.IS_IOS||!(15>Date.now()-U)){U=Date.now();c?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,
this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==
-O&&""!=F.getAttribute("filter")&&(O=F.getAttribute("filter"),F.removeAttribute("filter"));K=new mxPoint(a.container.scrollLeft,a.container.scrollTop);c=d?a.container.scrollLeft+a.container.clientWidth/2:H.x+a.container.scrollLeft-a.container.offsetLeft;var f=d?a.container.scrollTop+a.container.clientHeight/2:H.y+a.container.scrollTop-a.container.offsetTop;F.style.transformOrigin=c+"px "+f+"px";F.style.transform="scale("+this.cumulativeZoomFactor+")";A.style.transformOrigin=c+"px "+f+"px";A.style.transform=
-"scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(c=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(c.style,"transform-origin",(d?a.container.clientWidth/2+a.container.scrollLeft-c.offsetLeft+"px":H.x+a.container.scrollLeft-c.offsetLeft-a.container.offsetLeft+"px")+" "+(d?a.container.clientHeight/2+a.container.scrollTop-c.offsetTop+"px":H.y+a.container.scrollTop-c.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(c.style,
-"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=b.hoverIcons&&b.hoverIcons.reset()}J(e)}};mxEvent.addGestureListeners(a.container,function(a){null!=z&&window.clearTimeout(z)},null,function(b){1!=a.cumulativeZoomFactor&&J(0)});mxEvent.addListener(a.container,"scroll",function(b){null==z||a.isMouseDown||1==a.cumulativeZoomFactor||J(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c,d,e,f){a.fireEvent(new mxEventObject("wheel"));
-if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!d&&a.isScrollWheelEvent(b))d=a.view.getTranslate(),e=40/a.view.scale,mxEvent.isShiftDown(b)?a.view.setTranslate(d.x+(c?-e:e),d.y):a.view.setTranslate(d.x,d.y+(c?e:-e));else if(d||a.isZoomWheelEvent(b))for(var g=mxEvent.getSource(b);null!=g;){if(g==a.container)return a.tooltipHandler.hideTooltip(),H=null!=e&&null!=f?new mxPoint(e,f):new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b)),L=d,a.lazyZoom(c),mxEvent.consume(b),!1;g=g.parentNode}}),
+O&&""!=G.getAttribute("filter")&&(O=G.getAttribute("filter"),G.removeAttribute("filter"));K=new mxPoint(a.container.scrollLeft,a.container.scrollTop);c=d?a.container.scrollLeft+a.container.clientWidth/2:I.x+a.container.scrollLeft-a.container.offsetLeft;var f=d?a.container.scrollTop+a.container.clientHeight/2:I.y+a.container.scrollTop-a.container.offsetTop;G.style.transformOrigin=c+"px "+f+"px";G.style.transform="scale("+this.cumulativeZoomFactor+")";B.style.transformOrigin=c+"px "+f+"px";B.style.transform=
+"scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(c=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(c.style,"transform-origin",(d?a.container.clientWidth/2+a.container.scrollLeft-c.offsetLeft+"px":I.x+a.container.scrollLeft-c.offsetLeft-a.container.offsetLeft+"px")+" "+(d?a.container.clientHeight/2+a.container.scrollTop-c.offsetTop+"px":I.y+a.container.scrollTop-c.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(c.style,
+"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=b.hoverIcons&&b.hoverIcons.reset()}J(e)}};mxEvent.addGestureListeners(a.container,function(a){null!=y&&window.clearTimeout(y)},null,function(b){1!=a.cumulativeZoomFactor&&J(0)});mxEvent.addListener(a.container,"scroll",function(b){null==y||a.isMouseDown||1==a.cumulativeZoomFactor||J(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c,d,e,f){a.fireEvent(new mxEventObject("wheel"));
+if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!d&&a.isScrollWheelEvent(b))d=a.view.getTranslate(),e=40/a.view.scale,mxEvent.isShiftDown(b)?a.view.setTranslate(d.x+(c?-e:e),d.y):a.view.setTranslate(d.x,d.y+(c?e:-e));else if(d||a.isZoomWheelEvent(b))for(var g=mxEvent.getSource(b);null!=g;){if(g==a.container)return a.tooltipHandler.hideTooltip(),I=null!=e&&null!=f?new mxPoint(e,f):new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b)),M=d,a.lazyZoom(c),mxEvent.consume(b),!1;g=g.parentNode}}),
a.container);a.panningHandler.zoomGraph=function(b){a.cumulativeZoomFactor=b.scale;a.lazyZoom(0<b.scale,!0);mxEvent.consume(b)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(a){return Graph.createOffscreenGraph(a)};
EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){a=null!=a?a:0==this.formatWidth;null!=this.format&&(this.formatWidth=a?240:0,this.formatContainer.style.display=a?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var c=urlParams.border,b=60;null!=c&&(b=parseInt(c));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(b,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))};
@@ -2368,10 +2368,10 @@ null,f)};Sidebar.prototype.filterTags=function(a){if(null!=a){a=a.split(" ");for
Sidebar.prototype.addSearchPalette=function(a){var c=document.createElement("div");c.style.visibility="hidden";this.container.appendChild(c);var b=document.createElement("div");b.className="geSidebar";b.style.boxSizing="border-box";b.style.overflow="hidden";b.style.width="100%";b.style.padding="8px";b.style.paddingTop="14px";b.style.paddingBottom="0px";a||(b.style.display="none");var e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.paddingBottom="8px";
e.style.cursor="default";var d=document.createElement("input");d.setAttribute("placeholder",mxResources.get("searchShapes"));d.setAttribute("type","text");d.style.fontSize="12px";d.style.overflow="hidden";d.style.boxSizing="border-box";d.style.border="solid 1px #d5d5d5";d.style.borderRadius="4px";d.style.width="100%";d.style.outline="none";d.style.padding="6px";d.style.paddingRight="20px";e.appendChild(d);var f=document.createElement("img");f.setAttribute("src",Sidebar.prototype.searchImage);f.setAttribute("title",
mxResources.get("search"));f.style.position="relative";f.style.left="-18px";f.style.top="1px";f.style.background="url('"+this.editorUi.editor.transparentImage+"')";var k;e.appendChild(f);b.appendChild(e);var h=document.createElement("center"),g=mxUtils.button(mxResources.get("moreResults"),function(){k()});g.style.display="none";g.style.lineHeight="normal";g.style.fontSize="12px";g.style.padding="6px 12px 6px 12px";g.style.marginTop="4px";g.style.marginBottom="8px";h.style.paddingTop="4px";h.style.paddingBottom=
-"4px";h.appendChild(g);b.appendChild(h);var l="",m=!1,n=!1,p=0,r={},u=12,t=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var a=b.firstChild;null!=a;){var c=a.nextSibling;a!=e&&a!=h&&a.parentNode.removeChild(a);a=c}});mxEvent.addListener(f,"click",function(){f.getAttribute("src")==Dialog.prototype.closeImage&&(f.setAttribute("src",Sidebar.prototype.searchImage),f.setAttribute("title",mxResources.get("search")),g.style.display="none",l=d.value="",t());d.focus()});k=mxUtils.bind(this,
-function(){u=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=d.value){if(null!=h.parentNode&&(l!=d.value&&(t(),l=d.value,r={},n=!1,p=0),!m&&!n)){g.setAttribute("disabled","true");g.style.display="";g.style.cursor="wait";g.innerHTML=mxResources.get("loading")+"...";m=!0;var a={};this.currentSearch=a;this.searchEntries(l,u,p,mxUtils.bind(this,function(c,d,e,f){if(this.currentSearch==a){c=null!=c?c:[];m=!1;p++;this.insertSearchHint(b,l,u,p,c,d,e,f);
-0==c.length&&1==p&&(l="");null!=h.parentNode&&h.parentNode.removeChild(h);for(d=0;d<c.length;d++)mxUtils.bind(this,function(a){try{var c=a();null==r[c.innerHTML]?(r[c.innerHTML]=null!=a.parentLibraries?a.parentLibraries.slice():[],b.appendChild(c)):null!=a.parentLibraries&&(r[c.innerHTML]=r[c.innerHTML].concat(a.parentLibraries));mxEvent.addGestureListeners(c,null,null,mxUtils.bind(this,function(a){var b=r[c.innerHTML];mxEvent.isPopupTrigger(a)&&this.showPopupMenuForEntry(c,b,a)}));mxEvent.disableContextMenu(c)}catch(F){}})(c[d]);
-e?(g.removeAttribute("disabled"),g.innerHTML=mxResources.get("moreResults")):(g.innerHTML=mxResources.get("reset"),g.style.display="none",n=!0);g.style.cursor="";b.appendChild(h)}}),mxUtils.bind(this,function(){g.style.cursor=""}))}}else t(),l=d.value="",r={},g.style.display="none",n=!1,d.focus()});this.searchShapes=function(a){d.value=a;k()};mxEvent.addListener(d,"keydown",mxUtils.bind(this,function(a){13==a.keyCode&&(k(),mxEvent.consume(a))}));mxEvent.addListener(d,"keyup",mxUtils.bind(this,function(a){""==
+"4px";h.appendChild(g);b.appendChild(h);var l="",m=!1,n=!1,p=0,q={},t=12,v=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var a=b.firstChild;null!=a;){var c=a.nextSibling;a!=e&&a!=h&&a.parentNode.removeChild(a);a=c}});mxEvent.addListener(f,"click",function(){f.getAttribute("src")==Dialog.prototype.closeImage&&(f.setAttribute("src",Sidebar.prototype.searchImage),f.setAttribute("title",mxResources.get("search")),g.style.display="none",l=d.value="",v());d.focus()});k=mxUtils.bind(this,
+function(){t=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=d.value){if(null!=h.parentNode&&(l!=d.value&&(v(),l=d.value,q={},n=!1,p=0),!m&&!n)){g.setAttribute("disabled","true");g.style.display="";g.style.cursor="wait";g.innerHTML=mxResources.get("loading")+"...";m=!0;var a={};this.currentSearch=a;this.searchEntries(l,t,p,mxUtils.bind(this,function(c,d,e,f){if(this.currentSearch==a){c=null!=c?c:[];m=!1;p++;this.insertSearchHint(b,l,t,p,c,d,e,f);
+0==c.length&&1==p&&(l="");null!=h.parentNode&&h.parentNode.removeChild(h);for(d=0;d<c.length;d++)mxUtils.bind(this,function(a){try{var c=a();null==q[c.innerHTML]?(q[c.innerHTML]=null!=a.parentLibraries?a.parentLibraries.slice():[],b.appendChild(c)):null!=a.parentLibraries&&(q[c.innerHTML]=q[c.innerHTML].concat(a.parentLibraries));mxEvent.addGestureListeners(c,null,null,mxUtils.bind(this,function(a){var b=q[c.innerHTML];mxEvent.isPopupTrigger(a)&&this.showPopupMenuForEntry(c,b,a)}));mxEvent.disableContextMenu(c)}catch(G){}})(c[d]);
+e?(g.removeAttribute("disabled"),g.innerHTML=mxResources.get("moreResults")):(g.innerHTML=mxResources.get("reset"),g.style.display="none",n=!0);g.style.cursor="";b.appendChild(h)}}),mxUtils.bind(this,function(){g.style.cursor=""}))}}else v(),l=d.value="",q={},g.style.display="none",n=!1,d.focus()});this.searchShapes=function(a){d.value=a;k()};mxEvent.addListener(d,"keydown",mxUtils.bind(this,function(a){13==a.keyCode&&(k(),mxEvent.consume(a))}));mxEvent.addListener(d,"keyup",mxUtils.bind(this,function(a){""==
d.value?(f.setAttribute("src",Sidebar.prototype.searchImage),f.setAttribute("title",mxResources.get("search"))):(f.setAttribute("src",Dialog.prototype.closeImage),f.setAttribute("title",mxResources.get("reset")));""==d.value?(n=!0,g.style.display="none"):d.value!=l?(g.style.display="none",n=!1):m||(g.style.display=n?"none":"")}));mxEvent.addListener(d,"mousedown",function(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=!0});mxEvent.addListener(d,"selectstart",function(a){a.stopPropagation&&
a.stopPropagation();a.cancelBubble=!0});a=document.createElement("div");a.appendChild(b);this.container.appendChild(a);this.palettes.search=[c,a]};
Sidebar.prototype.insertSearchHint=function(a,c,b,e,d,f,k,h){0==d.length&&1==e&&(b=document.createElement("div"),b.className="geTitle",b.style.cssText="background-color:transparent;border-color:transparent;color:gray;padding:6px 0px 0px 0px !important;margin:4px 8px 4px 8px;text-align:center;cursor:default !important",mxUtils.write(b,mxResources.get("noResultsFor",[c])),a.appendChild(b))};
@@ -2494,41 +2494,41 @@ Sidebar.prototype.updateShapes=function(a,c){var b=this.editorUi.editor.graph,e=
0;h<c.length;h++){var g=c[h];if(b.getModel().isVertex(g)==b.getModel().isVertex(a)||b.getModel().isEdge(g)==b.getModel().isEdge(a)){var l=b.getCurrentCellStyle(c[h]);b.getModel().setStyle(g,f);if("1"==mxUtils.getValue(l,"composite","0"))for(var m=b.model.getChildCount(g);0<=m;m--)b.model.remove(b.model.getChildAt(g,m));"umlLifeline"==l[mxConstants.STYLE_SHAPE]&&"umlLifeline"!=e[mxConstants.STYLE_SHAPE]&&(b.setCellStyles(mxConstants.STYLE_SHAPE,"umlLifeline",[g]),b.setCellStyles("participant",e[mxConstants.STYLE_SHAPE],
[g]));for(m=0;m<k.length;m++){var n=l[k[m]];null!=n&&b.setCellStyles(k[m],n,[g])}d.push(g)}}}finally{b.model.endUpdate()}return d};
Sidebar.prototype.createDropHandler=function(a,c,b,e){b=null!=b?b:!0;return mxUtils.bind(this,function(d,f,k,h,g,l){for(l=l?null:mxEvent.isTouchEvent(f)||mxEvent.isPenEvent(f)?document.elementFromPoint(mxEvent.getClientX(f),mxEvent.getClientY(f)):mxEvent.getSource(f);null!=l&&l!=this.container;)l=l.parentNode;if(null==l&&d.isEnabled()){a=d.getImportableCells(a);if(0<a.length){d.stopEditing();l=null==k||mxEvent.isAltDown(f)?!1:d.isValidDropTarget(k,a,f);var m=null;null==k||l||(k=null);if(!d.isCellLocked(k||
-d.getDefaultParent())){d.model.beginUpdate();try{h=Math.round(h);g=Math.round(g);if(c&&d.isSplitTarget(k,a,f)){var n=d.view.scale,p=d.view.translate,r=(h+p.x)*n,u=(g+p.y)*n,t=d.cloneCells(a);d.splitEdge(k,t,null,h-e.width/2,g-e.height/2,r,u);m=t}else 0<a.length&&(m=d.importCells(a,h,g,k));if(null!=d.layoutManager){var v=d.layoutManager.getLayout(k);if(null!=v)for(n=d.view.scale,p=d.view.translate,r=(h+p.x)*n,u=(g+p.y)*n,k=0;k<m.length;k++)v.moveCell(m[k],r,u)}!b||null!=f&&mxEvent.isShiftDown(f)||
-d.fireEvent(new mxEventObject("cellsInserted","cells",m))}catch(y){this.editorUi.handleError(y)}finally{d.model.endUpdate()}null!=m&&0<m.length&&(d.scrollCellToVisible(m[0]),d.setSelectionCells(m));d.editAfterInsert&&null!=f&&mxEvent.isMouseEvent(f)&&null!=m&&1==m.length&&window.setTimeout(function(){d.startEditing(m[0])},0)}}mxEvent.consume(f)}})};
+d.getDefaultParent())){d.model.beginUpdate();try{h=Math.round(h);g=Math.round(g);if(c&&d.isSplitTarget(k,a,f)){var n=d.view.scale,p=d.view.translate,q=(h+p.x)*n,t=(g+p.y)*n,v=d.cloneCells(a);d.splitEdge(k,v,null,h-e.width/2,g-e.height/2,q,t);m=v}else 0<a.length&&(m=d.importCells(a,h,g,k));if(null!=d.layoutManager){var u=d.layoutManager.getLayout(k);if(null!=u)for(n=d.view.scale,p=d.view.translate,q=(h+p.x)*n,t=(g+p.y)*n,k=0;k<m.length;k++)u.moveCell(m[k],q,t)}!b||null!=f&&mxEvent.isShiftDown(f)||
+d.fireEvent(new mxEventObject("cellsInserted","cells",m))}catch(w){this.editorUi.handleError(w)}finally{d.model.endUpdate()}null!=m&&0<m.length&&(d.scrollCellToVisible(m[0]),d.setSelectionCells(m));d.editAfterInsert&&null!=f&&mxEvent.isMouseEvent(f)&&null!=m&&1==m.length&&window.setTimeout(function(){d.startEditing(m[0])},0)}}mxEvent.consume(f)}})};
Sidebar.prototype.createDragPreview=function(a,c){var b=document.createElement("div");b.className="geDragPreview";b.style.width=a+"px";b.style.height=c+"px";return b};
-Sidebar.prototype.dropAndConnect=function(a,c,b,e,d){var f=this.getDropAndConnectGeometry(a,c[e],b,c),k=[];if(null!=f){var h=this.editorUi.editor.graph,g=null;h.model.beginUpdate();try{var l=h.getCellGeometry(a),m=h.getCellGeometry(c[e]),n=h.model.getParent(a),p=!0;if(null!=h.layoutManager){var r=h.layoutManager.getLayout(n);null!=r&&r.constructor==mxStackLayout&&(p=!1)}var k=h.model.isEdge(a)?null:h.view.getState(n),u=r=0;if(null!=k){var t=k.origin,r=t.x,u=t.y,v=f.getTerminalPoint(!1);null!=v&&(v.x+=
-t.x,v.y+=t.y)}var y=!h.isTableRow(a)&&!h.isTableCell(a)&&(h.model.isEdge(a)||null!=l&&!l.relative&&p),x=h.getCellAt((f.x+r+h.view.translate.x)*h.view.scale,(f.y+u+h.view.translate.y)*h.view.scale,null,null,null,function(a,b,c){return!h.isContainer(a.cell)});if(null!=x&&x!=n)k=h.view.getState(x),null!=k&&(t=k.origin,n=x,y=!0,h.model.isEdge(a)||(f.x-=t.x-r,f.y-=t.y-u));else if(!p||h.isTableRow(a)||h.isTableCell(a))f.x+=r,f.y+=u;r=m.x;u=m.y;h.model.isEdge(c[e])&&(u=r=0);k=c=h.importCells(c,f.x-(y?r:
-0),f.y-(y?u:0),y?n:null);if(h.model.isEdge(a))h.model.setTerminal(a,c[e],b==mxConstants.DIRECTION_NORTH);else if(h.model.isEdge(c[e])){h.model.setTerminal(c[e],a,!0);var B=h.getCellGeometry(c[e]);B.points=null;if(null!=B.getTerminalPoint(!1))B.setTerminalPoint(f.getTerminalPoint(!1),!1);else if(y&&h.model.isVertex(n)){var E=h.view.getState(n),t=E.cell!=h.view.currentRoot?E.origin:new mxPoint(0,0);h.cellsMoved(c,t.x,t.y,null,null,!0)}}else m=h.getCellGeometry(c[e]),r=f.x-Math.round(m.x),u=f.y-Math.round(m.y),
-f.x=Math.round(m.x),f.y=Math.round(m.y),h.model.setGeometry(c[e],f),h.cellsMoved(c,r,u,null,null,!0),k=c.slice(),g=1==k.length?k[0]:null,c.push(h.insertEdge(null,null,"",a,c[e],h.createCurrentEdgeStyle()));null!=d&&mxEvent.isShiftDown(d)||h.fireEvent(new mxEventObject("cellsInserted","cells",c))}catch(G){this.editorUi.handleError(G)}finally{h.model.endUpdate()}h.editAfterInsert&&null!=d&&mxEvent.isMouseEvent(d)&&null!=g&&window.setTimeout(function(){h.startEditing(g)},0)}return k};
+Sidebar.prototype.dropAndConnect=function(a,c,b,e,d){var f=this.getDropAndConnectGeometry(a,c[e],b,c),k=[];if(null!=f){var h=this.editorUi.editor.graph,g=null;h.model.beginUpdate();try{var l=h.getCellGeometry(a),m=h.getCellGeometry(c[e]),n=h.model.getParent(a),p=!0;if(null!=h.layoutManager){var q=h.layoutManager.getLayout(n);null!=q&&q.constructor==mxStackLayout&&(p=!1)}var k=h.model.isEdge(a)?null:h.view.getState(n),t=q=0;if(null!=k){var v=k.origin,q=v.x,t=v.y,u=f.getTerminalPoint(!1);null!=u&&(u.x+=
+v.x,u.y+=v.y)}var w=!h.isTableRow(a)&&!h.isTableCell(a)&&(h.model.isEdge(a)||null!=l&&!l.relative&&p),x=h.getCellAt((f.x+q+h.view.translate.x)*h.view.scale,(f.y+t+h.view.translate.y)*h.view.scale,null,null,null,function(a,b,c){return!h.isContainer(a.cell)});if(null!=x&&x!=n)k=h.view.getState(x),null!=k&&(v=k.origin,n=x,w=!0,h.model.isEdge(a)||(f.x-=v.x-q,f.y-=v.y-t));else if(!p||h.isTableRow(a)||h.isTableCell(a))f.x+=q,f.y+=t;q=m.x;t=m.y;h.model.isEdge(c[e])&&(t=q=0);k=c=h.importCells(c,f.x-(w?q:
+0),f.y-(w?t:0),w?n:null);if(h.model.isEdge(a))h.model.setTerminal(a,c[e],b==mxConstants.DIRECTION_NORTH);else if(h.model.isEdge(c[e])){h.model.setTerminal(c[e],a,!0);var A=h.getCellGeometry(c[e]);A.points=null;if(null!=A.getTerminalPoint(!1))A.setTerminalPoint(f.getTerminalPoint(!1),!1);else if(w&&h.model.isVertex(n)){var E=h.view.getState(n),v=E.cell!=h.view.currentRoot?E.origin:new mxPoint(0,0);h.cellsMoved(c,v.x,v.y,null,null,!0)}}else m=h.getCellGeometry(c[e]),q=f.x-Math.round(m.x),t=f.y-Math.round(m.y),
+f.x=Math.round(m.x),f.y=Math.round(m.y),h.model.setGeometry(c[e],f),h.cellsMoved(c,q,t,null,null,!0),k=c.slice(),g=1==k.length?k[0]:null,c.push(h.insertEdge(null,null,"",a,c[e],h.createCurrentEdgeStyle()));null!=d&&mxEvent.isShiftDown(d)||h.fireEvent(new mxEventObject("cellsInserted","cells",c))}catch(H){this.editorUi.handleError(H)}finally{h.model.endUpdate()}h.editAfterInsert&&null!=d&&mxEvent.isMouseEvent(d)&&null!=g&&window.setTimeout(function(){h.startEditing(g)},0)}return k};
Sidebar.prototype.getDropAndConnectGeometry=function(a,c,b,e){var d=this.editorUi.editor.graph,f=d.view,k=1<e.length,h=d.getCellGeometry(a);e=d.getCellGeometry(c);null!=h&&null!=e&&(e=e.clone(),d.model.isEdge(a)?(a=d.view.getState(a),h=a.absolutePoints,c=h[0],d=h[h.length-1],b==mxConstants.DIRECTION_NORTH?(e.x=c.x/f.scale-f.translate.x-e.width/2,e.y=c.y/f.scale-f.translate.y-e.height/2):(e.x=d.x/f.scale-f.translate.x-e.width/2,e.y=d.y/f.scale-f.translate.y-e.height/2)):(h.relative&&(a=d.view.getState(a),
h=h.clone(),h.x=(a.x-f.translate.x)/f.scale,h.y=(a.y-f.translate.y)/f.scale),f=d.defaultEdgeLength,d.model.isEdge(c)&&null!=e.getTerminalPoint(!0)&&null!=e.getTerminalPoint(!1)?(c=e.getTerminalPoint(!0),d=e.getTerminalPoint(!1),f=d.x-c.x,c=d.y-c.y,f=Math.sqrt(f*f+c*c),e.x=h.getCenterX(),e.y=h.getCenterY(),e.width=1,e.height=1,b==mxConstants.DIRECTION_NORTH?(e.height=f,e.y=h.y-f,e.setTerminalPoint(new mxPoint(e.x,e.y),!1)):b==mxConstants.DIRECTION_EAST?(e.width=f,e.x=h.x+h.width,e.setTerminalPoint(new mxPoint(e.x+
e.width,e.y),!1)):b==mxConstants.DIRECTION_SOUTH?(e.height=f,e.y=h.y+h.height,e.setTerminalPoint(new mxPoint(e.x,e.y+e.height),!1)):b==mxConstants.DIRECTION_WEST&&(e.width=f,e.x=h.x-f,e.setTerminalPoint(new mxPoint(e.x,e.y),!1))):(!k&&45<e.width&&45<e.height&&45<h.width&&45<h.height&&(e.width*=h.height/e.height,e.height=h.height),e.x=h.x+h.width/2-e.width/2,e.y=h.y+h.height/2-e.height/2,b==mxConstants.DIRECTION_NORTH?e.y=e.y-h.height/2-e.height/2-f:b==mxConstants.DIRECTION_EAST?e.x=e.x+h.width/2+
e.width/2+f:b==mxConstants.DIRECTION_SOUTH?e.y=e.y+h.height/2+e.height/2+f:b==mxConstants.DIRECTION_WEST&&(e.x=e.x-h.width/2-e.width/2-f),d.model.isEdge(c)&&null!=e.getTerminalPoint(!0)&&null!=c.getTerminal(!1)&&(h=d.getCellGeometry(c.getTerminal(!1)),null!=h&&(b==mxConstants.DIRECTION_NORTH?(e.x-=h.getCenterX(),e.y-=h.getCenterY()+h.height/2):b==mxConstants.DIRECTION_EAST?(e.x-=h.getCenterX()-h.width/2,e.y-=h.getCenterY()):b==mxConstants.DIRECTION_SOUTH?(e.x-=h.getCenterX(),e.y-=h.getCenterY()-h.height/
2):b==mxConstants.DIRECTION_WEST&&(e.x-=h.getCenterX()+h.width/2,e.y-=h.getCenterY()))))));return e};Sidebar.prototype.isDropStyleEnabled=function(a,c){var b=!0;if(null!=c&&1==a.length){var e=this.graph.getCellStyle(a[c]);null!=e&&(b=mxUtils.getValue(e,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE)}return b};
Sidebar.prototype.isDropStyleTargetIgnored=function(a){return this.graph.isSwimlane(a.cell)||this.graph.isTableCell(a.cell)||this.graph.isTableRow(a.cell)||this.graph.isTable(a.cell)};
-Sidebar.prototype.createDragSource=function(a,c,b,e,d){function f(a,b){var c;c=mxUtils.createImage(a.src);c.style.width=a.width+"px";c.style.height=a.height+"px";null!=b&&c.setAttribute("title",b);mxUtils.setOpacity(c,a==this.refreshTarget?30:20);c.style.position="absolute";c.style.cursor="crosshair";return c}function k(a,b,c,d){null!=d.parentNode&&(mxUtils.contains(c,a,b)?(mxUtils.setOpacity(d,100),J=d):mxUtils.setOpacity(d,d==z?30:20));return c}for(var h=this.editorUi,g=h.editor.graph,l=null,m=
-null,n=this,p=0;p<e.length&&(null==m&&g.model.isVertex(e[p])?m=p:null==l&&g.model.isEdge(e[p])&&null==g.model.getTerminal(e[p],!0)&&(l=p),null==m||null==l);p++);var r=this.isDropStyleEnabled(e,m),u=mxUtils.makeDraggable(a,g,mxUtils.bind(this,function(a,b,d,f,g){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=e&&null!=x&&J==z){var k=a.isCellSelected(x.cell)?a.getSelectionCells():[x.cell],k=this.updateShapes(a.model.isEdge(x.cell)?e[0]:e[m],k);a.setSelectionCells(k)}else null!=
-e&&null!=J&&null!=v&&J!=z?(k=a.model.isEdge(v.cell)||null==l?m:l,a.setSelectionCells(this.dropAndConnect(v.cell,e,O,k,b))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(a.view.getState(a.getSelectionCell()))}),b,0,0,g.autoscroll,!0,!0);g.addListener(mxEvent.ESCAPE,function(a,b){u.isActive()&&u.reset()});var t=u.mouseDown;u.mouseDown=function(a){mxEvent.isPopupTrigger(a)||mxEvent.isMultiTouchEvent(a)||g.isCellLocked(g.getDefaultParent())||(g.stopEditing(),
-t.apply(this,arguments))};var v=null,y=null,x=null,B=!1,E=f(this.triangleUp,mxResources.get("connect")),G=f(this.triangleRight,mxResources.get("connect")),A=f(this.triangleDown,mxResources.get("connect")),F=f(this.triangleLeft,mxResources.get("connect")),z=f(this.refreshTarget,mxResources.get("replace")),H=null,K=f(this.roundDrop),L=f(this.roundDrop),O=mxConstants.DIRECTION_NORTH,J=null,U=u.createPreviewElement;u.createPreviewElement=function(a){var b=U.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents=
-"none");this.previewElementWidth=b.style.width;this.previewElementHeight=b.style.height;return b};var aa=u.dragEnter;u.dragEnter=function(a,b){null!=h.hoverIcons&&h.hoverIcons.setDisplay("none");aa.apply(this,arguments)};var ba=u.dragExit;u.dragExit=function(a,b){null!=h.hoverIcons&&h.hoverIcons.setDisplay("");ba.apply(this,arguments)};u.dragOver=function(a,b){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=J&&this.currentGuide.hide();if(null!=this.previewElement){var c=
-a.view;if(null!=x&&J==z)this.previewElement.style.display=a.model.isEdge(x.cell)?"none":"",this.previewElement.style.left=x.x+"px",this.previewElement.style.top=x.y+"px",this.previewElement.style.width=x.width+"px",this.previewElement.style.height=x.height+"px";else if(null!=v&&null!=J){null!=u.currentHighlight&&null!=u.currentHighlight.state&&u.currentHighlight.hide();var f=a.model.isEdge(v.cell)||null==l?m:l,g=n.getDropAndConnectGeometry(v.cell,e[f],O,e),k=a.model.isEdge(v.cell)?null:a.getCellGeometry(v.cell),
-h=a.getCellGeometry(e[f]),p=a.model.getParent(v.cell),r=c.translate.x*c.scale,t=c.translate.y*c.scale;null!=k&&!k.relative&&a.model.isVertex(p)&&p!=c.currentRoot&&(t=c.getState(p),r=t.x,t=t.y);k=h.x;h=h.y;a.model.isEdge(e[f])&&(h=k=0);this.previewElement.style.left=(g.x-k)*c.scale+r+"px";this.previewElement.style.top=(g.y-h)*c.scale+t+"px";1==e.length&&(this.previewElement.style.width=g.width*c.scale+"px",this.previewElement.style.height=g.height*c.scale+"px");this.previewElement.style.display=""}else null!=
-u.currentHighlight.state&&a.model.isEdge(u.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-d.width*c.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-d.height*c.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var R=(new Date).getTime(),Q=0,P=null,T=this.editorUi.editor.graph.getCellStyle(e[0]);
-u.getDropTarget=mxUtils.bind(this,function(a,b,c,d){var f=mxEvent.isAltDown(d)||null==e?null:a.getCellAt(b,c,null,null,null,function(b,c,d){return a.isContainer(b.cell)});if(null!=f&&!this.graph.isCellConnectable(f)&&!this.graph.model.isEdge(f)){var g=this.graph.getModel().getParent(f);this.graph.getModel().isVertex(g)&&this.graph.isCellConnectable(g)&&(f=g)}a.isCellLocked(f)&&(f=null);var h=a.view.getState(f),g=J=null;P!=h?(R=(new Date).getTime(),Q=0,P=h,null!=this.updateThread&&window.clearTimeout(this.updateThread),
-null!=h&&(this.updateThread=window.setTimeout(function(){null==J&&(P=h,u.getDropTarget(a,b,c,d))},this.dropTargetDelay+10))):Q=(new Date).getTime()-R;if(r&&2500>Q&&null!=h&&!mxEvent.isShiftDown(d)&&(mxUtils.getValue(h.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(T,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(h.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(h.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(h.style,
+Sidebar.prototype.createDragSource=function(a,c,b,e,d){function f(a,b){var c;c=mxUtils.createImage(a.src);c.style.width=a.width+"px";c.style.height=a.height+"px";null!=b&&c.setAttribute("title",b);mxUtils.setOpacity(c,a==this.refreshTarget?30:20);c.style.position="absolute";c.style.cursor="crosshair";return c}function k(a,b,c,d){null!=d.parentNode&&(mxUtils.contains(c,a,b)?(mxUtils.setOpacity(d,100),J=d):mxUtils.setOpacity(d,d==y?30:20));return c}for(var h=this.editorUi,g=h.editor.graph,l=null,m=
+null,n=this,p=0;p<e.length&&(null==m&&g.model.isVertex(e[p])?m=p:null==l&&g.model.isEdge(e[p])&&null==g.model.getTerminal(e[p],!0)&&(l=p),null==m||null==l);p++);var q=this.isDropStyleEnabled(e,m),t=mxUtils.makeDraggable(a,g,mxUtils.bind(this,function(a,b,d,f,g){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=e&&null!=x&&J==y){var k=a.isCellSelected(x.cell)?a.getSelectionCells():[x.cell],k=this.updateShapes(a.model.isEdge(x.cell)?e[0]:e[m],k);a.setSelectionCells(k)}else null!=
+e&&null!=J&&null!=u&&J!=y?(k=a.model.isEdge(u.cell)||null==l?m:l,a.setSelectionCells(this.dropAndConnect(u.cell,e,O,k,b))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(a.view.getState(a.getSelectionCell()))}),b,0,0,g.autoscroll,!0,!0);g.addListener(mxEvent.ESCAPE,function(a,b){t.isActive()&&t.reset()});var v=t.mouseDown;t.mouseDown=function(a){mxEvent.isPopupTrigger(a)||mxEvent.isMultiTouchEvent(a)||g.isCellLocked(g.getDefaultParent())||(g.stopEditing(),
+v.apply(this,arguments))};var u=null,w=null,x=null,A=!1,E=f(this.triangleUp,mxResources.get("connect")),H=f(this.triangleRight,mxResources.get("connect")),B=f(this.triangleDown,mxResources.get("connect")),G=f(this.triangleLeft,mxResources.get("connect")),y=f(this.refreshTarget,mxResources.get("replace")),I=null,K=f(this.roundDrop),M=f(this.roundDrop),O=mxConstants.DIRECTION_NORTH,J=null,U=t.createPreviewElement;t.createPreviewElement=function(a){var b=U.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents=
+"none");this.previewElementWidth=b.style.width;this.previewElementHeight=b.style.height;return b};var ba=t.dragEnter;t.dragEnter=function(a,b){null!=h.hoverIcons&&h.hoverIcons.setDisplay("none");ba.apply(this,arguments)};var ca=t.dragExit;t.dragExit=function(a,b){null!=h.hoverIcons&&h.hoverIcons.setDisplay("");ca.apply(this,arguments)};t.dragOver=function(a,b){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=J&&this.currentGuide.hide();if(null!=this.previewElement){var c=
+a.view;if(null!=x&&J==y)this.previewElement.style.display=a.model.isEdge(x.cell)?"none":"",this.previewElement.style.left=x.x+"px",this.previewElement.style.top=x.y+"px",this.previewElement.style.width=x.width+"px",this.previewElement.style.height=x.height+"px";else if(null!=u&&null!=J){null!=t.currentHighlight&&null!=t.currentHighlight.state&&t.currentHighlight.hide();var f=a.model.isEdge(u.cell)||null==l?m:l,g=n.getDropAndConnectGeometry(u.cell,e[f],O,e),k=a.model.isEdge(u.cell)?null:a.getCellGeometry(u.cell),
+h=a.getCellGeometry(e[f]),p=a.model.getParent(u.cell),q=c.translate.x*c.scale,v=c.translate.y*c.scale;null!=k&&!k.relative&&a.model.isVertex(p)&&p!=c.currentRoot&&(v=c.getState(p),q=v.x,v=v.y);k=h.x;h=h.y;a.model.isEdge(e[f])&&(h=k=0);this.previewElement.style.left=(g.x-k)*c.scale+q+"px";this.previewElement.style.top=(g.y-h)*c.scale+v+"px";1==e.length&&(this.previewElement.style.width=g.width*c.scale+"px",this.previewElement.style.height=g.height*c.scale+"px");this.previewElement.style.display=""}else null!=
+t.currentHighlight.state&&a.model.isEdge(t.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-d.width*c.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-d.height*c.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var R=(new Date).getTime(),Q=0,P=null,T=this.editorUi.editor.graph.getCellStyle(e[0]);
+t.getDropTarget=mxUtils.bind(this,function(a,b,c,d){var f=mxEvent.isAltDown(d)||null==e?null:a.getCellAt(b,c,null,null,null,function(b,c,d){return a.isContainer(b.cell)});if(null!=f&&!this.graph.isCellConnectable(f)&&!this.graph.model.isEdge(f)){var g=this.graph.getModel().getParent(f);this.graph.getModel().isVertex(g)&&this.graph.isCellConnectable(g)&&(f=g)}a.isCellLocked(f)&&(f=null);var h=a.view.getState(f),g=J=null;P!=h?(R=(new Date).getTime(),Q=0,P=h,null!=this.updateThread&&window.clearTimeout(this.updateThread),
+null!=h&&(this.updateThread=window.setTimeout(function(){null==J&&(P=h,t.getDropTarget(a,b,c,d))},this.dropTargetDelay+10))):Q=(new Date).getTime()-R;if(q&&2500>Q&&null!=h&&!mxEvent.isShiftDown(d)&&(mxUtils.getValue(h.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(T,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(h.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(h.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(h.style,
mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(T,mxConstants.STYLE_SHAPE)||1500<Q||a.model.isEdge(h.cell))&&Q>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(h)&&(a.model.isVertex(h.cell)&&null!=m||a.model.isEdge(h.cell)&&a.model.isEdge(e[0]))){if(a.isCellEditable(h.cell)){x=h;var l=a.model.isEdge(h.cell)?a.view.getPoint(h):new mxPoint(h.getCenterX(),h.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/
-2,this.refreshTarget.width,this.refreshTarget.height);z.style.left=Math.floor(l.x)+"px";z.style.top=Math.floor(l.y)+"px";null==H&&(a.container.appendChild(z),H=z.parentNode);k(b,c,l,z)}}else null==x||!mxUtils.contains(x,b,c)||1500<Q&&!mxEvent.isShiftDown(d)?(x=null,null!=H&&(z.parentNode.removeChild(z),H=null)):null!=x&&null!=H&&(l=a.model.isEdge(x.cell)?a.view.getPoint(x):new mxPoint(x.getCenterX(),x.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,
-this.refreshTarget.height),k(b,c,l,z));if(B&&null!=v&&!mxEvent.isAltDown(d)&&null==J){g=mxRectangle.fromRectangle(v);if(a.model.isEdge(v.cell)){var n=v.absolutePoints;null!=K.parentNode&&(l=n[0],g.add(k(b,c,new mxRectangle(l.x-this.roundDrop.width/2,l.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),K)));null!=L.parentNode&&(n=n[n.length-1],g.add(k(b,c,new mxRectangle(n.x-this.roundDrop.width/2,n.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),L)))}else l=
-mxRectangle.fromRectangle(v),null!=v.shape&&null!=v.shape.boundingBox&&(l=mxRectangle.fromRectangle(v.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),n=this.graph.selectionCellsHandler.getHandler(v.cell),null!=n&&(l.x-=n.horizontalOffset/2,l.y-=n.verticalOffset/2,l.width+=n.horizontalOffset,l.height+=n.verticalOffset,null!=n.rotationShape&&null!=n.rotationShape.node&&"hidden"!=n.rotationShape.node.style.visibility&&"none"!=n.rotationShape.node.style.display&&
-null!=n.rotationShape.boundingBox&&l.add(n.rotationShape.boundingBox)),g.add(k(b,c,new mxRectangle(v.getCenterX()-this.triangleUp.width/2,l.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),E)),g.add(k(b,c,new mxRectangle(l.x+l.width,v.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),G)),g.add(k(b,c,new mxRectangle(v.getCenterX()-this.triangleDown.width/2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),A)),g.add(k(b,c,
-new mxRectangle(l.x-this.triangleLeft.width,v.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),F));null!=g&&g.grow(10)}O=mxConstants.DIRECTION_NORTH;J==G?O=mxConstants.DIRECTION_EAST:J==A||J==L?O=mxConstants.DIRECTION_SOUTH:J==F&&(O=mxConstants.DIRECTION_WEST);null!=x&&J==z&&(h=x);l=(null==m||a.isCellConnectable(e[m]))&&(a.model.isEdge(f)&&null!=m||a.model.isVertex(f)&&a.isCellConnectable(f));if(null!=v&&5E3<=Q||v!=h&&(null==g||!mxUtils.contains(g,b,c)||500<
-Q&&null==J&&l))if(B=!1,v=5E3>Q&&Q>this.dropTargetDelay||a.model.isEdge(f)?h:null,null!=v&&l){g=[K,L,E,G,A,F];for(l=0;l<g.length;l++)null!=g[l].parentNode&&g[l].parentNode.removeChild(g[l]);a.model.isEdge(f)?(n=h.absolutePoints,null!=n&&(l=n[0],n=n[n.length-1],g=a.tolerance,new mxRectangle(b-g,c-g,2*g,2*g),K.style.left=Math.floor(l.x-this.roundDrop.width/2)+"px",K.style.top=Math.floor(l.y-this.roundDrop.height/2)+"px",L.style.left=Math.floor(n.x-this.roundDrop.width/2)+"px",L.style.top=Math.floor(n.y-
-this.roundDrop.height/2)+"px",null==a.model.getTerminal(f,!0)&&a.container.appendChild(K),null==a.model.getTerminal(f,!1)&&a.container.appendChild(L))):(l=mxRectangle.fromRectangle(h),null!=h.shape&&null!=h.shape.boundingBox&&(l=mxRectangle.fromRectangle(h.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),n=this.graph.selectionCellsHandler.getHandler(h.cell),null!=n&&(l.x-=n.horizontalOffset/2,l.y-=n.verticalOffset/2,l.width+=n.horizontalOffset,l.height+=n.verticalOffset,
-null!=n.rotationShape&&null!=n.rotationShape.node&&"hidden"!=n.rotationShape.node.style.visibility&&"none"!=n.rotationShape.node.style.display&&null!=n.rotationShape.boundingBox&&l.add(n.rotationShape.boundingBox)),E.style.left=Math.floor(h.getCenterX()-this.triangleUp.width/2)+"px",E.style.top=Math.floor(l.y-this.triangleUp.height)+"px",G.style.left=Math.floor(l.x+l.width)+"px",G.style.top=Math.floor(h.getCenterY()-this.triangleRight.height/2)+"px",A.style.left=E.style.left,A.style.top=Math.floor(l.y+
-l.height)+"px",F.style.left=Math.floor(l.x-this.triangleLeft.width)+"px",F.style.top=G.style.top,"eastwest"!=h.style.portConstraint&&(a.container.appendChild(E),a.container.appendChild(A)),a.container.appendChild(G),a.container.appendChild(F));null!=h&&(y=a.selectionCellsHandler.getHandler(h.cell),null!=y&&null!=y.setHandlesVisible&&y.setHandlesVisible(!1));B=!0}else for(g=[K,L,E,G,A,F],l=0;l<g.length;l++)null!=g[l].parentNode&&g[l].parentNode.removeChild(g[l]);B||null==y||y.setHandlesVisible(!0);
-f=mxEvent.isAltDown(d)&&!mxEvent.isShiftDown(d)||null!=x&&J==z?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);g=a.getModel();if(null!=f&&(null!=J||!a.isSplitTarget(f,e,d))){for(;null!=f&&!a.isValidDropTarget(f,e,d)&&g.isVertex(g.getParent(f));)f=g.getParent(f);null!=f&&(a.view.currentRoot==f||!a.isValidRoot(f)&&0==a.getModel().getChildCount(f)||a.isCellLocked(f)||g.isEdge(f)||!a.isValidDropTarget(f,e,d))&&(f=null)}a.isCellLocked(f)&&(f=null);return f});u.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,
-arguments);for(var a=[K,L,z,E,G,A,F],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=v&&null!=y&&y.reset();J=H=x=v=y=null};return u};
+2,this.refreshTarget.width,this.refreshTarget.height);y.style.left=Math.floor(l.x)+"px";y.style.top=Math.floor(l.y)+"px";null==I&&(a.container.appendChild(y),I=y.parentNode);k(b,c,l,y)}}else null==x||!mxUtils.contains(x,b,c)||1500<Q&&!mxEvent.isShiftDown(d)?(x=null,null!=I&&(y.parentNode.removeChild(y),I=null)):null!=x&&null!=I&&(l=a.model.isEdge(x.cell)?a.view.getPoint(x):new mxPoint(x.getCenterX(),x.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,
+this.refreshTarget.height),k(b,c,l,y));if(A&&null!=u&&!mxEvent.isAltDown(d)&&null==J){g=mxRectangle.fromRectangle(u);if(a.model.isEdge(u.cell)){var n=u.absolutePoints;null!=K.parentNode&&(l=n[0],g.add(k(b,c,new mxRectangle(l.x-this.roundDrop.width/2,l.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),K)));null!=M.parentNode&&(n=n[n.length-1],g.add(k(b,c,new mxRectangle(n.x-this.roundDrop.width/2,n.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),M)))}else l=
+mxRectangle.fromRectangle(u),null!=u.shape&&null!=u.shape.boundingBox&&(l=mxRectangle.fromRectangle(u.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),n=this.graph.selectionCellsHandler.getHandler(u.cell),null!=n&&(l.x-=n.horizontalOffset/2,l.y-=n.verticalOffset/2,l.width+=n.horizontalOffset,l.height+=n.verticalOffset,null!=n.rotationShape&&null!=n.rotationShape.node&&"hidden"!=n.rotationShape.node.style.visibility&&"none"!=n.rotationShape.node.style.display&&
+null!=n.rotationShape.boundingBox&&l.add(n.rotationShape.boundingBox)),g.add(k(b,c,new mxRectangle(u.getCenterX()-this.triangleUp.width/2,l.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),E)),g.add(k(b,c,new mxRectangle(l.x+l.width,u.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),H)),g.add(k(b,c,new mxRectangle(u.getCenterX()-this.triangleDown.width/2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),B)),g.add(k(b,c,
+new mxRectangle(l.x-this.triangleLeft.width,u.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),G));null!=g&&g.grow(10)}O=mxConstants.DIRECTION_NORTH;J==H?O=mxConstants.DIRECTION_EAST:J==B||J==M?O=mxConstants.DIRECTION_SOUTH:J==G&&(O=mxConstants.DIRECTION_WEST);null!=x&&J==y&&(h=x);l=(null==m||a.isCellConnectable(e[m]))&&(a.model.isEdge(f)&&null!=m||a.model.isVertex(f)&&a.isCellConnectable(f));if(null!=u&&5E3<=Q||u!=h&&(null==g||!mxUtils.contains(g,b,c)||500<
+Q&&null==J&&l))if(A=!1,u=5E3>Q&&Q>this.dropTargetDelay||a.model.isEdge(f)?h:null,null!=u&&l){g=[K,M,E,H,B,G];for(l=0;l<g.length;l++)null!=g[l].parentNode&&g[l].parentNode.removeChild(g[l]);a.model.isEdge(f)?(n=h.absolutePoints,null!=n&&(l=n[0],n=n[n.length-1],g=a.tolerance,new mxRectangle(b-g,c-g,2*g,2*g),K.style.left=Math.floor(l.x-this.roundDrop.width/2)+"px",K.style.top=Math.floor(l.y-this.roundDrop.height/2)+"px",M.style.left=Math.floor(n.x-this.roundDrop.width/2)+"px",M.style.top=Math.floor(n.y-
+this.roundDrop.height/2)+"px",null==a.model.getTerminal(f,!0)&&a.container.appendChild(K),null==a.model.getTerminal(f,!1)&&a.container.appendChild(M))):(l=mxRectangle.fromRectangle(h),null!=h.shape&&null!=h.shape.boundingBox&&(l=mxRectangle.fromRectangle(h.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),n=this.graph.selectionCellsHandler.getHandler(h.cell),null!=n&&(l.x-=n.horizontalOffset/2,l.y-=n.verticalOffset/2,l.width+=n.horizontalOffset,l.height+=n.verticalOffset,
+null!=n.rotationShape&&null!=n.rotationShape.node&&"hidden"!=n.rotationShape.node.style.visibility&&"none"!=n.rotationShape.node.style.display&&null!=n.rotationShape.boundingBox&&l.add(n.rotationShape.boundingBox)),E.style.left=Math.floor(h.getCenterX()-this.triangleUp.width/2)+"px",E.style.top=Math.floor(l.y-this.triangleUp.height)+"px",H.style.left=Math.floor(l.x+l.width)+"px",H.style.top=Math.floor(h.getCenterY()-this.triangleRight.height/2)+"px",B.style.left=E.style.left,B.style.top=Math.floor(l.y+
+l.height)+"px",G.style.left=Math.floor(l.x-this.triangleLeft.width)+"px",G.style.top=H.style.top,"eastwest"!=h.style.portConstraint&&(a.container.appendChild(E),a.container.appendChild(B)),a.container.appendChild(H),a.container.appendChild(G));null!=h&&(w=a.selectionCellsHandler.getHandler(h.cell),null!=w&&null!=w.setHandlesVisible&&w.setHandlesVisible(!1));A=!0}else for(g=[K,M,E,H,B,G],l=0;l<g.length;l++)null!=g[l].parentNode&&g[l].parentNode.removeChild(g[l]);A||null==w||w.setHandlesVisible(!0);
+f=mxEvent.isAltDown(d)&&!mxEvent.isShiftDown(d)||null!=x&&J==y?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);g=a.getModel();if(null!=f&&(null!=J||!a.isSplitTarget(f,e,d))){for(;null!=f&&!a.isValidDropTarget(f,e,d)&&g.isVertex(g.getParent(f));)f=g.getParent(f);null!=f&&(a.view.currentRoot==f||!a.isValidRoot(f)&&0==a.getModel().getChildCount(f)||a.isCellLocked(f)||g.isEdge(f)||!a.isValidDropTarget(f,e,d))&&(f=null)}a.isCellLocked(f)&&(f=null);return f});t.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,
+arguments);for(var a=[K,M,y,E,H,B,G],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=u&&null!=w&&w.reset();J=I=x=u=w=null};return t};
Sidebar.prototype.itemClicked=function(a,c,b,e){e=this.editorUi.editor.graph;e.container.focus();if(mxEvent.isAltDown(b)&&1==e.getSelectionCount()&&e.model.isVertex(e.getSelectionCell())){c=null;for(var d=0;d<a.length&&null==c;d++)e.model.isVertex(a[d])&&(c=d);null!=c&&(e.setSelectionCells(this.dropAndConnect(e.getSelectionCell(),a,mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)?mxEvent.isShiftDown(b)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(b)?mxConstants.DIRECTION_EAST:
mxConstants.DIRECTION_SOUTH,c,b)),e.scrollCellToVisible(e.getSelectionCell()))}else mxEvent.isShiftDown(b)&&!e.isSelectionEmpty()?(b=e.getEditableCells(e.getSelectionCells()),this.updateShapes(a[0],b),e.scrollCellToVisible(b)):(a=mxEvent.isAltDown(b)?e.getFreeInsertPoint():e.getCenterInsertPoint(e.getBoundingBoxFromGeometry(a,!0)),c.drop(e,b,null,a.x,a.y,!0))};
Sidebar.prototype.addClickHandler=function(a,c,b){var e=c.mouseDown,d=c.mouseMove,f=c.mouseUp,k=this.editorUi.editor.graph.tolerance,h=null,g=this;c.mouseDown=function(b){e.apply(this,arguments);h=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));null!=this.dragElement&&(this.dragElement.style.display="none",mxUtils.setOpacity(a,50))};c.mouseMove=function(b){null!=this.dragElement&&"none"==this.dragElement.style.display&&null!=h&&(Math.abs(h.x-mxEvent.getClientX(b))>k||Math.abs(h.y-mxEvent.getClientY(b))>
@@ -2556,12 +2556,12 @@ mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhC
mxGraphView.prototype.setUnit=function(a){this.unit!=a&&(this.unit=a,this.fireEvent(new mxEventObject("unitChanged","unit",a)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(a,c,b){return null};
mxImageShape.prototype.getImageDataUri=function(){var a=this.image;if("data:image/svg+xml;base64,"==a.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=a)this.clippedSvg=Graph.clipSvgDataUri(a),this.clippedImage=a;a=this.clippedSvg}return a};
Graph=function(a,c,b,e,d,f){mxGraph.call(this,a,c,b,e);this.themes=d||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=f?f:!1;a=this.baseUrl;c=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<c&&(c=a.indexOf("/",c+2),0<c&&(this.domainUrl=a.substring(0,c)),c=a.lastIndexOf("/"),0<c&&(this.domainPathUrl=a.substring(0,c+1)));this.isHtmlLabel=function(a){a=this.getCurrentCellStyle(a);
-return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var k=null,h=null,g=null,l=null,m=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var c=b.getProperty("event"),d=c.getState();if(!mxEvent.isAltDown(c.getEvent())&&null!=d)if(this.model.isEdge(d.cell))if(k=new mxPoint(c.getGraphX(),c.getGraphY()),m=this.isCellSelected(d.cell),g=d,h=c,null!=d.text&&null!=d.text.boundingBox&&
-mxUtils.contains(d.text.boundingBox,c.getGraphX(),c.getGraphY()))l=mxEvent.LABEL_HANDLE;else{var e=this.selectionCellsHandler.getHandler(d.cell);null!=e&&null!=e.bends&&0<e.bends.length&&(l=e.getHandleForEvent(c))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(c.getEvent())&&(e=this.selectionCellsHandler.getHandler(d.cell),null==e||null==e.getHandleForEvent(c))){var f=new mxRectangle(c.getGraphX()-1,c.getGraphY()-1);f.grow(mxEvent.isTouchEvent(c.getEvent())?mxShape.prototype.svgStrokeTolerance-
-1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(d.cell)&&!this.isCellSelected(d.cell)){var n=this.model.getParent(d.cell),e=this.model.getParent(n);if(!this.isCellSelected(e)&&(mxUtils.intersects(f,new mxRectangle(d.x,d.y-2,d.width,3))&&this.model.getChildAt(e,0)!=n||mxUtils.intersects(f,new mxRectangle(d.x,d.y+d.height-2,d.width,3))||mxUtils.intersects(f,new mxRectangle(d.x-2,d.y,2,d.height))&&this.model.getChildAt(n,0)!=d.cell||mxUtils.intersects(f,new mxRectangle(d.x+d.width-
-2,d.y,2,d.height)))&&(n=this.selectionCellsHandler.isHandled(e),this.selectCellForEvent(e,c.getEvent()),e=this.selectionCellsHandler.getHandler(e),null!=e)){var p=e.getHandleForEvent(c);null!=p&&(e.start(c.getGraphX(),c.getGraphY(),p),e.blockDelayedSelection=!n,c.consume())}}for(;!c.isConsumed()&&null!=d&&(this.isTableCell(d.cell)||this.isTableRow(d.cell)||this.isTable(d.cell));)this.isSwimlane(d.cell)&&(e=this.getActualStartSize(d.cell),n=this.view.scale,(0<e.x||0<e.width)&&mxUtils.intersects(f,
-new mxRectangle(d.x+(e.x-e.width-1)*n+(0==e.x?d.width:0),d.y,1,d.height))||(0<e.y||0<e.height)&&mxUtils.intersects(f,new mxRectangle(d.x,d.y+(e.y-e.height-1)*n+(0==e.y?d.height:0),d.width,1)))&&(this.selectCellForEvent(d.cell,c.getEvent()),e=this.selectionCellsHandler.getHandler(d.cell),null!=e&&(p=mxEvent.CUSTOM_HANDLE-e.customHandles.length+1,e.start(c.getGraphX(),c.getGraphY(),p),c.consume())),d=this.view.getState(this.model.getParent(d.cell))}}}));this.addMouseListener({mouseDown:function(a,b){},
-mouseMove:mxUtils.bind(this,function(a,b){var c=this.selectionCellsHandler.handlers.map,d;for(d in c)if(null!=c[d].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(b.getEvent()))if(d=this.tolerance,null!=k&&null!=g&&null!=h){if(c=g,Math.abs(k.x-b.getGraphX())>d||Math.abs(k.y-b.getGraphY())>d){var e=this.selectionCellsHandler.getHandler(c.cell);null==e&&this.model.isEdge(c.cell)&&(e=this.createHandler(c));if(null!=e&&null!=e.bends&&0<e.bends.length){d=e.getHandleForEvent(h);
+return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var k=null,h=null,g=null,l=null,m=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var c=b.getProperty("event"),d=c.getState(),e=this.view.scale;if(!mxEvent.isAltDown(c.getEvent())&&null!=d)if(this.model.isEdge(d.cell))if(k=new mxPoint(c.getGraphX(),c.getGraphY()),m=this.isCellSelected(d.cell),g=d,h=c,null!=d.text&&null!=
+d.text.boundingBox&&mxUtils.contains(d.text.boundingBox,c.getGraphX(),c.getGraphY()))l=mxEvent.LABEL_HANDLE;else{var f=this.selectionCellsHandler.getHandler(d.cell);null!=f&&null!=f.bends&&0<f.bends.length&&(l=f.getHandleForEvent(c))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(c.getEvent())&&(f=this.selectionCellsHandler.getHandler(d.cell),null==f||null==f.getHandleForEvent(c))){var n=new mxRectangle(c.getGraphX()-1,c.getGraphY()-1);n.grow(mxEvent.isTouchEvent(c.getEvent())?mxShape.prototype.svgStrokeTolerance-
+1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(d.cell)&&!this.isCellSelected(d.cell)){var p=this.model.getParent(d.cell),f=this.model.getParent(p);if(!this.isCellSelected(f)){var q=this.getCellGeometry(d.cell),q=null!=q.alternateBounds?q.alternateBounds:q;if(mxUtils.intersects(n,new mxRectangle(d.x,d.y-2,q.width*e,3))&&this.model.getChildAt(f,0)!=p||mxUtils.intersects(n,new mxRectangle(d.x,d.y+q.height-2,q.width,3))||mxUtils.intersects(n,new mxRectangle(d.x-2,d.y,2,q.height*e))&&
+this.model.getChildAt(p,0)!=d.cell||mxUtils.intersects(n,new mxRectangle(d.x+q.width*e-2,d.y,2,q.height*e)))p=this.selectionCellsHandler.isHandled(f),this.selectCellForEvent(f,c.getEvent()),f=this.selectionCellsHandler.getHandler(f),null!=f&&(q=f.getHandleForEvent(c),null!=q&&(f.start(c.getGraphX(),c.getGraphY(),q),f.blockDelayedSelection=!p,c.consume()))}}for(;!c.isConsumed()&&null!=d&&(this.isTableCell(d.cell)||this.isTableRow(d.cell)||this.isTable(d.cell));)this.isSwimlane(d.cell)&&(f=this.getActualStartSize(d.cell),
+(0<f.x||0<f.width)&&mxUtils.intersects(n,new mxRectangle(d.x+(f.x-f.width-1)*e+(0==f.x?d.width:0),d.y,1,d.height))||(0<f.y||0<f.height)&&mxUtils.intersects(n,new mxRectangle(d.x,d.y+(f.y-f.height-1)*e+(0==f.y?d.height:0),d.width,1)))&&(this.selectCellForEvent(d.cell,c.getEvent()),f=this.selectionCellsHandler.getHandler(d.cell),null!=f&&(q=mxEvent.CUSTOM_HANDLE-f.customHandles.length+1,f.start(c.getGraphX(),c.getGraphY(),q),c.consume())),d=this.view.getState(this.model.getParent(d.cell))}}}));this.addMouseListener({mouseDown:function(a,
+b){},mouseMove:mxUtils.bind(this,function(a,b){var c=this.selectionCellsHandler.handlers.map,d;for(d in c)if(null!=c[d].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(b.getEvent()))if(d=this.tolerance,null!=k&&null!=g&&null!=h){if(c=g,Math.abs(k.x-b.getGraphX())>d||Math.abs(k.y-b.getGraphY())>d){var e=this.selectionCellsHandler.getHandler(c.cell);null==e&&this.model.isEdge(c.cell)&&(e=this.createHandler(c));if(null!=e&&null!=e.bends&&0<e.bends.length){d=e.getHandleForEvent(h);
var f=this.view.getEdgeStyle(c),n=f==mxEdgeStyle.EntityRelation;m||l!=mxEvent.LABEL_HANDLE||(d=l);if(n&&0!=d&&d!=e.bends.length-1&&d!=mxEvent.LABEL_HANDLE)!n||null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(d==mxEvent.LABEL_HANDLE||0==d||null!=c.visibleSourceState||d==e.bends.length-1||null!=c.visibleTargetState)n||d==mxEvent.LABEL_HANDLE||(n=c.absolutePoints,null!=n&&(null==f&&null==d||f==mxEdgeStyle.OrthConnector)&&(d=l,null==d&&(d=new mxRectangle(k.x,
k.y),d.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(d,n[0].x,n[0].y)?d=0:mxUtils.contains(d,n[n.length-1].x,n[n.length-1].y)?d=e.bends.length-1:null!=f&&(2==n.length||3==n.length&&(0==Math.round(n[0].x-n[1].x)&&0==Math.round(n[1].x-n[2].x)||0==Math.round(n[0].y-n[1].y)&&0==Math.round(n[1].y-n[2].y)))?d=2:(d=mxUtils.findNearestSegment(c,k.x,k.y),d=null==f?mxEvent.VIRTUAL_HANDLE-d:d+1))),null==d&&(d=mxEvent.VIRTUAL_HANDLE)),e.start(b.getGraphX(),b.getGraphX(),d),b.consume(),this.graphHandler.reset()}null!=
e&&(this.selectionCellsHandler.isHandlerActive(e)?this.isCellSelected(c.cell)||(this.selectionCellsHandler.handlers.put(c.cell,e),this.selectCellForEvent(c.cell,b.getEvent())):this.isCellSelected(c.cell)||e.destroy());m=!1;k=h=g=l=null}}else if(c=b.getState(),null!=c&&this.isCellEditable(c.cell)){e=null;if(this.model.isEdge(c.cell)){if(d=new mxRectangle(b.getGraphX(),b.getGraphY()),d.grow(mxEdgeHandler.prototype.handleImage.width/2),n=c.absolutePoints,null!=n)if(null!=c.text&&null!=c.text.boundingBox&&
@@ -2572,21 +2572,22 @@ new mxRectangle(c.x,c.y+c.height-2,c.width,3)))e="row-resize";for(n=c;null==e&&n
this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,b){return!1};this.alternateEdgeStyle="vertical";null==e&&this.loadStylesheet();var n=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
function(){var a=n.apply(this,arguments);if(this.graph.pageVisible){for(var b=[],c=this.graph.pageFormat,d=this.graph.pageScale,e=c.width*d,c=c.height*d,d=this.graph.view.translate,f=this.graph.view.scale,g=this.graph.getPageLayout(),k=0;k<g.width;k++)b.push(new mxRectangle(((g.x+k)*e+d.x)*f,(g.y*c+d.y)*f,e*f,c*f));for(k=1;k<g.height;k++)b.push(new mxRectangle((g.x*e+d.x)*f,((g.y+k)*c+d.y)*f,e*f,c*f));a=b.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
function(a,b){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var p=this.graphHandler.getCells;this.graphHandler.getCells=function(a){for(var b=p.apply(this,arguments),c=new mxDictionary,d=[],e=0;e<b.length;e++){var f=this.graph.isTableCell(a)&&this.graph.isTableCell(b[e])&&
-this.graph.isCellSelected(b[e])?this.graph.model.getParent(b[e]):this.graph.isTableRow(a)&&this.graph.isTableRow(b[e])&&this.graph.isCellSelected(b[e])?b[e]:this.graph.getCompositeParent(b[e]);null==f||c.get(f)||(c.put(f,!0),d.push(f))}return d};var r=this.graphHandler.start;this.graphHandler.start=function(a,b,c,d){var e=!1;this.graph.isTableCell(a)&&(this.graph.isCellSelected(a)?e=!0:a=this.graph.model.getParent(a));e||this.graph.isTableRow(a)&&this.graph.isCellSelected(a)||(a=this.graph.getCompositeParent(a));
-r.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,b){b=this.graph.getCompositeParent(b);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var u=new mxRubberband(this);this.getRubberband=function(){return u};var t=(new Date).getTime(),v=0,y=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;y.apply(this,arguments);a!=this.currentState?(t=(new Date).getTime(),v=0):v=(new Date).getTime()-t};var x=
-this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<v||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&x.apply(this,arguments)};var B=this.isToggleEvent;this.isToggleEvent=function(a){return B.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var E=u.isForceRubberbandEvent;u.isForceRubberbandEvent=function(a){return E.apply(this,
-arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var G=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(G=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,
-mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=G)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var A=this.click;this.click=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!b||a.isConsumed())return A.apply(this,arguments);var c=b?a.sourceState.cell:a.getCell();null!=c&&(c=this.getClickableLinkForCell(c),null!=c&&(this.isCustomLink(c)?
-this.customLinkClicked(c):this.openLink(c)));this.isEnabled()&&b&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};var F=this.tooltipHandler.show;this.tooltipHandler.show=function(){F.apply(this,arguments);if(null!=this.div)for(var a=this.div.getElementsByTagName("a"),b=0;b<a.length;b++)null!=a[b].getAttribute("href")&&null==a[b].getAttribute("target")&&a[b].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};
-this.getCursorForMouseEvent=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(b?a.sourceState.cell:a.getCell())};var z=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return z.apply(this,arguments)};this.selectRegion=function(a,b){var c=this.getCells(a.x,a.y,a.width,a.height,null,
-null,null,function(a){return"1"==mxUtils.getValue(a.style,"locked","0")},!0);this.selectCellsForEvent(c,b);return c};var H=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:H.apply(this,arguments)};this.isCellLocked=function(a){for(;null!=a;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(a),"locked","0"))return!0;a=this.model.getParent(a)}return!1};var K=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,
-mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();K=null==c||this.isSelectionEmpty()||this.isCellSelected(c.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),u.start(c.x,c.y)):null!=K?this.addSelectionCells(K):
+this.graph.isCellSelected(b[e])?this.graph.model.getParent(b[e]):this.graph.isTableRow(a)&&this.graph.isTableRow(b[e])&&this.graph.isCellSelected(b[e])?b[e]:this.graph.getCompositeParent(b[e]);null==f||c.get(f)||(c.put(f,!0),d.push(f))}return d};var q=this.graphHandler.start;this.graphHandler.start=function(a,b,c,d){var e=!1;this.graph.isTableCell(a)&&(this.graph.isCellSelected(a)?e=!0:a=this.graph.model.getParent(a));e||this.graph.isTableRow(a)&&this.graph.isCellSelected(a)||(a=this.graph.getCompositeParent(a));
+q.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,b){b=this.graph.getCompositeParent(b);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var t=new mxRubberband(this);this.getRubberband=function(){return t};var v=(new Date).getTime(),u=0,w=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;w.apply(this,arguments);a!=this.currentState?(v=(new Date).getTime(),u=0):u=(new Date).getTime()-v};var x=
+this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<u||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&x.apply(this,arguments)};var A=this.isToggleEvent;this.isToggleEvent=function(a){return A.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var E=t.isForceRubberbandEvent;t.isForceRubberbandEvent=function(a){return E.apply(this,
+arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var H=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(H=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,
+mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=H)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var B=this.click;this.click=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!b||a.isConsumed())return B.apply(this,arguments);var c=b?a.sourceState.cell:a.getCell();null!=c&&(c=this.getClickableLinkForCell(c),null!=c&&(this.isCustomLink(c)?
+this.customLinkClicked(c):this.openLink(c)));this.isEnabled()&&b&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};var G=this.tooltipHandler.show;this.tooltipHandler.show=function(){G.apply(this,arguments);if(null!=this.div)for(var a=this.div.getElementsByTagName("a"),b=0;b<a.length;b++)null!=a[b].getAttribute("href")&&null==a[b].getAttribute("target")&&a[b].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};
+this.getCursorForMouseEvent=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(b?a.sourceState.cell:a.getCell())};var y=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return y.apply(this,arguments)};this.selectRegion=function(a,b){var c=this.getCells(a.x,a.y,a.width,a.height,null,
+null,null,function(a){return"1"==mxUtils.getValue(a.style,"locked","0")},!0);this.selectCellsForEvent(c,b);return c};var I=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:I.apply(this,arguments)};this.isCellLocked=function(a){for(;null!=a;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(a),"locked","0"))return!0;a=this.model.getParent(a)}return!1};var K=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,
+mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();K=null==c||this.isSelectionEmpty()||this.isCellSelected(c.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),t.start(c.x,c.y)):null!=K?this.addSelectionCells(K):
1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);K=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,b){var c=a.view.graph;return b&&(c.isCellSelected(a.cell)||c.isTableRow(a.cell)&&c.selectionCellsHandler.isHandled(c.model.getParent(a.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;
-null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var L=this.updateMouseEvent;this.updateMouseEvent=function(a){a=L.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};
+null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var M=this.updateMouseEvent;this.updateMouseEvent=function(a){a=M.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};
Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;
-Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
+Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.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.createOffscreenGraph=function(a){var c=new Graph(document.createElement("div"));c.stylesheet.styles=mxUtils.clone(a.styles);c.resetViewOnRootChange=!1;c.setConnectable(!1);c.gridEnabled=!1;c.autoScroll=!1;c.setTooltips(!1);c.setEnabled(!1);c.container.style.visibility="hidden";c.container.style.position="absolute";c.container.style.overflow="hidden";c.container.style.height="1px";c.container.style.width="1px";return c};
-Graph.createSvgImage=function(a,c,b,e,d){b=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+c+'px" '+(null!=e&&null!=d?'viewBox="0 0 '+e+" "+d+'" ':"")+'version="1.1">'+b+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(b):Base64.encode(b,!0)),a,c)};
+Graph.createSvgImage=function(a,c,b,e,d){b=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+c+'px" '+(null!=e&&null!=d?'viewBox="0 0 '+e+" "+d+'" ':"")+'version="1.1">'+b+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(b):Base64.encode(b,!0)),a,c)};
Graph.zapGremlins=function(a){for(var c=0,b=[],e=0;e<a.length;e++){var d=a.charCodeAt(e);(32<=d||9==d||10==d||13==d)&&65535!=d&&65534!=d||(b.push(a.substring(c,e)),c=e+1)}0<c&&c<a.length&&b.push(a.substring(c));return 0==b.length?a:b.join("")};Graph.stringToBytes=function(a){for(var c=Array(a.length),b=0;b<a.length;b++)c[b]=a.charCodeAt(b);return c};Graph.bytesToString=function(a){for(var c=Array(a.length),b=0;b<a.length;b++)c[b]=String.fromCharCode(a[b]);return c.join("")};
Graph.base64EncodeUnicode=function(a){return btoa(encodeURIComponent(a).replace(/%([0-9A-F]{2})/g,function(a,b){return String.fromCharCode(parseInt(b,16))}))};Graph.base64DecodeUnicode=function(a){return decodeURIComponent(Array.prototype.map.call(atob(a),function(a){return"%"+("00"+a.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(a,c){var b=mxUtils.getXml(a);return Graph.compress(c?b:Graph.zapGremlins(b))};
Graph.arrayBufferToString=function(a){var c="";a=new Uint8Array(a);for(var b=a.byteLength,e=0;e<b;e++)c+=String.fromCharCode(a[e]);return c};Graph.stringToArrayBuffer=function(a){return Uint8Array.from(a,function(a){return a.charCodeAt(0)})};
@@ -2643,8 +2644,8 @@ Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEve
Graph.prototype.getGlobalVariable=function(a){var c=null;"date"==a?c=(new Date).toLocaleDateString():"time"==a?c=(new Date).toLocaleTimeString():"timestamp"==a?c=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),c=this.formatDate(new Date,a));return c};
Graph.prototype.formatDate=function(a,c,b){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 e=this.dateFormatCache,d=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,f=/[^-+\dA-Z]/g,k=function(a,b){a=String(a);for(b=b||2;a.length<b;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(c=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");c=String(e.masks[c]||c||e.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),b=!0);var h=b?"getUTC":"get",g=a[h+"Date"](),l=a[h+"Day"](),m=a[h+"Month"](),n=a[h+"FullYear"](),p=a[h+"Hours"](),r=a[h+"Minutes"](),u=a[h+"Seconds"](),h=a[h+"Milliseconds"](),t=b?0:a.getTimezoneOffset(),v={d:g,dd:k(g),ddd:e.i18n.dayNames[l],dddd:e.i18n.dayNames[l+7],m:m+1,mm:k(m+1),mmm:e.i18n.monthNames[m],mmmm:e.i18n.monthNames[m+
-12],yy:String(n).slice(2),yyyy:n,h:p%12||12,hh:k(p%12||12),H:p,HH:k(p),M:r,MM:k(r),s:u,ss:k(u),l:k(h,3),L:k(99<h?Math.round(h/10):h),t:12>p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:b?"UTC":(String(a).match(d)||[""]).pop().replace(f,""),o:(0<t?"-":"+")+k(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4),S:["th","st","nd","rd"][3<g%10?0:(10!=g%100-g%10)*g%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in v?v[a]:a.slice(1,
+/\d/.test(a)||(c=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");c=String(e.masks[c]||c||e.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),b=!0);var h=b?"getUTC":"get",g=a[h+"Date"](),l=a[h+"Day"](),m=a[h+"Month"](),n=a[h+"FullYear"](),p=a[h+"Hours"](),q=a[h+"Minutes"](),t=a[h+"Seconds"](),h=a[h+"Milliseconds"](),v=b?0:a.getTimezoneOffset(),u={d:g,dd:k(g),ddd:e.i18n.dayNames[l],dddd:e.i18n.dayNames[l+7],m:m+1,mm:k(m+1),mmm:e.i18n.monthNames[m],mmmm:e.i18n.monthNames[m+
+12],yy:String(n).slice(2),yyyy:n,h:p%12||12,hh:k(p%12||12),H:p,HH:k(p),M:q,MM:k(q),s:t,ss:k(t),l:k(h,3),L:k(99<h?Math.round(h/10):h),t:12>p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:b?"UTC":(String(a).match(d)||[""]).pop().replace(f,""),o:(0<v?"-":"+")+k(100*Math.floor(Math.abs(v)/60)+Math.abs(v)%60,4),S:["th","st","nd","rd"][3<g%10?0:(10!=g%100-g%10)*g%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in u?u[a]:a.slice(1,
a.length-1)})};Graph.prototype.getLayerForCells=function(a){var c=null;if(0<a.length){for(c=a[0];!this.model.isLayer(c);)c=this.model.getParent(c);for(var b=1;b<a.length;b++)if(!this.model.isAncestor(c,a[b])){c=null;break}}return c};
Graph.prototype.createLayersDialog=function(a,c){var b=document.createElement("div");b.style.position="absolute";for(var e=this.getModel(),d=e.getChildCount(e.root),f=0;f<d;f++)mxUtils.bind(this,function(d){function f(){e.isVisible(d)?(m.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(k,75)):(m.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(k,25))}var g=this.convertValueToString(d)||mxResources.get("background")||"Background",k=document.createElement("div");k.style.overflow=
"hidden";k.style.textOverflow="ellipsis";k.style.padding="2px";k.style.whiteSpace="nowrap";k.style.cursor="pointer";k.setAttribute("title",mxResources.get(e.isVisible(d)?"hideIt":"show",[g]));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";c&&(m.style.filter="invert(100%)",m.style.top="-2px");k.appendChild(m);mxUtils.write(k,g);b.appendChild(k);
@@ -2654,11 +2655,11 @@ null==k&&(k=g.hasAttribute(h)?null!=g.getAttribute(h)?g.getAttribute(h):"":null)
Graph.prototype.selectCellsForConnectVertex=function(a,c,b){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),this.scrollCellToVisible(a[1]),null!=b&&(mxEvent.isTouchEvent(c)?b.update(b.getState(this.view.getState(a[1]))):b.reset())):this.setSelectionCells(a)};Graph.prototype.isCloneConnectSource=function(a){var c=null;null!=this.layoutManager&&(c=this.layoutManager.getLayout(this.model.getParent(a)));return this.isTableRow(a)||this.isTableCell(a)||null!=c&&c.constructor==mxStackLayout};
Graph.prototype.connectVertex=function(a,c,b,e,d,f,k,h){f=f?f:!1;if(a.geometry.relative&&this.model.isEdge(a.parent))return[];for(;a.geometry.relative&&this.model.isVertex(a.parent);)a=a.parent;var g=this.isCloneConnectSource(a),l=g?a:this.getCompositeParent(a),m=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(l.geometry.x,l.geometry.y);c==mxConstants.DIRECTION_NORTH?(m.x+=l.geometry.width/2,m.y-=b):c==
mxConstants.DIRECTION_SOUTH?(m.x+=l.geometry.width/2,m.y+=l.geometry.height+b):(m.x=c==mxConstants.DIRECTION_WEST?m.x-b:m.x+(l.geometry.width+b),m.y+=l.geometry.height/2);var n=this.view.getState(this.model.getParent(a));b=this.view.scale;var p=this.view.translate,l=p.x*b,p=p.y*b;null!=n&&this.model.isVertex(n.cell)&&(l=n.x,p=n.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(m.x+=a.parent.geometry.x,m.y+=a.parent.geometry.y);f=f?null:(new mxRectangle(l+m.x*b,p+m.y*b)).grow(40*b);f=null!=f?
-this.getCells(0,0,0,0,null,null,f,null,!0):null;var n=this.view.getState(a),r=null,u=null;if(null!=f){f=f.reverse();for(var t=0;t<f.length;t++)if(!this.isCellLocked(f[t])&&!this.model.isEdge(f[t])&&f[t]!=a)if(!this.model.isAncestor(a,f[t])&&this.isContainer(f[t])&&(null==r||f[t]==this.model.getParent(a)))r=f[t];else if(null==u&&this.isCellConnectable(f[t])&&!this.model.isAncestor(f[t],a)&&!this.isSwimlane(f[t])){var v=this.view.getState(f[t]);null==n||null==v||mxUtils.intersects(n,v)||(u=f[t])}}var y=
-!mxEvent.isShiftDown(e)||mxEvent.isControlDown(e)||d;y&&("1"!=urlParams.sketch||d)&&(c==mxConstants.DIRECTION_NORTH?m.y-=a.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?m.y+=a.geometry.height/2:m.x=c==mxConstants.DIRECTION_WEST?m.x-a.geometry.width/2:m.x+a.geometry.width/2);var x=[],B=u,u=r;d=mxUtils.bind(this,function(b){if(null==k||null!=b||null==u&&g){this.model.beginUpdate();try{if(null==B&&y){var d=this.getAbsoluteParent(null!=b?b:a),d=g?a:this.getCompositeParent(d);B=null!=b?b:this.duplicateCells([d],
-!1)[0];null!=b&&this.addCells([B],this.model.getParent(a),null,null,null,!0);var f=this.getCellGeometry(B);null!=f&&(null!=b&&"1"==urlParams.sketch&&(c==mxConstants.DIRECTION_NORTH?m.y-=f.height/2:c==mxConstants.DIRECTION_SOUTH?m.y+=f.height/2:m.x=c==mxConstants.DIRECTION_WEST?m.x-f.width/2:m.x+f.width/2),f.x=m.x-f.width/2,f.y=m.y-f.height/2);null!=r?(this.addCells([B],r,null,null,null,!0),u=null):y&&!g&&this.addCells([B],this.getDefaultParent(),null,null,null,!0)}var l=mxEvent.isControlDown(e)&&
-mxEvent.isShiftDown(e)&&y||null==u&&g?null:this.insertEdge(this.model.getParent(a),null,"",a,B,this.createCurrentEdgeStyle());if(null!=l&&this.connectionHandler.insertBeforeSource){var n=null;for(b=a;null!=b.parent&&null!=b.geometry&&b.geometry.relative&&b.parent!=l.parent;)b=this.model.getParent(b);null!=b&&null!=b.parent&&b.parent==l.parent&&(n=b.parent.getIndex(b),this.model.add(b.parent,l,n))}null==u&&null!=B&&null!=a.parent&&g&&c==mxConstants.DIRECTION_WEST&&(n=a.parent.getIndex(a),this.model.add(a.parent,
-B,n));null!=l&&x.push(l);null==u&&null!=B&&x.push(B);null==B&&null!=l&&l.geometry.setTerminalPoint(m,!1);null!=l&&this.fireEvent(new mxEventObject("cellsInserted","cells",[l]))}finally{this.model.endUpdate()}}if(null!=h)h(x);else return x});if(null==k||null!=B||!y||null==u&&g)return d(B);k(l+m.x*b,p+m.y*b,d)};
+this.getCells(0,0,0,0,null,null,f,null,!0):null;var n=this.view.getState(a),q=null,t=null;if(null!=f){f=f.reverse();for(var v=0;v<f.length;v++)if(!this.isCellLocked(f[v])&&!this.model.isEdge(f[v])&&f[v]!=a)if(!this.model.isAncestor(a,f[v])&&this.isContainer(f[v])&&(null==q||f[v]==this.model.getParent(a)))q=f[v];else if(null==t&&this.isCellConnectable(f[v])&&!this.model.isAncestor(f[v],a)&&!this.isSwimlane(f[v])){var u=this.view.getState(f[v]);null==n||null==u||mxUtils.intersects(n,u)||(t=f[v])}}var w=
+!mxEvent.isShiftDown(e)||mxEvent.isControlDown(e)||d;w&&("1"!=urlParams.sketch||d)&&(c==mxConstants.DIRECTION_NORTH?m.y-=a.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?m.y+=a.geometry.height/2:m.x=c==mxConstants.DIRECTION_WEST?m.x-a.geometry.width/2:m.x+a.geometry.width/2);var x=[],A=t,t=q;d=mxUtils.bind(this,function(b){if(null==k||null!=b||null==t&&g){this.model.beginUpdate();try{if(null==A&&w){var d=this.getAbsoluteParent(null!=b?b:a),d=g?a:this.getCompositeParent(d);A=null!=b?b:this.duplicateCells([d],
+!1)[0];null!=b&&this.addCells([A],this.model.getParent(a),null,null,null,!0);var f=this.getCellGeometry(A);null!=f&&(null!=b&&"1"==urlParams.sketch&&(c==mxConstants.DIRECTION_NORTH?m.y-=f.height/2:c==mxConstants.DIRECTION_SOUTH?m.y+=f.height/2:m.x=c==mxConstants.DIRECTION_WEST?m.x-f.width/2:m.x+f.width/2),f.x=m.x-f.width/2,f.y=m.y-f.height/2);null!=q?(this.addCells([A],q,null,null,null,!0),t=null):w&&!g&&this.addCells([A],this.getDefaultParent(),null,null,null,!0)}var l=mxEvent.isControlDown(e)&&
+mxEvent.isShiftDown(e)&&w||null==t&&g?null:this.insertEdge(this.model.getParent(a),null,"",a,A,this.createCurrentEdgeStyle());if(null!=l&&this.connectionHandler.insertBeforeSource){var n=null;for(b=a;null!=b.parent&&null!=b.geometry&&b.geometry.relative&&b.parent!=l.parent;)b=this.model.getParent(b);null!=b&&null!=b.parent&&b.parent==l.parent&&(n=b.parent.getIndex(b),this.model.add(b.parent,l,n))}null==t&&null!=A&&null!=a.parent&&g&&c==mxConstants.DIRECTION_WEST&&(n=a.parent.getIndex(a),this.model.add(a.parent,
+A,n));null!=l&&x.push(l);null==t&&null!=A&&x.push(A);null==A&&null!=l&&l.geometry.setTerminalPoint(m,!1);null!=l&&this.fireEvent(new mxEventObject("cellsInserted","cells",[l]))}finally{this.model.endUpdate()}}if(null!=h)h(x);else return x});if(null==k||null!=A||!w||null==t&&g)return d(A);k(l+m.x*b,p+m.y*b,d)};
Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),c=[],b,e;for(e in this.model.cells)if(b=this.model.cells[e],this.model.isVertex(b)||this.model.isEdge(b))this.isHtmlLabel(b)?(a.innerHTML=this.sanitizeHtml(this.getLabel(b)),b=mxUtils.extractTextWithWhitespace([a])):b=this.getLabel(b),b=mxUtils.trim(b.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<b.length&&c.push(b);return c.join(" ")};
Graph.prototype.convertValueToString=function(a){var c=this.model.getValue(a);if(null!=c&&"object"==typeof c){var b=null;if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var c=a.getAttribute("placeholder"),e=a;null==b&&null!=e;)null!=e.value&&"object"==typeof e.value&&(b=e.hasAttribute(c)?null!=e.getAttribute(c)?e.getAttribute(c):"":null),e=this.model.getParent(e);else b=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(b=c.getAttribute("label_"+Graph.diagramLanguage)),
null==b&&(b=c.getAttribute("label")||"");return b||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null};
@@ -2720,27 +2721,29 @@ d=this.createVertex(null,null,null!=d?d:"",0,0,c*b,a*e,null!=f?f:"shape=table;ch
return 1<a?(k.geometry.y=e+f,this.createParent(d,this.createParent(k,this.createVertex(null,null,"",f,0,b,e,g),c,b,0),a-1,0,e)):d};Graph.prototype.isTableCell=function(a){return this.model.isVertex(a)&&this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.model.isVertex(a)&&this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"tableLayout"==a.childLayout};
Graph.prototype.setTableRowHeight=function(a,c,b){b=null!=b?b:!0;var e=this.getModel();e.beginUpdate();try{var d=this.getCellGeometry(a);if(null!=d){d=d.clone();d.height+=c;e.setGeometry(a,d);var f=e.getParent(a),k=e.getChildCells(f,!0);if(!b){var h=mxUtils.indexOf(k,a);if(h<k.length-1){var g=k[h+1],l=this.getCellGeometry(g);null!=l&&(l=l.clone(),l.y+=c,l.height-=c,e.setGeometry(g,l))}}var m=this.getCellGeometry(f);null!=m&&(b||(b=a==k[k.length-1]),b&&(m=m.clone(),m.height+=c,e.setGeometry(f,m)));
null!=this.layoutManager&&this.layoutManager.executeLayout(f,!0)}}finally{e.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(a,c,b){b=null!=b?b:!1;var e=this.getModel(),d=e.getParent(a),f=e.getParent(d),k=e.getChildCells(d,!0);a=mxUtils.indexOf(k,a);var h=a==k.length-1;e.beginUpdate();try{for(var g=e.getChildCells(f,!0),l=0;l<g.length;l++){var d=g[l],k=e.getChildCells(d,!0),m=k[a],n=this.getCellGeometry(m);null!=n&&(n=n.clone(),n.width+=c,e.setGeometry(m,n));a<k.length-1&&(m=k[a+1],n=this.getCellGeometry(m),null!=n&&(n=n.clone(),n.x+=c,b||(n.width-=c),e.setGeometry(m,n)))}if(h||
-b){var p=this.getCellGeometry(f);null!=p&&(p=p.clone(),p.width+=c,e.setGeometry(f,p))}null!=this.layoutManager&&this.layoutManager.executeLayout(f,!0)}finally{e.endUpdate()}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};TableLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};
-TableLayout.prototype.getSize=function(a,c){for(var b=0,e=0;e<a.length;e++)if(!this.isVertexIgnored(a[e])){var d=this.graph.getCellGeometry(a[e]);null!=d&&(b+=c?d.width:d.height)}return b};TableLayout.prototype.getRowLayout=function(a,c){for(var b=this.graph.model.getChildCells(a,!0),e=this.graph.getActualStartSize(a,!0),d=this.getSize(b,!0),f=c-e.x-e.width,k=[],e=e.x,h=0;h<b.length;h++){var g=this.graph.getCellGeometry(b[h]);null!=g&&(e+=g.width*f/d,k.push(Math.round(e)))}return k};
-TableLayout.prototype.layoutRow=function(a,c,b,e){var d=this.graph.getModel(),f=d.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var k=a.x,h=0;null!=c&&(c=c.slice(),c.splice(0,0,a.x));for(var g=0;g<f.length;g++){var l=this.graph.getCellGeometry(f[g]);null!=l&&(l=l.clone(),l.y=a.y,l.height=b-a.y-a.height,null!=c?(l.x=c[g],l.width=c[g+1]-l.x,g==f.length-1&&g<c.length-2&&(l.width=e-l.x-a.x-a.width)):(l.x=k,k+=l.width,g==f.length-1?l.width=e-a.x-a.width-h:h+=l.width),d.setGeometry(f[g],l))}return h};
+Graph.prototype.setTableColumnWidth=function(a,c,b){b=null!=b?b:!1;var e=this.getModel(),d=e.getParent(a),f=e.getParent(d),k=e.getChildCells(d,!0);a=mxUtils.indexOf(k,a);var h=a==k.length-1;e.beginUpdate();try{for(var g=e.getChildCells(f,!0),l=0;l<g.length;l++){var d=g[l],k=e.getChildCells(d,!0),m=k[a],n=this.getCellGeometry(m);if(null!=n){var n=n.clone(),p=null!=n.alternateBounds?n.alternateBounds:n;p.width+=c;e.setGeometry(m,n)}a<k.length-1&&(m=k[a+1],n=this.getCellGeometry(m),null!=n&&(n=n.clone(),
+p=null!=n.alternateBounds?n.alternateBounds:n,p.x+=c,b||(p.width-=c),e.setGeometry(m,n)))}if(h||b){var q=this.getCellGeometry(f);null!=q&&(q=q.clone(),p=null!=q.alternateBounds?q.alternateBounds:n,p.width+=c,e.setGeometry(f,q))}null!=this.layoutManager&&this.layoutManager.executeLayout(f,!0)}finally{e.endUpdate()}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+TableLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};TableLayout.prototype.getSize=function(a,c){for(var b=0,e=0;e<a.length;e++)if(!this.isVertexIgnored(a[e])){var d=this.graph.getCellGeometry(a[e]);null!=d&&(b+=c?d.width:d.height)}return b};
+TableLayout.prototype.getRowLayout=function(a,c){for(var b=this.graph.model.getChildCells(a,!0),e=this.graph.getActualStartSize(a,!0),d=this.getSize(b,!0),f=c-e.x-e.width,k=[],e=e.x,h=0;h<b.length;h++){var g=this.graph.getCellGeometry(b[h]);null!=g&&(e+=(null!=g.alternateBounds?g.alternateBounds.width:g.width)*f/d,k.push(Math.round(e)))}return k};
+TableLayout.prototype.layoutRow=function(a,c,b,e){var d=this.graph.getModel(),f=d.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var k=null,h=a.x,g=0;null!=c&&(c=c.slice(),c.splice(0,0,a.x));for(var l=0;l<f.length;l++){var m=this.graph.getCellGeometry(f[l]);null!=m&&(m=m.clone(),m.y=a.y,m.height=b-a.y-a.height,null!=c?(m.x=c[l],m.width=c[l+1]-m.x,l==f.length-1&&l<c.length-2&&(m.width=e-m.x-a.x-a.width)):(m.x=h,h+=m.width,l==f.length-1?m.width=e-a.x-a.width-g:g+=m.width),m.alternateBounds=
+new mxRectangle(0,0,m.width,m.height),d.setGeometry(f[l],m));null!=k&&null!=k.geo&&(1<k.colspan?(k.colspan--,k.geo.width+=m.width,d.setVisible(f[l],!1)):d.setVisible(f[l],!0));if(null==k||1>=k.colspan)k=this.graph.getCurrentCellStyle(f[l],!0),k={colspan:null!=k?parseInt(k.colspan||1):1,style:k,cell:f[l],geo:m}}return g};
TableLayout.prototype.execute=function(a){if(null!=a){var c=this.graph.getActualStartSize(a,!0),b=this.graph.getCellGeometry(a),e=this.graph.getCellStyle(a),d="1"==mxUtils.getValue(e,"resizeLastRow","0"),f="1"==mxUtils.getValue(e,"resizeLast","0"),e="1"==mxUtils.getValue(e,"fixedRows","0"),k=this.graph.getModel(),h=0;k.beginUpdate();try{var g=b.height-c.y-c.height,l=b.width-c.x-c.width,m=k.getChildCells(a,!0),n=this.getSize(m,!1);if(0<g&&0<l&&0<m.length&&0<n){if(d){var p=this.graph.getCellGeometry(m[m.length-
-1]);null!=p&&(p=p.clone(),p.height=g-n+p.height,k.setGeometry(m[m.length-1],p))}for(var r=f?null:this.getRowLayout(m[0],l),u=c.y,t=0;t<m.length;t++)p=this.graph.getCellGeometry(m[t]),null!=p&&(p=p.clone(),p.x=c.x,p.width=l,p.y=Math.round(u),u=d||e?u+p.height:u+p.height/n*g,p.height=Math.round(u)-p.y,k.setGeometry(m[t],p)),h=Math.max(h,this.layoutRow(m[t],r,p.height,l));e&&g<n&&(b=b.clone(),b.height=u+c.height,k.setGeometry(a,b));f&&l<h+Graph.minTableColumnWidth&&(b=b.clone(),b.width=h+c.width+c.x+
+1]);null!=p&&(p=p.clone(),p.height=g-n+p.height,k.setGeometry(m[m.length-1],p))}for(var q=f?null:this.getRowLayout(m[0],l),t=c.y,v=0;v<m.length;v++)p=this.graph.getCellGeometry(m[v]),null!=p&&(p=p.clone(),p.x=c.x,p.width=l,p.y=Math.round(t),t=d||e?t+p.height:t+p.height/n*g,p.height=Math.round(t)-p.y,k.setGeometry(m[v],p)),h=Math.max(h,this.layoutRow(m[v],q,p.height,l));e&&g<n&&(b=b.clone(),b.height=t+c.height,k.setGeometry(a,b));f&&l<h+Graph.minTableColumnWidth&&(b=b.clone(),b.width=h+c.width+c.x+
Graph.minTableColumnWidth,k.setGeometry(a,b))}}finally{k.endUpdate()}}};
(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var c=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,b){b=null!=b?b:!0;var d=this.getState(a);null!=d&&b&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&!d.invalid&&this.updateLineJumps(d)&&this.graph.cellRenderer.redraw(d,!1,this.isRendering());d=c.apply(this,
arguments);null!=d&&b&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(d);return d};var b=mxShape.prototype.paint;mxShape.prototype.paint=function(){b.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 a=this.node.getElementsByTagName("path");if(1<a.length){"1"!=mxUtils.getValue(this.state.style,
mxConstants.STYLE_DASHED,"0")&&a[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var c=this.state.view.graph.getFlowAnimationStyle();null!=c&&a[1].setAttribute("class",c.getAttribute("id"))}}};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return e.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
function(a){d.apply(this,arguments);this.graph.model.isEdge(a.cell)&&1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=a.routedPoints,d=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(b,c,e){var f=new mxPoint(c,e);f.type=b;d.push(f);f=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==f||f.type!=
-b||f.x!=c||f.y!=e},f=.5*this.scale,c=!1,d=[],g=0;g<b.length-1;g++){for(var k=b[g+1],h=b[g],l=[],m=b[g+2];g<b.length-2&&mxUtils.ptSegDistSq(h.x,h.y,m.x,m.y,k.x,k.y)<1*this.scale*this.scale;)k=m,g++,m=b[g+2];for(var c=e(0,h.x,h.y)||c,G=0;G<this.validEdges.length;G++){var A=this.validEdges[G],F=A.absolutePoints;if(null!=F&&mxUtils.intersects(a,A)&&"1"!=A.style.noJump)for(A=0;A<F.length-1;A++){for(var z=F[A+1],H=F[A],m=F[A+2];A<F.length-2&&mxUtils.ptSegDistSq(H.x,H.y,m.x,m.y,z.x,z.y)<1*this.scale*this.scale;)z=
-m,A++,m=F[A+2];m=mxUtils.intersection(h.x,h.y,k.x,k.y,H.x,H.y,z.x,z.y);if(null!=m&&(Math.abs(m.x-h.x)>f||Math.abs(m.y-h.y)>f)&&(Math.abs(m.x-k.x)>f||Math.abs(m.y-k.y)>f)&&(Math.abs(m.x-H.x)>f||Math.abs(m.y-H.y)>f)&&(Math.abs(m.x-z.x)>f||Math.abs(m.y-z.y)>f)){z=m.x-h.x;H=m.y-h.y;m={distSq:z*z+H*H,x:m.x,y:m.y};for(z=0;z<l.length;z++)if(l[z].distSq>m.distSq){l.splice(z,0,m);m=null;break}null==m||0!=l.length&&l[l.length-1].x===m.x&&l[l.length-1].y===m.y||l.push(m)}}}for(A=0;A<l.length;A++)c=e(1,l[A].x,
-l[A].y)||c}m=b[b.length-1];c=e(0,m.x,m.y)||c}a.routedPoints=d;return c}return!1};var f=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)f.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,
-"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),k=!0,h=null,l=null,m=[],n=null;a.begin();for(var p=0;p<this.state.routedPoints.length;p++){var A=this.state.routedPoints[p],F=new mxPoint(A.x/this.scale,A.y/this.scale);0==p?F=b[0]:p==this.state.routedPoints.length-1&&(F=b[b.length-1]);var z=!1;if(null!=h&&1==A.type){var H=this.state.routedPoints[p+1],A=H.x/this.scale-F.x,H=H.y/this.scale-F.y,A=A*A+H*H;null==n&&(n=new mxPoint(F.x-h.x,F.y-h.y),
-l=Math.sqrt(n.x*n.x+n.y*n.y),0<l?(n.x=n.x*e/l,n.y=n.y*e/l):n=null);A>e*e&&0<l&&(A=h.x-F.x,H=h.y-F.y,A=A*A+H*H,A>e*e&&(z=new mxPoint(F.x-n.x,F.y-n.y),A=new mxPoint(F.x+n.x,F.y+n.y),m.push(z),this.addPoints(a,m,c,d,!1,null,k),m=0>Math.round(n.x)||0==Math.round(n.x)&&0>=Math.round(n.y)?1:-1,k=!1,"sharp"==g?(a.lineTo(z.x-n.y*m,z.y+n.x*m),a.lineTo(A.x-n.y*m,A.y+n.x*m),a.lineTo(A.x,A.y)):"line"==g?(a.moveTo(z.x+n.y*m,z.y-n.x*m),a.lineTo(z.x-n.y*m,z.y+n.x*m),a.moveTo(A.x-n.y*m,A.y+n.x*m),a.lineTo(A.x+n.y*
-m,A.y-n.x*m),a.moveTo(A.x,A.y)):"arc"==g?(m*=1.3,a.curveTo(z.x-n.y*m,z.y+n.x*m,A.x-n.y*m,A.y+n.x*m,A.x,A.y)):(a.moveTo(A.x,A.y),k=!0),m=[A],z=!0))}else n=null;z||(m.push(F),h=F)}this.addPoints(a,m,c,d,!1,null,k);a.stroke()}};var k=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(a,b,c,d){return null!=b&&"centerPerimeter"==b.style[mxConstants.STYLE_PERIMETER]?new mxPoint(b.getCenterX(),b.getCenterY()):k.apply(this,arguments)};var h=mxGraphView.prototype.updateFloatingTerminalPoint;
+b||f.x!=c||f.y!=e},f=.5*this.scale,c=!1,d=[],g=0;g<b.length-1;g++){for(var k=b[g+1],h=b[g],l=[],m=b[g+2];g<b.length-2&&mxUtils.ptSegDistSq(h.x,h.y,m.x,m.y,k.x,k.y)<1*this.scale*this.scale;)k=m,g++,m=b[g+2];for(var c=e(0,h.x,h.y)||c,H=0;H<this.validEdges.length;H++){var B=this.validEdges[H],G=B.absolutePoints;if(null!=G&&mxUtils.intersects(a,B)&&"1"!=B.style.noJump)for(B=0;B<G.length-1;B++){for(var y=G[B+1],I=G[B],m=G[B+2];B<G.length-2&&mxUtils.ptSegDistSq(I.x,I.y,m.x,m.y,y.x,y.y)<1*this.scale*this.scale;)y=
+m,B++,m=G[B+2];m=mxUtils.intersection(h.x,h.y,k.x,k.y,I.x,I.y,y.x,y.y);if(null!=m&&(Math.abs(m.x-h.x)>f||Math.abs(m.y-h.y)>f)&&(Math.abs(m.x-k.x)>f||Math.abs(m.y-k.y)>f)&&(Math.abs(m.x-I.x)>f||Math.abs(m.y-I.y)>f)&&(Math.abs(m.x-y.x)>f||Math.abs(m.y-y.y)>f)){y=m.x-h.x;I=m.y-h.y;m={distSq:y*y+I*I,x:m.x,y:m.y};for(y=0;y<l.length;y++)if(l[y].distSq>m.distSq){l.splice(y,0,m);m=null;break}null==m||0!=l.length&&l[l.length-1].x===m.x&&l[l.length-1].y===m.y||l.push(m)}}}for(B=0;B<l.length;B++)c=e(1,l[B].x,
+l[B].y)||c}m=b[b.length-1];c=e(0,m.x,m.y)||c}a.routedPoints=d;return c}return!1};var f=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)f.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,
+"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),k=!0,h=null,l=null,m=[],n=null;a.begin();for(var p=0;p<this.state.routedPoints.length;p++){var B=this.state.routedPoints[p],G=new mxPoint(B.x/this.scale,B.y/this.scale);0==p?G=b[0]:p==this.state.routedPoints.length-1&&(G=b[b.length-1]);var y=!1;if(null!=h&&1==B.type){var I=this.state.routedPoints[p+1],B=I.x/this.scale-G.x,I=I.y/this.scale-G.y,B=B*B+I*I;null==n&&(n=new mxPoint(G.x-h.x,G.y-h.y),
+l=Math.sqrt(n.x*n.x+n.y*n.y),0<l?(n.x=n.x*e/l,n.y=n.y*e/l):n=null);B>e*e&&0<l&&(B=h.x-G.x,I=h.y-G.y,B=B*B+I*I,B>e*e&&(y=new mxPoint(G.x-n.x,G.y-n.y),B=new mxPoint(G.x+n.x,G.y+n.y),m.push(y),this.addPoints(a,m,c,d,!1,null,k),m=0>Math.round(n.x)||0==Math.round(n.x)&&0>=Math.round(n.y)?1:-1,k=!1,"sharp"==g?(a.lineTo(y.x-n.y*m,y.y+n.x*m),a.lineTo(B.x-n.y*m,B.y+n.x*m),a.lineTo(B.x,B.y)):"line"==g?(a.moveTo(y.x+n.y*m,y.y-n.x*m),a.lineTo(y.x-n.y*m,y.y+n.x*m),a.moveTo(B.x-n.y*m,B.y+n.x*m),a.lineTo(B.x+n.y*
+m,B.y-n.x*m),a.moveTo(B.x,B.y)):"arc"==g?(m*=1.3,a.curveTo(y.x-n.y*m,y.y+n.x*m,B.x-n.y*m,B.y+n.x*m,B.x,B.y)):(a.moveTo(B.x,B.y),k=!0),m=[B],y=!0))}else n=null;y||(m.push(G),h=G)}this.addPoints(a,m,c,d,!1,null,k);a.stroke()}};var k=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(a,b,c,d){return null!=b&&"centerPerimeter"==b.style[mxConstants.STYLE_PERIMETER]?new mxPoint(b.getCenterX(),b.getCenterY()):k.apply(this,arguments)};var h=mxGraphView.prototype.updateFloatingTerminalPoint;
mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)h.apply(this,arguments);else{b=this.getTerminalPort(a,b,d);var e=this.getNextPoint(a,c,d),f=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),k=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=g)var l=Math.cos(-g),m=Math.sin(-g),e=mxUtils.getRotatedPoint(e,l,m,k);l=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||
0);l+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);e=this.getPerimeterPoint(b,e,0==g&&f,l);0!=g&&(l=Math.cos(g),m=Math.sin(g),e=mxUtils.getRotatedPoint(e,l,m,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,d,e),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,d,e){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);d=c=null;if(null!=a)for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(b,
a[f]);if(null!=g){var k=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==d||k<d)c=g,d=k}}null!=c&&(e=c)}return e};var g=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,b,c){var d=g.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=c.state&&(d=c.state.view.graph.replacePlaceholders(c.state.cell,d));return d};var l=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var b=
-mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=b&&"string"===typeof b&&"stencil("==b.substring(0,8))try{var c=b.substring(8,b.length-1),d=mxUtils.parseXml(Graph.decompress(c));return new mxShape(new mxStencil(d.documentElement))}catch(u){null!=window.console&&console.log("Error in shape: "+u)}}return l.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
+mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=b&&"string"===typeof b&&"stencil("==b.substring(0,8))try{var c=b.substring(8,b.length-1),d=mxUtils.parseXml(Graph.decompress(c));return new mxShape(new mxStencil(d.documentElement))}catch(t){null!=window.console&&console.log("Error in shape: "+t)}}return l.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
mxStencilRegistry.filesLoaded={};
mxStencilRegistry.getStencil=function(a){var c=mxStencilRegistry.stencils[a];if(null==c&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var b=mxStencilRegistry.getBasenameForStencil(a);if(null!=b){c=mxStencilRegistry.libraries[b];if(null!=c){if(null==mxStencilRegistry.packages[b]){for(var e=0;e<c.length;e++){var d=c[e];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 f=mxUtils.load(d);null!=f&&200<=f.getStatus()&&299>=f.getStatus()&&eval.call(window,f.getText())}}catch(k){null!=window.console&&console.log("error in getStencil:",a,b,c,d,k)}}mxStencilRegistry.packages[b]=1}}else b=b.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+b+".xml",null);c=mxStencilRegistry.stencils[a]}}return c};
@@ -2760,15 +2763,15 @@ c=0;c<b.length;c++)null!=this.currentEdgeStyle[b[c]]&&(a+=b[c]+"="+this.currentE
b,[c[d]])}}finally{this.model.endUpdate()}};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.createCellLookup=function(a,b){b=null!=b?b:{};for(var c=0;c<a.length;c++){var d=a[c];b[mxObjectIdentity.get(d)]=
d.getId();for(var e=this.model.getChildCount(d),f=0;f<e;f++)this.createCellLookup([this.model.getChildAt(d,f)],b)}return b};Graph.prototype.createCellMapping=function(a,b,c){c=null!=c?c:{};for(var d in a){var e=b[d];null==c[e]&&(c[e]=a[d].getId()||"")}return c};Graph.prototype.importGraphModel=function(a,b,c,d){b=null!=b?b:0;c=null!=c?c:0;var e=new mxCodec(a.ownerDocument),f=new mxGraphModel;e.decode(a,f);a=[];var e={},g={},k=f.getChildren(this.cloneCell(f.root,this.isCloneInvalidEdges(),e));if(null!=
k){var h=this.createCellLookup([f.root]),k=k.slice();this.model.beginUpdate();try{if(1!=k.length||this.isCellLocked(this.getDefaultParent()))for(f=0;f<k.length;f++)l=this.model.getChildren(this.moveCells([k[f]],b,c,!1,this.model.getRoot())[0]),null!=l&&(a=a.concat(l));else{var l=f.getChildren(k[0]);null!=l&&(a=this.moveCells(l,b,c,!1,this.getDefaultParent()),g[f.getChildAt(f.root,0).getId()]=this.getDefaultParent().getId())}if(null!=a&&(this.createCellMapping(e,h,g),this.updateCustomLinks(g,a),d)){this.isGridEnabled()&&
-(b=this.snap(b),c=this.snap(c));var N=this.getBoundingBoxFromGeometry(a,!0);null!=N&&this.moveCells(a,b-N.x,c-N.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var b={},c=this.cloneCells(a,null,b),d=new mxDictionary,e=0;e<a.length;e++)d.put(a[e],!0);for(var f=new mxCodec,g=new mxGraphModel,k=g.getChildAt(g.getRoot(),0),e=0;e<c.length;e++){g.add(k,c[e]);var h=this.view.getState(a[e]);if(null!=h){var l=this.getCellGeometry(c[e]);null!=l&&l.relative&&!this.model.isEdge(a[e])&&
+(b=this.snap(b),c=this.snap(c));var L=this.getBoundingBoxFromGeometry(a,!0);null!=L&&this.moveCells(a,b-L.x,c-L.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var b={},c=this.cloneCells(a,null,b),d=new mxDictionary,e=0;e<a.length;e++)d.put(a[e],!0);for(var f=new mxCodec,g=new mxGraphModel,k=g.getChildAt(g.getRoot(),0),e=0;e<c.length;e++){g.add(k,c[e]);var h=this.view.getState(a[e]);if(null!=h){var l=this.getCellGeometry(c[e]);null!=l&&l.relative&&!this.model.isEdge(a[e])&&
null==d.get(this.model.getParent(a[e]))&&(l.offset=null,l.relative=!1,l.x=h.x/h.view.scale-h.view.translate.x,l.y=h.y/h.view.scale-h.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(b,this.createCellLookup(a)),c);return f.encode(g)};Graph.prototype.isSwimlane=function(a,b){if(null!=a&&this.model.getParent(a)!=this.model.getRoot()&&!this.model.isEdge(a)){var c=this.getCurrentCellStyle(a,b)[mxConstants.STYLE_SHAPE];return c==mxConstants.SHAPE_SWIMLANE||"table"==c}return!1};var h=Graph.prototype.isExtendParent;
Graph.prototype.isExtendParent=function(a){var b=this.model.getParent(a);if(null!=b){var c=this.getCurrentCellStyle(b);if(null!=c.expand)return"0"!=c.expand}return h.apply(this,arguments)&&(null==b||!this.isTable(b))};var g=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(a,b,c,d,e,f,k,h){null==h&&(h=this.model.getParent(a),this.isTable(h)||this.isTableRow(h))&&(h=this.getCellAt(f,k,null,!0,!1));c=null;this.model.beginUpdate();try{c=g.apply(this,[a,b,c,d,e,f,k,h]);this.model.setValue(c,
-"");var l=this.getChildCells(c,!0);for(b=0;b<l.length;b++){var N=this.getCellGeometry(l[b]);null!=N&&N.relative&&0<N.x&&this.model.remove(l[b])}var m=this.getChildCells(a,!0);for(b=0;b<m.length;b++)N=this.getCellGeometry(m[b]),null!=N&&N.relative&&0>=N.x&&this.model.remove(m[b]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[c]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[c]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[a]);this.setCellStyles(mxConstants.STYLE_STARTARROW,
-mxConstants.NONE,[a]);var n=this.model.getTerminal(c,!1);if(null!=n){var Y=this.getCurrentCellStyle(n);null!=Y&&"1"==Y.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[a]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[a]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[c]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[c]))}}finally{this.model.endUpdate()}return c};var l=Graph.prototype.selectCell;Graph.prototype.selectCell=function(a,b,c){if(b||c)l.apply(this,arguments);
+"");var l=this.getChildCells(c,!0);for(b=0;b<l.length;b++){var L=this.getCellGeometry(l[b]);null!=L&&L.relative&&0<L.x&&this.model.remove(l[b])}var m=this.getChildCells(a,!0);for(b=0;b<m.length;b++)L=this.getCellGeometry(m[b]),null!=L&&L.relative&&0>=L.x&&this.model.remove(m[b]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[c]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[c]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[a]);this.setCellStyles(mxConstants.STYLE_STARTARROW,
+mxConstants.NONE,[a]);var n=this.model.getTerminal(c,!1);if(null!=n){var Z=this.getCurrentCellStyle(n);null!=Z&&"1"==Z.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[a]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[a]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[c]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[c]))}}finally{this.model.endUpdate()}return c};var l=Graph.prototype.selectCell;Graph.prototype.selectCell=function(a,b,c){if(b||c)l.apply(this,arguments);
else{var d=this.getSelectionCell(),e=null,f=[],g=mxUtils.bind(this,function(b){if(null!=this.view.getState(b)&&(this.model.isVertex(b)||this.model.isEdge(b)))if(f.push(b),b==d)e=f.length-1;else if(a&&null==d&&0<f.length||null!=e&&a&&f.length>e||!a&&0<e)return;for(var c=0;c<this.model.getChildCount(b);c++)g(this.model.getChildAt(b,c))});g(this.model.root);0<f.length&&(e=null!=e?mxUtils.mod(e+(a?1:-1),f.length):0,this.setSelectionCell(f[e]))}};var m=Graph.prototype.moveCells;Graph.prototype.moveCells=
-function(a,b,c,d,e,f,g){g=null!=g?g:{};if(this.isTable(e)){for(var k=[],h=0;h<a.length;h++)this.isTable(a[h])?k=k.concat(this.model.getChildCells(a[h],!0).reverse()):k.push(a[h]);a=k}this.model.beginUpdate();try{k=[];for(h=0;h<a.length;h++)if(null!=e&&this.isTableRow(a[h])){var l=this.model.getParent(a[h]),N=this.getCellGeometry(a[h]);this.isTable(l)&&k.push(l);if(null!=l&&null!=N&&this.isTable(l)&&this.isTable(e)&&(d||l!=e)){if(!d){var n=this.getCellGeometry(l);null!=n&&(n=n.clone(),n.height-=N.height,
-this.model.setGeometry(l,n))}n=this.getCellGeometry(e);null!=n&&(n=n.clone(),n.height+=N.height,this.model.setGeometry(e,n));var Y=this.model.getChildCells(e,!0);if(0<Y.length){a[h]=d?this.cloneCell(a[h]):a[h];var p=this.model.getChildCells(a[h],!0),Z=this.model.getChildCells(Y[0],!0),da=Z.length-p.length;if(0<da)for(var r=0;r<da;r++){var X=this.cloneCell(p[p.length-1]);null!=X&&(X.value="",this.model.add(a[h],X))}else if(0>da)for(r=0;r>da;r--)this.model.remove(p[p.length+r-1]);p=this.model.getChildCells(a[h],
-!0);for(r=0;r<Z.length;r++){var u=this.getCellGeometry(Z[r]),t=this.getCellGeometry(p[r]);null!=u&&null!=t&&(t=t.clone(),t.width=u.width,this.model.setGeometry(p[r],t))}}}}for(var v=m.apply(this,arguments),h=0;h<k.length;h++)!d&&this.model.contains(k[h])&&0==this.model.getChildCount(k[h])&&this.model.remove(k[h]);d&&this.updateCustomLinks(this.createCellMapping(g,this.createCellLookup(a)),v)}finally{this.model.endUpdate()}return v};var n=Graph.prototype.removeCells;Graph.prototype.removeCells=function(a,
+function(a,b,c,d,e,f,g){g=null!=g?g:{};if(this.isTable(e)){for(var k=[],h=0;h<a.length;h++)this.isTable(a[h])?k=k.concat(this.model.getChildCells(a[h],!0).reverse()):k.push(a[h]);a=k}this.model.beginUpdate();try{k=[];for(h=0;h<a.length;h++)if(null!=e&&this.isTableRow(a[h])){var l=this.model.getParent(a[h]),L=this.getCellGeometry(a[h]);this.isTable(l)&&k.push(l);if(null!=l&&null!=L&&this.isTable(l)&&this.isTable(e)&&(d||l!=e)){if(!d){var n=this.getCellGeometry(l);null!=n&&(n=n.clone(),n.height-=L.height,
+this.model.setGeometry(l,n))}n=this.getCellGeometry(e);null!=n&&(n=n.clone(),n.height+=L.height,this.model.setGeometry(e,n));var Z=this.model.getChildCells(e,!0);if(0<Z.length){a[h]=d?this.cloneCell(a[h]):a[h];var V=this.model.getChildCells(a[h],!0),p=this.model.getChildCells(Z[0],!0),q=p.length-V.length;if(0<q)for(var W=0;W<q;W++){var aa=this.cloneCell(V[V.length-1]);null!=aa&&(aa.value="",this.model.add(a[h],aa))}else if(0>q)for(W=0;W>q;W--)this.model.remove(V[V.length+W-1]);V=this.model.getChildCells(a[h],
+!0);for(W=0;W<p.length;W++){var t=this.getCellGeometry(p[W]),u=this.getCellGeometry(V[W]);null!=t&&null!=u&&(u=u.clone(),u.width=t.width,this.model.setGeometry(V[W],u))}}}}for(var v=m.apply(this,arguments),h=0;h<k.length;h++)!d&&this.model.contains(k[h])&&0==this.model.getChildCount(k[h])&&this.model.remove(k[h]);d&&this.updateCustomLinks(this.createCellMapping(g,this.createCellLookup(a)),v)}finally{this.model.endUpdate()}return v};var n=Graph.prototype.removeCells;Graph.prototype.removeCells=function(a,
b){var c=[];this.model.beginUpdate();try{for(var d=0;d<a.length;d++)if(this.isTableCell(a[d])){var e=this.model.getParent(a[d]),f=this.model.getParent(e);1==this.model.getChildCount(e)&&1==this.model.getChildCount(f)?0>mxUtils.indexOf(a,f)&&0>mxUtils.indexOf(c,f)&&c.push(f):this.labelChanged(a[d],"")}else{if(this.isTableRow(a[d])&&(f=this.model.getParent(a[d]),0>mxUtils.indexOf(a,f)&&0>mxUtils.indexOf(c,f))){for(var g=this.model.getChildCells(f,!0),k=0,h=0;h<g.length;h++)0<=mxUtils.indexOf(a,g[h])&&
k++;k==g.length&&c.push(f)}c.push(a[d])}c=n.apply(this,[c,b])}finally{this.model.endUpdate()}return c};Graph.prototype.updateCustomLinks=function(a,b,c){c=null!=c?c:new Graph;for(var d=0;d<b.length;d++)null!=b[d]&&c.updateCustomLinksForCell(a,b[d],c)};Graph.prototype.updateCustomLinksForCell=function(a,b){this.doUpdateCustomLinksForCell(a,b);for(var c=this.model.getChildCount(b),d=0;d<c;d++)this.updateCustomLinksForCell(a,this.model.getChildAt(b,d))};Graph.prototype.doUpdateCustomLinksForCell=function(a,
b){};Graph.prototype.getAllConnectionConstraints=function(a,b){if(null!=a){var c=mxUtils.getValue(a.style,"points",null);if(null!=c){var d=[];try{for(var e=JSON.parse(c),c=0;c<e.length;c++){var f=e[c];d.push(new mxConnectionConstraint(new mxPoint(f[0],f[1]),2<f.length?"0"!=f[2]:!0,null,3<f.length?f[3]:0,4<f.length?f[4]:0))}}catch(Ba){}return d}if(null!=a.shape&&null!=a.shape.bounds){f=a.shape.direction;e=a.shape.bounds;c=a.shape.scale;d=e.width/c;e=e.height/c;if(f==mxConstants.DIRECTION_NORTH||f==
@@ -2776,9 +2779,9 @@ mxConstants.DIRECTION_SOUTH)f=d,d=e,e=f;c=a.shape.getConstraints(a.style,d,e);if
this.setCellStyles(mxConstants.STYLE_ELBOW,b,[a])}};Graph.prototype.isValidRoot=function(a){for(var b=this.model.getChildCount(a),c=0,d=0;d<b;d++){var e=this.model.getChildAt(a,d);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||c++)}return 0<c||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a,b,c){for(var d=this.getCurrentCellStyle(a),e=!0,f=!0,g=0;g<b.length&&f;g++)e=e&&this.isTable(b[g]),f=f&&this.isTableRow(b[g]);return("1"!=mxUtils.getValue(d,"part","0")||
this.isContainer(a))&&"0"!=mxUtils.getValue(d,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(a))&&!this.isTableRow(a)&&(!this.isTable(a)||f||e)};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var b=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(b&&null!=a&&null!=this.layoutManager){var c=this.model.getParent(a);
null!=c&&(c=this.layoutManager.getLayout(c),null!=c&&c.constructor==mxStackLayout&&(b=!1))}return b};Graph.prototype.getPreferredSizeForCell=function(a){var b=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=b&&(b.width+=10,b.height+=4,this.gridEnabled&&(b.width=this.snap(b.width),b.height=this.snap(b.height)));return b};Graph.prototype.turnShapes=function(a,b){var c=this.getModel(),d=[];c.beginUpdate();try{for(var e=0;e<a.length;e++){var f=a[e];if(c.isEdge(f)){var g=c.getTerminal(f,
-!0),k=c.getTerminal(f,!1);c.setTerminal(f,k,!0);c.setTerminal(f,g,!1);var h=c.getGeometry(f);if(null!=h){h=h.clone();null!=h.points&&h.points.reverse();var l=h.getTerminalPoint(!0),N=h.getTerminalPoint(!1);h.setTerminalPoint(l,!1);h.setTerminalPoint(N,!0);c.setGeometry(f,h);var m=this.view.getState(f),n=this.view.getState(g),p=this.view.getState(k);if(null!=m){var Y=null!=n?this.getConnectionConstraint(m,n,!0):null,r=null!=p?this.getConnectionConstraint(m,p,!1):null;this.setConnectionConstraint(f,
-g,!0,r);this.setConnectionConstraint(f,k,!1,Y);var u=mxUtils.getValue(m.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(m.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[f]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,u,[f])}d.push(f)}}else if(c.isVertex(f)&&(h=this.getCellGeometry(f),null!=h)){if(!(this.isTable(f)||this.isTableRow(f)||this.isTableCell(f)||this.isSwimlane(f))){h=h.clone();h.x+=h.width/
-2-h.height/2;h.y+=h.height/2-h.width/2;var t=h.width;h.width=h.height;h.height=t;c.setGeometry(f,h)}var v=this.view.getState(f);if(null!=v){var z=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],y=mxUtils.getValue(v.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,z[mxUtils.mod(mxUtils.indexOf(z,y)+(b?-1:1),z.length)],[f])}d.push(f)}}}finally{c.endUpdate()}return d};Graph.prototype.stencilHasPlaceholders=
+!0),k=c.getTerminal(f,!1);c.setTerminal(f,k,!0);c.setTerminal(f,g,!1);var h=c.getGeometry(f);if(null!=h){h=h.clone();null!=h.points&&h.points.reverse();var l=h.getTerminalPoint(!0),m=h.getTerminalPoint(!1);h.setTerminalPoint(l,!1);h.setTerminalPoint(m,!0);c.setGeometry(f,h);var L=this.view.getState(f),n=this.view.getState(g),Z=this.view.getState(k);if(null!=L){var p=null!=n?this.getConnectionConstraint(L,n,!0):null,q=null!=Z?this.getConnectionConstraint(L,Z,!1):null;this.setConnectionConstraint(f,
+g,!0,q);this.setConnectionConstraint(f,k,!1,p);var t=mxUtils.getValue(L.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(L.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[f]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,t,[f])}d.push(f)}}else if(c.isVertex(f)&&(h=this.getCellGeometry(f),null!=h)){if(!(this.isTable(f)||this.isTableRow(f)||this.isTableCell(f)||this.isSwimlane(f))){h=h.clone();h.x+=h.width/
+2-h.height/2;h.y+=h.height/2-h.width/2;var u=h.width;h.width=h.height;h.height=u;c.setGeometry(f,h)}var v=this.view.getState(f);if(null!=v){var y=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],w=mxUtils.getValue(v.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,y[mxUtils.mod(mxUtils.indexOf(y,w)+(b?-1:1),y.length)],[f])}d.push(f)}}}finally{c.endUpdate()}return d};Graph.prototype.stencilHasPlaceholders=
function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};var p=Graph.prototype.processChange;Graph.prototype.processChange=function(a){if(a instanceof mxGeometryChange&&(this.isTableCell(a.cell)||this.isTableRow(a.cell))&&(null==a.previous&&null!=a.geometry||null!=a.previous&&!a.previous.equals(a.geometry))){var b=a.cell;this.isTableCell(b)&&(b=this.model.getParent(b));this.isTableRow(b)&&
(b=this.model.getParent(b));var c=this.view.getState(b);null!=c&&null!=c.shape&&(this.view.invalidate(b),c.shape.bounds=null)}p.apply(this,arguments);a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value&&this.invalidateDescendantsWithPlaceholders(a.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(a){a=this.model.getDescendants(a);if(0<a.length)for(var b=0;b<a.length;b++){var c=this.view.getState(a[b]);null!=c&&null!=c.shape&&null!=c.shape.stencil&&
this.stencilHasPlaceholders(c.shape.stencil)?this.removeStateForCell(a[b]):this.isReplacePlaceholders(a[b])&&this.view.invalidate(a[b],!1,!1)}};Graph.prototype.replaceElement=function(a,b){for(var c=a.ownerDocument.createElement(null!=b?b:"span"),d=Array.prototype.slice.call(a.attributes);attr=d.pop();)c.setAttribute(attr.nodeName,attr.nodeValue);c.innerHTML=a.innerHTML;a.parentNode.replaceChild(c,a)};Graph.prototype.processElements=function(a,b){if(null!=a)for(var c=a.getElementsByTagName("*"),d=
@@ -2787,7 +2790,7 @@ try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)
f.setAttribute("label",b);b=f}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var b=new mxDictionary,c=0;c<a.length;c++)b.put(a[c],!0);for(var d=[],c=0;c<a.length;c++){var e=this.model.getParent(a[c]);null==e||b.get(e)||(b.put(e,!0),d.push(e))}for(c=0;c<d.length;c++)if(e=this.view.getState(d[c]),null!=e&&(this.model.isEdge(e.cell)||this.model.isVertex(e.cell))&&this.isCellDeletable(e.cell)&&this.isTransparentState(e)){for(var f=
!0,g=0;g<this.model.getChildCount(e.cell)&&f;g++)b.get(this.model.getChildAt(e.cell,g))||(f=!1);f&&a.push(e.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var b=[],c=0;c<a.length;c++)this.isCellDeletable(a[c])&&this.isTransparentState(this.view.getState(a[c]))&&b.push(a[c]);a=b;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,b){this.setAttributeForCell(a,"link",b)};Graph.prototype.setTooltipForCell=
function(a,b){var c="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(a.value)&&a.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(c="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(a,c,b)};Graph.prototype.getAttributeForCell=function(a,b,c){a=null!=a.value&&"object"===typeof a.value?a.value.getAttribute(b):null;return null!=a?a:c};Graph.prototype.setAttributeForCell=function(a,b,c){var d;null!=a.value&&"object"==typeof a.value?d=a.value.cloneNode(!0):(d=
-mxUtils.createXmlDocument().createElement("UserObject"),d.setAttribute("label",a.value||""));null!=c?d.setAttribute(b,c):d.removeAttribute(b);this.model.setValue(a,d)};var r=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(a,b,c,d){this.getModel();if(mxEvent.isAltDown(b))return null;for(var e=0;e<a.length;e++){var f=this.model.getParent(a[e]);if(this.model.isEdge(f)&&0>mxUtils.indexOf(a,f))return null}for(var f=r.apply(this,arguments),g=!0,e=0;e<a.length&&g;e++)g=g&&this.isTableRow(a[e]);
+mxUtils.createXmlDocument().createElement("UserObject"),d.setAttribute("label",a.value||""));null!=c?d.setAttribute(b,c):d.removeAttribute(b);this.model.setValue(a,d)};var q=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(a,b,c,d){this.getModel();if(mxEvent.isAltDown(b))return null;for(var e=0;e<a.length;e++){var f=this.model.getParent(a[e]);if(this.model.isEdge(f)&&0>mxUtils.indexOf(a,f))return null}for(var f=q.apply(this,arguments),g=!0,e=0;e<a.length&&g;e++)g=g&&this.isTableRow(a[e]);
g&&(this.isTableCell(f)&&(f=this.model.getParent(f)),this.isTableRow(f)&&(f=this.model.getParent(f)),this.isTable(f)||(f=null));return f};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,b){this.isEnabled()&&(b=this.insertTextForEvent(a,b),mxGraph.prototype.dblClick.call(this,a,b))};Graph.prototype.insertTextForEvent=function(a,b){var c=mxUtils.convertPoint(this.container,
mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(b)){var d=this.model.isEdge(b)?this.view.getState(b):null,e=mxEvent.getSource(a);this.firstClickState!=d||this.firstClickSource!=e||null!=d&&null!=d.text&&null!=d.text.node&&null!=d.text.boundingBox&&(mxUtils.contains(d.text.boundingBox,c.x,c.y)||mxUtils.isAncestorNode(d.text.node,mxEvent.getSource(a)))||(null!=d||this.isCellLocked(this.getDefaultParent()))&&(null==d||this.isCellLocked(d.cell))||!(null!=d||mxClient.IS_SVG&&
e==this.view.getCanvas().ownerSVGElement)||(null==d&&(d=this.view.getState(this.getCellAt(c.x,c.y))),b=this.addText(c.x,c.y,d))}return b};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),b=this.container.scrollLeft/this.view.scale-this.view.translate.x,c=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var d=this.getPageLayout(),e=this.getPageSize(),b=Math.max(b,d.x*e.width),c=Math.max(c,d.y*e.height);return new mxPoint(this.snap(b+a),this.snap(c+
@@ -2802,19 +2805,19 @@ c&&"a"!=c.nodeName.toLowerCase();)c=c.parentNode;null!=c?this.clear():(null!=g.t
g.container.scrollLeft)<f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&(null==d.sourceState||!d.isSource(d.sourceState.control))&&((mxEvent.isLeftMouseButton(k)||mxEvent.isMiddleMouseButton(k))&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))&&(null!=this.currentLink?(e=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&e||null==b||b(k,this.currentLink),mxEvent.isConsumed(k)||(k=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(k)?"_blank":
e?g.linkTarget:"_top",g.openLink(this.currentLink,k),d.consume())):null!=c&&!d.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&Math.abs(this.startX-d.getGraphX())<f&&Math.abs(this.startY-d.getGraphY())<f&&c(d.getEvent()));this.clear()},activate:function(a){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(this.currentTarget=g.getLinkTargetForCell(a.cell),g.container.style.cursor="pointer",null!=
this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=e);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(k);mxEvent.addListener(document,"mouseleave",function(a){k.clear()})};Graph.prototype.duplicateCells=function(a,b){a=null!=a?a:this.getSelectionCells();b=null!=b?b:!0;for(var c=0;c<a.length;c++)this.isTableCell(a[c])&&
-(a[c]=this.model.getParent(a[c]));a=this.model.getTopmostCells(a);var d=this.getModel(),e=this.gridSize,f=[];d.beginUpdate();try{for(var g={},k=this.createCellLookup(a),h=this.cloneCells(a,!1,g,!0),c=0;c<a.length;c++){var l=d.getParent(a[c]);if(null!=l){var m=this.moveCells([h[c]],e,e,!1)[0];f.push(m);if(b)d.add(l,h[c]);else{var n=l.getIndex(a[c]);d.add(l,h[c],n+1)}if(this.isTable(l)){var N=this.getCellGeometry(h[c]),p=this.getCellGeometry(l);null!=N&&null!=p&&(p=p.clone(),p.height+=N.height,d.setGeometry(l,
+(a[c]=this.model.getParent(a[c]));a=this.model.getTopmostCells(a);var d=this.getModel(),e=this.gridSize,f=[];d.beginUpdate();try{for(var g={},k=this.createCellLookup(a),h=this.cloneCells(a,!1,g,!0),c=0;c<a.length;c++){var l=d.getParent(a[c]);if(null!=l){var m=this.moveCells([h[c]],e,e,!1)[0];f.push(m);if(b)d.add(l,h[c]);else{var n=l.getIndex(a[c]);d.add(l,h[c],n+1)}if(this.isTable(l)){var L=this.getCellGeometry(h[c]),p=this.getCellGeometry(l);null!=L&&null!=p&&(p=p.clone(),p.height+=L.height,d.setGeometry(l,
p))}}else f.push(h[c])}this.updateCustomLinks(this.createCellMapping(g,k),h,this)}finally{d.endUpdate()}return f};Graph.prototype.insertImage=function(a,b,c){if(null!=a&&null!=this.cellEditor.textarea){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),e=[],f=0;f<d.length;f++)e.push(d[f]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==e.length+1)for(f=a.length-1;0<=f;f--)if(0==f||a[f]!=e[f-1]){a[f].setAttribute("width",b);a[f].setAttribute("height",
c);break}}};Graph.prototype.insertLink=function(a){if(null!=this.cellEditor.textarea)if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var b=this.cellEditor.textarea.getElementsByTagName("a"),c=[],d=0;d<b.length;d++)c.push(b[d]);document.execCommand("createlink",!1,mxUtils.trim(a));b=this.cellEditor.textarea.getElementsByTagName("a");if(b.length==c.length+1)for(d=b.length-1;0<=d;d--)if(b[d]!=c[d-1]){for(b=b[d].getElementsByTagName("a");0<b.length;){for(c=b[0].parentNode;null!=
b[0].firstChild;)c.insertBefore(b[0].firstChild,b[0]);c.removeChild(b[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var b=mxGraph.prototype.isCellResizable.apply(this,arguments),c=this.getCurrentCellStyle(a);return!this.isTableCell(a)&&!this.isTableRow(a)&&(b||"0"!=mxUtils.getValue(c,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==c[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(a,b){null==b&&(b=this.getSelectionCells());
if(null!=b&&1<b.length){for(var c=[],d=null,e=null,f=0;f<b.length;f++)if(this.getModel().isVertex(b[f])){var g=this.view.getState(b[f]);if(null!=g){var k=a?g.getCenterX():g.getCenterY(),d=null!=d?Math.max(d,k):k,e=null!=e?Math.min(e,k):k;c.push(g)}}if(2<c.length){c.sort(function(b,c){return a?b.x-c.x:b.y-c.y});g=this.view.translate;k=this.view.scale;e=e/k-(a?g.x:g.y);d=d/k-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var h=(d-e)/(c.length-1),d=e,f=1;f<c.length-1;f++){var l=this.view.getState(this.model.getParent(c[f].cell)),
m=this.getCellGeometry(c[f].cell),d=d+h;null!=m&&null!=l&&(m=m.clone(),a?m.x=Math.round(d-m.width/2)-l.origin.x:m.y=Math.round(d-m.height/2)-l.origin.y,this.getModel().setGeometry(c[f].cell,m))}}finally{this.getModel().endUpdate()}}}return b};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});
-return a};Graph.prototype.parseBackgroundImage=function(a){var b=null;null!=a&&0<a.length&&(a=JSON.parse(a),b=new mxImage(a.src,a.width,a.height));return b};Graph.prototype.getBackgroundImageObject=function(a){return a};Graph.prototype.getSvg=function(a,b,c,d,e,f,g,k,h,l,m,n,p,r){var N=null;if(null!=r)for(N=new mxDictionary,m=0;m<r.length;m++)N.put(r[m],!0);if(r=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{b=null!=b?b:1;c=null!=c?c:0;e=null!=e?e:!0;
-f=null!=f?f:!0;g=null!=g?g:!0;var Y="page"==p?this.view.getBackgroundPageBounds():f&&null==N||d||"diagram"==p?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Z=this.view.scale;"diagram"==p&&null!=this.backgroundImage&&Y.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*Z,(this.view.translate.y+this.backgroundImage.y)*Z,this.backgroundImage.width*Z,this.backgroundImage.height*Z));if(null==Y)throw Error(mxResources.get("drawingEmpty"));var u=mxUtils.createXmlDocument(),
-t=null!=u.createElementNS?u.createElementNS(mxConstants.NS_SVG,"svg"):u.createElement("svg");null!=a&&(null!=t.style?t.style.backgroundColor=a:t.setAttribute("style","background-color:"+a));null==u.createElementNS?(t.setAttribute("xmlns",mxConstants.NS_SVG),t.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):t.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/Z;var v=Math.max(1,Math.ceil(Y.width*a)+2*c)+(l?5:0),z=Math.max(1,Math.ceil(Y.height*a)+2*c)+(l?5:0);t.setAttribute("version",
-"1.1");t.setAttribute("width",v+"px");t.setAttribute("height",z+"px");t.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+v+" "+z);u.appendChild(t);var da=null!=u.createElementNS?u.createElementNS(mxConstants.NS_SVG,"g"):u.createElement("g");t.appendChild(da);var X=this.createSvgCanvas(da);X.foOffset=e?-.5:0;X.textOffset=e?-.5:0;X.imageOffset=e?-.5:0;X.translate(Math.floor(c/b-Y.x/Z),Math.floor(c/b-Y.y/Z));var y=document.createElement("div"),A=X.getAlternateText;X.getAlternateText=function(a,b,c,d,
-e,f,g,k,h,l,m,q,w){if(null!=f&&0<this.state.fontSize)try{mxUtils.isNode(f)?f=f.innerText:(y.innerHTML=f,f=mxUtils.extractTextWithWhitespace(y.childNodes));for(var C=Math.ceil(2*d/this.state.fontSize),D=[],I=0,Aa=0;(0==C||I<C)&&Aa<f.length;){var Ra=f.charCodeAt(Aa);if(10==Ra||13==Ra){if(0<I)break}else D.push(f.charAt(Aa)),255>Ra&&I++;Aa++}D.length<f.length&&1<f.length-D.length&&(f=mxUtils.trim(D.join(""))+"...");return f}catch(db){return A.apply(this,arguments)}else return A.apply(this,arguments)};
-var H=this.backgroundImage;if(null!=H){b=Z/b;var T=this.view.translate,x=new mxRectangle((H.x+T.x)*b,(H.y+T.y)*b,H.width*b,H.height*b);mxUtils.intersects(Y,x)&&X.image(H.x+T.x,H.y+T.y,H.width,H.height,H.src,!0)}X.scale(a);X.textEnabled=g;k=null!=k?k:this.createSvgImageExport();var B=k.drawCellState,F=k.getLinkForCellState;k.getLinkForCellState=function(a,b){var c=F.apply(this,arguments);return null==c||a.view.graph.isCustomLink(c)?null:c};k.getLinkTargetForCellState=function(a,b){return a.view.graph.getLinkTargetForCell(a.cell)};
-k.drawCellState=function(a,b){for(var c=a.view.graph,d=null!=N?N.get(a.cell):c.isCellSelected(a.cell),e=c.model.getParent(a.cell);!(f&&null==N||d)&&null!=e;)d=null!=N?N.get(e):c.isCellSelected(e),e=c.model.getParent(e);(f&&null==N||d)&&B.apply(this,arguments)};k.drawState(this.getView().getState(this.model.root),X);this.updateSvgLinks(t,h,!0);this.addForeignObjectWarning(X,t);return t}finally{r&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=
+return a};Graph.prototype.parseBackgroundImage=function(a){var b=null;null!=a&&0<a.length&&(a=JSON.parse(a),b=new mxImage(a.src,a.width,a.height));return b};Graph.prototype.getBackgroundImageObject=function(a){return a};Graph.prototype.getSvg=function(a,b,c,d,e,f,g,k,h,l,m,n,p,q){var L=null;if(null!=q)for(L=new mxDictionary,m=0;m<q.length;m++)L.put(q[m],!0);if(q=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{b=null!=b?b:1;c=null!=c?c:0;e=null!=e?e:!0;
+f=null!=f?f:!0;g=null!=g?g:!0;var Z="page"==p?this.view.getBackgroundPageBounds():f&&null==L||d||"diagram"==p?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),V=this.view.scale;"diagram"==p&&null!=this.backgroundImage&&Z.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*V,(this.view.translate.y+this.backgroundImage.y)*V,this.backgroundImage.width*V,this.backgroundImage.height*V));if(null==Z)throw Error(mxResources.get("drawingEmpty"));var t=mxUtils.createXmlDocument(),
+u=null!=t.createElementNS?t.createElementNS(mxConstants.NS_SVG,"svg"):t.createElement("svg");null!=a&&(null!=u.style?u.style.backgroundColor=a:u.setAttribute("style","background-color:"+a));null==t.createElementNS?(u.setAttribute("xmlns",mxConstants.NS_SVG),u.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):u.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/V;var v=Math.max(1,Math.ceil(Z.width*a)+2*c)+(l?5:0),W=Math.max(1,Math.ceil(Z.height*a)+2*c)+(l?5:0);u.setAttribute("version",
+"1.1");u.setAttribute("width",v+"px");u.setAttribute("height",W+"px");u.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+v+" "+W);t.appendChild(u);var y=null!=t.createElementNS?t.createElementNS(mxConstants.NS_SVG,"g"):t.createElement("g");u.appendChild(y);var aa=this.createSvgCanvas(y);aa.foOffset=e?-.5:0;aa.textOffset=e?-.5:0;aa.imageOffset=e?-.5:0;aa.translate(Math.floor(c/b-Z.x/V),Math.floor(c/b-Z.y/V));var w=document.createElement("div"),B=aa.getAlternateText;aa.getAlternateText=function(a,b,
+c,d,e,f,g,k,h,l,m,r,D){if(null!=f&&0<this.state.fontSize)try{mxUtils.isNode(f)?f=f.innerText:(w.innerHTML=f,f=mxUtils.extractTextWithWhitespace(w.childNodes));for(var C=Math.ceil(2*d/this.state.fontSize),z=[],F=0,Aa=0;(0==C||F<C)&&Aa<f.length;){var Ra=f.charCodeAt(Aa);if(10==Ra||13==Ra){if(0<F)break}else z.push(f.charAt(Aa)),255>Ra&&F++;Aa++}z.length<f.length&&1<f.length-z.length&&(f=mxUtils.trim(z.join(""))+"...");return f}catch(db){return B.apply(this,arguments)}else return B.apply(this,arguments)};
+var A=this.backgroundImage;if(null!=A){b=V/b;var T=this.view.translate,I=new mxRectangle((A.x+T.x)*b,(A.y+T.y)*b,A.width*b,A.height*b);mxUtils.intersects(Z,I)&&aa.image(A.x+T.x,A.y+T.y,A.width,A.height,A.src,!0)}aa.scale(a);aa.textEnabled=g;k=null!=k?k:this.createSvgImageExport();var x=k.drawCellState,G=k.getLinkForCellState;k.getLinkForCellState=function(a,b){var c=G.apply(this,arguments);return null==c||a.view.graph.isCustomLink(c)?null:c};k.getLinkTargetForCellState=function(a,b){return a.view.graph.getLinkTargetForCell(a.cell)};
+k.drawCellState=function(a,b){for(var c=a.view.graph,d=null!=L?L.get(a.cell):c.isCellSelected(a.cell),e=c.model.getParent(a.cell);!(f&&null==L||d)&&null!=e;)d=null!=L?L.get(e):c.isCellSelected(e),e=c.model.getParent(e);(f&&null==L||d)&&x.apply(this,arguments)};k.drawState(this.getView().getState(this.model.root),aa);this.updateSvgLinks(u,h,!0);this.addForeignObjectWarning(aa,u);return u}finally{q&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=
function(a,b){if("0"!=urlParams["svg-warning"]&&0<b.getElementsByTagName("foreignObject").length){var c=a.createElement("switch"),d=a.createElement("g");d.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var e=a.createElement("a");e.setAttribute("transform","translate(0,-5)");null==e.setAttributeNS||b.ownerDocument!=document&&null==document.documentMode?(e.setAttribute("xlink:href",Graph.foreignObjectWarningLink),e.setAttribute("target","_blank")):(e.setAttributeNS(mxConstants.NS_XLINK,
"xlink:href",Graph.foreignObjectWarningLink),e.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var f=a.createElement("text");f.setAttribute("text-anchor","middle");f.setAttribute("font-size","10px");f.setAttribute("x","50%");f.setAttribute("y","100%");mxUtils.write(f,Graph.foreignObjectWarningText);c.appendChild(d);e.appendChild(f);c.appendChild(e);b.appendChild(c)}};Graph.prototype.updateSvgLinks=function(a,b,c){a=a.getElementsByTagName("a");for(var d=0;d<a.length;d++)if(null==a[d].getAttribute("target")){var e=
a[d].getAttribute("href");null==e&&(e=a[d].getAttribute("xlink:href"));null!=e&&(null!=b&&/^https?:\/\//.test(e)?a[d].setAttribute("target",b):c&&this.isCustomLink(e)&&a[d].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=!0;return a};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&
@@ -2836,10 +2839,10 @@ e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTr
function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var a="";window.getSelection?a=window.getSelection():document.getSelection?a=document.getSelection():document.selection&&(a=document.selection.createRange().text);return""!=a};mxCellEditor.prototype.insertTab=function(a){var b=
this.textarea.ownerDocument.defaultView.getSelection(),c=b.getRangeAt(0),d="\t";if(null!=a)for(d="";0<a;)d+=" ",a--;a=document.createElement("span");a.style.whiteSpace="pre";a.appendChild(document.createTextNode(d));c.insertNode(a);c.setStartAfter(a);c.setEndAfter(a);b.removeAllRanges();b.addRange(c)};mxCellEditor.prototype.alignText=function(a,b){var c=null!=b&&mxEvent.isShiftDown(b);if(c||null!=window.getSelection&&null!=window.getSelection().containsNode){var d=!0;this.graph.processElements(this.textarea,
function(a){c||window.getSelection().containsNode(a,!0)?(a.removeAttribute("align"),a.style.textAlign=null):d=!1});d&&this.graph.cellEditor.setAlign(a)}document.execCommand("justify"+a.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var b=[],c=0,d=a.rangeCount;c<d;++c)b.push(a.getRangeAt(c));return b}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();
-return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(da){}};var u=mxCellRenderer.prototype.postConfigureShape;mxCellRenderer.prototype.postConfigureShape=function(a){var b=Editor.isDarkMode()?"#ffffff":"#000000",c=a.view.graph.defaultPageBackgroundColor;this.resolveDefaultColor(a,"fill",a.shape,c);this.resolveDefaultColor(a,
-"stroke",a.shape,b);this.resolveDefaultColor(a,"laneFill",a.shape,c);this.resolveDefaultColor(a,"imageBackground",a.shape,c);this.resolveDefaultColor(a,"imageBorder",a.shape,b);this.resolveDefaultColor(a,"background",a.text,c);this.resolveDefaultColor(a,"color",a.text,b);u.apply(this,arguments)};mxCellRenderer.prototype.resolveDefaultColor=function(a,b,c,d){null!=c&&"default"==c[b]&&(c[b]=d)};var t=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=
-a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));t.apply(this,arguments)};var v=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?v.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var y=mxCellEditor.prototype.startEditing;
-mxCellEditor.prototype.startEditing=function(a,b){a=this.graph.getStartEditingCell(a,b);y.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);if(this.graph.getModel().isEdge(c)&&null!=d&&d.relative||this.graph.getModel().isEdge(a))this.textarea.style.outline=
+return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(W){}};var t=mxCellRenderer.prototype.postConfigureShape;mxCellRenderer.prototype.postConfigureShape=function(a){var b=Editor.isDarkMode()?"#ffffff":"#000000",c=a.view.graph.defaultPageBackgroundColor;this.resolveDefaultColor(a,"fill",a.shape,c);this.resolveDefaultColor(a,
+"stroke",a.shape,b);this.resolveDefaultColor(a,"laneFill",a.shape,c);this.resolveDefaultColor(a,"imageBackground",a.shape,c);this.resolveDefaultColor(a,"imageBorder",a.shape,b);this.resolveDefaultColor(a,"background",a.text,c);this.resolveDefaultColor(a,"color",a.text,b);t.apply(this,arguments)};mxCellRenderer.prototype.resolveDefaultColor=function(a,b,c,d){null!=c&&"default"==c[b]&&(c[b]=d)};var v=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=
+a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));v.apply(this,arguments)};var u=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?u.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var w=mxCellEditor.prototype.startEditing;
+mxCellEditor.prototype.startEditing=function(a,b){a=this.graph.getStartEditingCell(a,b);w.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);if(this.graph.getModel().isEdge(c)&&null!=d&&d.relative||this.graph.getModel().isEdge(a))this.textarea.style.outline=
mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var x=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else for(a=a.firstChild,b=b.firstChild;null!=a;){var e=a.nextSibling;null==b?d(a):(c(a,b),b=b.nextSibling);a=e}}function d(a){for(var b=
a.firstChild;null!=b;){var c=b.nextSibling;d(b);b=c}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}x.apply(this,arguments);
7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var d=b(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?c(this.textarea,d):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell);
@@ -2848,82 +2851,98 @@ mxConstants.DEFAULT_FONTFAMILY),e=mxUtils.getValue(a.style,mxConstants.STYLE_ALI
0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&k.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=k.join(" ");this.textarea.style.fontWeight=f?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=e;this.textarea.style.padding=
"0px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var h=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(h=mxUtils.replaceTrailingNewlines(h,"<div><br></div>"));h=this.graph.sanitizeHtml(b?
h.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):h,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;
-this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()}};var B=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=
+this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()}};var A=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=
a){var c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*c;this.bounds.height=60*c;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=d.x*this.bounds.width;this.bounds.y+=d.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-
4)/c)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/c)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/c)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*c);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/c)+(this.textarea.offsetWidth-this.textarea.clientWidth)+
-"px",this.bounds.width=parseInt(this.textarea.style.width)*c);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+c+","+c+")")}else this.textarea.style.height="",this.textarea.style.overflow="",B.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,b){if("0"==mxUtils.getValue(a.style,"html",
+"px",this.bounds.width=parseInt(this.textarea.style.width)*c);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+c+","+c+")")}else this.textarea.style.height="",this.textarea.style.overflow="",A.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,b){if("0"==mxUtils.getValue(a.style,"html",
"0"))return mxCellEditorGetInitialValue.apply(this,arguments);var c=this.graph.getEditingValue(a.cell,b);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"<br/>"));return c=this.graph.sanitizeHtml(c,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var b=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return b=
-"1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var E=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();E.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(N){}};var G=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();
-try{G.apply(this,arguments),""==b&&this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)&&this.graph.isTransparentState(a)&&this.graph.removeCells([a.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=b&&b!=mxConstants.NONE||!(null!=a.cell.geometry&&0<a.cell.geometry.width)||0==mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0)&&0!=
+"1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var E=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();E.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(L){}};var H=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();
+try{H.apply(this,arguments),""==b&&this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)&&this.graph.isTransparentState(a)&&this.graph.removeCells([a.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=b&&b!=mxConstants.NONE||!(null!=a.cell.geometry&&0<a.cell.geometry.width)||0==mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0)&&0!=
mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)||(b=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null));b==mxConstants.NONE&&(b=null);return b};mxCellEditor.prototype.getMinimumSize=function(a){var b=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*b+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(a,b){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&
!mxEvent.isAltDown(b.getEvent)};mxGraphView.prototype.formatUnitText=function(a){return a?c(a,this.unit):a};mxGraphHandler.prototype.updateHint=function(b){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var d=this.graph.view.translate,e=this.graph.view.scale;b=this.roundLength((this.bounds.x+this.currentDx)/e-d.x);d=this.roundLength((this.bounds.y+this.currentDy)/e-d.y);e=this.graph.view.unit;this.hint.innerHTML=
-c(b,e)+", "+c(d,e);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var A=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(a,b){A.apply(this,arguments);var c=this.graph.getCellStyle(a);if(null==
-c.childLayout){var d=this.graph.model.getParent(a),e=null!=d?this.graph.getCellGeometry(d):null;if(null!=e&&(c=this.graph.getCellStyle(d),"stackLayout"==c.childLayout)){var f=parseFloat(mxUtils.getValue(c,"stackBorder",mxStackLayout.prototype.border)),c="1"==mxUtils.getValue(c,"horizontalStack","1"),g=this.graph.getActualStartSize(d),e=e.clone();c?e.height=b.height+g.y+g.height+2*f:e.width=b.width+g.x+g.width+2*f;this.graph.model.setGeometry(d,e)}}};var F=mxSelectionCellsHandler.prototype.getHandledSelectionCells;
-mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function a(a){c.get(a)||(c.put(a,!0),e.push(a))}for(var b=F.apply(this,arguments),c=new mxDictionary,d=this.graph.model,e=[],f=0;f<b.length;f++){var g=b[f];this.graph.isTableCell(g)?a(d.getParent(d.getParent(g))):this.graph.isTableRow(g)&&a(d.getParent(g));a(g)}return e};var z=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(a){var b=z.apply(this,arguments);b.stroke=
-"#C0C0C0";b.strokewidth=1;return b};var H=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(a){var b=H.apply(this,arguments);b.stroke="#C0C0C0";b.strokewidth=1;return b};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var a=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+a.x/2,this.bounds.y+this.rotationHandleVSpacing-
+c(b,e)+", "+c(d,e);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var B=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(a,b){B.apply(this,arguments);var c=this.graph.getCellStyle(a);if(null==
+c.childLayout){var d=this.graph.model.getParent(a),e=null!=d?this.graph.getCellGeometry(d):null;if(null!=e&&(c=this.graph.getCellStyle(d),"stackLayout"==c.childLayout)){var f=parseFloat(mxUtils.getValue(c,"stackBorder",mxStackLayout.prototype.border)),c="1"==mxUtils.getValue(c,"horizontalStack","1"),g=this.graph.getActualStartSize(d),e=e.clone();c?e.height=b.height+g.y+g.height+2*f:e.width=b.width+g.x+g.width+2*f;this.graph.model.setGeometry(d,e)}}};var G=mxSelectionCellsHandler.prototype.getHandledSelectionCells;
+mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function a(a){c.get(a)||(c.put(a,!0),e.push(a))}for(var b=G.apply(this,arguments),c=new mxDictionary,d=this.graph.model,e=[],f=0;f<b.length;f++){var g=b[f];this.graph.isTableCell(g)?a(d.getParent(d.getParent(g))):this.graph.isTableRow(g)&&a(d.getParent(g));a(g)}return e};var y=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(a){var b=y.apply(this,arguments);b.stroke=
+"#C0C0C0";b.strokewidth=1;return b};var I=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(a){var b=I.apply(this,arguments);b.stroke="#C0C0C0";b.strokewidth=1;return b};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var a=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+a.x/2,this.bounds.y+this.rotationHandleVSpacing-
a.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(a,b){return this.graph.isRecursiveVertexResize(a)&&!mxEvent.isControlDown(b.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(a,b){return!(!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(b.getEvent())||mxEvent.isMetaDown(b.getEvent())};
-var K=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return K.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var L=mxVertexHandler.prototype.isParentHighlightVisible;
-mxVertexHandler.prototype.isParentHighlightVisible=function(){return L.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var O=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(a){return a.tableHandle||O.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var a=0;this.graph.isTableRow(this.state.cell)?
+var K=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return K.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var M=mxVertexHandler.prototype.isParentHighlightVisible;
+mxVertexHandler.prototype.isParentHighlightVisible=function(){return M.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var O=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(a){return a.tableHandle||O.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var a=0;this.graph.isTableRow(this.state.cell)?
a=1:this.graph.isTableCell(this.state.cell)&&(a=2);return a};var J=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return J.apply(this,arguments).grow(-this.getSelectionBorderInset())};var U=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=U.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var b=this.graph,c=b.model,d=this.state,e=this.selectionBorder,f=this;null==
-a&&(a=[]);var g=b.view.getCellStates(c.getChildCells(this.state.cell,!0));if(0<g.length){for(var k=b.view.getCellStates(c.getChildCells(g[0].cell,!0)),c=0;c<k.length;c++)mxUtils.bind(this,function(c){var g=k[c],h=c<k.length-1?k[c+1]:null,l=new mxLine(new mxRectangle,mxConstants.NONE,1,!0);l.isDashed=e.isDashed;l.svgStrokeTolerance++;l=new mxHandle(g,"col-resize",null,l);l.tableHandle=!0;var m=0;l.shape.node.parentNode.insertBefore(l.shape.node,l.shape.node.parentNode.firstChild);l.redraw=function(){if(null!=
-this.shape&&null!=this.state.shape){var a=b.getActualStartSize(d.cell);this.shape.stroke=0==m?mxConstants.NONE:e.stroke;this.shape.bounds.x=this.state.x+this.state.width+m*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=d.y+(c==k.length-1?0:a.y*this.graph.view.scale);this.shape.bounds.height=d.height-(c==k.length-1?0:(a.height+a.y)*this.graph.view.scale);this.shape.redraw()}};var n=!1;l.setPosition=function(a,c,d){m=Math.max(Graph.minTableColumnWidth-a.width,c.x-a.x-a.width);n=
-mxEvent.isShiftDown(d.getEvent());null==h||n||(m=Math.min((h.x+h.width-g.x-g.width)/b.view.scale-Graph.minTableColumnWidth,m))};l.execute=function(a){if(0!=m)b.setTableColumnWidth(this.state.cell,m,n);else if(!f.blockDelayedSelection){var c=b.getCellAt(a.getGraphX(),a.getGraphY())||d.cell;b.graphHandler.selectCellForEvent(c,a)}m=0};l.reset=function(){m=0};a.push(l)})(c);for(c=0;c<g.length;c++)mxUtils.bind(this,function(c){c=g[c];var k=new mxLine(new mxRectangle,mxConstants.NONE,1);k.isDashed=e.isDashed;
-k.svgStrokeTolerance++;c=new mxHandle(c,"row-resize",null,k);c.tableHandle=!0;var h=0;c.shape.node.parentNode.insertBefore(c.shape.node,c.shape.node.parentNode.firstChild);c.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.stroke=0==h?mxConstants.NONE:e.stroke,this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+h*this.graph.view.scale,this.shape.bounds.height=1,this.shape.redraw())};c.setPosition=function(a,
-b,c){h=Math.max(Graph.minTableRowHeight-a.height,b.y-a.y-a.height)};c.execute=function(a){if(0!=h)b.setTableRowHeight(this.state.cell,h,!mxEvent.isShiftDown(a.getEvent()));else if(!f.blockDelayedSelection){var c=b.getCellAt(a.getGraphX(),a.getGraphY())||d.cell;b.graphHandler.selectCellForEvent(c,a)}h=0};c.reset=function(){h=0};a.push(c)})(c)}}return null!=a?a.reverse():null};var aa=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){aa.apply(this,arguments);
-if(null!=this.moveHandles)for(var b=0;b<this.moveHandles.length;b++)this.moveHandles[b].style.visibility=a?"":"hidden";if(null!=this.cornerHandles)for(b=0;b<this.cornerHandles.length;b++)this.cornerHandles[b].node.style.visibility=a?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var a=this.graph.model;if(null!=this.moveHandles){for(var b=0;b<this.moveHandles.length;b++)this.moveHandles[b].parentNode.removeChild(this.moveHandles[b]);this.moveHandles=null}this.moveHandles=[];for(b=
-0;b<a.getChildCount(this.state.cell);b++)mxUtils.bind(this,function(b){if(null!=b&&a.isVertex(b.cell)){var c=mxUtils.createImage(Editor.rowMoveImage);c.style.position="absolute";c.style.cursor="pointer";c.style.width="7px";c.style.height="4px";c.style.padding="4px 2px 4px 2px";c.rowState=b;mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(a)&&this.graph.isCellSelected(b.cell)||this.graph.selectCellForEvent(b.cell,
-a);mxEvent.isPopupTrigger(a)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0);mxEvent.consume(a)}),null,mxUtils.bind(this,function(a){mxEvent.isPopupTrigger(a)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(a),mxEvent.getClientY(a),b.cell,a),mxEvent.consume(a))}));this.moveHandles.push(c);this.graph.container.appendChild(c)}})(this.graph.view.getState(a.getChildAt(this.state.cell,
-b)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var a=0;a<this.customHandles.length;a++)this.customHandles[a].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var ba=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),b=this.tolerance,c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&mxStencilRegistry.getStencil(c);
-c=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!c&&null!=this.customHandles)for(var d=0;d<this.customHandles.length;d++)if(null!=this.customHandles[d].shape&&null!=this.customHandles[d].shape.bounds){var e=this.customHandles[d].shape.bounds,f=e.getCenterX(),g=e.getCenterY();if(Math.abs(this.state.x-f)<e.width/2||Math.abs(this.state.y-g)<e.height/2||Math.abs(this.state.x+this.state.width-f)<e.width/2||Math.abs(this.state.y+this.state.height-g)<e.height/
-2){c=!0;break}}c&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(b/=2,this.graph.isTable(this.state.cell)&&(b+=7),a.x=this.sizers[0].bounds.width+b,a.y=this.sizers[0].bounds.height+b):a=ba.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(b){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{b=
-this.state.view.scale;var d=this.state.view.unit;this.hint.innerHTML=c(this.roundLength(this.bounds.width/b),d)+" x "+c(this.roundLength(this.bounds.height/b),d)}b=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==b&&(b=this.bounds);this.hint.style.left=b.x+Math.round((b.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=b.y+b.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};
-mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var R=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(a,b){R.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var Q=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=
-function(a,b){Q.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(b,d){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var e=this.graph.view.translate,f=this.graph.view.scale,g=this.roundLength(d.x/f-e.x),e=this.roundLength(d.y/f-e.y),f=this.graph.view.unit;this.hint.innerHTML=c(g,f)+", "+c(e,f);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=
-this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(g=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*g.x)+"%, "+Math.round(100*g.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(b.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(b.getGraphY(),d.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=
-mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=
-mxClient.IS_SVG?Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22" stroke-width="1"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>'):new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>'):new mxImage(IMAGE_PATH+"/handle-terminal.png",
-17,17);HoverIcons.prototype.rotationHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>',
-24,24):new mxImage(IMAGE_PATH+"/handle-rotate.png",16,16);mxClient.IS_SVG&&(mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="'+HoverIcons.prototype.arrowFill+'"/>'));mxVertexHandler.TABLE_HANDLE_COLOR="#fca000";mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxEdgeHandler.prototype.terminalHandleImage=
-HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,
-Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxClient.IS_SVG||((new Image).src=HoverIcons.prototype.mainHandle.src,(new Image).src=HoverIcons.prototype.fixedHandle.src,(new Image).src=HoverIcons.prototype.terminalHandle.src,(new Image).src=HoverIcons.prototype.secondaryHandle.src,(new Image).src=HoverIcons.prototype.rotationHandle.src,(new Image).src=HoverIcons.prototype.triangleUp.src,(new Image).src=HoverIcons.prototype.triangleRight.src,
-(new Image).src=HoverIcons.prototype.triangleDown.src,(new Image).src=HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=
-!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=
-function(a){return!mxEvent.isShiftDown(a.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=
-function(a){var b=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(b)||mxEvent.isPopupTrigger(b)&&(null==a.getState()||mxEvent.isControlDown(b)||mxEvent.isShiftDown(b))};var P=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,b){P.apply(this,arguments);mxEvent.isTouchEvent(b.getEvent())&&this.graph.isCellSelected(b.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var b=
-a.getEvent();return mxEvent.isLeftMouseButton(b)&&(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b))||this.usePopupTrigger&&mxEvent.isPopupTrigger(b)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&
-(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(a,b){if(this.cancelled)this.cancelled=!1,b.consume();else{var c=null!=this.div&&"none"!=this.div.style.display,d=null,e=null,f=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(d=this.first.x,e=this.first.y,f=(this.currentX-d)/this.graph.view.scale,g=(this.currentY-e)/this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(f=this.graph.snap(f),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(f)<
-this.graph.tolerance&&(f=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(c){if(mxEvent.isAltDown(b.getEvent())&&this.graph.isToggleEvent(b.getEvent())){var f=new mxRectangle(this.x,this.y,this.width,this.height),k=this.graph.getCells(f.x,f.y,f.width,f.height);this.graph.removeSelectionCells(k)}else if(this.isSpaceEvent(b)){this.graph.model.beginUpdate();try{for(k=this.graph.getCellsBeyond(d,e,this.graph.getDefaultParent(),!0,!0),c=0;c<k.length;c++)if(this.graph.isCellMovable(k[c])){var h=
-this.graph.view.getState(k[c]),l=this.graph.getCellGeometry(k[c]);null!=h&&null!=l&&(l=l.clone(),l.translate(f,g),this.graph.model.setGeometry(k[c],l))}}finally{this.graph.model.endUpdate()}}else f=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(f,b.getEvent());b.consume()}}};mxRubberband.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&null!=this.first){var c=mxUtils.getScrollOrigin(this.graph.container),d=mxUtils.getOffset(this.graph.container);c.x-=d.x;c.y-=d.y;
-var d=b.getX()+c.x,c=b.getY()+c.y,e=this.first.x-d,f=this.first.y-c,g=this.graph.tolerance;if(null!=this.div||Math.abs(e)>g||Math.abs(f)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,c),this.isSpaceEvent(b)?(d=this.x+this.width,c=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=
-0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=c-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=
-this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),
-this.secondDiv=null)),b.consume()}};var T=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);T.apply(this,arguments)};var ea=(new Date).getTime(),ka=0,na=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){na.apply(this,arguments);c!=this.currentTerminalState?(ea=(new Date).getTime(),ka=0):ka=(new Date).getTime()-ea;this.currentTerminalState=
-c};var oa=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<ka||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&oa.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(a,b){var c=null!=a&&0==a,d=this.state.getVisibleTerminalState(c),e=null!=a&&(0==a||a>=this.state.absolutePoints.length-
-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=!1,c;c=mxConstants.HANDLE_SIZE;this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,
-mxConstants.HANDLE_STROKECOLOR)};var fa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return fa.apply(this,arguments)};var pa=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);
-if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return pa.apply(this,arguments)};var ta=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=ta.apply(this,arguments),b=[],c=0;c<a.length;c++)"1"!=mxUtils.getValue(a[c].style,"part","0")&&b.push(a[c]);return b};var qa=mxVertexHandler.prototype.getSelectionBounds;
-mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):qa.apply(this,arguments)};var ua=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,
-b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&ua.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var a=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),b=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);
-this.state.view.graph.model.isVertex(this.state.cell)&&a==mxConstants.NONE&&b==mxConstants.NONE?(a=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,a,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var la=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){la.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&
-null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var ha=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){ha.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display=
-"");this.blockDelayedSelection=null};var ia=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ia.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var b=0;4>b;b++){var c=new mxRectangleShape(new mxRectangle(0,
-0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);c.dialect=mxConstants.DIALECT_SVG;c.init(this.graph.view.getOverlayPane());this.cornerHandles.push(c)}}var d=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(a,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));
-d()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,b){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);b=this.graph.getLinkForCell(this.state.cell);c=this.graph.getLinksForState(this.state);this.updateLinkHint(b,c);if(null!=b||null!=c&&0<c.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=
-function(b,c){try{if(null==b&&(null==c||0==c.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=b||null!=c&&0<c.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));
-this.linkHint.innerHTML="";if(null!=b&&(this.linkHint.appendChild(this.graph.createLinkForHint(b)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var d=document.createElement("img");d.setAttribute("src",Editor.editImage);d.setAttribute("title",mxResources.get("editLink"));d.setAttribute("width","11");d.setAttribute("height","11");d.style.marginLeft="10px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,
-function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));this.linkHint.appendChildGraph.createRemoveIcon(mxResources.get("removeIt",[mxResources.get("link")]),mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(a)}))}if(null!=c)for(d=0;d<c.length;d++){var e=document.createElement("div");e.style.marginTop=null!=b||0<d?"6px":"0px";e.appendChild(this.graph.createLinkForHint(c[d].getAttribute("href"),mxUtils.getTextContent(c[d])));
-this.linkHint.appendChild(e)}}}catch(X){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var ca=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){ca.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=
-this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(b,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var b=this.graph.getLinkForCell(this.state.cell),c=this.graph.getLinksForState(this.state);
-if(null!=b||null!=c&&0<c.length)this.updateLinkHint(b,c),this.redrawHandles()};var ga=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){ga.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var ma=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var a=0;a<this.moveHandles.length;a++)this.moveHandles[a].style.left=
-this.moveHandles[a].rowState.x+this.moveHandles[a].rowState.width-5+"px",this.moveHandles[a].style.top=this.moveHandles[a].rowState.y+this.moveHandles[a].rowState.height/2-6+"px";if(null!=this.cornerHandles){var a=this.getSelectionBorderInset(),b=this.cornerHandles,c=b[0].bounds.height/2;b[0].bounds.x=this.state.x-b[0].bounds.width/2+a;b[0].bounds.y=this.state.y-c+a;b[0].redraw();b[1].bounds.x=b[0].bounds.x+this.state.width-2*a;b[1].bounds.y=b[0].bounds.y;b[1].redraw();b[2].bounds.x=b[0].bounds.x;
-b[2].bounds.y=this.state.y+this.state.height-2*a;b[2].redraw();b[3].bounds.x=b[1].bounds.x;b[3].bounds.y=b[2].bounds.y;b[3].redraw();for(a=0;a<this.cornerHandles.length;a++)this.cornerHandles[a].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");ma.apply(this);null!=this.state&&
-null!=this.linkHint&&(a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),c=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=c?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,b=null!=this.state.text?this.state.text.boundingBox:null,null==c&&(c=this.state),c=c.y+c.height,null!=b&&(c=Math.max(c,b.y+b.height)),this.linkHint.style.left=
-Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px",this.linkHint.style.top=Math.round(c+this.verticalOffset/2+Editor.hintOffset)+"px")};var ja=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){ja.apply(this,arguments);if(null!=this.moveHandles){for(var a=0;a<this.moveHandles.length;a++)null!=this.moveHandles[a]&&null!=this.moveHandles[a].parentNode&&this.moveHandles[a].parentNode.removeChild(this.moveHandles[a]);this.moveHandles=null}if(null!=this.cornerHandles){for(a=
-0;a<this.cornerHandles.length;a++)null!=this.cornerHandles[a]&&null!=this.cornerHandles[a].node&&null!=this.cornerHandles[a].node.parentNode&&this.cornerHandles[a].node.parentNode.removeChild(this.cornerHandles[a].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 V=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(V.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-
-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+Editor.hintOffset)+"px"}};var ra=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ra.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var W=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){W.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),
-this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();Format=function(a,c){this.editorUi=a;this.container=c};Format.inactiveTabBackgroundColor="#f1f3f4";Format.baseDashMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 2 L 0 14 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);Format.erOneMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 5 2 L 5 14 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);
-Format.processMenuIcon=function(a,c){var b=a.getElementsByTagName("img");0<b.length&&(Editor.isDarkMode()&&(b[0].style.filter="invert(100%)"),b[0].className="geIcon",b[0].style.padding="0px",b[0].style.margin="0 0 0 2px",null!=c&&mxUtils.setPrefixedStyle(b[0].style,"transform",c));return a};Format.prototype.labelIndex=0;Format.prototype.diagramIndex=0;Format.prototype.currentIndex=0;Format.prototype.showCloseButton=!0;Format.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(" ");
+a&&(a=[]);var g=b.view.getCellStates(c.getChildCells(this.state.cell,!0));if(0<g.length){for(var k=c.getChildCells(g[0].cell,!0),c=0;c<k.length;c++)mxUtils.bind(this,function(c){var g=b.view.getState(k[c]),h=b.getCellGeometry(k[c]),l=null!=h.alternateBounds?h.alternateBounds:h;null==g&&(g=new mxCellState(b.view,k[c],b.getCellStyle(k[c])),g.x=d.x+h.x*b.view.scale,g.y=d.y+h.y*b.view.scale,g.width=l.width*b.view.scale,g.height=l.height*b.view.scale,g.updateCachedBounds());var h=c<k.length-1?k[c+1]:null,
+m=null!=h?b.getCellGeometry(h):null,n=null!=m&&null!=m.alternateBounds?m.alternateBounds:m,h=new mxLine(new mxRectangle,mxConstants.NONE,1,!0);h.isDashed=e.isDashed;h.svgStrokeTolerance++;h=new mxHandle(g,"col-resize",null,h);h.tableHandle=!0;var p=0;h.shape.node.parentNode.insertBefore(h.shape.node,h.shape.node.parentNode.firstChild);h.redraw=function(){if(null!=this.shape){var a=b.getActualStartSize(d.cell);this.shape.stroke=0==p?mxConstants.NONE:e.stroke;this.shape.bounds.x=this.state.x+(l.width+
+p)*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=d.y+(c==k.length-1?0:a.y*this.graph.view.scale);this.shape.bounds.height=d.height-(c==k.length-1?0:(a.height+a.y)*this.graph.view.scale);this.shape.redraw()}};var q=!1;h.setPosition=function(a,c,d){p=Math.max(Graph.minTableColumnWidth-l.width,c.x-a.x-l.width);q=mxEvent.isShiftDown(d.getEvent());null==m||null==n||q||(p=Math.min(g.x/b.view.scale-l.width-Graph.minTableColumnWidth+m.x+b.view.translate.x+n.width,p))};h.execute=function(a){if(0!=
+p)b.setTableColumnWidth(this.state.cell,p,q);else if(!f.blockDelayedSelection){var c=b.getCellAt(a.getGraphX(),a.getGraphY())||d.cell;b.graphHandler.selectCellForEvent(c,a)}p=0};h.positionChanged=function(){};h.reset=function(){p=0};a.push(h)})(c);for(c=0;c<g.length;c++)mxUtils.bind(this,function(c){c=g[c];var k=new mxLine(new mxRectangle,mxConstants.NONE,1);k.isDashed=e.isDashed;k.svgStrokeTolerance++;c=new mxHandle(c,"row-resize",null,k);c.tableHandle=!0;var h=0;c.shape.node.parentNode.insertBefore(c.shape.node,
+c.shape.node.parentNode.firstChild);c.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.stroke=0==h?mxConstants.NONE:e.stroke,this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+h*this.graph.view.scale,this.shape.bounds.height=1,this.shape.redraw())};c.setPosition=function(a,b,c){h=Math.max(Graph.minTableRowHeight-a.height,b.y-a.y-a.height)};c.execute=function(a){if(0!=h)b.setTableRowHeight(this.state.cell,
+h,!mxEvent.isShiftDown(a.getEvent()));else if(!f.blockDelayedSelection){var c=b.getCellAt(a.getGraphX(),a.getGraphY())||d.cell;b.graphHandler.selectCellForEvent(c,a)}h=0};c.reset=function(){h=0};a.push(c)})(c)}}return null!=a?a.reverse():null};var ba=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){ba.apply(this,arguments);if(null!=this.moveHandles)for(var b=0;b<this.moveHandles.length;b++)this.moveHandles[b].style.visibility=a?"":"hidden";if(null!=
+this.cornerHandles)for(b=0;b<this.cornerHandles.length;b++)this.cornerHandles[b].node.style.visibility=a?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var a=this.graph.model;if(null!=this.moveHandles){for(var b=0;b<this.moveHandles.length;b++)this.moveHandles[b].parentNode.removeChild(this.moveHandles[b]);this.moveHandles=null}this.moveHandles=[];for(b=0;b<a.getChildCount(this.state.cell);b++)mxUtils.bind(this,function(b){if(null!=b&&a.isVertex(b.cell)){var c=mxUtils.createImage(Editor.rowMoveImage);
+c.style.position="absolute";c.style.cursor="pointer";c.style.width="7px";c.style.height="4px";c.style.padding="4px 2px 4px 2px";c.rowState=b;mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(a)&&this.graph.isCellSelected(b.cell)||this.graph.selectCellForEvent(b.cell,a);mxEvent.isPopupTrigger(a)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSelectionCells()),
+this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0);mxEvent.consume(a)}),null,mxUtils.bind(this,function(a){mxEvent.isPopupTrigger(a)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(a),mxEvent.getClientY(a),b.cell,a),mxEvent.consume(a))}));this.moveHandles.push(c);this.graph.container.appendChild(c)}})(this.graph.view.getState(a.getChildAt(this.state.cell,b)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var a=
+0;a<this.customHandles.length;a++)this.customHandles[a].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var ca=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),b=this.tolerance,c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&mxStencilRegistry.getStencil(c);c=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;
+if(!c&&null!=this.customHandles)for(var d=0;d<this.customHandles.length;d++)if(null!=this.customHandles[d].shape&&null!=this.customHandles[d].shape.bounds){var e=this.customHandles[d].shape.bounds,f=e.getCenterX(),g=e.getCenterY();if(Math.abs(this.state.x-f)<e.width/2||Math.abs(this.state.y-g)<e.height/2||Math.abs(this.state.x+this.state.width-f)<e.width/2||Math.abs(this.state.y+this.state.height-g)<e.height/2){c=!0;break}}c&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(b/=2,this.graph.isTable(this.state.cell)&&
+(b+=7),a.x=this.sizers[0].bounds.width+b,a.y=this.sizers[0].bounds.height+b):a=ca.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(b){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{b=this.state.view.scale;var d=this.state.view.unit;this.hint.innerHTML=c(this.roundLength(this.bounds.width/b),d)+" x "+c(this.roundLength(this.bounds.height/
+b),d)}b=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==b&&(b=this.bounds);this.hint.style.left=b.x+Math.round((b.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=b.y+b.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display=
+"")};var R=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(a,b){R.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var Q=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(a,b){Q.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=
+function(b,d){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var e=this.graph.view.translate,f=this.graph.view.scale,g=this.roundLength(d.x/f-e.x),e=this.roundLength(d.y/f-e.y),f=this.graph.view.unit;this.hint.innerHTML=c(g,f)+", "+c(e,f);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(g=this.constraintHandler.currentConstraint.point,this.hint.innerHTML=
+"["+Math.round(100*g.x)+"%, "+Math.round(100*g.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(b.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(b.getGraphY(),d.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+
+HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22" stroke-width="1"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>'):
+new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>'):new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+
+'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>',24,24):new mxImage(IMAGE_PATH+"/handle-rotate.png",16,16);mxClient.IS_SVG&&(mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,
+5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="'+HoverIcons.prototype.arrowFill+'"/>'));mxVertexHandler.TABLE_HANDLE_COLOR="#fca000";mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxEdgeHandler.prototype.terminalHandleImage=HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle;
+mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=
+HoverIcons.prototype.roundDrop);mxClient.IS_SVG||((new Image).src=HoverIcons.prototype.mainHandle.src,(new Image).src=HoverIcons.prototype.fixedHandle.src,(new Image).src=HoverIcons.prototype.terminalHandle.src,(new Image).src=HoverIcons.prototype.secondaryHandle.src,(new Image).src=HoverIcons.prototype.rotationHandle.src,(new Image).src=HoverIcons.prototype.triangleUp.src,(new Image).src=HoverIcons.prototype.triangleRight.src,(new Image).src=HoverIcons.prototype.triangleDown.src,(new Image).src=
+HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=
+!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||
+0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(a){var b=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(b)||
+mxEvent.isPopupTrigger(b)&&(null==a.getState()||mxEvent.isControlDown(b)||mxEvent.isShiftDown(b))};var P=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,b){P.apply(this,arguments);mxEvent.isTouchEvent(b.getEvent())&&this.graph.isCellSelected(b.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var b=a.getEvent();return mxEvent.isLeftMouseButton(b)&&(this.useLeftButtonForPanning&&null==
+a.getState()||mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b))||this.usePopupTrigger&&mxEvent.isPopupTrigger(b)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(a,b){if(this.cancelled)this.cancelled=
+!1,b.consume();else{var c=null!=this.div&&"none"!=this.div.style.display,d=null,e=null,f=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(d=this.first.x,e=this.first.y,f=(this.currentX-d)/this.graph.view.scale,g=(this.currentY-e)/this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(f=this.graph.snap(f),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(f)<this.graph.tolerance&&(f=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(c){if(mxEvent.isAltDown(b.getEvent())&&
+this.graph.isToggleEvent(b.getEvent())){var f=new mxRectangle(this.x,this.y,this.width,this.height),k=this.graph.getCells(f.x,f.y,f.width,f.height);this.graph.removeSelectionCells(k)}else if(this.isSpaceEvent(b)){this.graph.model.beginUpdate();try{for(k=this.graph.getCellsBeyond(d,e,this.graph.getDefaultParent(),!0,!0),c=0;c<k.length;c++)if(this.graph.isCellMovable(k[c])){var h=this.graph.view.getState(k[c]),l=this.graph.getCellGeometry(k[c]);null!=h&&null!=l&&(l=l.clone(),l.translate(f,g),this.graph.model.setGeometry(k[c],
+l))}}finally{this.graph.model.endUpdate()}}else f=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(f,b.getEvent());b.consume()}}};mxRubberband.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&null!=this.first){var c=mxUtils.getScrollOrigin(this.graph.container),d=mxUtils.getOffset(this.graph.container);c.x-=d.x;c.y-=d.y;var d=b.getX()+c.x,c=b.getY()+c.y,e=this.first.x-d,f=this.first.y-c,g=this.graph.tolerance;if(null!=this.div||Math.abs(e)>g||Math.abs(f)>g)null==
+this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,c),this.isSpaceEvent(b)?(d=this.x+this.width,c=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=c-this.height)),
+this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+
+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),b.consume()}};var T=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=
+this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);T.apply(this,arguments)};var ea=(new Date).getTime(),ka=0,na=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){na.apply(this,arguments);c!=this.currentTerminalState?(ea=(new Date).getTime(),ka=0):ka=(new Date).getTime()-ea;this.currentTerminalState=c};var oa=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=
+this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<ka||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&oa.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(a,b){var c=null!=a&&0==a,d=this.state.getVisibleTerminalState(c),e=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,c):null,c=null!=(null!=
+e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=!1,c;c=mxConstants.HANDLE_SIZE;this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var fa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=
+function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return fa.apply(this,arguments)};var pa=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&
+null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return pa.apply(this,arguments)};var ta=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=ta.apply(this,arguments),b=[],c=0;c<a.length;c++)"1"!=mxUtils.getValue(a[c].style,"part","0")&&b.push(a[c]);return b};var qa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),
+d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):qa.apply(this,arguments)};var ua=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
+(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&ua.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var a=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),b=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&a==mxConstants.NONE&&b==mxConstants.NONE?(a=mxUtils.mod(mxUtils.getValue(this.state.style,
+mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,a,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var la=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){la.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display=
+"none"))};var ha=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){ha.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var ia=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ia.apply(this,arguments);var a=!1;
+null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var b=0;4>b;b++){var c=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);c.dialect=mxConstants.DIALECT_SVG;c.init(this.graph.view.getOverlayPane());
+this.cornerHandles.push(c)}}var d=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(a,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));d()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,
+this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,b){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);b=this.graph.getLinkForCell(this.state.cell);c=this.graph.getLinksForState(this.state);this.updateLinkHint(b,c);if(null!=b||null!=c&&0<c.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(b,c){try{if(null==b&&(null==c||0==c.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),
+this.linkHint=null);else if(null!=b||null!=c&&0<c.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerHTML="";if(null!=b&&(this.linkHint.appendChild(this.graph.createLinkForHint(b)),this.graph.isEnabled()&&"function"===
+typeof this.graph.editLink)){var d=document.createElement("img");d.setAttribute("src",Editor.editImage);d.setAttribute("title",mxResources.get("editLink"));d.setAttribute("width","11");d.setAttribute("height","11");d.style.marginLeft="10px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));this.linkHint.appendChildGraph.createRemoveIcon(mxResources.get("removeIt",
+[mxResources.get("link")]),mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(a)}))}if(null!=c)for(d=0;d<c.length;d++){var e=document.createElement("div");e.style.marginTop=null!=b||0<d?"6px":"0px";e.appendChild(this.graph.createLinkForHint(c[d].getAttribute("href"),mxUtils.getTextContent(c[d])));this.linkHint.appendChild(e)}}}catch(aa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var da=mxEdgeHandler.prototype.init;
+mxEdgeHandler.prototype.init=function(){da.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,
+function(b,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var b=this.graph.getLinkForCell(this.state.cell),c=this.graph.getLinksForState(this.state);if(null!=b||null!=c&&0<c.length)this.updateLinkHint(b,c),this.redrawHandles()};var ga=mxConnectionHandler.prototype.init;
+mxConnectionHandler.prototype.init=function(){ga.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var ma=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var a=0;a<this.moveHandles.length;a++)this.moveHandles[a].style.left=this.moveHandles[a].rowState.x+this.moveHandles[a].rowState.width-5+"px",this.moveHandles[a].style.top=this.moveHandles[a].rowState.y+
+this.moveHandles[a].rowState.height/2-6+"px";if(null!=this.cornerHandles){var a=this.getSelectionBorderInset(),b=this.cornerHandles,c=b[0].bounds.height/2;b[0].bounds.x=this.state.x-b[0].bounds.width/2+a;b[0].bounds.y=this.state.y-c+a;b[0].redraw();b[1].bounds.x=b[0].bounds.x+this.state.width-2*a;b[1].bounds.y=b[0].bounds.y;b[1].redraw();b[2].bounds.x=b[0].bounds.x;b[2].bounds.y=this.state.y+this.state.height-2*a;b[2].redraw();b[3].bounds.x=b[1].bounds.x;b[3].bounds.y=b[2].bounds.y;b[3].redraw();
+for(a=0;a<this.cornerHandles.length;a++)this.cornerHandles[a].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");ma.apply(this);null!=this.state&&null!=this.linkHint&&(a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x,this.state.y-
+22,this.state.width+24,this.state.height+22),c=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=c?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,b=null!=this.state.text?this.state.text.boundingBox:null,null==c&&(c=this.state),c=c.y+c.height,null!=b&&(c=Math.max(c,b.y+b.height)),this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px",this.linkHint.style.top=Math.round(c+this.verticalOffset/
+2+Editor.hintOffset)+"px")};var ja=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){ja.apply(this,arguments);if(null!=this.moveHandles){for(var a=0;a<this.moveHandles.length;a++)null!=this.moveHandles[a]&&null!=this.moveHandles[a].parentNode&&this.moveHandles[a].parentNode.removeChild(this.moveHandles[a]);this.moveHandles=null}if(null!=this.cornerHandles){for(a=0;a<this.cornerHandles.length;a++)null!=this.cornerHandles[a]&&null!=this.cornerHandles[a].node&&null!=this.cornerHandles[a].node.parentNode&&
+this.cornerHandles[a].node.parentNode.removeChild(this.cornerHandles[a].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 X=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(X.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+Editor.hintOffset)+"px"}};var ra=mxEdgeHandler.prototype.reset;
+mxEdgeHandler.prototype.reset=function(){ra.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Y=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Y.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();Format=function(a,c){this.editorUi=a;this.container=c};Format.inactiveTabBackgroundColor="#f1f3f4";Format.classicFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 10 2 L 5 8 L 10 14 Z M 0 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);Format.classicThinFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 4 L 3 8 L 8 12 Z M 0 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);
+Format.openFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 8 0 L 0 8 L 8 16 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);Format.openThinFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 8 4 L 0 8 L 8 12 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);
+Format.openAsyncFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 8 4 L 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);Format.blockFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 2 L 8 14 Z M 0 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);
+Format.blockThinFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 4 L 8 12 Z M 0 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);Format.asyncFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 6 8 L 6 4 L 0 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);
+Format.ovalFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 A 5 5 0 0 1 5 3 A 5 5 0 0 1 11 8 A 5 5 0 0 1 5 13 A 5 5 0 0 1 0 8 Z M 10 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);Format.diamondFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 6 2 L 12 8 L 6 14 Z M 0 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);
+Format.diamondThinFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 3 L 16 8 L 8 13 Z M 0 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);Format.classicMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 10 2 L 5 8 L 10 14 Z M 5 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);
+Format.classicThinMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 4 L 5 8 L 8 12 Z M 5 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);Format.blockMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 2 L 8 14 Z M 8 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);
+Format.blockThinMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 4 L 8 12 Z M 8 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);Format.asyncMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 6 8 L 6 4 L 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);
+Format.ovalMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 A 5 5 0 0 1 5 3 A 5 5 0 0 1 11 8 A 5 5 0 0 1 5 13 A 5 5 0 0 1 0 8 Z M 10 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);Format.diamondMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 6 2 L 12 8 L 6 14 Z M 12 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);
+Format.diamondThinMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 3 L 16 8 L 8 13 Z M 16 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);Format.boxMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 3 L 10 3 L 10 13 L 0 13 Z M 10 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);
+Format.halfCircleMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 3 A 5 5 0 0 1 5 8 A 5 5 0 0 1 0 13 M 5 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);Format.dashMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 2 L 12 14 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);
+Format.crossMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 2 L 12 14 M 12 2 L 0 14 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);Format.circlePlusMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 A 6 6 0 0 1 6 2 A 6 6 0 0 1 12 8 A 6 6 0 0 1 6 14 A 6 6 0 0 1 0 8 Z M 6 2 L 6 14 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);
+Format.circleMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 A 6 6 0 0 1 6 2 A 6 6 0 0 1 12 8 A 6 6 0 0 1 6 14 A 6 6 0 0 1 0 8 Z M 12 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);Format.ERmandOneMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 6 2 L 6 14 M 9 2 L 9 14 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);
+Format.ERmanyMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 2 L 12 8 L 0 14 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);Format.ERoneToManyMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 2 L 12 8 L 0 14 M 15 2 L 15 14 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);
+Format.ERzeroToOneMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 8 8 A 5 5 0 0 1 13 3 A 5 5 0 0 1 18 8 A 5 5 0 0 1 13 13 A 5 5 0 0 1 8 8 Z M 0 8 L 8 8 M 18 8 L 24 8 M 4 3 L 4 13" stroke="#404040" fill="transparent"/>',32,20);
+Format.ERzeroToManyMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 8 8 A 5 5 0 0 1 13 3 A 5 5 0 0 1 18 8 A 5 5 0 0 1 13 13 A 5 5 0 0 1 8 8 Z M 0 8 L 8 8 M 18 8 L 24 8 M 0 3 L 8 8 L 0 13" stroke="#404040" fill="transparent"/>',32,20);Format.EROneMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 5 2 L 5 14 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);
+Format.baseDashMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 2 L 0 14 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);Format.processMenuIcon=function(a,c){var b=a.getElementsByTagName("img");0<b.length&&(Editor.isDarkMode()&&(b[0].style.filter="invert(100%)"),b[0].className="geIcon",b[0].style.padding="0px",b[0].style.margin="0 0 0 2px",null!=c&&mxUtils.setPrefixedStyle(b[0].style,"transform",c));return a};
+Format.prototype.labelIndex=0;Format.prototype.diagramIndex=0;Format.prototype.currentIndex=0;Format.prototype.showCloseButton=!0;Format.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(" ");
Format.prototype.init=function(){var a=this.editorUi,c=a.editor,b=c.graph;this.update=mxUtils.bind(this,function(a,b){this.clearSelectionState();this.refresh()});b.getSelectionModel().addListener(mxEvent.CHANGE,this.update);b.addListener(mxEvent.EDITING_STARTED,this.update);b.addListener(mxEvent.EDITING_STOPPED,this.update);b.getModel().addListener(mxEvent.CHANGE,this.update);b.getView().addListener("unitChanged",this.update);b.addListener(mxEvent.ROOT,mxUtils.bind(this,function(){this.refresh()}));
a.addListener("styleChanged",mxUtils.bind(this,function(a,b){this.refresh()}));c.addListener("autosaveChanged",mxUtils.bind(this,function(){this.refresh()}));this.refresh()};Format.prototype.clearSelectionState=function(){this.selectionState=null};Format.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
Format.prototype.createSelectionState=function(){for(var a=this.editorUi.editor.graph.getSelectionCells(),c=this.initSelectionState(),b=!0,e=0;e<a.length;e++){var d=this.editorUi.editor.graph.getCurrentCellStyle(a[e]);"0"!=mxUtils.getValue(d,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(c,a[e],a,b),b=!1)}return c};
@@ -2945,9 +2964,9 @@ Dialog.prototype.closeImage),g.setAttribute("title",mxResources.get("hide")),g.s
this.panels.push(new TextFormatPanel(this,a,b));else{e.style.backgroundColor=Format.inactiveTabBackgroundColor;e.style.borderLeftWidth="1px";e.style.cursor="pointer";e.style.width=f||0==d.cells.length?"50%":"33.3%";var m=e.cloneNode(!1),p=m.cloneNode(!1);m.style.backgroundColor=Format.inactiveTabBackgroundColor;p.style.backgroundColor=Format.inactiveTabBackgroundColor;f?m.style.borderLeftWidth="0px":(e.style.borderLeftWidth="0px",mxUtils.write(e,mxResources.get("style")),b.appendChild(e),n=b.cloneNode(!1),
n.style.display="none",this.panels.push(new StyleFormatPanel(this,a,n)),this.container.appendChild(n),g(e,n,l++));mxUtils.write(m,mxResources.get("text"));b.appendChild(m);e=b.cloneNode(!1);e.style.display="none";this.panels.push(new TextFormatPanel(this,a,e));this.container.appendChild(e);mxUtils.write(p,mxResources.get("arrange"));b.appendChild(p);b=b.cloneNode(!1);b.style.display="none";this.panels.push(new ArrangePanel(this,a,b));this.container.appendChild(b);0<d.cells.length?g(m,e,l++):m.style.display=
"none";g(p,b,l++,!0)}}};BaseFormatPanel=function(a,c,b){this.format=a;this.editorUi=c;this.container=b;this.listeners=[]};BaseFormatPanel.prototype.buttonBackgroundColor="white";
-BaseFormatPanel.prototype.installInputHandler=function(a,c,b,e,d,f,k,h){f=null!=f?f:"";h=null!=h?h:!1;var g=this.editorUi,l=g.editor.graph;e=null!=e?e:1;d=null!=d?d:999;var m=null,n=!1,p=mxUtils.bind(this,function(p){var r=h?parseFloat(a.value):parseInt(a.value);isNaN(r)||c!=mxConstants.STYLE_ROTATION||(r=mxUtils.mod(Math.round(100*r),36E3)/100);r=Math.min(d,Math.max(e,isNaN(r)?b:r));if(l.cellEditor.isContentEditing()&&k)n||(n=!0,null!=m&&(l.cellEditor.restoreSelection(m),m=null),k(r),a.value=r+f,
-n=!1);else if(r!=mxUtils.getValue(this.format.getSelectionState().style,c,b)){l.isEditing()&&l.stopEditing(!0);l.getModel().beginUpdate();try{var t=this.format.getSelectionState().cells;l.setCellStyles(c,r,t);c==mxConstants.STYLE_FONTSIZE&&l.updateLabelElements(t,function(a){a.style.fontSize=r+"px";a.removeAttribute("size")});for(var v=0;v<t.length;v++)0==l.model.getChildCount(t[v])&&l.autoSizeCell(t[v],!1);g.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[r],"cells",t))}finally{l.getModel().endUpdate()}}a.value=
-r+f;mxEvent.consume(p)});k&&l.cellEditor.isContentEditing()&&(mxEvent.addListener(a,"mousedown",function(){document.activeElement==l.cellEditor.textarea&&(m=l.cellEditor.saveSelection())}),mxEvent.addListener(a,"touchstart",function(){document.activeElement==l.cellEditor.textarea&&(m=l.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",p);mxEvent.addListener(a,"blur",p);return p};
+BaseFormatPanel.prototype.installInputHandler=function(a,c,b,e,d,f,k,h){f=null!=f?f:"";h=null!=h?h:!1;var g=this.editorUi,l=g.editor.graph;e=null!=e?e:1;d=null!=d?d:999;var m=null,n=!1,p=mxUtils.bind(this,function(p){var q=h?parseFloat(a.value):parseInt(a.value);isNaN(q)||c!=mxConstants.STYLE_ROTATION||(q=mxUtils.mod(Math.round(100*q),36E3)/100);q=Math.min(d,Math.max(e,isNaN(q)?b:q));if(l.cellEditor.isContentEditing()&&k)n||(n=!0,null!=m&&(l.cellEditor.restoreSelection(m),m=null),k(q),a.value=q+f,
+n=!1);else if(q!=mxUtils.getValue(this.format.getSelectionState().style,c,b)){l.isEditing()&&l.stopEditing(!0);l.getModel().beginUpdate();try{var v=this.format.getSelectionState().cells;l.setCellStyles(c,q,v);c==mxConstants.STYLE_FONTSIZE&&l.updateLabelElements(v,function(a){a.style.fontSize=q+"px";a.removeAttribute("size")});for(var u=0;u<v.length;u++)0==l.model.getChildCount(v[u])&&l.autoSizeCell(v[u],!1);g.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[q],"cells",v))}finally{l.getModel().endUpdate()}}a.value=
+q+f;mxEvent.consume(p)});k&&l.cellEditor.isContentEditing()&&(mxEvent.addListener(a,"mousedown",function(){document.activeElement==l.cellEditor.textarea&&(m=l.cellEditor.saveSelection())}),mxEvent.addListener(a,"touchstart",function(){document.activeElement==l.cellEditor.textarea&&(m=l.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",p);mxEvent.addListener(a,"blur",p);return p};
BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.className="geFormatSection";a.style.padding="12px 0px 12px 18px";return a};BaseFormatPanel.prototype.createTitle=function(a){var c=document.createElement("div");c.style.padding="0px 0px 6px 0px";c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.width="200px";c.style.fontWeight="bold";mxUtils.write(c,a);return c};
BaseFormatPanel.prototype.createStepper=function(a,c,b,e,d,f,k){b=null!=b?b:1;e=null!=e?e:8;if(mxClient.IS_MT||8<=document.documentMode)e+=1;var h=document.createElement("div");mxUtils.setPrefixedStyle(h.style,"borderRadius","3px");h.style.border="1px solid rgb(192, 192, 192)";h.style.position="absolute";var g=document.createElement("div");g.style.borderBottom="1px solid rgb(192, 192, 192)";g.style.position="relative";g.style.height=e+"px";g.style.width="10px";g.className="geBtnUp";h.appendChild(g);
var l=g.cloneNode(!1);l.style.border="none";l.style.height=e+"px";l.className="geBtnDown";h.appendChild(l);mxEvent.addListener(l,"click",function(d){""==a.value&&(a.value=f||"2");var e=k?parseFloat(a.value):parseInt(a.value);isNaN(e)||(a.value=e-b,null!=c&&c(d));mxEvent.consume(d)});mxEvent.addListener(g,"click",function(d){""==a.value&&(a.value=f||"0");var e=k?parseFloat(a.value):parseInt(a.value);isNaN(e)||(a.value=e+b,null!=c&&c(d));mxEvent.consume(d)});if(d){var m=null;mxEvent.addGestureListeners(h,
@@ -2956,11 +2975,11 @@ BaseFormatPanel.prototype.createOption=function(a,c,b,e,d){var f=document.create
!0,k.checked=!0):(k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1),l!=a&&(l=a,c()!=l&&b(l)),g=!1)};mxEvent.addListener(f,"click",function(a){if("disabled"!=k.getAttribute("disabled")){a=mxEvent.getSource(a);if(a==f||a==h)k.checked=!k.checked;m(k.checked)}});m(l);null!=e&&(e.install(m),this.listeners.push(e));null!=d&&d(f);return f};
BaseFormatPanel.prototype.createCellOption=function(a,c,b,e,d,f,k,h,g){var l=this.editorUi,m=l.editor.graph,n=this;e=null!=e?"null"==e?null:e:1;d=null!=d?"null"==d?null:d:0;var p=null!=g?m.getCommonStyle(g):this.format.getSelectionState().style;return this.createOption(a,function(){return mxUtils.getValue(p,c,b)!=d},function(a){h&&m.stopEditing();if(null!=k)k.funct();else{m.getModel().beginUpdate();try{var b=null!=g?g:n.format.getSelectionState().cells;a=a?e:d;m.setCellStyles(c,a,b);null!=f&&f(b,
a);l.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[a],"cells",b))}finally{m.getModel().endUpdate()}}},{install:function(a){this.listener=function(){a(mxUtils.getValue(p,c,b)!=d)};m.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){m.getModel().removeListener(this.listener)}})};
-BaseFormatPanel.prototype.createColorOption=function(a,c,b,e,d,f,k,h){var g=document.createElement("div");g.style.padding="6px 0px 1px 0px";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.width="200px";g.style.height="18px";var l=document.createElement("input");l.setAttribute("type","checkbox");l.style.margin="0px 6px 0px 0px";k||g.appendChild(l);var m=document.createElement("span");mxUtils.write(m,a);g.appendChild(m);var n=c(),p=!1,r=null,u=function(a,d,g){if(!p){var m="null"==e?null:
-e;p=!0;a=/(^#?[a-zA-Z0-9]*$)/.test(a)?a:m;var m=null!=a&&a!=mxConstants.NONE?a:m,t=document.createElement("div");t.style.width="36px";t.style.height="12px";t.style.margin="3px";t.style.border="1px solid black";t.style.backgroundColor="default"==m?h:m;r.appendChild(t);null!=a&&a!=mxConstants.NONE&&1<a.length&&"string"===typeof a&&(m="#"==a.charAt(0)?a.substring(1).toUpperCase():a,m=ColorDialog.prototype.colorNames[m],r.setAttribute("title",null!=m?m+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper"));
-null!=a&&a!=mxConstants.NONE?(l.setAttribute("checked","checked"),l.defaultChecked=!0,l.checked=!0):(l.removeAttribute("checked"),l.defaultChecked=!1,l.checked=!1);r.style.display=l.checked||k?"":"none";null!=f&&f("null"==a?null:a);d||(n=a,(g||k||c()!=n)&&b("null"==n?null:n,n));p=!1}},t=document.createElement("input");t.setAttribute("type","color");t.style.visibility="hidden";t.style.width="0px";t.style.height="0px";t.style.border="none";g.appendChild(t);r=mxUtils.button("",mxUtils.bind(this,function(a){var b=
-n;"default"==b&&(b=h);!mxEvent.isShiftDown(a)||mxClient.IS_IE||mxClient.IS_IE11?this.editorUi.pickColor(b,function(a){u(a,null,!0)},h):(t.value=b,t.click(),mxEvent.addListener(t,"input",function(){u(t.value,null,!0)}));mxEvent.consume(a)}));r.style.position="absolute";r.style.marginTop="-4px";r.style.right="20px";r.style.height="22px";r.className="geColorBtn";r.style.display=l.checked||k?"":"none";g.appendChild(r);a=null!=n&&"string"===typeof n&&"#"==n.charAt(0)?n.substring(1).toUpperCase():n;a=ColorDialog.prototype.colorNames[a];
-r.setAttribute("title",null!=a?a+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper");mxEvent.addListener(g,"click",function(a){a=mxEvent.getSource(a);if(a==l||"INPUT"!=a.nodeName)a!=l&&(l.checked=!l.checked),l.checked||null==n||n==mxConstants.NONE||e==mxConstants.NONE||(e=n),u(l.checked?e:mxConstants.NONE)});u(n,!0);null!=d&&(d.install(u),this.listeners.push(d));return g};
+BaseFormatPanel.prototype.createColorOption=function(a,c,b,e,d,f,k,h){var g=document.createElement("div");g.style.padding="6px 0px 1px 0px";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.width="200px";g.style.height="18px";var l=document.createElement("input");l.setAttribute("type","checkbox");l.style.margin="0px 6px 0px 0px";k||g.appendChild(l);var m=document.createElement("span");mxUtils.write(m,a);g.appendChild(m);var n=c(),p=!1,q=null,t=function(a,d,g){if(!p){var m="null"==e?null:
+e;p=!0;a=/(^#?[a-zA-Z0-9]*$)/.test(a)?a:m;var m=null!=a&&a!=mxConstants.NONE?a:m,t=document.createElement("div");t.style.width="36px";t.style.height="12px";t.style.margin="3px";t.style.border="1px solid black";t.style.backgroundColor="default"==m?h:m;q.appendChild(t);null!=a&&a!=mxConstants.NONE&&1<a.length&&"string"===typeof a&&(m="#"==a.charAt(0)?a.substring(1).toUpperCase():a,m=ColorDialog.prototype.colorNames[m],q.setAttribute("title",null!=m?m+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper"));
+null!=a&&a!=mxConstants.NONE?(l.setAttribute("checked","checked"),l.defaultChecked=!0,l.checked=!0):(l.removeAttribute("checked"),l.defaultChecked=!1,l.checked=!1);q.style.display=l.checked||k?"":"none";null!=f&&f("null"==a?null:a);d||(n=a,(g||k||c()!=n)&&b("null"==n?null:n,n));p=!1}},v=document.createElement("input");v.setAttribute("type","color");v.style.visibility="hidden";v.style.width="0px";v.style.height="0px";v.style.border="none";g.appendChild(v);q=mxUtils.button("",mxUtils.bind(this,function(a){var b=
+n;"default"==b&&(b=h);!mxEvent.isShiftDown(a)||mxClient.IS_IE||mxClient.IS_IE11?this.editorUi.pickColor(b,function(a){t(a,null,!0)},h):(v.value=b,v.click(),mxEvent.addListener(v,"input",function(){t(v.value,null,!0)}));mxEvent.consume(a)}));q.style.position="absolute";q.style.marginTop="-4px";q.style.right="20px";q.style.height="22px";q.className="geColorBtn";q.style.display=l.checked||k?"":"none";g.appendChild(q);a=null!=n&&"string"===typeof n&&"#"==n.charAt(0)?n.substring(1).toUpperCase():n;a=ColorDialog.prototype.colorNames[a];
+q.setAttribute("title",null!=a?a+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper");mxEvent.addListener(g,"click",function(a){a=mxEvent.getSource(a);if(a==l||"INPUT"!=a.nodeName)a!=l&&(l.checked=!l.checked),l.checked||null==n||n==mxConstants.NONE||e==mxConstants.NONE||(e=n),t(l.checked?e:mxConstants.NONE)});t(n,!0);null!=d&&(d.install(t),this.listeners.push(d));return g};
BaseFormatPanel.prototype.createCellColorOption=function(a,c,b,e,d,f){var k=this.editorUi,h=k.editor.graph,g=this;return this.createColorOption(a,function(){var a=h.view.getState(g.format.getSelectionState().cells[0]);return null!=a?mxUtils.getValue(a.style,c,null):null},function(a,b){h.getModel().beginUpdate();try{var e=g.format.getSelectionState().cells;h.setCellStyles(c,a,e);null!=d&&d(a);k.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[a],"cells",e))}finally{h.getModel().endUpdate()}},
b||mxConstants.NONE,{install:function(a){this.listener=function(){var b=h.view.getState(g.format.getSelectionState().cells[0]);null!=b&&a(mxUtils.getValue(b.style,c,null))};h.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){h.getModel().removeListener(this.listener)}},e,null,f)};
BaseFormatPanel.prototype.addArrow=function(a,c){c=null!=c?c:10;var b=document.createElement("div");b.style.display="inline-block";b.style.padding="6px";b.style.paddingRight="4px";var e=10-c;2==e?b.style.paddingTop="6px":0<e?b.style.paddingTop=6-e+"px":b.style.marginTop="-2px";b.style.height=c+"px";b.style.borderLeft="1px solid #a0a0a0";b.innerHTML=Toolbar.prototype.dropDownImageHtml;e=b.getElementsByTagName("img")[0];e.style.position="relative";e.style.left="2px";e.style.top="-4px";mxUtils.setOpacity(b,
@@ -3004,43 +3023,43 @@ a=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_ROTATION,0)),f.value=isN
BaseFormatPanel.prototype.inUnit=function(a){return this.editorUi.editor.graph.view.formatUnitText(a)};BaseFormatPanel.prototype.fromUnit=function(a){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return a;case mxConstants.INCHES:return a*mxConstants.PIXELS_PER_INCH;case mxConstants.MILLIMETERS:return a*mxConstants.PIXELS_PER_MM}};BaseFormatPanel.prototype.isFloatUnit=function(){return this.editorUi.editor.graph.view.unit!=mxConstants.POINTS};
BaseFormatPanel.prototype.getUnitStep=function(){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return 1;case mxConstants.INCHES:return.1;case mxConstants.MILLIMETERS:return.5}};
ArrangePanel.prototype.addGeometry=function(a){var c=this,b=this.editorUi,e=b.editor.graph,d=e.getModel(),f=this.format.getSelectionState(),k=this.createPanel();k.style.paddingBottom="8px";var h=document.createElement("div");h.style.position="absolute";h.style.width="50px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("size"));k.appendChild(h);var g,l,m,n,p=this.addUnitInput(k,this.getUnit(),84,44,function(){g.apply(this,arguments)},this.getUnitStep(),null,null,
-this.isFloatUnit()),r=this.addUnitInput(k,this.getUnit(),20,44,function(){l.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),u=document.createElement("div");u.className="geSprite geSprite-fit";u.setAttribute("title",mxResources.get("autosize")+" ("+this.editorUi.actions.get("autosize").shortcut+")");u.style.position="relative";u.style.cursor="pointer";u.style.marginTop="-3px";u.style.border="0px";u.style.left="42px";mxUtils.setOpacity(u,50);mxEvent.addListener(u,"mouseenter",
-function(){mxUtils.setOpacity(u,100)});mxEvent.addListener(u,"mouseleave",function(){mxUtils.setOpacity(u,50)});mxEvent.addListener(u,"click",function(){b.actions.get("autosize").funct()});k.appendChild(u);f.row?(p.style.visibility="hidden",p.nextSibling.style.visibility="hidden"):this.addLabel(k,mxResources.get("width"),84);this.addLabel(k,mxResources.get("height"),20);mxUtils.br(k);h=document.createElement("div");h.style.paddingTop="8px";h.style.paddingRight="20px";h.style.whiteSpace="nowrap";h.style.textAlign=
-"right";var t=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");t.style.width="100%";h.appendChild(t);f.cell||f.row?u.style.visibility="hidden":k.appendChild(h);var v=t.getElementsByTagName("input")[0];this.addKeyHandler(p,E);this.addKeyHandler(r,E);g=this.addGeometryHandler(p,function(a,b,d){if(e.isTableCell(d))return e.setTableColumnWidth(d,b-a.width,!0),!0;0<a.width&&(b=Math.max(1,c.fromUnit(b)),v.checked&&(a.height=Math.round(a.height*
-b*100/a.width)/100),a.width=b)});l=this.addGeometryHandler(r,function(a,b,d){e.isTableCell(d)&&(d=e.model.getParent(d));if(e.isTableRow(d))return e.setTableRowHeight(d,b-a.height),!0;0<a.height&&(b=Math.max(1,c.fromUnit(b)),v.checked&&(a.width=Math.round(a.width*b*100/a.height)/100),a.height=b)});(f.resizable||f.row||f.cell)&&a.appendChild(k);var y=this.createPanel();y.style.paddingBottom="30px";h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";
-h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("position"));y.appendChild(h);var x=this.addUnitInput(y,this.getUnit(),84,44,function(){m.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),B=this.addUnitInput(y,this.getUnit(),20,44,function(){n.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(y);this.addLabel(y,mxResources.get("left"),84);this.addLabel(y,mxResources.get("top"),20);var E=mxUtils.bind(this,function(a,b,c){f=this.format.getSelectionState();
-if(f.containsLabel||f.vertices.length!=e.getSelectionCount()||null==f.width||null==f.height)k.style.display="none";else{k.style.display="";if(c||document.activeElement!=p)p.value=this.inUnit(f.width)+(""==f.width?"":" "+this.getUnit());if(c||document.activeElement!=r)r.value=this.inUnit(f.height)+(""==f.height?"":" "+this.getUnit())}if(f.vertices.length==e.getSelectionCount()&&null!=f.x&&null!=f.y){y.style.display="";if(c||document.activeElement!=x)x.value=this.inUnit(f.x)+(""==f.x?"":" "+this.getUnit());
-if(c||document.activeElement!=B)B.value=this.inUnit(f.y)+(""==f.y?"":" "+this.getUnit())}else y.style.display="none"});this.addKeyHandler(x,E);this.addKeyHandler(B,E);d.addListener(mxEvent.CHANGE,E);this.listeners.push({destroy:function(){d.removeListener(E)}});E();m=this.addGeometryHandler(x,function(a,b){b=c.fromUnit(b);a.relative?a.offset.x=b:a.x=b});n=this.addGeometryHandler(B,function(a,b){b=c.fromUnit(b);a.relative?a.offset.y=b:a.y=b});if(f.movable){if(0==f.edges.length&&1==f.vertices.length&&
-d.isEdge(d.getParent(f.vertices[0]))){var G=e.getCellGeometry(f.vertices[0]);null!=G&&G.relative&&(h=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(a){d.beginUpdate();try{G=G.clone(),G.x=0,G.y=0,G.offset=new mxPoint,d.setGeometry(f.vertices[0],G)}finally{d.endUpdate()}})),h.setAttribute("title",mxResources.get("center")),h.style.width="202px",h.style.position="absolute",mxUtils.br(y),mxUtils.br(y),y.appendChild(h))}a.appendChild(y)}};
+this.isFloatUnit()),q=this.addUnitInput(k,this.getUnit(),20,44,function(){l.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),t=document.createElement("div");t.className="geSprite geSprite-fit";t.setAttribute("title",mxResources.get("autosize")+" ("+this.editorUi.actions.get("autosize").shortcut+")");t.style.position="relative";t.style.cursor="pointer";t.style.marginTop="-3px";t.style.border="0px";t.style.left="42px";mxUtils.setOpacity(t,50);mxEvent.addListener(t,"mouseenter",
+function(){mxUtils.setOpacity(t,100)});mxEvent.addListener(t,"mouseleave",function(){mxUtils.setOpacity(t,50)});mxEvent.addListener(t,"click",function(){b.actions.get("autosize").funct()});k.appendChild(t);f.row?(p.style.visibility="hidden",p.nextSibling.style.visibility="hidden"):this.addLabel(k,mxResources.get("width"),84);this.addLabel(k,mxResources.get("height"),20);mxUtils.br(k);h=document.createElement("div");h.style.paddingTop="8px";h.style.paddingRight="20px";h.style.whiteSpace="nowrap";h.style.textAlign=
+"right";var v=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");v.style.width="100%";h.appendChild(v);f.cell||f.row?t.style.visibility="hidden":k.appendChild(h);var u=v.getElementsByTagName("input")[0];this.addKeyHandler(p,E);this.addKeyHandler(q,E);g=this.addGeometryHandler(p,function(a,b,d){if(e.isTableCell(d))return e.setTableColumnWidth(d,b-a.width,!0),!0;0<a.width&&(b=Math.max(1,c.fromUnit(b)),u.checked&&(a.height=Math.round(a.height*
+b*100/a.width)/100),a.width=b)});l=this.addGeometryHandler(q,function(a,b,d){e.isTableCell(d)&&(d=e.model.getParent(d));if(e.isTableRow(d))return e.setTableRowHeight(d,b-a.height),!0;0<a.height&&(b=Math.max(1,c.fromUnit(b)),u.checked&&(a.width=Math.round(a.width*b*100/a.height)/100),a.height=b)});(f.resizable||f.row||f.cell)&&a.appendChild(k);var w=this.createPanel();w.style.paddingBottom="30px";h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";
+h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("position"));w.appendChild(h);var x=this.addUnitInput(w,this.getUnit(),84,44,function(){m.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),A=this.addUnitInput(w,this.getUnit(),20,44,function(){n.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(w);this.addLabel(w,mxResources.get("left"),84);this.addLabel(w,mxResources.get("top"),20);var E=mxUtils.bind(this,function(a,b,c){f=this.format.getSelectionState();
+if(f.containsLabel||f.vertices.length!=e.getSelectionCount()||null==f.width||null==f.height)k.style.display="none";else{k.style.display="";if(c||document.activeElement!=p)p.value=this.inUnit(f.width)+(""==f.width?"":" "+this.getUnit());if(c||document.activeElement!=q)q.value=this.inUnit(f.height)+(""==f.height?"":" "+this.getUnit())}if(f.vertices.length==e.getSelectionCount()&&null!=f.x&&null!=f.y){w.style.display="";if(c||document.activeElement!=x)x.value=this.inUnit(f.x)+(""==f.x?"":" "+this.getUnit());
+if(c||document.activeElement!=A)A.value=this.inUnit(f.y)+(""==f.y?"":" "+this.getUnit())}else w.style.display="none"});this.addKeyHandler(x,E);this.addKeyHandler(A,E);d.addListener(mxEvent.CHANGE,E);this.listeners.push({destroy:function(){d.removeListener(E)}});E();m=this.addGeometryHandler(x,function(a,b){b=c.fromUnit(b);a.relative?a.offset.x=b:a.x=b});n=this.addGeometryHandler(A,function(a,b){b=c.fromUnit(b);a.relative?a.offset.y=b:a.y=b});if(f.movable){if(0==f.edges.length&&1==f.vertices.length&&
+d.isEdge(d.getParent(f.vertices[0]))){var H=e.getCellGeometry(f.vertices[0]);null!=H&&H.relative&&(h=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(a){d.beginUpdate();try{H=H.clone(),H.x=0,H.y=0,H.offset=new mxPoint,d.setGeometry(f.vertices[0],H)}finally{d.endUpdate()}})),h.setAttribute("title",mxResources.get("center")),h.style.width="202px",h.style.position="absolute",mxUtils.br(w),mxUtils.br(w),w.appendChild(h))}a.appendChild(w)}};
ArrangePanel.prototype.addGeometryHandler=function(a,c){function b(b){if(""!=a.value){var k=parseFloat(a.value);if(isNaN(k))a.value=d+" "+f.getUnit();else if(k!=d){e.getModel().beginUpdate();try{for(var g=f.format.getSelectionState().cells,l=0;l<g.length;l++)if(e.getModel().isVertex(g[l])){var m=e.getCellGeometry(g[l]);if(null!=m&&(m=m.clone(),!c(m,k,g[l]))){var n=e.view.getState(g[l]);null!=n&&e.isRecursiveVertexResize(n)&&e.resizeChildCells(g[l],m);e.getModel().setGeometry(g[l],m);e.constrainChildCells(g[l])}}}finally{e.getModel().endUpdate()}d=
k;a.value=k+" "+f.getUnit()}}mxEvent.consume(b)}var e=this.editorUi.editor.graph,d=null,f=this;mxEvent.addListener(a,"blur",b);mxEvent.addListener(a,"change",b);mxEvent.addListener(a,"focus",function(){d=a.value});return b};
ArrangePanel.prototype.addEdgeGeometryHandler=function(a,c){function b(b){if(""!=a.value){var k=parseFloat(a.value);if(isNaN(k))a.value=d+" pt";else if(k!=d){e.getModel().beginUpdate();try{for(var g=f.format.getSelectionState().cells,l=0;l<g.length;l++)if(e.getModel().isEdge(g[l])){var m=e.getCellGeometry(g[l]);null!=m&&(m=m.clone(),c(m,k),e.getModel().setGeometry(g[l],m))}}finally{e.getModel().endUpdate()}d=k;a.value=k+" pt"}}mxEvent.consume(b)}var e=this.editorUi.editor.graph,d=null,f=this;mxEvent.addListener(a,
"blur",b);mxEvent.addListener(a,"change",b);mxEvent.addListener(a,"focus",function(){d=a.value});return b};
ArrangePanel.prototype.addEdgeGeometry=function(a){var c=this.editorUi,b=c.editor.graph,e=this.format.getSelectionState(),d=this.createPanel(),f=document.createElement("div");f.style.position="absolute";f.style.width="70px";f.style.marginTop="0px";f.style.fontWeight="bold";mxUtils.write(f,mxResources.get("width"));d.appendChild(f);var k,h,g,l,m,n=this.addUnitInput(d,"pt",20,44,function(){k.apply(this,arguments)});mxUtils.br(d);this.addKeyHandler(n,x);k=mxUtils.bind(this,function(a){var d=parseInt(n.value),
d=Math.min(999,Math.max(1,isNaN(d)?1:d));if(d!=mxUtils.getValue(e.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var f=this.format.getSelectionState().cells;b.setCellStyles("width",d,f);c.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[d],"cells",f))}n.value=d+" pt";mxEvent.consume(a)});mxEvent.addListener(n,"blur",k);mxEvent.addListener(n,"change",k);a.appendChild(d);var p=this.createPanel();p.style.paddingBottom="30px";f=document.createElement("div");
-f.style.position="absolute";f.style.width="70px";f.style.marginTop="0px";f.style.fontWeight="bold";mxUtils.write(f,"Start");p.appendChild(f);var r=this.addUnitInput(p,"pt",84,44,function(){l.apply(this,arguments)}),u=this.addUnitInput(p,"pt",20,44,function(){m.apply(this,arguments)});mxUtils.br(p);this.addLabel(p,mxResources.get("left"),84);this.addLabel(p,mxResources.get("top"),20);a.appendChild(p);this.addKeyHandler(r,x);this.addKeyHandler(u,x);var t=this.createPanel();t.style.paddingBottom="30px";
-f=document.createElement("div");f.style.position="absolute";f.style.width="70px";f.style.marginTop="0px";f.style.fontWeight="bold";mxUtils.write(f,"End");t.appendChild(f);var v=this.addUnitInput(t,"pt",84,44,function(){h.apply(this,arguments)}),y=this.addUnitInput(t,"pt",20,44,function(){g.apply(this,arguments)});mxUtils.br(t);this.addLabel(t,mxResources.get("left"),84);this.addLabel(t,mxResources.get("top"),20);a.appendChild(t);this.addKeyHandler(v,x);this.addKeyHandler(y,x);var x=mxUtils.bind(this,
-function(a,c,f){e=this.format.getSelectionState();a=e.cells[0];if("link"==e.style.shape||"flexArrow"==e.style.shape){if(d.style.display="",f||document.activeElement!=n)f=mxUtils.getValue(e.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),n.value=f+" pt"}else d.style.display="none";1==e.cells.length&&b.model.isEdge(a)?(f=b.model.getGeometry(a),null!=f.sourcePoint&&null==b.model.getTerminal(a,!0)?(r.value=f.sourcePoint.x,u.value=f.sourcePoint.y):p.style.display="none",null!=
-f.targetPoint&&null==b.model.getTerminal(a,!1)?(v.value=f.targetPoint.x,y.value=f.targetPoint.y):t.style.display="none"):(p.style.display="none",t.style.display="none")});l=this.addEdgeGeometryHandler(r,function(a,b){a.sourcePoint.x=b});m=this.addEdgeGeometryHandler(u,function(a,b){a.sourcePoint.y=b});h=this.addEdgeGeometryHandler(v,function(a,b){a.targetPoint.x=b});g=this.addEdgeGeometryHandler(y,function(a,b){a.targetPoint.y=b});b.getModel().addListener(mxEvent.CHANGE,x);this.listeners.push({destroy:function(){b.getModel().removeListener(x)}});
+f.style.position="absolute";f.style.width="70px";f.style.marginTop="0px";f.style.fontWeight="bold";mxUtils.write(f,"Start");p.appendChild(f);var q=this.addUnitInput(p,"pt",84,44,function(){l.apply(this,arguments)}),t=this.addUnitInput(p,"pt",20,44,function(){m.apply(this,arguments)});mxUtils.br(p);this.addLabel(p,mxResources.get("left"),84);this.addLabel(p,mxResources.get("top"),20);a.appendChild(p);this.addKeyHandler(q,x);this.addKeyHandler(t,x);var v=this.createPanel();v.style.paddingBottom="30px";
+f=document.createElement("div");f.style.position="absolute";f.style.width="70px";f.style.marginTop="0px";f.style.fontWeight="bold";mxUtils.write(f,"End");v.appendChild(f);var u=this.addUnitInput(v,"pt",84,44,function(){h.apply(this,arguments)}),w=this.addUnitInput(v,"pt",20,44,function(){g.apply(this,arguments)});mxUtils.br(v);this.addLabel(v,mxResources.get("left"),84);this.addLabel(v,mxResources.get("top"),20);a.appendChild(v);this.addKeyHandler(u,x);this.addKeyHandler(w,x);var x=mxUtils.bind(this,
+function(a,c,f){e=this.format.getSelectionState();a=e.cells[0];if("link"==e.style.shape||"flexArrow"==e.style.shape){if(d.style.display="",f||document.activeElement!=n)f=mxUtils.getValue(e.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),n.value=f+" pt"}else d.style.display="none";1==e.cells.length&&b.model.isEdge(a)?(f=b.model.getGeometry(a),null!=f.sourcePoint&&null==b.model.getTerminal(a,!0)?(q.value=f.sourcePoint.x,t.value=f.sourcePoint.y):p.style.display="none",null!=
+f.targetPoint&&null==b.model.getTerminal(a,!1)?(u.value=f.targetPoint.x,w.value=f.targetPoint.y):v.style.display="none"):(p.style.display="none",v.style.display="none")});l=this.addEdgeGeometryHandler(q,function(a,b){a.sourcePoint.x=b});m=this.addEdgeGeometryHandler(t,function(a,b){a.sourcePoint.y=b});h=this.addEdgeGeometryHandler(u,function(a,b){a.targetPoint.x=b});g=this.addEdgeGeometryHandler(w,function(a,b){a.targetPoint.y=b});b.getModel().addListener(mxEvent.CHANGE,x);this.listeners.push({destroy:function(){b.getModel().removeListener(x)}});
x()};TextFormatPanel=function(a,c,b){BaseFormatPanel.call(this,a,c,b);this.init()};mxUtils.extend(TextFormatPanel,BaseFormatPanel);TextFormatPanel.prototype.init=function(){this.container.style.borderBottom="none";this.addFont(this.container)};
TextFormatPanel.prototype.addFont=function(a){function c(a,b){a.style.backgroundImage=b?Editor.isDarkMode()?"linear-gradient(rgb(0 161 241) 0px, rgb(0, 97, 146) 100%)":"linear-gradient(#c5ecff 0px,#87d4fb 100%)":""}var b=this.editorUi,e=b.editor.graph,d=this.format.getSelectionState(),f=this.createTitle(mxResources.get("font"));f.style.paddingLeft="18px";f.style.paddingTop="10px";f.style.paddingBottom="6px";a.appendChild(f);f=this.createPanel();f.style.paddingTop="2px";f.style.paddingBottom="2px";
f.style.position="relative";f.style.marginLeft="-2px";f.style.borderWidth="0px";f.className="geToolbarContainer";if(e.cellEditor.isContentEditing()){var k=f.cloneNode(),h=this.editorUi.toolbar.addMenu(mxResources.get("style"),mxResources.get("style"),!0,"formatBlock",k,null,!0);h.style.color="rgb(112, 112, 112)";h.style.whiteSpace="nowrap";h.style.overflow="hidden";h.style.margin="0px";this.addArrow(h);h.style.width="192px";h.style.height="15px";h=h.getElementsByTagName("div")[0];h.style.cssFloat=
"right";a.appendChild(k)}a.appendChild(f);k=this.createPanel();k.style.marginTop="8px";k.style.borderTop="1px solid #c0c0c0";k.style.paddingTop="6px";k.style.paddingBottom="6px";var g=this.editorUi.toolbar.addMenu("Helvetica",mxResources.get("fontFamily"),!0,"fontFamily",f,null,!0);g.style.color="rgb(112, 112, 112)";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.margin="0px";this.addArrow(g);g.style.width="192px";g.style.height="15px";h=f.cloneNode(!1);h.style.marginLeft="-3px";var l=
this.editorUi.toolbar.addItems(["bold","italic","underline"],h,!0);l[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");l[1].setAttribute("title",mxResources.get("italic")+" ("+this.editorUi.actions.get("italic").shortcut+")");l[2].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+")");var m=this.editorUi.toolbar.addItems(["vertical"],h,!0)[0];a.appendChild(h);this.styleButtons(l);this.styleButtons([m]);
-var n=f.cloneNode(!1);n.style.marginLeft="-3px";n.style.paddingBottom="0px";var p=function(a){return function(){return a()}},r=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),e.cellEditor.isContentEditing()?function(a){e.cellEditor.alignText(mxConstants.ALIGN_LEFT,a)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),n),u=this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),e.cellEditor.isContentEditing()?
-function(a){e.cellEditor.alignText(mxConstants.ALIGN_CENTER,a)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),n),t=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),e.cellEditor.isContentEditing()?function(a){e.cellEditor.alignText(mxConstants.ALIGN_RIGHT,a)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),n);this.styleButtons([r,u,t]);if(e.cellEditor.isContentEditing()){var v=
-this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},h);this.styleButtons([v]);v.firstChild.style.background="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjR2MjRIMFYweiIvPjwvZGVmcz48Y2xpcFBhdGggaWQ9ImIiPjx1c2UgeGxpbms6aHJlZj0iI2EiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9jbGlwUGF0aD48cGF0aCBjbGlwLXBhdGg9InVybCgjYikiIGZpbGw9IiMwMTAxMDEiIGQ9Ik03LjI0IDguNzVjLS4yNi0uNDgtLjM5LTEuMDMtLjM5LTEuNjcgMC0uNjEuMTMtMS4xNi40LTEuNjcuMjYtLjUuNjMtLjkzIDEuMTEtMS4yOS40OC0uMzUgMS4wNS0uNjMgMS43LS44My42Ni0uMTkgMS4zOS0uMjkgMi4xOC0uMjkuODEgMCAxLjU0LjExIDIuMjEuMzQuNjYuMjIgMS4yMy41NCAxLjY5Ljk0LjQ3LjQuODMuODggMS4wOCAxLjQzLjI1LjU1LjM4IDEuMTUuMzggMS44MWgtMy4wMWMwLS4zMS0uMDUtLjU5LS4xNS0uODUtLjA5LS4yNy0uMjQtLjQ5LS40NC0uNjgtLjItLjE5LS40NS0uMzMtLjc1LS40NC0uMy0uMS0uNjYtLjE2LTEuMDYtLjE2LS4zOSAwLS43NC4wNC0xLjAzLjEzLS4yOS4wOS0uNTMuMjEtLjcyLjM2LS4xOS4xNi0uMzQuMzQtLjQ0LjU1LS4xLjIxLS4xNS40My0uMTUuNjYgMCAuNDguMjUuODguNzQgMS4yMS4zOC4yNS43Ny40OCAxLjQxLjdINy4zOWMtLjA1LS4wOC0uMTEtLjE3LS4xNS0uMjV6TTIxIDEydi0ySDN2Mmg5LjYyYy4xOC4wNy40LjE0LjU1LjIuMzcuMTcuNjYuMzQuODcuNTEuMjEuMTcuMzUuMzYuNDMuNTcuMDcuMi4xMS40My4xMS42OSAwIC4yMy0uMDUuNDUtLjE0LjY2LS4wOS4yLS4yMy4zOC0uNDIuNTMtLjE5LjE1LS40Mi4yNi0uNzEuMzUtLjI5LjA4LS42My4xMy0xLjAxLjEzLS40MyAwLS44My0uMDQtMS4xOC0uMTNzLS42Ni0uMjMtLjkxLS40MmMtLjI1LS4xOS0uNDUtLjQ0LS41OS0uNzUtLjE0LS4zMS0uMjUtLjc2LS4yNS0xLjIxSDYuNGMwIC41NS4wOCAxLjEzLjI0IDEuNTguMTYuNDUuMzcuODUuNjUgMS4yMS4yOC4zNS42LjY2Ljk4LjkyLjM3LjI2Ljc4LjQ4IDEuMjIuNjUuNDQuMTcuOS4zIDEuMzguMzkuNDguMDguOTYuMTMgMS40NC4xMy44IDAgMS41My0uMDkgMi4xOC0uMjhzMS4yMS0uNDUgMS42Ny0uNzljLjQ2LS4zNC44Mi0uNzcgMS4wNy0xLjI3cy4zOC0xLjA3LjM4LTEuNzFjMC0uNi0uMS0xLjE0LS4zMS0xLjYxLS4wNS0uMTEtLjExLS4yMy0uMTctLjMzSDIxeiIvPjwvc3ZnPg==)";
-v.firstChild.style.backgroundPosition="2px 2px";v.firstChild.style.backgroundSize="18px 18px";this.styleButtons([v])}var y=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),n),x=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),n),B=this.editorUi.toolbar.addButton("geSprite-bottom",
-mxResources.get("bottom"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),n);this.styleButtons([y,x,B]);a.appendChild(n);var E,G,A,F,z,H,K;e.cellEditor.isContentEditing()?(y.style.display="none",x.style.display="none",B.style.display="none",m.style.display="none",A=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==A.style.opacity&&document.execCommand("justifyfull",!1,null)},n),A.style.marginRight=
-"9px",A.style.opacity=1,this.styleButtons([A,E=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},n),G=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},n)]),E.style.marginLeft="9px",p=n.cloneNode(!1),p.style.paddingTop="4px",n=[this.editorUi.toolbar.addButton("geSprite-orderedlist",
+var n=f.cloneNode(!1);n.style.marginLeft="-3px";n.style.paddingBottom="0px";var p=function(a){return function(){return a()}},q=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),e.cellEditor.isContentEditing()?function(a){e.cellEditor.alignText(mxConstants.ALIGN_LEFT,a)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),n),t=this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),e.cellEditor.isContentEditing()?
+function(a){e.cellEditor.alignText(mxConstants.ALIGN_CENTER,a)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),n),v=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),e.cellEditor.isContentEditing()?function(a){e.cellEditor.alignText(mxConstants.ALIGN_RIGHT,a)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),n);this.styleButtons([q,t,v]);if(e.cellEditor.isContentEditing()){var u=
+this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},h);this.styleButtons([u]);u.firstChild.style.background="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjR2MjRIMFYweiIvPjwvZGVmcz48Y2xpcFBhdGggaWQ9ImIiPjx1c2UgeGxpbms6aHJlZj0iI2EiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9jbGlwUGF0aD48cGF0aCBjbGlwLXBhdGg9InVybCgjYikiIGZpbGw9IiMwMTAxMDEiIGQ9Ik03LjI0IDguNzVjLS4yNi0uNDgtLjM5LTEuMDMtLjM5LTEuNjcgMC0uNjEuMTMtMS4xNi40LTEuNjcuMjYtLjUuNjMtLjkzIDEuMTEtMS4yOS40OC0uMzUgMS4wNS0uNjMgMS43LS44My42Ni0uMTkgMS4zOS0uMjkgMi4xOC0uMjkuODEgMCAxLjU0LjExIDIuMjEuMzQuNjYuMjIgMS4yMy41NCAxLjY5Ljk0LjQ3LjQuODMuODggMS4wOCAxLjQzLjI1LjU1LjM4IDEuMTUuMzggMS44MWgtMy4wMWMwLS4zMS0uMDUtLjU5LS4xNS0uODUtLjA5LS4yNy0uMjQtLjQ5LS40NC0uNjgtLjItLjE5LS40NS0uMzMtLjc1LS40NC0uMy0uMS0uNjYtLjE2LTEuMDYtLjE2LS4zOSAwLS43NC4wNC0xLjAzLjEzLS4yOS4wOS0uNTMuMjEtLjcyLjM2LS4xOS4xNi0uMzQuMzQtLjQ0LjU1LS4xLjIxLS4xNS40My0uMTUuNjYgMCAuNDguMjUuODguNzQgMS4yMS4zOC4yNS43Ny40OCAxLjQxLjdINy4zOWMtLjA1LS4wOC0uMTEtLjE3LS4xNS0uMjV6TTIxIDEydi0ySDN2Mmg5LjYyYy4xOC4wNy40LjE0LjU1LjIuMzcuMTcuNjYuMzQuODcuNTEuMjEuMTcuMzUuMzYuNDMuNTcuMDcuMi4xMS40My4xMS42OSAwIC4yMy0uMDUuNDUtLjE0LjY2LS4wOS4yLS4yMy4zOC0uNDIuNTMtLjE5LjE1LS40Mi4yNi0uNzEuMzUtLjI5LjA4LS42My4xMy0xLjAxLjEzLS40MyAwLS44My0uMDQtMS4xOC0uMTNzLS42Ni0uMjMtLjkxLS40MmMtLjI1LS4xOS0uNDUtLjQ0LS41OS0uNzUtLjE0LS4zMS0uMjUtLjc2LS4yNS0xLjIxSDYuNGMwIC41NS4wOCAxLjEzLjI0IDEuNTguMTYuNDUuMzcuODUuNjUgMS4yMS4yOC4zNS42LjY2Ljk4LjkyLjM3LjI2Ljc4LjQ4IDEuMjIuNjUuNDQuMTcuOS4zIDEuMzguMzkuNDguMDguOTYuMTMgMS40NC4xMy44IDAgMS41My0uMDkgMi4xOC0uMjhzMS4yMS0uNDUgMS42Ny0uNzljLjQ2LS4zNC44Mi0uNzcgMS4wNy0xLjI3cy4zOC0xLjA3LjM4LTEuNzFjMC0uNi0uMS0xLjE0LS4zMS0xLjYxLS4wNS0uMTEtLjExLS4yMy0uMTctLjMzSDIxeiIvPjwvc3ZnPg==)";
+u.firstChild.style.backgroundPosition="2px 2px";u.firstChild.style.backgroundSize="18px 18px";this.styleButtons([u])}var w=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),n),x=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),n),A=this.editorUi.toolbar.addButton("geSprite-bottom",
+mxResources.get("bottom"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),n);this.styleButtons([w,x,A]);a.appendChild(n);var E,H,B,G,y,I,K;e.cellEditor.isContentEditing()?(w.style.display="none",x.style.display="none",A.style.display="none",m.style.display="none",B=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==B.style.opacity&&document.execCommand("justifyfull",!1,null)},n),B.style.marginRight=
+"9px",B.style.opacity=1,this.styleButtons([B,E=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},n),H=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},n)]),E.style.marginLeft="9px",p=n.cloneNode(!1),p.style.paddingTop="4px",n=[this.editorUi.toolbar.addButton("geSprite-orderedlist",
mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent",
-!1,null)},p),this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){e.cellEditor.toggleViewMode()},p)],this.styleButtons(n),n[n.length-2].style.marginLeft="9px",a.appendChild(p)):(l[2].style.marginRight="9px",t.style.marginRight="9px");n=f.cloneNode(!1);n.style.marginLeft="0px";n.style.paddingTop="8px";n.style.paddingBottom=
-"4px";n.style.fontWeight="normal";mxUtils.write(n,mxResources.get("position"));var L=document.createElement("select");L.style.position="absolute";L.style.right="20px";L.style.width="97px";L.style.marginTop="-2px";for(var v="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),O={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],
+!1,null)},p),this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){e.cellEditor.toggleViewMode()},p)],this.styleButtons(n),n[n.length-2].style.marginLeft="9px",a.appendChild(p)):(l[2].style.marginRight="9px",v.style.marginRight="9px");n=f.cloneNode(!1);n.style.marginLeft="0px";n.style.paddingTop="8px";n.style.paddingBottom=
+"4px";n.style.fontWeight="normal";mxUtils.write(n,mxResources.get("position"));var M=document.createElement("select");M.style.position="absolute";M.style.right="20px";M.style.width="97px";M.style.marginTop="-2px";for(var u="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),O={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],
topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,
-mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]},p=0;p<v.length;p++){var J=document.createElement("option");J.setAttribute("value",v[p]);mxUtils.write(J,mxResources.get(v[p]));L.appendChild(J)}n.appendChild(L);v=f.cloneNode(!1);v.style.marginLeft="0px";v.style.paddingTop="4px";v.style.paddingBottom="4px";v.style.fontWeight=
-"normal";mxUtils.write(v,mxResources.get("writingDirection"));var U=document.createElement("select");U.style.position="absolute";U.style.right="20px";U.style.width="97px";U.style.marginTop="-2px";for(var J=["automatic","leftToRight","rightToLeft"],aa={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},p=0;p<J.length;p++){var ba=document.createElement("option");ba.setAttribute("value",J[p]);mxUtils.write(ba,mxResources.get(J[p]));U.appendChild(ba)}v.appendChild(U);
-e.isEditing()||(a.appendChild(n),mxEvent.addListener(L,"change",function(a){e.getModel().beginUpdate();try{var b=O[L.value];null!=b&&(e.setCellStyles(mxConstants.STYLE_LABEL_POSITION,b[0],d.cells),e.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,b[1],d.cells),e.setCellStyles(mxConstants.STYLE_ALIGN,b[2],d.cells),e.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,b[3],d.cells))}finally{e.getModel().endUpdate()}mxEvent.consume(a)}),a.appendChild(v),mxEvent.addListener(U,"change",function(a){e.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,
-aa[U.value],d.cells);mxEvent.consume(a)}));var R=document.createElement("input");R.style.textAlign="right";R.style.marginTop="4px";R.style.position="absolute";R.style.right="32px";R.style.width="40px";R.style.height="17px";h.appendChild(R);var Q=null,n=this.installInputHandler(R,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," pt",function(a){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var b=function(b,d){null!=e.cellEditor.textarea&&b!=e.cellEditor.textarea&&e.cellEditor.textarea.contains(b)&&
+mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]},p=0;p<u.length;p++){var J=document.createElement("option");J.setAttribute("value",u[p]);mxUtils.write(J,mxResources.get(u[p]));M.appendChild(J)}n.appendChild(M);u=f.cloneNode(!1);u.style.marginLeft="0px";u.style.paddingTop="4px";u.style.paddingBottom="4px";u.style.fontWeight=
+"normal";mxUtils.write(u,mxResources.get("writingDirection"));var U=document.createElement("select");U.style.position="absolute";U.style.right="20px";U.style.width="97px";U.style.marginTop="-2px";for(var J=["automatic","leftToRight","rightToLeft"],ba={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},p=0;p<J.length;p++){var ca=document.createElement("option");ca.setAttribute("value",J[p]);mxUtils.write(ca,mxResources.get(J[p]));U.appendChild(ca)}u.appendChild(U);
+e.isEditing()||(a.appendChild(n),mxEvent.addListener(M,"change",function(a){e.getModel().beginUpdate();try{var b=O[M.value];null!=b&&(e.setCellStyles(mxConstants.STYLE_LABEL_POSITION,b[0],d.cells),e.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,b[1],d.cells),e.setCellStyles(mxConstants.STYLE_ALIGN,b[2],d.cells),e.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,b[3],d.cells))}finally{e.getModel().endUpdate()}mxEvent.consume(a)}),a.appendChild(u),mxEvent.addListener(U,"change",function(a){e.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,
+ba[U.value],d.cells);mxEvent.consume(a)}));var R=document.createElement("input");R.style.textAlign="right";R.style.marginTop="4px";R.style.position="absolute";R.style.right="32px";R.style.width="40px";R.style.height="17px";h.appendChild(R);var Q=null,n=this.installInputHandler(R,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," pt",function(a){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var b=function(b,d){null!=e.cellEditor.textarea&&b!=e.cellEditor.textarea&&e.cellEditor.textarea.contains(b)&&
(d||c.containsNode(b,!0))&&("FONT"==b.nodeName?(b.removeAttribute("size"),b.style.fontSize=a+"px"):mxUtils.getCurrentStyle(b).fontSize!=a+"px"&&(mxUtils.getCurrentStyle(b.parentNode).fontSize!=a+"px"?b.style.fontSize=a+"px":b.style.fontSize=""))},c=window.getSelection(),d=0<c.rangeCount?c.getRangeAt(0).commonAncestorContainer:e.cellEditor.textarea;d!=e.cellEditor.textarea&&d.nodeType==mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",!1,"1");d!=e.cellEditor.textarea&&(d=d.parentNode);
if(null!=d&&d.nodeType==mxConstants.NODETYPE_ELEMENT){var f=d.getElementsByTagName("*");b(d);for(d=0;d<f.length;d++)b(f[d])}R.value=a+" pt"}else if(window.getSelection||document.selection)if(b=function(a,b){for(;null!=b;){if(b===a)return!0;b=b.parentNode}return!1},f=null,document.selection?f=document.selection.createRange().parentElement():(c=window.getSelection(),0<c.rangeCount&&(f=c.getRangeAt(0).commonAncestorContainer)),null!=f&&b(e.cellEditor.textarea,f))for(Q=a,document.execCommand("fontSize",
!1,"4"),f=e.cellEditor.textarea.getElementsByTagName("font"),d=0;d<f.length;d++)if("4"==f[d].getAttribute("size")){f[d].removeAttribute("size");f[d].style.fontSize=Q+"px";window.setTimeout(function(){R.value=Q+" pt";Q=null},0);break}},!0),n=this.createStepper(R,n,1,10,!0,Menus.prototype.defaultFontSize);n.style.display=R.style.display;n.style.marginTop="4px";n.style.right="20px";h.appendChild(n);h=g.getElementsByTagName("div")[0];h.style.cssFloat="right";var P=null,T="#ffffff",ea=null,ka="#000000",
@@ -3051,29 +3070,29 @@ color:b[d].getAttribute("color")});document.execCommand("forecolor",!1,a!=mxCons
null,d.cells);e.setCellStyles(mxConstants.STYLE_FONTCOLOR,a,d.cells);e.updateLabelElements(d.cells,function(a){a.removeAttribute("color");a.style.color=null})},Editor.isDarkMode()?"#ffffff":"#000000");h.style.fontWeight="bold";k.appendChild(h);k.appendChild(na);e.cellEditor.isContentEditing()||k.appendChild(oa);a.appendChild(k);k=this.createPanel();k.style.paddingTop="2px";k.style.paddingBottom="4px";h=e.filterSelectionCells(mxUtils.bind(this,function(a){var b=e.view.getState(a);return null==b||this.format.isAutoSizeState(b)||
e.getModel().isEdge(a)||!e.isTableRow(a)&&!e.isTableCell(a)&&!e.isCellResizable(a)}));n=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0,h);n.style.fontWeight="bold";0<h.length&&k.appendChild(n);h=this.createCellOption(mxResources.get("formattedText"),"html",0,null,null,null,b.actions.get("formattedText"));h.style.fontWeight="bold";k.appendChild(h);h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="28px";h.style.fontWeight=
"normal";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("spacing"));h.appendChild(n);var fa,pa,ta,qa,ua,la=this.addUnitInput(h,"pt",91,44,function(){fa.apply(this,arguments)}),ha=this.addUnitInput(h,"pt",20,44,function(){pa.apply(this,arguments)});mxUtils.br(h);this.addLabel(h,mxResources.get("top"),91);this.addLabel(h,mxResources.get("global"),20);mxUtils.br(h);mxUtils.br(h);var ia=
-this.addUnitInput(h,"pt",162,44,function(){ta.apply(this,arguments)}),ca=this.addUnitInput(h,"pt",91,44,function(){qa.apply(this,arguments)}),ga=this.addUnitInput(h,"pt",20,44,function(){ua.apply(this,arguments)});mxUtils.br(h);this.addLabel(h,mxResources.get("left"),162);this.addLabel(h,mxResources.get("bottom"),91);this.addLabel(h,mxResources.get("right"),20);if(e.cellEditor.isContentEditing()){var ma=null,ja=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(a){var b=
+this.addUnitInput(h,"pt",162,44,function(){ta.apply(this,arguments)}),da=this.addUnitInput(h,"pt",91,44,function(){qa.apply(this,arguments)}),ga=this.addUnitInput(h,"pt",20,44,function(){ua.apply(this,arguments)});mxUtils.br(h);this.addLabel(h,mxResources.get("left"),162);this.addLabel(h,mxResources.get("bottom"),91);this.addLabel(h,mxResources.get("right"),20);if(e.cellEditor.isContentEditing()){var ma=null,ja=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(a){var b=
""==a.value?120:parseInt(a.value),b=Math.max(0,isNaN(b)?120:b);null!=ma&&(e.cellEditor.restoreSelection(ma),ma=null);for(var c=e.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;null!=c&&c==e.cellEditor.textarea&&null!=e.cellEditor.textarea.firstChild&&("P"!=e.cellEditor.textarea.firstChild.nodeName&&(e.cellEditor.textarea.innerHTML="<p>"+e.cellEditor.textarea.innerHTML+"</p>"),c=e.cellEditor.textarea.firstChild);null!=c&&null!=e.cellEditor.textarea&&c!=e.cellEditor.textarea&&
e.cellEditor.textarea.contains(c)&&(c.style.lineHeight=b+"%");a.value=b+" %"},function(a){ja=a;mxEvent.addListener(a,"mousedown",function(){document.activeElement==e.cellEditor.textarea&&(ma=e.cellEditor.saveSelection())});mxEvent.addListener(a,"touchstart",function(){document.activeElement==e.cellEditor.textarea&&(ma=e.cellEditor.saveSelection())});a.value="120 %"}));k=f.cloneNode(!1);k.style.paddingLeft="0px";h=this.editorUi.toolbar.addItems(["link","image"],k,!0);n=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",
-mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},k),this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a)}))];this.styleButtons(h);this.styleButtons(n);h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="10px";h.appendChild(this.createTitle(mxResources.get("insert")));h.appendChild(k);a.appendChild(h);h=f.cloneNode(!1);
-h.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=z&&e.insertColumn(z,null!=H?H.cellIndex:0)}catch(W){this.editorUi.handleError(W)}}),h),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=z&&e.insertColumn(z,null!=H?H.cellIndex+1:-1)}catch(W){this.editorUi.handleError(W)}}),h),this.editorUi.toolbar.addButton("geSprite-deletecolumn",
-mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=z&&null!=H&&e.deleteColumn(z,H.cellIndex)}catch(W){this.editorUi.handleError(W)}}),h),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=z&&null!=K&&e.insertRow(z,K.sectionRowIndex)}catch(W){this.editorUi.handleError(W)}}),h),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=
-z&&null!=K&&e.insertRow(z,K.sectionRowIndex+1)}catch(W){this.editorUi.handleError(W)}}),h),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=z&&null!=K&&e.deleteRow(z,K.sectionRowIndex)}catch(W){this.editorUi.handleError(W)}}),h)];this.styleButtons(n);n[2].style.marginRight="9px";k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("table")));k.appendChild(h);
-f=f.cloneNode(!1);f.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,function(a){if(null!=z){var b=z.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(b,function(b){var c=null==H||null!=a&&mxEvent.isShiftDown(a)?z:H;e.processElements(c,
-function(a){a.style.border=null});null==b||b==mxConstants.NONE?(c.removeAttribute("border"),c.style.border="",c.style.borderCollapse=""):(c.setAttribute("border","1"),c.style.border="1px solid "+b,c.style.borderCollapse="collapse")})}}),f),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(a){if(null!=z){var b=z.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+
-("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(b,function(b){var c=null==H||null!=a&&mxEvent.isShiftDown(a)?z:H;e.processElements(c,function(a){a.style.backgroundColor=null});c.style.backgroundColor=null==b||b==mxConstants.NONE?"":b})}}),f),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=z){var a=z.getAttribute("cellPadding")||0,a=new FilenameDialog(b,a,mxResources.get("apply"),mxUtils.bind(this,
-function(a){null!=a&&0<a.length?z.setAttribute("cellPadding",a):z.removeAttribute("cellPadding")}),mxResources.get("spacing"));b.showDialog(a.container,300,80,!0,!0);a.init()}},f),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=z&&z.setAttribute("align","left")},f),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=z&&z.setAttribute("align","center")},f),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),
-function(){null!=z&&z.setAttribute("align","right")},f)];this.styleButtons(n);n[2].style.marginRight="9px";k.appendChild(f);a.appendChild(k);F=k}else a.appendChild(k),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(h);var V=mxUtils.bind(this,function(a,b,e){d=this.format.getSelectionState();a=mxUtils.getValue(d.style,mxConstants.STYLE_FONTSTYLE,0);c(l[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(l[1],(a&mxConstants.FONT_ITALIC)==
+mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},k),this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a,null,null,!1)}))];this.styleButtons(h);this.styleButtons(n);h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="10px";h.appendChild(this.createTitle(mxResources.get("insert")));h.appendChild(k);a.appendChild(h);h=
+f.cloneNode(!1);h.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=y&&e.insertColumn(y,null!=I?I.cellIndex:0)}catch(Y){this.editorUi.handleError(Y)}}),h),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=y&&e.insertColumn(y,null!=I?I.cellIndex+1:-1)}catch(Y){this.editorUi.handleError(Y)}}),h),this.editorUi.toolbar.addButton("geSprite-deletecolumn",
+mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=y&&null!=I&&e.deleteColumn(y,I.cellIndex)}catch(Y){this.editorUi.handleError(Y)}}),h),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=y&&null!=K&&e.insertRow(y,K.sectionRowIndex)}catch(Y){this.editorUi.handleError(Y)}}),h),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=
+y&&null!=K&&e.insertRow(y,K.sectionRowIndex+1)}catch(Y){this.editorUi.handleError(Y)}}),h),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=y&&null!=K&&e.deleteRow(y,K.sectionRowIndex)}catch(Y){this.editorUi.handleError(Y)}}),h)];this.styleButtons(n);n[2].style.marginRight="9px";k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("table")));k.appendChild(h);
+f=f.cloneNode(!1);f.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,function(a){if(null!=y){var b=y.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(b,function(b){var c=null==I||null!=a&&mxEvent.isShiftDown(a)?y:I;e.processElements(c,
+function(a){a.style.border=null});null==b||b==mxConstants.NONE?(c.removeAttribute("border"),c.style.border="",c.style.borderCollapse=""):(c.setAttribute("border","1"),c.style.border="1px solid "+b,c.style.borderCollapse="collapse")})}}),f),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(a){if(null!=y){var b=y.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+
+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(b,function(b){var c=null==I||null!=a&&mxEvent.isShiftDown(a)?y:I;e.processElements(c,function(a){a.style.backgroundColor=null});c.style.backgroundColor=null==b||b==mxConstants.NONE?"":b})}}),f),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=y){var a=y.getAttribute("cellPadding")||0,a=new FilenameDialog(b,a,mxResources.get("apply"),mxUtils.bind(this,
+function(a){null!=a&&0<a.length?y.setAttribute("cellPadding",a):y.removeAttribute("cellPadding")}),mxResources.get("spacing"));b.showDialog(a.container,300,80,!0,!0);a.init()}},f),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=y&&y.setAttribute("align","left")},f),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=y&&y.setAttribute("align","center")},f),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),
+function(){null!=y&&y.setAttribute("align","right")},f)];this.styleButtons(n);n[2].style.marginRight="9px";k.appendChild(f);a.appendChild(k);G=k}else a.appendChild(k),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(h);var X=mxUtils.bind(this,function(a,b,e){d=this.format.getSelectionState();a=mxUtils.getValue(d.style,mxConstants.STYLE_FONTSTYLE,0);c(l[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(l[1],(a&mxConstants.FONT_ITALIC)==
mxConstants.FONT_ITALIC);c(l[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);g.firstChild.nodeValue=mxUtils.getValue(d.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);c(m,"0"==mxUtils.getValue(d.style,mxConstants.STYLE_HORIZONTAL,"1"));if(e||document.activeElement!=R)a=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),R.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(d.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);
-c(r,a==mxConstants.ALIGN_LEFT);c(u,a==mxConstants.ALIGN_CENTER);c(t,a==mxConstants.ALIGN_RIGHT);a=mxUtils.getValue(d.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(y,a==mxConstants.ALIGN_TOP);c(x,a==mxConstants.ALIGN_MIDDLE);c(B,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(d.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);b=mxUtils.getValue(d.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);L.value=a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_TOP?
+c(q,a==mxConstants.ALIGN_LEFT);c(t,a==mxConstants.ALIGN_CENTER);c(v,a==mxConstants.ALIGN_RIGHT);a=mxUtils.getValue(d.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(w,a==mxConstants.ALIGN_TOP);c(x,a==mxConstants.ALIGN_MIDDLE);c(A,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(d.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);b=mxUtils.getValue(d.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);M.value=a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_TOP?
"topLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_TOP?"top":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_TOP?"topRight":a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_BOTTOM?"bottomLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_BOTTOM?"bottom":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_BOTTOM?"bottomRight":a==mxConstants.ALIGN_LEFT?"left":a==mxConstants.ALIGN_RIGHT?"right":"center";a=mxUtils.getValue(d.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);
a==mxConstants.TEXT_DIRECTION_RTL?U.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR?U.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(U.value="automatic");if(e||document.activeElement!=ha)a=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_SPACING,2)),ha.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=la)a=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_SPACING_TOP,0)),la.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=ga)a=parseFloat(mxUtils.getValue(d.style,
-mxConstants.STYLE_SPACING_RIGHT,0)),ga.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=ca)a=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_SPACING_BOTTOM,0)),ca.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=ia)a=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_SPACING_LEFT,0)),ia.value=isNaN(a)?"":a+" pt"});pa=this.installInputHandler(ha,mxConstants.STYLE_SPACING,2,-999,999," pt");fa=this.installInputHandler(la,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");ua=this.installInputHandler(ga,
-mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");qa=this.installInputHandler(ca,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");ta=this.installInputHandler(ia,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(R,V);this.addKeyHandler(ha,V);this.addKeyHandler(la,V);this.addKeyHandler(ga,V);this.addKeyHandler(ca,V);this.addKeyHandler(ia,V);e.getModel().addListener(mxEvent.CHANGE,V);this.listeners.push({destroy:function(){e.getModel().removeListener(V)}});V();if(e.cellEditor.isContentEditing()){var ra=
+mxConstants.STYLE_SPACING_RIGHT,0)),ga.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=da)a=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_SPACING_BOTTOM,0)),da.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=ia)a=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_SPACING_LEFT,0)),ia.value=isNaN(a)?"":a+" pt"});pa=this.installInputHandler(ha,mxConstants.STYLE_SPACING,2,-999,999," pt");fa=this.installInputHandler(la,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");ua=this.installInputHandler(ga,
+mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");qa=this.installInputHandler(da,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");ta=this.installInputHandler(ia,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(R,X);this.addKeyHandler(ha,X);this.addKeyHandler(la,X);this.addKeyHandler(ga,X);this.addKeyHandler(da,X);this.addKeyHandler(ia,X);e.getModel().addListener(mxEvent.CHANGE,X);this.listeners.push({destroy:function(){e.getModel().removeListener(X)}});X();if(e.cellEditor.isContentEditing()){var ra=
!1,f=function(){ra||(ra=!0,window.setTimeout(function(){var a=e.getSelectedEditingElement();if(null!=a){var b=function(a,b){if(null!=a&&null!=b){if(a==b)return!0;if(a.length>b.length+1)return a.substring(a.length-b.length-1,a.length)=="-"+b}return!1},f=function(b){if(null!=e.getParentByName(a,b,e.cellEditor.textarea))return!0;for(var c=a;null!=c&&1==c.childNodes.length;)if(c=c.childNodes[0],c.nodeName==b)return!0;return!1},k=function(a){a=null!=a?a.fontSize:null;return null!=a&&"px"==a.substring(a.length-
-2)?parseFloat(a):mxConstants.DEFAULT_FONTSIZE},h=function(a,b,c){return null!=c.style&&null!=b?(b=b.lineHeight,null!=c.style.lineHeight&&"%"==c.style.lineHeight.substring(c.style.lineHeight.length-1)?parseInt(c.style.lineHeight)/100:"px"==b.substring(b.length-2)?parseFloat(b)/a:parseInt(b)):""},m=mxUtils.getCurrentStyle(a),n=k(m),p=h(n,m,a),v=a.getElementsByTagName("*");if(0<v.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var y=window.getSelection(),x=0;x<v.length;x++)if(y.containsNode(v[x],
-!0)){temp=mxUtils.getCurrentStyle(v[x]);var n=Math.max(k(temp),n),B=h(n,temp,v[x]);if(B!=p||isNaN(B))p=""}null!=m&&(c(l[0],"bold"==m.fontWeight||400<m.fontWeight||f("B")||f("STRONG")),c(l[1],"italic"==m.fontStyle||f("I")||f("EM")),c(l[2],f("U")),c(G,f("SUP")),c(E,f("SUB")),e.cellEditor.isTableSelected()?(c(A,b(m.textAlign,"justify")),c(r,b(m.textAlign,"left")),c(u,b(m.textAlign,"center")),c(t,b(m.textAlign,"right"))):(f=e.cellEditor.align||mxUtils.getValue(d.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),
-b(m.textAlign,"justify")?(c(A,b(m.textAlign,"justify")),c(r,!1),c(u,!1),c(t,!1)):(c(A,!1),c(r,f==mxConstants.ALIGN_LEFT),c(u,f==mxConstants.ALIGN_CENTER),c(t,f==mxConstants.ALIGN_RIGHT))),z=e.getParentByName(a,"TABLE",e.cellEditor.textarea),K=null==z?null:e.getParentByName(a,"TR",z),H=null==z?null:e.getParentByNames(a,["TD","TH"],z),F.style.display=null!=z?"":"none",document.activeElement!=R&&("FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=Q?(a.removeAttribute("size"),a.style.fontSize=Q+" pt",
-Q=null):R.value=isNaN(n)?"":n+" pt",B=parseFloat(p),isNaN(B)?ja.value="100 %":ja.value=Math.round(100*B)+" %"),b=m.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),n=m.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+
+2)?parseFloat(a):mxConstants.DEFAULT_FONTSIZE},h=function(a,b,c){return null!=c.style&&null!=b?(b=b.lineHeight,null!=c.style.lineHeight&&"%"==c.style.lineHeight.substring(c.style.lineHeight.length-1)?parseInt(c.style.lineHeight)/100:"px"==b.substring(b.length-2)?parseFloat(b)/a:parseInt(b)):""},m=mxUtils.getCurrentStyle(a),n=k(m),p=h(n,m,a),u=a.getElementsByTagName("*");if(0<u.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var w=window.getSelection(),x=0;x<u.length;x++)if(w.containsNode(u[x],
+!0)){temp=mxUtils.getCurrentStyle(u[x]);var n=Math.max(k(temp),n),A=h(n,temp,u[x]);if(A!=p||isNaN(A))p=""}null!=m&&(c(l[0],"bold"==m.fontWeight||400<m.fontWeight||f("B")||f("STRONG")),c(l[1],"italic"==m.fontStyle||f("I")||f("EM")),c(l[2],f("U")),c(H,f("SUP")),c(E,f("SUB")),e.cellEditor.isTableSelected()?(c(B,b(m.textAlign,"justify")),c(q,b(m.textAlign,"left")),c(t,b(m.textAlign,"center")),c(v,b(m.textAlign,"right"))):(f=e.cellEditor.align||mxUtils.getValue(d.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),
+b(m.textAlign,"justify")?(c(B,b(m.textAlign,"justify")),c(q,!1),c(t,!1),c(v,!1)):(c(B,!1),c(q,f==mxConstants.ALIGN_LEFT),c(t,f==mxConstants.ALIGN_CENTER),c(v,f==mxConstants.ALIGN_RIGHT))),y=e.getParentByName(a,"TABLE",e.cellEditor.textarea),K=null==y?null:e.getParentByName(a,"TR",y),I=null==y?null:e.getParentByNames(a,["TD","TH"],y),G.style.display=null!=y?"":"none",document.activeElement!=R&&("FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=Q?(a.removeAttribute("size"),a.style.fontSize=Q+" pt",
+Q=null):R.value=isNaN(n)?"":n+" pt",A=parseFloat(p),isNaN(A)?ja.value="100 %":ja.value=Math.round(100*A)+" %"),b=m.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),n=m.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+
("0"+Number(d).toString(16)).substr(-2)}),null!=ea&&(ka="#"==b.charAt(0)?b:"#000000",ea(ka,!0)),null!=P&&(T="#"==n.charAt(0)?n:null,P(T,!0)),null!=g.firstChild&&(g.firstChild.nodeValue=Graph.stripQuotes(m.fontFamily)))}ra=!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(e.cellEditor.textarea,"DOMSubtreeModified",f);mxEvent.addListener(e.cellEditor.textarea,"input",f);mxEvent.addListener(e.cellEditor.textarea,"touchend",f);mxEvent.addListener(e.cellEditor.textarea,
"mouseup",f);mxEvent.addListener(e.cellEditor.textarea,"keyup",f);this.listeners.push({destroy:function(){}});f()}return a};StyleFormatPanel=function(a,c,b){BaseFormatPanel.call(this,a,c,b);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);StyleFormatPanel.prototype.defaultStrokeColor="black";
StyleFormatPanel.prototype.init=function(){var a=this.format.getSelectionState();!a.containsLabel&&0<a.cells.length&&(a.containsImage&&1==a.vertices.length&&"image"==a.style.shape&&null!=a.style.image&&"data:image/svg+xml;"==a.style.image.substring(0,19)&&this.container.appendChild(this.addSvgStyles(this.createPanel())),a.containsImage&&"image"!=a.style.shape||this.container.appendChild(this.addFill(this.createPanel())),this.container.appendChild(this.addStroke(this.createPanel())),this.container.appendChild(this.addLineJumps(this.createPanel())),
@@ -3093,61 +3112,63 @@ n.setAttribute("value",m[l]);mxUtils.write(n,mxResources.get(m[l]));d.appendChil
"fillStyle","auto");""==b&&(b=mxConstants.DIRECTION_SOUTH);d.value=b;f.value=c;a.style.display=e.fill?"":"none";b=mxUtils.getValue(e.style,mxConstants.STYLE_FILLCOLOR,null);!e.fill||e.containsImage||null==b||b==mxConstants.NONE||"filledEdge"==e.style.shape?(f.style.display="none",h.style.display="none"):(f.style.display="1"==e.style.sketch?"":"none",h.style.display="1"!=e.style.sketch||"solid"==c||"auto"==c?"":"none")});b.getModel().addListener(mxEvent.CHANGE,p);this.listeners.push({destroy:function(){b.getModel().removeListener(p)}});
p();mxEvent.addListener(d,"change",function(a){b.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,d.value,e.cells);c.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[d.value],"cells",e.cells));mxEvent.consume(a)});mxEvent.addListener(f,"change",function(a){b.setCellStyles("fillStyle",f.value,e.cells);c.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[d.value],"cells",e.cells));mxEvent.consume(a)});
a.appendChild(k);a.appendChild(h);k=this.getCustomColors();for(l=0;l<k.length;l++)a.appendChild(this.createCellColorOption(k[l].title,k[l].key,k[l].defaultValue));return a};StyleFormatPanel.prototype.getCustomColors=function(){var a=this.format.getSelectionState(),c=[];"swimlane"!=a.style.shape&&"table"!=a.style.shape||c.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return c};
-StyleFormatPanel.prototype.addStroke=function(a){function c(a){var b=parseFloat(v.value),b=Math.min(999,Math.max(0,isNaN(b)?1:b));b!=mxUtils.getValue(f.style,mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,b,f.cells),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[b],"cells",f.cells)));v.value=b+" pt";mxEvent.consume(a)}function b(a){var b=parseFloat(y.value),b=Math.min(999,Math.max(0,isNaN(b)?1:b));b!=mxUtils.getValue(f.style,
-mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,b,f.cells),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[b],"cells",f.cells)));y.value=b+" pt";mxEvent.consume(a)}var e=this.editorUi,d=e.editor.graph,f=this.format.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var k=document.createElement("div");k.style.fontWeight="bold";f.stroke||(k.style.display="none");var h=document.createElement("select");
+StyleFormatPanel.prototype.addStroke=function(a){function c(a){var b=parseFloat(u.value),b=Math.min(999,Math.max(0,isNaN(b)?1:b));b!=mxUtils.getValue(f.style,mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,b,f.cells),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[b],"cells",f.cells)));u.value=b+" pt";mxEvent.consume(a)}function b(a){var b=parseFloat(w.value),b=Math.min(999,Math.max(0,isNaN(b)?1:b));b!=mxUtils.getValue(f.style,
+mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,b,f.cells),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[b],"cells",f.cells)));w.value=b+" pt";mxEvent.consume(a)}var e=this.editorUi,d=e.editor.graph,f=this.format.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var k=document.createElement("div");k.style.fontWeight="bold";f.stroke||(k.style.display="none");var h=document.createElement("select");
h.style.position="absolute";h.style.marginTop="-2px";h.style.right="72px";h.style.width="80px";for(var g=["sharp","rounded","curved"],l=0;l<g.length;l++){var m=document.createElement("option");m.setAttribute("value",g[l]);mxUtils.write(m,mxResources.get(g[l]));h.appendChild(m)}mxEvent.addListener(h,"change",function(a){d.getModel().beginUpdate();try{var b=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],c=["0",null];"rounded"==h.value?c=["1",null]:"curved"==h.value&&(c=[null,"1"]);for(var g=0;g<
b.length;g++)d.setCellStyles(b[g],c[g],f.cells);e.fireEvent(new mxEventObject("styleChanged","keys",b,"values",c,"cells",f.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(a)});mxEvent.addListener(h,"click",function(a){mxEvent.consume(a)});var n="image"==f.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR,g="image"==f.style.shape?mxResources.get("border"):mxResources.get("line"),g=this.createCellColorOption(g,n,"default",null,mxUtils.bind(this,function(a){d.setCellStyles(n,
-a,f.cells)}),Editor.isDarkMode()?"#ffffff":"#000000");g.appendChild(h);k.appendChild(g);var p=k.cloneNode(!1);p.style.fontWeight="normal";p.style.whiteSpace="nowrap";p.style.position="relative";p.style.paddingLeft="16px";p.style.marginBottom="2px";p.style.marginTop="2px";p.className="geToolbarContainer";var r=mxUtils.bind(this,function(a,b,c,d,e){a=this.editorUi.menus.styleChange(a,"",d,e,"geIcon",null);d=document.createElement("div");d.style.width=b+"px";d.style.height="1px";d.style.borderBottom=
-"1px "+c+" "+this.defaultStrokeColor;d.style.paddingTop="6px";a.firstChild.firstChild.style.padding="0px 4px 0px 4px";a.firstChild.firstChild.style.width=b+"px";a.firstChild.firstChild.appendChild(d);return a}),l=this.editorUi.toolbar.addMenuFunctionInContainer(p,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){r(a,75,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));r(a,75,"dashed",[mxConstants.STYLE_DASHED,
-mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));r(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");r(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");r(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+
-" (3)")})),u=p.cloneNode(!1),t=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-connection",mxResources.get("connection"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,null,null,null],"geIcon geSprite geSprite-connection",null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,
+a,f.cells)}),Editor.isDarkMode()?"#ffffff":"#000000");g.appendChild(h);k.appendChild(g);var p=k.cloneNode(!1);p.style.fontWeight="normal";p.style.whiteSpace="nowrap";p.style.position="relative";p.style.paddingLeft="16px";p.style.marginBottom="2px";p.style.marginTop="2px";p.className="geToolbarContainer";var q=mxUtils.bind(this,function(a,b,c,d,e){a=this.editorUi.menus.styleChange(a,"",d,e,"geIcon",null);d=document.createElement("div");d.style.width=b+"px";d.style.height="1px";d.style.borderBottom=
+"1px "+c+" "+this.defaultStrokeColor;d.style.paddingTop="6px";a.firstChild.firstChild.style.padding="0px 4px 0px 4px";a.firstChild.firstChild.style.width=b+"px";a.firstChild.firstChild.appendChild(d);return a}),l=this.editorUi.toolbar.addMenuFunctionInContainer(p,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){q(a,75,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));q(a,75,"dashed",[mxConstants.STYLE_DASHED,
+mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));q(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");q(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");q(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+
+" (3)")})),t=p.cloneNode(!1),v=this.editorUi.toolbar.addMenuFunctionInContainer(t,"geSprite-connection",mxResources.get("connection"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,null,null,null],"geIcon geSprite geSprite-connection",null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,
"width"],["link",null,null,null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",mxResources.get("link"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],"geIcon geSprite geSprite-arrow",null,!0).setAttribute("title",mxResources.get("arrow"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",
-null,null,null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))})),m=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){r(a,33,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));r(a,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));
-r(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");r(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");r(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),g=p.cloneNode(!1),v=document.createElement("input");v.style.textAlign="right";
-v.style.marginTop="min"==uiTheme?"0px":"2px";v.style.width="41px";v.setAttribute("title",mxResources.get("linewidth"));p.appendChild(v);var y=v.cloneNode(!0);u.appendChild(y);var x=this.createStepper(v,c,1,9);x.style.display=v.style.display;x.style.marginTop="min"==uiTheme?"0px":"2px";p.appendChild(x);var B=this.createStepper(y,b,1,9);B.style.display=y.style.display;B.style.marginTop="min"==uiTheme?"0px":"2px";u.appendChild(B);v.style.position="absolute";v.style.height="15px";v.style.left="141px";
-x.style.left="190px";y.style.position="absolute";y.style.left="141px";y.style.height="15px";B.style.left="190px";mxEvent.addListener(v,"blur",c);mxEvent.addListener(v,"change",c);mxEvent.addListener(y,"blur",b);mxEvent.addListener(y,"change",b);var E=this.editorUi.toolbar.addMenuFunctionInContainer(g,"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(a){"arrow"!=f.style.shape&&(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,
+null,null,null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))})),m=this.editorUi.toolbar.addMenuFunctionInContainer(t,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){q(a,33,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));q(a,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));
+q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),g=p.cloneNode(!1),u=document.createElement("input");u.style.textAlign="right";
+u.style.marginTop="min"==uiTheme?"0px":"2px";u.style.width="41px";u.setAttribute("title",mxResources.get("linewidth"));p.appendChild(u);var w=u.cloneNode(!0);t.appendChild(w);var x=this.createStepper(u,c,1,9);x.style.display=u.style.display;x.style.marginTop="min"==uiTheme?"0px":"2px";p.appendChild(x);var A=this.createStepper(w,b,1,9);A.style.display=w.style.display;A.style.marginTop="min"==uiTheme?"0px":"2px";t.appendChild(A);u.style.position="absolute";u.style.height="15px";u.style.left="141px";
+x.style.left="190px";w.style.position="absolute";w.style.left="141px";w.style.height="15px";A.style.left="190px";mxEvent.addListener(u,"blur",c);mxEvent.addListener(u,"change",c);mxEvent.addListener(w,"blur",b);mxEvent.addListener(w,"change",b);var E=this.editorUi.toolbar.addMenuFunctionInContainer(g,"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(a){"arrow"!=f.style.shape&&(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,
mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",null,!0).setAttribute("title",mxResources.get("straight")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",null,!0).setAttribute("title",mxResources.get("orthogonal")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,
mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,
mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),
"connector"==f.style.shape&&this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation")))})),
-G=this.editorUi.toolbar.addMenuFunctionInContainer(g,"geSprite-startclassic",mxResources.get("linestart"),!1,mxUtils.bind(this,function(a){if("connector"==f.style.shape||"flexArrow"==f.style.shape||"filledEdge"==f.style.shape){var b=this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.NONE,0],"geIcon",null,!1);b.setAttribute("title",mxResources.get("none"));b.firstChild.firstChild.innerHTML='<font style="font-size:10px;">'+mxUtils.htmlEntities(mxResources.get("none"))+
-"</font>";"connector"==f.style.shape||"filledEdge"==f.style.shape?(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,1],"geIcon geSprite geSprite-startclassic",null,!1).setAttribute("title",mxResources.get("classic")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,1],"geIcon geSprite geSprite-startclassicthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,
-"startFill"],[mxConstants.ARROW_OPEN,0],"geIcon geSprite geSprite-startopen",null,!1).setAttribute("title",mxResources.get("openArrow")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN_THIN,0],"geIcon geSprite geSprite-startopenthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["openAsync",0],"geIcon geSprite geSprite-startopenasync",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,
-"startFill"],[mxConstants.ARROW_BLOCK,1],"geIcon geSprite geSprite-startblock",null,!1).setAttribute("title",mxResources.get("block")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,1],"geIcon geSprite geSprite-startblockthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",1],"geIcon geSprite geSprite-startasync",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,
-"startFill"],[mxConstants.ARROW_OVAL,1],"geIcon geSprite geSprite-startoval",null,!1).setAttribute("title",mxResources.get("oval")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND,1],"geIcon geSprite geSprite-startdiamond",null,!1).setAttribute("title",mxResources.get("diamond")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND_THIN,1],"geIcon geSprite geSprite-startthindiamond",
-null,!1).setAttribute("title",mxResources.get("diamondThin")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,0],"geIcon geSprite geSprite-startclassictrans",null,!1).setAttribute("title",mxResources.get("classic")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,0],"geIcon geSprite geSprite-startclassicthintrans",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,
-"startFill"],[mxConstants.ARROW_BLOCK,0],"geIcon geSprite geSprite-startblocktrans",null,!1).setAttribute("title",mxResources.get("block")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,0],"geIcon geSprite geSprite-startblockthintrans",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",0],"geIcon geSprite geSprite-startasynctrans",null,!1),this.editorUi.menus.edgeStyleChange(a,"",
-[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OVAL,0],"geIcon geSprite geSprite-startovaltrans",null,!1).setAttribute("title",mxResources.get("oval")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND,0],"geIcon geSprite geSprite-startdiamondtrans",null,!1).setAttribute("title",mxResources.get("diamond")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND_THIN,0],
-"geIcon geSprite geSprite-startthindiamondtrans",null,!1).setAttribute("title",mxResources.get("diamondThin")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["box",0],"geIcon geSprite geSvgSprite geSprite-box",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["halfCircle",0],"geIcon geSprite geSvgSprite geSprite-halfCircle",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],
-["dash",0],"geIcon geSprite geSprite-startdash",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["cross",0],"geIcon geSprite geSprite-startcross",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circlePlus",0],"geIcon geSprite geSprite-startcircleplus",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circle",1],"geIcon geSprite geSprite-startcircle",null,!1),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,
-"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERone",0],null,null,!1,Format.erOneMarkerImage.src)),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmandOne",0],"geIcon geSprite geSprite-starteronetoone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmany",0],"geIcon geSprite geSprite-startermany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERoneToMany",0],"geIcon geSprite geSprite-starteronetomany",
-null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-starteroneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-startermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-startblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}})),
-A=this.editorUi.toolbar.addMenuFunctionInContainer(g,"geSprite-endclassic",mxResources.get("lineend"),!1,mxUtils.bind(this,function(a){if("connector"==f.style.shape||"flexArrow"==f.style.shape||"filledEdge"==f.style.shape){var b=this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon",null,!1);b.setAttribute("title",mxResources.get("none"));b.firstChild.firstChild.innerHTML='<font style="font-size:10px;">'+mxUtils.htmlEntities(mxResources.get("none"))+
-"</font>";"connector"==f.style.shape||"filledEdge"==f.style.shape?(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,1],"geIcon geSprite geSprite-endclassic",null,!1).setAttribute("title",mxResources.get("classic")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,1],"geIcon geSprite geSprite-endclassicthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,
-"endFill"],[mxConstants.ARROW_OPEN,0],"geIcon geSprite geSprite-endopen",null,!1).setAttribute("title",mxResources.get("openArrow")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN_THIN,0],"geIcon geSprite geSprite-endopenthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["openAsync",0],"geIcon geSprite geSprite-endopenasync",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,
-"endFill"],[mxConstants.ARROW_BLOCK,1],"geIcon geSprite geSprite-endblock",null,!1).setAttribute("title",mxResources.get("block")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,1],"geIcon geSprite geSprite-endblockthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",1],"geIcon geSprite geSprite-endasync",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],
-[mxConstants.ARROW_OVAL,1],"geIcon geSprite geSprite-endoval",null,!1).setAttribute("title",mxResources.get("oval")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND,1],"geIcon geSprite geSprite-enddiamond",null,!1).setAttribute("title",mxResources.get("diamond")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,1],"geIcon geSprite geSprite-endthindiamond",null,!1).setAttribute("title",
-mxResources.get("diamondThin")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,0],"geIcon geSprite geSprite-endclassictrans",null,!1).setAttribute("title",mxResources.get("classic")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,0],"geIcon geSprite geSprite-endclassicthintrans",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK,
-0],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,0],"geIcon geSprite geSprite-endblockthintrans",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",0],"geIcon geSprite geSprite-endasynctrans",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OVAL,
-0],"geIcon geSprite geSprite-endovaltrans",null,!1).setAttribute("title",mxResources.get("oval")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND,0],"geIcon geSprite geSprite-enddiamondtrans",null,!1).setAttribute("title",mxResources.get("diamond")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,0],"geIcon geSprite geSprite-endthindiamondtrans",null,!1).setAttribute("title",
-mxResources.get("diamondThin")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["box",0],"geIcon geSprite geSvgSprite geFlipSprite geSprite-box",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["halfCircle",0],"geIcon geSprite geSvgSprite geFlipSprite geSprite-halfCircle",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["dash",0],"geIcon geSprite geSprite-enddash",null,!1),this.editorUi.menus.edgeStyleChange(a,
-"",[mxConstants.STYLE_ENDARROW,"endFill"],["cross",0],"geIcon geSprite geSprite-endcross",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circlePlus",0],"geIcon geSprite geSprite-endcircleplus",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circle",1],"geIcon geSprite geSprite-endcircle",null,!1),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERone",0],null,
-null,!1,Format.erOneMarkerImage.src),"scaleX(-1)"),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],"geIcon geSprite geSprite-enderonetoone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],"geIcon geSprite geSprite-endermany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],"geIcon geSprite geSprite-enderonetomany",null,!1),this.editorUi.menus.edgeStyleChange(a,
-"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-enderoneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-endermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(t,8);this.addArrow(E);this.addArrow(G);
-this.addArrow(A);x=this.addArrow(l,9);x.className="geIcon";x.style.width="auto";B=this.addArrow(m,9);B.className="geIcon";B.style.width="22px";var F=document.createElement("div");F.style.width="85px";F.style.height="1px";F.style.borderBottom="1px solid "+this.defaultStrokeColor;F.style.marginBottom="9px";x.appendChild(F);var z=document.createElement("div");z.style.width="23px";z.style.height="1px";z.style.borderBottom="1px solid "+this.defaultStrokeColor;z.style.marginBottom="9px";B.appendChild(z);
-l.style.height="15px";m.style.height="15px";t.style.height="15px";E.style.height="17px";G.style.marginLeft="3px";G.style.height="17px";A.style.marginLeft="3px";A.style.height="17px";a.appendChild(k);a.appendChild(u);a.appendChild(p);l=p.cloneNode(!1);l.style.paddingBottom="6px";l.style.paddingTop="4px";l.style.fontWeight="normal";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="2px";m.style.fontWeight="normal";m.style.width=
-"76px";mxUtils.write(m,mxResources.get("lineend"));l.appendChild(m);var H,K,L=this.addUnitInput(l,"pt",74,33,function(){H.apply(this,arguments)}),O=this.addUnitInput(l,"pt",20,33,function(){K.apply(this,arguments)});mxUtils.br(l);x=document.createElement("div");x.style.height="8px";l.appendChild(x);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));l.appendChild(m);var J,U,aa=this.addUnitInput(l,"pt",74,33,function(){J.apply(this,arguments)}),ba=this.addUnitInput(l,"pt",20,33,function(){U.apply(this,
-arguments)});mxUtils.br(l);this.addLabel(l,mxResources.get("spacing"),74,50);this.addLabel(l,mxResources.get("size"),20,50);mxUtils.br(l);k=k.cloneNode(!1);k.style.fontWeight="normal";k.style.position="relative";k.style.paddingLeft="16px";k.style.marginBottom="2px";k.style.marginTop="6px";k.style.borderWidth="0px";k.style.paddingBottom="18px";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="1px";m.style.fontWeight=
-"normal";m.style.width="120px";mxUtils.write(m,mxResources.get("perimeter"));k.appendChild(m);var R,Q=this.addUnitInput(k,"pt",20,41,function(){R.apply(this,arguments)});f.edges.length==f.cells.length?(a.appendChild(g),a.appendChild(l)):f.vertices.length==f.cells.length&&a.appendChild(k);var P=mxUtils.bind(this,function(a,b,c){function d(a,b,c,d){c=c.getElementsByTagName("div")[0];null!=c&&(c.className=e.getCssClassForMarker(d,f.style.shape,a,b),"geSprite geSprite-noarrow"==c.className&&(c.innerHTML=
-mxUtils.htmlEntities(mxResources.get("none")),c.style.backgroundImage="none",c.style.verticalAlign="top",c.style.marginTop="5px",c.style.fontSize="10px",c.style.filter="none",c.style.color=this.defaultStrokeColor,c.nextSibling.style.marginTop="0px"));return c}f=this.format.getSelectionState();mxUtils.getValue(f.style,n,null);if(c||document.activeElement!=v)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_STROKEWIDTH,1)),v.value=isNaN(a)?"":a+" pt";if(c||document.activeElement!=y)a=parseFloat(mxUtils.getValue(f.style,
-mxConstants.STYLE_STROKEWIDTH,1)),y.value=isNaN(a)?"":a+" pt";h.style.visibility="connector"==f.style.shape||"filledEdge"==f.style.shape?"":"hidden";"1"==mxUtils.getValue(f.style,mxConstants.STYLE_CURVED,null)?h.value="curved":"1"==mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,null)&&(h.value="rounded");"1"==mxUtils.getValue(f.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(f.style,mxConstants.STYLE_DASH_PATTERN,null)?F.style.borderBottom="1px dashed "+this.defaultStrokeColor:F.style.borderBottom=
-"1px dotted "+this.defaultStrokeColor:F.style.borderBottom="1px solid "+this.defaultStrokeColor;z.style.borderBottom=F.style.borderBottom;a=E.getElementsByTagName("div")[0];null!=a&&(b=mxUtils.getValue(f.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(f.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(b=null),"orthogonalEdgeStyle"==b&&"1"==mxUtils.getValue(f.style,mxConstants.STYLE_CURVED,null)?a.className="geSprite geSprite-curved":a.className="straight"==b||"none"==b||null==b?"geSprite geSprite-straight":
-"entityRelationEdgeStyle"==b?"geSprite geSprite-entity":"elbowEdgeStyle"==b?"geSprite "+("vertical"==mxUtils.getValue(f.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==b?"geSprite "+("vertical"==mxUtils.getValue(f.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal");a=t.getElementsByTagName("div")[0];null!=a&&(a.className="link"==f.style.shape?"geSprite geSprite-linkedge":
-"flexArrow"==f.style.shape?"geSprite geSprite-arrow":"arrow"==f.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection");f.edges.length==f.cells.length?(u.style.display="",p.style.display="none"):(u.style.display="none",p.style.display="");a=d(mxUtils.getValue(f.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(f.style,"startFill","1"),G,"start");b=d(mxUtils.getValue(f.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(f.style,"endFill","1"),A,"end");null!=a&&null!=
-b&&("arrow"==f.style.shape?(a.className="geSprite geSprite-noarrow",b.className="geSprite geSprite-endblocktrans"):"link"==f.style.shape&&(a.className="geSprite geSprite-noarrow",b.className="geSprite geSprite-noarrow"));mxUtils.setOpacity(E,"arrow"==f.style.shape?30:100);"connector"!=f.style.shape&&"flexArrow"!=f.style.shape&&"filledEdge"!=f.style.shape?(mxUtils.setOpacity(G,30),mxUtils.setOpacity(A,30)):(mxUtils.setOpacity(G,100),mxUtils.setOpacity(A,100));if(c||document.activeElement!=ba)a=parseInt(mxUtils.getValue(f.style,
-mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),ba.value=isNaN(a)?"":a+" pt";if(c||document.activeElement!=aa)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),aa.value=isNaN(a)?"":a+" pt";if(c||document.activeElement!=O)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),O.value=isNaN(a)?"":a+" pt";if(c||document.activeElement!=aa)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,
-0)),L.value=isNaN(a)?"":a+" pt";if(c||document.activeElement!=Q)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_PERIMETER_SPACING,0)),Q.value=isNaN(a)?"":a+" pt"});U=this.installInputHandler(ba,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");J=this.installInputHandler(aa,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");K=this.installInputHandler(O,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");H=this.installInputHandler(L,mxConstants.STYLE_TARGET_PERIMETER_SPACING,
-0,-999,999," pt");R=this.installInputHandler(Q,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(v,P);this.addKeyHandler(ba,P);this.addKeyHandler(aa,P);this.addKeyHandler(O,P);this.addKeyHandler(L,P);this.addKeyHandler(Q,P);d.getModel().addListener(mxEvent.CHANGE,P);this.listeners.push({destroy:function(){d.getModel().removeListener(P)}});P();return a};
+H=this.editorUi.toolbar.addMenuFunctionInContainer(g,"geSprite-startclassic",mxResources.get("linestart"),!1,mxUtils.bind(this,function(a){if("connector"==f.style.shape||"flexArrow"==f.style.shape||"filledEdge"==f.style.shape){var b=this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.NONE,0],"geIcon",null,!1);b.setAttribute("title",mxResources.get("none"));b.firstChild.firstChild.innerHTML='<font style="font-size:10px;">'+mxUtils.htmlEntities(mxResources.get("none"))+
+"</font>";"connector"==f.style.shape||"filledEdge"==f.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,1],null,null,!1,Format.classicThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,
+"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN,0],null,null,!1,Format.openFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN_THIN,0],null,null,!1,Format.openThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["openAsync",0],null,null,!1,Format.openAsyncFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,
+"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,1],null,null,!1,Format.blockFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,1],null,null,!1,Format.blockThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",1],null,null,!1,Format.asyncFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,
+"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OVAL,1],null,null,!1,Format.ovalFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND,1],null,null,!1,Format.diamondFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND_THIN,1],null,null,!1,Format.diamondThinFilledMarkerImage.src)),
+Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,0],null,null,!1,Format.classicMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,0],null,null,!1,Format.classicThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,
+0],null,null,!1,Format.blockMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,0],null,null,!1,Format.blockThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",0],null,null,!1,Format.asyncMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],
+[mxConstants.ARROW_OVAL,0],null,null,!1,Format.ovalMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND,0],null,null,!1,Format.diamondMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND_THIN,0],null,null,!1,Format.diamondThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,
+"",[mxConstants.STYLE_STARTARROW,"startFill"],["box",0],null,null,!1,Format.boxMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["halfCircle",0],null,null,!1,Format.halfCircleMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["dash",0],null,null,!1,Format.dashMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,
+"startFill"],["cross",0],null,null,!1,Format.crossMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circlePlus",0],null,null,!1,Format.circlePlusMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circle",1],null,null,!1,Format.circleMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],
+["baseDash",0],null,null,!1,Format.baseDashMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERone",0],null,null,!1,Format.EROneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmany",
+0],null,null,!1,Format.ERmanyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToOne",0],null,null,!1,Format.ERzeroToOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],
+["ERzeroToMany",1],null,null,!1,Format.ERzeroToManyMarkerImage.src))):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-startblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}})),B=this.editorUi.toolbar.addMenuFunctionInContainer(g,"geSprite-endclassic",mxResources.get("lineend"),!1,mxUtils.bind(this,function(a){if("connector"==f.style.shape||"flexArrow"==f.style.shape||"filledEdge"==f.style.shape){var b=this.editorUi.menus.edgeStyleChange(a,
+"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon",null,!1);b.setAttribute("title",mxResources.get("none"));b.firstChild.firstChild.innerHTML='<font style="font-size:10px;">'+mxUtils.htmlEntities(mxResources.get("none"))+"</font>";"connector"==f.style.shape||"filledEdge"==f.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src),"scaleX(-1)"),
+Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,1],null,null,!1,Format.classicThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN,0],null,null,!1,Format.openFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN_THIN,
+0],null,null,!1,Format.openThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["openAsync",0],null,null,!1,Format.openAsyncFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK,1],null,null,!1,Format.blockFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,
+"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,1],null,null,!1,Format.blockThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",1],null,null,!1,Format.asyncFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OVAL,1],null,null,!1,Format.ovalFilledMarkerImage.src),"scaleX(-1)"),
+Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND,1],null,null,!1,Format.diamondFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,1],null,null,!1,Format.diamondThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],
+[mxConstants.ARROW_CLASSIC,0],null,null,!1,Format.classicMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,0],null,null,!1,Format.classicThinMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK,0],null,null,!1,Format.blockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,
+"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,0],null,null,!1,Format.blockThinMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",0],null,null,!1,Format.asyncMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OVAL,0],null,null,!1,Format.ovalMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,
+"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND,0],null,null,!1,Format.diamondMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,0],null,null,!1,Format.diamondThinMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["box",0],null,null,!1,Format.boxMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,
+"",[mxConstants.STYLE_ENDARROW,"endFill"],["halfCircle",0],null,null,!1,Format.halfCircleMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["dash",0],null,null,!1,Format.dashMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["cross",0],null,null,!1,Format.crossMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,
+"",[mxConstants.STYLE_ENDARROW,"endFill"],["circlePlus",0],null,null,!1,Format.circlePlusMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circle",0],null,null,!1,Format.circleMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["baseDash",0],null,null,!1,Format.baseDashMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,
+"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERone",0],null,null,!1,Format.EROneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,
+"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",0],null,null,!1,Format.ERzeroToOneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src),"scaleX(-1)")):this.editorUi.menus.edgeStyleChange(a,
+"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(v,8);this.addArrow(E);this.addArrow(H);this.addArrow(B);x=this.addArrow(l,9);x.className="geIcon";x.style.width="auto";A=this.addArrow(m,9);A.className="geIcon";A.style.width="22px";var G=document.createElement("div");G.style.width="85px";G.style.height="1px";G.style.borderBottom="1px solid "+this.defaultStrokeColor;G.style.marginBottom=
+"9px";x.appendChild(G);var y=document.createElement("div");y.style.width="23px";y.style.height="1px";y.style.borderBottom="1px solid "+this.defaultStrokeColor;y.style.marginBottom="9px";A.appendChild(y);l.style.height="15px";m.style.height="15px";v.style.height="15px";E.style.height="17px";H.style.marginLeft="3px";H.style.height="17px";B.style.marginLeft="3px";B.style.height="17px";a.appendChild(k);a.appendChild(t);a.appendChild(p);l=p.cloneNode(!1);l.style.paddingBottom="6px";l.style.paddingTop=
+"4px";l.style.fontWeight="normal";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="2px";m.style.fontWeight="normal";m.style.width="76px";mxUtils.write(m,mxResources.get("lineend"));l.appendChild(m);var I,K,M=this.addUnitInput(l,"pt",74,33,function(){I.apply(this,arguments)}),O=this.addUnitInput(l,"pt",20,33,function(){K.apply(this,arguments)});mxUtils.br(l);x=document.createElement("div");x.style.height="8px";l.appendChild(x);
+m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));l.appendChild(m);var J,U,ba=this.addUnitInput(l,"pt",74,33,function(){J.apply(this,arguments)}),ca=this.addUnitInput(l,"pt",20,33,function(){U.apply(this,arguments)});mxUtils.br(l);this.addLabel(l,mxResources.get("spacing"),74,50);this.addLabel(l,mxResources.get("size"),20,50);mxUtils.br(l);k=k.cloneNode(!1);k.style.fontWeight="normal";k.style.position="relative";k.style.paddingLeft="16px";k.style.marginBottom="2px";k.style.marginTop=
+"6px";k.style.borderWidth="0px";k.style.paddingBottom="18px";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="1px";m.style.fontWeight="normal";m.style.width="120px";mxUtils.write(m,mxResources.get("perimeter"));k.appendChild(m);var R,Q=this.addUnitInput(k,"pt",20,41,function(){R.apply(this,arguments)});f.edges.length==f.cells.length?(a.appendChild(g),a.appendChild(l)):f.vertices.length==f.cells.length&&a.appendChild(k);
+var P=mxUtils.bind(this,function(a,b,c){function d(a,b,c,d){c=c.getElementsByTagName("div")[0];null!=c&&(c.className=e.getCssClassForMarker(d,f.style.shape,a,b),"geSprite geSprite-noarrow"==c.className&&(c.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),c.style.backgroundImage="none",c.style.verticalAlign="top",c.style.marginTop="5px",c.style.fontSize="10px",c.style.filter="none",c.style.color=this.defaultStrokeColor,c.nextSibling.style.marginTop="0px"));return c}f=this.format.getSelectionState();
+mxUtils.getValue(f.style,n,null);if(c||document.activeElement!=u)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_STROKEWIDTH,1)),u.value=isNaN(a)?"":a+" pt";if(c||document.activeElement!=w)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_STROKEWIDTH,1)),w.value=isNaN(a)?"":a+" pt";h.style.visibility="connector"==f.style.shape||"filledEdge"==f.style.shape?"":"hidden";"1"==mxUtils.getValue(f.style,mxConstants.STYLE_CURVED,null)?h.value="curved":"1"==mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,
+null)&&(h.value="rounded");"1"==mxUtils.getValue(f.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(f.style,mxConstants.STYLE_DASH_PATTERN,null)?G.style.borderBottom="1px dashed "+this.defaultStrokeColor:G.style.borderBottom="1px dotted "+this.defaultStrokeColor:G.style.borderBottom="1px solid "+this.defaultStrokeColor;y.style.borderBottom=G.style.borderBottom;a=E.getElementsByTagName("div")[0];null!=a&&(b=mxUtils.getValue(f.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(f.style,
+mxConstants.STYLE_NOEDGESTYLE,null)&&(b=null),"orthogonalEdgeStyle"==b&&"1"==mxUtils.getValue(f.style,mxConstants.STYLE_CURVED,null)?a.className="geSprite geSprite-curved":a.className="straight"==b||"none"==b||null==b?"geSprite geSprite-straight":"entityRelationEdgeStyle"==b?"geSprite geSprite-entity":"elbowEdgeStyle"==b?"geSprite "+("vertical"==mxUtils.getValue(f.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==b?"geSprite "+("vertical"==
+mxUtils.getValue(f.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal");a=v.getElementsByTagName("div")[0];null!=a&&(a.className="link"==f.style.shape?"geSprite geSprite-linkedge":"flexArrow"==f.style.shape?"geSprite geSprite-arrow":"arrow"==f.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection");f.edges.length==f.cells.length?(t.style.display="",p.style.display="none"):(t.style.display="none",p.style.display=
+"");a=d(mxUtils.getValue(f.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(f.style,"startFill","1"),H,"start");b=d(mxUtils.getValue(f.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(f.style,"endFill","1"),B,"end");null!=a&&null!=b&&("arrow"==f.style.shape?(a.className="geSprite geSprite-noarrow",b.className="geSprite geSprite-endblocktrans"):"link"==f.style.shape&&(a.className="geSprite geSprite-noarrow",b.className="geSprite geSprite-noarrow"));mxUtils.setOpacity(E,"arrow"==f.style.shape?
+30:100);"connector"!=f.style.shape&&"flexArrow"!=f.style.shape&&"filledEdge"!=f.style.shape?(mxUtils.setOpacity(H,30),mxUtils.setOpacity(B,30)):(mxUtils.setOpacity(H,100),mxUtils.setOpacity(B,100));if(c||document.activeElement!=ca)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),ca.value=isNaN(a)?"":a+" pt";if(c||document.activeElement!=ba)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),ba.value=isNaN(a)?"":a+" pt";
+if(c||document.activeElement!=O)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),O.value=isNaN(a)?"":a+" pt";if(c||document.activeElement!=ba)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),M.value=isNaN(a)?"":a+" pt";if(c||document.activeElement!=Q)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_PERIMETER_SPACING,0)),Q.value=isNaN(a)?"":a+" pt"});U=this.installInputHandler(ca,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,
+0,999," pt");J=this.installInputHandler(ba,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");K=this.installInputHandler(O,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");I=this.installInputHandler(M,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");R=this.installInputHandler(Q,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(u,P);this.addKeyHandler(ca,P);this.addKeyHandler(ba,P);this.addKeyHandler(O,P);this.addKeyHandler(M,P);this.addKeyHandler(Q,
+P);d.getModel().addListener(mxEvent.CHANGE,P);this.listeners.push({destroy:function(){d.getModel().removeListener(P)}});P();return a};
StyleFormatPanel.prototype.addLineJumps=function(a){var c=this.format.getSelectionState();if(Graph.lineJumpsEnabled&&0<c.edges.length&&0==c.vertices.length&&c.lineJumps){a.style.padding="8px 0px 24px 18px";var b=this.editorUi,e=b.editor.graph,d=document.createElement("div");d.style.position="absolute";d.style.fontWeight="bold";d.style.width="80px";mxUtils.write(d,mxResources.get("lineJumps"));a.appendChild(d);var f=document.createElement("select");f.style.position="absolute";f.style.marginTop="-2px";
f.style.right="76px";f.style.width="62px";for(var d=["none","arc","gap","sharp","line"],k=0;k<d.length;k++){var h=document.createElement("option");h.setAttribute("value",d[k]);mxUtils.write(h,mxResources.get(d[k]));f.appendChild(h)}mxEvent.addListener(f,"change",function(a){e.getModel().beginUpdate();try{e.setCellStyles("jumpStyle",f.value,c.cells),b.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[f.value],"cells",c.cells))}finally{e.getModel().endUpdate()}mxEvent.consume(a)});
mxEvent.addListener(f,"click",function(a){mxEvent.consume(a)});a.appendChild(f);var g,l=this.addUnitInput(a,"pt",22,33,function(){g.apply(this,arguments)});g=this.installInputHandler(l,"jumpSize",Graph.defaultJumpSize,0,999," pt");var m=mxUtils.bind(this,function(a,b,d){c=this.format.getSelectionState();f.value=mxUtils.getValue(c.style,"jumpStyle","none");if(d||document.activeElement!=l)a=parseInt(mxUtils.getValue(c.style,"jumpSize",Graph.defaultJumpSize)),l.value=isNaN(a)?"":a+" pt"});this.addKeyHandler(l,
@@ -3160,21 +3181,21 @@ mxUtils.extend(DiagramStylePanel,BaseFormatPanel);DiagramStylePanel.prototype.in
DiagramStylePanel.prototype.addView=function(a){var c=this.editorUi,b=c.editor.graph,e=b.getModel();a.style.whiteSpace="normal";var d="1"==b.currentVertexStyle.sketch&&"1"==b.currentEdgeStyle.sketch,f="1"==b.currentVertexStyle.rounded,k="1"==b.currentEdgeStyle.curved,h=document.createElement("div");h.style.paddingBottom="12px";h.style.marginRight="16px";a.style.paddingTop="8px";var g=document.createElement("table");g.style.width="100%";g.style.fontWeight="bold";var l=document.createElement("tbody"),
m=document.createElement("tr");m.style.padding="0px";var n=document.createElement("td");n.style.padding="0px";n.style.width="50%";n.setAttribute("valign","middle");var p=n.cloneNode(!0);p.style.paddingLeft="8px";m.appendChild(n);m.appendChild(p);l.appendChild(m);g.appendChild(l);n.appendChild(this.createOption(mxResources.get("sketch"),function(){return d},function(a){(d=a)?(b.currentEdgeStyle.sketch="1",b.currentVertexStyle.sketch="1"):(delete b.currentEdgeStyle.sketch,delete b.currentVertexStyle.sketch);
b.updateCellStyles("sketch",a?"1":null,b.getVerticesAndEdges())},null,function(a){a.style.width="auto"}));p.appendChild(this.createOption(mxResources.get("rounded"),function(){return f},function(a){(f=a)?b.currentVertexStyle.rounded="1":delete b.currentVertexStyle.rounded;b.updateCellStyles("rounded",a?"1":null,b.getVerticesAndEdges(!0,!0))},null,function(a){a.style.width="auto"}));n=n.cloneNode(!1);p=p.cloneNode(!1);m=m.cloneNode(!1);m.appendChild(n);m.appendChild(p);l.appendChild(m);n.appendChild(this.createOption(mxResources.get("curved"),
-function(){return k},function(a){(k=a)?b.currentEdgeStyle.curved="1":delete b.currentEdgeStyle.curved;b.updateCellStyles("curved",a?"1":null,b.getVerticesAndEdges(!1,!0))},null,function(a){a.style.width="auto"}));h.appendChild(g);a.appendChild(h);var r=["fillColor","strokeColor","fontColor","gradientColor"],u=mxUtils.bind(this,function(a,c){var d=b.getVerticesAndEdges();e.beginUpdate();try{for(var f=0;f<d.length;f++){var g=b.getCellStyle(d[f]);null!=g.labelBackgroundColor&&b.updateCellStyles("labelBackgroundColor",
-null!=c?c.background:null,[d[f]]);for(var k=e.isEdge(d[f]),h=e.getStyle(d[f]),l=k?b.currentEdgeStyle:b.currentVertexStyle,m=0;m<a.length;m++)if(null!=g[a[m]]&&g[a[m]]!=mxConstants.NONE||a[m]!=mxConstants.STYLE_FILLCOLOR&&a[m]!=mxConstants.STYLE_STROKECOLOR)h=mxUtils.setStyle(h,a[m],l[a[m]]);e.setStyle(d[f],h)}}finally{e.endUpdate()}}),t=mxUtils.bind(this,function(a,b,c){if(null!=a)for(var d=0;d<b.length;d++)if(null!=a[b[d]]&&a[b[d]]!=mxConstants.NONE||b[d]!=mxConstants.STYLE_FILLCOLOR&&b[d]!=mxConstants.STYLE_STROKECOLOR)a[b[d]]=
-c[b[d]]}),v=mxUtils.bind(this,function(a,c,d,e,f){if(null!=a){null!=d&&null!=c.labelBackgroundColor&&(e=null!=e?e.background:null,f=null!=f?f:b,null==e&&(e=f.background),null==e&&(e=f.defaultPageBackgroundColor),c.labelBackgroundColor=e);for(var g in a)if(null==d||null!=c[g]&&c[g]!=mxConstants.NONE||g!=mxConstants.STYLE_FILLCOLOR&&g!=mxConstants.STYLE_STROKECOLOR)c[g]=a[g]}}),n=mxUtils.button(mxResources.get("reset"),mxUtils.bind(this,function(a){a=b.getVerticesAndEdges(!0,!0);if(0<a.length){e.beginUpdate();
-try{b.updateCellStyles("sketch",null,a),b.updateCellStyles("rounded",null,a),b.updateCellStyles("curved",null,b.getVerticesAndEdges(!1,!0))}finally{e.endUpdate()}}b.defaultVertexStyle=mxUtils.clone(c.initialDefaultVertexStyle);b.defaultEdgeStyle=mxUtils.clone(c.initialDefaultEdgeStyle);c.clearDefaultStyle()}));n.setAttribute("title",mxResources.get("reset"));n.style.textOverflow="ellipsis";n.style.maxWidth="90px";p.appendChild(n);var y=mxUtils.bind(this,function(a,c,d,f,g){var k=document.createElement("div");
+function(){return k},function(a){(k=a)?b.currentEdgeStyle.curved="1":delete b.currentEdgeStyle.curved;b.updateCellStyles("curved",a?"1":null,b.getVerticesAndEdges(!1,!0))},null,function(a){a.style.width="auto"}));h.appendChild(g);a.appendChild(h);var q=["fillColor","strokeColor","fontColor","gradientColor"],t=mxUtils.bind(this,function(a,c){var d=b.getVerticesAndEdges();e.beginUpdate();try{for(var f=0;f<d.length;f++){var g=b.getCellStyle(d[f]);null!=g.labelBackgroundColor&&b.updateCellStyles("labelBackgroundColor",
+null!=c?c.background:null,[d[f]]);for(var k=e.isEdge(d[f]),h=e.getStyle(d[f]),l=k?b.currentEdgeStyle:b.currentVertexStyle,m=0;m<a.length;m++)if(null!=g[a[m]]&&g[a[m]]!=mxConstants.NONE||a[m]!=mxConstants.STYLE_FILLCOLOR&&a[m]!=mxConstants.STYLE_STROKECOLOR)h=mxUtils.setStyle(h,a[m],l[a[m]]);e.setStyle(d[f],h)}}finally{e.endUpdate()}}),v=mxUtils.bind(this,function(a,b,c){if(null!=a)for(var d=0;d<b.length;d++)if(null!=a[b[d]]&&a[b[d]]!=mxConstants.NONE||b[d]!=mxConstants.STYLE_FILLCOLOR&&b[d]!=mxConstants.STYLE_STROKECOLOR)a[b[d]]=
+c[b[d]]}),u=mxUtils.bind(this,function(a,c,d,e,f){if(null!=a){null!=d&&null!=c.labelBackgroundColor&&(e=null!=e?e.background:null,f=null!=f?f:b,null==e&&(e=f.background),null==e&&(e=f.defaultPageBackgroundColor),c.labelBackgroundColor=e);for(var g in a)if(null==d||null!=c[g]&&c[g]!=mxConstants.NONE||g!=mxConstants.STYLE_FILLCOLOR&&g!=mxConstants.STYLE_STROKECOLOR)c[g]=a[g]}}),n=mxUtils.button(mxResources.get("reset"),mxUtils.bind(this,function(a){a=b.getVerticesAndEdges(!0,!0);if(0<a.length){e.beginUpdate();
+try{b.updateCellStyles("sketch",null,a),b.updateCellStyles("rounded",null,a),b.updateCellStyles("curved",null,b.getVerticesAndEdges(!1,!0))}finally{e.endUpdate()}}b.defaultVertexStyle=mxUtils.clone(c.initialDefaultVertexStyle);b.defaultEdgeStyle=mxUtils.clone(c.initialDefaultEdgeStyle);c.clearDefaultStyle()}));n.setAttribute("title",mxResources.get("reset"));n.style.textOverflow="ellipsis";n.style.maxWidth="90px";p.appendChild(n);var w=mxUtils.bind(this,function(a,c,d,f,g){var k=document.createElement("div");
k.style.cssText="position:absolute;display:inline-block;width:100%;height:100%;overflow:hidden;pointer-events:none;";g.appendChild(k);var h=new Graph(k,null,null,b.getStylesheet());h.resetViewOnRootChange=!1;h.foldingEnabled=!1;h.gridEnabled=!1;h.autoScroll=!1;h.setTooltips(!1);h.setConnectable(!1);h.setPanning(!1);h.setEnabled(!1);h.getCellStyle=function(g){var k=mxUtils.clone(Graph.prototype.getCellStyle.apply(this,arguments)),l=b.stylesheet.getDefaultVertexStyle(),m=c;e.isEdge(g)&&(l=b.stylesheet.getDefaultEdgeStyle(),
-m=d);t(k,r,l);v(a,k,g,f,h);v(m,k,g,f,h);return k};h.model.beginUpdate();try{var l=h.insertVertex(h.getDefaultParent(),null,"Shape",14,8,70,40,"strokeWidth=2;"),m=h.insertEdge(h.getDefaultParent(),null,"Connector",l,l,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=5;strokeWidth=2;");m.geometry.points=[new mxPoint(32,70)];m.geometry.offset=new mxPoint(0,8)}finally{h.model.endUpdate()}}),x=document.createElement("div");x.style.position="relative";a.appendChild(x);null==
-this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var B=mxUtils.bind(this,function(a,g,h,l,m){var n=this.format.cachedStyleEntries[m];null==n&&(n=document.createElement("div"),n.style.cssText="display:inline-block;position:relative;width:96px;height:90px;cursor:pointer;border:1px solid gray;margin:2px;overflow:hidden;",null!=l&&null!=l.background&&(n.style.backgroundColor=l.background),y(a,g,h,l,n),mxEvent.addGestureListeners(n,mxUtils.bind(this,function(a){n.style.opacity=.5}),
-null,mxUtils.bind(this,function(m){n.style.opacity=1;b.defaultVertexStyle=mxUtils.clone(c.initialDefaultVertexStyle);b.defaultEdgeStyle=mxUtils.clone(c.initialDefaultEdgeStyle);v(a,b.defaultVertexStyle);v(a,b.defaultEdgeStyle);v(g,b.defaultVertexStyle);v(h,b.defaultEdgeStyle);c.clearDefaultStyle();d?(b.currentEdgeStyle.sketch="1",b.currentVertexStyle.sketch="1"):(b.currentEdgeStyle.sketch="0",b.currentVertexStyle.sketch="0");b.currentVertexStyle.rounded=f?"1":"0";b.currentEdgeStyle.rounded="1";b.currentEdgeStyle.curved=
-k?"1":"0";e.beginUpdate();try{u(r,l);var p=new ChangePageSetup(c,null!=l?l.background:null);p.ignoreImage=!0;e.execute(p);e.execute(new ChangeGridColor(c,null!=l&&null!=l.gridColor?l.gridColor:b.view.defaultGridColor))}finally{e.endUpdate()}})),mxEvent.addListener(n,"mouseenter",mxUtils.bind(this,function(c){var d=b.getCellStyle;c=b.background;var f=b.view.gridColor;b.background=null!=l?l.background:null;b.view.gridColor=null!=l&&null!=l.gridColor?l.gridColor:b.view.defaultGridColor;b.getCellStyle=
-function(c){var f=mxUtils.clone(d.apply(this,arguments)),k=b.stylesheet.getDefaultVertexStyle(),m=g;e.isEdge(c)&&(k=b.stylesheet.getDefaultEdgeStyle(),m=h);t(f,r,k);v(a,f,c,l);v(m,f,c,l);return f};b.refresh();b.getCellStyle=d;b.background=c;b.view.gridColor=f})),mxEvent.addListener(n,"mouseleave",mxUtils.bind(this,function(a){b.refresh()})),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[m]=n));x.appendChild(n)}),E=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=
-null!=this.format.currentStylePage?this.format.currentStylePage:0;var G=[],A=mxUtils.bind(this,function(){0<G.length&&(G[this.format.currentStylePage].style.background="#84d7ff");for(var a=10*this.format.currentStylePage;a<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);a++){var b=Editor.styles[a];B(b.commonStyle,b.vertexStyle,b.edgeStyle,b.graph,a)}}),F=mxUtils.bind(this,function(a){0<=a&&a<E&&(G[this.format.currentStylePage].style.background="transparent",x.innerHTML="",this.format.currentStylePage=
-a,A())});if(1<E){h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.position="relative";h.style.textAlign="center";h.style.paddingTop="4px";h.style.width="210px";a.style.paddingBottom="8px";for(p=0;p<E;p++){var z=document.createElement("div");z.style.display="inline-block";z.style.width="6px";z.style.height="6px";z.style.marginLeft="4px";z.style.marginRight="3px";z.style.borderRadius="3px";z.style.cursor="pointer";z.style.background="transparent";z.style.border="1px solid #b5b6b7";
-mxUtils.bind(this,function(a,b){mxEvent.addListener(z,"click",mxUtils.bind(this,function(){F(a)}))})(p,z);h.appendChild(z);G.push(z)}a.appendChild(h);A();15>E&&(g=function(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})},n=document.createElement("div"),n.style.cssText="position:absolute;left:0px;top:4px;bottom:0px;width:20px;margin:0px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);",
-mxEvent.addListener(n,"click",mxUtils.bind(this,function(){F(mxUtils.mod(this.format.currentStylePage-1,E))})),p=document.createElement("div"),p.style.cssText="position:absolute;right:2px;top:4px;bottom:0px;width:20px;margin:0px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);",
-h.appendChild(n),h.appendChild(p),mxEvent.addListener(p,"click",mxUtils.bind(this,function(){F(mxUtils.mod(this.format.currentStylePage+1,E))})),g(n),g(p))}else A();return a};DiagramFormatPanel=function(a,c,b){BaseFormatPanel.call(this,a,c,b);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;
+m=d);v(k,q,l);u(a,k,g,f,h);u(m,k,g,f,h);return k};h.model.beginUpdate();try{var l=h.insertVertex(h.getDefaultParent(),null,"Shape",14,8,70,40,"strokeWidth=2;"),m=h.insertEdge(h.getDefaultParent(),null,"Connector",l,l,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=5;strokeWidth=2;");m.geometry.points=[new mxPoint(32,70)];m.geometry.offset=new mxPoint(0,8)}finally{h.model.endUpdate()}}),x=document.createElement("div");x.style.position="relative";a.appendChild(x);null==
+this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var A=mxUtils.bind(this,function(a,g,h,l,m){var n=this.format.cachedStyleEntries[m];null==n&&(n=document.createElement("div"),n.style.cssText="display:inline-block;position:relative;width:96px;height:90px;cursor:pointer;border:1px solid gray;margin:2px;overflow:hidden;",null!=l&&null!=l.background&&(n.style.backgroundColor=l.background),w(a,g,h,l,n),mxEvent.addGestureListeners(n,mxUtils.bind(this,function(a){n.style.opacity=.5}),
+null,mxUtils.bind(this,function(m){n.style.opacity=1;b.defaultVertexStyle=mxUtils.clone(c.initialDefaultVertexStyle);b.defaultEdgeStyle=mxUtils.clone(c.initialDefaultEdgeStyle);u(a,b.defaultVertexStyle);u(a,b.defaultEdgeStyle);u(g,b.defaultVertexStyle);u(h,b.defaultEdgeStyle);c.clearDefaultStyle();d?(b.currentEdgeStyle.sketch="1",b.currentVertexStyle.sketch="1"):(b.currentEdgeStyle.sketch="0",b.currentVertexStyle.sketch="0");b.currentVertexStyle.rounded=f?"1":"0";b.currentEdgeStyle.rounded="1";b.currentEdgeStyle.curved=
+k?"1":"0";e.beginUpdate();try{t(q,l);var p=new ChangePageSetup(c,null!=l?l.background:null);p.ignoreImage=!0;e.execute(p);e.execute(new ChangeGridColor(c,null!=l&&null!=l.gridColor?l.gridColor:b.view.defaultGridColor))}finally{e.endUpdate()}})),mxEvent.addListener(n,"mouseenter",mxUtils.bind(this,function(c){var d=b.getCellStyle;c=b.background;var f=b.view.gridColor;b.background=null!=l?l.background:null;b.view.gridColor=null!=l&&null!=l.gridColor?l.gridColor:b.view.defaultGridColor;b.getCellStyle=
+function(c){var f=mxUtils.clone(d.apply(this,arguments)),k=b.stylesheet.getDefaultVertexStyle(),m=g;e.isEdge(c)&&(k=b.stylesheet.getDefaultEdgeStyle(),m=h);v(f,q,k);u(a,f,c,l);u(m,f,c,l);return f};b.refresh();b.getCellStyle=d;b.background=c;b.view.gridColor=f})),mxEvent.addListener(n,"mouseleave",mxUtils.bind(this,function(a){b.refresh()})),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[m]=n));x.appendChild(n)}),E=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=
+null!=this.format.currentStylePage?this.format.currentStylePage:0;var H=[],B=mxUtils.bind(this,function(){0<H.length&&(H[this.format.currentStylePage].style.background="#84d7ff");for(var a=10*this.format.currentStylePage;a<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);a++){var b=Editor.styles[a];A(b.commonStyle,b.vertexStyle,b.edgeStyle,b.graph,a)}}),G=mxUtils.bind(this,function(a){0<=a&&a<E&&(H[this.format.currentStylePage].style.background="transparent",x.innerHTML="",this.format.currentStylePage=
+a,B())});if(1<E){h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.position="relative";h.style.textAlign="center";h.style.paddingTop="4px";h.style.width="210px";a.style.paddingBottom="8px";for(p=0;p<E;p++){var y=document.createElement("div");y.style.display="inline-block";y.style.width="6px";y.style.height="6px";y.style.marginLeft="4px";y.style.marginRight="3px";y.style.borderRadius="3px";y.style.cursor="pointer";y.style.background="transparent";y.style.border="1px solid #b5b6b7";
+mxUtils.bind(this,function(a,b){mxEvent.addListener(y,"click",mxUtils.bind(this,function(){G(a)}))})(p,y);h.appendChild(y);H.push(y)}a.appendChild(h);B();15>E&&(g=function(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})},n=document.createElement("div"),n.style.cssText="position:absolute;left:0px;top:4px;bottom:0px;width:20px;margin:0px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);",
+mxEvent.addListener(n,"click",mxUtils.bind(this,function(){G(mxUtils.mod(this.format.currentStylePage-1,E))})),p=document.createElement("div"),p.style.cssText="position:absolute;right:2px;top:4px;bottom:0px;width:20px;margin:0px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);",
+h.appendChild(n),h.appendChild(p),mxEvent.addListener(p,"click",mxUtils.bind(this,function(){G(mxUtils.mod(this.format.currentStylePage+1,E))})),g(n),g(p))}else B();return a};DiagramFormatPanel=function(a,c,b){BaseFormatPanel.call(this,a,c,b);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;
DiagramFormatPanel.prototype.init=function(){var a=this.editorUi.editor.graph;this.container.appendChild(this.addView(this.createPanel()));a.isEnabled()&&(this.container.appendChild(this.addOptions(this.createPanel())),this.container.appendChild(this.addPaperSize(this.createPanel())),this.container.appendChild(this.addStyleOps(this.createPanel())))};
DiagramFormatPanel.prototype.addView=function(a){var c=this.editorUi,b=c.editor.graph;a.appendChild(this.createTitle(mxResources.get("view")));this.addGridOption(a);DiagramFormatPanel.showPageView&&a.appendChild(this.createOption(mxResources.get("pageView"),function(){return b.pageVisible},function(a){c.actions.get("pageView").funct()},{install:function(a){this.listener=function(){a(b.pageVisible)};c.addListener("pageViewChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}}));
if(b.isEnabled()){var e=this.createColorOption(mxResources.get("background"),function(){return b.background},function(a){a=new ChangePageSetup(c,a);a.ignoreImage=!0;b.model.execute(a)},"#ffffff",{install:function(a){this.listener=function(){a(b.background)};c.addListener("backgroundColorChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});if(this.showBackgroundImageOption){var d=mxUtils.button(mxResources.get("change")+"...",function(a){c.showBackgroundImageDialog(null,c.editor.graph.backgroundImage);
@@ -3191,183 +3212,184 @@ DiagramFormatPanel.prototype.addPaperSize=function(a){var c=this.editorUi,b=c.ed
function(){e.set(b.pageFormat)});var d=function(){e.set(b.pageFormat)};c.addListener("pageFormatChanged",d);this.listeners.push({destroy:function(){c.removeListener(d)}});b.getModel().addListener(mxEvent.CHANGE,d);this.listeners.push({destroy:function(){b.getModel().removeListener(d)}});return a};
DiagramFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("editData"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editData").funct()}));c.setAttribute("title",mxResources.get("editData")+" ("+this.editorUi.actions.get("editData").shortcut+")");c.style.width="202px";c.style.marginBottom="2px";a.appendChild(c);mxUtils.br(a);c=mxUtils.button(mxResources.get("clearDefaultStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("clearDefaultStyle").funct()}));
c.setAttribute("title",mxResources.get("clearDefaultStyle")+" ("+this.editorUi.actions.get("clearDefaultStyle").shortcut+")");c.style.width="202px";a.appendChild(c);return a};DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function e(){mxActor.call(this)}function d(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function h(){mxCylinder.call(this)}function g(){mxShape.call(this)}function l(){mxShape.call(this)}function m(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}function n(){mxActor.call(this)}function p(){mxCylinder.call(this)}
-function r(){mxCylinder.call(this)}function u(){mxActor.call(this)}function t(){mxActor.call(this)}function v(){mxActor.call(this)}function y(){mxActor.call(this)}function x(){mxActor.call(this)}function B(){mxActor.call(this)}function E(){mxActor.call(this)}function G(a,b){this.canvas=a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,G.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;
-this.canvas.moveTo=mxUtils.bind(this,G.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,G.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,G.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,G.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,G.prototype.arcTo)}function A(){mxRectangleShape.call(this)}function F(){mxRectangleShape.call(this)}
-function z(){mxActor.call(this)}function H(){mxActor.call(this)}function K(){mxActor.call(this)}function L(){mxRectangleShape.call(this)}function O(){mxRectangleShape.call(this)}function J(){mxCylinder.call(this)}function U(){mxShape.call(this)}function aa(){mxShape.call(this)}function ba(){mxEllipse.call(this)}function R(){mxShape.call(this)}function Q(){mxShape.call(this)}function P(){mxRectangleShape.call(this)}function T(){mxShape.call(this)}function ea(){mxShape.call(this)}function ka(){mxShape.call(this)}
-function na(){mxShape.call(this)}function oa(){mxShape.call(this)}function fa(){mxCylinder.call(this)}function pa(){mxCylinder.call(this)}function ta(){mxRectangleShape.call(this)}function qa(){mxDoubleEllipse.call(this)}function ua(){mxDoubleEllipse.call(this)}function la(){mxArrowConnector.call(this);this.spacing=0}function ha(){mxArrowConnector.call(this);this.spacing=0}function ia(){mxActor.call(this)}function ca(){mxRectangleShape.call(this)}function ga(){mxActor.call(this)}function ma(){mxActor.call(this)}
-function ja(){mxActor.call(this)}function V(){mxActor.call(this)}function ra(){mxActor.call(this)}function W(){mxActor.call(this)}function N(){mxActor.call(this)}function Y(){mxActor.call(this)}function Z(){mxActor.call(this)}function da(){mxActor.call(this)}function X(){mxEllipse.call(this)}function Ea(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function Ma(){mxRhombus.call(this)}function Na(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function Fa(){mxEllipse.call(this)}
-function Ga(){mxEllipse.call(this)}function Ha(){mxActor.call(this)}function ya(){mxActor.call(this)}function za(){mxActor.call(this)}function M(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function wa(){mxConnector.call(this)}function Sa(a,b,c,d,e,f,g,k,h,l){g+=h;var q=d.clone();d.x-=e*(2*g+h);d.y-=f*(2*g+h);e*=g+h;f*=g+h;return function(){a.ellipse(q.x-
-e-g,q.y-f-g,2*g,2*g);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxSwimlane);a.prototype.getLabelBounds=function(a){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};a.prototype.paintVertexShape=function(a,b,c,d,e){0==this.getTitleSize()?mxRectangleShape.prototype.paintBackground.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),a.translate(-b,-c));this.paintForeground(a,
-b,c,d,e)};a.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.state){var q=this.flipH,f=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)var g=q,q=f,f=g;a.rotate(-this.getShapeRotation(),q,f,b+d/2,c+e/2);s=this.scale;b=this.bounds.x/s;c=this.bounds.y/s;d=this.bounds.width/s;e=this.bounds.height/s;this.paintTableForeground(a,b,c,d,e)}};a.prototype.paintTableForeground=function(a,b,c,d,e){var q=this.state.view.graph,f=q.getActualStartSize(this.state.cell),
-g=q.model.getChildCells(this.state.cell,!0);if(0<g.length){var w="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),D="0"!=mxUtils.getValue(this.state.style,"columnLines","1");if(w)for(w=1;w<g.length;w++){var k=q.getCellGeometry(g[w]);null!=k&&(a.begin(),a.moveTo(b+f.x,c+k.y),a.lineTo(b+d-f.width,c+k.y),a.end(),a.stroke())}if(D)for(d=q.model.getChildCells(g[0],!0),w=1;w<d.length;w++)k=q.getCellGeometry(d[w]),null!=k&&(a.begin(),a.moveTo(b+k.x+f.x,c+f.y),a.lineTo(b+k.x+f.x,c+e-f.height),a.end(),
-a.stroke())}};mxCellRenderer.registerShape("table",a);mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.darkOpacity=0;c.prototype.darkOpacity2=0;c.prototype.paintVertexShape=function(a,b,c,d,e){var q=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),f=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));
-a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-q,0);a.lineTo(d,q);a.lineTo(d,e);a.lineTo(q,e);a.lineTo(0,e-q);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=f&&(a.setFillAlpha(Math.abs(f)),a.setFillColor(0>f?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(d-q,0),a.lineTo(d,q),a.lineTo(q,q),a.close(),a.fill()),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(q,q),a.lineTo(q,e),a.lineTo(0,e-q),
-a.close(),a.fill()),a.begin(),a.moveTo(q,e),a.lineTo(q,q),a.lineTo(0,0),a.moveTo(q,q),a.lineTo(d,q),a.end(),a.stroke())};c.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",c);var Pa=Math.tan(mxUtils.toRadians(30)),xa=(.5-Pa)/2;mxCellRenderer.registerShape("isoRectangle",e);mxUtils.extend(b,mxCylinder);b.prototype.size=
-6;b.prototype.paintVertexShape=function(a,b,c,d,e){a.setFillColor(this.stroke);var q=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;a.ellipse(b+.5*(d-q),c+.5*(e-q),q,q);a.fill();a.setFillColor(mxConstants.NONE);a.rect(b,c,d,e);a.fill()};mxCellRenderer.registerShape("waypoint",b);mxUtils.extend(e,mxActor);e.prototype.size=20;e.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/Pa);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*b,b*xa);
-a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-xa)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",e);mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(d,e/(.5+Pa));f?(a.moveTo(0,.25*b),a.lineTo(.5*b,(.5-xa)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-xa)*b),a.lineTo(.5*b,(1-xa)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*xa),a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-xa)*b),a.lineTo(0,.75*
-b),a.close());a.end()};mxCellRenderer.registerShape("isoCube",d);mxUtils.extend(f,mxCylinder);f.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(f&&null!=this.fill||!f&&null==this.fill)a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,-b);f||(a.moveTo(0,
-b),a.curveTo(0,-b/3,d,-b/3,d,b),a.lineTo(d,e-b),a.curveTo(d,e+b/3,0,e+b/3,0,e-b),a.close())};f.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",f);mxUtils.extend(k,mxCylinder);k.prototype.size=30;k.prototype.darkOpacity=0;k.prototype.paintVertexShape=function(a,b,c,d,e){var q=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),f=
-Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-q,0);a.lineTo(d,q);a.lineTo(d,e);a.lineTo(0,e);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=f&&(a.setFillAlpha(Math.abs(f)),a.setFillColor(0>f?"#FFFFFF":"#000000"),a.begin(),a.moveTo(d-q,0),a.lineTo(d-q,q),a.lineTo(d,q),a.close(),a.fill()),a.begin(),a.moveTo(d-q,0),a.lineTo(d-q,q),a.lineTo(d,q),a.end(),a.stroke())};
-mxCellRenderer.registerShape("note",k);mxUtils.extend(h,k);mxCellRenderer.registerShape("note2",h);h.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(a.height*this.scale,b*this.scale),0,0)}return null};mxUtils.extend(g,mxShape);g.prototype.isoAngle=15;g.prototype.paintVertexShape=function(a,b,c,d,e){var q=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*
-Math.PI/200,q=Math.min(d*Math.tan(q),.5*e);a.translate(b,c);a.begin();a.moveTo(.5*d,0);a.lineTo(d,q);a.lineTo(d,e-q);a.lineTo(.5*d,e);a.lineTo(0,e-q);a.lineTo(0,q);a.close();a.fillAndStroke();a.setShadow(!1);a.begin();a.moveTo(0,q);a.lineTo(.5*d,2*q);a.lineTo(d,q);a.moveTo(.5*d,2*q);a.lineTo(.5*d,e);a.stroke()};mxCellRenderer.registerShape("isoCube2",g);mxUtils.extend(l,mxShape);l.prototype.size=15;l.prototype.paintVertexShape=function(a,b,c,d,e){var q=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));a.translate(b,c);0==q?(a.rect(0,0,d,e),a.fillAndStroke()):(a.begin(),a.moveTo(0,q),a.arcTo(.5*d,q,0,0,1,.5*d,0),a.arcTo(.5*d,q,0,0,1,d,q),a.lineTo(d,e-q),a.arcTo(.5*d,q,0,0,1,.5*d,e),a.arcTo(.5*d,q,0,0,1,0,e-q),a.close(),a.fillAndStroke(),a.setShadow(!1),a.begin(),a.moveTo(d,q),a.arcTo(.5*d,q,0,0,1,.5*d,2*q),a.arcTo(.5*d,q,0,0,1,0,q),a.stroke())};mxCellRenderer.registerShape("cylinder2",l);mxUtils.extend(m,mxCylinder);m.prototype.size=15;m.prototype.paintVertexShape=function(a,
-b,c,d,e){var q=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),f=mxUtils.getValue(this.style,"lid",!0);a.translate(b,c);0==q?(a.rect(0,0,d,e),a.fillAndStroke()):(a.begin(),f?(a.moveTo(0,q),a.arcTo(.5*d,q,0,0,1,.5*d,0),a.arcTo(.5*d,q,0,0,1,d,q)):(a.moveTo(0,0),a.arcTo(.5*d,q,0,0,0,.5*d,q),a.arcTo(.5*d,q,0,0,0,d,0)),a.lineTo(d,e-q),a.arcTo(.5*d,q,0,0,1,.5*d,e),a.arcTo(.5*d,q,0,0,1,0,e-q),a.close(),a.fillAndStroke(),a.setShadow(!1),f&&(a.begin(),a.moveTo(d,q),a.arcTo(.5*
-d,q,0,0,1,.5*d,2*q),a.arcTo(.5*d,q,0,0,1,0,q),a.stroke()))};mxCellRenderer.registerShape("cylinder3",m);mxUtils.extend(n,mxActor);n.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d/2,.5*e,d,0);a.quadTo(.5*d,e/2,d,e);a.quadTo(d/2,.5*e,0,e);a.quadTo(.5*d,e/2,0,0);a.end()};mxCellRenderer.registerShape("switch",n);mxUtils.extend(p,mxCylinder);p.prototype.tabWidth=60;p.prototype.tabHeight=20;p.prototype.tabPosition="right";p.prototype.arcSize=.1;p.prototype.paintVertexShape=function(a,
-b,c,d,e){a.translate(b,c);b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var q=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),f=mxUtils.getValue(this.style,"rounded",!1),g=mxUtils.getValue(this.style,"absoluteArcSize",!1),w=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));g||(w*=Math.min(d,e));w=Math.min(w,.5*d,.5*(e-c));b=Math.max(b,
-w);b=Math.min(d-w,b);f||(w=0);a.begin();"left"==q?(a.moveTo(Math.max(w,0),c),a.lineTo(Math.max(w,0),0),a.lineTo(b,0),a.lineTo(b,c)):(a.moveTo(d-b,c),a.lineTo(d-b,0),a.lineTo(d-Math.max(w,0),0),a.lineTo(d-Math.max(w,0),c));f?(a.moveTo(0,w+c),a.arcTo(w,w,0,0,1,w,c),a.lineTo(d-w,c),a.arcTo(w,w,0,0,1,d,w+c),a.lineTo(d,e-w),a.arcTo(w,w,0,0,1,d-w,e),a.lineTo(w,e),a.arcTo(w,w,0,0,1,0,e-w)):(a.moveTo(0,c),a.lineTo(d,c),a.lineTo(d,e),a.lineTo(0,e));a.close();a.fillAndStroke();a.setShadow(!1);"triangle"==mxUtils.getValue(this.style,
-"folderSymbol",null)&&(a.begin(),a.moveTo(d-30,c+20),a.lineTo(d-20,c+10),a.lineTo(d-10,c+20),a.close(),a.stroke())};mxCellRenderer.registerShape("folder",p);p.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var c=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,b=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,d=mxUtils.getValue(this.style,
-"rounded",!1),e=mxUtils.getValue(this.style,"absoluteArcSize",!1),q=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(q*=Math.min(a.width,a.height));q=Math.min(q,.5*a.width,.5*(a.height-b));d||(q=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(q,0,Math.min(a.width,a.width-c),Math.min(a.height,a.height-b)):new mxRectangle(Math.min(a.width,a.width-c),0,q,Math.min(a.height,a.height-b))}return new mxRectangle(0,Math.min(a.height,b),0,0)}return null};
-mxUtils.extend(r,mxCylinder);r.prototype.arcSize=.1;r.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);var q=mxUtils.getValue(this.style,"rounded",!1),f=mxUtils.getValue(this.style,"absoluteArcSize",!1);b=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));c=mxUtils.getValue(this.style,"umlStateConnection",null);f||(b*=Math.min(d,e));b=Math.min(b,.5*d,.5*e);q||(b=0);q=0;null!=c&&(q=10);a.begin();a.moveTo(q,b);a.arcTo(b,b,0,0,1,q+b,0);a.lineTo(d-b,0);a.arcTo(b,b,0,0,1,d,
-b);a.lineTo(d,e-b);a.arcTo(b,b,0,0,1,d-b,e);a.lineTo(q+b,e);a.arcTo(b,b,0,0,1,q,e-b);a.close();a.fillAndStroke();a.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(a.roundrect(d-40,e-20,10,10,3,3),a.stroke(),a.roundrect(d-20,e-20,10,10,3,3),a.stroke(),a.begin(),a.moveTo(d-30,e-15),a.lineTo(d-20,e-15),a.stroke());"connPointRefEntry"==c?(a.ellipse(0,.5*e-10,20,20),a.fillAndStroke()):"connPointRefExit"==c&&(a.ellipse(0,.5*e-10,20,20),a.fillAndStroke(),a.begin(),a.moveTo(5,
-.5*e-5),a.lineTo(15,.5*e+5),a.moveTo(15,.5*e-5),a.lineTo(5,.5*e+5),a.stroke())};r.prototype.getLabelMargins=function(a){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",r);mxUtils.extend(u,mxActor);u.prototype.size=30;u.prototype.isRoundable=function(){return!0};u.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("card",u);mxUtils.extend(t,mxActor);t.prototype.size=.4;t.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,b/2);a.quadTo(d/4,1.4*b,d/2,b/2);a.quadTo(3*
-d/4,b*(1-1.4),d,b/2);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};t.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"size",this.size),c=a.width,d=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return b*=d,new mxRectangle(a.x,a.y+b,c,d-2*b);b*=c;return new mxRectangle(a.x+b,a.y,c-
-2*b,d)}return a};mxCellRenderer.registerShape("tape",t);mxUtils.extend(v,mxActor);v.prototype.size=.3;v.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};v.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(d,0);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/
-4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};mxCellRenderer.registerShape("document",v);var Xa=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,b,c,d){var e=mxUtils.getValue(this.style,"size");return null!=e?d*Math.max(0,Math.min(1,e)):Xa.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*
-this.scale,a.height*b),0,0)}return null};m.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(b/=2);return new mxRectangle(0,Math.min(a.height*this.scale,2*b*this.scale),0,Math.max(0,.3*b*this.scale))}return null};p.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,
-"labelInHeader",!1)){var c=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,b=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,d=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,"absoluteArcSize",!1),q=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(q*=Math.min(a.width,a.height));q=Math.min(q,.5*a.width,.5*(a.height-b));d||(q=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(q,0,Math.min(a.width,a.width-
-c),Math.min(a.height,a.height-b)):new mxRectangle(Math.min(a.width,a.width-c),0,q,Math.min(a.height,a.height-b))}return new mxRectangle(0,Math.min(a.height,b),0,0)}return null};r.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};h.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"size",
-15);return new mxRectangle(0,Math.min(a.height*this.scale,b*this.scale),0,Math.max(0,b*this.scale))}return null};mxUtils.extend(y,mxActor);y.prototype.size=.2;y.prototype.fixedSize=20;y.prototype.isRoundable=function(){return!0};y.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d-b,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("parallelogram",y);mxUtils.extend(x,mxActor);x.prototype.size=.2;x.prototype.fixedSize=20;x.prototype.isRoundable=function(){return!0};x.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*d,parseFloat(mxUtils.getValue(this.style,"size",
-this.fixedSize)))):d*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("trapezoid",x);mxUtils.extend(B,mxActor);B.prototype.size=.5;B.prototype.redrawPath=function(a,b,c,d,e){a.setFillColor(null);b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(b,0),new mxPoint(b,e/2),new mxPoint(0,e/2),new mxPoint(b,e/2),new mxPoint(b,e),new mxPoint(d,e)],this.isRounded,c,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",B);mxUtils.extend(E,mxActor);E.prototype.redrawPath=function(a,b,c,d,e){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=d/5;a.rect(0,0,b,e);a.fillAndStroke();a.rect(2*b,0,b,e);
-a.fillAndStroke();a.rect(4*b,0,b,e);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",E);G.prototype.moveTo=function(a,b){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;this.firstX=a;this.firstY=b};G.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)};G.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,
-arguments);this.lastX=c;this.lastY=d};G.prototype.curveTo=function(a,b,c,d,e,f){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=f};G.prototype.arcTo=function(a,b,c,d,e,f,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=g};G.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),e=Math.abs(b-this.lastY),q=Math.sqrt(d*d+e*e);if(2>q){this.originalLineTo.apply(this.canvas,
-arguments);this.lastX=a;this.lastY=b;return}var f=Math.round(q/10),g=this.defaultVariation;5>f&&(f=5,g/=3);for(var k=c(a-this.lastX)*d/f,c=c(b-this.lastY)*e/f,d=d/q,e=e/q,q=0;q<f;q++){var w=(Math.random()-.5)*g;this.originalLineTo.call(this.canvas,k*q+this.lastX-w*e,c*q+this.lastY-w*d)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};G.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 Ya=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(a){Ya.apply(this,arguments);null==a.handJiggle&&(a.handJiggle=this.createHandJiggle(a))};var Za=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(a){Za.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),
-delete a.handJiggle)};mxShape.prototype.createComicCanvas=function(a){return new G(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(a){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(a)};mxRhombus.prototype.defaultJiggle=2;var $a=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"))&&$a.apply(this,arguments)};var ab=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle||a.handJiggle.constructor!=G)ab.apply(this,arguments);else{var q=!0;null!=this.style&&(q="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(q||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)q||
-null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?q=Math.min(d/2,Math.min(e/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,q=Math.min(d*q,e*q)),a.moveTo(b+q,c),a.lineTo(b+d-q,c),a.quadTo(b+d,c,b+d,c+q),a.lineTo(b+d,c+e-q),a.quadTo(b+d,c+e,b+d-q,
-c+e),a.lineTo(b+q,c+e),a.quadTo(b,c+e,b,c+e-q),a.lineTo(b,c+q),a.quadTo(b,c,b+q,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,c)),a.close(),a.end(),a.fillAndStroke()}};mxUtils.extend(A,mxRectangleShape);A.prototype.size=.1;A.prototype.fixedSize=!1;A.prototype.isHtmlAllowed=function(){return!1};A.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||
-this.direction==mxConstants.DIRECTION_WEST)){var b=a.width,c=a.height;a=new mxRectangle(a.x,a.y,b,c);var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(b*e,c*e));a.x+=Math.round(d);a.width-=Math.round(2*d)}return a};A.prototype.paintForeground=function(a,b,c,d,e){var q=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),
-f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),f=q?Math.max(0,Math.min(d,f)):d*Math.max(0,Math.min(1,f));this.isRounded&&(q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*q,e*q)));f=Math.round(f);a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.moveTo(b+d-f,c);a.lineTo(b+d-f,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",A);mxCellRenderer.registerShape("process2",
-A);mxUtils.extend(F,mxRectangleShape);F.prototype.paintBackground=function(a,b,c,d,e){a.setFillColor(mxConstants.NONE);a.rect(b,c,d,e);a.fill()};F.prototype.paintForeground=function(a,b,c,d,e){};mxCellRenderer.registerShape("transparent",F);mxUtils.extend(z,mxHexagon);z.prototype.size=30;z.prototype.position=.5;z.prototype.position2=.5;z.prototype.base=20;z.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};z.prototype.isRoundable=
-function(){return!0};z.prototype.redrawPath=function(a,b,c,d,e){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var q=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),g=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base))));
-this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-c),new mxPoint(Math.min(d,q+g),e-c),new mxPoint(f,e),new mxPoint(Math.max(0,q),e-c),new mxPoint(0,e-c)],this.isRounded,b,!0,[4])};mxCellRenderer.registerShape("callout",z);mxUtils.extend(H,mxActor);H.prototype.size=.2;H.prototype.fixedSize=20;H.prototype.isRoundable=function(){return!0};H.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,
-"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("step",H);mxUtils.extend(K,mxHexagon);K.prototype.size=.25;K.prototype.fixedSize=20;K.prototype.isRoundable=function(){return!0};
-K.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*d,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.5*e),new mxPoint(d-b,e),new mxPoint(b,e),new mxPoint(0,.5*e)],this.isRounded,c,
-!0)};mxCellRenderer.registerShape("hexagon",K);mxUtils.extend(L,mxRectangleShape);L.prototype.isHtmlAllowed=function(){return!1};L.prototype.paintForeground=function(a,b,c,d,e){var q=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+q);a.lineTo(b+d/2,c+e-q);a.moveTo(b+q,c+e/2);a.lineTo(b+d-q,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",L);var Ua=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==
-this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){Ua.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var q=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=q;c+=q;d-=2*q;e-=2*q;0<d&&0<e&&(a.setShadow(!1),Ua.apply(this,[a,b,c,d,e]))}};mxUtils.extend(O,
-mxRectangleShape);O.prototype.isHtmlAllowed=function(){return!1};O.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};O.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var q=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);b+=q;c+=q;d-=2*q;e-=2*q;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var q=0,f;do{f=mxCellRenderer.defaultShapes[this.style["symbol"+q]];if(null!=f){var g=this.style["symbol"+q+"Align"],k=this.style["symbol"+q+"VerticalAlign"],h=this.style["symbol"+q+"Width"],w=this.style["symbol"+q+"Height"],D=this.style["symbol"+q+"Spacing"]||0,l=this.style["symbol"+q+"VSpacing"]||D,C=this.style["symbol"+q+"ArcSpacing"];null!=C&&(C*=this.getArcSize(d+this.strokewidth,
-e+this.strokewidth),D+=C,l+=C);var C=b,I=c,C=g==mxConstants.ALIGN_CENTER?C+(d-h)/2:g==mxConstants.ALIGN_RIGHT?C+(d-h-D):C+D,I=k==mxConstants.ALIGN_MIDDLE?I+(e-w)/2:k==mxConstants.ALIGN_BOTTOM?I+(e-w-l):I+l;a.save();g=new f;g.style=this.style;f.prototype.paintVertexShape.call(g,a,C,I,h,w);a.restore()}q++}while(null!=f)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",O);mxUtils.extend(J,mxCylinder);J.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,
-0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.registerShape("message",J);mxUtils.extend(U,mxShape);U.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",
-U);mxUtils.extend(aa,mxShape);aa.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};aa.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",aa);mxUtils.extend(ba,mxEllipse);ba.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",ba);mxUtils.extend(R,mxShape);R.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",R);mxUtils.extend(Q,mxShape);Q.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};Q.prototype.paintBackground=
-function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,e/8,d,7*e/8);a.fillAndStroke()};Q.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,e/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",Q);mxUtils.extend(P,mxRectangleShape);P.prototype.size=40;P.prototype.isHtmlAllowed=function(){return!1};P.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,b)};P.prototype.paintBackground=function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),q=mxUtils.getValue(this.style,"participant");null==q||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,b,c,d,f):(q=this.state.view.graph.cellRenderer.getShape(q),null!=q&&q!=P&&(q=new q,q.apply(this.state),a.save(),q.paintVertexShape(a,b,c,d,f),a.restore()));f<e&&(a.setDashed("1"==
-mxUtils.getValue(this.style,"lifelineDashed","1")),a.begin(),a.moveTo(b+d/2,c+f),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};P.prototype.paintForeground=function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,b,c,d,Math.min(e,f))};mxCellRenderer.registerShape("umlLifeline",P);mxUtils.extend(T,mxShape);T.prototype.width=60;T.prototype.height=30;T.prototype.corner=10;T.prototype.getLabelMargins=function(a){return new mxRectangle(0,
-0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};T.prototype.paintBackground=function(a,b,c,d,e){var f=this.corner,q=Math.min(d,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),g=Math.min(e,Math.max(1.5*f,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),k=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);k!=mxConstants.NONE&&
-(a.setFillColor(k),a.rect(b,c,d,e),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(a,b,c,d,e),a.setGradient(this.fill,this.gradient,b,c,d,e,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(b,c);a.lineTo(b+q,c);a.lineTo(b+q,c+Math.max(0,g-1.5*f));a.lineTo(b+Math.max(0,q-f),c+g);a.lineTo(b,c+g);a.close();a.fillAndStroke();a.begin();a.moveTo(b+q,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,c+e);a.lineTo(b,
-c+g);a.stroke()};mxCellRenderer.registerShape("umlFrame",T);mxPerimeter.CenterPerimeter=function(a,b,c,d){return new mxPoint(a.getCenterX(),a.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(a,b,c,d){d=P.prototype.size;null!=b&&(d=mxUtils.getValue(b.style,"size",d)*b.view.scale);b=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;c.x<a.getCenterX()&&(b=-1*(b+1));return new mxPoint(a.getCenterX()+b,Math.min(a.y+
-a.height,Math.max(a.y+d,c.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,b,c,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,b,c,d){d=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;null!=b.style.backboneSize&&(d+=parseFloat(b.style.backboneSize)*b.view.scale/
-2-1);if("south"==b.style[mxConstants.STYLE_DIRECTION]||"north"==b.style[mxConstants.STYLE_DIRECTION])return c.x<a.getCenterX()&&(d=-1*(d+1)),new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,c.y)));c.y<a.getCenterY()&&(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,c.x)),a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,b,c,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,
-new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(b.style,"size",z.prototype.size))*b.view.scale))),b.style),b,c,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=e?y.prototype.fixedSize:y.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));e&&(f*=b.view.scale);var q=a.x,g=a.y,k=a.width,h=a.height;b=null!=b?mxUtils.getValue(b.style,
-mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(q,g),new mxPoint(q+k,g+e),new mxPoint(q+k,g+h),new mxPoint(q,g+h-e),new mxPoint(q,g)]):(e=e?Math.max(0,Math.min(.5*k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(q+e,g),new mxPoint(q+k,g),new mxPoint(q+k-e,g+h),new mxPoint(q,g+h),new mxPoint(q+e,g)]);h=a.getCenterX();a=a.getCenterY();
-a=new mxPoint(h,a);d&&(c.x<q||c.x>q+k?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=e?x.prototype.fixedSize:x.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));e&&(f*=b.view.scale);var q=a.x,g=a.y,k=a.width,h=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):
-mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(.5*k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(q+e,g),new mxPoint(q+k-e,g),new mxPoint(q+k,g+h),new mxPoint(q,g+h),new mxPoint(q+e,g)]):b==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(q,g),new mxPoint(q+k,g),new mxPoint(q+k-e,g+h),new mxPoint(q+e,g+h),new mxPoint(q,g)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),
-g=[new mxPoint(q,g+e),new mxPoint(q+k,g),new mxPoint(q+k,g+h),new mxPoint(q,g+h-e),new mxPoint(q,g+e)]):(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(q,g),new mxPoint(q+k,g+e),new mxPoint(q+k,g+h-e),new mxPoint(q,g+h),new mxPoint(q,g)]);h=a.getCenterX();a=a.getCenterY();a=new mxPoint(h,a);d&&(c.x<q||c.x>q+k?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,
-b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=e?H.prototype.fixedSize:H.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));e&&(f*=b.view.scale);var q=a.x,g=a.y,k=a.width,h=a.height,w=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(q,g),new mxPoint(q+k-e,g),new mxPoint(q+
-k,a),new mxPoint(q+k-e,g+h),new mxPoint(q,g+h),new mxPoint(q+e,a),new mxPoint(q,g)]):b==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(q+e,g),new mxPoint(q+k,g),new mxPoint(q+k-e,a),new mxPoint(q+k,g+h),new mxPoint(q+e,g+h),new mxPoint(q,a),new mxPoint(q+e,g)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(q,g+e),new mxPoint(w,g),new mxPoint(q+k,g+e),new mxPoint(q+k,g+h),new mxPoint(w,
-g+h-e),new mxPoint(q,g+h),new mxPoint(q,g+e)]):(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(q,g),new mxPoint(w,g+e),new mxPoint(q+k,g),new mxPoint(q+k,g+h-e),new mxPoint(w,g+h),new mxPoint(q,g+h-e),new mxPoint(q,g)]);w=new mxPoint(w,a);d&&(c.x<q||c.x>q+k?w.y=c.y:w.x=c.x);return mxUtils.getPerimeterPoint(g,w,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize",
-"0"),f=e?K.prototype.fixedSize:K.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));e&&(f*=b.view.scale);var q=a.x,g=a.y,k=a.width,h=a.height,w=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(w,g),new mxPoint(q+k,g+e),new mxPoint(q+k,g+h-e),new mxPoint(w,
-g+h),new mxPoint(q,g+h-e),new mxPoint(q,g+e),new mxPoint(w,g)]):(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(q+e,g),new mxPoint(q+k-e,g),new mxPoint(q+k,a),new mxPoint(q+k-e,g+h),new mxPoint(q+e,g+h),new mxPoint(q,a),new mxPoint(q+e,g)]);w=new mxPoint(w,a);d&&(c.x<q||c.x>q+k?w.y=c.y:w.x=c.x);return mxUtils.getPerimeterPoint(g,w,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ea,mxShape);ea.prototype.size=10;ea.prototype.paintBackground=
-function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",ea);mxUtils.extend(ka,mxShape);ka.prototype.size=10;ka.prototype.inset=2;ka.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),q=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;
-a.translate(b,c);a.begin();a.moveTo(d/2,f+q);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-q,f/2);a.quadTo((d-f)/2-q,f+q,d/2,f+q);a.quadTo((d+f)/2+q,f+q,(d+f)/2+q,f/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",ka);mxUtils.extend(na,mxShape);na.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",na);mxUtils.extend(oa,mxShape);
-oa.prototype.inset=2;oa.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.ellipse(0,f,d-2*f,e-2*f);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",oa);mxUtils.extend(fa,mxCylinder);fa.prototype.jettyWidth=20;fa.prototype.jettyHeight=10;fa.prototype.redrawPath=function(a,b,c,d,e,f){var q=parseFloat(mxUtils.getValue(this.style,
-"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=q/2;var q=c+q/2,g=Math.min(b,e-b),k=Math.min(g+2*b,e-b);f?(a.moveTo(c,g),a.lineTo(q,g),a.lineTo(q,g+b),a.lineTo(c,g+b),a.moveTo(c,k),a.lineTo(q,k),a.lineTo(q,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,g+b),a.lineTo(0,g+b),a.lineTo(0,g),a.lineTo(c,g),a.close());a.end()};mxCellRenderer.registerShape("module",
-fa);mxUtils.extend(pa,mxCylinder);pa.prototype.jettyWidth=32;pa.prototype.jettyHeight=12;pa.prototype.redrawPath=function(a,b,c,d,e,f){var q=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=q/2;var q=c+q/2,g=.3*e-b/2,k=.7*e-b/2;f?(a.moveTo(c,g),a.lineTo(q,g),a.lineTo(q,g+b),a.lineTo(c,g+b),a.moveTo(c,k),a.lineTo(q,k),a.lineTo(q,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,
-e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,g+b),a.lineTo(0,g+b),a.lineTo(0,g),a.lineTo(c,g),a.close());a.end()};mxCellRenderer.registerShape("component",pa);mxUtils.extend(ta,mxRectangleShape);ta.prototype.paintForeground=function(a,b,c,d,e){var f=d/2,q=e/2,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,[new mxPoint(b+f,c),new mxPoint(b+d,c+q),new mxPoint(b+f,c+e),new mxPoint(b,c+q)],this.isRounded,g,!0);
-a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",ta);mxUtils.extend(qa,mxDoubleEllipse);qa.prototype.outerStroke=!0;qa.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+f,c+f,d-2*f,e-2*f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.registerShape("endState",qa);mxUtils.extend(ua,qa);ua.prototype.outerStroke=!1;
-mxCellRenderer.registerShape("startState",ua);mxUtils.extend(la,mxArrowConnector);la.prototype.defaultWidth=4;la.prototype.isOpenEnded=function(){return!0};la.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};la.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",la);mxUtils.extend(ha,mxArrowConnector);ha.prototype.defaultWidth=10;ha.prototype.defaultArrowWidth=20;ha.prototype.getStartArrowWidth=
-function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};ha.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};ha.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",ha);mxUtils.extend(ia,mxActor);ia.prototype.size=30;ia.prototype.isRoundable=function(){return!0};
-ia.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("manualInput",ia);mxUtils.extend(ca,mxRectangleShape);ca.prototype.dx=20;ca.prototype.dy=20;ca.prototype.isHtmlAllowed=function(){return!1};ca.prototype.paintForeground=
-function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*q,e*q));q=Math.max(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+f);a.lineTo(b+d,c+f);a.end();a.stroke();a.begin();a.moveTo(b+q,c);a.lineTo(b+
-q,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",ca);mxUtils.extend(ga,mxActor);ga.prototype.dx=20;ga.prototype.dy=20;ga.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
-[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint(b,c),new mxPoint(b,e),new mxPoint(0,e)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("corner",ga);mxUtils.extend(ma,mxActor);ma.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(0,e);a.end();a.moveTo(d,0);a.lineTo(d,e);a.end();a.moveTo(0,e/2);a.lineTo(d,e/2);a.end()};mxCellRenderer.registerShape("crossbar",ma);mxUtils.extend(ja,mxActor);ja.prototype.dx=20;ja.prototype.dy=20;ja.prototype.redrawPath=function(a,
-b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint((d+b)/2,c),new mxPoint((d+b)/2,e),new mxPoint((d-b)/2,e),new mxPoint((d-b)/2,c),new mxPoint(0,c)],this.isRounded,
-f,!0);a.end()};mxCellRenderer.registerShape("tee",ja);mxUtils.extend(V,mxActor);V.prototype.arrowWidth=.3;V.prototype.arrowSize=.2;V.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));c=(e-f)/2;var f=c+f,q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,
-c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(0,f)],this.isRounded,q,!0);a.end()};mxCellRenderer.registerShape("singleArrow",V);mxUtils.extend(ra,mxActor);ra.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",V.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",V.prototype.arrowSize))));c=(e-f)/2;var f=c+f,q=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(b,f),new mxPoint(b,e)],this.isRounded,q,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",ra);mxUtils.extend(W,mxActor);W.prototype.size=.1;W.prototype.fixedSize=20;W.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,
-Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(b,0);a.lineTo(d,0);a.quadTo(d-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",W);mxUtils.extend(N,mxActor);N.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.registerShape("or",N);mxUtils.extend(Y,
-mxActor);Y.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",Y);mxUtils.extend(Z,mxActor);Z.prototype.size=20;Z.prototype.isRoundable=function(){return!0};Z.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
-[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("loopLimit",Z);mxUtils.extend(da,mxActor);da.prototype.size=.375;da.prototype.isRoundable=function(){return!0};da.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
-[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",da);mxUtils.extend(X,mxEllipse);X.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",X);mxUtils.extend(Ea,mxEllipse);Ea.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",Ea);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,
-c+.855*e);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",Ba);mxUtils.extend(Ma,mxRhombus);Ma.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",Ma);mxUtils.extend(Na,mxEllipse);Na.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke();
-a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",Na);mxUtils.extend(Oa,mxEllipse);Oa.prototype.paintVertexShape=function(a,b,c,d,e){var f=c+e-5;a.begin();a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,f);a.lineTo(b+10,f-5);a.moveTo(b,f);a.lineTo(b+10,f+5);a.moveTo(b,f);a.lineTo(b+d,f);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,f);a.lineTo(b+d-10,f-5);a.moveTo(b+d,f);a.lineTo(b+d-10,f+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",
-Oa);mxUtils.extend(Fa,mxEllipse);Fa.prototype.paintVertexShape=function(a,b,c,d,e){this.outline||a.setStrokeColor(null);if(null!=this.style){var f=a.pointerEvents;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1);a.rect(b,c,d,e);a.fill();a.pointerEvents=f;a.setStrokeColor(this.stroke);a.begin();a.moveTo(b,c);this.outline||"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(b+d,c):a.moveTo(b+d,c);this.outline||
-"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(b+d,c+e):a.moveTo(b+d,c+e);this.outline||"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(b,c+e):a.moveTo(b,c+e);(this.outline||"1"==mxUtils.getValue(this.style,"left","1"))&&a.lineTo(b,c);a.end();a.stroke()}};mxCellRenderer.registerShape("partialRectangle",Fa);mxUtils.extend(Ga,mxEllipse);Ga.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,
-"line")?(a.moveTo(b+d/2,c),a.lineTo(b+d/2,c+e)):(a.moveTo(b,c+e/2),a.lineTo(b+d,c+e/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",Ga);mxUtils.extend(Ha,mxActor);Ha.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.registerShape("delay",Ha);mxUtils.extend(ya,mxActor);ya.prototype.size=.2;ya.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var f=
-Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=(e-f)/2;c=b+f;var g=(d-f)/2,f=g+f;a.moveTo(0,b);a.lineTo(g,b);a.lineTo(g,0);a.lineTo(f,0);a.lineTo(f,b);a.lineTo(d,b);a.lineTo(d,c);a.lineTo(f,c);a.lineTo(f,e);a.lineTo(g,e);a.lineTo(g,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.registerShape("cross",ya);mxUtils.extend(za,mxActor);za.prototype.size=.25;za.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)))*d);a.moveTo(0,e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.registerShape("display",za);mxUtils.extend(M,mxActor);M.prototype.cst={RECT2:"mxgraph.basic.rect"};M.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"}]}];M.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);this.strictDrawShape(a,0,0,d,e)};M.prototype.strictDrawShape=function(a,b,c,d,e,f){var g=f&&f.rectStyle?f.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),k=f&&f.absoluteCornerSize?f.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),h=f&&f.size?f.size:Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)))),q=f&&f.rectOutline?f.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),l=f&&f.indent?f.indent:Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),m=f&&f.dashed?f.dashed:mxUtils.getValue(this.style,"dashed",!1),n=f&&f.dashPattern?f.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),p=f&&f.relIndent?f.relIndent:Math.max(0,Math.min(50,l)),w=f&&f.top?f.top:mxUtils.getValue(this.style,"top",!0),D=f&&f.right?f.right:mxUtils.getValue(this.style,
-"right",!0),C=f&&f.bottom?f.bottom:mxUtils.getValue(this.style,"bottom",!0),r=f&&f.left?f.left:mxUtils.getValue(this.style,"left",!0),t=f&&f.topLeftStyle?f.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),u=f&&f.topRightStyle?f.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),I=f&&f.bottomRightStyle?f.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),v=f&&f.bottomLeftStyle?f.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle",
-"default"),Aa=f&&f.fillColor?f.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");f&&f.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var z=f&&f.strokeWidth?f.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),y=f&&f.fillColor2?f.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),x=f&&f.gradientColor2?f.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),A=f&&f.gradientDirection2?f.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2",
-"south"),B=f&&f.opacity?f.opacity:mxUtils.getValue(this.style,"opacity","100"),F=Math.max(0,Math.min(50,h));f=M.prototype;a.setDashed(m);n&&""!=n&&a.setDashPattern(n);a.setStrokeWidth(z);h=Math.min(.5*e,.5*d,h);k||(h=F*Math.min(d,e)/100);h=Math.min(h,.5*Math.min(d,e));k||(l=Math.min(p*Math.min(d,e)/100));l=Math.min(l,.5*Math.min(d,e)-h);(w||D||C||r)&&"frame"!=q&&(a.begin(),w?f.moveNW(a,b,c,d,e,g,t,h,r):a.moveTo(0,0),w&&f.paintNW(a,b,c,d,e,g,t,h,r),f.paintTop(a,b,c,d,e,g,u,h,D),D&&f.paintNE(a,b,c,
-d,e,g,u,h,w),f.paintRight(a,b,c,d,e,g,I,h,C),C&&f.paintSE(a,b,c,d,e,g,I,h,D),f.paintBottom(a,b,c,d,e,g,v,h,r),r&&f.paintSW(a,b,c,d,e,g,v,h,C),f.paintLeft(a,b,c,d,e,g,t,h,w),a.close(),a.fill(),a.setShadow(!1),a.setFillColor(y),m=k=B,"none"==y&&(k=0),"none"==x&&(m=0),a.setGradient(y,x,0,0,d,e,A,k,m),a.begin(),w?f.moveNWInner(a,b,c,d,e,g,t,h,l,w,r):a.moveTo(l,0),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,r),r&&C&&f.paintSWInner(a,b,c,d,e,g,v,h,l,C),f.paintBottomInner(a,b,c,d,e,g,I,h,l,D,C),C&&D&&f.paintSEInner(a,
-b,c,d,e,g,I,h,l),f.paintRightInner(a,b,c,d,e,g,u,h,l,w,D),D&&w&&f.paintNEInner(a,b,c,d,e,g,u,h,l),f.paintTopInner(a,b,c,d,e,g,t,h,l,r,w),w&&r&&f.paintNWInner(a,b,c,d,e,g,t,h,l),a.fill(),"none"==Aa&&(a.begin(),f.paintFolds(a,b,c,d,e,g,t,u,I,v,h,w,D,C,r),a.stroke()));w||D||C||!r?w||D||!C||r?!w&&!D&&C&&r?"frame"!=q?(a.begin(),f.moveSE(a,b,c,d,e,g,I,h,D),f.paintBottom(a,b,c,d,e,g,v,h,r),f.paintSW(a,b,c,d,e,g,v,h,C),f.paintLeft(a,b,c,d,e,g,t,h,w),"double"==q&&(f.moveNWInner(a,b,c,d,e,g,t,h,l,w,r),f.paintLeftInner(a,
-b,c,d,e,g,v,h,l,C,r),f.paintSWInner(a,b,c,d,e,g,v,h,l,C),f.paintBottomInner(a,b,c,d,e,g,I,h,l,D,C)),a.stroke()):(a.begin(),f.moveSE(a,b,c,d,e,g,I,h,D),f.paintBottom(a,b,c,d,e,g,v,h,r),f.paintSW(a,b,c,d,e,g,v,h,C),f.paintLeft(a,b,c,d,e,g,t,h,w),f.lineNWInner(a,b,c,d,e,g,t,h,l,w,r),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,r),f.paintSWInner(a,b,c,d,e,g,v,h,l,C),f.paintBottomInner(a,b,c,d,e,g,I,h,l,D,C),a.close(),a.fillAndStroke()):w||!D||C||r?!w&&D&&!C&&r?"frame"!=q?(a.begin(),f.moveSW(a,b,c,d,e,g,t,h,C),
-f.paintLeft(a,b,c,d,e,g,t,h,w),"double"==q&&(f.moveNWInner(a,b,c,d,e,g,t,h,l,w,r),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,r)),a.stroke(),a.begin(),f.moveNE(a,b,c,d,e,g,u,h,w),f.paintRight(a,b,c,d,e,g,I,h,C),"double"==q&&(f.moveSEInner(a,b,c,d,e,g,I,h,l,C),f.paintRightInner(a,b,c,d,e,g,u,h,l,w,D)),a.stroke()):(a.begin(),f.moveSW(a,b,c,d,e,g,t,h,C),f.paintLeft(a,b,c,d,e,g,t,h,w),f.lineNWInner(a,b,c,d,e,g,t,h,l,w,r),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,r),a.close(),a.fillAndStroke(),a.begin(),f.moveNE(a,
-b,c,d,e,g,u,h,w),f.paintRight(a,b,c,d,e,g,I,h,C),f.lineSEInner(a,b,c,d,e,g,I,h,l,C),f.paintRightInner(a,b,c,d,e,g,u,h,l,w,D),a.close(),a.fillAndStroke()):!w&&D&&C&&!r?"frame"!=q?(a.begin(),f.moveNE(a,b,c,d,e,g,u,h,w),f.paintRight(a,b,c,d,e,g,I,h,C),f.paintSE(a,b,c,d,e,g,I,h,D),f.paintBottom(a,b,c,d,e,g,v,h,r),"double"==q&&(f.moveSWInner(a,b,c,d,e,g,v,h,l,r),f.paintBottomInner(a,b,c,d,e,g,I,h,l,D,C),f.paintSEInner(a,b,c,d,e,g,I,h,l),f.paintRightInner(a,b,c,d,e,g,u,h,l,w,D)),a.stroke()):(a.begin(),
-f.moveNE(a,b,c,d,e,g,u,h,w),f.paintRight(a,b,c,d,e,g,I,h,C),f.paintSE(a,b,c,d,e,g,I,h,D),f.paintBottom(a,b,c,d,e,g,v,h,r),f.lineSWInner(a,b,c,d,e,g,v,h,l,r),f.paintBottomInner(a,b,c,d,e,g,I,h,l,D,C),f.paintSEInner(a,b,c,d,e,g,I,h,l),f.paintRightInner(a,b,c,d,e,g,u,h,l,w,D),a.close(),a.fillAndStroke()):!w&&D&&C&&r?"frame"!=q?(a.begin(),f.moveNE(a,b,c,d,e,g,u,h,w),f.paintRight(a,b,c,d,e,g,I,h,C),f.paintSE(a,b,c,d,e,g,I,h,D),f.paintBottom(a,b,c,d,e,g,v,h,r),f.paintSW(a,b,c,d,e,g,v,h,C),f.paintLeft(a,
-b,c,d,e,g,t,h,w),"double"==q&&(f.moveNWInner(a,b,c,d,e,g,t,h,l,w,r),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,r),f.paintSWInner(a,b,c,d,e,g,v,h,l,C),f.paintBottomInner(a,b,c,d,e,g,I,h,l,D,C),f.paintSEInner(a,b,c,d,e,g,I,h,l),f.paintRightInner(a,b,c,d,e,g,u,h,l,w,D)),a.stroke()):(a.begin(),f.moveNE(a,b,c,d,e,g,u,h,w),f.paintRight(a,b,c,d,e,g,I,h,C),f.paintSE(a,b,c,d,e,g,I,h,D),f.paintBottom(a,b,c,d,e,g,v,h,r),f.paintSW(a,b,c,d,e,g,v,h,C),f.paintLeft(a,b,c,d,e,g,t,h,w),f.lineNWInner(a,b,c,d,e,g,t,h,l,w,
-r),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,r),f.paintSWInner(a,b,c,d,e,g,v,h,l,C),f.paintBottomInner(a,b,c,d,e,g,I,h,l,D,C),f.paintSEInner(a,b,c,d,e,g,I,h,l),f.paintRightInner(a,b,c,d,e,g,u,h,l,w,D),a.close(),a.fillAndStroke()):!w||D||C||r?w&&!D&&!C&&r?"frame"!=q?(a.begin(),f.moveSW(a,b,c,d,e,g,v,h,C),f.paintLeft(a,b,c,d,e,g,t,h,w),f.paintNW(a,b,c,d,e,g,t,h,r),f.paintTop(a,b,c,d,e,g,u,h,D),"double"==q&&(f.moveNEInner(a,b,c,d,e,g,u,h,l,D),f.paintTopInner(a,b,c,d,e,g,t,h,l,r,w),f.paintNWInner(a,b,c,d,
-e,g,t,h,l),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,r)),a.stroke()):(a.begin(),f.moveSW(a,b,c,d,e,g,v,h,C),f.paintLeft(a,b,c,d,e,g,t,h,w),f.paintNW(a,b,c,d,e,g,t,h,r),f.paintTop(a,b,c,d,e,g,u,h,D),f.lineNEInner(a,b,c,d,e,g,u,h,l,D),f.paintTopInner(a,b,c,d,e,g,t,h,l,r,w),f.paintNWInner(a,b,c,d,e,g,t,h,l),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,r),a.close(),a.fillAndStroke()):w&&!D&&C&&!r?"frame"!=q?(a.begin(),f.moveNW(a,b,c,d,e,g,t,h,r),f.paintTop(a,b,c,d,e,g,u,h,D),"double"==q&&(f.moveNEInner(a,b,c,d,e,
-g,u,h,l,D),f.paintTopInner(a,b,c,d,e,g,t,h,l,r,w)),a.stroke(),a.begin(),f.moveSE(a,b,c,d,e,g,I,h,D),f.paintBottom(a,b,c,d,e,g,v,h,r),"double"==q&&(f.moveSWInner(a,b,c,d,e,g,v,h,l,r),f.paintBottomInner(a,b,c,d,e,g,I,h,l,D,C)),a.stroke()):(a.begin(),f.moveNW(a,b,c,d,e,g,t,h,r),f.paintTop(a,b,c,d,e,g,u,h,D),f.lineNEInner(a,b,c,d,e,g,u,h,l,D),f.paintTopInner(a,b,c,d,e,g,t,h,l,r,w),a.close(),a.fillAndStroke(),a.begin(),f.moveSE(a,b,c,d,e,g,I,h,D),f.paintBottom(a,b,c,d,e,g,v,h,r),f.lineSWInner(a,b,c,d,
-e,g,v,h,l,r),f.paintBottomInner(a,b,c,d,e,g,I,h,l,D,C),a.close(),a.fillAndStroke()):w&&!D&&C&&r?"frame"!=q?(a.begin(),f.moveSE(a,b,c,d,e,g,I,h,D),f.paintBottom(a,b,c,d,e,g,v,h,r),f.paintSW(a,b,c,d,e,g,v,h,C),f.paintLeft(a,b,c,d,e,g,t,h,w),f.paintNW(a,b,c,d,e,g,t,h,r),f.paintTop(a,b,c,d,e,g,u,h,D),"double"==q&&(f.moveNEInner(a,b,c,d,e,g,u,h,l,D),f.paintTopInner(a,b,c,d,e,g,t,h,l,r,w),f.paintNWInner(a,b,c,d,e,g,t,h,l),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,r),f.paintSWInner(a,b,c,d,e,g,v,h,l,C),f.paintBottomInner(a,
-b,c,d,e,g,I,h,l,D,C)),a.stroke()):(a.begin(),f.moveSE(a,b,c,d,e,g,I,h,D),f.paintBottom(a,b,c,d,e,g,v,h,r),f.paintSW(a,b,c,d,e,g,v,h,C),f.paintLeft(a,b,c,d,e,g,t,h,w),f.paintNW(a,b,c,d,e,g,t,h,r),f.paintTop(a,b,c,d,e,g,u,h,D),f.lineNEInner(a,b,c,d,e,g,u,h,l,D),f.paintTopInner(a,b,c,d,e,g,t,h,l,r,w),f.paintNWInner(a,b,c,d,e,g,t,h,l),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,r),f.paintSWInner(a,b,c,d,e,g,v,h,l,C),f.paintBottomInner(a,b,c,d,e,g,I,h,l,D,C),a.close(),a.fillAndStroke()):w&&D&&!C&&!r?"frame"!=
-q?(a.begin(),f.moveNW(a,b,c,d,e,g,t,h,r),f.paintTop(a,b,c,d,e,g,u,h,D),f.paintNE(a,b,c,d,e,g,u,h,w),f.paintRight(a,b,c,d,e,g,I,h,C),"double"==q&&(f.moveSEInner(a,b,c,d,e,g,I,h,l,C),f.paintRightInner(a,b,c,d,e,g,u,h,l,w,D),f.paintNEInner(a,b,c,d,e,g,u,h,l),f.paintTopInner(a,b,c,d,e,g,t,h,l,r,w)),a.stroke()):(a.begin(),f.moveNW(a,b,c,d,e,g,t,h,r),f.paintTop(a,b,c,d,e,g,u,h,D),f.paintNE(a,b,c,d,e,g,u,h,w),f.paintRight(a,b,c,d,e,g,I,h,C),f.lineSEInner(a,b,c,d,e,g,I,h,l,C),f.paintRightInner(a,b,c,d,e,
-g,u,h,l,w,D),f.paintNEInner(a,b,c,d,e,g,u,h,l),f.paintTopInner(a,b,c,d,e,g,t,h,l,r,w),a.close(),a.fillAndStroke()):w&&D&&!C&&r?"frame"!=q?(a.begin(),f.moveSW(a,b,c,d,e,g,v,h,C),f.paintLeft(a,b,c,d,e,g,t,h,w),f.paintNW(a,b,c,d,e,g,t,h,r),f.paintTop(a,b,c,d,e,g,u,h,D),f.paintNE(a,b,c,d,e,g,u,h,w),f.paintRight(a,b,c,d,e,g,I,h,C),"double"==q&&(f.moveSEInner(a,b,c,d,e,g,I,h,l,C),f.paintRightInner(a,b,c,d,e,g,u,h,l,w,D),f.paintNEInner(a,b,c,d,e,g,u,h,l),f.paintTopInner(a,b,c,d,e,g,t,h,l,r,w),f.paintNWInner(a,
-b,c,d,e,g,t,h,l),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,r)),a.stroke()):(a.begin(),f.moveSW(a,b,c,d,e,g,v,h,C),f.paintLeft(a,b,c,d,e,g,t,h,w),f.paintNW(a,b,c,d,e,g,t,h,r),f.paintTop(a,b,c,d,e,g,u,h,D),f.paintNE(a,b,c,d,e,g,u,h,w),f.paintRight(a,b,c,d,e,g,I,h,C),f.lineSEInner(a,b,c,d,e,g,I,h,l,C),f.paintRightInner(a,b,c,d,e,g,u,h,l,w,D),f.paintNEInner(a,b,c,d,e,g,u,h,l),f.paintTopInner(a,b,c,d,e,g,t,h,l,r,w),f.paintNWInner(a,b,c,d,e,g,t,h,l),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,r),a.close(),a.fillAndStroke()):
-w&&D&&C&&!r?"frame"!=q?(a.begin(),f.moveNW(a,b,c,d,e,g,t,h,r),f.paintTop(a,b,c,d,e,g,u,h,D),f.paintNE(a,b,c,d,e,g,u,h,w),f.paintRight(a,b,c,d,e,g,I,h,C),f.paintSE(a,b,c,d,e,g,I,h,D),f.paintBottom(a,b,c,d,e,g,v,h,r),"double"==q&&(f.moveSWInner(a,b,c,d,e,g,v,h,l,r),f.paintBottomInner(a,b,c,d,e,g,I,h,l,D,C),f.paintSEInner(a,b,c,d,e,g,I,h,l),f.paintRightInner(a,b,c,d,e,g,u,h,l,w,D),f.paintNEInner(a,b,c,d,e,g,u,h,l),f.paintTopInner(a,b,c,d,e,g,t,h,l,r,w)),a.stroke()):(a.begin(),f.moveNW(a,b,c,d,e,g,t,
-h,r),f.paintTop(a,b,c,d,e,g,u,h,D),f.paintNE(a,b,c,d,e,g,u,h,w),f.paintRight(a,b,c,d,e,g,I,h,C),f.paintSE(a,b,c,d,e,g,I,h,D),f.paintBottom(a,b,c,d,e,g,v,h,r),f.lineSWInner(a,b,c,d,e,g,v,h,l,r),f.paintBottomInner(a,b,c,d,e,g,I,h,l,D,C),f.paintSEInner(a,b,c,d,e,g,I,h,l),f.paintRightInner(a,b,c,d,e,g,u,h,l,w,D),f.paintNEInner(a,b,c,d,e,g,u,h,l),f.paintTopInner(a,b,c,d,e,g,t,h,l,r,w),a.close(),a.fillAndStroke()):w&&D&&C&&r&&("frame"!=q?(a.begin(),f.moveNW(a,b,c,d,e,g,t,h,r),f.paintNW(a,b,c,d,e,g,t,h,
-r),f.paintTop(a,b,c,d,e,g,u,h,D),f.paintNE(a,b,c,d,e,g,u,h,w),f.paintRight(a,b,c,d,e,g,I,h,C),f.paintSE(a,b,c,d,e,g,I,h,D),f.paintBottom(a,b,c,d,e,g,v,h,r),f.paintSW(a,b,c,d,e,g,v,h,C),f.paintLeft(a,b,c,d,e,g,t,h,w),a.close(),"double"==q&&(f.moveSWInner(a,b,c,d,e,g,v,h,l,r),f.paintSWInner(a,b,c,d,e,g,v,h,l,C),f.paintBottomInner(a,b,c,d,e,g,I,h,l,D,C),f.paintSEInner(a,b,c,d,e,g,I,h,l),f.paintRightInner(a,b,c,d,e,g,u,h,l,w,D),f.paintNEInner(a,b,c,d,e,g,u,h,l),f.paintTopInner(a,b,c,d,e,g,t,h,l,r,w),
-f.paintNWInner(a,b,c,d,e,g,t,h,l),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,r),a.close()),a.stroke()):(a.begin(),f.moveNW(a,b,c,d,e,g,t,h,r),f.paintNW(a,b,c,d,e,g,t,h,r),f.paintTop(a,b,c,d,e,g,u,h,D),f.paintNE(a,b,c,d,e,g,u,h,w),f.paintRight(a,b,c,d,e,g,I,h,C),f.paintSE(a,b,c,d,e,g,I,h,D),f.paintBottom(a,b,c,d,e,g,v,h,r),f.paintSW(a,b,c,d,e,g,v,h,C),f.paintLeft(a,b,c,d,e,g,t,h,w),a.close(),f.moveSWInner(a,b,c,d,e,g,v,h,l,r),f.paintSWInner(a,b,c,d,e,g,v,h,l,C),f.paintBottomInner(a,b,c,d,e,g,I,h,l,D,C),
-f.paintSEInner(a,b,c,d,e,g,I,h,l),f.paintRightInner(a,b,c,d,e,g,u,h,l,w,D),f.paintNEInner(a,b,c,d,e,g,u,h,l),f.paintTopInner(a,b,c,d,e,g,t,h,l,r,w),f.paintNWInner(a,b,c,d,e,g,t,h,l),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,r),a.close(),a.fillAndStroke())):"frame"!=q?(a.begin(),f.moveNW(a,b,c,d,e,g,t,h,r),f.paintTop(a,b,c,d,e,g,u,h,D),"double"==q&&(f.moveNEInner(a,b,c,d,e,g,u,h,l,D),f.paintTopInner(a,b,c,d,e,g,t,h,l,r,w)),a.stroke()):(a.begin(),f.moveNW(a,b,c,d,e,g,t,h,r),f.paintTop(a,b,c,d,e,g,u,h,D),
-f.lineNEInner(a,b,c,d,e,g,u,h,l,D),f.paintTopInner(a,b,c,d,e,g,t,h,l,r,w),a.close(),a.fillAndStroke()):"frame"!=q?(a.begin(),f.moveNE(a,b,c,d,e,g,u,h,w),f.paintRight(a,b,c,d,e,g,I,h,C),"double"==q&&(f.moveSEInner(a,b,c,d,e,g,I,h,l,C),f.paintRightInner(a,b,c,d,e,g,u,h,l,w,D)),a.stroke()):(a.begin(),f.moveNE(a,b,c,d,e,g,u,h,w),f.paintRight(a,b,c,d,e,g,I,h,C),f.lineSEInner(a,b,c,d,e,g,I,h,l,C),f.paintRightInner(a,b,c,d,e,g,u,h,l,w,D),a.close(),a.fillAndStroke()):"frame"!=q?(a.begin(),f.moveSE(a,b,c,
-d,e,g,I,h,D),f.paintBottom(a,b,c,d,e,g,v,h,r),"double"==q&&(f.moveSWInner(a,b,c,d,e,g,v,h,l,r),f.paintBottomInner(a,b,c,d,e,g,I,h,l,D,C)),a.stroke()):(a.begin(),f.moveSE(a,b,c,d,e,g,I,h,D),f.paintBottom(a,b,c,d,e,g,v,h,r),f.lineSWInner(a,b,c,d,e,g,v,h,l,r),f.paintBottomInner(a,b,c,d,e,g,I,h,l,D,C),a.close(),a.fillAndStroke()):"frame"!=q?(a.begin(),f.moveSW(a,b,c,d,e,g,t,h,C),f.paintLeft(a,b,c,d,e,g,t,h,w),"double"==q&&(f.moveNWInner(a,b,c,d,e,g,t,h,l,w,r),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,r)),
-a.stroke()):(a.begin(),f.moveSW(a,b,c,d,e,g,t,h,C),f.paintLeft(a,b,c,d,e,g,t,h,w),f.lineNWInner(a,b,c,d,e,g,t,h,l,w,r),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,r),a.close(),a.fillAndStroke());a.begin();f.paintFolds(a,b,c,d,e,g,t,u,I,v,h,w,D,C,r);a.stroke()};M.prototype.moveNW=function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==g&&"square"==f||!k?a.moveTo(0,0):a.moveTo(0,h)};M.prototype.moveNE=function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==g&&"square"==f||!k?a.moveTo(d,0):a.moveTo(d-h,0)};M.prototype.moveSE=
-function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==g&&"square"==f||!k?a.moveTo(d,e):a.moveTo(d,e-h)};M.prototype.moveSW=function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==g&&"square"==f||!k?a.moveTo(0,e):a.moveTo(h,e)};M.prototype.paintNW=function(a,b,c,d,e,f,g,h,k){if(k)if("rounded"==g||"default"==g&&"rounded"==f||"invRound"==g||"default"==g&&"invRound"==f){b=0;if("rounded"==g||"default"==g&&"rounded"==f)b=1;a.arcTo(h,h,0,0,b,h,0)}else("snip"==g||"default"==g&&"snip"==f||"fold"==g||"default"==
-g&&"fold"==f)&&a.lineTo(h,0);else a.lineTo(0,0)};M.prototype.paintTop=function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==g&&"square"==f||!k?a.lineTo(d,0):a.lineTo(d-h,0)};M.prototype.paintNE=function(a,b,c,d,e,f,g,h,k){if(k)if("rounded"==g||"default"==g&&"rounded"==f||"invRound"==g||"default"==g&&"invRound"==f){b=0;if("rounded"==g||"default"==g&&"rounded"==f)b=1;a.arcTo(h,h,0,0,b,d,h)}else("snip"==g||"default"==g&&"snip"==f||"fold"==g||"default"==g&&"fold"==f)&&a.lineTo(d,h);else a.lineTo(d,0)};
-M.prototype.paintRight=function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==g&&"square"==f||!k?a.lineTo(d,e):a.lineTo(d,e-h)};M.prototype.paintLeft=function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==g&&"square"==f||!k?a.lineTo(0,0):a.lineTo(0,h)};M.prototype.paintSE=function(a,b,c,d,e,f,g,h,k){if(k)if("rounded"==g||"default"==g&&"rounded"==f||"invRound"==g||"default"==g&&"invRound"==f){b=0;if("rounded"==g||"default"==g&&"rounded"==f)b=1;a.arcTo(h,h,0,0,b,d-h,e)}else("snip"==g||"default"==g&&"snip"==
-f||"fold"==g||"default"==g&&"fold"==f)&&a.lineTo(d-h,e);else a.lineTo(d,e)};M.prototype.paintBottom=function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==g&&"square"==f||!k?a.lineTo(0,e):a.lineTo(h,e)};M.prototype.paintSW=function(a,b,c,d,e,f,g,h,k){if(k)if("rounded"==g||"default"==g&&"rounded"==f||"invRound"==g||"default"==g&&"invRound"==f){b=0;if("rounded"==g||"default"==g&&"rounded"==f)b=1;a.arcTo(h,h,0,0,b,0,e-h)}else("snip"==g||"default"==g&&"snip"==f||"fold"==g||"default"==g&&"fold"==f)&&a.lineTo(0,
-e-h);else a.lineTo(0,e)};M.prototype.paintNWInner=function(a,b,c,d,e,f,g,h,k){if("rounded"==g||"default"==g&&"rounded"==f)a.arcTo(h-.5*k,h-.5*k,0,0,0,k,.5*k+h);else if("invRound"==g||"default"==g&&"invRound"==f)a.arcTo(h+k,h+k,0,0,1,k,k+h);else if("snip"==g||"default"==g&&"snip"==f)a.lineTo(k,.5*k+h);else if("fold"==g||"default"==g&&"fold"==f)a.lineTo(k+h,k+h),a.lineTo(k,k+h)};M.prototype.paintTopInner=function(a,b,c,d,e,f,g,h,k,l,m){l||m?!l&&m?a.lineTo(0,k):l&&!m?a.lineTo(k,0):l?"square"==g||"default"==
-g&&"square"==f?a.lineTo(k,k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.lineTo(h+.5*k,k):a.lineTo(h+k,k):a.lineTo(0,k):a.lineTo(0,0)};M.prototype.paintNEInner=function(a,b,c,d,e,f,g,h,k){if("rounded"==g||"default"==g&&"rounded"==f)a.arcTo(h-.5*k,h-.5*k,0,0,0,d-h-.5*k,k);else if("invRound"==g||"default"==g&&"invRound"==f)a.arcTo(h+k,h+k,0,0,1,d-h-k,k);else if("snip"==g||"default"==g&&"snip"==f)a.lineTo(d-h-.5*k,k);else if("fold"==g||"default"==g&&"fold"==f)a.lineTo(d-
-h-k,h+k),a.lineTo(d-h-k,k)};M.prototype.paintRightInner=function(a,b,c,d,e,f,g,h,k,l,m){l||m?!l&&m?a.lineTo(d-k,0):l&&!m?a.lineTo(d,k):l?"square"==g||"default"==g&&"square"==f?a.lineTo(d-k,k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.lineTo(d-k,h+.5*k):a.lineTo(d-k,h+k):a.lineTo(d-k,0):a.lineTo(d,0)};M.prototype.paintLeftInner=function(a,b,c,d,e,f,g,h,k,l,m){l||m?!l&&m?a.lineTo(k,e):l&&!m?a.lineTo(0,e-k):l?"square"==g||"default"==g&&"square"==f?a.lineTo(k,e-k):
-"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.lineTo(k,e-h-.5*k):a.lineTo(k,e-h-k):a.lineTo(k,e):a.lineTo(0,e)};M.prototype.paintSEInner=function(a,b,c,d,e,f,g,h,k){if("rounded"==g||"default"==g&&"rounded"==f)a.arcTo(h-.5*k,h-.5*k,0,0,0,d-k,e-h-.5*k);else if("invRound"==g||"default"==g&&"invRound"==f)a.arcTo(h+k,h+k,0,0,1,d-k,e-h-k);else if("snip"==g||"default"==g&&"snip"==f)a.lineTo(d-k,e-h-.5*k);else if("fold"==g||"default"==g&&"fold"==f)a.lineTo(d-h-k,e-h-k),a.lineTo(d-
-k,e-h-k)};M.prototype.paintBottomInner=function(a,b,c,d,e,f,g,h,k,l,m){l||m?!l&&m?a.lineTo(d,e-k):l&&!m?a.lineTo(d-k,e):"square"==g||"default"==g&&"square"==f||!l?a.lineTo(d-k,e-k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.lineTo(d-h-.5*k,e-k):a.lineTo(d-h-k,e-k):a.lineTo(d,e)};M.prototype.paintSWInner=function(a,b,c,d,e,f,g,h,k,l){if(!l)a.lineTo(k,e);else if("square"==g||"default"==g&&"square"==f)a.lineTo(k,e-k);else if("rounded"==g||"default"==g&&"rounded"==
-f)a.arcTo(h-.5*k,h-.5*k,0,0,0,h+.5*k,e-k);else if("invRound"==g||"default"==g&&"invRound"==f)a.arcTo(h+k,h+k,0,0,1,h+k,e-k);else if("snip"==g||"default"==g&&"snip"==f)a.lineTo(h+.5*k,e-k);else if("fold"==g||"default"==g&&"fold"==f)a.lineTo(k+h,e-h-k),a.lineTo(k+h,e-k)};M.prototype.moveSWInner=function(a,b,c,d,e,f,g,h,k,l){l?"square"==g||"default"==g&&"square"==f?a.moveTo(k,e-k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.moveTo(k,e-h-.5*k):("invRound"==g||"default"==
-g&&"invRound"==f||"fold"==g||"default"==g&&"fold"==f)&&a.moveTo(k,e-h-k):a.moveTo(0,e-k)};M.prototype.lineSWInner=function(a,b,c,d,e,f,g,h,k,l){l?"square"==g||"default"==g&&"square"==f?a.lineTo(k,e-k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.lineTo(k,e-h-.5*k):("invRound"==g||"default"==g&&"invRound"==f||"fold"==g||"default"==g&&"fold"==f)&&a.lineTo(k,e-h-k):a.lineTo(0,e-k)};M.prototype.moveSEInner=function(a,b,c,d,e,f,g,h,k,l){l?"square"==g||"default"==g&&"square"==
-f?a.moveTo(d-k,e-k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.moveTo(d-k,e-h-.5*k):("invRound"==g||"default"==g&&"invRound"==f||"fold"==g||"default"==g&&"fold"==f)&&a.moveTo(d-k,e-h-k):a.moveTo(d-k,e)};M.prototype.lineSEInner=function(a,b,c,d,e,f,g,h,k,l){l?"square"==g||"default"==g&&"square"==f?a.lineTo(d-k,e-k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.lineTo(d-k,e-h-.5*k):("invRound"==g||"default"==g&&"invRound"==f||"fold"==
-g||"default"==g&&"fold"==f)&&a.lineTo(d-k,e-h-k):a.lineTo(d-k,e)};M.prototype.moveNEInner=function(a,b,c,d,e,f,g,h,k,l){l?"square"==g||"default"==g&&"square"==f||l?a.moveTo(d-k,k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.moveTo(d-k,h+.5*k):("invRound"==g||"default"==g&&"invRound"==f||"fold"==g||"default"==g&&"fold"==f)&&a.moveTo(d-k,h+k):a.moveTo(d,k)};M.prototype.lineNEInner=function(a,b,c,d,e,f,g,h,k,l){l?"square"==g||"default"==g&&"square"==f||l?a.lineTo(d-
-k,k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.lineTo(d-k,h+.5*k):("invRound"==g||"default"==g&&"invRound"==f||"fold"==g||"default"==g&&"fold"==f)&&a.lineTo(d-k,h+k):a.lineTo(d,k)};M.prototype.moveNWInner=function(a,b,c,d,e,f,g,h,k,l,m){l||m?!l&&m?a.moveTo(k,0):l&&!m?a.moveTo(0,k):"square"==g||"default"==g&&"square"==f?a.moveTo(k,k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.moveTo(k,h+.5*k):("invRound"==g||"default"==g&&"invRound"==
-f||"fold"==g||"default"==g&&"fold"==f)&&a.moveTo(k,h+k):a.moveTo(0,0)};M.prototype.lineNWInner=function(a,b,c,d,e,f,g,h,k,l,m){l||m?!l&&m?a.lineTo(k,0):l&&!m?a.lineTo(0,k):"square"==g||"default"==g&&"square"==f?a.lineTo(k,k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.lineTo(k,h+.5*k):("invRound"==g||"default"==g&&"invRound"==f||"fold"==g||"default"==g&&"fold"==f)&&a.lineTo(k,h+k):a.lineTo(0,0)};M.prototype.paintFolds=function(a,b,c,d,e,f,g,h,k,l,m,n,p,r,t){if("fold"==
-f||"fold"==g||"fold"==h||"fold"==k||"fold"==l)("fold"==g||"default"==g&&"fold"==f)&&n&&t&&(a.moveTo(0,m),a.lineTo(m,m),a.lineTo(m,0)),("fold"==h||"default"==h&&"fold"==f)&&n&&p&&(a.moveTo(d-m,0),a.lineTo(d-m,m),a.lineTo(d,m)),("fold"==k||"default"==k&&"fold"==f)&&r&&p&&(a.moveTo(d-m,e),a.lineTo(d-m,e-m),a.lineTo(d,e-m)),("fold"==l||"default"==l&&"fold"==f)&&r&&t&&(a.moveTo(0,e-m),a.lineTo(m,e-m),a.lineTo(m,e))};mxCellRenderer.registerShape(M.prototype.cst.RECT2,M);M.prototype.constraints=null;mxUtils.extend(wa,
-mxConnector);wa.prototype.origPaintEdgeShape=wa.prototype.paintEdgeShape;wa.prototype.paintEdgeShape=function(a,b,c){for(var d=[],e=0;e<b.length;e++)d.push(mxUtils.clone(b[e]));var e=a.state.dashed,f=a.state.fixDash;wa.prototype.origPaintEdgeShape.apply(this,[a,d,c]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(e,f),wa.prototype.origPaintEdgeShape.apply(this,[a,b,c])))};mxCellRenderer.registerShape("filledEdge",
-wa);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var b=this.format.getSelectionState(),c=a.apply(this,arguments);"umlFrame"==b.style.shape&&c.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return c}}();mxMarker.addMarker("dash",function(a,b,c,d,e,f,g,h,k,l){var q=e*(g+k+1),m=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-q/2-m/2,d.y-m/2+q/2);a.lineTo(d.x+
-m/2-3*q/2,d.y-3*m/2-q/2);a.stroke()}});mxMarker.addMarker("box",function(a,b,c,d,e,f,g,h,k,l){var q=e*(g+k+1),m=f*(g+k+1),n=d.x+q/2,p=d.y+m/2;d.x-=q;d.y-=m;return function(){a.begin();a.moveTo(n-q/2-m/2,p-m/2+q/2);a.lineTo(n-q/2+m/2,p-m/2-q/2);a.lineTo(n+m/2-3*q/2,p-3*m/2-q/2);a.lineTo(n-m/2-3*q/2,p-3*m/2+q/2);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,g,h,k,l){var q=e*(g+k+1),m=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-q/2-m/2,d.y-m/2+q/2);
-a.lineTo(d.x+m/2-3*q/2,d.y-3*m/2-q/2);a.moveTo(d.x-q/2+m/2,d.y-m/2-q/2);a.lineTo(d.x-m/2-3*q/2,d.y-3*m/2+q/2);a.stroke()}});mxMarker.addMarker("circle",Sa);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,f,g,h,k,l){var q=d.clone(),m=Sa.apply(this,arguments),n=e*(g+2*k),p=f*(g+2*k);return function(){m.apply(this,arguments);a.begin();a.moveTo(q.x-e*k,q.y-f*k);a.lineTo(q.x-2*n+e*k,q.y-2*p+f*k);a.moveTo(q.x-n-p+f*k,q.y-p+n-e*k);a.lineTo(q.x+p-n-f*k,q.y-p-n+e*k);a.stroke()}});mxMarker.addMarker("halfCircle",
-function(a,b,c,d,e,f,g,h,k,l){var q=e*(g+k+1),m=f*(g+k+1),n=d.clone();d.x-=q;d.y-=m;return function(){a.begin();a.moveTo(n.x-m,n.y+q);a.quadTo(d.x-m,d.y+q,d.x,d.y);a.quadTo(d.x+m,d.y-q,n.x+m,n.y-q);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,g,h,k,l){b=e*k*1.118;c=f*k*1.118;e*=g+k;f*=g+k;var m=d.clone();m.x-=b;m.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(m.x,m.y);h?a.lineTo(m.x-e-f/2,m.y-f+e/2):a.lineTo(m.x+f/2-e,m.y-f-e/2);a.lineTo(m.x-e,m.y-f);a.close();
-l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,c,d,e,f,g,h,k,l,m){f*=h+l;g*=h+l;var q=e.clone();return function(){b.begin();b.moveTo(q.x,q.y);k?b.lineTo(q.x-f-g/a,q.y-g+f/a):b.lineTo(q.x+g/a-f,q.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Va=function(a,b,c){return Da(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+e*b/4-d*g/2)},function(b,d,e,f,
-g,h){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*b)/a.view.scale-c})},Da=function(a,b,c,d,e){return S(a,b,function(b){var e=a.absolutePoints,f=e.length-1;b=a.view.translate;var g=a.view.scale,h=c?e[0]:e[f],e=c?e[1]:e[f-1],f=e.x-h.x,k=e.y-h.y,l=Math.sqrt(f*f+k*k),h=d.call(this,l,f/l,k/l,h,e);return new mxPoint(h.x/g-b.x,h.y/g-b.y)},function(b,d,f){var g=a.absolutePoints,h=g.length-1;b=a.view.translate;var k=a.view.scale,l=c?g[0]:g[h],g=c?g[1]:g[h-1],h=g.x-l.x,
-m=g.y-l.y,q=Math.sqrt(h*h+m*m);d.x=(d.x+b.x)*k;d.y=(d.y+b.y)*k;e.call(this,q,h/q,m/q,l,g,d,f)})},va=function(a){return function(b){return[S(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",V.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",V.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,
-Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-c.x)/b.width))})]}},Wa=function(a){return function(b){return[S(b,["size"],function(b){var c=Math.max(0,Math.min(.5*b.height,parseFloat(mxUtils.getValue(this.state.style,"size",a))));return new mxPoint(b.x,b.y+c)},function(a,b){this.state.style.size=Math.max(0,b.y-a.y)},!0)]}},Qa=function(a,b,c){return function(d){var e=[S(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,
-parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)},!1)];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(sa(d));return e}},Ia=function(a,b,c,d,e){c=null!=c?c:.5;return function(f){var g=[S(f,["size"],function(b){var c=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,
-"size",c?e:a));return new mxPoint(b.x+Math.max(0,Math.min(.5*b.width,d*(c?1:b.width))),b.getCenterY())},function(a,b,d){a=null!=e&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?b.x-a.x:Math.max(0,Math.min(c,(b.x-a.x)/a.width));this.state.style.size=a},!1,d)];b&&mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(sa(f));return g}},Ta=function(a,b,c){a=null!=a?a:.5;return function(d){var e=[S(d,["size"],function(d){var e=null!=c?"0"!=mxUtils.getValue(this.state.style,"fixedSize",
-"0"):null,f=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",e?c:b)));return new mxPoint(d.x+Math.min(.75*d.width*a,f*(e?.75:.75*d.width)),d.y+d.height/4)},function(b,d){var e=null!=c&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?d.x-b.x:Math.max(0,Math.min(a,(d.x-b.x)/b.width*.75));this.state.style.size=e},!1,!0)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(sa(d));return e}},Ca=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,
-!1)&&b.push(sa(a));return b}},sa=function(a,b){return S(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=null!=b?b:c.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(c.x+c.width-Math.min(c.width/2,e),c.y+d)}e=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/
-2,c.height/2),Math.min(c.width,c.height)*e),c.y+d)},function(b,c,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(b.width,2*(b.x+b.width-c.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(b.width-c.x+b.x)/Math.min(b.width,b.height))))})},S=function(a,b,c,d,e,f,g){var h=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);h.execute=function(a){for(var c=
-0;c<b.length;c++)this.copyStyle(b[c]);g&&g(a)};h.getPosition=c;h.setPosition=d;h.ignoreGrid=null!=e?e:!0;if(f){var k=h.positionChanged;h.positionChanged=function(){k.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return h},Ja={link:function(a){return[Va(a,!0,10),Va(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(Da(a,["width",mxConstants.STYLE_STARTSIZE,
-mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*
-(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(Da(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
-!0,function(b,c,d,e,f){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/
-3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-
+function q(){mxCylinder.call(this)}function t(){mxActor.call(this)}function v(){mxActor.call(this)}function u(){mxActor.call(this)}function w(){mxActor.call(this)}function x(){mxActor.call(this)}function A(){mxActor.call(this)}function E(){mxActor.call(this)}function H(a,b){this.canvas=a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,H.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;
+this.canvas.moveTo=mxUtils.bind(this,H.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,H.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,H.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,H.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,H.prototype.arcTo)}function B(){mxRectangleShape.call(this)}function G(){mxRectangleShape.call(this)}
+function y(){mxActor.call(this)}function I(){mxActor.call(this)}function K(){mxActor.call(this)}function M(){mxRectangleShape.call(this)}function O(){mxRectangleShape.call(this)}function J(){mxCylinder.call(this)}function U(){mxShape.call(this)}function ba(){mxShape.call(this)}function ca(){mxEllipse.call(this)}function R(){mxShape.call(this)}function Q(){mxShape.call(this)}function P(){mxRectangleShape.call(this)}function T(){mxShape.call(this)}function ea(){mxShape.call(this)}function ka(){mxShape.call(this)}
+function na(){mxShape.call(this)}function oa(){mxShape.call(this)}function fa(){mxCylinder.call(this)}function pa(){mxCylinder.call(this)}function ta(){mxRectangleShape.call(this)}function qa(){mxDoubleEllipse.call(this)}function ua(){mxDoubleEllipse.call(this)}function la(){mxArrowConnector.call(this);this.spacing=0}function ha(){mxArrowConnector.call(this);this.spacing=0}function ia(){mxActor.call(this)}function da(){mxRectangleShape.call(this)}function ga(){mxActor.call(this)}function ma(){mxActor.call(this)}
+function ja(){mxActor.call(this)}function X(){mxActor.call(this)}function ra(){mxActor.call(this)}function Y(){mxActor.call(this)}function L(){mxActor.call(this)}function Z(){mxActor.call(this)}function V(){mxActor.call(this)}function W(){mxActor.call(this)}function aa(){mxEllipse.call(this)}function Ea(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function Ma(){mxRhombus.call(this)}function Na(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function Fa(){mxEllipse.call(this)}
+function Ga(){mxEllipse.call(this)}function Ha(){mxActor.call(this)}function ya(){mxActor.call(this)}function za(){mxActor.call(this)}function N(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function wa(){mxConnector.call(this)}function Sa(a,b,c,d,e,f,g,k,h,l){g+=h;var r=d.clone();d.x-=e*(2*g+h);d.y-=f*(2*g+h);e*=g+h;f*=g+h;return function(){a.ellipse(r.x-
+e-g,r.y-f-g,2*g,2*g);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxSwimlane);a.prototype.getLabelBounds=function(a){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};a.prototype.paintVertexShape=function(a,b,c,d,e){0==this.getTitleSize()?mxRectangleShape.prototype.paintBackground.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),a.translate(-b,-c));this.paintForeground(a,
+b,c,d,e)};a.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.state){var r=this.flipH,f=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)var g=r,r=f,f=g;a.rotate(-this.getShapeRotation(),r,f,b+d/2,c+e/2);s=this.scale;b=this.bounds.x/s;c=this.bounds.y/s;d=this.bounds.width/s;e=this.bounds.height/s;this.paintTableForeground(a,b,c,d,e)}};a.prototype.paintTableForeground=function(a,b,c,d,e){var r=this.state.view.graph,f=r.getActualStartSize(this.state.cell),
+g=r.model.getChildCells(this.state.cell,!0);if(0<g.length){var D="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),z="0"!=mxUtils.getValue(this.state.style,"columnLines","1"),k=r.getCellGeometry(g[0]),h=[{y:null!=k?k.y+k.height:0,cells:r.model.getChildCells(g[0],!0)}];if(D)for(D=1;D<g.length;D++){var k=r.getCellGeometry(g[D]),F={y:0,cells:r.model.getChildCells(g[D],!0)};h.push(F);null!=k&&(F.y=k.y+k.height,a.begin(),a.moveTo(b+f.x,c+k.y),a.lineTo(b+d-f.width,c+k.y),a.end(),a.stroke())}if(z)for(d=
+r.model.getChildCells(g[0],!0),D=1;D<d.length;D++)if(k=r.getCellGeometry(d[D]),null!=k){a.begin();a.moveTo(b+k.x+f.x,c+f.y);for(z=g=0;z<h.length;z++)F=h[z],null!=F&&(r.model.isVisible(F.cells[D])?g=F.y:(0<g&&a.lineTo(b+k.x+f.x,c+g-f.height),a.moveTo(b+k.x+f.x,c+F.y),g=0));a.lineTo(b+k.x+f.x,c+e-f.height);a.end();a.stroke()}}};mxCellRenderer.registerShape("table",a);mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.darkOpacity=0;c.prototype.darkOpacity2=0;c.prototype.paintVertexShape=function(a,
+b,c,d,e){var r=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),f=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-r,0);a.lineTo(d,r);a.lineTo(d,e);a.lineTo(r,e);a.lineTo(0,e-r);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),
+0!=f&&(a.setFillAlpha(Math.abs(f)),a.setFillColor(0>f?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(d-r,0),a.lineTo(d,r),a.lineTo(r,r),a.close(),a.fill()),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(r,r),a.lineTo(r,e),a.lineTo(0,e-r),a.close(),a.fill()),a.begin(),a.moveTo(r,e),a.lineTo(r,r),a.lineTo(0,0),a.moveTo(r,r),a.lineTo(d,r),a.end(),a.stroke())};c.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,
+"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",c);var Pa=Math.tan(mxUtils.toRadians(30)),xa=(.5-Pa)/2;mxCellRenderer.registerShape("isoRectangle",e);mxUtils.extend(b,mxCylinder);b.prototype.size=6;b.prototype.paintVertexShape=function(a,b,c,d,e){a.setFillColor(this.stroke);var r=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;a.ellipse(b+.5*(d-r),
+c+.5*(e-r),r,r);a.fill();a.setFillColor(mxConstants.NONE);a.rect(b,c,d,e);a.fill()};mxCellRenderer.registerShape("waypoint",b);mxUtils.extend(e,mxActor);e.prototype.size=20;e.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/Pa);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*b,b*xa);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-xa)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",e);mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.redrawPath=
+function(a,b,c,d,e,f){b=Math.min(d,e/(.5+Pa));f?(a.moveTo(0,.25*b),a.lineTo(.5*b,(.5-xa)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-xa)*b),a.lineTo(.5*b,(1-xa)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*xa),a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-xa)*b),a.lineTo(0,.75*b),a.close());a.end()};mxCellRenderer.registerShape("isoCube",d);mxUtils.extend(f,mxCylinder);f.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(f&&null!=
+this.fill||!f&&null==this.fill)a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,-b);f||(a.moveTo(0,b),a.curveTo(0,-b/3,d,-b/3,d,b),a.lineTo(d,e-b),a.curveTo(d,e+b/3,0,e+b/3,0,e-b),a.close())};f.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/
+8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",f);mxUtils.extend(k,mxCylinder);k.prototype.size=30;k.prototype.darkOpacity=0;k.prototype.paintVertexShape=function(a,b,c,d,e){var r=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),f=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-r,0);a.lineTo(d,r);a.lineTo(d,e);a.lineTo(0,e);a.lineTo(0,
+0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=f&&(a.setFillAlpha(Math.abs(f)),a.setFillColor(0>f?"#FFFFFF":"#000000"),a.begin(),a.moveTo(d-r,0),a.lineTo(d-r,r),a.lineTo(d,r),a.close(),a.fill()),a.begin(),a.moveTo(d-r,0),a.lineTo(d-r,r),a.lineTo(d,r),a.end(),a.stroke())};mxCellRenderer.registerShape("note",k);mxUtils.extend(h,k);mxCellRenderer.registerShape("note2",h);h.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,
+"size",15);return new mxRectangle(0,Math.min(a.height*this.scale,b*this.scale),0,0)}return null};mxUtils.extend(g,mxShape);g.prototype.isoAngle=15;g.prototype.paintVertexShape=function(a,b,c,d,e){var r=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,r=Math.min(d*Math.tan(r),.5*e);a.translate(b,c);a.begin();a.moveTo(.5*d,0);a.lineTo(d,r);a.lineTo(d,e-r);a.lineTo(.5*d,e);a.lineTo(0,e-r);a.lineTo(0,r);a.close();a.fillAndStroke();a.setShadow(!1);
+a.begin();a.moveTo(0,r);a.lineTo(.5*d,2*r);a.lineTo(d,r);a.moveTo(.5*d,2*r);a.lineTo(.5*d,e);a.stroke()};mxCellRenderer.registerShape("isoCube2",g);mxUtils.extend(l,mxShape);l.prototype.size=15;l.prototype.paintVertexShape=function(a,b,c,d,e){var r=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.translate(b,c);0==r?(a.rect(0,0,d,e),a.fillAndStroke()):(a.begin(),a.moveTo(0,r),a.arcTo(.5*d,r,0,0,1,.5*d,0),a.arcTo(.5*d,r,0,0,1,d,r),a.lineTo(d,e-r),a.arcTo(.5*d,
+r,0,0,1,.5*d,e),a.arcTo(.5*d,r,0,0,1,0,e-r),a.close(),a.fillAndStroke(),a.setShadow(!1),a.begin(),a.moveTo(d,r),a.arcTo(.5*d,r,0,0,1,.5*d,2*r),a.arcTo(.5*d,r,0,0,1,0,r),a.stroke())};mxCellRenderer.registerShape("cylinder2",l);mxUtils.extend(m,mxCylinder);m.prototype.size=15;m.prototype.paintVertexShape=function(a,b,c,d,e){var r=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),f=mxUtils.getValue(this.style,"lid",!0);a.translate(b,c);0==r?(a.rect(0,0,d,e),a.fillAndStroke()):
+(a.begin(),f?(a.moveTo(0,r),a.arcTo(.5*d,r,0,0,1,.5*d,0),a.arcTo(.5*d,r,0,0,1,d,r)):(a.moveTo(0,0),a.arcTo(.5*d,r,0,0,0,.5*d,r),a.arcTo(.5*d,r,0,0,0,d,0)),a.lineTo(d,e-r),a.arcTo(.5*d,r,0,0,1,.5*d,e),a.arcTo(.5*d,r,0,0,1,0,e-r),a.close(),a.fillAndStroke(),a.setShadow(!1),f&&(a.begin(),a.moveTo(d,r),a.arcTo(.5*d,r,0,0,1,.5*d,2*r),a.arcTo(.5*d,r,0,0,1,0,r),a.stroke()))};mxCellRenderer.registerShape("cylinder3",m);mxUtils.extend(n,mxActor);n.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d/
+2,.5*e,d,0);a.quadTo(.5*d,e/2,d,e);a.quadTo(d/2,.5*e,0,e);a.quadTo(.5*d,e/2,0,0);a.end()};mxCellRenderer.registerShape("switch",n);mxUtils.extend(p,mxCylinder);p.prototype.tabWidth=60;p.prototype.tabHeight=20;p.prototype.tabPosition="right";p.prototype.arcSize=.1;p.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));
+var r=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),f=mxUtils.getValue(this.style,"rounded",!1),g=mxUtils.getValue(this.style,"absoluteArcSize",!1),k=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));g||(k*=Math.min(d,e));k=Math.min(k,.5*d,.5*(e-c));b=Math.max(b,k);b=Math.min(d-k,b);f||(k=0);a.begin();"left"==r?(a.moveTo(Math.max(k,0),c),a.lineTo(Math.max(k,0),0),a.lineTo(b,0),a.lineTo(b,c)):(a.moveTo(d-b,c),a.lineTo(d-b,0),a.lineTo(d-Math.max(k,0),0),a.lineTo(d-Math.max(k,
+0),c));f?(a.moveTo(0,k+c),a.arcTo(k,k,0,0,1,k,c),a.lineTo(d-k,c),a.arcTo(k,k,0,0,1,d,k+c),a.lineTo(d,e-k),a.arcTo(k,k,0,0,1,d-k,e),a.lineTo(k,e),a.arcTo(k,k,0,0,1,0,e-k)):(a.moveTo(0,c),a.lineTo(d,c),a.lineTo(d,e),a.lineTo(0,e));a.close();a.fillAndStroke();a.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(a.begin(),a.moveTo(d-30,c+20),a.lineTo(d-20,c+10),a.lineTo(d-10,c+20),a.close(),a.stroke())};mxCellRenderer.registerShape("folder",p);p.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,
+"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var c=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,b=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,d=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,"absoluteArcSize",!1),r=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(r*=Math.min(a.width,a.height));r=Math.min(r,.5*a.width,.5*(a.height-b));d||(r=0);return"left"==
+mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(r,0,Math.min(a.width,a.width-c),Math.min(a.height,a.height-b)):new mxRectangle(Math.min(a.width,a.width-c),0,r,Math.min(a.height,a.height-b))}return new mxRectangle(0,Math.min(a.height,b),0,0)}return null};mxUtils.extend(q,mxCylinder);q.prototype.arcSize=.1;q.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);var r=mxUtils.getValue(this.style,"rounded",!1),f=mxUtils.getValue(this.style,"absoluteArcSize",!1);b=
+parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));c=mxUtils.getValue(this.style,"umlStateConnection",null);f||(b*=Math.min(d,e));b=Math.min(b,.5*d,.5*e);r||(b=0);r=0;null!=c&&(r=10);a.begin();a.moveTo(r,b);a.arcTo(b,b,0,0,1,r+b,0);a.lineTo(d-b,0);a.arcTo(b,b,0,0,1,d,b);a.lineTo(d,e-b);a.arcTo(b,b,0,0,1,d-b,e);a.lineTo(r+b,e);a.arcTo(b,b,0,0,1,r,e-b);a.close();a.fillAndStroke();a.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(a.roundrect(d-40,e-20,
+10,10,3,3),a.stroke(),a.roundrect(d-20,e-20,10,10,3,3),a.stroke(),a.begin(),a.moveTo(d-30,e-15),a.lineTo(d-20,e-15),a.stroke());"connPointRefEntry"==c?(a.ellipse(0,.5*e-10,20,20),a.fillAndStroke()):"connPointRefExit"==c&&(a.ellipse(0,.5*e-10,20,20),a.fillAndStroke(),a.begin(),a.moveTo(5,.5*e-5),a.lineTo(15,.5*e+5),a.moveTo(15,.5*e-5),a.lineTo(5,.5*e+5),a.stroke())};q.prototype.getLabelMargins=function(a){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",q);mxUtils.extend(t,mxActor);t.prototype.size=30;t.prototype.isRoundable=function(){return!0};t.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,
+b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("card",t);mxUtils.extend(v,mxActor);v.prototype.size=.4;v.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,b/2);a.quadTo(d/4,1.4*b,d/2,b/2);a.quadTo(3*d/4,b*(1-1.4),d,b/2);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};v.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,
+"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"size",this.size),c=a.width,d=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return b*=d,new mxRectangle(a.x,a.y+b,c,d-2*b);b*=c;return new mxRectangle(a.x+b,a.y,c-2*b,d)}return a};mxCellRenderer.registerShape("tape",v);mxUtils.extend(u,mxActor);u.prototype.size=.3;u.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,
+0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};u.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(d,0);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};mxCellRenderer.registerShape("document",u);var Xa=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,b,c,d){var e=
+mxUtils.getValue(this.style,"size");return null!=e?d*Math.max(0,Math.min(1,e)):Xa.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*b),0,0)}return null};m.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,
+"lid",!0)||(b/=2);return new mxRectangle(0,Math.min(a.height*this.scale,2*b*this.scale),0,Math.max(0,.3*b*this.scale))}return null};p.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var c=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,b=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,d=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,
+"absoluteArcSize",!1),r=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(r*=Math.min(a.width,a.height));r=Math.min(r,.5*a.width,.5*(a.height-b));d||(r=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(r,0,Math.min(a.width,a.width-c),Math.min(a.height,a.height-b)):new mxRectangle(Math.min(a.width,a.width-c),0,r,Math.min(a.height,a.height-b))}return new mxRectangle(0,Math.min(a.height,b),0,0)}return null};q.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,
+"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};h.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(a.height*this.scale,b*this.scale),0,Math.max(0,b*this.scale))}return null};mxUtils.extend(w,mxActor);w.prototype.size=.2;w.prototype.fixedSize=20;w.prototype.isRoundable=function(){return!0};w.prototype.redrawPath=
+function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d-b,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("parallelogram",w);mxUtils.extend(x,
+mxActor);x.prototype.size=.2;x.prototype.fixedSize=20;x.prototype.isRoundable=function(){return!0};x.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*d,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):d*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,
+0),new mxPoint(d-b,0),new mxPoint(d,e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("trapezoid",x);mxUtils.extend(A,mxActor);A.prototype.size=.5;A.prototype.redrawPath=function(a,b,c,d,e){a.setFillColor(null);b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(b,0),new mxPoint(b,e/2),new mxPoint(0,e/2),new mxPoint(b,e/2),new mxPoint(b,
+e),new mxPoint(d,e)],this.isRounded,c,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",A);mxUtils.extend(E,mxActor);E.prototype.redrawPath=function(a,b,c,d,e){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=d/5;a.rect(0,0,b,e);a.fillAndStroke();a.rect(2*b,0,b,e);a.fillAndStroke();a.rect(4*b,0,b,e);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",E);H.prototype.moveTo=function(a,b){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;this.firstX=a;this.firstY=
+b};H.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)};H.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=d};H.prototype.curveTo=function(a,b,c,d,e,f){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=f};H.prototype.arcTo=function(a,b,c,d,e,f,g){this.originalArcTo.apply(this.canvas,
+arguments);this.lastX=f;this.lastY=g};H.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),e=Math.abs(b-this.lastY),r=Math.sqrt(d*d+e*e);if(2>r){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var f=Math.round(r/10),g=this.defaultVariation;5>f&&(f=5,g/=3);for(var k=c(a-this.lastX)*d/f,c=c(b-this.lastY)*e/f,d=d/r,e=e/r,r=0;r<f;r++){var h=(Math.random()-
+.5)*g;this.originalLineTo.call(this.canvas,k*r+this.lastX-h*e,c*r+this.lastY-h*d)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};H.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 Ya=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(a){Ya.apply(this,arguments);null==a.handJiggle&&(a.handJiggle=this.createHandJiggle(a))};var Za=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(a){Za.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxShape.prototype.createComicCanvas=function(a){return new H(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(a){return this.outline||
+null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(a)};mxRhombus.prototype.defaultJiggle=2;var $a=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"))&&$a.apply(this,arguments)};var ab=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=
+function(a,b,c,d,e){if(null==a.handJiggle||a.handJiggle.constructor!=H)ab.apply(this,arguments);else{var r=!0;null!=this.style&&(r="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(r||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)r||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?r=Math.min(d/2,Math.min(e/2,mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(r=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,r=Math.min(d*r,e*r)),a.moveTo(b+r,c),a.lineTo(b+d-r,c),a.quadTo(b+d,c,b+d,c+r),a.lineTo(b+d,c+e-r),a.quadTo(b+d,c+e,b+d-r,c+e),a.lineTo(b+r,c+e),a.quadTo(b,c+e,b,c+e-r),a.lineTo(b,c+r),a.quadTo(b,c,b+r,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,c)),a.close(),a.end(),a.fillAndStroke()}};mxUtils.extend(B,
+mxRectangleShape);B.prototype.size=.1;B.prototype.fixedSize=!1;B.prototype.isHtmlAllowed=function(){return!1};B.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var b=a.width,c=a.height;a=new mxRectangle(a.x,a.y,b,c);var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=
+mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(b*e,c*e));a.x+=Math.round(d);a.width-=Math.round(2*d)}return a};B.prototype.paintForeground=function(a,b,c,d,e){var r=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),f=r?Math.max(0,Math.min(d,f)):d*Math.max(0,Math.min(1,f));this.isRounded&&(r=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/
+100,f=Math.max(f,Math.min(d*r,e*r)));f=Math.round(f);a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.moveTo(b+d-f,c);a.lineTo(b+d-f,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",B);mxCellRenderer.registerShape("process2",B);mxUtils.extend(G,mxRectangleShape);G.prototype.paintBackground=function(a,b,c,d,e){a.setFillColor(mxConstants.NONE);a.rect(b,c,d,e);a.fill()};G.prototype.paintForeground=function(a,b,c,d,e){};mxCellRenderer.registerShape("transparent",
+G);mxUtils.extend(y,mxHexagon);y.prototype.size=30;y.prototype.position=.5;y.prototype.position2=.5;y.prototype.base=20;y.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};y.prototype.isRoundable=function(){return!0};y.prototype.redrawPath=function(a,b,c,d,e){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",
+this.size))));var r=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),g=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-c),new mxPoint(Math.min(d,r+g),e-c),new mxPoint(f,e),new mxPoint(Math.max(0,r),e-c),new mxPoint(0,e-c)],this.isRounded,b,!0,[4])};mxCellRenderer.registerShape("callout",
+y);mxUtils.extend(I,mxActor);I.prototype.size=.2;I.prototype.fixedSize=20;I.prototype.isRoundable=function(){return!0};I.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,
+0),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("step",I);mxUtils.extend(K,mxHexagon);K.prototype.size=.25;K.prototype.fixedSize=20;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*d,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.5*e),new mxPoint(d-b,e),new mxPoint(b,e),new mxPoint(0,.5*e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("hexagon",K);mxUtils.extend(M,mxRectangleShape);M.prototype.isHtmlAllowed=function(){return!1};M.prototype.paintForeground=function(a,b,c,d,e){var f=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+f);a.lineTo(b+d/2,
+c+e-f);a.moveTo(b+f,c+e/2);a.lineTo(b+d-f,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",M);var Ua=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=
+function(a,b,c,d,e){Ua.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&(a.setShadow(!1),Ua.apply(this,[a,b,c,d,e]))}};mxUtils.extend(O,mxRectangleShape);O.prototype.isHtmlAllowed=function(){return!1};O.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;
+return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};O.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,r;do{r=mxCellRenderer.defaultShapes[this.style["symbol"+f]];if(null!=r){var g=this.style["symbol"+f+"Align"],
+k=this.style["symbol"+f+"VerticalAlign"],h=this.style["symbol"+f+"Width"],D=this.style["symbol"+f+"Height"],z=this.style["symbol"+f+"Spacing"]||0,l=this.style["symbol"+f+"VSpacing"]||z,C=this.style["symbol"+f+"ArcSpacing"];null!=C&&(C*=this.getArcSize(d+this.strokewidth,e+this.strokewidth),z+=C,l+=C);var C=b,F=c,C=g==mxConstants.ALIGN_CENTER?C+(d-h)/2:g==mxConstants.ALIGN_RIGHT?C+(d-h-z):C+z,F=k==mxConstants.ALIGN_MIDDLE?F+(e-D)/2:k==mxConstants.ALIGN_BOTTOM?F+(e-D-l):F+l;a.save();g=new r;g.style=
+this.style;r.prototype.paintVertexShape.call(g,a,C,F,h,D);a.restore()}f++}while(null!=r)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",O);mxUtils.extend(J,mxCylinder);J.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.registerShape("message",J);mxUtils.extend(U,mxShape);U.prototype.paintBackground=function(a,
+b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",U);mxUtils.extend(ba,mxShape);ba.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};ba.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();
+a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",ba);mxUtils.extend(ca,mxEllipse);ca.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",ca);mxUtils.extend(R,mxShape);R.prototype.paintVertexShape=
+function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",R);mxUtils.extend(Q,mxShape);Q.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};Q.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,e/8,d,7*e/8);a.fillAndStroke()};Q.prototype.paintForeground=
+function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,e/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",Q);mxUtils.extend(P,mxRectangleShape);P.prototype.size=40;P.prototype.isHtmlAllowed=function(){return!1};P.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,b)};P.prototype.paintBackground=function(a,b,c,d,e){var f=Math.max(0,Math.min(e,
+parseFloat(mxUtils.getValue(this.style,"size",this.size)))),r=mxUtils.getValue(this.style,"participant");null==r||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,b,c,d,f):(r=this.state.view.graph.cellRenderer.getShape(r),null!=r&&r!=P&&(r=new r,r.apply(this.state),a.save(),r.paintVertexShape(a,b,c,d,f),a.restore()));f<e&&(a.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),a.begin(),a.moveTo(b+d/2,c+f),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};P.prototype.paintForeground=
+function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,b,c,d,Math.min(e,f))};mxCellRenderer.registerShape("umlLifeline",P);mxUtils.extend(T,mxShape);T.prototype.width=60;T.prototype.height=30;T.prototype.corner=10;T.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,
+"height",this.height)*this.scale))};T.prototype.paintBackground=function(a,b,c,d,e){var f=this.corner,r=Math.min(d,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),g=Math.min(e,Math.max(1.5*f,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),k=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);k!=mxConstants.NONE&&(a.setFillColor(k),a.rect(b,c,d,e),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=
+mxConstants.NONE?(this.getGradientBounds(a,b,c,d,e),a.setGradient(this.fill,this.gradient,b,c,d,e,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(b,c);a.lineTo(b+r,c);a.lineTo(b+r,c+Math.max(0,g-1.5*f));a.lineTo(b+Math.max(0,r-f),c+g);a.lineTo(b,c+g);a.close();a.fillAndStroke();a.begin();a.moveTo(b+r,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,c+e);a.lineTo(b,c+g);a.stroke()};mxCellRenderer.registerShape("umlFrame",T);mxPerimeter.CenterPerimeter=function(a,b,c,d){return new mxPoint(a.getCenterX(),
+a.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(a,b,c,d){d=P.prototype.size;null!=b&&(d=mxUtils.getValue(b.style,"size",d)*b.view.scale);b=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;c.x<a.getCenterX()&&(b=-1*(b+1));return new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y+d,c.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=
+function(a,b,c,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,b,c,d){d=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;null!=b.style.backboneSize&&(d+=parseFloat(b.style.backboneSize)*b.view.scale/2-1);if("south"==b.style[mxConstants.STYLE_DIRECTION]||"north"==b.style[mxConstants.STYLE_DIRECTION])return c.x<a.getCenterX()&&(d=-1*(d+1)),
+new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,c.y)));c.y<a.getCenterY()&&(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,c.x)),a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,b,c,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(b.style,"size",y.prototype.size))*b.view.scale))),b.style),
+b,c,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=e?w.prototype.fixedSize:w.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));e&&(f*=b.view.scale);var r=a.x,g=a.y,k=a.width,h=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?
+(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(r,g),new mxPoint(r+k,g+e),new mxPoint(r+k,g+h),new mxPoint(r,g+h-e),new mxPoint(r,g)]):(e=e?Math.max(0,Math.min(.5*k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(r+e,g),new mxPoint(r+k,g),new mxPoint(r+k-e,g+h),new mxPoint(r,g+h),new mxPoint(r+e,g)]);h=a.getCenterX();a=a.getCenterY();a=new mxPoint(h,a);d&&(c.x<r||c.x>r+k?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("parallelogramPerimeter",
+mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=e?x.prototype.fixedSize:x.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));e&&(f*=b.view.scale);var r=a.x,g=a.y,k=a.width,h=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(.5*k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(r+
+e,g),new mxPoint(r+k-e,g),new mxPoint(r+k,g+h),new mxPoint(r,g+h),new mxPoint(r+e,g)]):b==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(r,g),new mxPoint(r+k,g),new mxPoint(r+k-e,g+h),new mxPoint(r+e,g+h),new mxPoint(r,g)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(r,g+e),new mxPoint(r+k,g),new mxPoint(r+k,g+h),new mxPoint(r,g+h-e),new mxPoint(r,g+e)]):(e=e?Math.max(0,Math.min(h,f)):
+h*Math.max(0,Math.min(1,f)),g=[new mxPoint(r,g),new mxPoint(r+k,g+e),new mxPoint(r+k,g+h-e),new mxPoint(r,g+h),new mxPoint(r,g)]);h=a.getCenterX();a=a.getCenterY();a=new mxPoint(h,a);d&&(c.x<r||c.x>r+k?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=e?I.prototype.fixedSize:I.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,
+"size",f));e&&(f*=b.view.scale);var r=a.x,g=a.y,k=a.width,h=a.height,z=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(r,g),new mxPoint(r+k-e,g),new mxPoint(r+k,a),new mxPoint(r+k-e,g+h),new mxPoint(r,g+h),new mxPoint(r+e,a),new mxPoint(r,g)]):b==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,
+f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(r+e,g),new mxPoint(r+k,g),new mxPoint(r+k-e,a),new mxPoint(r+k,g+h),new mxPoint(r+e,g+h),new mxPoint(r,a),new mxPoint(r+e,g)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(r,g+e),new mxPoint(z,g),new mxPoint(r+k,g+e),new mxPoint(r+k,g+h),new mxPoint(z,g+h-e),new mxPoint(r,g+h),new mxPoint(r,g+e)]):(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(r,g),new mxPoint(z,g+
+e),new mxPoint(r+k,g),new mxPoint(r+k,g+h-e),new mxPoint(z,g+h),new mxPoint(r,g+h-e),new mxPoint(r,g)]);z=new mxPoint(z,a);d&&(c.x<r||c.x>r+k?z.y=c.y:z.x=c.x);return mxUtils.getPerimeterPoint(g,z,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=e?K.prototype.fixedSize:K.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));e&&(f*=b.view.scale);var r=a.x,g=a.y,k=a.width,
+h=a.height,z=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(z,g),new mxPoint(r+k,g+e),new mxPoint(r+k,g+h-e),new mxPoint(z,g+h),new mxPoint(r,g+h-e),new mxPoint(r,g+e),new mxPoint(z,g)]):(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(r+
+e,g),new mxPoint(r+k-e,g),new mxPoint(r+k,a),new mxPoint(r+k-e,g+h),new mxPoint(r+e,g+h),new mxPoint(r,a),new mxPoint(r+e,g)]);z=new mxPoint(z,a);d&&(c.x<r||c.x>r+k?z.y=c.y:z.x=c.x);return mxUtils.getPerimeterPoint(g,z,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ea,mxShape);ea.prototype.size=10;ea.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-f)/2,0,f,f);
+a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",ea);mxUtils.extend(ka,mxShape);ka.prototype.size=10;ka.prototype.inset=2;ka.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),r=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+r);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-r,f/2);a.quadTo((d-
+f)/2-r,f+r,d/2,f+r);a.quadTo((d+f)/2+r,f+r,(d+f)/2+r,f/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",ka);mxUtils.extend(na,mxShape);na.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",na);mxUtils.extend(oa,mxShape);oa.prototype.inset=2;oa.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+
+this.strokewidth;a.translate(b,c);a.ellipse(0,f,d-2*f,e-2*f);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",oa);mxUtils.extend(fa,mxCylinder);fa.prototype.jettyWidth=20;fa.prototype.jettyHeight=10;fa.prototype.redrawPath=function(a,b,c,d,e,f){var r=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));
+c=r/2;var r=c+r/2,g=Math.min(b,e-b),k=Math.min(g+2*b,e-b);f?(a.moveTo(c,g),a.lineTo(r,g),a.lineTo(r,g+b),a.lineTo(c,g+b),a.moveTo(c,k),a.lineTo(r,k),a.lineTo(r,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,g+b),a.lineTo(0,g+b),a.lineTo(0,g),a.lineTo(c,g),a.close());a.end()};mxCellRenderer.registerShape("module",fa);mxUtils.extend(pa,mxCylinder);pa.prototype.jettyWidth=32;pa.prototype.jettyHeight=
+12;pa.prototype.redrawPath=function(a,b,c,d,e,f){var r=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=r/2;var r=c+r/2,g=.3*e-b/2,k=.7*e-b/2;f?(a.moveTo(c,g),a.lineTo(r,g),a.lineTo(r,g+b),a.lineTo(c,g+b),a.moveTo(c,k),a.lineTo(r,k),a.lineTo(r,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,g+b),a.lineTo(0,
+g+b),a.lineTo(0,g),a.lineTo(c,g),a.close());a.end()};mxCellRenderer.registerShape("component",pa);mxUtils.extend(ta,mxRectangleShape);ta.prototype.paintForeground=function(a,b,c,d,e){var f=d/2,r=e/2,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,[new mxPoint(b+f,c),new mxPoint(b+d,c+r),new mxPoint(b+f,c+e),new mxPoint(b,c+r)],this.isRounded,g,!0);a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",
+ta);mxUtils.extend(qa,mxDoubleEllipse);qa.prototype.outerStroke=!0;qa.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+f,c+f,d-2*f,e-2*f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.registerShape("endState",qa);mxUtils.extend(ua,qa);ua.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ua);mxUtils.extend(la,mxArrowConnector);la.prototype.defaultWidth=4;la.prototype.isOpenEnded=
+function(){return!0};la.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};la.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",la);mxUtils.extend(ha,mxArrowConnector);ha.prototype.defaultWidth=10;ha.prototype.defaultArrowWidth=20;ha.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};ha.prototype.getEndArrowWidth=
+function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};ha.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",ha);mxUtils.extend(ia,mxActor);ia.prototype.size=30;ia.prototype.isRoundable=function(){return!0};ia.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));c=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("manualInput",ia);mxUtils.extend(da,mxRectangleShape);da.prototype.dx=20;da.prototype.dy=20;da.prototype.isHtmlAllowed=function(){return!1};da.prototype.paintForeground=function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var g=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));g=Math.max(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+f);a.lineTo(b+d,c+f);a.end();a.stroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+g,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",da);mxUtils.extend(ga,mxActor);ga.prototype.dx=20;ga.prototype.dy=
+20;ga.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint(b,c),new mxPoint(b,e),new mxPoint(0,e)],this.isRounded,f,!0);a.end()};
+mxCellRenderer.registerShape("corner",ga);mxUtils.extend(ma,mxActor);ma.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(0,e);a.end();a.moveTo(d,0);a.lineTo(d,e);a.end();a.moveTo(0,e/2);a.lineTo(d,e/2);a.end()};mxCellRenderer.registerShape("crossbar",ma);mxUtils.extend(ja,mxActor);ja.prototype.dx=20;ja.prototype.dy=20;ja.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,
+"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint((d+b)/2,c),new mxPoint((d+b)/2,e),new mxPoint((d-b)/2,e),new mxPoint((d-b)/2,c),new mxPoint(0,c)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("tee",ja);mxUtils.extend(X,mxActor);X.prototype.arrowWidth=.3;X.prototype.arrowSize=.2;X.prototype.redrawPath=
+function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(0,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",
+X);mxUtils.extend(ra,mxActor);ra.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",X.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",X.prototype.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,
+e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(b,f),new mxPoint(b,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",ra);mxUtils.extend(Y,mxActor);Y.prototype.size=.1;Y.prototype.fixedSize=20;Y.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(b,
+0);a.lineTo(d,0);a.quadTo(d-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",Y);mxUtils.extend(L,mxActor);L.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.registerShape("or",L);mxUtils.extend(Z,mxActor);Z.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",
+Z);mxUtils.extend(V,mxActor);V.prototype.size=20;V.prototype.isRoundable=function(){return!0};V.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("loopLimit",
+V);mxUtils.extend(W,mxActor);W.prototype.size=.375;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",W);mxUtils.extend(aa,
+mxEllipse);aa.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",aa);mxUtils.extend(Ea,mxEllipse);Ea.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);
+a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",Ea);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+.855*e);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",Ba);mxUtils.extend(Ma,mxRhombus);Ma.prototype.paintVertexShape=function(a,
+b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",Ma);mxUtils.extend(Na,mxEllipse);Na.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke();a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",Na);
+mxUtils.extend(Oa,mxEllipse);Oa.prototype.paintVertexShape=function(a,b,c,d,e){var f=c+e-5;a.begin();a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,f);a.lineTo(b+10,f-5);a.moveTo(b,f);a.lineTo(b+10,f+5);a.moveTo(b,f);a.lineTo(b+d,f);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,f);a.lineTo(b+d-10,f-5);a.moveTo(b+d,f);a.lineTo(b+d-10,f+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",Oa);mxUtils.extend(Fa,mxEllipse);Fa.prototype.paintVertexShape=function(a,b,c,d,e){this.outline||a.setStrokeColor(null);
+if(null!=this.style){var f=a.pointerEvents;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1);a.rect(b,c,d,e);a.fill();a.pointerEvents=f;a.setStrokeColor(this.stroke);a.begin();a.moveTo(b,c);this.outline||"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(b+d,c):a.moveTo(b+d,c);this.outline||"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(b+d,c+e):a.moveTo(b+d,c+e);this.outline||"1"==mxUtils.getValue(this.style,
+"bottom","1")?a.lineTo(b,c+e):a.moveTo(b,c+e);(this.outline||"1"==mxUtils.getValue(this.style,"left","1"))&&a.lineTo(b,c);a.end();a.stroke()}};mxCellRenderer.registerShape("partialRectangle",Fa);mxUtils.extend(Ga,mxEllipse);Ga.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(b+d/2,c),a.lineTo(b+d/2,c+e)):(a.moveTo(b,c+e/2),a.lineTo(b+d,c+e/2));a.end();a.stroke()};
+mxCellRenderer.registerShape("lineEllipse",Ga);mxUtils.extend(Ha,mxActor);Ha.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.registerShape("delay",Ha);mxUtils.extend(ya,mxActor);ya.prototype.size=.2;ya.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var f=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=(e-f)/2;c=b+f;var g=(d-
+f)/2,f=g+f;a.moveTo(0,b);a.lineTo(g,b);a.lineTo(g,0);a.lineTo(f,0);a.lineTo(f,b);a.lineTo(d,b);a.lineTo(d,c);a.lineTo(f,c);a.lineTo(f,e);a.lineTo(g,e);a.lineTo(g,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.registerShape("cross",ya);mxUtils.extend(za,mxActor);za.prototype.size=.25;za.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/
+2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.registerShape("display",za);mxUtils.extend(N,mxActor);N.prototype.cst={RECT2:"mxgraph.basic.rect"};N.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"}]}];N.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);this.strictDrawShape(a,0,0,d,e)};N.prototype.strictDrawShape=function(a,b,c,d,e,f){var g=f&&f.rectStyle?f.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),k=f&&f.absoluteCornerSize?f.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),h=f&&f.size?f.size:Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),r=f&&f.rectOutline?f.rectOutline:
+mxUtils.getValue(this.style,"rectOutline",this.rectOutline),l=f&&f.indent?f.indent:Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),m=f&&f.dashed?f.dashed:mxUtils.getValue(this.style,"dashed",!1),n=f&&f.dashPattern?f.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),p=f&&f.relIndent?f.relIndent:Math.max(0,Math.min(50,l)),z=f&&f.top?f.top:mxUtils.getValue(this.style,"top",!0),D=f&&f.right?f.right:mxUtils.getValue(this.style,"right",!0),C=f&&f.bottom?f.bottom:
+mxUtils.getValue(this.style,"bottom",!0),q=f&&f.left?f.left:mxUtils.getValue(this.style,"left",!0),t=f&&f.topLeftStyle?f.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),F=f&&f.topRightStyle?f.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),u=f&&f.bottomRightStyle?f.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),v=f&&f.bottomLeftStyle?f.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Aa=f&&f.fillColor?f.fillColor:
+mxUtils.getValue(this.style,"fillColor","#ffffff");f&&f.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var y=f&&f.strokeWidth?f.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),w=f&&f.fillColor2?f.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),x=f&&f.gradientColor2?f.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),A=f&&f.gradientDirection2?f.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),B=f&&f.opacity?f.opacity:
+mxUtils.getValue(this.style,"opacity","100"),G=Math.max(0,Math.min(50,h));f=N.prototype;a.setDashed(m);n&&""!=n&&a.setDashPattern(n);a.setStrokeWidth(y);h=Math.min(.5*e,.5*d,h);k||(h=G*Math.min(d,e)/100);h=Math.min(h,.5*Math.min(d,e));k||(l=Math.min(p*Math.min(d,e)/100));l=Math.min(l,.5*Math.min(d,e)-h);(z||D||C||q)&&"frame"!=r&&(a.begin(),z?f.moveNW(a,b,c,d,e,g,t,h,q):a.moveTo(0,0),z&&f.paintNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,F,h,D),D&&f.paintNE(a,b,c,d,e,g,F,h,z),f.paintRight(a,b,c,d,
+e,g,u,h,C),C&&f.paintSE(a,b,c,d,e,g,u,h,D),f.paintBottom(a,b,c,d,e,g,v,h,q),q&&f.paintSW(a,b,c,d,e,g,v,h,C),f.paintLeft(a,b,c,d,e,g,t,h,z),a.close(),a.fill(),a.setShadow(!1),a.setFillColor(w),m=k=B,"none"==w&&(k=0),"none"==x&&(m=0),a.setGradient(w,x,0,0,d,e,A,k,m),a.begin(),z?f.moveNWInner(a,b,c,d,e,g,t,h,l,z,q):a.moveTo(l,0),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,q),q&&C&&f.paintSWInner(a,b,c,d,e,g,v,h,l,C),f.paintBottomInner(a,b,c,d,e,g,u,h,l,D,C),C&&D&&f.paintSEInner(a,b,c,d,e,g,u,h,l),f.paintRightInner(a,
+b,c,d,e,g,F,h,l,z,D),D&&z&&f.paintNEInner(a,b,c,d,e,g,F,h,l),f.paintTopInner(a,b,c,d,e,g,t,h,l,q,z),z&&q&&f.paintNWInner(a,b,c,d,e,g,t,h,l),a.fill(),"none"==Aa&&(a.begin(),f.paintFolds(a,b,c,d,e,g,t,F,u,v,h,z,D,C,q),a.stroke()));z||D||C||!q?z||D||!C||q?!z&&!D&&C&&q?"frame"!=r?(a.begin(),f.moveSE(a,b,c,d,e,g,u,h,D),f.paintBottom(a,b,c,d,e,g,v,h,q),f.paintSW(a,b,c,d,e,g,v,h,C),f.paintLeft(a,b,c,d,e,g,t,h,z),"double"==r&&(f.moveNWInner(a,b,c,d,e,g,t,h,l,z,q),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,q),f.paintSWInner(a,
+b,c,d,e,g,v,h,l,C),f.paintBottomInner(a,b,c,d,e,g,u,h,l,D,C)),a.stroke()):(a.begin(),f.moveSE(a,b,c,d,e,g,u,h,D),f.paintBottom(a,b,c,d,e,g,v,h,q),f.paintSW(a,b,c,d,e,g,v,h,C),f.paintLeft(a,b,c,d,e,g,t,h,z),f.lineNWInner(a,b,c,d,e,g,t,h,l,z,q),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,q),f.paintSWInner(a,b,c,d,e,g,v,h,l,C),f.paintBottomInner(a,b,c,d,e,g,u,h,l,D,C),a.close(),a.fillAndStroke()):z||!D||C||q?!z&&D&&!C&&q?"frame"!=r?(a.begin(),f.moveSW(a,b,c,d,e,g,t,h,C),f.paintLeft(a,b,c,d,e,g,t,h,z),"double"==
+r&&(f.moveNWInner(a,b,c,d,e,g,t,h,l,z,q),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,q)),a.stroke(),a.begin(),f.moveNE(a,b,c,d,e,g,F,h,z),f.paintRight(a,b,c,d,e,g,u,h,C),"double"==r&&(f.moveSEInner(a,b,c,d,e,g,u,h,l,C),f.paintRightInner(a,b,c,d,e,g,F,h,l,z,D)),a.stroke()):(a.begin(),f.moveSW(a,b,c,d,e,g,t,h,C),f.paintLeft(a,b,c,d,e,g,t,h,z),f.lineNWInner(a,b,c,d,e,g,t,h,l,z,q),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,q),a.close(),a.fillAndStroke(),a.begin(),f.moveNE(a,b,c,d,e,g,F,h,z),f.paintRight(a,b,c,d,e,
+g,u,h,C),f.lineSEInner(a,b,c,d,e,g,u,h,l,C),f.paintRightInner(a,b,c,d,e,g,F,h,l,z,D),a.close(),a.fillAndStroke()):!z&&D&&C&&!q?"frame"!=r?(a.begin(),f.moveNE(a,b,c,d,e,g,F,h,z),f.paintRight(a,b,c,d,e,g,u,h,C),f.paintSE(a,b,c,d,e,g,u,h,D),f.paintBottom(a,b,c,d,e,g,v,h,q),"double"==r&&(f.moveSWInner(a,b,c,d,e,g,v,h,l,q),f.paintBottomInner(a,b,c,d,e,g,u,h,l,D,C),f.paintSEInner(a,b,c,d,e,g,u,h,l),f.paintRightInner(a,b,c,d,e,g,F,h,l,z,D)),a.stroke()):(a.begin(),f.moveNE(a,b,c,d,e,g,F,h,z),f.paintRight(a,
+b,c,d,e,g,u,h,C),f.paintSE(a,b,c,d,e,g,u,h,D),f.paintBottom(a,b,c,d,e,g,v,h,q),f.lineSWInner(a,b,c,d,e,g,v,h,l,q),f.paintBottomInner(a,b,c,d,e,g,u,h,l,D,C),f.paintSEInner(a,b,c,d,e,g,u,h,l),f.paintRightInner(a,b,c,d,e,g,F,h,l,z,D),a.close(),a.fillAndStroke()):!z&&D&&C&&q?"frame"!=r?(a.begin(),f.moveNE(a,b,c,d,e,g,F,h,z),f.paintRight(a,b,c,d,e,g,u,h,C),f.paintSE(a,b,c,d,e,g,u,h,D),f.paintBottom(a,b,c,d,e,g,v,h,q),f.paintSW(a,b,c,d,e,g,v,h,C),f.paintLeft(a,b,c,d,e,g,t,h,z),"double"==r&&(f.moveNWInner(a,
+b,c,d,e,g,t,h,l,z,q),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,q),f.paintSWInner(a,b,c,d,e,g,v,h,l,C),f.paintBottomInner(a,b,c,d,e,g,u,h,l,D,C),f.paintSEInner(a,b,c,d,e,g,u,h,l),f.paintRightInner(a,b,c,d,e,g,F,h,l,z,D)),a.stroke()):(a.begin(),f.moveNE(a,b,c,d,e,g,F,h,z),f.paintRight(a,b,c,d,e,g,u,h,C),f.paintSE(a,b,c,d,e,g,u,h,D),f.paintBottom(a,b,c,d,e,g,v,h,q),f.paintSW(a,b,c,d,e,g,v,h,C),f.paintLeft(a,b,c,d,e,g,t,h,z),f.lineNWInner(a,b,c,d,e,g,t,h,l,z,q),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,q),f.paintSWInner(a,
+b,c,d,e,g,v,h,l,C),f.paintBottomInner(a,b,c,d,e,g,u,h,l,D,C),f.paintSEInner(a,b,c,d,e,g,u,h,l),f.paintRightInner(a,b,c,d,e,g,F,h,l,z,D),a.close(),a.fillAndStroke()):!z||D||C||q?z&&!D&&!C&&q?"frame"!=r?(a.begin(),f.moveSW(a,b,c,d,e,g,v,h,C),f.paintLeft(a,b,c,d,e,g,t,h,z),f.paintNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,F,h,D),"double"==r&&(f.moveNEInner(a,b,c,d,e,g,F,h,l,D),f.paintTopInner(a,b,c,d,e,g,t,h,l,q,z),f.paintNWInner(a,b,c,d,e,g,t,h,l),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,q)),a.stroke()):
+(a.begin(),f.moveSW(a,b,c,d,e,g,v,h,C),f.paintLeft(a,b,c,d,e,g,t,h,z),f.paintNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,F,h,D),f.lineNEInner(a,b,c,d,e,g,F,h,l,D),f.paintTopInner(a,b,c,d,e,g,t,h,l,q,z),f.paintNWInner(a,b,c,d,e,g,t,h,l),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,q),a.close(),a.fillAndStroke()):z&&!D&&C&&!q?"frame"!=r?(a.begin(),f.moveNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,F,h,D),"double"==r&&(f.moveNEInner(a,b,c,d,e,g,F,h,l,D),f.paintTopInner(a,b,c,d,e,g,t,h,l,q,z)),a.stroke(),a.begin(),
+f.moveSE(a,b,c,d,e,g,u,h,D),f.paintBottom(a,b,c,d,e,g,v,h,q),"double"==r&&(f.moveSWInner(a,b,c,d,e,g,v,h,l,q),f.paintBottomInner(a,b,c,d,e,g,u,h,l,D,C)),a.stroke()):(a.begin(),f.moveNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,F,h,D),f.lineNEInner(a,b,c,d,e,g,F,h,l,D),f.paintTopInner(a,b,c,d,e,g,t,h,l,q,z),a.close(),a.fillAndStroke(),a.begin(),f.moveSE(a,b,c,d,e,g,u,h,D),f.paintBottom(a,b,c,d,e,g,v,h,q),f.lineSWInner(a,b,c,d,e,g,v,h,l,q),f.paintBottomInner(a,b,c,d,e,g,u,h,l,D,C),a.close(),a.fillAndStroke()):
+z&&!D&&C&&q?"frame"!=r?(a.begin(),f.moveSE(a,b,c,d,e,g,u,h,D),f.paintBottom(a,b,c,d,e,g,v,h,q),f.paintSW(a,b,c,d,e,g,v,h,C),f.paintLeft(a,b,c,d,e,g,t,h,z),f.paintNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,F,h,D),"double"==r&&(f.moveNEInner(a,b,c,d,e,g,F,h,l,D),f.paintTopInner(a,b,c,d,e,g,t,h,l,q,z),f.paintNWInner(a,b,c,d,e,g,t,h,l),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,q),f.paintSWInner(a,b,c,d,e,g,v,h,l,C),f.paintBottomInner(a,b,c,d,e,g,u,h,l,D,C)),a.stroke()):(a.begin(),f.moveSE(a,b,c,d,e,g,u,
+h,D),f.paintBottom(a,b,c,d,e,g,v,h,q),f.paintSW(a,b,c,d,e,g,v,h,C),f.paintLeft(a,b,c,d,e,g,t,h,z),f.paintNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,F,h,D),f.lineNEInner(a,b,c,d,e,g,F,h,l,D),f.paintTopInner(a,b,c,d,e,g,t,h,l,q,z),f.paintNWInner(a,b,c,d,e,g,t,h,l),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,q),f.paintSWInner(a,b,c,d,e,g,v,h,l,C),f.paintBottomInner(a,b,c,d,e,g,u,h,l,D,C),a.close(),a.fillAndStroke()):z&&D&&!C&&!q?"frame"!=r?(a.begin(),f.moveNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,F,h,
+D),f.paintNE(a,b,c,d,e,g,F,h,z),f.paintRight(a,b,c,d,e,g,u,h,C),"double"==r&&(f.moveSEInner(a,b,c,d,e,g,u,h,l,C),f.paintRightInner(a,b,c,d,e,g,F,h,l,z,D),f.paintNEInner(a,b,c,d,e,g,F,h,l),f.paintTopInner(a,b,c,d,e,g,t,h,l,q,z)),a.stroke()):(a.begin(),f.moveNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,F,h,D),f.paintNE(a,b,c,d,e,g,F,h,z),f.paintRight(a,b,c,d,e,g,u,h,C),f.lineSEInner(a,b,c,d,e,g,u,h,l,C),f.paintRightInner(a,b,c,d,e,g,F,h,l,z,D),f.paintNEInner(a,b,c,d,e,g,F,h,l),f.paintTopInner(a,b,c,
+d,e,g,t,h,l,q,z),a.close(),a.fillAndStroke()):z&&D&&!C&&q?"frame"!=r?(a.begin(),f.moveSW(a,b,c,d,e,g,v,h,C),f.paintLeft(a,b,c,d,e,g,t,h,z),f.paintNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,F,h,D),f.paintNE(a,b,c,d,e,g,F,h,z),f.paintRight(a,b,c,d,e,g,u,h,C),"double"==r&&(f.moveSEInner(a,b,c,d,e,g,u,h,l,C),f.paintRightInner(a,b,c,d,e,g,F,h,l,z,D),f.paintNEInner(a,b,c,d,e,g,F,h,l),f.paintTopInner(a,b,c,d,e,g,t,h,l,q,z),f.paintNWInner(a,b,c,d,e,g,t,h,l),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,q)),a.stroke()):
+(a.begin(),f.moveSW(a,b,c,d,e,g,v,h,C),f.paintLeft(a,b,c,d,e,g,t,h,z),f.paintNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,F,h,D),f.paintNE(a,b,c,d,e,g,F,h,z),f.paintRight(a,b,c,d,e,g,u,h,C),f.lineSEInner(a,b,c,d,e,g,u,h,l,C),f.paintRightInner(a,b,c,d,e,g,F,h,l,z,D),f.paintNEInner(a,b,c,d,e,g,F,h,l),f.paintTopInner(a,b,c,d,e,g,t,h,l,q,z),f.paintNWInner(a,b,c,d,e,g,t,h,l),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,q),a.close(),a.fillAndStroke()):z&&D&&C&&!q?"frame"!=r?(a.begin(),f.moveNW(a,b,c,d,e,g,t,h,
+q),f.paintTop(a,b,c,d,e,g,F,h,D),f.paintNE(a,b,c,d,e,g,F,h,z),f.paintRight(a,b,c,d,e,g,u,h,C),f.paintSE(a,b,c,d,e,g,u,h,D),f.paintBottom(a,b,c,d,e,g,v,h,q),"double"==r&&(f.moveSWInner(a,b,c,d,e,g,v,h,l,q),f.paintBottomInner(a,b,c,d,e,g,u,h,l,D,C),f.paintSEInner(a,b,c,d,e,g,u,h,l),f.paintRightInner(a,b,c,d,e,g,F,h,l,z,D),f.paintNEInner(a,b,c,d,e,g,F,h,l),f.paintTopInner(a,b,c,d,e,g,t,h,l,q,z)),a.stroke()):(a.begin(),f.moveNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,F,h,D),f.paintNE(a,b,c,d,e,g,F,
+h,z),f.paintRight(a,b,c,d,e,g,u,h,C),f.paintSE(a,b,c,d,e,g,u,h,D),f.paintBottom(a,b,c,d,e,g,v,h,q),f.lineSWInner(a,b,c,d,e,g,v,h,l,q),f.paintBottomInner(a,b,c,d,e,g,u,h,l,D,C),f.paintSEInner(a,b,c,d,e,g,u,h,l),f.paintRightInner(a,b,c,d,e,g,F,h,l,z,D),f.paintNEInner(a,b,c,d,e,g,F,h,l),f.paintTopInner(a,b,c,d,e,g,t,h,l,q,z),a.close(),a.fillAndStroke()):z&&D&&C&&q&&("frame"!=r?(a.begin(),f.moveNW(a,b,c,d,e,g,t,h,q),f.paintNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,F,h,D),f.paintNE(a,b,c,d,e,g,F,h,
+z),f.paintRight(a,b,c,d,e,g,u,h,C),f.paintSE(a,b,c,d,e,g,u,h,D),f.paintBottom(a,b,c,d,e,g,v,h,q),f.paintSW(a,b,c,d,e,g,v,h,C),f.paintLeft(a,b,c,d,e,g,t,h,z),a.close(),"double"==r&&(f.moveSWInner(a,b,c,d,e,g,v,h,l,q),f.paintSWInner(a,b,c,d,e,g,v,h,l,C),f.paintBottomInner(a,b,c,d,e,g,u,h,l,D,C),f.paintSEInner(a,b,c,d,e,g,u,h,l),f.paintRightInner(a,b,c,d,e,g,F,h,l,z,D),f.paintNEInner(a,b,c,d,e,g,F,h,l),f.paintTopInner(a,b,c,d,e,g,t,h,l,q,z),f.paintNWInner(a,b,c,d,e,g,t,h,l),f.paintLeftInner(a,b,c,d,
+e,g,v,h,l,C,q),a.close()),a.stroke()):(a.begin(),f.moveNW(a,b,c,d,e,g,t,h,q),f.paintNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,F,h,D),f.paintNE(a,b,c,d,e,g,F,h,z),f.paintRight(a,b,c,d,e,g,u,h,C),f.paintSE(a,b,c,d,e,g,u,h,D),f.paintBottom(a,b,c,d,e,g,v,h,q),f.paintSW(a,b,c,d,e,g,v,h,C),f.paintLeft(a,b,c,d,e,g,t,h,z),a.close(),f.moveSWInner(a,b,c,d,e,g,v,h,l,q),f.paintSWInner(a,b,c,d,e,g,v,h,l,C),f.paintBottomInner(a,b,c,d,e,g,u,h,l,D,C),f.paintSEInner(a,b,c,d,e,g,u,h,l),f.paintRightInner(a,b,c,d,
+e,g,F,h,l,z,D),f.paintNEInner(a,b,c,d,e,g,F,h,l),f.paintTopInner(a,b,c,d,e,g,t,h,l,q,z),f.paintNWInner(a,b,c,d,e,g,t,h,l),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,q),a.close(),a.fillAndStroke())):"frame"!=r?(a.begin(),f.moveNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,F,h,D),"double"==r&&(f.moveNEInner(a,b,c,d,e,g,F,h,l,D),f.paintTopInner(a,b,c,d,e,g,t,h,l,q,z)),a.stroke()):(a.begin(),f.moveNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,F,h,D),f.lineNEInner(a,b,c,d,e,g,F,h,l,D),f.paintTopInner(a,b,c,d,
+e,g,t,h,l,q,z),a.close(),a.fillAndStroke()):"frame"!=r?(a.begin(),f.moveNE(a,b,c,d,e,g,F,h,z),f.paintRight(a,b,c,d,e,g,u,h,C),"double"==r&&(f.moveSEInner(a,b,c,d,e,g,u,h,l,C),f.paintRightInner(a,b,c,d,e,g,F,h,l,z,D)),a.stroke()):(a.begin(),f.moveNE(a,b,c,d,e,g,F,h,z),f.paintRight(a,b,c,d,e,g,u,h,C),f.lineSEInner(a,b,c,d,e,g,u,h,l,C),f.paintRightInner(a,b,c,d,e,g,F,h,l,z,D),a.close(),a.fillAndStroke()):"frame"!=r?(a.begin(),f.moveSE(a,b,c,d,e,g,u,h,D),f.paintBottom(a,b,c,d,e,g,v,h,q),"double"==r&&
+(f.moveSWInner(a,b,c,d,e,g,v,h,l,q),f.paintBottomInner(a,b,c,d,e,g,u,h,l,D,C)),a.stroke()):(a.begin(),f.moveSE(a,b,c,d,e,g,u,h,D),f.paintBottom(a,b,c,d,e,g,v,h,q),f.lineSWInner(a,b,c,d,e,g,v,h,l,q),f.paintBottomInner(a,b,c,d,e,g,u,h,l,D,C),a.close(),a.fillAndStroke()):"frame"!=r?(a.begin(),f.moveSW(a,b,c,d,e,g,t,h,C),f.paintLeft(a,b,c,d,e,g,t,h,z),"double"==r&&(f.moveNWInner(a,b,c,d,e,g,t,h,l,z,q),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,q)),a.stroke()):(a.begin(),f.moveSW(a,b,c,d,e,g,t,h,C),f.paintLeft(a,
+b,c,d,e,g,t,h,z),f.lineNWInner(a,b,c,d,e,g,t,h,l,z,q),f.paintLeftInner(a,b,c,d,e,g,v,h,l,C,q),a.close(),a.fillAndStroke());a.begin();f.paintFolds(a,b,c,d,e,g,t,F,u,v,h,z,D,C,q);a.stroke()};N.prototype.moveNW=function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==g&&"square"==f||!k?a.moveTo(0,0):a.moveTo(0,h)};N.prototype.moveNE=function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==g&&"square"==f||!k?a.moveTo(d,0):a.moveTo(d-h,0)};N.prototype.moveSE=function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==g&&
+"square"==f||!k?a.moveTo(d,e):a.moveTo(d,e-h)};N.prototype.moveSW=function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==g&&"square"==f||!k?a.moveTo(0,e):a.moveTo(h,e)};N.prototype.paintNW=function(a,b,c,d,e,f,g,h,k){if(k)if("rounded"==g||"default"==g&&"rounded"==f||"invRound"==g||"default"==g&&"invRound"==f){b=0;if("rounded"==g||"default"==g&&"rounded"==f)b=1;a.arcTo(h,h,0,0,b,h,0)}else("snip"==g||"default"==g&&"snip"==f||"fold"==g||"default"==g&&"fold"==f)&&a.lineTo(h,0);else a.lineTo(0,0)};N.prototype.paintTop=
+function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==g&&"square"==f||!k?a.lineTo(d,0):a.lineTo(d-h,0)};N.prototype.paintNE=function(a,b,c,d,e,f,g,h,k){if(k)if("rounded"==g||"default"==g&&"rounded"==f||"invRound"==g||"default"==g&&"invRound"==f){b=0;if("rounded"==g||"default"==g&&"rounded"==f)b=1;a.arcTo(h,h,0,0,b,d,h)}else("snip"==g||"default"==g&&"snip"==f||"fold"==g||"default"==g&&"fold"==f)&&a.lineTo(d,h);else a.lineTo(d,0)};N.prototype.paintRight=function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==
+g&&"square"==f||!k?a.lineTo(d,e):a.lineTo(d,e-h)};N.prototype.paintLeft=function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==g&&"square"==f||!k?a.lineTo(0,0):a.lineTo(0,h)};N.prototype.paintSE=function(a,b,c,d,e,f,g,h,k){if(k)if("rounded"==g||"default"==g&&"rounded"==f||"invRound"==g||"default"==g&&"invRound"==f){b=0;if("rounded"==g||"default"==g&&"rounded"==f)b=1;a.arcTo(h,h,0,0,b,d-h,e)}else("snip"==g||"default"==g&&"snip"==f||"fold"==g||"default"==g&&"fold"==f)&&a.lineTo(d-h,e);else a.lineTo(d,
+e)};N.prototype.paintBottom=function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==g&&"square"==f||!k?a.lineTo(0,e):a.lineTo(h,e)};N.prototype.paintSW=function(a,b,c,d,e,f,g,h,k){if(k)if("rounded"==g||"default"==g&&"rounded"==f||"invRound"==g||"default"==g&&"invRound"==f){b=0;if("rounded"==g||"default"==g&&"rounded"==f)b=1;a.arcTo(h,h,0,0,b,0,e-h)}else("snip"==g||"default"==g&&"snip"==f||"fold"==g||"default"==g&&"fold"==f)&&a.lineTo(0,e-h);else a.lineTo(0,e)};N.prototype.paintNWInner=function(a,b,c,
+d,e,f,g,h,k){if("rounded"==g||"default"==g&&"rounded"==f)a.arcTo(h-.5*k,h-.5*k,0,0,0,k,.5*k+h);else if("invRound"==g||"default"==g&&"invRound"==f)a.arcTo(h+k,h+k,0,0,1,k,k+h);else if("snip"==g||"default"==g&&"snip"==f)a.lineTo(k,.5*k+h);else if("fold"==g||"default"==g&&"fold"==f)a.lineTo(k+h,k+h),a.lineTo(k,k+h)};N.prototype.paintTopInner=function(a,b,c,d,e,f,g,h,k,l,m){l||m?!l&&m?a.lineTo(0,k):l&&!m?a.lineTo(k,0):l?"square"==g||"default"==g&&"square"==f?a.lineTo(k,k):"rounded"==g||"default"==g&&
+"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.lineTo(h+.5*k,k):a.lineTo(h+k,k):a.lineTo(0,k):a.lineTo(0,0)};N.prototype.paintNEInner=function(a,b,c,d,e,f,g,h,k){if("rounded"==g||"default"==g&&"rounded"==f)a.arcTo(h-.5*k,h-.5*k,0,0,0,d-h-.5*k,k);else if("invRound"==g||"default"==g&&"invRound"==f)a.arcTo(h+k,h+k,0,0,1,d-h-k,k);else if("snip"==g||"default"==g&&"snip"==f)a.lineTo(d-h-.5*k,k);else if("fold"==g||"default"==g&&"fold"==f)a.lineTo(d-h-k,h+k),a.lineTo(d-h-k,k)};N.prototype.paintRightInner=
+function(a,b,c,d,e,f,g,h,k,l,m){l||m?!l&&m?a.lineTo(d-k,0):l&&!m?a.lineTo(d,k):l?"square"==g||"default"==g&&"square"==f?a.lineTo(d-k,k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.lineTo(d-k,h+.5*k):a.lineTo(d-k,h+k):a.lineTo(d-k,0):a.lineTo(d,0)};N.prototype.paintLeftInner=function(a,b,c,d,e,f,g,h,k,l,m){l||m?!l&&m?a.lineTo(k,e):l&&!m?a.lineTo(0,e-k):l?"square"==g||"default"==g&&"square"==f?a.lineTo(k,e-k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==
+g&&"snip"==f?a.lineTo(k,e-h-.5*k):a.lineTo(k,e-h-k):a.lineTo(k,e):a.lineTo(0,e)};N.prototype.paintSEInner=function(a,b,c,d,e,f,g,h,k){if("rounded"==g||"default"==g&&"rounded"==f)a.arcTo(h-.5*k,h-.5*k,0,0,0,d-k,e-h-.5*k);else if("invRound"==g||"default"==g&&"invRound"==f)a.arcTo(h+k,h+k,0,0,1,d-k,e-h-k);else if("snip"==g||"default"==g&&"snip"==f)a.lineTo(d-k,e-h-.5*k);else if("fold"==g||"default"==g&&"fold"==f)a.lineTo(d-h-k,e-h-k),a.lineTo(d-k,e-h-k)};N.prototype.paintBottomInner=function(a,b,c,d,
+e,f,g,h,k,l,m){l||m?!l&&m?a.lineTo(d,e-k):l&&!m?a.lineTo(d-k,e):"square"==g||"default"==g&&"square"==f||!l?a.lineTo(d-k,e-k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.lineTo(d-h-.5*k,e-k):a.lineTo(d-h-k,e-k):a.lineTo(d,e)};N.prototype.paintSWInner=function(a,b,c,d,e,f,g,h,k,l){if(!l)a.lineTo(k,e);else if("square"==g||"default"==g&&"square"==f)a.lineTo(k,e-k);else if("rounded"==g||"default"==g&&"rounded"==f)a.arcTo(h-.5*k,h-.5*k,0,0,0,h+.5*k,e-k);else if("invRound"==
+g||"default"==g&&"invRound"==f)a.arcTo(h+k,h+k,0,0,1,h+k,e-k);else if("snip"==g||"default"==g&&"snip"==f)a.lineTo(h+.5*k,e-k);else if("fold"==g||"default"==g&&"fold"==f)a.lineTo(k+h,e-h-k),a.lineTo(k+h,e-k)};N.prototype.moveSWInner=function(a,b,c,d,e,f,g,h,k,l){l?"square"==g||"default"==g&&"square"==f?a.moveTo(k,e-k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.moveTo(k,e-h-.5*k):("invRound"==g||"default"==g&&"invRound"==f||"fold"==g||"default"==g&&"fold"==f)&&a.moveTo(k,
+e-h-k):a.moveTo(0,e-k)};N.prototype.lineSWInner=function(a,b,c,d,e,f,g,h,k,l){l?"square"==g||"default"==g&&"square"==f?a.lineTo(k,e-k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.lineTo(k,e-h-.5*k):("invRound"==g||"default"==g&&"invRound"==f||"fold"==g||"default"==g&&"fold"==f)&&a.lineTo(k,e-h-k):a.lineTo(0,e-k)};N.prototype.moveSEInner=function(a,b,c,d,e,f,g,h,k,l){l?"square"==g||"default"==g&&"square"==f?a.moveTo(d-k,e-k):"rounded"==g||"default"==g&&"rounded"==
+f||"snip"==g||"default"==g&&"snip"==f?a.moveTo(d-k,e-h-.5*k):("invRound"==g||"default"==g&&"invRound"==f||"fold"==g||"default"==g&&"fold"==f)&&a.moveTo(d-k,e-h-k):a.moveTo(d-k,e)};N.prototype.lineSEInner=function(a,b,c,d,e,f,g,h,k,l){l?"square"==g||"default"==g&&"square"==f?a.lineTo(d-k,e-k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.lineTo(d-k,e-h-.5*k):("invRound"==g||"default"==g&&"invRound"==f||"fold"==g||"default"==g&&"fold"==f)&&a.lineTo(d-k,e-h-k):a.lineTo(d-
+k,e)};N.prototype.moveNEInner=function(a,b,c,d,e,f,g,h,k,l){l?"square"==g||"default"==g&&"square"==f||l?a.moveTo(d-k,k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.moveTo(d-k,h+.5*k):("invRound"==g||"default"==g&&"invRound"==f||"fold"==g||"default"==g&&"fold"==f)&&a.moveTo(d-k,h+k):a.moveTo(d,k)};N.prototype.lineNEInner=function(a,b,c,d,e,f,g,h,k,l){l?"square"==g||"default"==g&&"square"==f||l?a.lineTo(d-k,k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==
+g&&"snip"==f?a.lineTo(d-k,h+.5*k):("invRound"==g||"default"==g&&"invRound"==f||"fold"==g||"default"==g&&"fold"==f)&&a.lineTo(d-k,h+k):a.lineTo(d,k)};N.prototype.moveNWInner=function(a,b,c,d,e,f,g,h,k,l,m){l||m?!l&&m?a.moveTo(k,0):l&&!m?a.moveTo(0,k):"square"==g||"default"==g&&"square"==f?a.moveTo(k,k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.moveTo(k,h+.5*k):("invRound"==g||"default"==g&&"invRound"==f||"fold"==g||"default"==g&&"fold"==f)&&a.moveTo(k,h+k):a.moveTo(0,
+0)};N.prototype.lineNWInner=function(a,b,c,d,e,f,g,h,k,l,m){l||m?!l&&m?a.lineTo(k,0):l&&!m?a.lineTo(0,k):"square"==g||"default"==g&&"square"==f?a.lineTo(k,k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.lineTo(k,h+.5*k):("invRound"==g||"default"==g&&"invRound"==f||"fold"==g||"default"==g&&"fold"==f)&&a.lineTo(k,h+k):a.lineTo(0,0)};N.prototype.paintFolds=function(a,b,c,d,e,f,g,h,k,l,m,n,p,q,t){if("fold"==f||"fold"==g||"fold"==h||"fold"==k||"fold"==l)("fold"==g||"default"==
+g&&"fold"==f)&&n&&t&&(a.moveTo(0,m),a.lineTo(m,m),a.lineTo(m,0)),("fold"==h||"default"==h&&"fold"==f)&&n&&p&&(a.moveTo(d-m,0),a.lineTo(d-m,m),a.lineTo(d,m)),("fold"==k||"default"==k&&"fold"==f)&&q&&p&&(a.moveTo(d-m,e),a.lineTo(d-m,e-m),a.lineTo(d,e-m)),("fold"==l||"default"==l&&"fold"==f)&&q&&t&&(a.moveTo(0,e-m),a.lineTo(m,e-m),a.lineTo(m,e))};mxCellRenderer.registerShape(N.prototype.cst.RECT2,N);N.prototype.constraints=null;mxUtils.extend(wa,mxConnector);wa.prototype.origPaintEdgeShape=wa.prototype.paintEdgeShape;
+wa.prototype.paintEdgeShape=function(a,b,c){for(var d=[],e=0;e<b.length;e++)d.push(mxUtils.clone(b[e]));var e=a.state.dashed,f=a.state.fixDash;wa.prototype.origPaintEdgeShape.apply(this,[a,d,c]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(e,f),wa.prototype.origPaintEdgeShape.apply(this,[a,b,c])))};mxCellRenderer.registerShape("filledEdge",wa);"undefined"!==typeof StyleFormatPanel&&function(){var a=
+StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var b=this.format.getSelectionState(),c=a.apply(this,arguments);"umlFrame"==b.style.shape&&c.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return c}}();mxMarker.addMarker("dash",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),r=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-r/2,d.y-r/2+m/2);a.lineTo(d.x+r/2-3*m/2,d.y-3*r/2-m/2);a.stroke()}});mxMarker.addMarker("box",
+function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),r=f*(g+k+1),n=d.x+m/2,p=d.y+r/2;d.x-=m;d.y-=r;return function(){a.begin();a.moveTo(n-m/2-r/2,p-r/2+m/2);a.lineTo(n-m/2+r/2,p-r/2-m/2);a.lineTo(n+r/2-3*m/2,p-3*r/2-m/2);a.lineTo(n-r/2-3*m/2,p-3*r/2+m/2);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),r=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-r/2,d.y-r/2+m/2);a.lineTo(d.x+r/2-3*m/2,d.y-3*r/2-m/2);a.moveTo(d.x-m/2+r/2,d.y-
+r/2-m/2);a.lineTo(d.x-r/2-3*m/2,d.y-3*r/2+m/2);a.stroke()}});mxMarker.addMarker("circle",Sa);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,f,g,h,k,l){var m=d.clone(),r=Sa.apply(this,arguments),n=e*(g+2*k),p=f*(g+2*k);return function(){r.apply(this,arguments);a.begin();a.moveTo(m.x-e*k,m.y-f*k);a.lineTo(m.x-2*n+e*k,m.y-2*p+f*k);a.moveTo(m.x-n-p+f*k,m.y-p+n-e*k);a.lineTo(m.x+p-n-f*k,m.y-p-n+e*k);a.stroke()}});mxMarker.addMarker("halfCircle",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),r=f*(g+
+k+1),n=d.clone();d.x-=m;d.y-=r;return function(){a.begin();a.moveTo(n.x-r,n.y+m);a.quadTo(d.x-r,d.y+m,d.x,d.y);a.quadTo(d.x+r,d.y-m,n.x+r,n.y-m);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,g,h,k,l){b=e*k*1.118;c=f*k*1.118;e*=g+k;f*=g+k;var m=d.clone();m.x-=b;m.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(m.x,m.y);h?a.lineTo(m.x-e-f/2,m.y-f+e/2):a.lineTo(m.x+f/2-e,m.y-f-e/2);a.lineTo(m.x-e,m.y-f);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",
+function(a){a=null!=a?a:2;return function(b,c,d,e,f,g,h,k,l,m){f*=h+l;g*=h+l;var r=e.clone();return function(){b.begin();b.moveTo(r.x,r.y);k?b.lineTo(r.x-f-g/a,r.y-g+f/a):b.lineTo(r.x+g/a-f,r.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Va=function(a,b,c){return Da(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+e*b/4-d*g/2)},function(b,d,e,f,g,h){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));a.style.width=
+Math.round(2*b)/a.view.scale-c})},Da=function(a,b,c,d,e){return S(a,b,function(b){var e=a.absolutePoints,f=e.length-1;b=a.view.translate;var g=a.view.scale,h=c?e[0]:e[f],e=c?e[1]:e[f-1],f=e.x-h.x,k=e.y-h.y,l=Math.sqrt(f*f+k*k),h=d.call(this,l,f/l,k/l,h,e);return new mxPoint(h.x/g-b.x,h.y/g-b.y)},function(b,d,f){var g=a.absolutePoints,h=g.length-1;b=a.view.translate;var k=a.view.scale,l=c?g[0]:g[h],g=c?g[1]:g[h-1],h=g.x-l.x,m=g.y-l.y,r=Math.sqrt(h*h+m*m);d.x=(d.x+b.x)*k;d.y=(d.y+b.y)*k;e.call(this,
+r,h/r,m/r,l,g,d,f)})},va=function(a){return function(b){return[S(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",X.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",X.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,
+Math.min(a,(b.x+b.width-c.x)/b.width))})]}},Wa=function(a){return function(b){return[S(b,["size"],function(b){var c=Math.max(0,Math.min(.5*b.height,parseFloat(mxUtils.getValue(this.state.style,"size",a))));return new mxPoint(b.x,b.y+c)},function(a,b){this.state.style.size=Math.max(0,b.y-a.y)},!0)]}},Qa=function(a,b,c){return function(d){var e=[S(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+
+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)},!1)];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(sa(d));return e}},Ia=function(a,b,c,d,e){c=null!=c?c:.5;return function(f){var g=[S(f,["size"],function(b){var c=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,"size",c?e:a));return new mxPoint(b.x+Math.max(0,Math.min(.5*b.width,
+d*(c?1:b.width))),b.getCenterY())},function(a,b,d){a=null!=e&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?b.x-a.x:Math.max(0,Math.min(c,(b.x-a.x)/a.width));this.state.style.size=a},!1,d)];b&&mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(sa(f));return g}},Ta=function(a,b,c){a=null!=a?a:.5;return function(d){var e=[S(d,["size"],function(d){var e=null!=c?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,f=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,
+"size",e?c:b)));return new mxPoint(d.x+Math.min(.75*d.width*a,f*(e?.75:.75*d.width)),d.y+d.height/4)},function(b,d){var e=null!=c&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?d.x-b.x:Math.max(0,Math.min(a,(d.x-b.x)/b.width*.75));this.state.style.size=e},!1,!0)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(sa(d));return e}},Ca=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(sa(a));return b}},sa=function(a,b){return S(a,
+[mxConstants.STYLE_ARCSIZE],function(c){var d=null!=b?b:c.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(c.x+c.width-Math.min(c.width/2,e),c.y+d)}e=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/2,c.height/2),Math.min(c.width,c.height)*
+e),c.y+d)},function(b,c,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(b.width,2*(b.x+b.width-c.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(b.width-c.x+b.x)/Math.min(b.width,b.height))))})},S=function(a,b,c,d,e,f,g){var h=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);h.execute=function(a){for(var c=0;c<b.length;c++)this.copyStyle(b[c]);
+g&&g(a)};h.getPosition=c;h.setPosition=d;h.ignoreGrid=null!=e?e:!0;if(f){var k=h.positionChanged;h.positionChanged=function(){k.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return h},Ja={link:function(a){return[Va(a,!0,10),Va(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(Da(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+!0,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/
+3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(Da(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,
+c,d,e,f){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/
+100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-
parseFloat(a.style.endWidth))<b&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(Da(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*
a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<
b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),c.push(Da(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=
@@ -3377,38 +3399,38 @@ function(b){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZ
Math.min(b.width,c.x-b.x)))},!1,null,function(b){if(mxEvent.isControlDown(b.getEvent())&&(b=a.view.graph,b.isTableRow(a.cell)||b.isTableCell(a.cell))){for(var c=b.getSwimlaneDirection(a.style),d=b.model.getParent(a.cell),d=b.model.getChildCells(d,!0),e=[],f=0;f<d.length;f++)d[f]!=a.cell&&b.isSwimlane(d[f])&&b.getSwimlaneDirection(b.getCurrentCellStyle(d[f]))==c&&e.push(d[f]);b.setCellStyles(mxConstants.STYLE_STARTSIZE,a.style[mxConstants.STYLE_STARTSIZE],e)}}));return b},label:Ca(),ext:Ca(),rectangle:Ca(),
triangle:Ca(),rhombus:Ca(),umlLifeline:function(a){return[S(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",P.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){return[S(a,["width","height"],function(a){var b=Math.max(T.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",T.prototype.width))),
c=Math.max(1.5*T.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",T.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(T.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*T.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)]},process:function(a){var b=[S(a,["size"],function(a){var b="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),c=parseFloat(mxUtils.getValue(this.state.style,
-"size",A.prototype.size));return b?new mxPoint(a.x+c,a.y+a.height/4):new mxPoint(a.x+a.width*c,a.y+a.height/4)},function(a,b){var c="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*a.width,b.x-a.x)):Math.max(0,Math.min(.5,(b.x-a.x)/a.width));this.state.style.size=c},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(sa(a));return b},cross:function(a){return[S(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"size",B.prototype.size));return b?new mxPoint(a.x+c,a.y+a.height/4):new mxPoint(a.x+a.width*c,a.y+a.height/4)},function(a,b){var c="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*a.width,b.x-a.x)):Math.max(0,Math.min(.5,(b.x-a.x)/a.width));this.state.style.size=c},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(sa(a));return b},cross:function(a){return[S(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
"size",ya.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/c*2,Math.max(0,a.getCenterX()-b.x)/c*2)))})]},note:function(a){return[S(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(a.x+a.width-b,a.y+b)},function(a,b){this.state.style.size=
Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},note2:function(a){return[S(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",h.prototype.size)))));return new mxPoint(a.x+a.width-b,a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=[S(a,["size"],function(a){var b=
-Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",ia.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(sa(a));return b},dataStorage:function(a){return[S(a,["size"],function(a){var b="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),c=parseFloat(mxUtils.getValue(this.state.style,"size",b?W.prototype.fixedSize:
-W.prototype.size));return new mxPoint(a.x+a.width-c*(b?1:a.width),a.getCenterY())},function(a,b){var c="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(a.width,a.x+a.width-b.x)):Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width));this.state.style.size=c},!1)]},callout:function(a){var b=[S(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",z.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"position",z.prototype.position)));mxUtils.getValue(this.state.style,"base",z.prototype.base);return new mxPoint(a.x+c*a.width,a.y+a.height-b)},function(a,b){mxUtils.getValue(this.state.style,"base",z.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-b.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100},!1),S(a,["position2"],function(a){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",z.prototype.position2)));
-return new mxPoint(a.x+b*a.width,a.y+a.height)},function(a,b){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100},!1),S(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",z.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",z.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",z.prototype.base)));return new mxPoint(a.x+Math.min(a.width,
-c*a.width+d),a.y+a.height-b)},function(a,b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",z.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(sa(a));return b},internalStorage:function(a){var b=[S(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ca.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
-"dy",ca.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(sa(a));return b},module:function(a){return[S(a,["jettyWidth","jettyHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"jettyWidth",fa.prototype.jettyWidth))),c=Math.max(0,Math.min(a.height,
+Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",ia.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(sa(a));return b},dataStorage:function(a){return[S(a,["size"],function(a){var b="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),c=parseFloat(mxUtils.getValue(this.state.style,"size",b?Y.prototype.fixedSize:
+Y.prototype.size));return new mxPoint(a.x+a.width-c*(b?1:a.width),a.getCenterY())},function(a,b){var c="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(a.width,a.x+a.width-b.x)):Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width));this.state.style.size=c},!1)]},callout:function(a){var b=[S(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",y.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"position",y.prototype.position)));mxUtils.getValue(this.state.style,"base",y.prototype.base);return new mxPoint(a.x+c*a.width,a.y+a.height-b)},function(a,b){mxUtils.getValue(this.state.style,"base",y.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-b.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100},!1),S(a,["position2"],function(a){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",y.prototype.position2)));
+return new mxPoint(a.x+b*a.width,a.y+a.height)},function(a,b){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100},!1),S(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",y.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",y.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",y.prototype.base)));return new mxPoint(a.x+Math.min(a.width,
+c*a.width+d),a.y+a.height-b)},function(a,b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",y.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(sa(a));return b},internalStorage:function(a){var b=[S(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",da.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
+"dy",da.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(sa(a));return b},module:function(a){return[S(a,["jettyWidth","jettyHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"jettyWidth",fa.prototype.jettyWidth))),c=Math.max(0,Math.min(a.height,
mxUtils.getValue(this.state.style,"jettyHeight",fa.prototype.jettyHeight)));return new mxPoint(a.x+b/2,a.y+2*c)},function(a,b){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y))/2)})]},corner:function(a){return[S(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ga.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
"dy",ga.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},tee:function(a){return[S(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ja.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ja.prototype.dy)));return new mxPoint(a.x+(a.width+b)/2,a.y+c)},function(a,
b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},singleArrow:va(1),doubleArrow:va(.5),folder:function(a){return[S(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",p.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",p.prototype.tabHeight)));mxUtils.getValue(this.state.style,
"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},document:function(a){return[S(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
-"size",v.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))},!1)]},tape:function(a){return[S(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))},!1)]},isoCube2:function(a){return[S(a,
-["isoAngle"],function(a){var b=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",g.isoAngle))))*Math.PI/200;return new mxPoint(a.x,a.y+Math.min(a.width*Math.tan(b),.5*a.height))},function(a,b){this.state.style.isoAngle=Math.max(0,50*(b.y-a.y)/a.height)},!0)]},cylinder2:Wa(l.prototype.size),cylinder3:Wa(m.prototype.size),offPageConnector:function(a){return[S(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",da.prototype.size))));
+"size",u.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))},!1)]},tape:function(a){return[S(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",v.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))},!1)]},isoCube2:function(a){return[S(a,
+["isoAngle"],function(a){var b=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",g.isoAngle))))*Math.PI/200;return new mxPoint(a.x,a.y+Math.min(a.width*Math.tan(b),.5*a.height))},function(a,b){this.state.style.isoAngle=Math.max(0,50*(b.y-a.y)/a.height)},!0)]},cylinder2:Wa(l.prototype.size),cylinder3:Wa(m.prototype.size),offPageConnector:function(a){return[S(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size))));
return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))},!1)]},"mxgraph.basic.rect":function(a){var b=[Graph.createHandle(a,["size"],function(a){var b=Math.max(0,Math.min(a.width/2,a.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(a.x+b,a.y+b)},function(a,b){this.state.style.size=Math.round(100*Math.max(0,Math.min(a.height/2,a.width/2,b.x-a.x)))/100})];a=Graph.createHandle(a,
-["indent"],function(a){var b=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(a.x+.75*a.width,a.y+b*a.height/200)},function(a,b){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(b.y-a.y)/a.height)))/100});b.push(a);return b},step:Ia(H.prototype.size,!0,null,!0,H.prototype.fixedSize),hexagon:Ia(K.prototype.size,!0,.5,!0,K.prototype.fixedSize),curlyBracket:Ia(B.prototype.size,!1),display:Ia(za.prototype.size,!1),cube:Qa(1,
-c.prototype.size,!1),card:Qa(.5,u.prototype.size,!0),loopLimit:Qa(.5,Z.prototype.size,!0),trapezoid:Ta(.5,x.prototype.size,x.prototype.fixedSize),parallelogram:Ta(1,y.prototype.size,y.prototype.fixedSize)};Graph.createHandle=S;Graph.handleFactory=Ja;var bb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=bb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&
+["indent"],function(a){var b=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(a.x+.75*a.width,a.y+b*a.height/200)},function(a,b){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(b.y-a.y)/a.height)))/100});b.push(a);return b},step:Ia(I.prototype.size,!0,null,!0,I.prototype.fixedSize),hexagon:Ia(K.prototype.size,!0,.5,!0,K.prototype.fixedSize),curlyBracket:Ia(A.prototype.size,!1),display:Ia(za.prototype.size,!1),cube:Qa(1,
+c.prototype.size,!1),card:Qa(.5,t.prototype.size,!0),loopLimit:Qa(.5,V.prototype.size,!0),trapezoid:Ta(.5,x.prototype.size,x.prototype.fixedSize),parallelogram:Ta(1,w.prototype.size,w.prototype.fixedSize)};Graph.createHandle=S;Graph.handleFactory=Ja;var bb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=bb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&
null==mxStencilRegistry.getStencil(b)?b=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(b=mxConstants.SHAPE_SWIMLANE);b=Ja[b];null==b&&null!=this.state.shape&&this.state.shape.isRoundable()&&(b=Ja[mxConstants.SHAPE_RECTANGLE]);null!=b&&(b=b(this.state),null!=b&&(a=null==a?b:a.concat(b)))}return a};mxEdgeHandler.prototype.createCustomHandles=function(){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);
a=Ja[a];return null!=a?a(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Ka=new mxPoint(1,0),La=new mxPoint(1,0),va=mxUtils.toRadians(-30),Ka=mxUtils.getRotatedPoint(Ka,Math.cos(va),Math.sin(va)),va=mxUtils.toRadians(-150),La=mxUtils.getRotatedPoint(La,Math.cos(va),Math.sin(va));mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,h=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==
-h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));var k=Ka.x,l=Ka.y,m=La.x,n=La.y,q="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,b,c){a-=p.x;var d=b-p.y;b=(n*a-m*d)/(k*n-l*m);a=(l*a-k*d)/(l*m-k*n);q?(c&&(p=new mxPoint(p.x+k*b,p.y+l*b),e.push(p)),p=new mxPoint(p.x+m*a,p.y+n*a)):(c&&(p=new mxPoint(p.x+m*a,p.y+n*a),e.push(p)),p=new mxPoint(p.x+k*b,p.y+l*b));e.push(p)};var p=h;null==
+h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));var k=Ka.x,l=Ka.y,m=La.x,n=La.y,r="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,b,c){a-=p.x;var d=b-p.y;b=(n*a-m*d)/(k*n-l*m);a=(l*a-k*d)/(l*m-k*n);r?(c&&(p=new mxPoint(p.x+k*b,p.y+l*b),e.push(p)),p=new mxPoint(p.x+m*a,p.y+n*a)):(c&&(p=new mxPoint(p.x+m*a,p.y+n*a),e.push(p)),p=new mxPoint(p.x+k*b,p.y+l*b));e.push(p)};var p=h;null==
d&&(d=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var cb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return cb.apply(this,arguments)};e.prototype.constraints=[];d.prototype.getConstraints=function(a,b,c){a=[];var d=Math.tan(mxUtils.toRadians(30)),e=(.5-
d)/2,d=Math.min(b,c/(.5+d));b=(b-d)/2;c=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*d,c+d*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.75*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*d,c+(1-e)*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.75*d));return a};g.prototype.getConstraints=
function(a,b,c){a=[];var d=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,d=Math.min(b*Math.tan(d),.5*c);a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c-d));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));return a};z.prototype.getConstraints=function(a,b,c){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));return a};y.prototype.getConstraints=function(a,b,c){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c-d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
b,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-d)));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(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))];Fa.prototype.constraints=mxRectangleShape.prototype.constraints;
-mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
+mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;M.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};u.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};t.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};c.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,
"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(b+d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-d)));return a};m.prototype.getConstraints=function(a,b,c){a=[];b=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
@@ -3417,37 +3439,37 @@ mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwim
function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d,e)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),e))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,e)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,b,.25*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.75*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.75*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};ca.prototype.constraints=mxRectangleShape.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxEllipse.prototype.constraints;Ea.prototype.constraints=mxEllipse.prototype.constraints;
+0),!1,null,0,.75*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};da.prototype.constraints=mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxEllipse.prototype.constraints;Ea.prototype.constraints=mxEllipse.prototype.constraints;
Ba.prototype.constraints=mxEllipse.prototype.constraints;Ga.prototype.constraints=mxEllipse.prototype.constraints;ia.prototype.constraints=mxRectangleShape.prototype.constraints;Ha.prototype.constraints=mxRectangleShape.prototype.constraints;za.prototype.getConstraints=function(a,b,c){a=[];var d=Math.min(b,c/2),e=Math.min(b-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));return a};fa.prototype.getConstraints=function(a,b,c){b=parseFloat(mxUtils.getValue(a,
"jettyWidth",fa.prototype.jettyWidth))/2;a=parseFloat(mxUtils.getValue(a,"jettyHeight",fa.prototype.jettyHeight));var d=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,b),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,b),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(c-.5*a,1.5*a)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(c-.5*a,3.5*a))];c>5*a&&d.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,b));c>8*a&&d.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1,null,b));c>15*a&&d.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,b));return d};Z.prototype.constraints=mxRectangleShape.prototype.constraints;da.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),!1,null,b));c>15*a&&d.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,b));return d};V.prototype.constraints=mxRectangleShape.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];U.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)];pa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,
.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];n.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
-.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];t.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
-.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];H.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];v.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];I.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ea.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,
.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,
1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
-.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];y.prototype.constraints=mxRectangleShape.prototype.constraints;x.prototype.constraints=mxRectangleShape.prototype.constraints;v.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+.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)];w.prototype.constraints=mxRectangleShape.prototype.constraints;x.prototype.constraints=mxRectangleShape.prototype.constraints;u.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;ja.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,
"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*b+.25*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(b+d),.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),c));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*b-.25*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*e));return a};ga.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,b,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
-1),!1));return a};ma.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)];V.prototype.getConstraints=
+1),!1));return a};ma.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];X.prototype.getConstraints=
function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-e),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,0));a.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-e),c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));return a};ra.prototype.getConstraints=function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",V.prototype.arrowWidth)))),e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",V.prototype.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-e),c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));return a};ra.prototype.getConstraints=function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",X.prototype.arrowWidth)))),e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",X.prototype.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));return a};ya.prototype.getConstraints=
function(a,b,c){a=[];var d=Math.min(c,b),e=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),d=(c-e)/2,f=d+e,g=(b-e)/2,e=g+e;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,e,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,c));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+e),d));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+e),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,d));return a};P.prototype.constraints=null;N.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)];Y.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)];na.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];oa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,d));return a};P.prototype.constraints=null;L.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)];Z.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)];na.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(a){this.editorUi=a;this.actions={};this.init()}
Actions.prototype.init=function(){function a(a){d.escape();a=d.deleteCells(d.getDeletableCells(d.getSelectionCells()),a);null!=a&&d.setSelectionCells(a)}function c(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{for(var a=d.getSelectionCells(),b=0;b<a.length;b++)d.cellLabelChanged(a[b],"")}finally{d.getModel().endUpdate()}}}var b=this.editorUi,e=b.editor,d=e.graph,f=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){d.openLink(b.getUrl())});
this.addAction("open...",function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("smartFit",function(){d.popupMenuHandler.hideMenu();var a=d.view.scale,c=d.view.translate.x,e=d.view.translate.y;b.actions.get("resetView").funct();1E-5>Math.abs(a-d.view.scale)&&c==d.view.translate.x&&e==d.view.translate.y&&b.actions.get(d.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){d.isEnabled()&&(d.isSelectionEmpty()?b.actions.get("smartFit").funct():
@@ -3540,14 +3562,14 @@ c)})));this.put("file",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItem
Menus.prototype.addMenu=function(a,c,b){var e=this.get(a);null!=e&&(c.showDisabled||e.isEnabled())&&this.get(a).execute(c,b)};
Menus.prototype.addInsertTableCellItem=function(a,c){var b=this.editorUi.editor.graph;this.addInsertTableItem(a,mxUtils.bind(this,function(a,c,f,k,h){c=h||mxEvent.isControlDown(a)||mxEvent.isMetaDown(a)?b.createCrossFunctionalSwimlane(c,f,null,null,k||mxEvent.isShiftDown(a)?"Cross-Functional Flowchart":null):b.createTable(c,f,null,null,k||mxEvent.isShiftDown(a)?"Table":null);a=mxEvent.isAltDown(a)?b.getFreeInsertPoint():b.getCenterInsertPoint(b.getBoundingBoxFromGeometry([c],!0));a=b.importCells([c],
a.x,a.y);null!=a&&0<a.length&&(b.scrollCellToVisible(a[0]),b.setSelectionCells(a))}),c)};
-Menus.prototype.addInsertTableItem=function(a,c,b){function e(a,b){for(var c=["<table>"],d=0;d<a;d++){c.push("<tr>");for(var e=0;e<b;e++)c.push("<td><br></td>");c.push("</tr>")}c.push("</table>");return c.join("")}function d(a){h=f.getParentByName(mxEvent.getSource(a),"TD");var b=!1;if(null!=h){k=f.getParentByName(h,"TR");for(var c=mxEvent.isMouseEvent(a)?2:4,d=m,e=Math.min(20,k.sectionRowIndex+c),c=Math.min(20,h.cellIndex+c),g=d.rows.length;g<e;g++)for(var l=d.insertRow(g),p=0;p<d.rows[0].cells.length;p++)l.insertCell(-1);
-for(g=0;g<d.rows.length;g++)for(l=d.rows[g],p=l.cells.length;p<c;p++)l.insertCell(-1);n.innerHTML=h.cellIndex+1+"x"+(k.sectionRowIndex+1);for(d=0;d<m.rows.length;d++)for(e=m.rows[d],c=0;c<e.cells.length;c++)g=e.cells[c],d==k.sectionRowIndex&&c==h.cellIndex&&(b="blue"==g.style.backgroundColor),g.style.backgroundColor=d<=k.sectionRowIndex&&c<=h.cellIndex?"blue":"transparent"}mxEvent.consume(a);return b}c=null!=c?c:mxUtils.bind(this,function(a,b,c){var d=this.editorUi.editor.graph;a=d.getParentByName(mxEvent.getSource(a),
-"TD");if(null!=a&&null!=d.cellEditor.textarea){d.getParentByName(a,"TR");var f=d.cellEditor.textarea.getElementsByTagName("table");a=[];for(var g=0;g<f.length;g++)a.push(f[g]);d.container.focus();d.pasteHtmlAtCaret(e(b,c));b=d.cellEditor.textarea.getElementsByTagName("table");if(b.length==a.length+1)for(g=b.length-1;0<=g;g--)if(0==g||b[g]!=a[g-1]){d.selectNode(b[g].rows[0].cells[0]);break}}});var f=this.editorUi.editor.graph,k=null,h=null;a=a.addItem("",null,null,b,null,null,null,!0);a.firstChild.style.fontSize=
-Menus.prototype.defaultFontSize+"px";a.firstChild.innerHTML="";var g=document.createElement("input");g.setAttribute("id","geTitleOption");g.setAttribute("type","checkbox");a.firstChild.appendChild(g);b=document.createElement("label");mxUtils.write(b,mxResources.get("title"));b.setAttribute("for","geTitleOption");a.firstChild.appendChild(b);mxEvent.addGestureListeners(b,null,null,mxUtils.bind(this,function(a){mxEvent.consume(a)}));mxEvent.addGestureListeners(g,null,null,mxUtils.bind(this,function(a){mxEvent.consume(a)}));
-mxUtils.br(a.firstChild);var l=document.createElement("input");l.setAttribute("id","geContainerOption");l.setAttribute("type","checkbox");a.firstChild.appendChild(l);b=document.createElement("label");mxUtils.write(b,mxResources.get("container"));b.setAttribute("for","geContainerOption");a.firstChild.appendChild(b);mxEvent.addGestureListeners(b,null,null,mxUtils.bind(this,function(a){mxEvent.consume(a)}));mxEvent.addGestureListeners(l,null,null,mxUtils.bind(this,function(a){mxEvent.consume(a)}));mxUtils.br(a.firstChild);
-mxUtils.br(a.firstChild);var m=function(a,b){var c=document.createElement("table");c.setAttribute("border","1");c.style.borderCollapse="collapse";c.style.borderStyle="solid";c.setAttribute("cellPadding","8");for(var d=0;d<a;d++)for(var e=c.insertRow(d),f=0;f<b;f++)e.insertCell(-1);return c}(5,5);a.firstChild.appendChild(m);var n=document.createElement("div");n.style.padding="4px";n.innerHTML="1x1";a.firstChild.appendChild(n);mxEvent.addGestureListeners(m,null,null,mxUtils.bind(this,function(a){var b=
-d(a);null!=h&&null!=k&&b&&(c(a,k.sectionRowIndex+1,h.cellIndex+1,g.checked,l.checked),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0))}));mxEvent.addListener(m,"mouseover",d)};
-Menus.prototype.edgeStyleChange=function(a,c,b,e,d,f,k,h){return this.showIconOnly(a.addItem(c,h,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph;a.stopEditing(!1);a.getModel().beginUpdate();try{for(var c=a.getSelectionCells(),d=[],f=0;f<c.length;f++){var h=c[f];if(a.getModel().isEdge(h)){if(k){var r=a.getCellGeometry(h);null!=r&&(r=r.clone(),r.points=null,a.getModel().setGeometry(h,r))}for(var u=0;u<b.length;u++)a.setCellStyles(b[u],e[u],[h]);d.push(h)}}this.editorUi.fireEvent(new mxEventObject("styleChanged",
+Menus.prototype.addInsertTableItem=function(a,c,b,e){function d(a,b){for(var c=["<table>"],d=0;d<a;d++){c.push("<tr>");for(var e=0;e<b;e++)c.push("<td><br></td>");c.push("</tr>")}c.push("</table>");return c.join("")}function f(a){g=k.getParentByName(mxEvent.getSource(a),"TD");var b=!1;if(null!=g){h=k.getParentByName(g,"TR");for(var c=mxEvent.isMouseEvent(a)?2:4,d=p,e=Math.min(20,h.sectionRowIndex+c),c=Math.min(20,g.cellIndex+c),f=d.rows.length;f<e;f++)for(var l=d.insertRow(f),m=0;m<d.rows[0].cells.length;m++)l.insertCell(-1);
+for(f=0;f<d.rows.length;f++)for(l=d.rows[f],m=l.cells.length;m<c;m++)l.insertCell(-1);q.innerHTML=g.cellIndex+1+"x"+(h.sectionRowIndex+1);for(d=0;d<p.rows.length;d++)for(e=p.rows[d],c=0;c<e.cells.length;c++)f=e.cells[c],d==h.sectionRowIndex&&c==g.cellIndex&&(b="blue"==f.style.backgroundColor),f.style.backgroundColor=d<=h.sectionRowIndex&&c<=g.cellIndex?"blue":"transparent"}mxEvent.consume(a);return b}e=null!=e?e:!0;c=null!=c?c:mxUtils.bind(this,function(a,b,c){var e=this.editorUi.editor.graph;a=e.getParentByName(mxEvent.getSource(a),
+"TD");if(null!=a&&null!=e.cellEditor.textarea){e.getParentByName(a,"TR");var f=e.cellEditor.textarea.getElementsByTagName("table");a=[];for(var g=0;g<f.length;g++)a.push(f[g]);e.container.focus();e.pasteHtmlAtCaret(d(b,c));b=e.cellEditor.textarea.getElementsByTagName("table");if(b.length==a.length+1)for(g=b.length-1;0<=g;g--)if(0==g||b[g]!=a[g-1]){e.selectNode(b[g].rows[0].cells[0]);break}}});var k=this.editorUi.editor.graph,h=null,g=null;a=a.addItem("",null,null,b,null,null,null,!0);a.firstChild.style.fontSize=
+Menus.prototype.defaultFontSize+"px";a.firstChild.innerHTML="";var l=document.createElement("input");l.setAttribute("id","geTitleOption");l.setAttribute("type","checkbox");b=document.createElement("label");mxUtils.write(b,mxResources.get("title"));b.setAttribute("for","geTitleOption");mxEvent.addGestureListeners(b,null,null,mxUtils.bind(this,function(a){mxEvent.consume(a)}));mxEvent.addGestureListeners(l,null,null,mxUtils.bind(this,function(a){mxEvent.consume(a)}));var m=document.createElement("input");
+m.setAttribute("id","geContainerOption");m.setAttribute("type","checkbox");var n=document.createElement("label");mxUtils.write(n,mxResources.get("container"));n.setAttribute("for","geContainerOption");mxEvent.addGestureListeners(n,null,null,mxUtils.bind(this,function(a){mxEvent.consume(a)}));mxEvent.addGestureListeners(m,null,null,mxUtils.bind(this,function(a){mxEvent.consume(a)}));e&&(a.firstChild.appendChild(l),a.firstChild.appendChild(b),mxUtils.br(a.firstChild),a.firstChild.appendChild(m),a.firstChild.appendChild(n),
+mxUtils.br(a.firstChild),mxUtils.br(a.firstChild));var p=function(a,b){var c=document.createElement("table");c.setAttribute("border","1");c.style.borderCollapse="collapse";c.style.borderStyle="solid";c.setAttribute("cellPadding","8");for(var d=0;d<a;d++)for(var e=c.insertRow(d),f=0;f<b;f++)e.insertCell(-1);return c}(5,5);a.firstChild.appendChild(p);var q=document.createElement("div");q.style.padding="4px";q.innerHTML="1x1";a.firstChild.appendChild(q);mxEvent.addGestureListeners(p,null,null,mxUtils.bind(this,
+function(a){var b=f(a);null!=g&&null!=h&&b&&(c(a,h.sectionRowIndex+1,g.cellIndex+1,l.checked,m.checked),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0))}));mxEvent.addListener(p,"mouseover",f)};
+Menus.prototype.edgeStyleChange=function(a,c,b,e,d,f,k,h){return this.showIconOnly(a.addItem(c,h,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph;a.stopEditing(!1);a.getModel().beginUpdate();try{for(var c=a.getSelectionCells(),d=[],f=0;f<c.length;f++){var h=c[f];if(a.getModel().isEdge(h)){if(k){var q=a.getCellGeometry(h);null!=q&&(q=q.clone(),q.points=null,a.getModel().setGeometry(h,q))}for(var t=0;t<b.length;t++)a.setCellStyles(b[t],e[t],[h]);d.push(h)}}this.editorUi.fireEvent(new mxEventObject("styleChanged",
"keys",b,"values",e,"cells",d))}finally{a.getModel().endUpdate()}}),f,d))};Menus.prototype.showIconOnly=function(a){var c=a.getElementsByTagName("td");for(i=0;i<c.length;i++)"mxPopupMenuItem"==c[i].getAttribute("class")&&(c[i].style.display="none");return a};
Menus.prototype.styleChange=function(a,c,b,e,d,f,k,h,g){var l=this.createStyleChangeFunction(b,e);a=a.addItem(c,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph;null!=k&&a.cellEditor.isContentEditing()?k():l(h)}),f,d);g&&this.showIconOnly(a);return a};
Menus.prototype.createStyleChangeFunction=function(a,c){return mxUtils.bind(this,function(b){var e=this.editorUi.editor.graph;e.stopEditing(!1);e.getModel().beginUpdate();try{for(var d=e.getEditableCells(e.getSelectionCells()),f=!1,k=0;k<a.length;k++)if(e.setCellStyles(a[k],c[k],d),a[k]==mxConstants.STYLE_ALIGN&&e.updateLabelElements(d,function(a){a.removeAttribute("align");a.style.textAlign=null}),a[k]==mxConstants.STYLE_FONTFAMILY||"fontSource"==a[k])f=!0;if(f)for(f=0;f<d.length;f++)0==e.model.getChildCount(d[f])&&
@@ -3625,55 +3647,55 @@ f.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(f,a
Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+0+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+0+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog=function(a,c,b,e){function d(){var b=k.value;/(^#?[a-zA-Z0-9]*$)/.test(b)?("none"!=
b&&"#"!=b.charAt(0)&&(b="#"+b),ColorDialog.addRecentColor("none"!=b?b.substring(1):b,12),h(b),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})}function f(){var a=m(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);a.style.marginBottom="8px";return a}this.editorUi=a;var k=document.createElement("input");k.style.marginBottom="10px";mxClient.IS_IE&&(k.style.marginTop="10px",document.body.appendChild(k));var h=null!=b?b:this.createApplyFunction();
this.init=function(){mxClient.IS_TOUCH||k.focus()};var g=new mxJSColor.color(k);g.pickerOnfocus=!1;g.showPicker();b=document.createElement("div");mxJSColor.picker.box.style.position="relative";mxJSColor.picker.box.style.width="230px";mxJSColor.picker.box.style.height="100px";mxJSColor.picker.box.style.paddingBottom="10px";b.appendChild(mxJSColor.picker.box);var l=document.createElement("center"),m=mxUtils.bind(this,function(a,b,c,e){b=null!=b?b:12;var h=document.createElement("table");h.style.borderCollapse=
-"collapse";h.setAttribute("cellspacing","0");h.style.marginBottom="20px";h.style.cellSpacing="0px";var m=document.createElement("tbody");h.appendChild(m);for(var n=a.length/b,p=0;p<n;p++){for(var r=document.createElement("tr"),t=0;t<b;t++)mxUtils.bind(this,function(a){var b=document.createElement("td");b.style.border="1px solid black";b.style.padding="0px";b.style.width="16px";b.style.height="16px";null==a&&(a=c);if("none"==a)b.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null!=
-a){b.style.backgroundColor="#"+a;var e=this.colorNames[a.toUpperCase()];null!=e&&b.setAttribute("title",e)}r.appendChild(b);null!=a&&(b.style.cursor="pointer",mxEvent.addListener(b,"click",function(){"none"==a?(g.fromString("ffffff"),k.value="none"):g.fromString(a)}),mxEvent.addListener(b,"dblclick",d))})(a[p*b+t]);m.appendChild(r)}e&&(a=document.createElement("td"),a.setAttribute("title",mxResources.get("reset")),a.style.border="1px solid black",a.style.padding="0px",a.style.width="16px",a.style.height=
-"16px",a.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",a.style.backgroundPosition="center center",a.style.backgroundRepeat="no-repeat",a.style.cursor="pointer",r.appendChild(a),mxEvent.addListener(a,"click",function(){ColorDialog.resetRecentColors();h.parentNode.replaceChild(f(),h)}));l.appendChild(h);return h});b.appendChild(k);if(mxClient.IS_IE||mxClient.IS_IE11)k.style.width="216px";else{k.style.width="176px";var n=document.createElement("input");n.setAttribute("type","color");
+"collapse";h.setAttribute("cellspacing","0");h.style.marginBottom="20px";h.style.cellSpacing="0px";var m=document.createElement("tbody");h.appendChild(m);for(var n=a.length/b,p=0;p<n;p++){for(var q=document.createElement("tr"),t=0;t<b;t++)mxUtils.bind(this,function(a){var b=document.createElement("td");b.style.border="1px solid black";b.style.padding="0px";b.style.width="16px";b.style.height="16px";null==a&&(a=c);if("none"==a)b.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null!=
+a){b.style.backgroundColor="#"+a;var e=this.colorNames[a.toUpperCase()];null!=e&&b.setAttribute("title",e)}q.appendChild(b);null!=a&&(b.style.cursor="pointer",mxEvent.addListener(b,"click",function(){"none"==a?(g.fromString("ffffff"),k.value="none"):g.fromString(a)}),mxEvent.addListener(b,"dblclick",d))})(a[p*b+t]);m.appendChild(q)}e&&(a=document.createElement("td"),a.setAttribute("title",mxResources.get("reset")),a.style.border="1px solid black",a.style.padding="0px",a.style.width="16px",a.style.height=
+"16px",a.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",a.style.backgroundPosition="center center",a.style.backgroundRepeat="no-repeat",a.style.cursor="pointer",q.appendChild(a),mxEvent.addListener(a,"click",function(){ColorDialog.resetRecentColors();h.parentNode.replaceChild(f(),h)}));l.appendChild(h);return h});b.appendChild(k);if(mxClient.IS_IE||mxClient.IS_IE11)k.style.width="216px";else{k.style.width="176px";var n=document.createElement("input");n.setAttribute("type","color");
n.style.visibility="hidden";n.style.width="0px";n.style.height="0px";n.style.border="none";n.style.marginLeft="10px";b.appendChild(n);b.appendChild(mxUtils.button("...",function(){document.activeElement==n?k.focus():(n.value="#"+k.value,n.click())}));mxEvent.addListener(n,"input",function(){g.fromString(n.value.substring(1))})}mxUtils.br(b);f();var p=m(this.presetColors);p.style.marginBottom="8px";p=m(this.defaultColors);p.style.marginBottom="16px";b.appendChild(l);p=document.createElement("div");
-p.style.textAlign="right";p.style.whiteSpace="nowrap";var r=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=e&&e()});r.className="geBtn";a.editor.cancelFirst&&p.appendChild(r);var u=mxUtils.button(mxResources.get("apply"),d);u.className="geBtn gePrimaryBtn";p.appendChild(u);a.editor.cancelFirst||p.appendChild(r);null!=c&&("none"==c?(g.fromString("ffffff"),k.value="none"):g.fromString(c));b.appendChild(p);this.picker=g;this.colorInput=k;mxEvent.addListener(b,"keydown",function(b){27==
+p.style.textAlign="right";p.style.whiteSpace="nowrap";var q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=e&&e()});q.className="geBtn";a.editor.cancelFirst&&p.appendChild(q);var t=mxUtils.button(mxResources.get("apply"),d);t.className="geBtn gePrimaryBtn";p.appendChild(t);a.editor.cancelFirst||p.appendChild(q);null!=c&&("none"==c?(g.fromString("ffffff"),k.value="none"):g.fromString(c));b.appendChild(p);this.picker=g;this.colorInput=k;mxEvent.addListener(b,"keydown",function(b){27==
b.keyCode&&(a.hideDialog(),null!=e&&e(),mxEvent.consume(b))});this.container=b};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");ColorDialog.prototype.colorNames={};ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" ");
ColorDialog.prototype.createApplyFunction=function(){return mxUtils.bind(this,function(a){var c=this.editorUi.editor.graph;c.getModel().beginUpdate();try{c.setCellStyles(this.currentColorKey,a),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[this.currentColorKey],"values",[a],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}})};ColorDialog.recentColors=[];
ColorDialog.addRecentColor=function(a,c){null!=a&&(mxUtils.remove(a,ColorDialog.recentColors),ColorDialog.recentColors.splice(0,0,a),ColorDialog.recentColors.length>=c&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]};
var AboutDialog=function(a){var c=document.createElement("div");c.setAttribute("align","center");var b=document.createElement("h3");mxUtils.write(b,mxResources.get("about")+" GraphEditor");c.appendChild(b);b=document.createElement("img");b.style.border="0px";b.setAttribute("width","176");b.setAttribute("width","151");b.setAttribute("src",IMAGE_PATH+"/logo.png");c.appendChild(b);mxUtils.br(c);mxUtils.write(c,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(c);b=document.createElement("a");b.setAttribute("href",
-"http://www.jgraph.com/");b.setAttribute("target","_blank");mxUtils.write(b,"www.jgraph.com");c.appendChild(b);mxUtils.br(c);mxUtils.br(c);b=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});b.className="geBtn gePrimaryBtn";c.appendChild(b);this.container=c},TextareaDialog=function(a,c,b,e,d,f,k,h,g,l,m,n,p,r){k=null!=k?k:300;h=null!=h?h:120;l=null!=l?l:!1;var u,t,v=document.createElement("table"),y=document.createElement("tbody");u=document.createElement("tr");t=document.createElement("td");
-t.style.fontSize="10pt";t.style.width="100px";mxUtils.write(t,c);u.appendChild(t);y.appendChild(u);u=document.createElement("tr");t=document.createElement("td");var x=document.createElement("textarea");m&&x.setAttribute("wrap","off");x.setAttribute("spellcheck","false");x.setAttribute("autocorrect","off");x.setAttribute("autocomplete","off");x.setAttribute("autocapitalize","off");mxUtils.write(x,b||"");x.style.resize="none";x.style.width=k+"px";x.style.height=h+"px";this.textarea=x;this.init=function(){x.focus();
-x.scrollTop=0};t.appendChild(x);u.appendChild(t);y.appendChild(u);u=document.createElement("tr");t=document.createElement("td");t.style.paddingTop="14px";t.style.whiteSpace="nowrap";t.setAttribute("align","right");null!=p&&(c=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(p)}),c.className="geBtn",t.appendChild(c));if(null!=r)for(c=0;c<r.length;c++)(function(a,b){var c=mxUtils.button(a,function(a){b(a,x)});c.className="geBtn";t.appendChild(c)})(r[c][0],r[c][1]);f=mxUtils.button(f||
-mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d()});f.className="geBtn";a.editor.cancelFirst&&t.appendChild(f);null!=g&&g(t,x);null!=e&&(g=mxUtils.button(n||mxResources.get("apply"),function(){l||a.hideDialog();e(x.value)}),g.className="geBtn gePrimaryBtn",t.appendChild(g));a.editor.cancelFirst||t.appendChild(f);u.appendChild(t);y.appendChild(u);v.appendChild(y);this.container=v},EditDiagramDialog=function(a){var c=document.createElement("div");c.style.textAlign="right";var b=document.createElement("textarea");
+"http://www.jgraph.com/");b.setAttribute("target","_blank");mxUtils.write(b,"www.jgraph.com");c.appendChild(b);mxUtils.br(c);mxUtils.br(c);b=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});b.className="geBtn gePrimaryBtn";c.appendChild(b);this.container=c},TextareaDialog=function(a,c,b,e,d,f,k,h,g,l,m,n,p,q){k=null!=k?k:300;h=null!=h?h:120;l=null!=l?l:!1;var t,v,u=document.createElement("table"),w=document.createElement("tbody");t=document.createElement("tr");v=document.createElement("td");
+v.style.fontSize="10pt";v.style.width="100px";mxUtils.write(v,c);t.appendChild(v);w.appendChild(t);t=document.createElement("tr");v=document.createElement("td");var x=document.createElement("textarea");m&&x.setAttribute("wrap","off");x.setAttribute("spellcheck","false");x.setAttribute("autocorrect","off");x.setAttribute("autocomplete","off");x.setAttribute("autocapitalize","off");mxUtils.write(x,b||"");x.style.resize="none";x.style.width=k+"px";x.style.height=h+"px";this.textarea=x;this.init=function(){x.focus();
+x.scrollTop=0};v.appendChild(x);t.appendChild(v);w.appendChild(t);t=document.createElement("tr");v=document.createElement("td");v.style.paddingTop="14px";v.style.whiteSpace="nowrap";v.setAttribute("align","right");null!=p&&(c=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(p)}),c.className="geBtn",v.appendChild(c));if(null!=q)for(c=0;c<q.length;c++)(function(a,b){var c=mxUtils.button(a,function(a){b(a,x)});c.className="geBtn";v.appendChild(c)})(q[c][0],q[c][1]);f=mxUtils.button(f||
+mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d()});f.className="geBtn";a.editor.cancelFirst&&v.appendChild(f);null!=g&&g(v,x);null!=e&&(g=mxUtils.button(n||mxResources.get("apply"),function(){l||a.hideDialog();e(x.value)}),g.className="geBtn gePrimaryBtn",v.appendChild(g));a.editor.cancelFirst||v.appendChild(f);t.appendChild(v);w.appendChild(t);u.appendChild(w);this.container=u},EditDiagramDialog=function(a){var c=document.createElement("div");c.style.textAlign="right";var b=document.createElement("textarea");
b.setAttribute("wrap","off");b.setAttribute("spellcheck","false");b.setAttribute("autocorrect","off");b.setAttribute("autocomplete","off");b.setAttribute("autocapitalize","off");b.style.overflow="auto";b.style.resize="none";b.style.width="600px";b.style.height="360px";b.style.marginBottom="16px";b.value=mxUtils.getPrettyXml(a.editor.getGraphXml());c.appendChild(b);this.init=function(){b.focus()};Graph.fileSupport&&(b.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},
!1),b.addEventListener("drop",function(c){c.stopPropagation();c.preventDefault();if(0<c.dataTransfer.files.length){c=c.dataTransfer.files[0];var d=new FileReader;d.onload=function(a){b.value=a.target.result};d.readAsText(c)}else b.value=a.extractGraphModelFromEvent(c)},!1));var e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&c.appendChild(e);var d=document.createElement("select");d.style.width="180px";d.className="geBtn";if(a.editor.graph.isEnabled()){var f=
document.createElement("option");f.setAttribute("value","replace");mxUtils.write(f,mxResources.get("replaceExistingDrawing"));d.appendChild(f)}f=document.createElement("option");f.setAttribute("value","new");mxUtils.write(f,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&d.appendChild(f);a.editor.graph.isEnabled()&&(f=document.createElement("option"),f.setAttribute("value","import"),mxUtils.write(f,mxResources.get("addToExistingDrawing")),d.appendChild(f));c.appendChild(d);
f=mxUtils.button(mxResources.get("ok"),function(){var c=Graph.zapGremlins(mxUtils.trim(b.value)),e=null;if("new"==d.value)a.hideDialog(),a.editor.editAsNew(c);else if("replace"==d.value){a.editor.graph.model.beginUpdate();try{a.editor.setGraphXml(mxUtils.parseXml(c).documentElement),a.hideDialog()}catch(n){e=n}finally{a.editor.graph.model.endUpdate()}}else if("import"==d.value){a.editor.graph.model.beginUpdate();try{var f=mxUtils.parseXml(c),l=new mxGraphModel;(new mxCodec(f)).decode(f.documentElement,
l);var m=l.getChildren(l.getChildAt(l.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(m));a.hideDialog()}catch(n){e=n}finally{a.editor.graph.model.endUpdate()}}null!=e&&mxUtils.alert(e.message)});f.className="geBtn gePrimaryBtn";c.appendChild(f);a.editor.cancelFirst||c.appendChild(e);this.container=c};EditDiagramDialog.showNewWindowOption=!0;
-var ExportDialog=function(a){function c(){var a=m.value,b=a.lastIndexOf(".");m.value=0<b?a.substring(0,b+1)+n.value:a+"."+n.value;"xml"===n.value?(p.setAttribute("disabled","true"),r.setAttribute("disabled","true"),u.setAttribute("disabled","true"),E.setAttribute("disabled","true")):(p.removeAttribute("disabled"),r.removeAttribute("disabled"),u.removeAttribute("disabled"),E.removeAttribute("disabled"));"png"===n.value||"svg"===n.value||"pdf"===n.value?x.removeAttribute("disabled"):x.setAttribute("disabled",
-"disabled");"png"===n.value||"jpg"===n.value||"pdf"===n.value?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled");"png"===n.value?(t.removeAttribute("disabled"),v.removeAttribute("disabled")):(t.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"))}function b(){r.style.backgroundColor=r.value*u.value>MAX_AREA||0>=r.value?"red":"";u.style.backgroundColor=r.value*u.value>MAX_AREA||0>=u.value?"red":""}var e=a.editor.graph,d=e.getGraphBounds(),f=e.view.scale,k=Math.ceil(d.width/
+var ExportDialog=function(a){function c(){var a=m.value,b=a.lastIndexOf(".");m.value=0<b?a.substring(0,b+1)+n.value:a+"."+n.value;"xml"===n.value?(p.setAttribute("disabled","true"),q.setAttribute("disabled","true"),t.setAttribute("disabled","true"),E.setAttribute("disabled","true")):(p.removeAttribute("disabled"),q.removeAttribute("disabled"),t.removeAttribute("disabled"),E.removeAttribute("disabled"));"png"===n.value||"svg"===n.value||"pdf"===n.value?x.removeAttribute("disabled"):x.setAttribute("disabled",
+"disabled");"png"===n.value||"jpg"===n.value||"pdf"===n.value?A.removeAttribute("disabled"):A.setAttribute("disabled","disabled");"png"===n.value?(v.removeAttribute("disabled"),u.removeAttribute("disabled")):(v.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"))}function b(){q.style.backgroundColor=q.value*t.value>MAX_AREA||0>=q.value?"red":"";t.style.backgroundColor=q.value*t.value>MAX_AREA||0>=t.value?"red":""}var e=a.editor.graph,d=e.getGraphBounds(),f=e.view.scale,k=Math.ceil(d.width/
f),h=Math.ceil(d.height/f),g,f=document.createElement("table"),l=document.createElement("tbody");f.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");d=document.createElement("tr");g=document.createElement("td");g.style.fontSize="10pt";g.style.width="100px";mxUtils.write(g,mxResources.get("filename")+":");d.appendChild(g);var m=document.createElement("input");m.setAttribute("value",a.editor.getOrCreateFilename());m.style.width="180px";g=document.createElement("td");g.appendChild(m);d.appendChild(g);
l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("format")+":");d.appendChild(g);var n=document.createElement("select");n.style.width="180px";g=document.createElement("option");g.setAttribute("value","png");mxUtils.write(g,mxResources.get("formatPng"));n.appendChild(g);g=document.createElement("option");ExportDialog.showGifOption&&(g.setAttribute("value","gif"),mxUtils.write(g,mxResources.get("formatGif")),n.appendChild(g));
g=document.createElement("option");g.setAttribute("value","jpg");mxUtils.write(g,mxResources.get("formatJpg"));n.appendChild(g);g=document.createElement("option");g.setAttribute("value","pdf");mxUtils.write(g,mxResources.get("formatPdf"));n.appendChild(g);g=document.createElement("option");g.setAttribute("value","svg");mxUtils.write(g,mxResources.get("formatSvg"));n.appendChild(g);ExportDialog.showXmlOption&&(g=document.createElement("option"),g.setAttribute("value","xml"),mxUtils.write(g,mxResources.get("formatXml")),
n.appendChild(g));g=document.createElement("td");g.appendChild(n);d.appendChild(g);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("zoom")+" (%):");d.appendChild(g);var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("value","100");p.style.width="180px";g=document.createElement("td");g.appendChild(p);d.appendChild(g);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");
-g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("width")+":");d.appendChild(g);var r=document.createElement("input");r.setAttribute("value",k);r.style.width="180px";g=document.createElement("td");g.appendChild(r);d.appendChild(g);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("height")+":");d.appendChild(g);var u=document.createElement("input");u.setAttribute("value",h);u.style.width="180px";g=document.createElement("td");
-g.appendChild(u);d.appendChild(g);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("dpi")+":");d.appendChild(g);var t=document.createElement("select");t.style.width="180px";g=document.createElement("option");g.setAttribute("value","100");mxUtils.write(g,"100dpi");t.appendChild(g);g=document.createElement("option");g.setAttribute("value","200");mxUtils.write(g,"200dpi");t.appendChild(g);g=document.createElement("option");
-g.setAttribute("value","300");mxUtils.write(g,"300dpi");t.appendChild(g);g=document.createElement("option");g.setAttribute("value","400");mxUtils.write(g,"400dpi");t.appendChild(g);g=document.createElement("option");g.setAttribute("value","custom");mxUtils.write(g,mxResources.get("custom"));t.appendChild(g);var v=document.createElement("input");v.style.width="180px";v.style.display="none";v.setAttribute("value","100");v.setAttribute("type","number");v.setAttribute("min","50");v.setAttribute("step",
-"50");var y=!1;mxEvent.addListener(t,"change",function(){"custom"==this.value?(this.style.display="none",v.style.display="",v.focus()):(v.value=this.value,y||(p.value=this.value))});mxEvent.addListener(v,"change",function(){var a=parseInt(v.value);isNaN(a)||0>=a?v.style.backgroundColor="red":(v.style.backgroundColor="",y||(p.value=a))});g=document.createElement("td");g.appendChild(t);g.appendChild(v);d.appendChild(g);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");g.style.fontSize=
-"10pt";mxUtils.write(g,mxResources.get("background")+":");d.appendChild(g);var x=document.createElement("input");x.setAttribute("type","checkbox");x.checked=null==e.background||e.background==mxConstants.NONE;g=document.createElement("td");g.appendChild(x);mxUtils.write(g,mxResources.get("transparent"));d.appendChild(g);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("grid")+":");d.appendChild(g);var B=document.createElement("input");
-B.setAttribute("type","checkbox");B.checked=!1;g=document.createElement("td");g.appendChild(B);d.appendChild(g);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("borderWidth")+":");d.appendChild(g);var E=document.createElement("input");E.setAttribute("type","number");E.setAttribute("value",ExportDialog.lastBorderValue);E.style.width="180px";g=document.createElement("td");g.appendChild(E);d.appendChild(g);l.appendChild(d);
-f.appendChild(l);mxEvent.addListener(n,"change",c);c();mxEvent.addListener(p,"change",function(){y=!0;var a=Math.max(0,parseFloat(p.value)||100)/100;p.value=parseFloat((100*a).toFixed(2));0<k?(r.value=Math.floor(k*a),u.value=Math.floor(h*a)):(p.value="100",r.value=k,u.value=h);b()});mxEvent.addListener(r,"change",function(){var a=parseInt(r.value)/k;0<a?(p.value=parseFloat((100*a).toFixed(2)),u.value=Math.floor(h*a)):(p.value="100",r.value=k,u.value=h);b()});mxEvent.addListener(u,"change",function(){var a=
-parseInt(u.value)/h;0<a?(p.value=parseFloat((100*a).toFixed(2)),r.value=Math.floor(k*a)):(p.value="100",r.value=k,u.value=h);b()});d=document.createElement("tr");g=document.createElement("td");g.setAttribute("align","right");g.style.paddingTop="22px";g.colSpan=2;var G=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(p.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var b=m.value,c=n.value,d=Math.max(0,parseFloat(p.value)||100)/100,f=Math.max(0,parseInt(E.value)),
-g=e.background,h=Math.max(1,parseInt(v.value));if(("svg"==c||"png"==c||"pdf"==c)&&x.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,b,c,g,d,f,h,B.checked)}}));G.className="geBtn gePrimaryBtn";var A=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});A.className="geBtn";a.editor.cancelFirst?(g.appendChild(A),g.appendChild(G)):(g.appendChild(G),g.appendChild(A));d.appendChild(g);l.appendChild(d);f.appendChild(l);
+g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("width")+":");d.appendChild(g);var q=document.createElement("input");q.setAttribute("value",k);q.style.width="180px";g=document.createElement("td");g.appendChild(q);d.appendChild(g);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("height")+":");d.appendChild(g);var t=document.createElement("input");t.setAttribute("value",h);t.style.width="180px";g=document.createElement("td");
+g.appendChild(t);d.appendChild(g);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("dpi")+":");d.appendChild(g);var v=document.createElement("select");v.style.width="180px";g=document.createElement("option");g.setAttribute("value","100");mxUtils.write(g,"100dpi");v.appendChild(g);g=document.createElement("option");g.setAttribute("value","200");mxUtils.write(g,"200dpi");v.appendChild(g);g=document.createElement("option");
+g.setAttribute("value","300");mxUtils.write(g,"300dpi");v.appendChild(g);g=document.createElement("option");g.setAttribute("value","400");mxUtils.write(g,"400dpi");v.appendChild(g);g=document.createElement("option");g.setAttribute("value","custom");mxUtils.write(g,mxResources.get("custom"));v.appendChild(g);var u=document.createElement("input");u.style.width="180px";u.style.display="none";u.setAttribute("value","100");u.setAttribute("type","number");u.setAttribute("min","50");u.setAttribute("step",
+"50");var w=!1;mxEvent.addListener(v,"change",function(){"custom"==this.value?(this.style.display="none",u.style.display="",u.focus()):(u.value=this.value,w||(p.value=this.value))});mxEvent.addListener(u,"change",function(){var a=parseInt(u.value);isNaN(a)||0>=a?u.style.backgroundColor="red":(u.style.backgroundColor="",w||(p.value=a))});g=document.createElement("td");g.appendChild(v);g.appendChild(u);d.appendChild(g);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");g.style.fontSize=
+"10pt";mxUtils.write(g,mxResources.get("background")+":");d.appendChild(g);var x=document.createElement("input");x.setAttribute("type","checkbox");x.checked=null==e.background||e.background==mxConstants.NONE;g=document.createElement("td");g.appendChild(x);mxUtils.write(g,mxResources.get("transparent"));d.appendChild(g);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("grid")+":");d.appendChild(g);var A=document.createElement("input");
+A.setAttribute("type","checkbox");A.checked=!1;g=document.createElement("td");g.appendChild(A);d.appendChild(g);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("borderWidth")+":");d.appendChild(g);var E=document.createElement("input");E.setAttribute("type","number");E.setAttribute("value",ExportDialog.lastBorderValue);E.style.width="180px";g=document.createElement("td");g.appendChild(E);d.appendChild(g);l.appendChild(d);
+f.appendChild(l);mxEvent.addListener(n,"change",c);c();mxEvent.addListener(p,"change",function(){w=!0;var a=Math.max(0,parseFloat(p.value)||100)/100;p.value=parseFloat((100*a).toFixed(2));0<k?(q.value=Math.floor(k*a),t.value=Math.floor(h*a)):(p.value="100",q.value=k,t.value=h);b()});mxEvent.addListener(q,"change",function(){var a=parseInt(q.value)/k;0<a?(p.value=parseFloat((100*a).toFixed(2)),t.value=Math.floor(h*a)):(p.value="100",q.value=k,t.value=h);b()});mxEvent.addListener(t,"change",function(){var a=
+parseInt(t.value)/h;0<a?(p.value=parseFloat((100*a).toFixed(2)),q.value=Math.floor(k*a)):(p.value="100",q.value=k,t.value=h);b()});d=document.createElement("tr");g=document.createElement("td");g.setAttribute("align","right");g.style.paddingTop="22px";g.colSpan=2;var H=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(p.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var b=m.value,c=n.value,d=Math.max(0,parseFloat(p.value)||100)/100,f=Math.max(0,parseInt(E.value)),
+g=e.background,h=Math.max(1,parseInt(u.value));if(("svg"==c||"png"==c||"pdf"==c)&&x.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,b,c,g,d,f,h,A.checked)}}));H.className="geBtn gePrimaryBtn";var B=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});B.className="geBtn";a.editor.cancelFirst?(g.appendChild(B),g.appendChild(H)):(g.appendChild(H),g.appendChild(B));d.appendChild(g);l.appendChild(d);f.appendChild(l);
this.container=f};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;
ExportDialog.exportFile=function(a,c,b,e,d,f,k,h){h=a.editor.graph;if("xml"==b)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),c,b);else if("svg"==b)ExportDialog.saveLocalFile(a,mxUtils.getXml(h.getSvg(e,d,f)),c,b);else{var g=h.getGraphBounds(),l=mxUtils.createXmlDocument(),m=l.createElement("output");l.appendChild(m);l=new mxXmlCanvas2D(m);l.translate(Math.floor((f/d-g.x)/h.view.scale),Math.floor((f/d-g.y)/h.view.scale));l.scale(d/h.view.scale);(new mxImageExport).drawState(h.getView().getState(h.model.root),
l);m="xml="+encodeURIComponent(mxUtils.getXml(m));l=Math.ceil(g.width*d/h.view.scale+2*f);d=Math.ceil(g.height*d/h.view.scale+2*f);m.length<=MAX_REQUEST_SIZE&&l*d<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+b+"&filename="+encodeURIComponent(c)+"&bg="+(null!=e?e:"none")+"&w="+l+"&h="+d+"&"+m+"&dpi="+k)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
ExportDialog.saveLocalFile=function(a,c,b,e){c.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+"&format="+e)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))};
-var EditDataDialog=function(a,c){function b(){0<B.value.length?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled")}var e=document.createElement("div"),d=a.editor.graph,f=d.getModel().getValue(c);if(!mxUtils.isNode(f)){var k=mxUtils.createXmlDocument().createElement("object");k.setAttribute("label",f||"");f=k}var h={};try{var g=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(c),"metaData",null);null!=g&&(h=JSON.parse(g))}catch(A){}var l=new mxForm("properties");l.table.style.width=
-"100%";for(var m=f.attributes,n=[],p=[],r=0,u=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,c):null,t=function(a,b){var c=document.createElement("div");c.style.position="relative";c.style.paddingRight="20px";c.style.boxSizing="border-box";c.style.width="100%";var d=document.createElement("a"),e=mxUtils.createImage(Dialog.prototype.closeImage);e.style.height="9px";e.style.fontSize="9px";e.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";d.className="geButton";d.setAttribute("title",
-mxResources.get("delete"));d.style.position="absolute";d.style.top="4px";d.style.right="0px";d.style.margin="0px";d.style.width="9px";d.style.height="9px";d.style.cursor="pointer";d.appendChild(e);e=function(a){return function(){for(var b=0,c=0;c<n.length;c++){if(n[c]==a){p[c]=null;l.table.deleteRow(b+(null!=u?1:0));break}null!=p[c]&&b++}}}(b);mxEvent.addListener(d,"click",e);e=a.parentNode;c.appendChild(a);c.appendChild(d);e.appendChild(c)},k=function(a,b,c){n[a]=b;p[a]=l.addTextarea(n[r]+":",c,
-2);p[a].style.width="100%";0<c.indexOf("\n")&&p[a].setAttribute("rows","2");t(p[a],b);null!=h[b]&&0==h[b].editable&&p[a].setAttribute("disabled","disabled")},g=[],v=d.getModel().getParent(c)==d.getModel().getRoot(),y=0;y<m.length;y++)!v&&"label"==m[y].nodeName||"placeholders"==m[y].nodeName||g.push({name:m[y].nodeName,value:m[y].nodeValue});g.sort(function(a,b){return a.name<b.name?-1:a.name>b.name?1:0});if(null!=u){m=document.createElement("div");m.style.width="100%";m.style.fontSize="11px";m.style.textAlign=
-"center";mxUtils.write(m,u);var x=l.addField(mxResources.get("id")+":",m);mxEvent.addListener(m,"dblclick",function(b){mxEvent.isShiftDown(b)&&(b=new FilenameDialog(a,u,mxResources.get("apply"),mxUtils.bind(this,function(b){null!=b&&0<b.length&&b!=u&&(null==d.getModel().getCell(b)?(d.getModel().cellRemoved(c),c.setId(b),u=b,x.innerHTML=mxUtils.htmlEntities(b),d.getModel().cellAdded(c)):a.handleError({message:mxResources.get("alreadyExst",[b])}))}),mxResources.get("id")),a.showDialog(b.container,300,
-80,!0,!0),b.init())});m.setAttribute("title","Shift+Double Click to Edit ID")}for(y=0;y<g.length;y++)k(r,g[y].name,g[y].value),r++;g=document.createElement("div");g.style.cssText="position:absolute;left:30px;right:30px;overflow-y:auto;top:30px;bottom:80px;";g.appendChild(l.table);k=document.createElement("div");k.style.boxSizing="border-box";k.style.paddingRight="160px";k.style.whiteSpace="nowrap";k.style.marginTop="6px";k.style.width="100%";var B=document.createElement("input");B.setAttribute("placeholder",
-mxResources.get("enterPropertyName"));B.setAttribute("type","text");B.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");B.style.boxSizing="border-box";B.style.marginLeft="2px";B.style.width="100%";k.appendChild(B);g.appendChild(k);e.appendChild(g);var E=mxUtils.button(mxResources.get("addProperty"),function(){var a=B.value;if(0<a.length&&"label"!=a&&"placeholders"!=a&&0>a.indexOf(":"))try{var b=mxUtils.indexOf(n,a);if(0<=b&&null!=p[b])p[b].focus();else{f.cloneNode(!1).setAttribute(a,
-"");0<=b&&(n.splice(b,1),p.splice(b,1));n.push(a);var c=l.addTextarea(a+":","",2);c.style.width="100%";p.push(c);t(c,a);c.focus()}E.setAttribute("disabled","disabled");B.value=""}catch(H){mxUtils.alert(H)}else mxUtils.alert(mxResources.get("invalidName"))});this.init=function(){0<p.length?p[0].focus():B.focus()};E.setAttribute("title",mxResources.get("addProperty"));E.setAttribute("disabled","disabled");E.style.textOverflow="ellipsis";E.style.position="absolute";E.style.overflow="hidden";E.style.width=
-"144px";E.style.right="0px";E.className="geBtn";k.appendChild(E);g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});g.className="geBtn";k=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);f=f.cloneNode(!0);for(var b=!1,e=0;e<n.length;e++)null==p[e]?f.removeAttribute(n[e]):(f.setAttribute(n[e],p[e].value),b=b||"placeholder"==n[e]&&"1"==f.getAttribute("placeholders"));b&&f.removeAttribute("label");d.getModel().setValue(c,f)}catch(z){mxUtils.alert(z)}});
-k.className="geBtn gePrimaryBtn";mxEvent.addListener(B,"keyup",b);mxEvent.addListener(B,"change",b);m=document.createElement("div");m.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(c)||a.editor.graph.getModel().isEdge(c)){v=document.createElement("span");v.style.marginRight="10px";y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginRight="6px";"1"==f.getAttribute("placeholders")&&
-(y.setAttribute("checked","checked"),y.defaultChecked=!0);mxEvent.addListener(y,"click",function(){"1"==f.getAttribute("placeholders")?f.removeAttribute("placeholders"):f.setAttribute("placeholders","1")});v.appendChild(y);mxUtils.write(v,mxResources.get("placeholders"));if(null!=EditDataDialog.placeholderHelpLink){y=document.createElement("a");y.setAttribute("href",EditDataDialog.placeholderHelpLink);y.setAttribute("title",mxResources.get("help"));y.setAttribute("target","_blank");y.style.marginLeft=
-"8px";y.style.cursor="help";var G=document.createElement("img");mxUtils.setOpacity(G,50);G.style.height="16px";G.style.width="16px";G.setAttribute("border","0");G.setAttribute("valign","middle");G.style.marginTop=mxClient.IS_IE11?"0px":"-4px";G.setAttribute("src",Editor.helpImage);y.appendChild(G);v.appendChild(y)}m.appendChild(v)}a.editor.cancelFirst?(m.appendChild(g),m.appendChild(k)):(m.appendChild(k),m.appendChild(g));e.appendChild(m);this.container=e};
+var EditDataDialog=function(a,c){function b(){0<A.value.length?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled")}var e=document.createElement("div"),d=a.editor.graph,f=d.getModel().getValue(c);if(!mxUtils.isNode(f)){var k=mxUtils.createXmlDocument().createElement("object");k.setAttribute("label",f||"");f=k}var h={};try{var g=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(c),"metaData",null);null!=g&&(h=JSON.parse(g))}catch(B){}var l=new mxForm("properties");l.table.style.width=
+"100%";for(var m=f.attributes,n=[],p=[],q=0,t=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,c):null,v=function(a,b){var c=document.createElement("div");c.style.position="relative";c.style.paddingRight="20px";c.style.boxSizing="border-box";c.style.width="100%";var d=document.createElement("a"),e=mxUtils.createImage(Dialog.prototype.closeImage);e.style.height="9px";e.style.fontSize="9px";e.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";d.className="geButton";d.setAttribute("title",
+mxResources.get("delete"));d.style.position="absolute";d.style.top="4px";d.style.right="0px";d.style.margin="0px";d.style.width="9px";d.style.height="9px";d.style.cursor="pointer";d.appendChild(e);e=function(a){return function(){for(var b=0,c=0;c<n.length;c++){if(n[c]==a){p[c]=null;l.table.deleteRow(b+(null!=t?1:0));break}null!=p[c]&&b++}}}(b);mxEvent.addListener(d,"click",e);e=a.parentNode;c.appendChild(a);c.appendChild(d);e.appendChild(c)},k=function(a,b,c){n[a]=b;p[a]=l.addTextarea(n[q]+":",c,
+2);p[a].style.width="100%";0<c.indexOf("\n")&&p[a].setAttribute("rows","2");v(p[a],b);null!=h[b]&&0==h[b].editable&&p[a].setAttribute("disabled","disabled")},g=[],u=d.getModel().getParent(c)==d.getModel().getRoot(),w=0;w<m.length;w++)!u&&"label"==m[w].nodeName||"placeholders"==m[w].nodeName||g.push({name:m[w].nodeName,value:m[w].nodeValue});g.sort(function(a,b){return a.name<b.name?-1:a.name>b.name?1:0});if(null!=t){m=document.createElement("div");m.style.width="100%";m.style.fontSize="11px";m.style.textAlign=
+"center";mxUtils.write(m,t);var x=l.addField(mxResources.get("id")+":",m);mxEvent.addListener(m,"dblclick",function(b){mxEvent.isShiftDown(b)&&(b=new FilenameDialog(a,t,mxResources.get("apply"),mxUtils.bind(this,function(b){null!=b&&0<b.length&&b!=t&&(null==d.getModel().getCell(b)?(d.getModel().cellRemoved(c),c.setId(b),t=b,x.innerHTML=mxUtils.htmlEntities(b),d.getModel().cellAdded(c)):a.handleError({message:mxResources.get("alreadyExst",[b])}))}),mxResources.get("id")),a.showDialog(b.container,300,
+80,!0,!0),b.init())});m.setAttribute("title","Shift+Double Click to Edit ID")}for(w=0;w<g.length;w++)k(q,g[w].name,g[w].value),q++;g=document.createElement("div");g.style.cssText="position:absolute;left:30px;right:30px;overflow-y:auto;top:30px;bottom:80px;";g.appendChild(l.table);k=document.createElement("div");k.style.boxSizing="border-box";k.style.paddingRight="160px";k.style.whiteSpace="nowrap";k.style.marginTop="6px";k.style.width="100%";var A=document.createElement("input");A.setAttribute("placeholder",
+mxResources.get("enterPropertyName"));A.setAttribute("type","text");A.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");A.style.boxSizing="border-box";A.style.marginLeft="2px";A.style.width="100%";k.appendChild(A);g.appendChild(k);e.appendChild(g);var E=mxUtils.button(mxResources.get("addProperty"),function(){var a=A.value;if(0<a.length&&"label"!=a&&"placeholders"!=a&&0>a.indexOf(":"))try{var b=mxUtils.indexOf(n,a);if(0<=b&&null!=p[b])p[b].focus();else{f.cloneNode(!1).setAttribute(a,
+"");0<=b&&(n.splice(b,1),p.splice(b,1));n.push(a);var c=l.addTextarea(a+":","",2);c.style.width="100%";p.push(c);v(c,a);c.focus()}E.setAttribute("disabled","disabled");A.value=""}catch(I){mxUtils.alert(I)}else mxUtils.alert(mxResources.get("invalidName"))});this.init=function(){0<p.length?p[0].focus():A.focus()};E.setAttribute("title",mxResources.get("addProperty"));E.setAttribute("disabled","disabled");E.style.textOverflow="ellipsis";E.style.position="absolute";E.style.overflow="hidden";E.style.width=
+"144px";E.style.right="0px";E.className="geBtn";k.appendChild(E);g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});g.className="geBtn";k=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);f=f.cloneNode(!0);for(var b=!1,e=0;e<n.length;e++)null==p[e]?f.removeAttribute(n[e]):(f.setAttribute(n[e],p[e].value),b=b||"placeholder"==n[e]&&"1"==f.getAttribute("placeholders"));b&&f.removeAttribute("label");d.getModel().setValue(c,f)}catch(y){mxUtils.alert(y)}});
+k.className="geBtn gePrimaryBtn";mxEvent.addListener(A,"keyup",b);mxEvent.addListener(A,"change",b);m=document.createElement("div");m.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(c)||a.editor.graph.getModel().isEdge(c)){u=document.createElement("span");u.style.marginRight="10px";w=document.createElement("input");w.setAttribute("type","checkbox");w.style.marginRight="6px";"1"==f.getAttribute("placeholders")&&
+(w.setAttribute("checked","checked"),w.defaultChecked=!0);mxEvent.addListener(w,"click",function(){"1"==f.getAttribute("placeholders")?f.removeAttribute("placeholders"):f.setAttribute("placeholders","1")});u.appendChild(w);mxUtils.write(u,mxResources.get("placeholders"));if(null!=EditDataDialog.placeholderHelpLink){w=document.createElement("a");w.setAttribute("href",EditDataDialog.placeholderHelpLink);w.setAttribute("title",mxResources.get("help"));w.setAttribute("target","_blank");w.style.marginLeft=
+"8px";w.style.cursor="help";var H=document.createElement("img");mxUtils.setOpacity(H,50);H.style.height="16px";H.style.width="16px";H.setAttribute("border","0");H.setAttribute("valign","middle");H.style.marginTop=mxClient.IS_IE11?"0px":"-4px";H.setAttribute("src",Editor.helpImage);w.appendChild(H);u.appendChild(w)}m.appendChild(u)}a.editor.cancelFirst?(m.appendChild(g),m.appendChild(k)):(m.appendChild(k),m.appendChild(g));e.appendChild(m);this.container=e};
EditDataDialog.getDisplayIdForCell=function(a,c){var b=null;null!=a.editor.graph.getModel().getParent(c)&&(b=c.getId());return b};EditDataDialog.placeholderHelpLink=null;
var LinkDialog=function(a,c,b,e){var d=document.createElement("div");mxUtils.write(d,mxResources.get("editLink")+":");var f=document.createElement("div");f.className="geTitle";f.style.backgroundColor="transparent";f.style.borderColor="transparent";f.style.whiteSpace="nowrap";f.style.textOverflow="clip";f.style.cursor="default";f.style.paddingRight="20px";var k=document.createElement("input");k.setAttribute("value",c);k.setAttribute("placeholder","http://www.example.com/");k.setAttribute("type","text");
k.style.marginTop="6px";k.style.width="400px";k.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";k.style.backgroundRepeat="no-repeat";k.style.backgroundPosition="100% 50%";k.style.paddingRight="14px";c=document.createElement("div");c.setAttribute("title",mxResources.get("reset"));c.style.position="relative";c.style.left="-16px";c.style.width="12px";c.style.height="14px";c.style.cursor="pointer";c.style.display="inline-block";c.style.top="3px";c.style.background="url("+IMAGE_PATH+"/transparent.gif)";
@@ -3682,29 +3704,29 @@ c.className="geBtn";a.editor.cancelFirst&&f.appendChild(c);b=mxUtils.button(b,fu
new mxRectangle(0,0,80,80);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-("1"==urlParams.sketch?
3:48)));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var k=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",k);var h=a.createOutline(this.window);this.destroy=function(){mxEvent.removeListener(window,"resize",k);this.window.destroy();h.destroy()};this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit();h.setSuspended(!1)}));this.window.addListener(mxEvent.HIDE,
mxUtils.bind(this,function(){h.setSuspended(!0)}));this.window.addListener(mxEvent.NORMALIZE,mxUtils.bind(this,function(){h.setSuspended(!1)}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){h.setSuspended(!0)}));h.init(f);var g=a.actions.get("zoomIn"),l=a.actions.get("zoomOut");mxEvent.addMouseWheelListener(function(a,b){for(var c=!1,d=mxEvent.getSource(a);null!=d;){if(d==h.svg){c=!0;break}d=d.parentNode}c&&(b?g.funct():l.funct())})},LayersWindow=function(a,c,b,e,d){function f(b){if(g.isEnabled()&&
-null!=b){var c=g.convertValueToString(b),c=new FilenameDialog(a,c||mxResources.get("background"),mxResources.get("rename"),mxUtils.bind(this,function(a){null!=a&&g.cellLabelChanged(b,a)}),mxResources.get("enterName"));a.showDialog(c.container,300,100,!0,!0);c.init()}}function k(){var a=G.get(g.getLayerForCells(g.getSelectionCells()));null!=a?a.appendChild(A):null!=A.parentNode&&A.parentNode.removeChild(A)}function h(){function a(a,b,c,d){var e=document.createElement("div");e.className="geToolbarContainer";
-G.put(c,e);e.style.overflow="hidden";e.style.position="relative";e.style.padding="4px";e.style.height="22px";e.style.display="block";e.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";e.style.borderWidth="0px 0px 1px 0px";e.style.borderColor="#c3c3c3";e.style.borderStyle="solid";e.style.whiteSpace="nowrap";e.setAttribute("title",b);var h=document.createElement("div");h.style.display="inline-block";h.style.width="100%";h.style.textOverflow="ellipsis";h.style.overflow="hidden";
-mxEvent.addListener(e,"dragover",function(b){b.dataTransfer.dropEffect="move";r=a;b.stopPropagation();b.preventDefault()});mxEvent.addListener(e,"dragstart",function(a){p=e;mxClient.IS_FF&&a.dataTransfer.setData("Text","<layer/>")});mxEvent.addListener(e,"dragend",function(a){null!=p&&null!=r&&g.addCell(c,g.model.root,r);r=p=null;a.stopPropagation();a.preventDefault()});var k=document.createElement("img");k.setAttribute("draggable","false");k.setAttribute("align","top");k.setAttribute("border","0");
+null!=b){var c=g.convertValueToString(b),c=new FilenameDialog(a,c||mxResources.get("background"),mxResources.get("rename"),mxUtils.bind(this,function(a){null!=a&&g.cellLabelChanged(b,a)}),mxResources.get("enterName"));a.showDialog(c.container,300,100,!0,!0);c.init()}}function k(){var a=H.get(g.getLayerForCells(g.getSelectionCells()));null!=a?a.appendChild(B):null!=B.parentNode&&B.parentNode.removeChild(B)}function h(){function a(a,b,c,d){var e=document.createElement("div");e.className="geToolbarContainer";
+H.put(c,e);e.style.overflow="hidden";e.style.position="relative";e.style.padding="4px";e.style.height="22px";e.style.display="block";e.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";e.style.borderWidth="0px 0px 1px 0px";e.style.borderColor="#c3c3c3";e.style.borderStyle="solid";e.style.whiteSpace="nowrap";e.setAttribute("title",b);var h=document.createElement("div");h.style.display="inline-block";h.style.width="100%";h.style.textOverflow="ellipsis";h.style.overflow="hidden";
+mxEvent.addListener(e,"dragover",function(b){b.dataTransfer.dropEffect="move";q=a;b.stopPropagation();b.preventDefault()});mxEvent.addListener(e,"dragstart",function(a){p=e;mxClient.IS_FF&&a.dataTransfer.setData("Text","<layer/>")});mxEvent.addListener(e,"dragend",function(a){null!=p&&null!=q&&g.addCell(c,g.model.root,q);q=p=null;a.stopPropagation();a.preventDefault()});var k=document.createElement("img");k.setAttribute("draggable","false");k.setAttribute("align","top");k.setAttribute("border","0");
k.style.width="16px";k.style.padding="0px 6px 0 4px";k.style.marginTop="2px";k.style.cursor="pointer";k.setAttribute("title",mxResources.get(g.model.isVisible(c)?"hide":"show"));g.model.isVisible(c)?(k.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(e,75)):(k.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(e,25));Editor.isDarkMode()&&(k.style.filter="invert(100%)");h.appendChild(k);mxEvent.addListener(k,"click",function(a){g.model.setVisible(c,!g.model.isVisible(c));mxEvent.consume(a)});
k=document.createElement("img");k.setAttribute("draggable","false");k.setAttribute("align","top");k.setAttribute("border","0");k.style.width="16px";k.style.padding="0px 6px 0 0";k.style.marginTop="2px";k.setAttribute("title",mxResources.get("lockUnlock"));var l=g.getCurrentCellStyle(c);"1"==mxUtils.getValue(l,"locked","0")?(k.setAttribute("src",Editor.lockedImage),mxUtils.setOpacity(k,75)):(k.setAttribute("src",Editor.unlockedImage),mxUtils.setOpacity(k,25));Editor.isDarkMode()&&(k.style.filter="invert(100%)");
g.isEnabled()&&(k.style.cursor="pointer");mxEvent.addListener(k,"click",function(a){if(g.isEnabled()){var b=null;g.getModel().beginUpdate();try{b="1"==mxUtils.getValue(l,"locked","0")?null:"1",g.setCellStyles("locked",b,[c])}finally{g.getModel().endUpdate()}"1"==b&&g.removeSelectionCells(g.getModel().getDescendants(c));mxEvent.consume(a)}});h.appendChild(k);k=document.createElement("span");mxUtils.write(k,b);k.style.display="block";k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.textOverflow=
"ellipsis";k.style.position="absolute";k.style.left="52px";k.style.right="8px";k.style.top="8px";h.appendChild(k);e.appendChild(h);if(g.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)b=document.createElement("div"),b.style.display="block",b.style.textAlign="right",b.style.whiteSpace="nowrap",b.style.position="absolute",b.style.right="16px",b.style.top="6px",0<a&&(h=document.createElement("a"),h.setAttribute("title",mxResources.get("toBack")),h.className=
-"geButton",h.style.cssFloat="none",h.innerHTML="&#9660;",h.style.width="14px",h.style.height="14px",h.style.fontSize="14px",h.style.margin="0px",h.style.marginTop="-1px",b.appendChild(h),mxEvent.addListener(h,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,a-1);mxEvent.consume(b)})),0<=a&&a<u-1&&(h=document.createElement("a"),h.setAttribute("title",mxResources.get("toFront")),h.className="geButton",h.style.cssFloat="none",h.innerHTML="&#9650;",h.style.width="14px",h.style.height="14px",
+"geButton",h.style.cssFloat="none",h.innerHTML="&#9660;",h.style.width="14px",h.style.height="14px",h.style.fontSize="14px",h.style.margin="0px",h.style.marginTop="-1px",b.appendChild(h),mxEvent.addListener(h,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,a-1);mxEvent.consume(b)})),0<=a&&a<t-1&&(h=document.createElement("a"),h.setAttribute("title",mxResources.get("toFront")),h.className="geButton",h.style.cssFloat="none",h.innerHTML="&#9650;",h.style.width="14px",h.style.height="14px",
h.style.fontSize="14px",h.style.margin="0px",h.style.marginTop="-1px",b.appendChild(h),mxEvent.addListener(h,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,a+1);mxEvent.consume(b)})),e.appendChild(b);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(e.setAttribute("draggable","true"),e.style.cursor="move")}mxEvent.addListener(e,"dblclick",function(a){var b=mxEvent.getSource(a).nodeName;"INPUT"!=b&&"IMG"!=b&&(f(c),mxEvent.consume(a))});g.getDefaultParent()==c&&(e.style.background=
-Editor.isDarkMode()?"#505759":"#e6eff8",e.style.fontWeight=g.isEnabled()?"bold":"",t=c);mxEvent.addListener(e,"click",function(a){g.isEnabled()&&(g.setDefaultParent(d),g.view.setCurrentRoot(null),mxEvent.isShiftDown(a)&&g.setSelectionCells(c.children),mxEvent.consume(a))});n.appendChild(e)}u=g.model.getChildCount(g.model.root);n.innerHTML="";G.clear();for(var b=u-1;0<=b;b--)mxUtils.bind(this,function(c){a(b,g.convertValueToString(c)||mxResources.get("background"),c,c)})(g.model.getChildAt(g.model.root,
-b));var c=g.convertValueToString(t)||mxResources.get("background");y.setAttribute("title",mxResources.get("removeIt",[c]));E.setAttribute("title",mxResources.get("duplicateIt",[c]));g.isSelectionEmpty()&&(x.className="geButton mxDisabled");k()}var g=a.editor.graph,l=document.createElement("div");l.style.userSelect="none";l.style.background=Editor.isDarkMode()?Dialog.backdropColor:"#fff";l.style.border="1px solid whiteSmoke";l.style.height="100%";l.style.marginBottom="10px";l.style.overflow="auto";
-var m=EditorUi.compactUi?"26px":"30px",n=document.createElement("div");n.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"#fff";n.style.position="absolute";n.style.overflow="auto";n.style.left="0px";n.style.right="0px";n.style.top="0px";n.style.bottom=parseInt(m)+7+"px";l.appendChild(n);var p=null,r=null;mxEvent.addListener(l,"dragover",function(a){a.dataTransfer.dropEffect="move";r=0;a.stopPropagation();a.preventDefault()});mxEvent.addListener(l,"drop",function(a){a.stopPropagation();
-a.preventDefault()});var u=null,t=null,v=document.createElement("div");v.className="geToolbarContainer";v.style.position="absolute";v.style.bottom="0px";v.style.left="0px";v.style.right="0px";v.style.height=m;v.style.overflow="hidden";v.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";v.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";v.style.borderWidth="1px 0px 0px 0px";v.style.borderColor="#c3c3c3";v.style.borderStyle="solid";v.style.display="block";v.style.whiteSpace=
-"nowrap";m=document.createElement("a");m.className="geButton";var y=m.cloneNode();y.innerHTML='<img width="22" border="0" src="'+Editor.trashImage+'" style="opacity:0.9;'+(Editor.isDarkMode()?"filter:invert(100%);":"")+'"/>';mxEvent.addListener(y,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.model.root.getIndex(t);g.removeCells([t],!1);0==g.model.getChildCount(g.model.root)?(g.model.add(g.model.root,new mxCell),g.setDefaultParent(null)):0<b&&b<=g.model.getChildCount(g.model.root)?
-g.setDefaultParent(g.model.getChildAt(g.model.root,b-1)):g.setDefaultParent(null)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(y.className="geButton mxDisabled");v.appendChild(y);var x=m.cloneNode();x.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));x.innerHTML='<img width="22" border="0" src="'+Editor.verticalDotsImage+'" style="opacity:0.9;'+(Editor.isDarkMode()?"filter:invert(100%);":"")+'"/>';mxEvent.addListener(x,"click",function(b){if(g.isEnabled()&&
-!g.isSelectionEmpty()){var c=mxUtils.getOffset(x);a.showPopupMenu(mxUtils.bind(this,function(a,b){for(var c=u-1;0<=c;c--)mxUtils.bind(this,function(c){var d=a.addItem(g.convertValueToString(c)||mxResources.get("background"),null,mxUtils.bind(this,function(){g.moveCells(g.getSelectionCells(),0,0,!1,c)}),b);1==g.getSelectionCount()&&g.model.isAncestor(c,g.getSelectionCell())&&a.addCheckmark(d,Editor.checkmarkImage)})(g.model.getChildAt(g.model.root,c))}),c.x,c.y+x.offsetHeight,b)}});v.appendChild(x);
-var B=m.cloneNode();B.innerHTML='<div class="geSprite geSprite-dots" style="display:inline-block;"></div>';B.innerHTML='<img width="22" border="0" src="'+Editor.editImage+'" style="opacity:0.9;'+(Editor.isDarkMode()?"filter:invert(100%);":"")+'"/>';B.setAttribute("title",mxResources.get("editData"));mxEvent.addListener(B,"click",function(b){g.isEnabled()&&a.showDataDialog(t);mxEvent.consume(b)});g.isEnabled()||(B.className="geButton mxDisabled");v.appendChild(B);var E=m.cloneNode();E.innerHTML='<img width="22" border="0" src="'+
-Editor.duplicateImage+'" style="opacity:0.9;'+(Editor.isDarkMode()?"filter:invert(100%);":"")+'"/>';mxEvent.addListener(E,"click",function(a){if(g.isEnabled()){a=null;g.model.beginUpdate();try{a=g.cloneCell(t),g.cellLabelChanged(a,mxResources.get("untitledLayer")),a.setVisible(!0),a=g.addCell(a,g.model.root),g.setDefaultParent(a)}finally{g.model.endUpdate()}null==a||g.isCellLocked(a)||g.selectAll(a)}});g.isEnabled()||(E.className="geButton mxDisabled");v.appendChild(E);m=m.cloneNode();m.innerHTML=
-'<img width="22" border="0" src="'+Editor.addImage+'" style="opacity:0.9;'+(Editor.isDarkMode()?"filter:invert(100%);":"")+'"/>';m.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(m,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.addCell(new mxCell(mxResources.get("untitledLayer")),g.model.root);g.setDefaultParent(b)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(m.className="geButton mxDisabled");v.appendChild(m);l.appendChild(v);var G=
-new mxDictionary,A=document.createElement("span");A.setAttribute("title",mxResources.get("selectionOnly"));A.innerHTML="&#8226;";A.style.position="absolute";A.style.fontWeight="bold";A.style.fontSize="16pt";A.style.right="2px";A.style.top="2px";h();g.model.addListener(mxEvent.CHANGE,h);g.addListener("defaultParentChanged",h);g.selectionModel.addListener(mxEvent.CHANGE,function(){g.isSelectionEmpty()?x.className="geButton mxDisabled":x.className="geButton";k()});this.window=new mxWindow(mxResources.get("layers"),
+Editor.isDarkMode()?"#505759":"#e6eff8",e.style.fontWeight=g.isEnabled()?"bold":"",v=c);mxEvent.addListener(e,"click",function(a){g.isEnabled()&&(g.setDefaultParent(d),g.view.setCurrentRoot(null),mxEvent.isShiftDown(a)&&g.setSelectionCells(c.children),mxEvent.consume(a))});n.appendChild(e)}t=g.model.getChildCount(g.model.root);n.innerHTML="";H.clear();for(var b=t-1;0<=b;b--)mxUtils.bind(this,function(c){a(b,g.convertValueToString(c)||mxResources.get("background"),c,c)})(g.model.getChildAt(g.model.root,
+b));var c=g.convertValueToString(v)||mxResources.get("background");w.setAttribute("title",mxResources.get("removeIt",[c]));E.setAttribute("title",mxResources.get("duplicateIt",[c]));g.isSelectionEmpty()&&(x.className="geButton mxDisabled");k()}var g=a.editor.graph,l=document.createElement("div");l.style.userSelect="none";l.style.background=Editor.isDarkMode()?Dialog.backdropColor:"#fff";l.style.border="1px solid whiteSmoke";l.style.height="100%";l.style.marginBottom="10px";l.style.overflow="auto";
+var m=EditorUi.compactUi?"26px":"30px",n=document.createElement("div");n.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"#fff";n.style.position="absolute";n.style.overflow="auto";n.style.left="0px";n.style.right="0px";n.style.top="0px";n.style.bottom=parseInt(m)+7+"px";l.appendChild(n);var p=null,q=null;mxEvent.addListener(l,"dragover",function(a){a.dataTransfer.dropEffect="move";q=0;a.stopPropagation();a.preventDefault()});mxEvent.addListener(l,"drop",function(a){a.stopPropagation();
+a.preventDefault()});var t=null,v=null,u=document.createElement("div");u.className="geToolbarContainer";u.style.position="absolute";u.style.bottom="0px";u.style.left="0px";u.style.right="0px";u.style.height=m;u.style.overflow="hidden";u.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";u.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";u.style.borderWidth="1px 0px 0px 0px";u.style.borderColor="#c3c3c3";u.style.borderStyle="solid";u.style.display="block";u.style.whiteSpace=
+"nowrap";m=document.createElement("a");m.className="geButton";var w=m.cloneNode();w.innerHTML='<img width="22" border="0" src="'+Editor.trashImage+'" style="opacity:0.9;'+(Editor.isDarkMode()?"filter:invert(100%);":"")+'"/>';mxEvent.addListener(w,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.model.root.getIndex(v);g.removeCells([v],!1);0==g.model.getChildCount(g.model.root)?(g.model.add(g.model.root,new mxCell),g.setDefaultParent(null)):0<b&&b<=g.model.getChildCount(g.model.root)?
+g.setDefaultParent(g.model.getChildAt(g.model.root,b-1)):g.setDefaultParent(null)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(w.className="geButton mxDisabled");u.appendChild(w);var x=m.cloneNode();x.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));x.innerHTML='<img width="22" border="0" src="'+Editor.verticalDotsImage+'" style="opacity:0.9;'+(Editor.isDarkMode()?"filter:invert(100%);":"")+'"/>';mxEvent.addListener(x,"click",function(b){if(g.isEnabled()&&
+!g.isSelectionEmpty()){var c=mxUtils.getOffset(x);a.showPopupMenu(mxUtils.bind(this,function(a,b){for(var c=t-1;0<=c;c--)mxUtils.bind(this,function(c){var d=a.addItem(g.convertValueToString(c)||mxResources.get("background"),null,mxUtils.bind(this,function(){g.moveCells(g.getSelectionCells(),0,0,!1,c)}),b);1==g.getSelectionCount()&&g.model.isAncestor(c,g.getSelectionCell())&&a.addCheckmark(d,Editor.checkmarkImage)})(g.model.getChildAt(g.model.root,c))}),c.x,c.y+x.offsetHeight,b)}});u.appendChild(x);
+var A=m.cloneNode();A.innerHTML='<div class="geSprite geSprite-dots" style="display:inline-block;"></div>';A.innerHTML='<img width="22" border="0" src="'+Editor.editImage+'" style="opacity:0.9;'+(Editor.isDarkMode()?"filter:invert(100%);":"")+'"/>';A.setAttribute("title",mxResources.get("editData"));mxEvent.addListener(A,"click",function(b){g.isEnabled()&&a.showDataDialog(v);mxEvent.consume(b)});g.isEnabled()||(A.className="geButton mxDisabled");u.appendChild(A);var E=m.cloneNode();E.innerHTML='<img width="22" border="0" src="'+
+Editor.duplicateImage+'" style="opacity:0.9;'+(Editor.isDarkMode()?"filter:invert(100%);":"")+'"/>';mxEvent.addListener(E,"click",function(a){if(g.isEnabled()){a=null;g.model.beginUpdate();try{a=g.cloneCell(v),g.cellLabelChanged(a,mxResources.get("untitledLayer")),a.setVisible(!0),a=g.addCell(a,g.model.root),g.setDefaultParent(a)}finally{g.model.endUpdate()}null==a||g.isCellLocked(a)||g.selectAll(a)}});g.isEnabled()||(E.className="geButton mxDisabled");u.appendChild(E);m=m.cloneNode();m.innerHTML=
+'<img width="22" border="0" src="'+Editor.addImage+'" style="opacity:0.9;'+(Editor.isDarkMode()?"filter:invert(100%);":"")+'"/>';m.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(m,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.addCell(new mxCell(mxResources.get("untitledLayer")),g.model.root);g.setDefaultParent(b)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(m.className="geButton mxDisabled");u.appendChild(m);l.appendChild(u);var H=
+new mxDictionary,B=document.createElement("span");B.setAttribute("title",mxResources.get("selectionOnly"));B.innerHTML="&#8226;";B.style.position="absolute";B.style.fontWeight="bold";B.style.fontSize="16pt";B.style.right="2px";B.style.top="2px";h();g.model.addListener(mxEvent.CHANGE,h);g.addListener("defaultParentChanged",h);g.selectionModel.addListener(mxEvent.CHANGE,function(){g.isSelectionEmpty()?x.className="geButton mxDisabled":x.className="geButton";k()});this.window=new mxWindow(mxResources.get("layers"),
l,c,b,e,d,!0,!0);this.window.minimumSize=new mxRectangle(0,0,150,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.init=function(){n.scrollTop=n.scrollHeight-n.clientHeight};this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.refreshLayers=h;this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;
-a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var F=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",F);this.destroy=function(){mxEvent.removeListener(window,
-"resize",F);this.window.destroy()}};
+a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var G=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",G);this.destroy=function(){mxEvent.removeListener(window,
+"resize",G);this.window.destroy()}};
(function(){Sidebar.prototype.tagIndex="5V1dV+M6sv01rDvngax0oLvveYQEaGaAziE0PW8sxVYSDbblI9uk6V9/VVWS7ST+kB0zL3etbmIn3ltlfZRKUqkU/rpRLN6MmFJym5yM/8QL/Xnw7yLceXQ03fA3JaOTyfjCQCKZehvu66tErCMW6J9E1M4jlJcFTJWIPP1VIKK1ixj/zML4VBRiTMaf9HOKx8G7/lwy71V/ZJEv8Vv8cKea9KW646tU41nk678/4tK7SZVu5FpC9oz/TDPVnkEPJlsn4wVma1lEnVemGByy6q+M+SXkSmaQ6Vv27gJeBDzyOQDMu1ma5FVEEVBEtuokgQhdyZ62Uv/9qWWoYPRltgx4A3U970/hc6BnIuD+kdI+KbGTcelGce6ec4evOBl/k0r8llGKtWBTvulF98xVKjzEvxWXDVS/M8VHF57Hk0TDpzpxJQGScC9TIoX3euXvVV/UcWWpDFkqsCYyfaM/1ly36vGfgVhv0oiasyfh7ypgyaaBaKHl5/nThqb5VeAvZEigXx8k0AolJJUkVjo7jGBOHFOm29Se3FZin6VsyRL42V+2U90z9crTOGAeIEK8Q1UCnMlGxk4CLWb/gsflKt0y/MLnbzyQccgjaIivAjgTT/Gtr4Quf9cXXWRLjRKxyRwvkBko75hHnjisPzUkP/kyESnHtwoAtQ7kkrehL7UyzUAtLrh6E5g7Nnn9iYo2SWW8ZVr1QYsTIW8gE+ll5kHWQlXGdr/Qug1Zl/RDe2O4FL+fWPBaiJSUZGoDT6HRYT3DN9Gdgy4agY3Q59gj+iIOdAOB/MmYYlHKqYp5PMLaFHMVirSSG2XYySnnZrGHNW19JdaZoiYxGV8LbGq+9DKsT0APT3Sk1ldzXaZszQvOpfzlkndUYodytAPDOEuxuocyEqlUmM+Jbm6HevkAq0sAW8+MB9BmQJs+8HQr1Wup3G2zL6uCetJZjXKofV7J+FLnUUWtxZyLTYa20FzpV1GxEgnVdxH4JOgyS0QECr4F3z3nEUHWUQfUjUi/ZUv7tjqTGaCkl0q6Wou0Ef9tdhslUBAn9Xq4GshZkG6gTmx0m8EqvuGoYzb4iwMYdDnVMcpbS2QM3TYB3mM0Sp71/0fuSVPf7lmki1d10DN3LE6x0/CKut+GuddVgGpRyFCtc/sZYS/Cm9FySdUj3sgIPlOZeZvWNAm1o0uTXH81UO3zZEEqQDkwD5q37t+zdAOqNe/RS/aJ6Tdi5purBt73xV930PiLapT8HTTXqz2Kh7JloQ26bIlVOtAl6dIY9uBPMhbeCdgtu/ZLJeEe1XdduTSPrpc6v9+TlIf64jakMpeQ9RumQFVr3YiV3vcb+eZyy9Viw4Ogl1p+nM2xmofSyNSdYgHjnSzA6m26fu+wTKtwYM30S1LXTkxPsYp0qp+nbu8yg271r4xnWM3/hoseBI+8qttygmLlSfLhZtmsS7CZUd1Kds295iT2m4dTh7aH0qLgF2QqGo5qVVdLtHiPvIp2mdDXinvvXtBgGhLRI4/1sJs09z5TqY6sRCNVqlU+2qxPDNuRuxm20MqLmqNOO3CqHRqxEGEclC3jNtATkMOLhFZpOynrH5FAc3UlcKRsbJHvy/9wD8iylUSFJHhrrfmRYBPaZCGDZ2Mu6QXolr3prFf16OdvsxOjqyqUVPXzVEngw+g2Qrur8WehCxWnqu71sE9gv/QWnrSalK00WglxllLFX+VXVaxv1TMae7yFcRrlV2059PNiNr2+wdxh60gmKamJ7trRDvIm4xsecYXqxI7z6sQ5pICWKDHp6jFiEyjpgtLioL1lU6MmSu3VHZm0QtcI1RVNeCPPjIeKHnuZLamxJzHnNIzdyIzsV2+DJm+Y22ZVlPINS35AxuFl1Bo4nQ5IJ7PIfxyW8xzGplLgaG9BGginPqsrUhn55RCZiLoxbRn4v4dAbkYubdBLFkWoRfXYs24CvPz8lGzpNZchT1XDzN8OSEkcF8ZBhnP+1cq2jJgddJORxMmOmMX7w5A96HXzILoS882Mr/IBWqAHTcjxejheKQPvJRo3kWNuP0g0msMlzn6upFoK36/o6A6R34t5fG0RKMGiNdXSwyFVJX4R6mwE9Y+GsodSb1gcv7cCTRUWmCEx1rI2SAbsPvY2+m9QmTl7mCeBdrAdKeMnTGC24X4ylMvU3qWtzY2Yf5/QdB+kwyKPB1i9agqkwEqZJqm+HLULWY27rx0Q72mUWoass8VjGOIQHihN0cRKenQVagMsqEtZ40YXPq4geB2yGWCXNjHdvWUBLwzZJqO0hL+TVEJ2va5urbACZWbCVYXEuLKywZep5bhnERlBRuANDHRa5c1HgwZlFJY2kWnipFFzIUE+znKy+EtINIQLcbvWDo8tdUmlOANNl1A7/85EXGmvHeBG00tYB81LS0AuLBVnVATUY8Ryv9DreSbjX5/Gw7BN6qTSVmRHniapOrKd1UqFa33dmLRcn4eiO68TzJgwXYga5OrAdj+l/P+s/3w5u4BXnkOdFpGwo5wOb+7Cf+7CX/0GtfRfzjCN8YfJX05g2BeQMAv9mxwCtgIWyOwr5L/o7pR+6SJ3Fe/5QLwwr4C6BIv1fKyzpToXHJTbLiG8/GQotrMJyTgA31zp7sYz07uavDfhI0+ET93fNFPKrlqZnmkCBaS85u7Qkeu8E9ciU7jYt/Oin4Cirkdwp8G3qlPh7jTYKupVrjsR5kytjqzkeYIFXRodnI/DcJL3VsvKmexWjgEoQCsdT/N5gLf5grrxeJ6vHTm4gO6UlxdM9fCJr5VdTooZGIdRDXwVSKniAK23gL3Xr/TsPT66RK06s+5MS1xeX2UqEqZDcGRYCDPKrMfWwKV89WhCtCt0umFC9cHJWKCO87lZ93ND0Yx1Ilesax5NH5/A6H4+Kc+ulmZcK+SoYJnx5BWnwRUNUOzoqJMouyS0VN6PSOkRm10jTnAgsGXKVzQTWkNVwXMVcD3cwHzgiccCc+0iwrV+eIB8vYYrzXPHQmiE1ZMQ1dCqZe8YRowhM391K5bkoGWFgTnpJC0cvypov69W1PHZKu61VvUKlrlgOFehv8dRqYiSVFVPrFeh9R+a6FKwUKF/2DYN5EtABZqrc/t6ZBF2b+Aky+I4EDDf0hE76YPlKyXWsFCNdaYrfEHqwDPaoVMBPZl25/OkuXfYh1AuGViPJI2HzBH4syPx50fiP/fFS0ErkVp1KFpUCxjqH1AdWqWlSspDr9t9mp8sRe05lZKcAbbwhWfvXCT5uaMGgh6KpJLW1xfoBw3LaFijA7pLbA/dLBaAHq0vExEoc+vIsCVvS8dsgKfzHs2zF5UcNegfdc9XQw7LtzEBEfnVuw5qsk9o/ZpU+TG0Qy5lmqJsZZKl/bKVR1cmoRI9kMKywhvIGYGrFIq+bi/73BQ0hZ97urenL6JXo5mqakobbtIVV66p/w8gNxay1cYALkHB9QnaBuTxx//OCudewXQalev3OcXoIopkah29PmH7C415oHVru0dODdPkGKapDAJyVt7oUe06YBVuotXIfZ+gJPdtaYfWuto0odAH8LSEDeELJ+eFgmTOYjMjHzutTu3jF0WpG5cTsOdrF/oO4OA7ZEqfB4GIEzsLWN3o6/CT3nipaAhKotcVWg06C0PjypdFnnW8zKDa16wc7zM8ads4WfHympGqW4QkbMBZ9BJqM5HWi99YkIFBog0Hzio7lkrk6FpEIqHNUzdS+rD2lUqc/dJZEPYVaHSDy8bczBP5mZ0nMo6LJDO2Kt7crnZYv2dpIkqO4Lj+UwiaZGA0N9XXHbZnPaKg7UVm+cmsVbpgLwQqTBDlK2QRjYqU9WGg36q1rR4EKSmgVoQS93g0qWbzMLnj/zKeThc2Ny9xdcxvW89tJ4FBZ+TrYS822IEJJ+OfG7MBproKdaU+lm6ha0k6VD5Wkg2Rn63EH5QRvWjn4LGOw95S7TY+lo3TH5bgr0x4r7qHlmhA5xdL8inC2+X+qnIjibHk+hEt7HPJHmiPr5FDKwqa25qJBIaLoGOvda+c0H4n10rRyKPrgymjDoVVMM5x8qynOBbcSwY9gDZTfidm4q9hNigH6Zq7EjwAgaEWn4CdRLdtSHCS1yLr+oE6voukO1CwEDCn2jNsm2CDCNlvtAe2HK3BYr8H2yZ1uJHuZl7so7STbMGZwqkd6+yc2C8a0q/ngU2T1/pvyFPmk83Tn/jK+AeZjy7QxdUCkrSe3NbTqNgL40jzsEOzt6u1D9tkTG81GT/skQ2ayLenp/lHp2H3zgzG+tdOZtsNHX1oJuNi99VAhH9Z9NF0P6/LNDBfboa6fZhgGdkTPhmqg3Eaf+zelGaa70Uruxfjpw7m7dWUBlIMPOJLqqEnlbYw7m/rCMN8W4EIq3yU28lRr/00O6EP07B7pPtJPgO3BzSObqMkNTPyh4nQVpli6C+Kh7umeGXIdYrzyrTE4a54V+7GdziaNakWdy8rutDfP+5Q6uGXHqZnFasiznRQXfSQERvNwMTfZtcLB/4N88lR1Bd6tC6Wmg+3UpO1nNAGReekn+dT/fCb2QYDbrLizeyyPyxWZ8bSBMBkfKP5KJTH8MncwhpdhJEJPjKZR2kWM4anfp4/4AqMtort1M9HJXJkDjXvCa99fDR7j1goZ+Ci5eNlH6zuA1JT24fiScpErMTelfGWWtwxQgHFjjzCtuJuPPlabFdZTK9hY7OU1LD5pjsLmKV+V7LRWsksxq1hcNHhDR5nYFYqnRg0I1Y7DGhmMD12qaM7njEng52y6I//yONAG9BDsy/0hb98H4T2Hv7Q9t5BMyMPDTB4Nn9XzMNV9SGpaZMwKq/cRu6MBdc0PRqMupDoGiLfYQUGNXqIoSzglobh11Ll0aDyYCql7wahxgrlvX5sEk9cZ8huDzRQKtakbzDk+1FCGCwTPmIQ6tuLe/08bRLHSBvMs1uV8of6M2tpff8UM/Pjklg8LY7ij2R0alrmSxLrke4KNjZKlWGvuIKL9jaT+K844epjeCsbzgtnkPNwXuM/X3fC4BwyjB44eY2kUW1gqzKElvowWzyKevTim5hHprYrSXGfbPU290OwgmbZRoHEXmVmBwR7emHQ9K589FG7k96B/hk0nQWuRNKy6Ee92NUl1NrCPFkWodFqXT7dWLX8EYuTjUw/LIFnGWQh/wD6BXjF5f1UsZTtMB/UxgsRVUy8uA9OYDJGlyEbZyNpS1HacBx90z06HU8knhzZ+GJAVIo1Vl/L92CjS6WtHnxx8r5FZ4xmPbZPYWNQQGbmEnRmuZ+BSxs5k2zBqQJpskiklWy1PIuQ4XrcZbGXdyOzpNmGIhLrhZhgucX6peINVyxIRreX0Gvda5tspRgFQCo8FlPjIwyemeTOGHtHJCIiCLF1sTgfj3fTib1jX+DJSDoQaa0feE+++5K/Z4mSnEGL3N11JS8SdE9HeEraqGfFD0fVEJwXKwldJ25PbrDKdG6T+y0F1RlOcDth5Q1LnHvED0S48Kx/2FCEsd33NxRhFplVkqLAB2obiywGV+ucayDaPEbVTg7QOnlfSrsfbDAhf+w3rmPInvWoA13OtB5XbLiyp9hIlxATesgqVVuZanqbKm6MJh1Y9lBCLL9k9Gl8cwW+HVN5dYJRLrKWiYZmurNPX2FH4z9mJNcfpaWJPKJ1YKpu6aZ3cv+m5HAb00cnVoSnzXdi39v8OjrjroXiW7JZiggXhh5ecLu4/2OIdA7Ih+C08S2Hz/Mi1Fqe56VEdMY8L6Zn4/H4j64J+gKCZEl0trLXXWAjGMsGJWQg26I8EcMmW9IrrmlhBZrg+JIlHLZJUsDSTda8UlJHNIXvj2Y5Dm0N7+NY9pee1o2LUIfB7vYSCPXf0b/4OxT2bsD8RsTjfKH/6Z9VXOcwfICpjK3rhMzX9DytZOyWPLfXrWCUPg9NPwImrq4cFDp2bgze3FOyVbYDpm9SprndbD67s+TRiPMDD27nJfk83rKrqZ7X5xQq0q9YDHNhWMhV5/fLowhZv+42gEJbG6qJssvEbZBSVOXSZTsKYuja+uiYEEIglnuoh940Z5eYnsnancUvHRghyGUuRsN2kzpsWYZVmcuVBAd9W77MgSF8cWI9JZs5sAeipm0DrrRhtrqDCGj+YStWogZxgwj9oEfBAkdsCZHMvHQ0uwCj1xdrQQeRMG1SSzqzI4JDRSpiZTWQ8TCDQIm6wsMEi66wv1qClVex6HKgZJe6zcRte5SqGO6zX6dWll1JmiVrIz2g68ZgQnab6IEXIcRmwh3ZYRxAHN5hGCfHMT5dGKlkiVuP1WAvj64TsOvFLGDWJOJAP/lY+rOPooctUXaFcG5CMCa1a0AHPB6LmSeMTZjfdEePpjmWiipzbiI1JJMhSCDb6SkZvNPUfwVnB0LYx541RzxuJ/k8hFT3ptWjI2OJC8b3RVLQnYF/CSf9GYYUlJRr45LCdn5cmnOM+J+nGctEOKfpC22h0DCFPGOcUCZPT0PubViEX01O6XyqRR4tbFvn7ONCdyczP8nnzoqrvnzzLNmUx3kP0PNFsKof4FFvGGqlYWNjR/bvu+xaITXs0W3mplMCaGSq9dDgslfw95VecO/809fRxfT0YkqMuRWRmxYdiWa1RIXZ4s43G5IMY9p07mxL6Mn4UtAY33ZVfdkuC2NpZQ2orngTjbcXfnaxl7EVNqU7WUX1OZLvoBYVfDWmbgulWK24yneHH1cVriJPvce4Kh95HZSwgX8Tx5T8neyLftHFIDycVUHfSFbhqFqHRluMTCF73Rk7urVIY0gLE+jEreOr5DkbiOfzMTy0c16rX25fTSgzM38k16QXl41tRaVVG+mqHQ9Kj2tRjO4N49KlY/vbrXN4V1f3WuAjOGZmozND0lk84L9yZ3zmzFEzTpQwu8YD2B2viUbXWWKDSOkmchQHFhbnzo2qkgRHQ8tEBty9dVYSnR8lzW0QZLBgZ46HuswCmA8R9ltgtcHh8HNJD3RKA4PMUdZbLlFOtrvUhnEyICPSHGYAsR3mR598eOA4RDUx91qTOIbeVNIBkpDJiqcJlB1dnsAJOg2hOSqwoxkt5cC8PixAfV9cX8Gqx8PJzjAM7N5oP9h+T2rYzFYabfWizslupwMJu8s4qIywhoDnZ+gK/DqkqPM94mMlfji1sFJxfTppGJD3YpwMzng2OOP54IyfB2f8cgzjvK6saydCejFOBmc8G5zxfHDGz4MzfunPCEXQt3+YDK4TahiP0Ak1jEfohBrGI3RCDeMROqGG8QidMBlcJ9QwHqETahiP0Ak1jEfohBrGI3RCDWMfnSDjVL6Y+cxIeMnoK67frkNzxEEetjrhb7XHe/VlzX35Z/NSCj73REj+FIdndDml9mfNO0Si1lGgL+nuK5gEjn+Du6vZ3iiMhyK1J7EeLjJ0IJ0MTApUp8xL0fUFY+1PIThD4lH4kcAc0ZZ7fsEUO87W7k3yOaX2XX9x6sksJg8y+L2461euSImrmyKhGTR4ZOeLfsTzjUylzdYYbqqzuZbvRY8OMSAUjkF3l2M7rL3GgfcSMN/nCg7P1gX0PUvjzEbVbDt124lo0ptoAFl6SwF7LF4S3QbMsrY0LjilL47hGt08fS+aQ3tDMPNvaYbHaMjVCm4278rUQudkb2+mtp+2Z3RgWoYf/YJS812Jv/v7mYQmH57QA7rd3d5cFu+VZMFuaksRSzpcr7Lp9ktr8l9M6+y/mNb5x6Y1f5j/18prJ60PLq+dtD64vHbS+uDyAhVlI6M799fdE5h8YAK31gsPt6BVaZt6RsUp69DTk3fr9ROx1h3yS5LHHaarfvARrtguLAODtUQzBeyZU8d6kM5KpOZkDlwuH5J18iGsZwOxPmOw7TcZpG2xuxs4cH33aI5Jd5J0A/u0wKZ8oZC56GjUdHaNAwVZp8aD2xqnlQ7dlXy5uknqlI8rfmfa4p+V00n/cZ2kaqGdDEA7r5a267C7hbLPjMiWvXFYo0Y/ZnPdiBUy+ToCJYpL0l6tk/j+06MLbE6e4m3OCmUMBlbBmIwYySAVIUXwCUXkNy1blzguKWaN4jE6VDljtma3rNJVX2ak5eHgFEcCGB0nG3TrWcrDQ+wrQdSQmIkm0+0tpXzFpGTTidwVMBCtiEwAsXob3RfLWCX4ypxyl0oZVL1mDXTKAh75Jk66e3WYbjBMgC8SL0vqzqOpBO7WH5vDDkAZ6haFYTV80TxG3EGhkULjQpwqMUeO68F4KirOKKgkwXBn/2FvzDVZc9pEc2C+SiA3Pgq6yskW3VGGFYeCeDJ2blwWhh1SQRGzpMmTZIdgizN+NtQNGoLctdpe2WPnJ+N/XIVx+o67L/O4wYoztyZe5jFhh4EpiyoZ6kje0SLH+OEmmkWxpN90tkyJ4zpgyWbHhcM19WsZkH6Ras0i8du55AloXNdaztzYgSmjVSMTb53tH+BUg7xhGZYONOBme6EMCujYxrX+rN3BeYD6xunkoQ3XlnTdTqBDlETN0hSK5ABzV3IzOXRyoYOyyjWjlS7C4Gzl2KFuctjgTfkpR62bf3bRrzgai5lv1GzlwbDVWPlKbkk35kykmnDxNfh7Eyk+b73cNsoi+HsbRY71qHcpDnlyBic7MhgeB3Q5TsmbJMsckqeTLbVSk+tI5EHclWjjK84IzRcv3ASRtGEiPyEv+h/61AUTSdPlpplatvIkMKP6LPiW06Ed6OhY1wfKmLYftpG+gY7Fc4RyhcXwxBznF3yQ2LXoERXmbJgl6LsIFIGoOEPugOC7tnWi/CywOxNXSxuzuPakZB7BoTLnqxhxGxNtsOAVRmUdSnF0fvb2MtDBzKimE2/MA2mNB7qTEI8873ZXiid0El/MsdYrniqHt38sni8oclZHCnqsvxCLcqZV5+t+fnro/r7m5ryWStYNhRnMYvM+Tnm60EOFmFThlPqfZeZcvRe6EzZntaWkS0wsOJ8spTa4HjHk+6Ibt48fQlPMCVXtlFkLkvG2iMbZYpnXMBwMWHzFas7yPYRn2FSxmTraXlU05nQ71NwNh5Uc4uTB2MANp7Sh5+EmdN03vFN026Vw7ud/xJ2r5Q8KdgOHyTIb+oN5bt1bHpGwXf/vNj8HUrMgLTPqDioiQ1eBf7KAoiFR2zLDcwecuIa+t7TluwWGYR+m9rzA4ghBJ5iZsdwJqknTOi4mHXJ0HtARirSFPaHPBXL1KyZjxYJaSwJh5izfLind6Vpr9KPN18QcHuVG8GizwuetHvkllLGJuoi6sGeG/eObVOI3NJkAhoY154U58DxDm/F6suBsH7TdDa8wy2tA3fQ6YlC9NOXTGgF0TuGI+bD1SyTEX3M0aAXOM1NHtJU7n0ZywCkYmwWjBz30PNV21NvJzuSeO0EfLBzLSaFI8HQybXkJbo+4tZ/tLMW0krl0QcGMLniY2CkXc+kC1c9lJPUyS1OcetH6+4SiDIMPmf4dGpT+0lgaIX3TQmvUXIL7tS5MjYlzg7gjwTfSQF3xN9z0aDhTy1PUXKarOmnpnCoJzWDUmgLFgLBZGF0hcDmELWGhtiVWVYyHIcbCnNNabPDKOwolTaRtHq1FxLnabcBlpslwVCMGezrNyo69hvxMhe7NKq2yCuzowiK1zpsqmSSnl5yFGAIM7kBRVJ1H68B2DYvgp5cBwwNf58z3A5yua4hje1NQxjHTqlC3Bed2VIAx6JNYZTRNUNy1A2UYw6GIJmxFftcFSGvDF8JELCgYOq0S75NO7UvgzpwS72R8qv8/ZWop8DTbmR5fknemaluT2kvj5fRFJLLje6ss2UCcubWuqSZOMX53Uj4XDH+0nxTziHBunKMpfIOWCGTtjU0KwgfbJPYIawXWuUKzqHiBn+9NQxjAUFssWiW8m2z0WSihRldm5Q/ElaZpXEz/6FMhmihnSOm+CF/mw3DTbBjZdrj6CLXi3E5041VrkdJWbsdN3SXA6E78nQk8jJVwWuBLIXHTLNl9S9Ec04PI8pHWKvfRbYEEcvuS8CixfoyRS1PbcJa+8F+wBL2m181vTnDqPM0v3FlG1+IX+QKnipndmk/ZksMe4W/ANBlflVJJs2W7StlP4oAHehqJJ3NiUn8MSXwN4xO/eAtQGNcsGjSN/bzqTf4DMn7D4rLAvbO91851AIa6CmB9wgvHx0e30ekd9TiPUo9cwMH+3uBFFLT571cSLcAO8roTkUFVIjoWj5N7XieKjDzA4dPtYd3b+jiPZCB+xaTSDirhaBFZnWFuWhNLdP3Sb/diemM6EMb2ms3QNzgeGsc+dOUKGM1ktsSZMgjAqTjuIn5idqksZYIGnp6A8MItr205EY/N+dkKcxzX0bLo3kLK9I8hiEr5BNFrh+KEfgwopR5JhgOTPkq5+gBK/QFjy4GFftODSX9ILqqJg5X/TGjj1R8yV3cYSdoPqRDXLMCAGUNSBtJGzhgsO/Y4jyg+xbxXE4/UhoiespQF77gOa0e7eWi0s/FkrD9WNG0CW882fBvwlNxvvFfyzRgorU/HptUVBG6zdODOGk83i2jQkJ/09x4uccbM/F6NH7EINuHhNEZktuOlMlO0SkxXYfnHZpoRBlaYybU5t2wpfL9lQyThV1L6NUm34kZThkF9C91FPjq0dLTEeyeea4Zle02yhLzFiaaEfORJyjLFIrtJa9XA0Uow6UZAnjseLcPmbjwh94VHlsZGJvFhyLlaFp2fuFnzDo/N8PQNxE4Sv5tiJNcw3WJ05d/Mzi2K0n03poX0KACac1zyGqKn2QyqF6wS7MV+zr3Ffc5W5pn9sNl7vLq9ZZrziinM8xgi12CwVt16W+ucAf8z04VDZ2xY+BrLXtdGBSPi9wrCaqp7RnE87+gFdANgfrM75R4c7dvjxeDKy9T7IFTkqpPoAXYQiJZlrB3kA4/TjEKfHyvEPMjQ8/9oogUz+xaPZ4rkdhWwV3hy27QQUIXFY31wI1PasqxWgZv0xJ31xJ13xv3QajQbpCI/82OJnMLpHwJG11x3p1i4shPunlAdMbY+mDQ74SadcT/xlUw/yfthJ12wCVtxPGJgw35XmVR1CLBmupkxBU53VCE5e4Jdu6a1N/jU1l1rz5B4AuZARroHljjTAMIHFadYVUBjqegcRrgofTqgIKykRANWm7VhSMLHsnbdtYLhX+yd4fYTuTUr3ZK8TFkk6wIn7BA84rk3y4CZBY38HByV/9CefZZqa1Lfl8YJ/XyCfkewgYfsgze+EV67KWnwCyZouIcpJvqubXp6Dx4JM7UHUTRkQsZPvlpZHKKVgpsUaIrDDQU11B6PcKoPHFdt7I03bXa7mAqW41X3yDo3lSmmJL/vwBFhASlaZ0jsXfm6MfThLpmtsXarWZdaWwJP3MEp9za1p9FUGY8NLHuHwdEZkWHpAMndYxfT4lC6Wk739fkD6OMCDguCJSBoA4IClZL1lcDRBKiPmgie8rc3xdFw+kwjeHIM+OwY8Pkx4M9dwLDLEephqUG/cXOaBJxi241gdIG+4kXW43VXMcosk0FYzgZhOR+E5fMgLF8GYfnan+USwwljIWfLACtK/kQvqslwVGfDUZ0PQTVlefBuPZhz8PpuYJkMwnI2CMv5kSxwXGOqMvSUXAmcQrK3XWhuFO41mYyfKrRZTYG1ki5oNfaSB2hC6bslXXbkMUtOTIXkCwSfOD/vaNHt0ykmoqEaniUbpOlZskEanyYLB3zLcLiXhOpJgh1RuSzNZBias2Fozoeh+TwMzZdhaL52pzEGUM0iQB1kRM61k/HD1QkeK5NuTjntucUb3rj/tprpZ8605QWTue7CtACZEpkVMuFND5kWP3MmIwfedJDpkq3XNBgIMnvlDFVLdMVZ0HaSDRPKa4knt0sAoRsm4wvsLhYye9Oj0RIfhHRISpdp4+kRO8y0lcR7L3nwnGCMOLdFAsNyFfA3490RiFWHF8OdweQFbLdrOSJxvmjOlJkv6jLjZBjmZqunZ7Og8kSzaixkPM4YUa53yfEfsR6TCvKKsRd7//4P";
Sidebar.prototype.searchIndexData="7Z1rU+M40Kh/zVbN+wEq98vHkHDbJUxeHGDrfFEpjkh0cKwc2R6G/fVHchKGKMwuRo7Usr21xQyBzUaPW62+qfuP9tkf3bM/Go0ofg2I+POP5kB+t8Rr8kdztPq54Hi9PMWcs5fodCD/QCP2Ev7RPFvGq0D8Sl389QfhMfVxcINnJJiwiMaUiV8ZzVgcs9W7XxgEdCF/ELO1eDWKOXsmj3QeL8VrjbdXhixgXLzyR6NZS/8RP5EfrTEUX182H7Jb23y73Hzb726+pfO3NWw+89t/F9DZBz/qjuRPsxK4IU+xdQK7JS/3gZghcEcXy5IjuF9bX7+lTXBGwjjdAyglYR2DIgZGMaQboeIgdgNMCL2mGQhDHAQsicXhmMwCAoRF245+2LH43wTPgZCwtDV2JMDsjo4iET1DHJbkB2chEAj9zh6EjiGzYUi5nwSYQ6GwvyU6fTMU/kxW6xO6FQVUt49hXxj6VjA0yoohtSJxOIejIVUQHYMgvCXma3Q+X5A5uiJQD09T+vKWxf5SkPDEOnDwtlns49iXkKYhHJU1tfG1dmIBBMW+MJgKQbzXFEBA2FES4JRD14py8AISzgkHHJUxJhBbEtMXhh7xawVDwhAfmqAppgEcdWHHB/NiTtdwINiJX3vil2gkKIA+Sk2JxJRTqIZVx1B4Zk9XoivG6T8sjHFgn4clkdjj8bBdlnUaavDOkGt6j6YJB2pfmQpgbhnI1DdMEJ2GURCA7Mzdyg07o1sQkPJ/dknAieAZ3hk+jXx2OktoMKfhIjo94zj0l+j70xP1yT6NNaNhTPj5DxLG0fa1OY6EDSa+kWt5okHwfo3NTk8s54PVP6X/fEjqi8jx9jufyI8oXmBJHNBQ/E/DkPjx9gOqsNv1fRO2fQA7xfMh6/QnZztuWszPw3lZgLf2gLcPjQAjwC9JSDj10e7dio69v2971Zu2uDOxqnAlSy7Kgr5eU9zkQ5vPCPrx6L7oqDv7/lbv0N8yQtpb4SAQ8h2JDxxFRYe+82F2Gr1lB/qUBMRnq1UiPjq6YklU+KO0Xts/S3uWFMsheTQZVvDNwL8PqViWWOtr4Yk3m/uK5rA08ojEhYCvpYBHabnHWhiP6yXhOIhOr8/GaIxp+MTxqvA6RynJ/CDk/x/PYLjj+EejJkiKr5NfLPN/LjSkaOC1Uke70A+mtb85PogagHowU/aSrq3Yz2Q/oNU9DGiBeSY3eL1ZaaEfiOIFd+pwH8gY+4I+i5aFfyb9/WeS2X0w+Eyoz9l6ycLCH/O9/0zVgXkoxXc1uj1nbK7JEA3m4igRjuAQ83nRn0xH8QFBbxN0x+SP/BI8F5d2DKfblRX6ifT382xNwKe852OxksI/EeWIz575NPhE1gQ/F/+JtPdd+D7kPZKE6JHx5yjGGyLFfjK99r6PAtiR9xLx3e7HhX8uyo45vPUH5rlM8SwgcdEfiHLMtwEbXlPCVzRUy2KL90g6yiMBfKrcF9+XVzYIZI/xgc4JE278Snxb9MfS2S/R+aAsG8xjeSQzdCaLPIt/vCsFwZBDw2UyhuFlGkNBJAh2z2XF5klAotN67fIcXQzZedGfiBqG/IL2eiP49kzGG4o5Po9mvdtC30YkehaL/R80DJIoDRS//XrRn1N3/5RpfmHnGHlOf8vndBEwxqun9FZTCu0pyf+LLKP2XmjsL9Hmf1D0Z9PraFsEJp7NBeXkRdYAe4T/oD7ZPh2xqV688f8U/SEpcczeFyLLJh7S/rMp/EOpO6HVvFdx2qxKdNqo4RmgttsD5XGCg91p8+t/ir49eEN5mbHwaq2ldFbLXH6c75OaizPGjxn/ZQmchwuxCPRtiP0lQaPtzwv/XNSivsw2wY6U3lPYvcvJMMBRhC7ojBM0XMpccvD2MIr+LNRTJnNCJq9nITjQWRKTeWnQK5FlW9vghon1zEvCXKkzameuJ86HuQw+LjhL1qURdjUGmTkhrwN+mcw2xtECx8LNe5WRxtoZjsgUXSWzoqNXjttWZu9OMPpl/1xuEebyGIby9TI8A+Wec3an4XjPYNdYYfumJXsS3cyn7vGeRLUPbNIfD7yy7IG2YgVlNvqP9xQ2nRhKsBMAn8rbG+o4KM1+0G1xdLxn8TC5LctTUPzhlrWzYSW+ntbbjeLfQe/rHsdj8eWrhDvdWk3m2ygpfMcdpd4je6hHh3O3XathHqFv3Xa9WfjgsnqTzKhID3yfRBGaSKqFB71/xSL7BTEt0MPC14hpZ0n0+HpF56vIb/bmRFp8R+PC89UNtWvx9Qao3S6+AddWenFkDqtrQY6ojyacyTOv+BkMJWjywZzXo8rzHarXSmMv9xTWmR1yLdbTQdH51mu61/70AI9Rs1d85azcUcp+YV8L8kPhLTi7FvLfk6LzVV1po3zPzrzCm8iqGt61HzREmBP8LIeFn7GfRSetNNs0q4rPOJ0vCl+v3tVNomghnnrCPi5BxF5t52tUkIcyNzvGIV6Ursy/aTSOPMTF57sfuWgajVwIvsKN5mmDPRou0OYSS9GRW02NDEeja3QhvhSdsl3felj8wHJ/35bLXr2kxVf+NQ3FFR2zcim0ZdSe22AeFj4Qp10Wrw/5PqTxKzr/ueYlGH2ktgqwwDttPFN0ztr9F7U4y1nSfowG/v9LKC++q6IOrTYap9vBHu4+cqFRd3Qv5euilteGpxyH0RPjq7R71a9bxNPzwld3KaPrDIu6dzIe3BU+raIWxpj1X7zxSeEJq+2/zAbxvHs08go/WbRe2+9FmP2ChRbk+7PCFyiqAxXNVtCNSFyKi9OKx5K9G7AWZBafzFnhS5mb+4yNxkVHk2nR8SpGW/aLPVp8vZtB4UOiSqcjs7W2I9lmaszmxc9wt22q4sfRGF3QoAROttKTKPswKB3OMkWF7mi4KDrlerNjUS1fcJY2QJuXp4BcGS5rVkmnXT6Enh6s1wHFoV94Za342Gavtu56qpRGtq1ejrjC4XxJgsIPSVTqyc2WzFxN0tnsRWes1NeZtfGuULPRLDzhusVj8HpYeF9QCWZkn2Gvx7fwwftuzSZf+UlDEiMv5kQOeio67Xptv07U7CWU6+8e8m7Oig5Z7bxjNFVyXfh7VIor0jV6y+d6Mi38jL6DklujZRmC8APa1WaU5HaE1eYO1xOBe7VKQrGaEmQA1UCd4SNwgkbeTdEZd21eJb6eFv4IVPWF0fjQn2ffR0UH3FAawRi1Mf4ihW9O2doX4LrRSyeCb+ErxpXrw9knw+sAvhncopgh8UfRMasFzEYNtxu6WMYvRH5Fg8KfeXa9khsWLjjBcvTXpPCliOpMNqPKYzwofDFtbz913TAqyeNh4fm2bd7gGZ/X68W/zqrdXVwLMZnTMoQqFCOuZ9QLGRMimzmsA1z86paWzXjFmETLyn47OmSxelQvQQ9b7ZlAWphpSNHD4O+iQ27rjpvRgsxmNCAlylkrCT+jBcxjr/DunnKhxGyR1vi+8MpCyYaYjdaP/y68/Kpd240G4W4Hw/JUgfcUx9qoCXdbDSk5Ll9hIuOwDNUWysUzs/qCxBELS9CQUrkOZdRCFpBfGH/elg+tSPHHRylnoFkb7pb8TKJSdPGzrKAl5oacW3KBZ/JC1PnPmITz4mtsu01AN9zbJRBvCJy7JeCsXNrpGE2wfvdjEhSdsJI6MesTfr/16mUYl6Z2wDaan/q+TteBBivhfD/R4h+Cyn1Vs27LjnbaLHHNeOENaqVRlNl7aZPBCNWLTliZSmc2rC8JNwpPeD/QYbZIYyI8b3Tty9UVm7JSy2zWmJucFT59ojTDMJvQngyRx57iF8wLH9xXSrrMTgkVnB/onLCiQ1ZLa43mAiejwk+A2Pkgu4slNaNW8mRc/MvBjX3Chg1jzmLms60fEpShCFQxL8yOqJv8fVF0vmr3cKNBjDsck1VS+HmhVodZ3pE1wSXo86kIstnpt3L0H0HeC439ZXn69Km6w6xcTzzxb9ERW22N4RH+gwpRLjpk5cKU2eqBLeS05wtnZctMmQ3KeSRGU7Yuw4zyet3meeh5hfcElXiR2aF0nneDpoSvaFgGH1Dtvmw0xOxNC9+xT6lrNtsK2Ct+vyI1hG9WfktyT0oZ5Gy2NtF7KH4eymYQY0oC4ssufeIDlyKrumu5ZSVRImnLAc6kBHd66k1FORutw5iKpRdelq1eUJtOUAlavih5P7ORuE1RHJYrLzblTt+iiTHlif9cdMIH2tjsuZdwTgpf2lnv7NfFmb3GOn0oOt9206II35/d9euFr7y3e1HnfnyJPMJp8RMjljlX6b2j8n3ASVD4085qWOihdONIzHoeD5NbmTeVn5hXiZBjw/YKr46tCvPjoGrwclS+117hx/X19gH3jQkwm5NVhHA4R+slC0l0OsSzgKSD3FdFh66UtDSzlyin9P5o1AQ/8XWSEsznKZAgQOn7Ff0hNLUnNB/tIVzg4lcbNTq6lsnR8F8xFq/LsAXUCujsyv9oz+B6Ug4tpBg4X4iXHO0RbNvmDnxZm45K+kB6oB5IGWyj/T4SjeylZUfjn77VyVMJDudaB+zBUAolBPhgvrsoh4+mzBz6QjX80R6BbLBQDvtUewJGTs9gTdg6IKeDcM7ZgoQsidCE8KgEVYX7BSzZL/tOUnJfRz7GPnpkK1x80vt2T72W2fDRRx2WA7Vq3tTbmQNwuqwnQ9lrufig9+2YeitzlEcX9F0ShjRclIF2bz9x3c9cRqTL2qOxnIBWDiWiXAHuZ44TaNOOhVFTEtFu7Bvj2ceL5wa7FLJtDzeXbTF4dCrMn9K1A85e93m3oaXBeTAdo827VLCNwJ7ixa7rSzm4a7eL0ud+xhme+ziKS4JcbTOeObOtj1z2JhGfGe16lZQSvA0dc0kXeEbjnY7ZqZxS8rch+NeDUTlh2xD26wlKbx4vWfhaTurZm2fnQN0bXpeEtnqdJXszUX3c+2UY5eDeV6azWVDkt8PzksAGoMhvSfwUsJeyAFcG02QOHeoD342n2TVsLAt5ZcpV5usE+uRLAtq+Ttm8A7oO0VlCAxm8LTp0pcHgW2sEC9QfabxEHg2oz8KtL1p0+kpHlex9SvXhV9EW08DXuDS468qFmezzx3LgHTMux2SVg7hSfJX9rr8+8Omoyg8Zg/3AKuVtEPcj/kECEi7isqTiAPidj5QL5qWJY6kJicw1nV8nHhE/4TR+PR3KXhcUXQjyLzgo/LiAltK+JXO+2duC02Iuv0Vv71Rw5KqUZ9YreSAvi3w3lJaSmVVKHrAvcUyeCVkXX4MrI4GzX1PPBXeC+bzwpBWLMHNsNg/S19+98pyUSm+dzLer8gB+w4rfo1bp75m9nXUeoG9J/ML4c2mMkpaiuDOHY/OAPrn+uzTqRPUurUj5Nv1QGuZKNZBZZ4f/SEs9U1/nPqRPlMzRZDsFIs0sF988VGacfMUaTynq8JdTTkKxILnOqJzcs98M1+c+EjrGjxl/LQlyJb/5FU9IF/kFDUhUCtg5RLHygF0S0VZof8VW1KV9xaLCd9ZWr4N/xUTU5Xw9mT6URKpzMMh1aY+pz9kLmZVDaUMA/v2qJNIN4ITcvMOm1q0c+Uxl2FL2+tkcoMtGlJz9LIvZrcSxvpJc00bOnuIXzAk6w5Fw8cvBXenHlD11nwN32XQC8zkqg3EIQZ9vqwvLIeBKCKWXuQJLH/h9SOOy6PG2km2zED7Z1BfKeGE57HEAQcLHx8eSyHdnvx+W0Uj4Rm9vMxFp3Oo8XNDi90fVno6zPfF0mAcsKXxpSr2nNIysZVcl2qRHNHomcVx4oW7rTpDUR30xRLs3KThsJWTVym4E6sOmM+FaDpdYfM4ASSlHXjKLXqO4+E3G9Z2eHPCL43KIZ+KzFt7HVFSLDdx3JEgT9ViIOo7xDEeF1zGKZZj9qo8+9an4IRpwjotf9mZfozySGRoGSVSCeLhdwzC9Vk82fSUvZHvDXfO383gpPKlS3Lrv6Hb08LYUdR9AOZoc6IdUcsA9DHAUoRZqlwS6cg88e6vxXKArHT23DSbr9eL3ae5D0DFv/Msh8rpztfNAvu+ZXuAZp35J+B80PrQi85ckJClz9hSXw5xRskTZ+03mgf1afOIgoJvvkRfj4l/RUrMX2bNzeXD3Rrcl0S9t5bKnFd43+JVw1EB3ZMViUhLyqmb/Qnw9N/TNkjAH4aSOL/9GvVqthsZJENNoz4wv+gPQbgyfywOQ3E92ZuSmdrQc+JVZWXasmhR/kOqdUil81ZWyJ/tbg3JEpOYpOnb1nLWj9Cdnf5dEzFWLMnuWKQ/cnInXVys8C8qiXkBEhMt8mloiTle/ztOScFc0jJWD9FcoDE0uH9H4clh47B0A5+gD5XGCA3RTInkHEYPf1KxXCVYL0MsBHEY87JHx5wVnybqifnzqL9smxKcDmVINcdFhK50V39owfB72rm2zDuxLId7hHE0JX9EQF741lzLCrL77sVnod3hOGZqyl+LX4jW7ipRnbr+QB3APp7nT4l/TUMeBtDIHdXPFLS8OFP7UVHRK9qKMPJA/0pMLKocKF5229rC4fGhv36PgsBXtnf36aJ6w0Rmn8xJc/tpvLZK9L3GuzG/YpoUlGqzXAcVh8VNEfd2O57nyn3IcRmvGC38LTG3TZQf7zeAWyZpezoKg+Mb5gb+fOa71Jegc+8+neO2fDiZD5K0wj9H9xEP1Wq120pS1MA8D1Ljfhx8oPDhdLON3Cw/Ik/w2WmOfhoub9LtRva0+IvFR5uzl4+f19lQOMHX2MTUPwyJySR9Skj8Qy8yDT3uLpg0YzQfGrwk03XZKpg6YTP3QE8ufzEadDeVXVO/X2rKgieIAydph8Wvxtk/Yb2dLuwxsuNNUOsgadSdZZdVIubBq1VPxEngqZJ9C1ujX3BQvC1ux0a+7yeqDiNvxWTmqtqywalesPsmq2W+0K1afZdWqWH2SVbdTa4Ln0jFvHwguLfBcPrgmYIBLBzyXj/L3BsD0wYNp1g8j2McHU4evYRofpFOODabXbNU2ofxNWP/ku3DgQnlgbScRilX/LtQPiZ2FU2vgDVC73Wuf/I0Gc7yO6Q/yNrbRBWQWHN6BdyejunXwW9GCg7tl0wDPxp7cNMRWq+j8jg58U9GCCb1lA99c7B32VjDDxgHDqN4/vCZoAk5fHFVwqVjSNAJKBy6UesvOPurX6jW4VBotS7LSl78OlUqnfVjsfWwqAsD8rStfs9aEJDRK2ap5OEPMhffJ0UT8gMS/Sp1QQ+1eCEmMLOjh34JqA+Zkwaf6LacOZIGyYAoOcYyD1yhGLXG8f3yJExIhK1vujVCjJ8zm/S7OIfm45SckaFb23xu0VgXtS9AqQL8H1GnXmifn8BC1lPmrFrWVQNRyAJGFJOJ7RB0HENU/aIdnklEfPKFGw3yY6B2hutBFgOH0zScX3+AoXm+jhp4YR1cTQLjUe+Dmc9S/o9VspLRGJAjg8vpgJJktXq0afF5Wgisf4qrXHMAFSLzqlfLKQqtZSdeHvK7nJIx3Y7XTutCPZuGW3NG7nnio1RYKyiNhJD8wVDYW4lHb8iw08H15LXh7RxUuIgvic0t+JpHMcNfQrjHg225zoD7LGrGG8B2mu0E65z9jEs5BVwdY49RotKYTdHlesfoEq2ZjMhGbsaL1SVrTcUXrs7Ravcn/VrQ+T6vSWp9j1azVO/DCnnDoVPmpf6PTaVV0fkunXcnO7+m0BZ1Jhef3ePqdKVwuVqIBOy738OXGGp+OvHoEnY61XdWRV0ig07FQS7Gh05XNtuq1Ey9gu6olOXM4imgEl5aNq7bvcfUcw9W1iqvlFi0bF9zf0eq7RatRM1++8/3WQ/V2s9beHyY6TKKYrQjf5Q4mAY6fGF/BhWfhTNyyExp/eIO877fn032IFbR/hTYeIG90BR1Zb39olYXC+w2xVru1kbGTQ2ic/aCRQCMbMcAjeCh05svMNgw7H89MhomtoTTabdTNFwRNlq+RbBz8q2lF6x55MeNY7akOScAsOACHoD5Ua4XqNmsQW5E6OxvE1gKMzcImvR96qC2LGcF7AhasDAmn02j17ie7pJ/sTMj9XTN4qKgsaK0NqjSO6hQqC5pKoho2GmjcRJvJznDpWBIkQadW4fkXPC0X6FjbWi0nhMcank6F51/wtNxQPdbwSOlpgMdjwZJ+HJyftOsNuEwsnFaSSadicsik24LLxIJqkUy6zVbVNe4QSreCsg/l4Rw1+oC3jxWVIqC0KyiHUDoVlEMo3XalaT+iUqnaQyq9SlYUKmT2Qbt65NW7NbicbGia33BqQuYESJ46FafT5fr0aoKEA9m+/NX67n2nBECENHtJXE2+iifl4b1GMVkhPx37ex76AYsSDrgcIWsyLyc8XUfw1FtWxCfqtN3gkzW893U81+ETDekZDufoYnQHXe00zMnNhLMbcVQJfXzTadT8bUR4I05g+RhUy+/5dCo+/8qn14bKp9m1zmd0U+/U0GUPDhRd7yIXKM1GjVRUDqh0KiofUllXVA6o9IDLSlYvMy8qsGXFEpV2ReWAShv4wWwBinfTaNYiUFR61nWtgNKGDcWcpOxaCg43lcHoIiA/T+o18e8IDh0bbhGdrU6vz8aoXq/Vag8DdD/xAAHRnF4uFqZBpF2rnTQa8Klk3UV6VLrtFrph/mYvRSwgaIxDvIBclpdV9+oBuhfKBcdogkPyi9FfNK74pHyaDuiZrPPJtYB0HACSNfKtBWT+U3jOcFkYVbdCKuTBDBhH1pyaLo62TKZdPcAFYlR5CCDddiUeWxo/m8LjQeMCFd9p4mg3KxzvcVTS8R5HR0pHEy4OoyftFgdg6TCNA/hmMY2jD/iUNcyiC3lytXEW7UqJ/sLRE1rj7zZcHEY92Z/NfoXj+ZSJrwE5vSUxx9tC2r+bJ40zePd5NQPw39OFagIaTprysvxgOhzsqo6hYVKs1nrG1qK5YepWmP4T07Rfg01J9YGyTk7OD1OtgvMhnG2RpNTZcNFktXPyIbPG3EfT1kkdvOhY5rM77NGYzZMAUK0tiDP/jVPxepzkwufvljzroaOxssX+7vxCU22ufUKbbXUuWwKuOY0IGrdcOOWz5kxyp9R2gVK9ZQNTddb/G5nqlP8PQvDP96zp67zItMCTyVp9qEsmCbcue8eZ+8OGNbJCaHdXfzdt/fznmsuRKRtlhBqtNarX0OXsHBBCy3ppn+C2Spr+Q+aolZL6DcsK4AHAKqL973hSN+Wth2clR4egRjjGQyLN8O39/5m8/78dmdXsAGKlWbaSA6udWqrXpJLaMuo21hWkDyD97+jufUeJSxyTF/wKr6uEfWK7SHfjBHDhi2kLfY8LoMtkAOxzJzIjFveR4HIDF4zpMIkEs5nYhRrycpmwhgac49eK0DtC/+fCe6PUrTcKVGiWN5wmZDiG00QCzgXlBE3roC/LmFfFKZW/G3VYVBogqLSAUYEhKy3Q94ks6ZW/W52SU1nT+Sle0BiL4yc6HWz/Jv5jcSBRztWg15pRGck4/0HCONq+tiPjp0EO8YKwEWM5PfFGQTljccxW735hsP0vY7ZW+aloejUlkHOIZr35+wEZ8fpuXVEObNC3QegvGf+fiswBmSFnUXRyRvCqonNIZ0QjHyqX5uGxZIyLbKxATjYB5QmezwMClVLLovRcpt0nINOxubeuSCA/PVQ0HziVxtBcr9YkCAjYA8smmwlnsOD0FR+q2bAHZ5rwGQ3BqhtjR9Z6jTmOkwiRgKzkqk/HOFwyNc9pDYz0d/fI1LLtqN36/mjUzrcrzAOSx/xnEktXYtueTawU3bJ//gEDrrnPLePpfixsyXrNeIzOpEdHYiCo6qqIQUJ1QxZAMDXaIHfiltMdDaGAUnVWI5syPzIo75lyODvPvnaXC+T0KVmQ6HT49nep2kfEx2ltyzfP5+QlDRyxgM6RtxR2FRTToX6gvjIx/LXkvNAJh4UulshbEzIHA0kVtGxK/hiQJoQ/MSG9BJo8AUSViM8Lxo0BuOHe9BNYoQLIjKSHh3AGIcUuAe4+YTCsVtX2+zdCAK0Ci3LEVmnhPeMROkE0YqdnAXshaeLtAodQAWUUo1+LFMbntfc9B0y/3lOiesB+kqzQJFmtK2T/jQx9e5NZOKFy4MRGVPwexwswGU3gvM7/L/FjONlx4LQmNIpZWMH6FCwZvqpQfQ4Vk0ktcT7CSd+AJxZj/lrB+hSs1JeuWH2KlcyisorVjhVP41QRWnAazoVCPx1uXgEK6IMSzH/js12dgHO5XV9+hIT1zuCqc1CgrjCoaAxkVNerNfbjCtUnUP2JwZ55oDhtjM8K1X+gSt9qiHZvi8bYF69BqY2BiG1MgyDN4CSBWBH9p7IaMsGqzsWvUauOyM9Qq/T+Zzk90BnHcoUVqh2qOafiHU5H8g+gUDJe/kiXkj0x+B6EvBmT0Hnat+sMcJ2QBTDb+KZwiH+QV8YFngCsgjbM51Xakt/FquUxtv12uMSr2Sa7LDPwT/L1aqNJXlcEx+k432QFF0i2IJ0ekE0cXAhIskIbdSyEZpqsZoEUpEpBbzF5a45fKxw7HGmQ+5e8yGqxX9+N2Q8pOzvNU3ZkT4TMJbOL9M9d5glN8QzO1c56raWjgjZL+zoaeS2PcbkOHKDNm4EBo6WbjwAGfRsTsV5AufGmwqhtH9F2jz1g4dVDwWRZlDYnGKj7eCoRQ4JD41jsnuj0TJg48/TsAsKjpXU8XWzXpQGEE/wcLzlLFksgSJo9rT2jjWQY4NVa+OMXAQ4XRHgOyTqAc6uuradR9OkwASeM0hZCMIgoW6hnHEglH+9wiF2zIrI7JongiAgsKOjbiMTCdpELOxG2DHsqir2SO6jzn+tALK3i9B+cZKu7kzsS0SjGIdwwKSxMaRij2om/RSesn/m7xh5AyDS0HIjcuIyS1epV0PkBJm7Ra9sFkwhBCaCwsOxWXbEIjMetsMjWi0sfxXW4uS4EBIdCw7RgXMul+UupQ2QweBNG//YrLAHl/LEdl/iY03fhem7+eh0ioXB8SCUWtpG9wal4bHhw+kR9giay92jFJGVyR+aJD8Zi6do15e6SdZxwAmnP2A5UeCR4OhGKRBavhQt0RwKCI7JJqgBBdJi3bBlmRAMSwtlEdVWnGJcZ8VWc0BvHCAgUu66QF3NMQzASYjlAvqMB63KbZSgPYm1ASNj2lR8oeZGHzWWAowgIE800db5M0LcbOaEEUPmHrejkUpZykp8bv5DL3Fs4J2EERtP2dJSKrFOVHTzflqeNZ8QS6TtP6JqgtAr27b2B8Orr7LL8eZ0HxI859VNYYCBpGnj5Y7qgP2VjRXmsC7WEpsmMRDDlS9VT2Y62/MldYcrXNATHqf+f8xHNYoK0/YDp9P19Jm1qGmy2IFTjAII0vSd2QcNQ6K+K2ReZ/bFpYAkVnfXj8YBdwDbRNPEDsDf8oAlcGrSvYH0OlremvDDdPg3g2rNcoWKzLWTpDkQ4nKMLLquonDDwMw6oy5/aHZkJgwwMH9Wwb9qlk/YGT2VKbj1FpFAdCLTOvkxla5VgGlqjgpYdWrOC9iG0TSZvImPOINV9H9YRubG7YKJST8Z+pulb+bOaLml4ckGDFTr/gdeMA7pApDfkNn9U9ycf6CwgrIBFCu+RJ39r7lIQ2jSzFf0pUV2HJzc0JGh7T3osX4VCqK/lMaZL0ebixVh8blhc9DxpPS5/hQQDasrQtYhC/NcyfjfBMZQ70o2ODRzrZLWOTof4B41fQU3kaTT3NWwmW0cu5MssyNuwnRQIGB9W2S6drjUiYBzUxh6Rrj0iULxPazIi23iA0h9aZQI6JC5xhLZj4WCg6DYsyYQk8W7yGwwaB2WAxg6WS4I5pC3S7u5HE+qmQFwxTv9hYbxVnkBw1NvKFPi6MSBFuk+pw2FCuLzGH4gPDASFGs3tm0KRzmqCtD1Uy6JjngQYu1N1TsztEC+ZrYSbR9MaYDjCUa/tA+lmur+lB0TIBWAS9Z6xjSK7ucKZRNLfb/mWLQ+mgwHedOF+f19bGDtEHrafFRKMutLspd4ytUHQCZrT8L3vDgWJXkx4i6Q2ur7VAvM2M7nC8h7Lue+nEuOjR8YrNvts0ts1bIUXIYFjtAOBI/39ish7Ilevc46ToBKUfSw39P8ldI7+JFCuDwPhckd8uubMT0vtKzR7aDYZ/80g+grNezRpvKBCskMiB1sLzbIJoHzbqBqo9fFfxPOVidbv8WzQvPMLKj4f8HlzDyo6H9CRxl4F5gMwlcb5LZrNmn6k3crWAfbJihSm0XPOpDhbyCyyhLWpVaowfYBpz2DeGocVqA9ApTZiReY0Imuclu1Hp5d8UwPo7V76Q46dJHEcvB9FCYOYXnX/2wqzx5Hf8dqMl36Hq0KzQ7MvQvQJbOMPu3SEy/HqB4D65wGjowSXK0r/RinaXHWYcGkC0Fj+rAKWEZhUV48EjAUOjNuE8BUOxYLRON2RFaYPMckuoAmnSJiYyUyYTBWmDzGJfVYh+ggRC+icPtG0D1jAIgImdAKNjpyNULF5xyadDLvbU6UHI16TjusK+0sakuj0/GfMk3SqMLC4SF2nYYS3WaZw/8fbheZJClaYBByoCQkC4Zn8I18ENHBCjScBACVjt+A2HlRMd0yIFRijCB6m7Xui7Tuib7/uE1XQPg1tVxtcIdsi+yE2Hwmi0zMMpdZImRyUrd3Pw2Y5OhjQt2vvOxT5sAyDcxLI+NCIJ1BqgJXb7xnTRvkiASUqeo00tMEk4fN2Mk569+IsXQkUNprJRl04AorwKWKCpjh8hoJEkZeuUdUylIZLOllKbKWUivhzKCxlwqEWdnZNi8xvAaFvZ4yBiUSrnLLNFTg2p0oLfRLVDVmA7SBdr9lRTuhbGnpNBwVsKvrSv17iCFC3bcVEzDZ6SBfVdjBTdcAdgJHmIeMI2mAvrbaXulAuGPfJ/GTE8VMsyLC0yGoKqGmQcme5n+nOsjadhIfYh3KTXclhWEHRgMnC8LmdttYSnz6AIhrN/ZZBZoMSksYVC+A09OzaDNFc4eBpMxZx29pz84ZA0BzYcd1MYxt04VyHckY86PNmv12IWRfzT+w/C5tt7ojoZGquo8vmr5D5zycsiSGFPtt1i5oGUjtppZlKr2cYhNwtdwQDal6n5gkydZfRJSJrktBZEjwjTxDBCyh2it7sa10qaV474fQfoWFBq9aGWXN2wtkaDRbb4mMYSKwqFFiapGXTnH27eQUpjmQ1vr2pbxxxCubwtcxjc8Igb70kHMpBYzc+sAvlgz5kzLo2gNSHVX0qOcDOFmbrv50Pj7dsxRmOwFxDVDtEWgJTFW/8O5o7xp6ggulb5pJOqYQmO/sxk7pZH3DHSHxyOFeaDo5mC0fSFok0WyCfTj0LaEZUfkDYisYuFik1jhxVDQukLnAQEWBgFCu4Xm9Y4BKwTYsgyFvLvJ+kgAGvks0CApQsrLf2lXCmiVa5gECPNF6iCfafAbWmtUplM3wCWji72dlnYjTrLltBoG9nBFJTPyXfYR5Hau9WPFIe8k9pzz09CRdAwBlRvCJitWBKatVkqlGV8otPau9uzDh5KHsJf8I+QdfhnMpeh3DuFCvGXc8mr/NwU6N9xtPqFjAy1bHpQf2G0aYnVOpGyeHs4kyHQsvqtcff0NoiOtnVkW3Kp8AQa8AjBulKieqANow6oL8BdAdpywEUIO+ZcjgqHKQITZeyQV0grIIoCUBZBTAEiq3AZPj6+2Xz2UYw5wXkIgmCk2kyIwfn2ZBROG0xGjajYjtWEwrmeAchOx5ZUQdkp25adiLx2aJTHFKhiKPTMznwvP7fMJ5oEAxZIING4n/UrKX/iNejmLNnsvtJyNLZpl8EdQD8QK6UeaWHR1q6uA9ppT8ZbFaty6vhCC81n/zBQOijAxsR4o6A9RQr4LCy1gwvVwRsF2z6fezp+LzYAn0PhfcmtKyj1A5rp45PLfE/UXIIgtZbO4XdCXmYHzg6rgvhxqArHPvCf3l1hJsiZR8Uhxwd218kDD9T4wuRV//wBt/ReY0Ziz5RJQ4Dl2KLWRCvW4aE9o/cBGbDtvDIZ+apg6B1UMRlwdb3AhY7Y1Ps9wLpWbApvBA/O6q9rGzGGM8+0ySj4rXhNSXz+Ss6+9TAdhDMOv/ZnudozJ4Ym8vun46Q0pauC7Her2Ia4jB6uwsQEFfMiW7LJjP29EQc1V2dzEejDqkRp6GsP0SPOHYpEGZTuhRmDUeYdTsWmV3gKEbpG7gBS9mUH1RhHROW+IKm3J0YmELrg2thR6T1V0ifnNH1+0GculFdf0eiGCcch7Ezel5tjmdUZ73j5YqOV8pE6rXMUcIvAlsSHMRLH3NyOgjEZwtxOpV+TObUp6Ez21NxiTIHDa/eMGgyDIXsLUlEsSvklPPSHrkoolEqezeyGXco7TTvVfztE33nQJDs6ZppeZE845iGjkADI35DzOdUrHnhTBpOiW1kNnRzJEeQF+OnJzTgxBm91wWyW4c4XiKxOle47YvdR11ITIGTv+BK2qmrWwCUF7URwU+uMOuDYcZXOHbqcFDQZa7Pyw0dFSuLnQl+q/EQa+bI+aujrpdVZOjRoWK9pmYWLy9uF3hFg1c04dgX63BG7HRTe7nhozyK0YA6GiC3B+6ShEQswNGjwd5+3bwPOp8nm/vvjvKzJnfifbg7gfR6TTknMgeG8+XWcISbKm6Zi7tzw8aiNY1x4IzEwdmoO3KuyFxPN+mVF7nr1SoJ6T/p8eDM+QrF278On4iwhFkSoRGNCHa1ct4mwbUQPfExXQEHJXNzLT5gGMkcmAyqu0IPjtil+evAteR1tw4E4F90HhJXQpxgqN0koTt3hRRo1pzYMV6tmPiZK8l9MEou1W1ppxvxQddyfgN3BaFyk8haoHiH8IbOOHbn2i00CbwjPuNzZzQfHHxhvGk1GDhzCVC7aj83eHfXjiADE3+6JQl3KXUNRtZuk5hTlwLsutcC8wL3PfRdEjgwJ8P3JEYTpwIn7Q4QkZssMV9h3xWRazeBiNxk+RqlxpxsoInXrvBTXQlrcndHFlSs3Kk8LJRgpydeQDc4XCSfmpUNAp7a+K5nLRvrMZ+KfesR/oP67tTXQUnyeAlfuNNy66BpjTVu09HIEWZg/Igpc6fbz8EI58z3XPOidh+IYzViSehMXZ2yRa3ZJI9LQgJ/iSlHA18cDRGdBcSZ6pPdhX2gGBuOYrSm/T7G2HQEo9p6w6w0hjhOZGE75s4cINrBlNt0zV+H9Weypu7kxHq6lwB0cY3xWmzHG3cuhfVsC9gYc2e8LeusCPcTZ7ysXdt/e5uRORNF0j4YdVndknWcOFPipW2O6eKaBEnMHIHV0Y2O68Ly5B+u7ER1pKLxneiF7OUpcKdFr/W96CWhM+64dlI5D1iuON0gYLniWls3TiWsVgXrc7CmURLiFXUFl5IfNo7rnuMwccVN7LQsq60H4hAs3Tt+X4a1JmwdkNMzPHt1xnxQ3MR6rZEV1yRdtSYuVwyIrm7yQ5fWcInDRdp5MXaqpkU316vNjYViwYnvEDM1kGpc1i7ICjszp0S7B7surbE7rNSWFW/fm6Tljovd1I1H5AHLlROyqRt31oaVrFauJDTUJuzGYU3InIgVU+zMoagbTNUl5i3Zi0PjXNR6WPPKawvMFf2lBnKM+0OeWG0QOFMgoVa+Zr81rAvsPqQR+ekILjUCbdzwesRiKcJ/vGNs5YwWU9zuL/S0zhWbK7qsp1vMr08tkOO8HMHVtm2NPbKVQ25RS7vRfD68XNmNLWviFeEnEr+enlG2xP9g7krBfr2m+JKZJ2h46cK/TmyIE4cChtrZbW1cS7JKL6s+Erx2FlvmU1IX2wUOgo1t4T+7kmXTbracBzSWxMhbksCdcnLrW/SC4wV1JlDd1a2+18V1hcN5QNAjjZdOdXzU7SKnzY0uluiBBTFeuHOzrWX7INij5oxZqxuRzZWaM8V1ugVQutT+ImSNRs5c/dC+h6XL69aV4nzrJsYtC0+uWUj/SW1aPKdOFaoo4y4zx2f16aHzMHZmXwKQNuStmENRRuvu5q+cLxpyFkUOodMtstZF55o2eyvn/PJsGl1iXkDX6MqlqGNXO6ytzSxmnKA7YdbG6H7tjPvUte0IKNxccaAsajWfktAnp2JFjGNBzxmrQxvZZuUazMZ4ERJX2oB2dS+Q5MCL+sLY8NnalRia9qUbfWa3iR8Q7E6xmX5QIzdkrip/C1L2SMP5SrBwhJg6qN0ksTXjcXQ6WK2XNCbYobSTbumBl65cAxn3l+5081RFLLse08R1hiMyw85syba2EtPlRUPmJ0GJGj9pE2PCI3/BwbMrwHSvd+UALEY3OAl9Rzv9tTNXsusiG+LV2qGrEor12jWuxba8HDVd21Z4PVF3ijJsWxWS14K71LFZ8SezR6+1iYXMnfoVNXeZvVw2F1yu6C/1FnTLvAJLuy7f0CdX4ojaLfu1iQV0NXMoYamdHdflJRO8aCh0fsxfkfdMZU2Go/rsC8nLY9BzRb2psmfe/H/1A4e2qnJ4Ghe2EeUxOqPOdOlU5csCsB8OiZd2NkmXFnsJl4KEc4eAImbGjVoVnKP637xCO/9JuE+jSp99ktcF5eSFMVec84POItnrpLSBRUuXVNnBkLjsxcU5EXNGhym1eHXj2n9HbELdSfbadtIlMzQMCA4dss/2Ja1jfGtessCVCT/q+Afjtqxk5Y5oabcV0ccVzlmAHcGlPTpaF9cVFvr+MqBzd0RMYdbpGGdGn505H7Wn1+QAyyHRUoKwxg/GK8ZlMZT/jKYcU1dKoqxH/q99grbGa4Xs88i8Zxw7hGzftPjKXSVdZsK0YBx5L3S1coibbRvjTxLLeKKjuIybF3/hV+xMpaJtNXZDnwj6UxyYzlxPOgiMGWc2ZjHjM1ni6UowUREz88Urv5A13ETWNK7GJtQPqe9ayzLbVRhbalMs59I7uj07xp3MPWqO7lDzFYx3OFwQvhuu5I602S4tVrg5I2+6s+K0uTH/GTlW1Kg9aSkfaHJIgkvjvOzv0XSsxCzALgW2bZdN3bEXaeO6gks5P+vGcSWhQ0lftWON+S354Agp1Zw1XkzsYRqgM4d2onaXAm1gIY0xf0UjKl6JcODaxFDbroAnPppwoB4oeUkhOcJNe0CaPrdkhpFbxdmKrBnPcXqERPjFTVpt4wEhjwRP6DJJCzSqpHAmck5HHo0nN2UymMxkpwx3dFnHtnfuPVP0Z7JaO8JrV9Bij1dA5g7Jl3pPzngSRfAia6n5HVNmfdvKbIWDjQvlVhsb+7cmvDANAvG5s8Jm3tAQyFZs5s6kIdUFML89BTGh0hhx5yhQu0GYl7KEO3QPQG1hZh7XtkjPnbTmvq2xa8togVjDFWJKVVDmYdw5EHNnQ+p3+tekNSVhSJ3pWWnbqKhCPRlgybi1I6x2sX1rLvijUylx7flB2rTEB4vSZhgVsk8iW+KApKkkh6DZbuos+9JHbln41uWMsTm6xPGScIeoWSuMiom/PB04VPOvuyWnYsEanBz1gvqZvSAdTkO8Ihy7KlPZ20TlwMpRucoej9BiRYIATZabFbpAq6Vr1mvRYqsVdrXRtVnFLlCtE4cSabqjM7RYceZMYtumTJ3/X+K7UjGnRpkzVxpqgZK2ujuDBNX4stHNlzZIdGjeg26bLB1WY2dDpV2j1vqEvbhz8tUtnnxy9DVzBZRSoZq5RkkLlOe5gslmOGFKArKW3owznnJrP071hXRhPrxc8ZabupWo+eBqOoJLmdH81l7ZNK+WK7zqILRX2xFcVnfjvXfmCKaWbjm4DqYHOicMbYKijvBSbIiW0TPxEW+ac4+xL/50xS/s6jad+CoyjsM0T5heAz1tocclEWrMGe9HCdNkPx731q8PcED5DLuSZFWH3fWz+0T541sH2CH7X20flj1OcSyCrngE9dq+C9XOHmo9FkJXvIS+dlLtWARd8Rv0o2jHIuiKK6HdNetoBDuuENzfxV/x9Y+FsOsIQvVaYCt74UreCFezRCD0XfFDtFtU5g4w9JeMu2MP6tYtHomfK9ag9pyqI/FzxhTUrTY+Ej9nDEHtQqKc+Z1R/9V3KCADzQzc8nPnANFtqncsgM6cINp5/iMBdPQIaWfPoR0JoDNniAIQjA50JpawfwhnbyaXO8AkcvUAAXACC3iOHh4N+4eHgOfowdHM3JPpGPBcOTR6+xHorxSS5UxviB0KuyidmqwrPQnPFaWnRk3tb1xJz1WtB0L0XNF62o0jjwHvhvnOzBVU6l+slx/IFt9zMkdXdLF8wa+OYFSb1lnfwxeEc1fgKTLYsR4vkFfCYp64s4mVE8R63veC8eeAPjlz/1A5RKwXEF1id8IFHe3a5iPAc8Vy1q/aPQI8ZwxnaFVrEp4rhjM8yeMsCedIeVs3YKoWjPWc2xXmM7lwF+llb2KfOz0SUJ+t3eleogZgOtYDMG65bx1oRRt/ErJ2xgJUs23WhS+l54oJqN/8JGd6N2LrxkuWRA7VvEDbv+8YuiKHbWgG4ZitydxVEbR/CWmDzxXpA1exMWYx42nVi5sEO9YzIRMs1oGD4BV5yWxF+EKI4yMn7kRVldSIdaCyWRIWUonSXuluUuxb39iez5hD+JRqXvv4CI7RGQlcie33oF3MFADRRF6KcwQguAtd3pK66xtbjwym9JyxCqGVok5x6Ir5osYE29bDqlP8kzoCD5zVMmUvaOBOQFXhZ78iQbyfH7t0DVhpX2vd+dgBdPTosF/YJufMhc7IXxua2bzB54r0dXSnsh4HnzOVHdDusG7weS4XJYCQwZUzClB13CBYMCtn9J96gxXABk78Z3eErw9O+CQ+R6WvBUDzSXzOnL5K9137zm+Kz5XKSnC3WDf4nLm7r9ygtp5I3+BzpQlgF1zINMXnSgNA9eiwfvLeh0RAQncMOzp20H7C6IEsqexe4tSdOAWilfjfDxKcDjinP2Q7/ItA1rRFjvA7mHvyFQ9ErF8LHHtB5zhyJVOu3oL7it2SA7Hbc1d45XDS5sFL7PGlI8h2MmUb2aMjvPKoa86Bl+fMlgTCiyXVlsyIrNqSmXg9EnfsCqW1knG74gwvFnjhTL2dYoYZN1zP3KlxUkXrK16SJis+Ixx5S3cGuO/r+6+1idNjRnASvyIPB+6kUjvWoTH2jAbhXNoWAg91S+aUM9O4SpNNue7Ep8OuTC9XujN8bZSLJrJoSV29JvGlWgc9XAzHaLh053aTWh78pcmHesgSzknov6Lzn/4Sh+4YaIqsGbdnh0kkFuBKJFa10b6STdbCNWIvYRRjyl0lZlzARpyGz2nMnyXi0KSumGk7X8neqTnaJkumLHHm6GxYPjrPA/JDXmt1hFdHNc2M+wLnkfjUDhFTL1J/paIjH2BIngWuUFNOAfP78o3avTOOpmKamd+aCWeOsOopVxSMB7LPf1JnQthKAMO4RXYlzFc/cQVXu2f7iLxiMXEl1qOW+tiBha7DJ8ZXTl1wUZquGz8hr1crKl6ukGVA9kvK3LmNYTvl+x5awxFobdvVUXIIhzPx624Od/U0aUVxml+SIR9HK437X7njrUVtnEQkWblCK4eeFlq0bhmaYC4Di64Qs51V2uJy5qTs5jAGJxdgrpyS1k2LiSSDvj8J8198QmeLyixsTYfOyTzam+vBEpIlPpwjuLq2I2OytMeZZKUiW8ZtMM+p1K7tOzZTKryiGI2xv6TOtKDsWY8nbrFNEu4vceQKN+t7c5qEoTNxWOsJkfu1W2Uqii7Tk6726P8D";
Sidebar.prototype.gearImage=GRAPH_IMAGE_PATH+"/clipart/Gear_128x128.png";Sidebar.prototype.libAliases={aws2:"aws3",gcp:"gcp2"};Sidebar.prototype.defaultEntries="general;uml;er;bpmn;flowchart;basic;arrows2";Sidebar.prototype.signs="Animals Food Healthcare Nature People Safety Science Sports Tech Transportation Travel".split(" ");Sidebar.prototype.ibm="Analytics Applications Blockchain Data DevOps Infrastructure Management Miscellaneous Security Social Users VPC Boxes Connectors".split(" ");Sidebar.prototype.allied_telesis=
@@ -5874,7 +5896,7 @@ a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));a.se
function(){var a=new mxCell("",new mxGeometry(0,0,240,100*2.3),'rounded=1;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#ffffff;fontColor=#000000;align=left;arcSize=5;strokeColor=#000000;verticalAlign=bottom;metaEdit=1;metaData={"c4Type":{"editable":false}};points=[[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];');a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));a.setAttribute("placeholders",
"1");a.setAttribute("c4Name","hostname");a.setAttribute("c4Type","DeploymentNode");a.setAttribute("c4OperationSystem","operationSystem");a.setAttribute("c4ScalingFactor","scalingFactor");a.setAttribute("label",'<div style="text-align: left">%c4Name%</div><div style="text-align: left">[%c4OperationSystem%]</div><div style="text-align: right">%c4ScalingFactor%</div>');return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Deployment Node")}),this.addEntry("c4 database",function(){var a=
new mxCell("",new mxGeometry(0,0,160,140),'shape=cylinder;whiteSpace=wrap;html=1;boundedLbl=1;rounded=0;labelBackgroundColor=none;fillColor=#438DD5;fontSize=12;fontColor=#ffffff;align=center;strokeColor=#3C7FC0;metaEdit=1;points=[[0.5,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.5,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];metaData={"c4Type":{"editable":false}};');a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));a.setAttribute("placeholders","1");a.setAttribute("c4Type","Database");
-a.setAttribute("c4Technology","Technology");a.setAttribute("c4Description","Description");a.setAttribute("label","%c4Type%<div>[Container:&nbsp;%c4Technology%]</div><br><div>%c4Description%</div>");return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Database")}),this.addEntry("c4 relationship",function(){var a=new mxCell("",new mxGeometry(0,0,160,0),'edgeStyle=none;rounded=0;html=1;entryX=0;entryY=0.5;jettySize=auto;orthogonalLoop=1;strokeColor=#707070;strokeWidth=2;fontColor=#707070;jumpStyle=none;dashed=1;metaEdit=1;metaData={"c4Type":{"editable":false}};');
+a.setAttribute("c4Container","Container");a.setAttribute("c4Technology","Technology");a.setAttribute("c4Description","Description");a.setAttribute("label","%c4Type%<div>[%c4Container%:&nbsp;%c4Technology%]</div><br><div>%c4Description%</div>");return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Database")}),this.addEntry("c4 relationship",function(){var a=new mxCell("",new mxGeometry(0,0,160,0),'edgeStyle=none;rounded=0;html=1;entryX=0;entryY=0.5;jettySize=auto;orthogonalLoop=1;strokeColor=#707070;strokeWidth=2;fontColor=#707070;jumpStyle=none;dashed=1;metaEdit=1;metaData={"c4Type":{"editable":false}};');
a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new mxPoint(160,0),!1);a.geometry.relative=!0;a.edge=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));a.setAttribute("placeholders","1");a.setAttribute("c4Type","Relationship");a.setAttribute("c4Technology","technology");a.setAttribute("c4Description","Description");a.setAttribute("label",'<div style="text-align: left"><div style="text-align: center"><b>%c4Description%</b></div><div style="text-align: center">[%c4Technology%]</div></div>');
return sb.createEdgeTemplateFromCells([a],a.geometry.width,a.geometry.height,"Relationship")})]);this.setCurrentSearchEntryLibrary()}})();(function(){Sidebar.prototype.addCabinetsPalette=function(){var a=mxConstants.STYLE_VERTICAL_LABEL_POSITION+"=bottom;dashed=0;shadow=0;html=1;align=center;"+mxConstants.STYLE_VERTICAL_ALIGN+"=top;shape=mxgraph.cabinets.",b=mxConstants.STYLE_VERTICAL_LABEL_POSITION+"=middle;dashed=0;shadow=0;html=1;shape=mxgraph.cabinets.",e=this;this.setCurrentSearchEntryLibrary("cabinets");var c=[this.createVertexTemplateEntry(a+"cabinet;hasStand=1",250,500,"","Cabinet",null,null,this.getTagsForStencil("mxgraph.cabinets",
"cabinet","cabinet ").join(" ")),this.createVertexTemplateEntry(b+"dimension;verticalAlign=top;align=center;",250,40,"100","Dimension",null,null,this.getTagsForStencil("mxgraph.cabinets","dimension","cabinet ").join(" ")),this.createVertexTemplateEntry(b+"dimensionBottom;verticalAlign=bottom;align=center;",250,40,"100","Dimension",null,null,this.getTagsForStencil("mxgraph.cabinets","dimensionBottom","cabinet ").join(" ")),this.createVertexTemplateEntry(a+"coverPlate",50*4.4,125,"","Cover Plate",null,
@@ -9802,8 +9824,8 @@ DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:
DrawioFile.prototype.updateFile=function(b,e,d,c){null!=d&&d()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(g){try{null!=d&&d()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=g?this.mergeFile(g,b,e,c):this.reloadFile(b,e))}catch(k){null!=e&&e(k)}}),e))};
DrawioFile.prototype.mergeFile=function(b,e,d,c){var g=!0;try{this.stats.fileMerged++;var k=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),n=this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement);if(null!=n&&0<n.length){this.shadowPages=n;this.backupPatch=this.isModified()?this.ui.diffPages(k,this.ui.pages):null;var f=[this.ui.diffPages(null!=c?c:k,this.shadowPages)];if(!this.ignorePatches(f)){var l=this.ui.patchPages(k,
f[0]);c={};var m=this.ui.getHashValueForPages(l,c),k={},p=this.ui.getHashValueForPages(this.shadowPages,k);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",f,"checksum",p==m,m);if(null!=m&&m!=p){var q=this.compressReportData(this.getAnonymizedXmlForPages(n)),t=this.compressReportData(this.getAnonymizedXmlForPages(l)),u=this.ui.hashValue(b.getCurrentEtag()),v=this.ui.hashValue(this.getCurrentEtag());this.checksumError(d,f,"Shadow Details: "+JSON.stringify(c)+
-"\nChecksum: "+m+"\nCurrent: "+p+"\nCurrent Details: "+JSON.stringify(k)+"\nFrom: "+u+"\nTo: "+v+"\n\nFile Data:\n"+q+"\nPatched Shadow:\n"+t,null,"mergeFile");return}this.patch(f,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(z){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
-null!=d&&d(z);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,z);else{var x=this.getCurrentUser(),A=null!=x?x.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),A,z)}}catch(y){}}};
+"\nChecksum: "+m+"\nCurrent: "+p+"\nCurrent Details: "+JSON.stringify(k)+"\nFrom: "+u+"\nTo: "+v+"\n\nFile Data:\n"+q+"\nPatched Shadow:\n"+t,null,"mergeFile");return}this.patch(f,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(A){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+null!=d&&d(A);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,A);else{var x=this.getCurrentUser(),B=null!=x?x.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),B,A)}}catch(y){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),d=e.document.createElement("mxfile");if(null!=b)for(var c=0;c<b.length;c++){var g=e.encode(new mxGraphModel(b[c].root));"1"!=urlParams.dev&&(g=this.ui.anonymizeNode(g,!0));g.setAttribute("id",b[c].getId());b[c].viewState&&this.ui.editor.graph.saveViewState(b[c].viewState,g,!0);d.appendChild(g)}return mxUtils.getPrettyXml(d)};
DrawioFile.prototype.compressReportData=function(b,e,d){e=null!=e?e:1E4;null!=d&&null!=b&&b.length>d?b=b.substring(0,d)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};
DrawioFile.prototype.checksumError=function(b,e,d,c,g){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);var k=mxUtils.bind(this,function(b){var c=this.compressReportData(JSON.stringify(e,null,2));b=null!=b?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement)),
@@ -9867,7 +9889,7 @@ LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=fu
LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};
LocalFile.prototype.saveFile=function(b,e,d,c,g){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;g||this.updateFileData();var k=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var n=this.getData(),f=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=d&&d()}),l=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var e=mxUtils.bind(this,
function(b){this.savingFile=!1;null!=c&&c({error:b})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(b){this.fileHandle.getFile().then(mxUtils.bind(this,function(c){this.invalidFileHandle=null;this.desc.lastModified==c.lastModified?b.write(k?this.ui.base64ToBlob(d,"image/png"):d).then(mxUtils.bind(this,function(){b.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(b){try{var c=this.desc;this.savingFile=!1;this.desc=
-b;this.fileSaved(n,c,f,e);this.removeDraft()}catch(A){e(A)}}),e)}),e)}),e):(this.inConflictState=!0,e())}),mxUtils.bind(this,function(b){this.invalidFileHandle=!0;e(b)}))}),e)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,k?"image/png":"text/xml",k);else if(d.length<MAX_REQUEST_SIZE){var l=b.lastIndexOf("."),l=0<l?b.substring(l+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+l+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(k?"&binary=1":""))).simulate(document,
+b;this.fileSaved(n,c,f,e);this.removeDraft()}catch(B){e(B)}}),e)}),e)}),e):(this.inConflictState=!0,e())}),mxUtils.bind(this,function(b){this.invalidFileHandle=!0;e(b)}))}),e)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,k?"image/png":"text/xml",k);else if(d.length<MAX_REQUEST_SIZE){var l=b.lastIndexOf("."),l=0<l?b.substring(l+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+l+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(k?"&binary=1":""))).simulate(document,
"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));f()}});k?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){l(b)}),c,this.ui.getCurrentFile()!=this?n:null,e.scale,e.border)):l(n)};LocalFile.prototype.rename=function(b,e,d){this.title=b;this.descriptorChanged();null!=e&&e()};
LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};LocalLibrary=function(b,e,d){LocalFile.call(this,b,e,d)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,e,d){this.saveFile(b,!1,e,d)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,e,d){DrawioFile.call(this,b,e);this.title=d};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title};
StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.save=function(b,e,d){this.saveAs(this.getTitle(),e,d)};StorageFile.prototype.saveAs=function(b,e,d){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(b,!1,e,d)};
@@ -9883,11 +9905,11 @@ StorageFile.listFiles=function(b,e,d,c){b.getDatabaseItems(function(b){var c=[];
StorageLibrary.prototype.isRenamable=function(b,e,d){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,e,d){DrawioFile.call(this,b,e);this.title=d;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,e,d){RemoteFile.call(this,b,e,d.title);this.libObj=d};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,e,d){};
RemoteLibrary.prototype.saveAs=function(b,e,d){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,e,d){StorageFile.call(this,b,e,d);b=d;e=b.lastIndexOf("/");0<=e&&(b=b.substring(e+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,e,d){return!1};UrlLibrary.prototype.saveAs=function(b,e,d){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,e,d){DrawioFile.call(this,b,e);this.desc=d||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*
mxClient.IS_IOS || */
-var StorageDialog=function(b,e,d){function c(c,k,g,p,x,A){function q(){mxEvent.addListener(t,"click",null!=A?A:function(){g!=App.MODE_GOOGLE||b.isDriveDomain()?g==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(g,!0);e()})):g==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(g,!0);e()})):
+var StorageDialog=function(b,e,d){function c(c,k,g,p,x,B){function q(){mxEvent.addListener(t,"click",null!=B?B:function(){g!=App.MODE_GOOGLE||b.isDriveDomain()?g==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(g,!0);e()})):g==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(g,!0);e()})):
(b.setMode(g,!0),e()):window.location.hostname=DriveClient.prototype.newAppHostname})}f++;++n>d&&(mxUtils.br(l),n=1);var t=document.createElement("a");t.style.overflow="hidden";t.style.display="inline-block";t.className="geBaseButton";t.style.boxSizing="border-box";t.style.fontSize="11px";t.style.position="relative";t.style.margin="4px";t.style.marginTop="8px";t.style.marginBottom="0px";t.style.padding="8px 10px 8px 10px";t.style.width="88px";t.style.height="100px";t.style.whiteSpace="nowrap";t.setAttribute("title",
-k);var B=document.createElement("div");B.style.textOverflow="ellipsis";B.style.overflow="hidden";B.style.position="absolute";B.style.bottom="8px";B.style.left="0px";B.style.right="0px";mxUtils.write(B,k);t.appendChild(B);if(null!=c){var u=document.createElement("img");u.setAttribute("src",c);u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.width="60px";u.style.height="60px";u.style.paddingBottom="6px";t.appendChild(u)}else B.style.paddingTop="5px",B.style.whiteSpace="normal",
-mxClient.IS_IOS?(t.style.padding="0px 10px 20px 10px",t.style.top="6px"):mxClient.IS_FF&&(B.style.paddingTop="0px",B.style.marginTop="-2px");if(null!=x)for(c=0;c<x.length;c++)mxUtils.br(B),mxUtils.write(B,x[c]);if(null!=p&&null==b[p]){u.style.visibility="hidden";mxUtils.setOpacity(B,10);var v=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});v.spin(t);var F=window.setTimeout(function(){null==
-b[p]&&(v.stop(),t.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(c,f){null!=b[p]&&f.getProperty("client")==b[p]&&(window.clearTimeout(F),mxUtils.setOpacity(B,100),u.style.visibility="",v.stop(),q(),"drive"==p&&null!=m.parentNode&&m.parentNode.removeChild(m))}))}else q();l.appendChild(t)}d=null!=d?d:2;var g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";g.style.paddingTop="0px";g.style.paddingBottom="20px";var k=document.createElement("div");
+k);var z=document.createElement("div");z.style.textOverflow="ellipsis";z.style.overflow="hidden";z.style.position="absolute";z.style.bottom="8px";z.style.left="0px";z.style.right="0px";mxUtils.write(z,k);t.appendChild(z);if(null!=c){var u=document.createElement("img");u.setAttribute("src",c);u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.width="60px";u.style.height="60px";u.style.paddingBottom="6px";t.appendChild(u)}else z.style.paddingTop="5px",z.style.whiteSpace="normal",
+mxClient.IS_IOS?(t.style.padding="0px 10px 20px 10px",t.style.top="6px"):mxClient.IS_FF&&(z.style.paddingTop="0px",z.style.marginTop="-2px");if(null!=x)for(c=0;c<x.length;c++)mxUtils.br(z),mxUtils.write(z,x[c]);if(null!=p&&null==b[p]){u.style.visibility="hidden";mxUtils.setOpacity(z,10);var v=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});v.spin(t);var E=window.setTimeout(function(){null==
+b[p]&&(v.stop(),t.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(c,f){null!=b[p]&&f.getProperty("client")==b[p]&&(window.clearTimeout(E),mxUtils.setOpacity(z,100),u.style.visibility="",v.stop(),q(),"drive"==p&&null!=m.parentNode&&m.parentNode.removeChild(m))}))}else q();l.appendChild(t)}d=null!=d?d:2;var g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";g.style.paddingTop="0px";g.style.paddingBottom="20px";var k=document.createElement("div");
k.style.border="1px solid #d3d3d3";k.style.borderWidth="1px 0px 1px 0px";k.style.padding="10px 0px 20px 0px";var n=0,f=0,l=document.createElement("div");l.style.paddingTop="2px";k.appendChild(l);var m=document.createElement("p"),p=document.createElement("p");p.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(p,mxResources.get("saveDiagramsTo")+":");g.appendChild(p);g.appendChild(k);n=0;"function"===typeof window.DriveClient&&c(IMAGE_PATH+"/google-drive-logo.svg",
mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");c(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||c(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&c(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),
App.MODE_DROPBOX,"dropbox");null!=b.gitHub&&c(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&c(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");6>f&&null!=b.notion&&c(IMAGE_PATH+"/notion-logo.svg",mxResources.get("notion"),App.MODE_NOTION,"notion");k=document.createElement("span");k.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(k.style,
@@ -9907,21 +9929,21 @@ null!=b.gitLab?d(function(){b.gitLab.logout();b.openLink(DRAWIO_GITLAB_URL+"/use
null!=n?n:"Check out the diagram I made using @drawio";c=document.createElement("div");var m=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);null!=k?mxUtils.write(c,k):mxUtils.write(c,mxResources.get(5E5>e.length?m?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);k=document.createElement("div");k.style.position="absolute";k.style.top="30px";k.style.right="30px";k.style.color="gray";mxUtils.write(k,b.formatFileSize(e.length));c.appendChild(k);var p=document.createElement("textarea");p.setAttribute("autocomplete",
"off");p.setAttribute("autocorrect","off");p.setAttribute("autocapitalize","off");p.setAttribute("spellcheck","false");p.style.fontFamily="monospace";p.style.wordBreak="break-all";p.style.marginTop="10px";p.style.resize="none";p.style.height="150px";p.style.width="440px";p.style.border="1px solid gray";p.value=mxResources.get("updatingDocument");c.appendChild(p);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>e.length?(p.value=e,p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
p.select():document.execCommand("selectAll",!1,null)):(p.setAttribute("readonly","true"),p.value=mxResources.get("tooLargeUseDownload"))},0)};k=document.createElement("div");k.style.position="absolute";k.style.bottom="36px";k.style.right="32px";var q=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!m||navigator.standalone||!(m||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(q=mxUtils.button(null!=f?f:mxResources.get(5E5>e.length?"preview":"openInNewWindow"),
-function(){var c=5E5>e.length?p.value:e;if(null!=g)g(c);else if(m)try{var f=b.openLink(c);null!=f&&(null==d||0<d)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=f&&null!=f.location.href&&f.location.href.substring(0,8)!=c.substring(0,8)&&(f.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(A){}}),d||500)}catch(A){b.handleError({message:A.message||mxResources.get("drawingTooLarge")})}else{var l=window.open(),l=null!=l?l.document:null;null!=l?(l.writeln("<html><head><title>"+
+function(){var c=5E5>e.length?p.value:e;if(null!=g)g(c);else if(m)try{var f=b.openLink(c);null!=f&&(null==d||0<d)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=f&&null!=f.location.href&&f.location.href.substring(0,8)!=c.substring(0,8)&&(f.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(B){}}),d||500)}catch(B){b.handleError({message:B.message||mxResources.get("drawingTooLarge")})}else{var l=window.open(),l=null!=l?l.document:null;null!=l?(l.writeln("<html><head><title>"+
encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+e+"</body></html>"),l.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),q.className="geBtn",k.appendChild(q));if(!m||7500<e.length)f=mxUtils.button(mxResources.get("download"),function(){b.hideDialog();b.saveData(null!=l?l:"embed.txt","txt",e,"text/plain")}),f.className="geBtn",k.appendChild(f);if(m&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>e.length){var t=mxUtils.button("",
function(){try{var c="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(p.value);b.openLink(c)}catch(v){b.handleError({message:v.message||mxResources.get("drawingTooLarge")})}});f=document.createElement("img");f.setAttribute("src",Editor.facebookImage);f.setAttribute("width","18");f.setAttribute("height","18");f.setAttribute("border","0");t.appendChild(f);t.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");t.style.verticalAlign="bottom";t.style.paddingTop=
"4px";t.style.minWidth="46px";t.className="geBtn";k.appendChild(t)}7168>e.length&&(t=mxUtils.button("",function(){try{var c="https://twitter.com/intent/tweet?text="+encodeURIComponent(n)+"&url="+encodeURIComponent(p.value);b.openLink(c)}catch(v){b.handleError({message:v.message||mxResources.get("drawingTooLarge")})}}),f=document.createElement("img"),f.setAttribute("src",Editor.tweetImage),f.setAttribute("width","18"),f.setAttribute("height","18"),f.setAttribute("border","0"),f.style.marginBottom=
"5px",t.appendChild(f),t.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),t.style.verticalAlign="bottom",t.style.paddingTop="4px",t.style.minWidth="46px",t.className="geBtn",k.appendChild(t))}f=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});k.appendChild(f);t=mxUtils.button(mxResources.get("copy"),function(){p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");
b.alert(mxResources.get("copiedToClipboard"))});5E5>e.length?mxClient.IS_SF||null!=document.documentMode?f.className="geBtn gePrimaryBtn":(k.appendChild(t),t.className="geBtn gePrimaryBtn",f.className="geBtn"):(k.appendChild(q),f.className="geBtn",q.className="geBtn gePrimaryBtn");c.appendChild(k);this.container=c};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(b,e){function d(){var b=null!=F&&null!=F.getTitle()?F.getTitle():this.defaultFilename;if(C.checked&&""!=t.value){var c="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(t.value));null!=b&&(c+="&title="+encodeURIComponent(b));0<E.length&&(c+="&s="+E);""!=u.value&&"0"!=u.value&&(c+="&border="+u.value);""!=q.value&&(c+="&height="+q.value);c+="&pan="+(v.checked?"1":"0");c+="&zoom="+(x.checked?"1":"0");c+="&fit="+(B.checked?"1":"0");
-c+="&resize="+(y.checked?"1":"0");c+="&x0="+Number(p.value);c+="&y0="+l;g.mathEnabled&&(c+="&math=1");z.checked?c+="&edit=_blank":A.checked&&(c+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));m.value=c}else F.constructor==DriveFile||F.constructor==DropboxFile?(c="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=t.value?c+=encodeURIComponent(mxUtils.htmlEntities(t.value))+"&type=3":(c+=F.getHash().substring(1),c=F.constructor==DropboxFile?c+"&type=2":c+"&type=1"),null!=
+var GoogleSitesDialog=function(b,e){function d(){var b=null!=E&&null!=E.getTitle()?E.getTitle():this.defaultFilename;if(C.checked&&""!=t.value){var c="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(t.value));null!=b&&(c+="&title="+encodeURIComponent(b));0<F.length&&(c+="&s="+F);""!=u.value&&"0"!=u.value&&(c+="&border="+u.value);""!=q.value&&(c+="&height="+q.value);c+="&pan="+(v.checked?"1":"0");c+="&zoom="+(x.checked?"1":"0");c+="&fit="+(z.checked?"1":"0");
+c+="&resize="+(y.checked?"1":"0");c+="&x0="+Number(p.value);c+="&y0="+l;g.mathEnabled&&(c+="&math=1");A.checked?c+="&edit=_blank":B.checked&&(c+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));m.value=c}else E.constructor==DriveFile||E.constructor==DropboxFile?(c="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=t.value?c+=encodeURIComponent(mxUtils.htmlEntities(t.value))+"&type=3":(c+=E.getHash().substring(1),c=E.constructor==DropboxFile?c+"&type=2":c+"&type=1"),null!=
b&&(c+="&title="+encodeURIComponent(b)),""!=q.value&&(b=parseInt(q.value)+parseInt(p.value),c+="&height="+b),m.value=c):m.value=""}var c=document.createElement("div"),g=b.editor.graph,k=g.getGraphBounds(),n=g.view.scale,f=Math.floor(k.x/n-g.view.translate.x),l=Math.floor(k.y/n-g.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var m=document.createElement("input");m.setAttribute("type","text");m.style.marginBottom="8px";m.style.marginTop="2px";m.style.width="410px";
c.appendChild(m);mxUtils.br(c);this.init=function(){m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?m.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","4");p.style.marginRight="16px";p.style.marginLeft="4px";p.value=f;c.appendChild(p);mxUtils.write(c,mxResources.get("height")+":");var q=document.createElement("input");q.setAttribute("type","text");
q.setAttribute("size","4");q.style.marginLeft="4px";q.value=Math.ceil(k.height/n);c.appendChild(q);mxUtils.br(c);k=document.createElement("hr");k.setAttribute("size","1");k.style.marginBottom="16px";k.style.marginTop="16px";c.appendChild(k);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var t=document.createElement("input");t.setAttribute("type","text");t.setAttribute("size","28");t.style.marginBottom="8px";t.style.marginTop="2px";t.style.width="410px";t.value=e||"";c.appendChild(t);
mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.setAttribute("size","3");u.style.marginBottom="8px";u.style.marginLeft="4px";u.value="0";c.appendChild(u);mxUtils.br(c);var v=document.createElement("input");v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="16px";c.appendChild(v);mxUtils.write(c,mxResources.get("pan")+" ");var x=document.createElement("input");
-x.setAttribute("type","checkbox");x.setAttribute("checked","checked");x.defaultChecked=!0;x.style.marginLeft="8px";c.appendChild(x);mxUtils.write(c,mxResources.get("zoom")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft="8px";A.setAttribute("title",window.location.href);c.appendChild(A);mxUtils.write(c,mxResources.get("edit")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";c.appendChild(z);mxUtils.write(c,
-mxResources.get("asNew")+" ");mxUtils.br(c);var y=document.createElement("input");y.setAttribute("type","checkbox");y.setAttribute("checked","checked");y.defaultChecked=!0;y.style.marginLeft="16px";c.appendChild(y);mxUtils.write(c,mxResources.get("resize")+" ");var B=document.createElement("input");B.setAttribute("type","checkbox");B.style.marginLeft="8px";c.appendChild(B);mxUtils.write(c,mxResources.get("fit")+" ");var C=document.createElement("input");C.setAttribute("type","checkbox");C.style.marginLeft=
-"8px";c.appendChild(C);mxUtils.write(c,mxResources.get("embed")+" ");var E=b.getBasenames().join(";"),F=b.getCurrentFile();mxEvent.addListener(v,"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(y,"change",d);mxEvent.addListener(B,"change",d);mxEvent.addListener(A,"change",d);mxEvent.addListener(z,"change",d);mxEvent.addListener(C,"change",d);mxEvent.addListener(q,"change",d);mxEvent.addListener(p,"change",d);mxEvent.addListener(u,"change",d);mxEvent.addListener(t,"change",d);d();
+x.setAttribute("type","checkbox");x.setAttribute("checked","checked");x.defaultChecked=!0;x.style.marginLeft="8px";c.appendChild(x);mxUtils.write(c,mxResources.get("zoom")+" ");var B=document.createElement("input");B.setAttribute("type","checkbox");B.style.marginLeft="8px";B.setAttribute("title",window.location.href);c.appendChild(B);mxUtils.write(c,mxResources.get("edit")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft="8px";c.appendChild(A);mxUtils.write(c,
+mxResources.get("asNew")+" ");mxUtils.br(c);var y=document.createElement("input");y.setAttribute("type","checkbox");y.setAttribute("checked","checked");y.defaultChecked=!0;y.style.marginLeft="16px";c.appendChild(y);mxUtils.write(c,mxResources.get("resize")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";c.appendChild(z);mxUtils.write(c,mxResources.get("fit")+" ");var C=document.createElement("input");C.setAttribute("type","checkbox");C.style.marginLeft=
+"8px";c.appendChild(C);mxUtils.write(c,mxResources.get("embed")+" ");var F=b.getBasenames().join(";"),E=b.getCurrentFile();mxEvent.addListener(v,"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(y,"change",d);mxEvent.addListener(z,"change",d);mxEvent.addListener(B,"change",d);mxEvent.addListener(A,"change",d);mxEvent.addListener(C,"change",d);mxEvent.addListener(q,"change",d);mxEvent.addListener(p,"change",d);mxEvent.addListener(u,"change",d);mxEvent.addListener(t,"change",d);d();
mxEvent.addListener(m,"click",function(){m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?m.select():document.execCommand("selectAll",!1,null)});k=document.createElement("div");k.style.paddingTop="12px";k.style.textAlign="right";n=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});n.className="geBtn gePrimaryBtn";k.appendChild(n);c.appendChild(k);this.container=c},CreateGraphDialog=function(b,e,d){var c=document.createElement("div");c.style.textAlign="right";this.init=
function(){var e=document.createElement("div");e.style.position="relative";e.style.border="1px solid gray";e.style.width="100%";e.style.height="360px";e.style.overflow="hidden";e.style.marginBottom="16px";mxEvent.disableContextMenu(e);c.appendChild(e);var k=new Graph(e);k.setCellsCloneable(!0);k.setPanning(!0);k.setAllowDanglingEdges(!1);k.connectionHandler.select=!1;k.view.setTranslate(20,20);k.border=20;k.panningHandler.useLeftButtonForPanning=!0;var n="curved=1;";k.cellRenderer.installCellOverlayListeners=
function(b,c,f){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(f.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(f){c.fireEvent(new mxEventObject("pointerdown","event",f,"state",b))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(f.node,"touchstart",function(f){c.fireEvent(new mxEventObject("pointerdown","event",f,"state",b))})};k.getAllConnectionConstraints=function(){return null};k.connectionHandler.marker.highlight.keepOnTop=
@@ -9936,26 +9958,26 @@ CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image
"/handle-connect.png",26,26);
var BackgroundImageDialog=function(b,e,d){var c=document.createElement("div");c.style.whiteSpace="nowrap";var g=document.createElement("h2");mxUtils.write(g,mxResources.get("backgroundImage"));g.style.marginTop="0px";c.appendChild(g);var k=null!=d&&null!=d.originalSrc,g=!1,n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";n.setAttribute("value","url");n.setAttribute("type","radio");n.setAttribute("name","geBackgroundImageDialogOption");var f=document.createElement("input");
f.style.cssText="margin-right:8px;margin-bottom:8px;";f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","geBackgroundImageDialogOption");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginBottom="8px";l.style.width="320px";l.value=k||null==d?"":d.src;var m=document.createElement("select");m.style.width="320px";if(null!=b.pages)for(var p=0;p<b.pages.length;p++){var q=document.createElement("option");mxUtils.write(q,b.pages[p].getName()||
-mxResources.get("pageWithNumber",[p+1]));q.setAttribute("value","data:page/id,"+b.pages[p].getId());b.pages[p]==b.currentPage&&q.setAttribute("disabled","disabled");null!=d&&d.originalSrc==q.getAttribute("value")&&(q.setAttribute("selected","selected"),g=!0);m.appendChild(q)}k||null!=b.pages&&1!=b.pages.length||(n.style.display="none",f.style.display="none",m.style.display="none");var t=!1,u=!1,v=function(c,d){t||null!=c&&u||(f.checked?null!=d&&d(m.value):""==l.value||b.isOffline()?(x.value="",A.value=
-"",null!=d&&d("")):(l.value=mxUtils.trim(l.value),b.loadImage(l.value,function(b){x.value=b.width;A.value=b.height;null!=d&&d(l.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));x.value="";A.value="";null!=d&&d(null)})))};this.init=function(){k?m.focus():l.focus();mxEvent.addListener(m,"focus",function(){n.removeAttribute("checked");f.setAttribute("checked","checked");f.checked=!0});mxEvent.addListener(l,"focus",function(){f.removeAttribute("checked");
+mxResources.get("pageWithNumber",[p+1]));q.setAttribute("value","data:page/id,"+b.pages[p].getId());b.pages[p]==b.currentPage&&q.setAttribute("disabled","disabled");null!=d&&d.originalSrc==q.getAttribute("value")&&(q.setAttribute("selected","selected"),g=!0);m.appendChild(q)}k||null!=b.pages&&1!=b.pages.length||(n.style.display="none",f.style.display="none",m.style.display="none");var t=!1,u=!1,v=function(c,d){t||null!=c&&u||(f.checked?null!=d&&d(m.value):""==l.value||b.isOffline()?(x.value="",B.value=
+"",null!=d&&d("")):(l.value=mxUtils.trim(l.value),b.loadImage(l.value,function(b){x.value=b.width;B.value=b.height;null!=d&&d(l.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));x.value="";B.value="";null!=d&&d(null)})))};this.init=function(){k?m.focus():l.focus();mxEvent.addListener(m,"focus",function(){n.removeAttribute("checked");f.setAttribute("checked","checked");f.checked=!0});mxEvent.addListener(l,"focus",function(){f.removeAttribute("checked");
n.setAttribute("checked","checked");n.checked=!0});if(Graph.fileSupport){l.setAttribute("placeholder",mxResources.get("dragImagesHere"));var d=c.parentNode,e=null;mxEvent.addListener(d,"dragleave",function(b){null!=e&&(e.parentNode.removeChild(e),e=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(c){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=b.highlightElement(d));c.stopPropagation();c.preventDefault()}));mxEvent.addListener(d,
"drop",mxUtils.bind(this,function(c){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<c.dataTransfer.files.length)b.importFiles(c.dataTransfer.files,0,0,b.maxBackgroundSize,function(b,c,f,d,e,m){l.value=b;v()},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var c=0;c<b.length;c++)b[c]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0);else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var f=c.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(f)&&
-(l.value=decodeURIComponent(f),v())}c.stopPropagation();c.preventDefault()}),!1)}};c.appendChild(n);c.appendChild(l);mxUtils.br(c);p=document.createElement("span");p.style.marginLeft="30px";mxUtils.write(p,mxResources.get("width")+":");c.appendChild(p);var x=document.createElement("input");x.setAttribute("type","text");x.style.width="60px";x.style.marginLeft="8px";x.style.marginRight="16px";x.value=null==d||k?"":d.width;c.appendChild(x);mxUtils.write(c,mxResources.get("height")+":");var A=document.createElement("input");
-A.setAttribute("type","text");A.style.width="60px";A.style.marginLeft="8px";A.style.marginRight="16px";A.value=null==d||k?"":d.height;c.appendChild(A);mxUtils.br(c);mxUtils.br(c);mxEvent.addListener(l,"change",v);ImageDialog.filePicked=function(b){b.action==google.picker.Action.PICKED&&null!=b.docs[0].thumbnails&&(b=b.docs[0].thumbnails[b.docs[0].thumbnails.length-1],null!=b&&(l.value=b.url,v()));l.focus()};c.appendChild(f);c.appendChild(m);mxUtils.br(c);k?(f.setAttribute("checked","checked"),f.checked=
-!0):(n.setAttribute("checked","checked"),n.checked=!0);if(!g&&f.checked){var z=document.createElement("option");mxUtils.write(z,mxResources.get("pageNotFound"));z.setAttribute("disabled","disabled");z.setAttribute("selected","selected");z.setAttribute("value","pageNotFound");m.appendChild(z);mxEvent.addListener(m,"change",function(){null==z.parentNode||z.selected||z.parentNode.removeChild(z)})}d=document.createElement("div");d.style.marginTop="30px";d.style.textAlign="right";g=mxUtils.button(mxResources.get("reset"),
-function(){l.value="";x.value="";A.value="";n.checked=!0;t=!1});mxEvent.addGestureListeners(g,function(){t=!0});g.className="geBtn";g.width="100";d.appendChild(g);g=mxUtils.button(mxResources.get("cancel"),function(){t=!0;b.hideDialog()});g.className="geBtn";b.editor.cancelFirst&&d.appendChild(g);applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();v(null,function(b){e(""!=b&&null!=b?new mxImage(b,x.value,A.value):null,null==b)})});mxEvent.addGestureListeners(applyBtn,function(){u=
+(l.value=decodeURIComponent(f),v())}c.stopPropagation();c.preventDefault()}),!1)}};c.appendChild(n);c.appendChild(l);mxUtils.br(c);p=document.createElement("span");p.style.marginLeft="30px";mxUtils.write(p,mxResources.get("width")+":");c.appendChild(p);var x=document.createElement("input");x.setAttribute("type","text");x.style.width="60px";x.style.marginLeft="8px";x.style.marginRight="16px";x.value=null==d||k?"":d.width;c.appendChild(x);mxUtils.write(c,mxResources.get("height")+":");var B=document.createElement("input");
+B.setAttribute("type","text");B.style.width="60px";B.style.marginLeft="8px";B.style.marginRight="16px";B.value=null==d||k?"":d.height;c.appendChild(B);mxUtils.br(c);mxUtils.br(c);mxEvent.addListener(l,"change",v);ImageDialog.filePicked=function(b){b.action==google.picker.Action.PICKED&&null!=b.docs[0].thumbnails&&(b=b.docs[0].thumbnails[b.docs[0].thumbnails.length-1],null!=b&&(l.value=b.url,v()));l.focus()};c.appendChild(f);c.appendChild(m);mxUtils.br(c);k?(f.setAttribute("checked","checked"),f.checked=
+!0):(n.setAttribute("checked","checked"),n.checked=!0);if(!g&&f.checked){var A=document.createElement("option");mxUtils.write(A,mxResources.get("pageNotFound"));A.setAttribute("disabled","disabled");A.setAttribute("selected","selected");A.setAttribute("value","pageNotFound");m.appendChild(A);mxEvent.addListener(m,"change",function(){null==A.parentNode||A.selected||A.parentNode.removeChild(A)})}d=document.createElement("div");d.style.marginTop="30px";d.style.textAlign="right";g=mxUtils.button(mxResources.get("reset"),
+function(){l.value="";x.value="";B.value="";n.checked=!0;t=!1});mxEvent.addGestureListeners(g,function(){t=!0});g.className="geBtn";g.width="100";d.appendChild(g);g=mxUtils.button(mxResources.get("cancel"),function(){t=!0;b.hideDialog()});g.className="geBtn";b.editor.cancelFirst&&d.appendChild(g);applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();v(null,function(b){e(""!=b&&null!=b?new mxImage(b,x.value,B.value):null,null==b)})});mxEvent.addGestureListeners(applyBtn,function(){u=
!0});applyBtn.className="geBtn gePrimaryBtn";d.appendChild(applyBtn);b.editor.cancelFirst||d.appendChild(g);c.appendChild(d);this.container=c},ParseDialog=function(b,e,d){function c(c,f,d){var e=c.split("\n");if("plantUmlPng"==f||"plantUmlSvg"==f||"plantUmlTxt"==f){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var l=function(c,f,e,l,g){k=mxEvent.isAltDown(d)?k:m.getCenterInsertPoint(new mxRectangle(0,0,l,g));var p=null;m.getModel().beginUpdate();try{p="txt"==f?b.insertAsPreText(e,
k.x,k.y):m.insertVertex(null,null,null,k.x,k.y,l,g,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(e)+";"),m.setAttributeForCell(p,"plantUmlData",JSON.stringify({data:c,format:f},null,2))}finally{m.getModel().endUpdate()}null!=p&&(m.setSelectionCell(p),m.scrollCellToVisible(p))},m=b.editor.graph,g="plantUmlTxt"==f?"txt":"plantUmlPng"==f?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==
c&&"svg"==g?window.setTimeout(function(){b.spinner.stop();l(c,g,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
295,212)},200):b.generatePlantUmlImage(c,g,function(f,d,e){b.spinner.stop();l(c,g,f,d,e)},function(c){b.handleError(c)})}}else if("mermaid"==f)b.spinner.spin(document.body,mxResources.get("inserting"))&&(m=b.editor.graph,b.generateMermaidImage(c,g,function(f,e,l){k=mxEvent.isAltDown(d)?k:m.getCenterInsertPoint(new mxRectangle(0,0,e,l));b.spinner.stop();var g=null;m.getModel().beginUpdate();try{g=m.insertVertex(null,null,null,k.x,k.y,e,l,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
f+";"),m.setAttributeForCell(g,"mermaidData",JSON.stringify({data:c,config:EditorUi.defaultMermaidConfig},null,2))}finally{m.getModel().endUpdate()}null!=g&&(m.setSelectionCell(g),m.scrollCellToVisible(g))},function(c){b.handleError(c)}));else if("table"==f){var p=null,q=[],t=0;for(f=0;f<e.length;f++){var n=mxUtils.trim(e[f]);if("create table"==n.substring(0,12).toLowerCase())n=mxUtils.trim(n.substring(12)),"("==n.charAt(n.length-1)&&(n=mxUtils.trim(n.substring(0,n.length-1))),p=new mxCell(n,new mxGeometry(t,
0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),p.vertex=!0,q.push(p),n=b.editor.graph.getPreferredSizeForCell(v),null!=n&&(p.geometry.width=n.width+10);else if(null!=p&&")"==n.charAt(0))t+=p.geometry.width+40,p=null;else if("("!=n&&null!=p&&(n=n.substring(0,","==n.charAt(n.length-1)?n.length-1:n.length),"primary key"!=n.substring(0,11).toLowerCase())){var u=n.toLowerCase().indexOf("primary key"),
-n=n.replace(/primary key/i,""),v=new mxCell("",new mxGeometry(0,0,160,30),"shape=partialRectangle;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(0<u?"1":"0")+";");v.vertex=!0;var H=new mxCell(0<u?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(0<u?"fontStyle=1;":""));H.vertex=!0;v.insert(H);n=new mxCell(n,new mxGeometry(30,
+n=n.replace(/primary key/i,""),v=new mxCell("",new mxGeometry(0,0,160,30),"shape=partialRectangle;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(0<u?"1":"0")+";");v.vertex=!0;var I=new mxCell(0<u?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(0<u?"fontStyle=1;":""));I.vertex=!0;v.insert(I);n=new mxCell(n,new mxGeometry(30,
0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;"+(0<u?"fontStyle=5;":""));n.vertex=!0;v.insert(n);n=b.editor.graph.getPreferredSizeForCell(n);null!=n&&p.geometry.width<n.width+30&&(p.geometry.width=Math.min(320,Math.max(p.geometry.width,n.width+30)));p.insert(v);p.geometry.height+=30}}0<q.length&&(m=b.editor.graph,k=mxEvent.isAltDown(d)?k:m.getCenterInsertPoint(m.getBoundingBoxFromGeometry(q,!0)),m.setSelectionCells(m.importCells(q,
k.x,k.y)),m.scrollCellToVisible(m.getSelectionCell()))}else if("list"==f){if(0<e.length){m=b.editor.graph;v=null;q=[];for(f=p=0;f<e.length;f++)";"!=e[f].charAt(0)&&(0==e[f].length?v=null:null==v?(v=new mxCell(e[f],new mxGeometry(p,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),v.vertex=!0,q.push(v),n=m.getPreferredSizeForCell(v),null!=n&&v.geometry.width<n.width+10&&(v.geometry.width=
n.width+10),p+=v.geometry.width+40):"--"==e[f]?(n=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),n.vertex=!0,v.geometry.height+=n.geometry.height,v.insert(n)):0<e[f].length&&(t=new mxCell(e[f],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
t.vertex=!0,n=m.getPreferredSizeForCell(t),null!=n&&t.geometry.width<n.width&&(t.geometry.width=n.width),v.geometry.width=Math.max(v.geometry.width,t.geometry.width),v.geometry.height+=t.geometry.height,v.insert(t)));if(0<q.length){k=mxEvent.isAltDown(d)?k:m.getCenterInsertPoint(m.getBoundingBoxFromGeometry(q,!0));m.getModel().beginUpdate();try{q=m.importCells(q,k.x,k.y);n=[];for(f=0;f<q.length;f++)n.push(q[f]),n=n.concat(q[f].children);m.fireEvent(new mxEventObject("cellsInserted","cells",n))}finally{m.getModel().endUpdate()}m.setSelectionCells(q);
-m.scrollCellToVisible(m.getSelectionCell())}}}else{var v=function(b){var c=K[b];null==c&&(c=new mxCell(b,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),c.vertex=!0,K[b]=c,q.push(c));return c},K={},q=[];for(f=0;f<e.length;f++)if(";"!=e[f].charAt(0)){var M=e[f].split("->");2<=M.length&&(u=v(M[0]),H=v(M[M.length-1]),M=new mxCell(2<M.length?M[1]:"",new mxGeometry),M.edge=!0,u.insertEdge(M,!0),H.insertEdge(M,!1),q.push(M))}if(0<q.length){e=document.createElement("div");e.style.visibility="hidden";
+m.scrollCellToVisible(m.getSelectionCell())}}}else{var v=function(b){var c=K[b];null==c&&(c=new mxCell(b,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),c.vertex=!0,K[b]=c,q.push(c));return c},K={},q=[];for(f=0;f<e.length;f++)if(";"!=e[f].charAt(0)){var M=e[f].split("->");2<=M.length&&(u=v(M[0]),I=v(M[M.length-1]),M=new mxCell(2<M.length?M[1]:"",new mxGeometry),M.edge=!0,u.insertEdge(M,!0),I.insertEdge(M,!1),q.push(M))}if(0<q.length){e=document.createElement("div");e.style.visibility="hidden";
document.body.appendChild(e);m=new Graph(e);m.getModel().beginUpdate();try{q=m.importCells(q);for(f=0;f<q.length;f++)m.getModel().isVertex(q[f])&&(n=m.getPreferredSizeForCell(q[f]),q[f].geometry.width=Math.max(q[f].geometry.width,n.width),q[f].geometry.height=Math.max(q[f].geometry.height,n.height));p=new mxFastOrganicLayout(m);p.disableEdgeStyle=!1;p.forceConstant=120;p.execute(m.getDefaultParent());t=new mxParallelEdgeLayout(m);t.spacing=20;t.execute(m.getDefaultParent())}finally{m.getModel().endUpdate()}m.clearCellOverlays();
n=[];b.editor.graph.getModel().beginUpdate();try{q=m.getModel().getChildren(m.getDefaultParent()),k=mxEvent.isAltDown(d)?k:b.editor.graph.getCenterInsertPoint(m.getBoundingBoxFromGeometry(q,!0)),n=b.editor.graph.importCells(q,k.x,k.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",n))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(n);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());m.destroy();e.parentNode.removeChild(e)}}}function g(){return"list"==
f.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==f.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==f.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":
@@ -9965,56 +9987,56 @@ null!=d&&"fromText"!=d||l.setAttribute("selected","selected");l=document.createE
mxUtils.write(l,mxResources.get("diagram"));"plantUml"!=d&&f.appendChild(l);l=document.createElement("option");l.setAttribute("value","plantUmlSvg");mxUtils.write(l,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==d&&l.setAttribute("selected","selected");var m=document.createElement("option");m.setAttribute("value","plantUmlPng");mxUtils.write(m,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");var p=document.createElement("option");p.setAttribute("value",
"plantUmlTxt");mxUtils.write(p,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==d&&(f.appendChild(l),f.appendChild(m),f.appendChild(p));var q=g();n.value=q;e.appendChild(n);this.init=function(){n.focus()};Graph.fileSupport&&(n.addEventListener("dragover",function(b){b.stopPropagation();b.preventDefault()},!1),n.addEventListener("drop",function(b){b.stopPropagation();b.preventDefault();if(0<b.dataTransfer.files.length){b=
b.dataTransfer.files[0];var c=new FileReader;c.onload=function(b){n.value=b.target.result};c.readAsText(b)}},!1));e.appendChild(f);mxEvent.addListener(f,"change",function(){var b=g();if(0==n.value.length||n.value==q)q=b,n.value=q});b.isOffline()||"mermaid"!=d&&"plantUml"!=d||(l=mxUtils.button(mxResources.get("help"),function(){b.openLink("mermaid"==d?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),l.className="geBtn",e.appendChild(l));l=mxUtils.button(mxResources.get("close"),
-function(){n.value==q?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});l.className="geBtn";b.editor.cancelFirst&&e.appendChild(l);m=mxUtils.button(mxResources.get("insert"),function(d){b.hideDialog();c(n.value,f.value,d)});e.appendChild(m);m.className="geBtn gePrimaryBtn";b.editor.cancelFirst||e.appendChild(l);this.container=e},NewDialog=function(b,e,d,c,g,k,n,f,l,m,p,q,t,u,v,x,A,z){function y(b){null!=b&&(na=V=b?135:140);b=!0;if(null!=X)for(;M<X.length&&(b||0!=
-mxUtils.mod(M,30));){var c=X[M++],c=E(c.url,c.libs,c.title,c.tooltip?c.tooltip:c.title,c.select,c.imgUrl,c.info,c.onClick,c.preview,c.noImg,c.clibs);b&&c.click();b=!1}}function B(){if(Z&&null!=u)d||b.hideDialog(),u(Z,da,K.value);else if(c)d||b.hideDialog(),c(ba,K.value,ja,ga);else{var f=K.value;null!=f&&0<f.length&&b.pickFolder(b.mode,function(c){b.createFile(f,ba,null!=ga&&0<ga.length?ga:null,null,function(){b.hideDialog()},null,c,null,null!=ha&&0<ha.length?ha:null)},b.mode!=App.MODE_GOOGLE||null==
-b.stateArg||null==b.stateArg.folderId)}}function C(b,c,d,e,m,k,g){null!=aa&&(aa.style.backgroundColor="transparent",aa.style.border="1px solid transparent");P.removeAttribute("disabled");ba=c;ga=d;ha=k;aa=b;Z=e;ja=g;da=m;aa.style.backgroundColor=f;aa.style.border=l}function E(c,f,d,e,l,m,k,g,p,q,t){function n(c,f){if(null==v){var d=c,d=/^https?:\/\//.test(d)&&!b.editor.isCorsEnabledForUrl(d)?PROXY_URL+"?url="+encodeURIComponent(d):TEMPLATE_PATH+"/"+d;mxUtils.get(d,mxUtils.bind(this,function(b){200<=
+function(){n.value==q?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});l.className="geBtn";b.editor.cancelFirst&&e.appendChild(l);m=mxUtils.button(mxResources.get("insert"),function(d){b.hideDialog();c(n.value,f.value,d)});e.appendChild(m);m.className="geBtn gePrimaryBtn";b.editor.cancelFirst||e.appendChild(l);this.container=e},NewDialog=function(b,e,d,c,g,k,n,f,l,m,p,q,t,u,v,x,B,A){function y(b){null!=b&&(na=V=b?135:140);b=!0;if(null!=Y)for(;M<Y.length&&(b||0!=
+mxUtils.mod(M,30));){var c=Y[M++],c=F(c.url,c.libs,c.title,c.tooltip?c.tooltip:c.title,c.select,c.imgUrl,c.info,c.onClick,c.preview,c.noImg,c.clibs);b&&c.click();b=!1}}function z(){if(Z&&null!=u)d||b.hideDialog(),u(Z,da,K.value);else if(c)d||b.hideDialog(),c(aa,K.value,ja,ha);else{var f=K.value;null!=f&&0<f.length&&b.pickFolder(b.mode,function(c){b.createFile(f,aa,null!=ha&&0<ha.length?ha:null,null,function(){b.hideDialog()},null,c,null,null!=ga&&0<ga.length?ga:null)},b.mode!=App.MODE_GOOGLE||null==
+b.stateArg||null==b.stateArg.folderId)}}function C(b,c,d,e,m,k,g){null!=ba&&(ba.style.backgroundColor="transparent",ba.style.border="1px solid transparent");N.removeAttribute("disabled");aa=c;ha=d;ga=k;ba=b;Z=e;ja=g;da=m;ba.style.backgroundColor=f;ba.style.border=l}function F(c,f,d,e,l,m,k,g,p,q,t){function n(c,f){if(null==v){var d=c,d=/^https?:\/\//.test(d)&&!b.editor.isCorsEnabledForUrl(d)?PROXY_URL+"?url="+encodeURIComponent(d):TEMPLATE_PATH+"/"+d;mxUtils.get(d,mxUtils.bind(this,function(b){200<=
b.getStatus()&&299>=b.getStatus()&&(v=b.getText());f(v)}))}else f(v)}function y(f,e,l){if(null!=f&&mxUtils.isAncestorNode(document.body,u)){f=mxUtils.parseXml(f);f=Editor.parseDiagramNode(f.documentElement);var m=new mxCodec(f.ownerDocument),g=new mxGraphModel;m.decode(f,g);f=g.root.getChildAt(0).children;b.sidebar.createTooltip(u,f,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||
-document.body.clientHeight)-80,800),null!=d?mxResources.get(d,null,d):null,!0,new mxPoint(e,l),!0,function(){D=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;C(u,null,null,c,k,t)},!0)}}function O(f,d){null==c||G||b.sidebar.currentElt==u?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),b.sidebar.currentElt=u,G=!0,n(c,function(c){G&&b.sidebar.currentElt==u&&y(c,mxEvent.getClientX(f),mxEvent.getClientY(f));G=!1}))}var u=document.createElement("div");u.className="geTemplate";u.style.position=
+document.body.clientHeight)-80,800),null!=d?mxResources.get(d,null,d):null,!0,new mxPoint(e,l),!0,function(){D=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;C(u,null,null,c,k,t)},!0)}}function P(f,d){null==c||G||b.sidebar.currentElt==u?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),b.sidebar.currentElt=u,G=!0,n(c,function(c){G&&b.sidebar.currentElt==u&&y(c,mxEvent.getClientX(f),mxEvent.getClientY(f));G=!1}))}var u=document.createElement("div");u.className="geTemplate";u.style.position=
"relative";u.style.height=na+"px";u.style.width=V+"px";var v=null;Editor.isDarkMode()&&(u.style.filter="invert(100%)");null!=d?u.setAttribute("title",mxResources.get(d,null,d)):null!=e&&0<e.length&&u.setAttribute("title",e);var G=!1;if(null!=m){u.style.display="inline-flex";u.style.justifyContent="center";u.style.alignItems="center";l=document.createElement("img");l.setAttribute("src",m);l.setAttribute("alt",e);l.style.maxWidth=na+"px";l.style.maxHeight=V+"px";var x=m.replace(".drawio.xml","").replace(".drawio",
-"").replace(".xml","");u.appendChild(l);l.onerror=function(){this.src!=x?this.src=x:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(u,mxUtils.bind(this,function(b){C(u,null,null,c,k,t)}),null,null);mxEvent.addListener(u,"dblclick",function(b){B();mxEvent.consume(b)})}else if(!q&&null!=c&&0<c.length){var A=function(b){P.setAttribute("disabled","disabled");u.style.backgroundColor="transparent";u.style.border="1px solid transparent";L.spin(N);n(c,function(c){L.stop();null!=
-c&&(C(u,c,f,null,null,t,qa),b&&B())})};e=p||TEMPLATE_PATH+"/"+c.substring(0,c.length-4)+".png";u.style.backgroundImage="url("+e+")";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";null!=d&&(u.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;'+(Editor.isDarkMode()?"":"background:rgba(255,255,255,0.85);")+'border:inherit;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:rgba(255,255,255,0.85);overflow:hidden;text-overflow:ellipsis;max-width:'+
-(na-34)+'px;">'+mxUtils.htmlEntities(mxResources.get(d,null,d))+"</span></td></tr></table>");mxEvent.addGestureListeners(u,mxUtils.bind(this,function(b){A()}),null,null);mxEvent.addListener(u,"dblclick",function(b){A(!0);mxEvent.consume(b)})}else u.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:#ffffff;overflow:hidden;text-overflow:ellipsis;max-width:'+
-(na-34)+'px;">'+mxUtils.htmlEntities(mxResources.get(d,null,d))+"</span></td></tr></table>",l&&C(u),mxEvent.addGestureListeners(u,mxUtils.bind(this,function(b){C(u,null,null,c,k)}),null,null),null!=g?mxEvent.addListener(u,"click",g):(mxEvent.addListener(u,"click",function(b){C(u,null,null,c,k)}),mxEvent.addListener(u,"dblclick",function(b){B();mxEvent.consume(b)}));if(null!=c){var J=document.createElement("img");J.setAttribute("src",Sidebar.prototype.searchImage);J.setAttribute("title",mxResources.get("preview"));
-J.className="geActiveButton";J.style.position="absolute";J.style.cursor="default";J.style.padding="8px";J.style.right="0px";J.style.top="0px";u.appendChild(J);var D=!1;mxEvent.addGestureListeners(J,mxUtils.bind(this,function(c){D=b.sidebar.currentElt==u}),null,null);mxEvent.addListener(J,"click",mxUtils.bind(this,function(b){D||O(b,J);mxEvent.consume(b)}))}N.appendChild(u);return u}function F(){function b(b,c){var f=mxResources.get(b);null==f&&(f=b.substring(0,1).toUpperCase()+b.substring(1));18<
-f.length&&(f=f.substring(0,18)+"&hellip;");return f+" ("+c.length+")"}function c(b,c,f){mxEvent.addListener(c,"click",function(){R!=c&&(R.style.backgroundColor="",R=c,R.style.backgroundColor=n,N.scrollTop=0,N.innerHTML="",M=0,X=f?ea[b][f]:ca[b],G=null,y(!1))})}oa&&(oa=!1,mxEvent.addListener(N,"scroll",function(b){N.scrollTop+N.clientHeight>=N.scrollHeight&&(y(),mxEvent.consume(b))}));if(0<pa){var f=document.createElement("div");f.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";
+"").replace(".xml","");u.appendChild(l);l.onerror=function(){this.src!=x?this.src=x:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(u,mxUtils.bind(this,function(b){C(u,null,null,c,k,t)}),null,null);mxEvent.addListener(u,"dblclick",function(b){z();mxEvent.consume(b)})}else if(!q&&null!=c&&0<c.length){var B=function(b){N.setAttribute("disabled","disabled");u.style.backgroundColor="transparent";u.style.border="1px solid transparent";L.spin(O);n(c,function(c){L.stop();null!=
+c&&(C(u,c,f,null,null,t,qa),b&&z())})};e=p||TEMPLATE_PATH+"/"+c.substring(0,c.length-4)+".png";u.style.backgroundImage="url("+e+")";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";null!=d&&(u.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;'+(Editor.isDarkMode()?"":"background:rgba(255,255,255,0.85);")+'border:inherit;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:rgba(255,255,255,0.85);overflow:hidden;text-overflow:ellipsis;max-width:'+
+(na-34)+'px;">'+mxUtils.htmlEntities(mxResources.get(d,null,d))+"</span></td></tr></table>");mxEvent.addGestureListeners(u,mxUtils.bind(this,function(b){B()}),null,null);mxEvent.addListener(u,"dblclick",function(b){B(!0);mxEvent.consume(b)})}else u.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:#ffffff;overflow:hidden;text-overflow:ellipsis;max-width:'+
+(na-34)+'px;">'+mxUtils.htmlEntities(mxResources.get(d,null,d))+"</span></td></tr></table>",l&&C(u),mxEvent.addGestureListeners(u,mxUtils.bind(this,function(b){C(u,null,null,c,k)}),null,null),null!=g?mxEvent.addListener(u,"click",g):(mxEvent.addListener(u,"click",function(b){C(u,null,null,c,k)}),mxEvent.addListener(u,"dblclick",function(b){z();mxEvent.consume(b)}));if(null!=c){var J=document.createElement("img");J.setAttribute("src",Sidebar.prototype.searchImage);J.setAttribute("title",mxResources.get("preview"));
+J.className="geActiveButton";J.style.position="absolute";J.style.cursor="default";J.style.padding="8px";J.style.right="0px";J.style.top="0px";u.appendChild(J);var D=!1;mxEvent.addGestureListeners(J,mxUtils.bind(this,function(c){D=b.sidebar.currentElt==u}),null,null);mxEvent.addListener(J,"click",mxUtils.bind(this,function(b){D||P(b,J);mxEvent.consume(b)}))}O.appendChild(u);return u}function E(){function b(b,c){var f=mxResources.get(b);null==f&&(f=b.substring(0,1).toUpperCase()+b.substring(1));18<
+f.length&&(f=f.substring(0,18)+"&hellip;");return f+" ("+c.length+")"}function c(b,c,f){mxEvent.addListener(c,"click",function(){S!=c&&(S.style.backgroundColor="",S=c,S.style.backgroundColor=n,O.scrollTop=0,O.innerHTML="",M=0,Y=f?ea[b][f]:ca[b],G=null,y(!1))})}oa&&(oa=!1,mxEvent.addListener(O,"scroll",function(b){O.scrollTop+O.clientHeight>=O.scrollHeight&&(y(),mxEvent.consume(b))}));if(0<pa){var f=document.createElement("div");f.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";
mxUtils.write(f,mxResources.get("custom"));ia.appendChild(f);for(var d in ka){var e=document.createElement("div"),l=d,f=ka[d];18<l.length&&(l=l.substring(0,18)+"&hellip;");e.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";e.setAttribute("title",l+" ("+f.length+")");mxUtils.write(e,e.getAttribute("title"));null!=m&&(e.style.padding=m);ia.appendChild(e);(function(b,c){mxEvent.addListener(e,"click",
-function(){R!=c&&(R.style.backgroundColor="",R=c,R.style.backgroundColor=n,N.scrollTop=0,N.innerHTML="",M=0,X=ka[b],G=null,y(!1))})})(d,e)}f=document.createElement("div");f.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(f,"draw.io");ia.appendChild(f)}for(d in ca){var l=ea[d],k=e=document.createElement(l?"ul":"div"),f=ca[d],g=b(d,f);if(null!=l){var p=document.createElement("li"),q=document.createElement("div");q.className="geTempTreeCaret";
-q.setAttribute("title",g);mxUtils.write(q,g);k=q;p.appendChild(q);g=document.createElement("ul");g.className="geTempTreeNested";g.style.visibility="hidden";for(var t in l){var u=document.createElement("li"),O=b(t,l[t]);u.setAttribute("title",O);mxUtils.write(u,O);c(d,u,t);g.appendChild(u)}p.appendChild(g);e.className="geTempTree";e.appendChild(p);(function(b,c){mxEvent.addListener(c,"click",function(){b.style.visibility="visible";b.classList.toggle("geTempTreeActive");b.classList.toggle("geTempTreeNested")&&
-setTimeout(function(){b.style.visibility="hidden"},550);c.classList.toggle("geTempTreeCaret-down")})})(g,q)}else e.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",e.setAttribute("title",g),mxUtils.write(e,g);null!=m&&(e.style.padding=m);ia.appendChild(e);null==R&&0<f.length&&(R=e,R.style.backgroundColor=n,X=f);c(d,k)}y(!1)}d=null!=d?d:!0;g=null!=g?g:!1;n=null!=n?n:"#ebf2f9";
-f=null!=f?f:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";l=null!=l?l:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";p=null!=p?p:EditorUi.templateFile;var I=document.createElement("div");I.style.userSelect="none";I.style.height="100%";var D=document.createElement("div");D.style.whiteSpace="nowrap";D.style.height="46px";d&&I.appendChild(D);var H=document.createElement("img");H.setAttribute("border","0");H.setAttribute("align","absmiddle");H.style.width="40px";H.style.height="40px";H.style.marginRight=
-"10px";H.style.paddingBottom="4px";H.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_NOTION?IMAGE_PATH+"/notion-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";
-!e&&d&&D.appendChild(H);d&&mxUtils.write(D,(null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");H=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?H=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?H=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?H=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?H=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?H=b.gitLab.extension:b.mode==
-App.MODE_NOTION&&null!=b.notion?H=b.notion.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(H=b.trello.extension);var K=document.createElement("input");K.setAttribute("value",b.defaultFilename+H);K.style.marginLeft="10px";K.style.width=e?"144px":"244px";this.init=function(){d&&(K.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?K.select():document.execCommand("selectAll",!1,null));null!=N.parentNode&&null!=N.parentNode.parentNode&&mxEvent.addGestureListeners(N.parentNode.parentNode,
-mxUtils.bind(this,function(c){b.sidebar.hideTooltip()}),null,null)};d&&(D.appendChild(K),z?K.style.width=e?"350px":"450px":(null!=b.editor.diagramFileTypes&&(z=FilenameDialog.createFileTypes(b,K,b.editor.diagramFileTypes),z.style.marginLeft="6px",z.style.width=e?"80px":"180px",D.appendChild(z)),null!=b.editor.fileExtensions&&(z=FilenameDialog.createTypeHint(b,K,b.editor.fileExtensions),z.style.marginTop="12px",D.appendChild(z))));var D=!1,M=0,L=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,
-color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),P=mxUtils.button(x||mxResources.get("create"),function(){P.setAttribute("disabled","disabled");B();P.removeAttribute("disabled")});P.className="geBtn gePrimaryBtn";if(q||t){var O=[],G=null,J=null,W=null,T=function(b){P.setAttribute("disabled","disabled");for(var c=0;c<O.length;c++)O[c].className=c==b?"geBtn gePrimaryBtn":"geBtn"},D=!0;x=document.createElement("div");x.style.whiteSpace="nowrap";x.style.height="30px";I.appendChild(x);
-z=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ia.style.display="";S.style.display="";N.style.left="160px";T(0);N.scrollTop=0;N.innerHTML="";M=0;G!=X&&(X=G,ca=J,pa=W,ia.innerHTML="",F(),G=null)});O.push(z);x.appendChild(z);var Q=function(b){ia.style.display="none";S.style.display="none";N.style.left="30px";T(b?-1:1);null==G&&(G=X);N.scrollTop=0;N.innerHTML="";L.spin(N);var c=function(b,c,f){M=0;L.stop();X=b;f=f||{};var d=0,e;for(e in f)d+=f[e].length;if(c)N.innerHTML=c;
-else if(0==b.length&&0==d)N.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(N.innerHTML="",0<d){ia.style.display="";N.style.left="160px";ia.innerHTML="";pa=0;ca={"draw.io":b};for(e in f)ca[e]=f[e];F()}else y(!0)};b?t(Y.value,c):q(c)};q&&(z=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){Q()}),x.appendChild(z),O.push(z));if(t){z=document.createElement("span");z.style.marginLeft="10px";z.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+
-":");x.appendChild(z);var Y=document.createElement("input");Y.style.marginRight="10px";Y.style.marginLeft="10px";Y.style.width="220px";mxEvent.addListener(Y,"keypress",function(b){13==b.keyCode&&Q(!0)});x.appendChild(Y);z=mxUtils.button(mxResources.get("search"),function(){Q(!0)});z.className="geBtn";x.appendChild(z)}T(0)}var ga=null,ha=null,ba=null,aa=null,Z=null,ja=null,da=null,N=document.createElement("div");N.style.border="1px solid #d3d3d3";N.style.position="absolute";N.style.left="160px";N.style.right=
-"34px";x=(d?72:40)+(D?30:0);N.style.top=x+"px";N.style.bottom="68px";N.style.margin="6px 0 0 -1px";N.style.padding="6px";N.style.overflow="auto";var S=document.createElement("div");S.style.cssText="position:absolute;left:30px;width:128px;top:"+x+"px;height:22px;margin-top: 6px;white-space: nowrap";var la=document.createElement("input");la.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";la.setAttribute("placeholder",mxResources.get("search"));
-la.setAttribute("type","text");S.appendChild(la);var U=document.createElement("img"),fa="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";U.setAttribute("src",fa);U.setAttribute("title",mxResources.get("search"));U.style.position="relative";U.style.left="-18px";U.style.top="1px";U.style.background="url('"+b.editor.transparentImage+"')";S.appendChild(U);mxEvent.addListener(U,"click",function(){U.getAttribute("src")==Dialog.prototype.closeImage&&(U.setAttribute("src",
+function(){S!=c&&(S.style.backgroundColor="",S=c,S.style.backgroundColor=n,O.scrollTop=0,O.innerHTML="",M=0,Y=ka[b],G=null,y(!1))})})(d,e)}f=document.createElement("div");f.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(f,"draw.io");ia.appendChild(f)}for(d in ca){var l=ea[d],k=e=document.createElement(l?"ul":"div"),f=ca[d],g=b(d,f);if(null!=l){var p=document.createElement("li"),q=document.createElement("div");q.className="geTempTreeCaret";
+q.setAttribute("title",g);mxUtils.write(q,g);k=q;p.appendChild(q);g=document.createElement("ul");g.className="geTempTreeNested";g.style.visibility="hidden";for(var t in l){var u=document.createElement("li"),P=b(t,l[t]);u.setAttribute("title",P);mxUtils.write(u,P);c(d,u,t);g.appendChild(u)}p.appendChild(g);e.className="geTempTree";e.appendChild(p);(function(b,c){mxEvent.addListener(c,"click",function(){b.style.visibility="visible";b.classList.toggle("geTempTreeActive");b.classList.toggle("geTempTreeNested")&&
+setTimeout(function(){b.style.visibility="hidden"},550);c.classList.toggle("geTempTreeCaret-down")})})(g,q)}else e.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",e.setAttribute("title",g),mxUtils.write(e,g);null!=m&&(e.style.padding=m);ia.appendChild(e);null==S&&0<f.length&&(S=e,S.style.backgroundColor=n,Y=f);c(d,k)}y(!1)}d=null!=d?d:!0;g=null!=g?g:!1;n=null!=n?n:"#ebf2f9";
+f=null!=f?f:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";l=null!=l?l:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";p=null!=p?p:EditorUi.templateFile;var H=document.createElement("div");H.style.userSelect="none";H.style.height="100%";var D=document.createElement("div");D.style.whiteSpace="nowrap";D.style.height="46px";d&&H.appendChild(D);var I=document.createElement("img");I.setAttribute("border","0");I.setAttribute("align","absmiddle");I.style.width="40px";I.style.height="40px";I.style.marginRight=
+"10px";I.style.paddingBottom="4px";I.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_NOTION?IMAGE_PATH+"/notion-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";
+!e&&d&&D.appendChild(I);d&&mxUtils.write(D,(null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");I=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?I=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?I=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?I=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?I=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?I=b.gitLab.extension:b.mode==
+App.MODE_NOTION&&null!=b.notion?I=b.notion.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(I=b.trello.extension);var K=document.createElement("input");K.setAttribute("value",b.defaultFilename+I);K.style.marginLeft="10px";K.style.width=e?"144px":"244px";this.init=function(){d&&(K.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?K.select():document.execCommand("selectAll",!1,null));null!=O.parentNode&&null!=O.parentNode.parentNode&&mxEvent.addGestureListeners(O.parentNode.parentNode,
+mxUtils.bind(this,function(c){b.sidebar.hideTooltip()}),null,null)};d&&(D.appendChild(K),A?K.style.width=e?"350px":"450px":(null!=b.editor.diagramFileTypes&&(A=FilenameDialog.createFileTypes(b,K,b.editor.diagramFileTypes),A.style.marginLeft="6px",A.style.width=e?"80px":"180px",D.appendChild(A)),null!=b.editor.fileExtensions&&(A=FilenameDialog.createTypeHint(b,K,b.editor.fileExtensions),A.style.marginTop="12px",D.appendChild(A))));var D=!1,M=0,L=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,
+color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),N=mxUtils.button(x||mxResources.get("create"),function(){N.setAttribute("disabled","disabled");z();N.removeAttribute("disabled")});N.className="geBtn gePrimaryBtn";if(q||t){var P=[],G=null,J=null,W=null,R=function(b){N.setAttribute("disabled","disabled");for(var c=0;c<P.length;c++)P[c].className=c==b?"geBtn gePrimaryBtn":"geBtn"},D=!0;x=document.createElement("div");x.style.whiteSpace="nowrap";x.style.height="30px";H.appendChild(x);
+A=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ia.style.display="";T.style.display="";O.style.left="160px";R(0);O.scrollTop=0;O.innerHTML="";M=0;G!=Y&&(Y=G,ca=J,pa=W,ia.innerHTML="",E(),G=null)});P.push(A);x.appendChild(A);var Q=function(b){ia.style.display="none";T.style.display="none";O.style.left="30px";R(b?-1:1);null==G&&(G=Y);O.scrollTop=0;O.innerHTML="";L.spin(O);var c=function(b,c,f){M=0;L.stop();Y=b;f=f||{};var d=0,e;for(e in f)d+=f[e].length;if(c)O.innerHTML=c;
+else if(0==b.length&&0==d)O.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(O.innerHTML="",0<d){ia.style.display="";O.style.left="160px";ia.innerHTML="";pa=0;ca={"draw.io":b};for(e in f)ca[e]=f[e];E()}else y(!0)};b?t(X.value,c):q(c)};q&&(A=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){Q()}),x.appendChild(A),P.push(A));if(t){A=document.createElement("span");A.style.marginLeft="10px";A.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+
+":");x.appendChild(A);var X=document.createElement("input");X.style.marginRight="10px";X.style.marginLeft="10px";X.style.width="220px";mxEvent.addListener(X,"keypress",function(b){13==b.keyCode&&Q(!0)});x.appendChild(X);A=mxUtils.button(mxResources.get("search"),function(){Q(!0)});A.className="geBtn";x.appendChild(A)}R(0)}var ha=null,ga=null,aa=null,ba=null,Z=null,ja=null,da=null,O=document.createElement("div");O.style.border="1px solid #d3d3d3";O.style.position="absolute";O.style.left="160px";O.style.right=
+"34px";x=(d?72:40)+(D?30:0);O.style.top=x+"px";O.style.bottom="68px";O.style.margin="6px 0 0 -1px";O.style.padding="6px";O.style.overflow="auto";var T=document.createElement("div");T.style.cssText="position:absolute;left:30px;width:128px;top:"+x+"px;height:22px;margin-top: 6px;white-space: nowrap";var la=document.createElement("input");la.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";la.setAttribute("placeholder",mxResources.get("search"));
+la.setAttribute("type","text");T.appendChild(la);var U=document.createElement("img"),fa="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";U.setAttribute("src",fa);U.setAttribute("title",mxResources.get("search"));U.style.position="relative";U.style.left="-18px";U.style.top="1px";U.style.background="url('"+b.editor.transparentImage+"')";T.appendChild(U);mxEvent.addListener(U,"click",function(){U.getAttribute("src")==Dialog.prototype.closeImage&&(U.setAttribute("src",
fa),U.setAttribute("title",mxResources.get("search")),la.value="",null!=ma&&(ma.click(),ma=null));la.focus()});mxEvent.addListener(la,"keydown",mxUtils.bind(this,function(b){if(13==b.keyCode){var c=la.value;if(""==c)null!=ma&&(ma.click(),ma=null);else{if(null==NewDialog.tagsList[p]){var f={},d;for(d in ca)for(var e=ca[d],l=0;l<e.length;l++){var m=e[l];if(null!=m.tags)for(var k=m.tags.toLowerCase().split(";"),g=0;g<k.length;g++)null==f[k[g]]&&(f[k[g]]=[]),f[k[g]].push(m)}NewDialog.tagsList[p]=f}var q=
-c.toLowerCase().split(" "),f=NewDialog.tagsList[p];if(0<pa&&null==f.__tagsList__){for(d in ka)for(e=ka[d],l=0;l<e.length;l++)for(m=e[l],k=m.title.split(" "),k.push(d),g=0;g<k.length;g++){var t=k[g].toLowerCase();null==f[t]&&(f[t]=[]);f[t].push(m)}f.__tagsList__=!0}d=[];e={};for(l=k=0;l<q.length;l++)if(0<q[l].length){var t=f[q[l]],n={};d=[];if(null!=t)for(g=0;g<t.length;g++)m=t[g],0==k==(null==e[m.url])&&(n[m.url]=!0,d.push(m));e=n;k++}N.scrollTop=0;N.innerHTML="";M=0;f=document.createElement("div");
-f.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";mxUtils.write(f,mxResources.get(0==d.length?"noResultsFor":"resultsFor",[c]));N.appendChild(f);null!=R&&null==ma&&(R.style.backgroundColor="",ma=R,R=f);X=d;G=null;y(!1)}mxEvent.consume(b)}}));mxEvent.addListener(la,"keyup",mxUtils.bind(this,function(b){""==la.value?(U.setAttribute("src",fa),U.setAttribute("title",mxResources.get("search"))):(U.setAttribute("src",Dialog.prototype.closeImage),U.setAttribute("title",mxResources.get("reset")))}));
-x+=23;var ia=document.createElement("div");ia.style.cssText="position:absolute;left:30px;width:128px;top:"+x+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(N,"scroll",function(){b.sidebar.hideTooltip()});var na=140,V=140,ca={},ea={},ka={},pa=0,oa=!0,R=null,ma=null;ca.basic=[{title:"blankDiagram",select:!0}];var X=ca.basic;if(!e){var ta=function(){mxUtils.get(qa,function(b){if(!ra){ra=!0;b=b.getXml().documentElement.firstChild;for(var c={};null!=b;){if("undefined"!==
+c.toLowerCase().split(" "),f=NewDialog.tagsList[p];if(0<pa&&null==f.__tagsList__){for(d in ka)for(e=ka[d],l=0;l<e.length;l++)for(m=e[l],k=m.title.split(" "),k.push(d),g=0;g<k.length;g++){var t=k[g].toLowerCase();null==f[t]&&(f[t]=[]);f[t].push(m)}f.__tagsList__=!0}d=[];e={};for(l=k=0;l<q.length;l++)if(0<q[l].length){var t=f[q[l]],n={};d=[];if(null!=t)for(g=0;g<t.length;g++)m=t[g],0==k==(null==e[m.url])&&(n[m.url]=!0,d.push(m));e=n;k++}O.scrollTop=0;O.innerHTML="";M=0;f=document.createElement("div");
+f.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";mxUtils.write(f,mxResources.get(0==d.length?"noResultsFor":"resultsFor",[c]));O.appendChild(f);null!=S&&null==ma&&(S.style.backgroundColor="",ma=S,S=f);Y=d;G=null;y(!1)}mxEvent.consume(b)}}));mxEvent.addListener(la,"keyup",mxUtils.bind(this,function(b){""==la.value?(U.setAttribute("src",fa),U.setAttribute("title",mxResources.get("search"))):(U.setAttribute("src",Dialog.prototype.closeImage),U.setAttribute("title",mxResources.get("reset")))}));
+x+=23;var ia=document.createElement("div");ia.style.cssText="position:absolute;left:30px;width:128px;top:"+x+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(O,"scroll",function(){b.sidebar.hideTooltip()});var na=140,V=140,ca={},ea={},ka={},pa=0,oa=!0,S=null,ma=null;ca.basic=[{title:"blankDiagram",select:!0}];var Y=ca.basic;if(!e){var ta=function(){mxUtils.get(qa,function(b){if(!ra){ra=!0;b=b.getXml().documentElement.firstChild;for(var c={};null!=b;){if("undefined"!==
typeof b.getAttribute)if("clibs"==b.nodeName){for(var f=b.getAttribute("name"),d=b.getElementsByTagName("add"),e=[],l=0;l<d.length;l++)e.push(encodeURIComponent(mxUtils.getTextContent(d[l])));null!=f&&0<e.length&&(c[f]=e.join(";"))}else if(e=b.getAttribute("url"),null!=e){d=b.getAttribute("section");f=b.getAttribute("subsection");if(null==d&&(l=e.indexOf("/"),d=e.substring(0,l),null==f)){var m=e.indexOf("/",l+1);-1<m&&(f=e.substring(l+1,m))}l=ca[d];null==l&&(l=[],ca[d]=l);e=b.getAttribute("clibs");
-null!=c[e]&&(e=c[e]);e={url:b.getAttribute("url"),libs:b.getAttribute("libs"),title:b.getAttribute("title"),tooltip:b.getAttribute("name")||b.getAttribute("url"),preview:b.getAttribute("preview"),clibs:e,tags:b.getAttribute("tags")};l.push(e);null!=f&&(l=ea[d],null==l&&(l={},ea[d]=l),d=l[f],null==d&&(d=[],l[f]=d),d.push(e))}b=b.nextSibling}L.stop();F()}})};I.appendChild(S);I.appendChild(ia);I.appendChild(N);var ra=!1,qa=p;/^https?:\/\//.test(qa)&&!b.editor.isCorsEnabledForUrl(qa)&&(qa=PROXY_URL+"?url="+
-encodeURIComponent(qa));L.spin(N);null!=A?A(function(b,c){ka=b;W=pa=c;ta()},ta):ta();J=ca}mxEvent.addListener(K,"keypress",function(c){b.dialog.container.firstChild==I&&13==c.keyCode&&B()});A=document.createElement("div");A.style.marginTop=e?"4px":"16px";A.style.textAlign="right";A.style.position="absolute";A.style.left="40px";A.style.bottom="24px";A.style.right="40px";e||b.isOffline()||!d||null!=c||g||(x=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
-x.className="geBtn",A.appendChild(x));x=mxUtils.button(mxResources.get("cancel"),function(){null!=k&&k();b.hideDialog(!0)});x.className="geBtn";!b.editor.cancelFirst||g&&null==k||A.appendChild(x);e||"1"==urlParams.embed||g||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var c=new FilenameDialog(b,"",mxResources.get("create"),function(c){null!=c&&0<c.length&&(c=b.getUrl(window.location.pathname+"?mode="+b.mode+"&title="+encodeURIComponent(K.value)+"&create="+encodeURIComponent(c)),
-null==b.getCurrentFile()?window.location.href=c:window.openWindow(c))},mxResources.get("url"));b.showDialog(c.container,300,80,!0,!0);c.init()}),e.className="geBtn",A.appendChild(e));Graph.fileSupport&&v&&(v=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var c=document.createElement("input");c.setAttribute("multiple","multiple");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(f){b.openFiles(c.files,!0);c.value=""});c.style.display="none";document.body.appendChild(c);
-b.newDlgFileInputElt=c}b.newDlgFileInputElt.click()}),v.className="geBtn",A.appendChild(v));A.appendChild(P);b.editor.cancelFirst||null!=c||g&&null==k||A.appendChild(x);I.appendChild(A);this.container=I};NewDialog.tagsList={};
-var CreateDialog=function(b,e,d,c,g,k,n,f,l,m,p,q,t,u,v,x,A){function z(c,f,d,l){function m(){mxEvent.addListener(g,"click",function(){var c=d;if(n){var f=C.value,l=f.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>l){var c=null!=c?c:D.value,m="";c==App.MODE_GOOGLE?m=b.drive.extension:c==App.MODE_GITHUB?m=b.gitHub.extension:c==App.MODE_GITLAB?m=b.gitLab.extension:c==App.MODE_NOTION?m=b.notion.extension:c==App.MODE_TRELLO?m=b.trello.extension:c==App.MODE_DROPBOX?m=b.dropbox.extension:c==App.MODE_ONEDRIVE?
+null!=c[e]&&(e=c[e]);e={url:b.getAttribute("url"),libs:b.getAttribute("libs"),title:b.getAttribute("title"),tooltip:b.getAttribute("name")||b.getAttribute("url"),preview:b.getAttribute("preview"),clibs:e,tags:b.getAttribute("tags")};l.push(e);null!=f&&(l=ea[d],null==l&&(l={},ea[d]=l),d=l[f],null==d&&(d=[],l[f]=d),d.push(e))}b=b.nextSibling}L.stop();E()}})};H.appendChild(T);H.appendChild(ia);H.appendChild(O);var ra=!1,qa=p;/^https?:\/\//.test(qa)&&!b.editor.isCorsEnabledForUrl(qa)&&(qa=PROXY_URL+"?url="+
+encodeURIComponent(qa));L.spin(O);null!=B?B(function(b,c){ka=b;W=pa=c;ta()},ta):ta();J=ca}mxEvent.addListener(K,"keypress",function(c){b.dialog.container.firstChild==H&&13==c.keyCode&&z()});B=document.createElement("div");B.style.marginTop=e?"4px":"16px";B.style.textAlign="right";B.style.position="absolute";B.style.left="40px";B.style.bottom="24px";B.style.right="40px";e||b.isOffline()||!d||null!=c||g||(x=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
+x.className="geBtn",B.appendChild(x));x=mxUtils.button(mxResources.get("cancel"),function(){null!=k&&k();b.hideDialog(!0)});x.className="geBtn";!b.editor.cancelFirst||g&&null==k||B.appendChild(x);e||"1"==urlParams.embed||g||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var c=new FilenameDialog(b,"",mxResources.get("create"),function(c){null!=c&&0<c.length&&(c=b.getUrl(window.location.pathname+"?mode="+b.mode+"&title="+encodeURIComponent(K.value)+"&create="+encodeURIComponent(c)),
+null==b.getCurrentFile()?window.location.href=c:window.openWindow(c))},mxResources.get("url"));b.showDialog(c.container,300,80,!0,!0);c.init()}),e.className="geBtn",B.appendChild(e));Graph.fileSupport&&v&&(v=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var c=document.createElement("input");c.setAttribute("multiple","multiple");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(f){b.openFiles(c.files,!0);c.value=""});c.style.display="none";document.body.appendChild(c);
+b.newDlgFileInputElt=c}b.newDlgFileInputElt.click()}),v.className="geBtn",B.appendChild(v));B.appendChild(N);b.editor.cancelFirst||null!=c||g&&null==k||B.appendChild(x);H.appendChild(B);this.container=H};NewDialog.tagsList={};
+var CreateDialog=function(b,e,d,c,g,k,n,f,l,m,p,q,t,u,v,x,B){function A(c,f,d,l){function m(){mxEvent.addListener(g,"click",function(){var c=d;if(n){var f=C.value,l=f.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>l){var c=null!=c?c:D.value,m="";c==App.MODE_GOOGLE?m=b.drive.extension:c==App.MODE_GITHUB?m=b.gitHub.extension:c==App.MODE_GITLAB?m=b.gitLab.extension:c==App.MODE_NOTION?m=b.notion.extension:c==App.MODE_TRELLO?m=b.trello.extension:c==App.MODE_DROPBOX?m=b.dropbox.extension:c==App.MODE_ONEDRIVE?
m=b.oneDrive.extension:c==App.MODE_DEVICE&&(m=".drawio");0<=l&&(f=f.substring(0,l));C.value=f+m}}y(d)})}var g=document.createElement("a");g.style.overflow="hidden";var k=document.createElement("img");k.src=c;k.setAttribute("border","0");k.setAttribute("align","absmiddle");k.style.width="60px";k.style.height="60px";k.style.paddingBottom="6px";g.style.display="inline-block";g.className="geBaseButton";g.style.position="relative";g.style.margin="4px";g.style.padding="8px 8px 10px 8px";g.style.whiteSpace=
"nowrap";g.appendChild(k);g.style.color="gray";g.style.fontSize="11px";var p=document.createElement("div");g.appendChild(p);mxUtils.write(p,f);if(null!=l&&null==b[l]){k.style.visibility="hidden";mxUtils.setOpacity(p,10);var t=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});t.spin(g);var u=window.setTimeout(function(){null==b[l]&&(t.stop(),g.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,
-function(){null!=b[l]&&(window.clearTimeout(u),mxUtils.setOpacity(p,100),k.style.visibility="",t.stop(),m())}))}else m();F.appendChild(g);++I==q&&(mxUtils.br(F),I=0)}function y(c){var f=C.value;if(null==c||null!=f&&0<f.length)A&&b.hideDialog(),d(f,c,C)}n=null!=n?n:!0;f=null!=f?f:!0;q=null!=q?q:4;A=null!=A?A:!0;k=document.createElement("div");k.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(k);var B=document.createElement("h2");mxUtils.write(B,g||mxResources.get("create"));B.style.marginTop=
-"0px";B.style.marginBottom="24px";k.appendChild(B);mxUtils.write(k,mxResources.get("filename")+":");var C=document.createElement("input");C.setAttribute("value",e);C.style.width="200px";C.style.marginLeft="10px";C.style.marginBottom="20px";C.style.maxWidth="70%";this.init=function(){C.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null)};k.appendChild(C);null!=x&&(null!=b.editor.diagramFileTypes&&(g=FilenameDialog.createFileTypes(b,
-C,b.editor.diagramFileTypes),g.style.marginLeft="6px",g.style.width="80px",k.appendChild(g)),k.appendChild(FilenameDialog.createTypeHint(b,C,x)));x=null;if(null!=t&&null!=u&&"image/"==u.substring(0,6)&&("image/svg"!=u.substring(0,9)||mxClient.IS_SVG)){C.style.width="160px";g=document.createElement("img");var E=v?t:btoa(unescape(encodeURIComponent(t)));g.setAttribute("src","data:"+u+";base64,"+E);g.style.position="absolute";g.style.top="70px";g.style.right="100px";g.style.maxWidth="120px";g.style.maxHeight=
-"80px";mxUtils.setPrefixedStyle(g.style,"transform","translate(50%,-50%)");k.appendChild(g);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=u||(x=mxUtils.button(mxResources.get("copy"),function(c){c=b.base64ToBlob(E,"image/png");c=new ClipboardItem({"image/png":c,"text/html":new Blob(['<img src="data:'+u+";base64,"+E+'">'],{type:"text/html"})});navigator.clipboard.write([c]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(c){b.handleError(c)}))}),
-x.style.marginTop="6px",x.className="geBtn");l&&Editor.popupsAllowed&&(g.style.cursor="pointer",mxEvent.addGestureListeners(g,null,null,function(b){mxEvent.isPopupTrigger(b)||y("_blank")}))}mxUtils.br(k);var F=document.createElement("div");F.style.textAlign="center";var I=0;F.style.marginTop="6px";k.appendChild(F);var D=document.createElement("select");D.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(t=document.createElement("option"),t.setAttribute("value",
-App.MODE_GOOGLE),mxUtils.write(t,mxResources.get("googleDrive")),D.appendChild(t),z(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(t,mxResources.get("oneDrive")),D.appendChild(t),b.mode==App.MODE_ONEDRIVE&&t.setAttribute("selected","selected"),z(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,
-"oneDrive")),"function"===typeof window.DropboxClient&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(t,mxResources.get("dropbox")),D.appendChild(t),b.mode==App.MODE_DROPBOX&&t.setAttribute("selected","selected"),z(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_GITHUB),mxUtils.write(t,mxResources.get("github")),D.appendChild(t),z(IMAGE_PATH+
-"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_GITLAB),mxUtils.write(t,mxResources.get("gitlab")),D.appendChild(t),z(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),null!=b.notion&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_NOTION),mxUtils.write(t,mxResources.get("notion")),D.appendChild(t),z(IMAGE_PATH+"/notion-logo.svg",mxResources.get("notion"),
-App.MODE_NOTION,"notion")),"function"===typeof window.TrelloClient&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_TRELLO),mxUtils.write(t,mxResources.get("trello")),D.appendChild(t),z(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));Editor.useLocalStorage&&"device"!=urlParams.storage&&null==b.getCurrentFile()||(t=document.createElement("option"),t.setAttribute("value",App.MODE_DEVICE),mxUtils.write(t,mxResources.get("device")),D.appendChild(t),
-b.mode!=App.MODE_DEVICE&&f||t.setAttribute("selected","selected"),p&&z(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE));f&&isLocalStorage&&"0"!=urlParams.browser&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_BROWSER),mxUtils.write(f,mxResources.get("browser")),D.appendChild(f),b.mode==App.MODE_BROWSER&&f.setAttribute("selected","selected"),z(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));f=document.createElement("div");
+function(){null!=b[l]&&(window.clearTimeout(u),mxUtils.setOpacity(p,100),k.style.visibility="",t.stop(),m())}))}else m();E.appendChild(g);++H==q&&(mxUtils.br(E),H=0)}function y(c){var f=C.value;if(null==c||null!=f&&0<f.length)B&&b.hideDialog(),d(f,c,C)}n=null!=n?n:!0;f=null!=f?f:!0;q=null!=q?q:4;B=null!=B?B:!0;k=document.createElement("div");k.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(k);var z=document.createElement("h2");mxUtils.write(z,g||mxResources.get("create"));z.style.marginTop=
+"0px";z.style.marginBottom="24px";k.appendChild(z);mxUtils.write(k,mxResources.get("filename")+":");var C=document.createElement("input");C.setAttribute("value",e);C.style.width="200px";C.style.marginLeft="10px";C.style.marginBottom="20px";C.style.maxWidth="70%";this.init=function(){C.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null)};k.appendChild(C);null!=x&&(null!=b.editor.diagramFileTypes&&(g=FilenameDialog.createFileTypes(b,
+C,b.editor.diagramFileTypes),g.style.marginLeft="6px",g.style.width="80px",k.appendChild(g)),k.appendChild(FilenameDialog.createTypeHint(b,C,x)));x=null;if(null!=t&&null!=u&&"image/"==u.substring(0,6)&&("image/svg"!=u.substring(0,9)||mxClient.IS_SVG)){C.style.width="160px";g=document.createElement("img");var F=v?t:btoa(unescape(encodeURIComponent(t)));g.setAttribute("src","data:"+u+";base64,"+F);g.style.position="absolute";g.style.top="70px";g.style.right="100px";g.style.maxWidth="120px";g.style.maxHeight=
+"80px";mxUtils.setPrefixedStyle(g.style,"transform","translate(50%,-50%)");k.appendChild(g);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=u||(x=mxUtils.button(mxResources.get("copy"),function(c){c=b.base64ToBlob(F,"image/png");c=new ClipboardItem({"image/png":c,"text/html":new Blob(['<img src="data:'+u+";base64,"+F+'">'],{type:"text/html"})});navigator.clipboard.write([c]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(c){b.handleError(c)}))}),
+x.style.marginTop="6px",x.className="geBtn");l&&Editor.popupsAllowed&&(g.style.cursor="pointer",mxEvent.addGestureListeners(g,null,null,function(b){mxEvent.isPopupTrigger(b)||y("_blank")}))}mxUtils.br(k);var E=document.createElement("div");E.style.textAlign="center";var H=0;E.style.marginTop="6px";k.appendChild(E);var D=document.createElement("select");D.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(t=document.createElement("option"),t.setAttribute("value",
+App.MODE_GOOGLE),mxUtils.write(t,mxResources.get("googleDrive")),D.appendChild(t),A(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(t,mxResources.get("oneDrive")),D.appendChild(t),b.mode==App.MODE_ONEDRIVE&&t.setAttribute("selected","selected"),A(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,
+"oneDrive")),"function"===typeof window.DropboxClient&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(t,mxResources.get("dropbox")),D.appendChild(t),b.mode==App.MODE_DROPBOX&&t.setAttribute("selected","selected"),A(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_GITHUB),mxUtils.write(t,mxResources.get("github")),D.appendChild(t),A(IMAGE_PATH+
+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_GITLAB),mxUtils.write(t,mxResources.get("gitlab")),D.appendChild(t),A(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),null!=b.notion&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_NOTION),mxUtils.write(t,mxResources.get("notion")),D.appendChild(t),A(IMAGE_PATH+"/notion-logo.svg",mxResources.get("notion"),
+App.MODE_NOTION,"notion")),"function"===typeof window.TrelloClient&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_TRELLO),mxUtils.write(t,mxResources.get("trello")),D.appendChild(t),A(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));Editor.useLocalStorage&&"device"!=urlParams.storage&&null==b.getCurrentFile()||(t=document.createElement("option"),t.setAttribute("value",App.MODE_DEVICE),mxUtils.write(t,mxResources.get("device")),D.appendChild(t),
+b.mode!=App.MODE_DEVICE&&f||t.setAttribute("selected","selected"),p&&A(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE));f&&isLocalStorage&&"0"!=urlParams.browser&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_BROWSER),mxUtils.write(f,mxResources.get("browser")),D.appendChild(f),b.mode==App.MODE_BROWSER&&f.setAttribute("selected","selected"),A(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));f=document.createElement("div");
f.style.marginTop="26px";f.style.textAlign="center";null!=m&&(p=mxUtils.button(mxResources.get("help"),function(){b.openLink(m)}),p.className="geBtn",f.appendChild(p));p=mxUtils.button(mxResources.get(null!=c?"close":"cancel"),function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});p.className="geBtn";b.editor.cancelFirst&&null==c&&f.appendChild(p);null==c&&(t=mxUtils.button(mxResources.get("decideLater"),function(){y(null)}),t.className="geBtn",
f.appendChild(t));l&&Editor.popupsAllowed&&(l=mxUtils.button(mxResources.get("openInNewWindow"),function(){y("_blank")}),l.className="geBtn",f.appendChild(l));CreateDialog.showDownloadButton&&(l=mxUtils.button(mxResources.get("download"),function(){y("download")}),l.className="geBtn",f.appendChild(l),null!=x&&(l.style.marginTop="6px",f.style.marginTop="6px"));null!=x&&(mxUtils.br(f),f.appendChild(x));b.editor.cancelFirst&&null==c||f.appendChild(p);mxEvent.addListener(C,"keypress",function(c){13==
c.keyCode?y(App.MODE_DEVICE):27==c.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});k.appendChild(f);this.container=k};CreateDialog.showDownloadButton=!0;
@@ -10035,15 +10057,15 @@ mxResources.get("dragUrlsHere"));p.setAttribute("type","text");p.style.marginTop
"14px";q.style.cursor="pointer";q.style.display="inline-block";q.style.top="3px";q.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(q,"click",function(){p.value="";p.focus()});var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","url");t.setAttribute("type","radio");t.setAttribute("name","geLinkDialogOption");var u=document.createElement("input");u.style.cssText="margin-right:8px;margin-bottom:8px;";u.setAttribute("value",
"url");u.setAttribute("type","radio");u.setAttribute("name","geLinkDialogOption");var v=document.createElement("select");v.style.width="100%";var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.margin="0 6p 0 6px";null!=n&&(x.setAttribute("checked","checked"),x.defaultChecked=!0);n=null!=n?n:"_blank";x.setAttribute("title",n);k&&(p.style.width="340px");if(g&&null!=b.pages){null!=e&&Graph.isPageLink(e)?(u.setAttribute("checked","checked"),u.defaultChecked=!0):(p.setAttribute("value",
e),t.setAttribute("checked","checked"),t.defaultChecked=!0);m.appendChild(t);m.appendChild(p);m.appendChild(q);k&&(m.appendChild(x),mxUtils.write(m,mxResources.get("openInNewWindow")));mxUtils.br(m);m.appendChild(u);g=!1;for(k=0;k<b.pages.length;k++)q=document.createElement("option"),mxUtils.write(q,b.pages[k].getName()||mxResources.get("pageWithNumber",[k+1])),q.setAttribute("value","data:page/id,"+b.pages[k].getId()),e==q.getAttribute("value")&&(q.setAttribute("selected","selected"),g=!0),v.appendChild(q);
-if(!g&&u.checked){var A=document.createElement("option");mxUtils.write(A,mxResources.get("pageNotFound"));A.setAttribute("disabled","disabled");A.setAttribute("selected","selected");A.setAttribute("value","pageNotFound");v.appendChild(A);mxEvent.addListener(v,"change",function(){null==A.parentNode||A.selected||A.parentNode.removeChild(A)})}m.appendChild(v)}else p.setAttribute("value",e),m.appendChild(p),m.appendChild(q);l.appendChild(m);var z=mxUtils.button(d,function(){b.hideDialog();c(u.checked?
-"pageNotFound"!==v.value?v.value:e:p.value,LinkDialog.selectedDocs,x.checked?n:null)});z.style.verticalAlign="middle";z.className="geBtn gePrimaryBtn";this.init=function(){u.checked?v.focus():(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(v,"focus",function(){t.removeAttribute("checked");u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(p,"focus",function(){u.removeAttribute("checked");
+if(!g&&u.checked){var B=document.createElement("option");mxUtils.write(B,mxResources.get("pageNotFound"));B.setAttribute("disabled","disabled");B.setAttribute("selected","selected");B.setAttribute("value","pageNotFound");v.appendChild(B);mxEvent.addListener(v,"change",function(){null==B.parentNode||B.selected||B.parentNode.removeChild(B)})}m.appendChild(v)}else p.setAttribute("value",e),m.appendChild(p),m.appendChild(q);l.appendChild(m);var A=mxUtils.button(d,function(){b.hideDialog();c(u.checked?
+"pageNotFound"!==v.value?v.value:e:p.value,LinkDialog.selectedDocs,x.checked?n:null)});A.style.verticalAlign="middle";A.className="geBtn gePrimaryBtn";this.init=function(){u.checked?v.focus():(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(v,"focus",function(){t.removeAttribute("checked");u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(p,"focus",function(){u.removeAttribute("checked");
t.setAttribute("checked","checked");t.checked=!0});if(Graph.fileSupport){var c=l.parentNode,f=null;mxEvent.addListener(c,"dragleave",function(b){null!=f&&(f.parentNode.removeChild(f),f=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(d){null==f&&(!mxClient.IS_IE||10<document.documentMode)&&(f=b.highlightElement(c));d.stopPropagation();d.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(b){null!=f&&(f.parentNode.removeChild(f),
-f=null);0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")&&(p.value=decodeURIComponent(b.dataTransfer.getData("text/uri-list")),t.setAttribute("checked","checked"),t.checked=!0,z.click());b.stopPropagation();b.preventDefault()}),!1)}};var y=document.createElement("div");y.style.marginTop="18px";y.style.textAlign="center";d=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")});d.style.verticalAlign="middle";d.className="geBtn";y.appendChild(d);
+f=null);0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")&&(p.value=decodeURIComponent(b.dataTransfer.getData("text/uri-list")),t.setAttribute("checked","checked"),t.checked=!0,A.click());b.stopPropagation();b.preventDefault()}),!1)}};var y=document.createElement("div");y.style.marginTop="18px";y.style.textAlign="center";d=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")});d.style.verticalAlign="middle";d.className="geBtn";y.appendChild(d);
b.isOffline()&&!mxClient.IS_CHROMEAPP&&(d.style.display="none");d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.style.verticalAlign="middle";d.className="geBtn";b.editor.cancelFirst&&y.appendChild(d);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(b){if(b.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=b.docs;var c=b.docs[0].url;"application/mxe"==b.docs[0].mimeType||null!=b.docs[0].mimeType&&"application/vnd.jgraph."==b.docs[0].mimeType.substring(0,
23)?c="https://www.draw.io/#G"+b.docs[0].id:"application/vnd.google-apps.folder"==b.docs[0].mimeType&&(c="https://drive.google.com/#folders/"+b.docs[0].id);p.value=c;p.focus()}else LinkDialog.selectedDocs=null;p.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&f(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();
if(null==b.linkPicker){var c=b.drive.createLinkPicker();b.linkPicker=c.setCallback(function(b){LinkDialog.filePicked(b)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&f(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(b){p.value=b[0].link;p.focus()}})});null!=b.oneDrive&&f(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){b.oneDrive.pickFile(function(b,
c){p.value=c.value[0].webUrl;p.focus()})});null!=b.gitHub&&f(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(b){if(null!=b){b=b.split("/");var c=b[0],f=b[1],d=b[2];b=b.slice(3,b.length).join("/");p.value="https://github.com/"+c+"/"+f+"/blob/"+d+"/"+b;p.focus()}})});null!=b.gitLab&&f(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(b){if(null!=b){b=b.split("/");var c=b[0],f=b[1],d=b[2];b=b.slice(3,b.length).join("/");
-p.value=DRAWIO_GITLAB_URL+"/"+c+"/"+f+"/blob/"+d+"/"+b;p.focus()}})});mxEvent.addListener(p,"keypress",function(f){13==f.keyCode&&(b.hideDialog(),c(u.checked?v.value:p.value,LinkDialog.selectedDocs))});y.appendChild(z);b.editor.cancelFirst||y.appendChild(d);l.appendChild(y);this.container=l},FeedbackDialog=function(b,e,d,c){var g=document.createElement("div"),k=document.createElement("div");mxUtils.write(k,mxResources.get("sendYourFeedback"));k.style.fontSize="18px";k.style.marginBottom="18px";g.appendChild(k);
+p.value=DRAWIO_GITLAB_URL+"/"+c+"/"+f+"/blob/"+d+"/"+b;p.focus()}})});mxEvent.addListener(p,"keypress",function(f){13==f.keyCode&&(b.hideDialog(),c(u.checked?v.value:p.value,LinkDialog.selectedDocs))});y.appendChild(A);b.editor.cancelFirst||y.appendChild(d);l.appendChild(y);this.container=l},FeedbackDialog=function(b,e,d,c){var g=document.createElement("div"),k=document.createElement("div");mxUtils.write(k,mxResources.get("sendYourFeedback"));k.style.fontSize="18px";k.style.marginBottom="18px";g.appendChild(k);
k=document.createElement("div");mxUtils.write(k,mxResources.get("yourEmailAddress")+(d?"":" ("+mxResources.get("required")+")"));g.appendChild(k);var n=document.createElement("input");n.setAttribute("type","text");n.style.marginTop="6px";n.style.width="600px";var f=mxUtils.button(mxResources.get("sendMessage"),function(){var f=p.value+(m.checked?"\nDiagram:\n"+(null!=c?c:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+
navigator.appName+"\nplatform:\n"+navigator.platform;f.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(n.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=e?e:"Feedback")+":\n"+f),function(c){b.spinner.stop();200<=c.getStatus()&&
299>=c.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});f.className="geBtn gePrimaryBtn";if(!d){f.setAttribute("disabled","disabled");var l=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(n,"change",function(){0<n.value.length&&0<l.test(n.value)?
@@ -10053,56 +10075,56 @@ f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")});mxEvent.ad
var RevisionDialog=function(b,e,d){var c=document.createElement("div"),g=document.createElement("h3");g.style.marginTop="0px";mxUtils.write(g,mxResources.get("revisionHistory"));c.appendChild(g);g=document.createElement("div");g.style.position="absolute";g.style.overflow="auto";g.style.width="170px";g.style.height="378px";c.appendChild(g);var k=document.createElement("div");k.style.position="absolute";k.style.border="1px solid lightGray";k.style.left="199px";k.style.width="470px";k.style.height="376px";
k.style.overflow="hidden";var n=document.createElement("div");n.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";k.appendChild(n);mxEvent.disableContextMenu(k);c.appendChild(k);var f=new Graph(k);f.setTooltips(!1);f.setEnabled(!1);f.setPanning(!0);f.panningHandler.ignoreCell=!0;f.panningHandler.useLeftButtonForPanning=!0;f.minFitScale=null;f.maxFitScale=null;f.centerZoom=!0;var l=0,m=null,p=0,q=f.getGlobalVariable;
f.getGlobalVariable=function(b){return"page"==b&&null!=m&&null!=m[p]?m[p].getAttribute("name"):"pagenumber"==b?p+1:"pagecount"==b?null!=m?m.length:1:q.apply(this,arguments)};f.getLinkForCell=function(){return null};Editor.MathJaxRender&&f.addListener(mxEvent.SIZE,mxUtils.bind(this,function(c,d){b.editor.graph.mathEnabled&&Editor.MathJaxRender(f.container)}));for(var t={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60,
-shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},u=new Spinner(t),v=b.getCurrentFile(),x=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),A={},t=0;t<x.length;t++)A[x[t].getAttribute("id")]=x[t];var z=null,y=null,B=null,C=null,E=mxUtils.button("",function(){null!=B&&f.zoomIn()});E.className="geSprite geSprite-zoomin";E.setAttribute("title",mxResources.get("zoomIn"));E.style.outline="none";E.style.border="none";E.style.margin="2px";E.setAttribute("disabled","disabled");
-mxUtils.setOpacity(E,20);var F=mxUtils.button("",function(){null!=B&&f.zoomOut()});F.className="geSprite geSprite-zoomout";F.setAttribute("title",mxResources.get("zoomOut"));F.style.outline="none";F.style.border="none";F.style.margin="2px";F.setAttribute("disabled","disabled");mxUtils.setOpacity(F,20);var I=mxUtils.button("",function(){null!=B&&(f.maxFitScale=8,f.fit(8),f.center())});I.className="geSprite geSprite-fit";I.setAttribute("title",mxResources.get("fit"));I.style.outline="none";I.style.border=
-"none";I.style.margin="2px";I.setAttribute("disabled","disabled");mxUtils.setOpacity(I,20);var D=mxUtils.button("",function(){null!=B&&(f.zoomActual(),f.center())});D.className="geSprite geSprite-actualsize";D.setAttribute("title",mxResources.get("actualSize"));D.style.outline="none";D.style.border="none";D.style.margin="2px";D.setAttribute("disabled","disabled");mxUtils.setOpacity(D,20);var H=mxUtils.button("",function(){});H.className="geSprite geSprite-middle";H.setAttribute("title",mxResources.get("compare"));
-H.style.outline="none";H.style.border="none";H.style.margin="2px";mxUtils.setOpacity(H,60);var K=k.cloneNode(!1);K.style.pointerEvent="none";k.parentNode.appendChild(K);var M=new Graph(K);M.setTooltips(!1);M.setEnabled(!1);M.setPanning(!0);M.panningHandler.ignoreCell=!0;M.panningHandler.useLeftButtonForPanning=!0;M.minFitScale=null;M.maxFitScale=null;M.centerZoom=!0;mxEvent.addGestureListeners(H,function(b){b=A[m[l].getAttribute("id")];mxUtils.setOpacity(H,20);n.innerHTML="";null==b?mxUtils.write(n,
-mxResources.get("pageNotFound")):(L.style.display="none",k.style.display="none",K.style.display="",K.style.backgroundColor=k.style.backgroundColor,b=Editor.parseDiagramNode(b),(new mxCodec(b.ownerDocument)).decode(b,M.getModel()),M.view.scaleAndTranslate(f.view.scale,f.view.translate.x,f.view.translate.y))},null,function(){mxUtils.setOpacity(H,60);n.innerHTML="";"none"==k.style.display&&(L.style.display="",k.style.display="",K.style.display="none")});var L=document.createElement("div");L.style.position=
-"absolute";L.style.textAlign="right";L.style.color="gray";L.style.marginTop="10px";L.style.backgroundColor="transparent";L.style.top="440px";L.style.right="32px";L.style.maxWidth="380px";L.style.cursor="default";var P=mxUtils.button(mxResources.get("download"),function(){if(null!=B){var c=mxUtils.getXml(B.documentElement),f=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(c,f,"text/xml"):(c="undefined"===typeof pako?"&xml="+encodeURIComponent(c):"&data="+encodeURIComponent(Graph.compress(c)),
-(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(f)+"&format=xml"+c)).simulate(document,"_blank"))}});P.className="geBtn";P.setAttribute("disabled","disabled");var O=mxUtils.button(mxResources.get("restore"),function(c){null!=B&&null!=C&&(mxEvent.isShiftDown(c)?null!=B&&(c=b.getPagesForNode(B.documentElement),c=b.diffPages(b.pages,c),c=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(c,null,2),function(c){if(0<c.length)try{b.confirm(mxResources.get("areYouSure"),function(){v.patch([JSON.parse(c)],
+shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},u=new Spinner(t),v=b.getCurrentFile(),x=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),B={},t=0;t<x.length;t++)B[x[t].getAttribute("id")]=x[t];var A=null,y=null,z=null,C=null,F=mxUtils.button("",function(){null!=z&&f.zoomIn()});F.className="geSprite geSprite-zoomin";F.setAttribute("title",mxResources.get("zoomIn"));F.style.outline="none";F.style.border="none";F.style.margin="2px";F.setAttribute("disabled","disabled");
+mxUtils.setOpacity(F,20);var E=mxUtils.button("",function(){null!=z&&f.zoomOut()});E.className="geSprite geSprite-zoomout";E.setAttribute("title",mxResources.get("zoomOut"));E.style.outline="none";E.style.border="none";E.style.margin="2px";E.setAttribute("disabled","disabled");mxUtils.setOpacity(E,20);var H=mxUtils.button("",function(){null!=z&&(f.maxFitScale=8,f.fit(8),f.center())});H.className="geSprite geSprite-fit";H.setAttribute("title",mxResources.get("fit"));H.style.outline="none";H.style.border=
+"none";H.style.margin="2px";H.setAttribute("disabled","disabled");mxUtils.setOpacity(H,20);var D=mxUtils.button("",function(){null!=z&&(f.zoomActual(),f.center())});D.className="geSprite geSprite-actualsize";D.setAttribute("title",mxResources.get("actualSize"));D.style.outline="none";D.style.border="none";D.style.margin="2px";D.setAttribute("disabled","disabled");mxUtils.setOpacity(D,20);var I=mxUtils.button("",function(){});I.className="geSprite geSprite-middle";I.setAttribute("title",mxResources.get("compare"));
+I.style.outline="none";I.style.border="none";I.style.margin="2px";mxUtils.setOpacity(I,60);var K=k.cloneNode(!1);K.style.pointerEvent="none";k.parentNode.appendChild(K);var M=new Graph(K);M.setTooltips(!1);M.setEnabled(!1);M.setPanning(!0);M.panningHandler.ignoreCell=!0;M.panningHandler.useLeftButtonForPanning=!0;M.minFitScale=null;M.maxFitScale=null;M.centerZoom=!0;mxEvent.addGestureListeners(I,function(b){b=B[m[l].getAttribute("id")];mxUtils.setOpacity(I,20);n.innerHTML="";null==b?mxUtils.write(n,
+mxResources.get("pageNotFound")):(L.style.display="none",k.style.display="none",K.style.display="",K.style.backgroundColor=k.style.backgroundColor,b=Editor.parseDiagramNode(b),(new mxCodec(b.ownerDocument)).decode(b,M.getModel()),M.view.scaleAndTranslate(f.view.scale,f.view.translate.x,f.view.translate.y))},null,function(){mxUtils.setOpacity(I,60);n.innerHTML="";"none"==k.style.display&&(L.style.display="",k.style.display="",K.style.display="none")});var L=document.createElement("div");L.style.position=
+"absolute";L.style.textAlign="right";L.style.color="gray";L.style.marginTop="10px";L.style.backgroundColor="transparent";L.style.top="440px";L.style.right="32px";L.style.maxWidth="380px";L.style.cursor="default";var N=mxUtils.button(mxResources.get("download"),function(){if(null!=z){var c=mxUtils.getXml(z.documentElement),f=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(c,f,"text/xml"):(c="undefined"===typeof pako?"&xml="+encodeURIComponent(c):"&data="+encodeURIComponent(Graph.compress(c)),
+(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(f)+"&format=xml"+c)).simulate(document,"_blank"))}});N.className="geBtn";N.setAttribute("disabled","disabled");var P=mxUtils.button(mxResources.get("restore"),function(c){null!=z&&null!=C&&(mxEvent.isShiftDown(c)?null!=z&&(c=b.getPagesForNode(z.documentElement),c=b.diffPages(b.pages,c),c=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(c,null,2),function(c){if(0<c.length)try{b.confirm(mxResources.get("areYouSure"),function(){v.patch([JSON.parse(c)],
null,!0);b.hideDialog();b.hideDialog()})}catch(da){b.handleError(da)}},null,null,null,null,null,!0,null,mxResources.get("merge")),c.textarea.style.width="600px",c.textarea.style.height="380px",b.showDialog(c.container,620,460,!0,!0),c.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=d?d(C):b.spinner.spin(document.body,mxResources.get("restoring"))&&v.save(!0,function(c){b.spinner.stop();b.replaceFileData(C);b.hideDialog()},function(c){b.spinner.stop();b.editor.setStatus("");b.handleError(c,
-null!=c?mxResources.get("errorSavingFile"):null)})}))});O.className="geBtn";O.setAttribute("disabled","disabled");O.setAttribute("title","Shift+Click for Diff");var G=document.createElement("select");G.setAttribute("disabled","disabled");G.style.maxWidth="80px";G.style.position="relative";G.style.top="-2px";G.style.verticalAlign="bottom";G.style.marginRight="6px";G.style.display="none";var J=null;mxEvent.addListener(G,"change",function(b){null!=J&&(J(b),mxEvent.consume(b))});var W=mxUtils.button(mxResources.get("edit"),
-function(){null!=B&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(B.documentElement)),b.openLink(b.getUrl(),null,!0))});W.className="geBtn";W.setAttribute("disabled","disabled");null!=d&&(W.style.display="none");var T=mxUtils.button(mxResources.get("show"),function(){null!=y&&b.openLink(y.getUrl(G.selectedIndex))});T.className="geBtn gePrimaryBtn";T.setAttribute("disabled","disabled");null!=d&&(T.style.display="none",O.className="geBtn gePrimaryBtn");
-x=document.createElement("div");x.style.position="absolute";x.style.top="482px";x.style.width="640px";x.style.textAlign="right";var Q=document.createElement("div");Q.className="geToolbarContainer";Q.style.backgroundColor="transparent";Q.style.padding="2px";Q.style.border="none";Q.style.left="199px";Q.style.top="442px";var Y=null;if(null!=e&&0<e.length){k.style.cursor="move";var ga=document.createElement("table");ga.style.border="1px solid lightGray";ga.style.borderCollapse="collapse";ga.style.borderSpacing=
-"0px";ga.style.width="100%";var ha=document.createElement("tbody"),ba=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(l=mxUtils.indexOf(b.pages,b.currentPage));for(t=e.length-1;0<=t;t--){var aa=function(c){var d=new Date(c.modifiedDate),g=null;if(0<=d.getTime()){var q=function(e){u.stop();n.innerHTML="";var q=mxUtils.parseXml(e),t=b.editor.extractGraphModel(q.documentElement,!0);if(null!=t){var y=function(b){null!=b&&(b=A(Editor.parseDiagramNode(b)));return b},A=function(b){var c=b.getAttribute("background");
-if(null==c||""==c||c==mxConstants.NONE)c=f.defaultPageBackgroundColor;k.style.backgroundColor=c;(new mxCodec(b.ownerDocument)).decode(b,f.getModel());f.maxFitScale=1;f.fit(8);f.center();return b};G.style.display="none";G.innerHTML="";B=q;C=e;m=parseSelectFunction=null;p=0;if("mxfile"==t.nodeName){q=t.getElementsByTagName("diagram");m=[];for(e=0;e<q.length;e++)m.push(q[e]);p=Math.min(l,m.length-1);0<m.length&&y(m[p]);if(1<m.length)for(G.removeAttribute("disabled"),G.style.display="",e=0;e<m.length;e++)q=
-document.createElement("option"),mxUtils.write(q,m[e].getAttribute("name")||mxResources.get("pageWithNumber",[e+1])),q.setAttribute("value",e),e==p&&q.setAttribute("selected","selected"),G.appendChild(q);J=function(){try{var c=parseInt(G.value);p=l=c;y(m[c])}catch(ca){G.value=l,b.handleError(ca)}}}else A(t);e=c.lastModifyingUserName;null!=e&&20<e.length&&(e=e.substring(0,20)+"...");L.innerHTML="";mxUtils.write(L,(null!=e?e+" ":"")+d.toLocaleDateString()+" "+d.toLocaleTimeString());L.setAttribute("title",
-g.getAttribute("title"));E.removeAttribute("disabled");F.removeAttribute("disabled");I.removeAttribute("disabled");D.removeAttribute("disabled");H.removeAttribute("disabled");null!=v&&v.isRestricted()||(b.editor.graph.isEnabled()&&O.removeAttribute("disabled"),P.removeAttribute("disabled"),T.removeAttribute("disabled"),W.removeAttribute("disabled"));mxUtils.setOpacity(E,60);mxUtils.setOpacity(F,60);mxUtils.setOpacity(I,60);mxUtils.setOpacity(D,60);mxUtils.setOpacity(H,60)}else G.style.display="none",
-G.innerHTML="",L.innerHTML="",mxUtils.write(L,mxResources.get("errorLoadingFile")),mxUtils.write(n,mxResources.get("errorLoadingFile"))},g=document.createElement("tr");g.style.borderBottom="1px solid lightGray";g.style.fontSize="12px";g.style.cursor="pointer";var t=document.createElement("td");t.style.padding="6px";t.style.whiteSpace="nowrap";c==e[e.length-1]?mxUtils.write(t,mxResources.get("current")):d.toDateString()===ba?mxUtils.write(t,d.toLocaleTimeString()):mxUtils.write(t,d.toLocaleDateString()+
-" "+d.toLocaleTimeString());g.appendChild(t);g.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+(null!=c.fileSize?" "+b.formatFileSize(parseInt(c.fileSize)):"")+(null!=c.lastModifyingUserName?" "+c.lastModifyingUserName:""));mxEvent.addListener(g,"click",function(b){y!=c&&(u.stop(),null!=z&&(z.style.backgroundColor=""),y=c,z=g,z.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",C=B=null,L.removeAttribute("title"),L.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+
-"..."),k.style.backgroundColor=f.defaultPageBackgroundColor,n.innerHTML="",f.getModel().clear(),O.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),W.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),mxUtils.setOpacity(E,20),
-mxUtils.setOpacity(F,20),mxUtils.setOpacity(I,20),mxUtils.setOpacity(D,20),mxUtils.setOpacity(H,20),u.spin(k),c.getXml(function(b){if(y==c)try{q(b)}catch(fa){L.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+fa.message)}},function(b){u.stop();G.style.display="none";G.innerHTML="";L.innerHTML="";mxUtils.write(L,mxResources.get("errorLoadingFile"));mxUtils.write(n,mxResources.get("errorLoadingFile"))}),mxEvent.consume(b))});mxEvent.addListener(g,"dblclick",function(b){T.click();window.getSelection?
-window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(b)},!1);ha.appendChild(g)}return g}(e[t]);null!=aa&&t==e.length-1&&(Y=aa)}ga.appendChild(ha);g.appendChild(ga)}else null==v||null==b.drive&&v.constructor==window.DriveFile||null==b.dropbox&&v.constructor==window.DropboxFile?(k.style.display="none",Q.style.display="none",mxUtils.write(g,mxResources.get("notAvailable"))):(k.style.display="none",Q.style.display="none",mxUtils.write(g,mxResources.get("noRevisions")));
-this.init=function(){null!=Y&&Y.click()};g=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});g.className="geBtn";Q.appendChild(G);Q.appendChild(E);Q.appendChild(F);Q.appendChild(D);Q.appendChild(I);Q.appendChild(H);b.editor.cancelFirst?(x.appendChild(g),x.appendChild(P),x.appendChild(W),x.appendChild(O),x.appendChild(T)):(x.appendChild(P),x.appendChild(W),x.appendChild(O),x.appendChild(T),x.appendChild(g));c.appendChild(x);c.appendChild(Q);c.appendChild(L);this.container=c},DraftDialog=
-function(b,e,d,c,g,k,n,f,l){var m=document.createElement("div"),p=document.createElement("div");p.style.marginTop="0px";p.style.whiteSpace="nowrap";p.style.overflow="auto";p.style.lineHeight="normal";mxUtils.write(p,e);m.appendChild(p);var q=document.createElement("select"),t=mxUtils.bind(this,function(){y=mxUtils.parseXml(l[q.value].data);B=b.editor.extractGraphModel(y.documentElement,!0);C=0;this.init()});if(null!=l){q.style.marginLeft="4px";for(e=0;e<l.length;e++){var u=document.createElement("option");
-u.setAttribute("value",e);var v=new Date(l[e].created),x=new Date(l[e].modified);mxUtils.write(u,v.toLocaleDateString()+" "+v.toLocaleTimeString()+" - "+(v.toDateString(),x.toDateString(),x.toLocaleDateString())+" "+x.toLocaleTimeString());q.appendChild(u)}p.appendChild(q);mxEvent.addListener(q,"change",t)}null==d&&(d=l[0].data);var A=document.createElement("div");A.style.position="absolute";A.style.border="1px solid lightGray";A.style.marginTop="10px";A.style.left="40px";A.style.right="40px";A.style.top=
-"46px";A.style.bottom="74px";A.style.overflow="hidden";mxEvent.disableContextMenu(A);m.appendChild(A);var z=new Graph(A);z.setEnabled(!1);z.setPanning(!0);z.panningHandler.ignoreCell=!0;z.panningHandler.useLeftButtonForPanning=!0;z.minFitScale=null;z.maxFitScale=null;z.centerZoom=!0;var y=mxUtils.parseXml(d),B=b.editor.extractGraphModel(y.documentElement,!0),C=0,E=null,F=z.getGlobalVariable;z.getGlobalVariable=function(b){return"page"==b&&null!=E&&null!=E[C]?E[C].getAttribute("name"):"pagenumber"==
-b?C+1:"pagecount"==b?null!=E?E.length:1:F.apply(this,arguments)};z.getLinkForCell=function(){return null};d=mxUtils.button("",function(){z.zoomIn()});d.className="geSprite geSprite-zoomin";d.setAttribute("title",mxResources.get("zoomIn"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);p=mxUtils.button("",function(){z.zoomOut()});p.className="geSprite geSprite-zoomout";p.setAttribute("title",mxResources.get("zoomOut"));p.style.outline="none";p.style.border=
-"none";p.style.margin="2px";mxUtils.setOpacity(p,60);e=mxUtils.button("",function(){z.maxFitScale=8;z.fit(8);z.center()});e.className="geSprite geSprite-fit";e.setAttribute("title",mxResources.get("fit"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);u=mxUtils.button("",function(){z.zoomActual();z.center()});u.className="geSprite geSprite-actualsize";u.setAttribute("title",mxResources.get("actualSize"));u.style.outline="none";u.style.border="none";u.style.margin=
-"2px";mxUtils.setOpacity(u,60);n=mxUtils.button(n||mxResources.get("discard"),function(){g.apply(this,[q.value,mxUtils.bind(this,function(){null!=q.parentNode&&(q.options[q.selectedIndex].parentNode.removeChild(q.options[q.selectedIndex]),0<q.options.length?(q.value=q.options[0].value,t()):b.hideDialog(!0))})])});n.className="geBtn";var I=document.createElement("select");I.style.maxWidth="80px";I.style.position="relative";I.style.top="-2px";I.style.verticalAlign="bottom";I.style.marginRight="6px";
-I.style.display="none";k=mxUtils.button(k||mxResources.get("edit"),function(){c.apply(this,[q.value])});k.className="geBtn gePrimaryBtn";v=document.createElement("div");v.style.position="absolute";v.style.bottom="30px";v.style.right="40px";v.style.textAlign="right";x=document.createElement("div");x.className="geToolbarContainer";x.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function b(b){if(null!=
-b){var c=b.getAttribute("background");if(null==c||""==c||c==mxConstants.NONE)c=Editor.isDarkMode()?"transparent":"#ffffff";A.style.backgroundColor=c;(new mxCodec(b.ownerDocument)).decode(b,z.getModel());z.maxFitScale=1;z.fit(8);z.center()}return b}function c(c){null!=c&&(c=b(Editor.parseDiagramNode(c)));return c}mxEvent.addListener(I,"change",function(b){C=parseInt(I.value);c(E[C]);mxEvent.consume(b)});if("mxfile"==B.nodeName){var f=B.getElementsByTagName("diagram");E=[];for(var d=0;d<f.length;d++)E.push(f[d]);
-0<E.length&&c(E[C]);I.innerHTML="";if(1<E.length)for(I.style.display="",d=0;d<E.length;d++)f=document.createElement("option"),mxUtils.write(f,E[d].getAttribute("name")||mxResources.get("pageWithNumber",[d+1])),f.setAttribute("value",d),d==C&&f.setAttribute("selected","selected"),I.appendChild(f);else I.style.display="none"}else b(B)};x.appendChild(I);x.appendChild(d);x.appendChild(p);x.appendChild(u);x.appendChild(e);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});d.className=
+null!=c?mxResources.get("errorSavingFile"):null)})}))});P.className="geBtn";P.setAttribute("disabled","disabled");P.setAttribute("title","Shift+Click for Diff");var G=document.createElement("select");G.setAttribute("disabled","disabled");G.style.maxWidth="80px";G.style.position="relative";G.style.top="-2px";G.style.verticalAlign="bottom";G.style.marginRight="6px";G.style.display="none";var J=null;mxEvent.addListener(G,"change",function(b){null!=J&&(J(b),mxEvent.consume(b))});var W=mxUtils.button(mxResources.get("edit"),
+function(){null!=z&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(z.documentElement)),b.openLink(b.getUrl(),null,!0))});W.className="geBtn";W.setAttribute("disabled","disabled");null!=d&&(W.style.display="none");var R=mxUtils.button(mxResources.get("show"),function(){null!=y&&b.openLink(y.getUrl(G.selectedIndex))});R.className="geBtn gePrimaryBtn";R.setAttribute("disabled","disabled");null!=d&&(R.style.display="none",P.className="geBtn gePrimaryBtn");
+x=document.createElement("div");x.style.position="absolute";x.style.top="482px";x.style.width="640px";x.style.textAlign="right";var Q=document.createElement("div");Q.className="geToolbarContainer";Q.style.backgroundColor="transparent";Q.style.padding="2px";Q.style.border="none";Q.style.left="199px";Q.style.top="442px";var X=null;if(null!=e&&0<e.length){k.style.cursor="move";var ha=document.createElement("table");ha.style.border="1px solid lightGray";ha.style.borderCollapse="collapse";ha.style.borderSpacing=
+"0px";ha.style.width="100%";var ga=document.createElement("tbody"),aa=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(l=mxUtils.indexOf(b.pages,b.currentPage));for(t=e.length-1;0<=t;t--){var ba=function(c){var d=new Date(c.modifiedDate),g=null;if(0<=d.getTime()){var q=function(e){u.stop();n.innerHTML="";var q=mxUtils.parseXml(e),t=b.editor.extractGraphModel(q.documentElement,!0);if(null!=t){var y=function(b){null!=b&&(b=B(Editor.parseDiagramNode(b)));return b},B=function(b){var c=b.getAttribute("background");
+if(null==c||""==c||c==mxConstants.NONE)c=f.defaultPageBackgroundColor;k.style.backgroundColor=c;(new mxCodec(b.ownerDocument)).decode(b,f.getModel());f.maxFitScale=1;f.fit(8);f.center();return b};G.style.display="none";G.innerHTML="";z=q;C=e;m=parseSelectFunction=null;p=0;if("mxfile"==t.nodeName){q=t.getElementsByTagName("diagram");m=[];for(e=0;e<q.length;e++)m.push(q[e]);p=Math.min(l,m.length-1);0<m.length&&y(m[p]);if(1<m.length)for(G.removeAttribute("disabled"),G.style.display="",e=0;e<m.length;e++)q=
+document.createElement("option"),mxUtils.write(q,m[e].getAttribute("name")||mxResources.get("pageWithNumber",[e+1])),q.setAttribute("value",e),e==p&&q.setAttribute("selected","selected"),G.appendChild(q);J=function(){try{var c=parseInt(G.value);p=l=c;y(m[c])}catch(ca){G.value=l,b.handleError(ca)}}}else B(t);e=c.lastModifyingUserName;null!=e&&20<e.length&&(e=e.substring(0,20)+"...");L.innerHTML="";mxUtils.write(L,(null!=e?e+" ":"")+d.toLocaleDateString()+" "+d.toLocaleTimeString());L.setAttribute("title",
+g.getAttribute("title"));F.removeAttribute("disabled");E.removeAttribute("disabled");H.removeAttribute("disabled");D.removeAttribute("disabled");I.removeAttribute("disabled");null!=v&&v.isRestricted()||(b.editor.graph.isEnabled()&&P.removeAttribute("disabled"),N.removeAttribute("disabled"),R.removeAttribute("disabled"),W.removeAttribute("disabled"));mxUtils.setOpacity(F,60);mxUtils.setOpacity(E,60);mxUtils.setOpacity(H,60);mxUtils.setOpacity(D,60);mxUtils.setOpacity(I,60)}else G.style.display="none",
+G.innerHTML="",L.innerHTML="",mxUtils.write(L,mxResources.get("errorLoadingFile")),mxUtils.write(n,mxResources.get("errorLoadingFile"))},g=document.createElement("tr");g.style.borderBottom="1px solid lightGray";g.style.fontSize="12px";g.style.cursor="pointer";var t=document.createElement("td");t.style.padding="6px";t.style.whiteSpace="nowrap";c==e[e.length-1]?mxUtils.write(t,mxResources.get("current")):d.toDateString()===aa?mxUtils.write(t,d.toLocaleTimeString()):mxUtils.write(t,d.toLocaleDateString()+
+" "+d.toLocaleTimeString());g.appendChild(t);g.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+(null!=c.fileSize?" "+b.formatFileSize(parseInt(c.fileSize)):"")+(null!=c.lastModifyingUserName?" "+c.lastModifyingUserName:""));mxEvent.addListener(g,"click",function(b){y!=c&&(u.stop(),null!=A&&(A.style.backgroundColor=""),y=c,A=g,A.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",C=z=null,L.removeAttribute("title"),L.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+
+"..."),k.style.backgroundColor=f.defaultPageBackgroundColor,n.innerHTML="",f.getModel().clear(),P.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),W.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),mxUtils.setOpacity(F,20),
+mxUtils.setOpacity(E,20),mxUtils.setOpacity(H,20),mxUtils.setOpacity(D,20),mxUtils.setOpacity(I,20),u.spin(k),c.getXml(function(b){if(y==c)try{q(b)}catch(fa){L.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+fa.message)}},function(b){u.stop();G.style.display="none";G.innerHTML="";L.innerHTML="";mxUtils.write(L,mxResources.get("errorLoadingFile"));mxUtils.write(n,mxResources.get("errorLoadingFile"))}),mxEvent.consume(b))});mxEvent.addListener(g,"dblclick",function(b){R.click();window.getSelection?
+window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(b)},!1);ga.appendChild(g)}return g}(e[t]);null!=ba&&t==e.length-1&&(X=ba)}ha.appendChild(ga);g.appendChild(ha)}else null==v||null==b.drive&&v.constructor==window.DriveFile||null==b.dropbox&&v.constructor==window.DropboxFile?(k.style.display="none",Q.style.display="none",mxUtils.write(g,mxResources.get("notAvailable"))):(k.style.display="none",Q.style.display="none",mxUtils.write(g,mxResources.get("noRevisions")));
+this.init=function(){null!=X&&X.click()};g=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});g.className="geBtn";Q.appendChild(G);Q.appendChild(F);Q.appendChild(E);Q.appendChild(D);Q.appendChild(H);Q.appendChild(I);b.editor.cancelFirst?(x.appendChild(g),x.appendChild(N),x.appendChild(W),x.appendChild(P),x.appendChild(R)):(x.appendChild(N),x.appendChild(W),x.appendChild(P),x.appendChild(R),x.appendChild(g));c.appendChild(x);c.appendChild(Q);c.appendChild(L);this.container=c},DraftDialog=
+function(b,e,d,c,g,k,n,f,l){var m=document.createElement("div"),p=document.createElement("div");p.style.marginTop="0px";p.style.whiteSpace="nowrap";p.style.overflow="auto";p.style.lineHeight="normal";mxUtils.write(p,e);m.appendChild(p);var q=document.createElement("select"),t=mxUtils.bind(this,function(){y=mxUtils.parseXml(l[q.value].data);z=b.editor.extractGraphModel(y.documentElement,!0);C=0;this.init()});if(null!=l){q.style.marginLeft="4px";for(e=0;e<l.length;e++){var u=document.createElement("option");
+u.setAttribute("value",e);var v=new Date(l[e].created),x=new Date(l[e].modified);mxUtils.write(u,v.toLocaleDateString()+" "+v.toLocaleTimeString()+" - "+(v.toDateString(),x.toDateString(),x.toLocaleDateString())+" "+x.toLocaleTimeString());q.appendChild(u)}p.appendChild(q);mxEvent.addListener(q,"change",t)}null==d&&(d=l[0].data);var B=document.createElement("div");B.style.position="absolute";B.style.border="1px solid lightGray";B.style.marginTop="10px";B.style.left="40px";B.style.right="40px";B.style.top=
+"46px";B.style.bottom="74px";B.style.overflow="hidden";mxEvent.disableContextMenu(B);m.appendChild(B);var A=new Graph(B);A.setEnabled(!1);A.setPanning(!0);A.panningHandler.ignoreCell=!0;A.panningHandler.useLeftButtonForPanning=!0;A.minFitScale=null;A.maxFitScale=null;A.centerZoom=!0;var y=mxUtils.parseXml(d),z=b.editor.extractGraphModel(y.documentElement,!0),C=0,F=null,E=A.getGlobalVariable;A.getGlobalVariable=function(b){return"page"==b&&null!=F&&null!=F[C]?F[C].getAttribute("name"):"pagenumber"==
+b?C+1:"pagecount"==b?null!=F?F.length:1:E.apply(this,arguments)};A.getLinkForCell=function(){return null};d=mxUtils.button("",function(){A.zoomIn()});d.className="geSprite geSprite-zoomin";d.setAttribute("title",mxResources.get("zoomIn"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);p=mxUtils.button("",function(){A.zoomOut()});p.className="geSprite geSprite-zoomout";p.setAttribute("title",mxResources.get("zoomOut"));p.style.outline="none";p.style.border=
+"none";p.style.margin="2px";mxUtils.setOpacity(p,60);e=mxUtils.button("",function(){A.maxFitScale=8;A.fit(8);A.center()});e.className="geSprite geSprite-fit";e.setAttribute("title",mxResources.get("fit"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);u=mxUtils.button("",function(){A.zoomActual();A.center()});u.className="geSprite geSprite-actualsize";u.setAttribute("title",mxResources.get("actualSize"));u.style.outline="none";u.style.border="none";u.style.margin=
+"2px";mxUtils.setOpacity(u,60);n=mxUtils.button(n||mxResources.get("discard"),function(){g.apply(this,[q.value,mxUtils.bind(this,function(){null!=q.parentNode&&(q.options[q.selectedIndex].parentNode.removeChild(q.options[q.selectedIndex]),0<q.options.length?(q.value=q.options[0].value,t()):b.hideDialog(!0))})])});n.className="geBtn";var H=document.createElement("select");H.style.maxWidth="80px";H.style.position="relative";H.style.top="-2px";H.style.verticalAlign="bottom";H.style.marginRight="6px";
+H.style.display="none";k=mxUtils.button(k||mxResources.get("edit"),function(){c.apply(this,[q.value])});k.className="geBtn gePrimaryBtn";v=document.createElement("div");v.style.position="absolute";v.style.bottom="30px";v.style.right="40px";v.style.textAlign="right";x=document.createElement("div");x.className="geToolbarContainer";x.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function b(b){if(null!=
+b){var c=b.getAttribute("background");if(null==c||""==c||c==mxConstants.NONE)c=Editor.isDarkMode()?"transparent":"#ffffff";B.style.backgroundColor=c;(new mxCodec(b.ownerDocument)).decode(b,A.getModel());A.maxFitScale=1;A.fit(8);A.center()}return b}function c(c){null!=c&&(c=b(Editor.parseDiagramNode(c)));return c}mxEvent.addListener(H,"change",function(b){C=parseInt(H.value);c(F[C]);mxEvent.consume(b)});if("mxfile"==z.nodeName){var f=z.getElementsByTagName("diagram");F=[];for(var d=0;d<f.length;d++)F.push(f[d]);
+0<F.length&&c(F[C]);H.innerHTML="";if(1<F.length)for(H.style.display="",d=0;d<F.length;d++)f=document.createElement("option"),mxUtils.write(f,F[d].getAttribute("name")||mxResources.get("pageWithNumber",[d+1])),f.setAttribute("value",d),d==C&&f.setAttribute("selected","selected"),H.appendChild(f);else H.style.display="none"}else b(z)};x.appendChild(H);x.appendChild(d);x.appendChild(p);x.appendChild(u);x.appendChild(e);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});d.className=
"geBtn";f=null!=f?mxUtils.button(mxResources.get("ignore"),f):null;null!=f&&(f.className="geBtn");b.editor.cancelFirst?(v.appendChild(d),null!=f&&v.appendChild(f),v.appendChild(n),v.appendChild(k)):(v.appendChild(k),v.appendChild(n),null!=f&&v.appendChild(f),v.appendChild(d));m.appendChild(v);m.appendChild(x);this.container=m},FindWindow=function(b,e,d,c,g,k){function n(b,c,f,d){if("object"===typeof c.value&&null!=c.value.attributes){c=c.value.attributes;for(var e=0;e<c.length;e++)if("label"!=c[e].nodeName){var l=
-mxUtils.trim(c[e].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==b&&(d&&0<=l.indexOf(f)||!d&&l.substring(0,f.length)===f)||null!=b&&b.test(l))return!0}}return!1}function f(){u&&E.value?(P.removeAttribute("disabled"),O.removeAttribute("disabled")):(P.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"));E.value&&C.value?G.removeAttribute("disabled"):G.setAttribute("disabled","disabled")}function l(c,d,e){M.innerHTML="";var m=p.model.getDescendants(p.model.getRoot()),
-g=C.value.toLowerCase(),y=F.checked?new RegExp(g):null,O=null;x=null;q!=g&&(q=g,t=null,v=!1);var B=null==t;if(0<g.length){if(v){v=!1;for(var G,J=0;J<b.pages.length;J++)if(b.currentPage==b.pages[J]){G=J;break}c=(G+1)%b.pages.length;t=null;do v=!1,m=b.pages[c],p=b.createTemporaryGraph(p.getStylesheet()),b.updatePageRoot(m),p.model.setRoot(m.root),c=(c+1)%b.pages.length;while(!l(!0,d,e)&&c!=G);t&&(t=null,e?b.editor.graph.model.execute(new SelectPage(b,m)):b.selectPage(m));v=!1;p=b.editor.graph;return l(!0,
-d,e)}for(J=0;J<m.length;J++){G=p.view.getState(m[J]);d&&null!=y&&(B=B||G==t);if(null!=G&&null!=G.cell.value&&(B||null==O)&&(p.model.isVertex(G.cell)||p.model.isEdge(G.cell))){null!=G.style&&"1"==G.style.html?(D.innerHTML=p.sanitizeHtml(p.getLabel(G.cell)),label=mxUtils.extractTextWithWhitespace([D])):label=p.getLabel(G.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var T=0;d&&k&&null!=y&&G==t&&(label=label.substr(A),T=A);var W=""==E.value,z=W;if(null==y&&(z&&
-0<=label.indexOf(g)||!z&&label.substring(0,g.length)===g||W&&n(y,G.cell,g,z))||null!=y&&(y.test(label)||W&&n(y,G.cell,g,z)))if(k&&(null!=y?(W=label.match(y),x=W[0].toLowerCase(),A=T+W.index+x.length):(x=g,A=x.length)),B){O=G;break}else null==O&&(O=G)}B=B||G==t}}if(null!=O){if(J==m.length&&I.checked)return t=null,v=!0,l(!0,d,e);t=O;p.scrollCellToVisible(t.cell);p.isEnabled()&&!p.isCellLocked(t.cell)?e||p.getSelectionCell()==t.cell&&1==p.getSelectionCount()||p.setSelectionCell(t.cell):p.highlightCell(t.cell)}else{if(!c&&
-I.checked)return v=!0,l(!0,d,e);p.isEnabled()&&!e&&p.clearSelection()}u=null!=O;k&&!c&&f();return 0==g.length||null!=O}var m=b.actions.get("findReplace"),p=b.editor.graph,q=null,t=null,u=!1,v=!1,x=null,A=0,z=1,y=document.createElement("div");y.style.userSelect="none";y.style.overflow="hidden";y.style.padding="10px";y.style.height="100%";var B=k?"260px":"200px",C=document.createElement("input");C.setAttribute("placeholder",mxResources.get("find"));C.setAttribute("type","text");C.style.marginTop="4px";
-C.style.marginBottom="6px";C.style.width=B;C.style.fontSize="12px";C.style.borderRadius="4px";C.style.padding="6px";y.appendChild(C);mxUtils.br(y);var E;k&&(E=document.createElement("input"),E.setAttribute("placeholder",mxResources.get("replaceWith")),E.setAttribute("type","text"),E.style.marginTop="4px",E.style.marginBottom="6px",E.style.width=B,E.style.fontSize="12px",E.style.borderRadius="4px",E.style.padding="6px",y.appendChild(E),mxUtils.br(y),mxEvent.addListener(E,"input",f));var F=document.createElement("input");
-F.setAttribute("id","geFindWinRegExChck");F.setAttribute("type","checkbox");F.style.marginRight="4px";y.appendChild(F);B=document.createElement("label");B.setAttribute("for","geFindWinRegExChck");y.appendChild(B);mxUtils.write(B,mxResources.get("regularExpression"));y.appendChild(B);B=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");B.style.position="relative";B.style.marginLeft="6px";B.style.top="-1px";y.appendChild(B);mxUtils.br(y);var I=document.createElement("input");I.setAttribute("id",
-"geFindWinAllPagesChck");I.setAttribute("type","checkbox");I.style.marginRight="4px";y.appendChild(I);B=document.createElement("label");B.setAttribute("for","geFindWinAllPagesChck");y.appendChild(B);mxUtils.write(B,mxResources.get("allPages"));y.appendChild(B);var D=document.createElement("div");mxUtils.br(y);B=document.createElement("div");B.style.left="0px";B.style.right="0px";B.style.marginTop="6px";B.style.padding="0 6px 0 6px";B.style.textAlign="center";y.appendChild(B);var H=mxUtils.button(mxResources.get("reset"),
-function(){M.innerHTML="";C.value="";C.style.backgroundColor="";k&&(E.value="",f());q=t=null;v=!1;C.focus()});H.setAttribute("title",mxResources.get("reset"));H.style["float"]="none";H.style.width="120px";H.style.marginTop="6px";H.style.marginLeft="8px";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.className="geBtn";k||B.appendChild(H);var K=mxUtils.button(mxResources.get("find"),function(){try{C.style.backgroundColor=l()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(W){b.handleError(W)}});
-K.setAttribute("title",mxResources.get("find")+" (Enter)");K.style["float"]="none";K.style.width="120px";K.style.marginTop="6px";K.style.marginLeft="8px";K.style.overflow="hidden";K.style.textOverflow="ellipsis";K.className="geBtn gePrimaryBtn";B.appendChild(K);var M=document.createElement("div");M.style.marginTop="10px";if(k){var L=function(b,c,f,d,e){if(null==e||"1"!=e.html)return d=b.toLowerCase().indexOf(c,d),0>d?b:b.substr(0,d)+f+b.substr(d+c.length);var l=b;c=mxUtils.htmlEntities(c);e=[];for(var m=
--1;-1<(m=b.indexOf("<",m+1));)e.push(m);m=b.match(/<[^>]*>/g);b=b.replace(/<[^>]*>/g,"");d=b.toLowerCase().indexOf(c,d);if(0>d)return l;l=d+c.length;f=mxUtils.htmlEntities(f);b=b.substr(0,d)+f+b.substr(l);for(var g=0,k=0;k<e.length;k++){if(e[k]-g<d)b=b.substr(0,e[k])+m[k]+b.substr(e[k]);else{var p=e[k]-g<l?d+g:e[k]+(f.length-c.length);b=b.substr(0,p)+m[k]+b.substr(p)}g+=m[k].length}return b},P=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=x&&null!=t&&E.value){var c=t.cell,f=p.getLabel(c);
-p.isCellEditable(c)&&p.model.setValue(c,L(f,x,E.value,A-x.length,p.getCurrentCellStyle(c)));C.style.backgroundColor=l(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(Q){b.handleError(Q)}});P.setAttribute("title",mxResources.get("replFind"));P.style["float"]="none";P.style.width="120px";P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow="hidden";P.style.textOverflow="ellipsis";P.className="geBtn gePrimaryBtn";P.setAttribute("disabled","disabled");B.appendChild(P);mxUtils.br(B);
-var O=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=x&&null!=t&&E.value){var c=t.cell,f=p.getLabel(c);p.model.setValue(c,L(f,x,E.value,A-x.length,p.getCurrentCellStyle(c)));P.setAttribute("disabled","disabled");O.setAttribute("disabled","disabled")}}catch(Q){b.handleError(Q)}});O.setAttribute("title",mxResources.get("replace"));O.style["float"]="none";O.style.width="120px";O.style.marginTop="6px";O.style.marginLeft="8px";O.style.overflow="hidden";O.style.textOverflow="ellipsis";
-O.className="geBtn gePrimaryBtn";O.setAttribute("disabled","disabled");B.appendChild(O);var G=mxUtils.button(mxResources.get("replaceAll"),function(){M.innerHTML="";if(E.value){var c=b.currentPage,f=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;p.getModel().beginUpdate();try{for(var d=0,e={};l(!1,!0,!0)&&100>d;){var m=t.cell,g=p.getLabel(m),k=e[m.id];if(k&&k.replAllMrk==z&&k.replAllPos>=A)break;e[m.id]={replAllMrk:z,replAllPos:A};p.isCellEditable(m)&&(p.model.setValue(m,L(g,x,E.value,
-A-x.length,p.getCurrentCellStyle(m))),d++)}c!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,c));mxUtils.write(M,mxResources.get("matchesRepl",[d]))}catch(aa){b.handleError(aa)}finally{p.getModel().endUpdate(),b.editor.graph.setSelectionCells(f),b.editor.graph.rendering=!0}z++}});G.setAttribute("title",mxResources.get("replaceAll"));G.style["float"]="none";G.style.width="120px";G.style.marginTop="6px";G.style.marginLeft="8px";G.style.overflow="hidden";G.style.textOverflow="ellipsis";
-G.className="geBtn gePrimaryBtn";G.setAttribute("disabled","disabled");B.appendChild(G);mxUtils.br(B);B.appendChild(H);H=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));H.setAttribute("title",mxResources.get("close"));H.style["float"]="none";H.style.width="120px";H.style.marginTop="6px";H.style.marginLeft="8px";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.className="geBtn";B.appendChild(H);mxUtils.br(B);B.appendChild(M)}else H.style.width=
-"90px",K.style.width="90px";mxEvent.addListener(C,"keyup",function(b){if(91==b.keyCode||93==b.keyCode||17==b.keyCode)mxEvent.consume(b);else if(27==b.keyCode)m.funct();else if(q!=C.value.toLowerCase()||13==b.keyCode)try{C.style.backgroundColor=l()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(T){C.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(y,"keydown",function(c){70==c.keyCode&&b.keyHandler.isControlDown(c)&&!mxEvent.isShiftDown(c)&&(m.funct(),mxEvent.consume(c))});
-this.window=new mxWindow(mxResources.get("find")+(k?"/"+mxResources.get("replace"):""),y,e,d,c,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(C.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?I.removeAttribute("disabled"):
-(I.checked=!1,I.setAttribute("disabled","disabled"))):p.container.focus()}));this.window.setLocation=function(b,c){var f=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,f-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};
+mxUtils.trim(c[e].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==b&&(d&&0<=l.indexOf(f)||!d&&l.substring(0,f.length)===f)||null!=b&&b.test(l))return!0}}return!1}function f(){u&&F.value?(N.removeAttribute("disabled"),P.removeAttribute("disabled")):(N.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"));F.value&&C.value?G.removeAttribute("disabled"):G.setAttribute("disabled","disabled")}function l(c,d,e){M.innerHTML="";var m=p.model.getDescendants(p.model.getRoot()),
+g=C.value.toLowerCase(),y=E.checked?new RegExp(g):null,P=null;x=null;q!=g&&(q=g,t=null,v=!1);var z=null==t;if(0<g.length){if(v){v=!1;for(var G,J=0;J<b.pages.length;J++)if(b.currentPage==b.pages[J]){G=J;break}c=(G+1)%b.pages.length;t=null;do v=!1,m=b.pages[c],p=b.createTemporaryGraph(p.getStylesheet()),b.updatePageRoot(m),p.model.setRoot(m.root),c=(c+1)%b.pages.length;while(!l(!0,d,e)&&c!=G);t&&(t=null,e?b.editor.graph.model.execute(new SelectPage(b,m)):b.selectPage(m));v=!1;p=b.editor.graph;return l(!0,
+d,e)}for(J=0;J<m.length;J++){G=p.view.getState(m[J]);d&&null!=y&&(z=z||G==t);if(null!=G&&null!=G.cell.value&&(z||null==P)&&(p.model.isVertex(G.cell)||p.model.isEdge(G.cell))){null!=G.style&&"1"==G.style.html?(D.innerHTML=p.sanitizeHtml(p.getLabel(G.cell)),label=mxUtils.extractTextWithWhitespace([D])):label=p.getLabel(G.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var R=0;d&&k&&null!=y&&G==t&&(label=label.substr(B),R=B);var W=""==F.value,A=W;if(null==y&&(A&&
+0<=label.indexOf(g)||!A&&label.substring(0,g.length)===g||W&&n(y,G.cell,g,A))||null!=y&&(y.test(label)||W&&n(y,G.cell,g,A)))if(k&&(null!=y?(W=label.match(y),x=W[0].toLowerCase(),B=R+W.index+x.length):(x=g,B=x.length)),z){P=G;break}else null==P&&(P=G)}z=z||G==t}}if(null!=P){if(J==m.length&&H.checked)return t=null,v=!0,l(!0,d,e);t=P;p.scrollCellToVisible(t.cell);p.isEnabled()&&!p.isCellLocked(t.cell)?e||p.getSelectionCell()==t.cell&&1==p.getSelectionCount()||p.setSelectionCell(t.cell):p.highlightCell(t.cell)}else{if(!c&&
+H.checked)return v=!0,l(!0,d,e);p.isEnabled()&&!e&&p.clearSelection()}u=null!=P;k&&!c&&f();return 0==g.length||null!=P}var m=b.actions.get("findReplace"),p=b.editor.graph,q=null,t=null,u=!1,v=!1,x=null,B=0,A=1,y=document.createElement("div");y.style.userSelect="none";y.style.overflow="hidden";y.style.padding="10px";y.style.height="100%";var z=k?"260px":"200px",C=document.createElement("input");C.setAttribute("placeholder",mxResources.get("find"));C.setAttribute("type","text");C.style.marginTop="4px";
+C.style.marginBottom="6px";C.style.width=z;C.style.fontSize="12px";C.style.borderRadius="4px";C.style.padding="6px";y.appendChild(C);mxUtils.br(y);var F;k&&(F=document.createElement("input"),F.setAttribute("placeholder",mxResources.get("replaceWith")),F.setAttribute("type","text"),F.style.marginTop="4px",F.style.marginBottom="6px",F.style.width=z,F.style.fontSize="12px",F.style.borderRadius="4px",F.style.padding="6px",y.appendChild(F),mxUtils.br(y),mxEvent.addListener(F,"input",f));var E=document.createElement("input");
+E.setAttribute("id","geFindWinRegExChck");E.setAttribute("type","checkbox");E.style.marginRight="4px";y.appendChild(E);z=document.createElement("label");z.setAttribute("for","geFindWinRegExChck");y.appendChild(z);mxUtils.write(z,mxResources.get("regularExpression"));y.appendChild(z);z=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");z.style.position="relative";z.style.marginLeft="6px";z.style.top="-1px";y.appendChild(z);mxUtils.br(y);var H=document.createElement("input");H.setAttribute("id",
+"geFindWinAllPagesChck");H.setAttribute("type","checkbox");H.style.marginRight="4px";y.appendChild(H);z=document.createElement("label");z.setAttribute("for","geFindWinAllPagesChck");y.appendChild(z);mxUtils.write(z,mxResources.get("allPages"));y.appendChild(z);var D=document.createElement("div");mxUtils.br(y);z=document.createElement("div");z.style.left="0px";z.style.right="0px";z.style.marginTop="6px";z.style.padding="0 6px 0 6px";z.style.textAlign="center";y.appendChild(z);var I=mxUtils.button(mxResources.get("reset"),
+function(){M.innerHTML="";C.value="";C.style.backgroundColor="";k&&(F.value="",f());q=t=null;v=!1;C.focus()});I.setAttribute("title",mxResources.get("reset"));I.style["float"]="none";I.style.width="120px";I.style.marginTop="6px";I.style.marginLeft="8px";I.style.overflow="hidden";I.style.textOverflow="ellipsis";I.className="geBtn";k||z.appendChild(I);var K=mxUtils.button(mxResources.get("find"),function(){try{C.style.backgroundColor=l()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(W){b.handleError(W)}});
+K.setAttribute("title",mxResources.get("find")+" (Enter)");K.style["float"]="none";K.style.width="120px";K.style.marginTop="6px";K.style.marginLeft="8px";K.style.overflow="hidden";K.style.textOverflow="ellipsis";K.className="geBtn gePrimaryBtn";z.appendChild(K);var M=document.createElement("div");M.style.marginTop="10px";if(k){var L=function(b,c,f,d,e){if(null==e||"1"!=e.html)return d=b.toLowerCase().indexOf(c,d),0>d?b:b.substr(0,d)+f+b.substr(d+c.length);var l=b;c=mxUtils.htmlEntities(c);e=[];for(var m=
+-1;-1<(m=b.indexOf("<",m+1));)e.push(m);m=b.match(/<[^>]*>/g);b=b.replace(/<[^>]*>/g,"");d=b.toLowerCase().indexOf(c,d);if(0>d)return l;l=d+c.length;f=mxUtils.htmlEntities(f);b=b.substr(0,d)+f+b.substr(l);for(var g=0,k=0;k<e.length;k++){if(e[k]-g<d)b=b.substr(0,e[k])+m[k]+b.substr(e[k]);else{var p=e[k]-g<l?d+g:e[k]+(f.length-c.length);b=b.substr(0,p)+m[k]+b.substr(p)}g+=m[k].length}return b},N=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=x&&null!=t&&F.value){var c=t.cell,f=p.getLabel(c);
+p.isCellEditable(c)&&p.model.setValue(c,L(f,x,F.value,B-x.length,p.getCurrentCellStyle(c)));C.style.backgroundColor=l(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(Q){b.handleError(Q)}});N.setAttribute("title",mxResources.get("replFind"));N.style["float"]="none";N.style.width="120px";N.style.marginTop="6px";N.style.marginLeft="8px";N.style.overflow="hidden";N.style.textOverflow="ellipsis";N.className="geBtn gePrimaryBtn";N.setAttribute("disabled","disabled");z.appendChild(N);mxUtils.br(z);
+var P=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=x&&null!=t&&F.value){var c=t.cell,f=p.getLabel(c);p.model.setValue(c,L(f,x,F.value,B-x.length,p.getCurrentCellStyle(c)));N.setAttribute("disabled","disabled");P.setAttribute("disabled","disabled")}}catch(Q){b.handleError(Q)}});P.setAttribute("title",mxResources.get("replace"));P.style["float"]="none";P.style.width="120px";P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow="hidden";P.style.textOverflow="ellipsis";
+P.className="geBtn gePrimaryBtn";P.setAttribute("disabled","disabled");z.appendChild(P);var G=mxUtils.button(mxResources.get("replaceAll"),function(){M.innerHTML="";if(F.value){var c=b.currentPage,f=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;p.getModel().beginUpdate();try{for(var d=0,e={};l(!1,!0,!0)&&100>d;){var m=t.cell,g=p.getLabel(m),k=e[m.id];if(k&&k.replAllMrk==A&&k.replAllPos>=B)break;e[m.id]={replAllMrk:A,replAllPos:B};p.isCellEditable(m)&&(p.model.setValue(m,L(g,x,F.value,
+B-x.length,p.getCurrentCellStyle(m))),d++)}c!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,c));mxUtils.write(M,mxResources.get("matchesRepl",[d]))}catch(ba){b.handleError(ba)}finally{p.getModel().endUpdate(),b.editor.graph.setSelectionCells(f),b.editor.graph.rendering=!0}A++}});G.setAttribute("title",mxResources.get("replaceAll"));G.style["float"]="none";G.style.width="120px";G.style.marginTop="6px";G.style.marginLeft="8px";G.style.overflow="hidden";G.style.textOverflow="ellipsis";
+G.className="geBtn gePrimaryBtn";G.setAttribute("disabled","disabled");z.appendChild(G);mxUtils.br(z);z.appendChild(I);I=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));I.setAttribute("title",mxResources.get("close"));I.style["float"]="none";I.style.width="120px";I.style.marginTop="6px";I.style.marginLeft="8px";I.style.overflow="hidden";I.style.textOverflow="ellipsis";I.className="geBtn";z.appendChild(I);mxUtils.br(z);z.appendChild(M)}else I.style.width=
+"90px",K.style.width="90px";mxEvent.addListener(C,"keyup",function(b){if(91==b.keyCode||93==b.keyCode||17==b.keyCode)mxEvent.consume(b);else if(27==b.keyCode)m.funct();else if(q!=C.value.toLowerCase()||13==b.keyCode)try{C.style.backgroundColor=l()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(R){C.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(y,"keydown",function(c){70==c.keyCode&&b.keyHandler.isControlDown(c)&&!mxEvent.isShiftDown(c)&&(m.funct(),mxEvent.consume(c))});
+this.window=new mxWindow(mxResources.get("find")+(k?"/"+mxResources.get("replace"):""),y,e,d,c,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(C.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?H.removeAttribute("disabled"):
+(H.checked=!1,H.setAttribute("disabled","disabled"))):p.container.focus()}));this.window.setLocation=function(b,c){var f=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,f-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};
var J=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",J);this.destroy=function(){mxEvent.removeListener(window,"resize",J);this.window.destroy()}},FreehandWindow=function(b,e,d,c,g){var k=b.editor.graph;b=document.createElement("div");b.style.textAlign="center";b.style.userSelect="none";b.style.overflow="hidden";b.style.height="100%";var n=mxUtils.button(mxResources.get("startDrawing"),function(){k.freehand.isDrawing()?
k.freehand.stopDrawing():k.freehand.startDrawing()});n.setAttribute("title",mxResources.get("startDrawing"));n.style.marginTop="10px";n.style.width="90%";n.style.boxSizing="border-box";n.style.overflow="hidden";n.style.textOverflow="ellipsis";n.style.textAlign="center";n.className="geBtn gePrimaryBtn";b.appendChild(n);this.window=new mxWindow(mxResources.get("freehand"),b,e,d,c,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);
k.addListener("freehandStateChanged",mxUtils.bind(this,function(){n.innerHTML="";mxUtils.write(n,mxResources.get(k.freehand.isDrawing()?"stopDrawing":"startDrawing"));n.setAttribute("title",mxResources.get(k.freehand.isDrawing()?"stopDrawing":"startDrawing"));n.className="geBtn"+(k.freehand.isDrawing()?"":" gePrimaryBtn")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){k.freehand.isDrawing()&&k.freehand.stopDrawing()}));
@@ -10122,9 +10144,9 @@ null!=t&&(t.style.backgroundColor="");t=d;t.style.backgroundColor=Editor.isDarkM
"0px";l.style.lineHeight="40px";l.style.height="40px";l.style.right="0px";var p=document.createElement("div"),q=document.createElement("div");p.style.position="absolute";p.style.top="40px";p.style.left="0px";p.style.width="202px";p.style.bottom="60px";p.style.overflow="auto";q.style.position="absolute";q.style.left="202px";q.style.right="0px";q.style.top="40px";q.style.bottom="60px";q.style.overflow="auto";q.style.borderLeft="1px solid rgb(211, 211, 211)";q.style.textAlign="center";var t=null,u=[],
v=document.createElement("div");v.style.position="relative";v.style.left="0px";v.style.right="0px";k(d);c.style.padding="30px";c.appendChild(l);c.appendChild(p);c.appendChild(q);d=document.createElement("div");d.className="geDialogFooter";d.style.position="absolute";d.style.paddingRight="16px";d.style.color="gray";d.style.left="0px";d.style.right="0px";d.style.bottom="0px";d.style.height="60px";d.style.lineHeight="52px";var x=document.createElement("input");x.setAttribute("type","checkbox");if(isLocalStorage||
mxClient.IS_CHROMEAPP)k=document.createElement("span"),k.style.paddingRight="20px",k.appendChild(x),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),x.checked=!0,x.defaultChecked=!0,mxEvent.addListener(k,"click",function(b){mxEvent.getSource(b)!=x&&(x.checked=!x.checked,mxEvent.consume(b))}),d.appendChild(k);k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});k.className="geBtn";l=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var c=[],f=0;f<u.length;f++){var d=
-u[f].apply(this,arguments);null!=d&&c.push(d)}b.sidebar.showEntries(c.join(";"),x.checked,!0)});l.className="geBtn gePrimaryBtn"}else{var A=document.createElement("table"),k=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";l=document.createElement("tr");A.style.width="100%";e=document.createElement("td");var g=document.createElement("td"),n=document.createElement("td"),z=mxUtils.bind(this,function(c,f,d){var e=document.createElement("input");e.type="checkbox";A.appendChild(e);
-e.checked=b.sidebar.isEntryVisible(d);var l=document.createElement("span");mxUtils.write(l,f);f=document.createElement("div");f.style.display="block";f.appendChild(e);f.appendChild(l);mxEvent.addListener(l,"click",function(b){e.checked=!e.checked;mxEvent.consume(b)});c.appendChild(f);return function(){return e.checked?d:null}});l.appendChild(e);l.appendChild(g);l.appendChild(n);k.appendChild(l);A.appendChild(k);for(var u=[],y=0,k=0;k<d.length;k++)for(l=0;l<d[k].entries.length;l++)y++;for(var B=[e,
-g,n],C=0,k=0;k<d.length;k++)(function(b){for(var c=0;c<b.entries.length;c++){var f=b.entries[c];u.push(z(B[Math.floor(C/(y/3))],f.title,f.id));C++}})(d[k]);c.appendChild(A);d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="center";x=document.createElement("input");isLocalStorage&&(x.setAttribute("type","checkbox"),x.checked=!0,x.defaultChecked=!0,d.appendChild(x),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),d.appendChild(k),
+u[f].apply(this,arguments);null!=d&&c.push(d)}b.sidebar.showEntries(c.join(";"),x.checked,!0)});l.className="geBtn gePrimaryBtn"}else{var B=document.createElement("table"),k=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";l=document.createElement("tr");B.style.width="100%";e=document.createElement("td");var g=document.createElement("td"),n=document.createElement("td"),A=mxUtils.bind(this,function(c,f,d){var e=document.createElement("input");e.type="checkbox";B.appendChild(e);
+e.checked=b.sidebar.isEntryVisible(d);var l=document.createElement("span");mxUtils.write(l,f);f=document.createElement("div");f.style.display="block";f.appendChild(e);f.appendChild(l);mxEvent.addListener(l,"click",function(b){e.checked=!e.checked;mxEvent.consume(b)});c.appendChild(f);return function(){return e.checked?d:null}});l.appendChild(e);l.appendChild(g);l.appendChild(n);k.appendChild(l);B.appendChild(k);for(var u=[],y=0,k=0;k<d.length;k++)for(l=0;l<d[k].entries.length;l++)y++;for(var z=[e,
+g,n],C=0,k=0;k<d.length;k++)(function(b){for(var c=0;c<b.entries.length;c++){var f=b.entries[c];u.push(A(z[Math.floor(C/(y/3))],f.title,f.id));C++}})(d[k]);c.appendChild(B);d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="center";x=document.createElement("input");isLocalStorage&&(x.setAttribute("type","checkbox"),x.checked=!0,x.defaultChecked=!0,d.appendChild(x),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),d.appendChild(k),
mxEvent.addListener(k,"click",function(b){x.checked=!x.checked;mxEvent.consume(b)}));c.appendChild(d);k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});k.className="geBtn";l=mxUtils.button(mxResources.get("apply"),function(){for(var c=["search"],f=0;f<u.length;f++){var d=u[f].apply(this,arguments);null!=d&&c.push(d)}b.sidebar.showEntries(0<c.length?c.join(";"):"",x.checked);b.hideDialog()});l.className="geBtn gePrimaryBtn";d=document.createElement("div");d.style.marginTop="26px";
d.style.textAlign="right"}b.editor.cancelFirst?(d.appendChild(k),d.appendChild(l)):(d.appendChild(l),d.appendChild(k));c.appendChild(d);this.container=c},PluginsDialog=function(b,e,d){function c(){if(0==n.length)k.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{k.innerHTML="";for(var f=0;f<n.length;f++){var e=document.createElement("span");e.style.whiteSpace="nowrap";var l=document.createElement("span");l.className="geSprite geSprite-delete";l.style.position="relative";l.style.cursor=
"pointer";l.style.top="5px";l.style.marginRight="4px";l.style.display="inline-block";e.appendChild(l);mxUtils.write(e,n[f]);k.appendChild(e);mxUtils.br(k);mxEvent.addListener(l,"click",function(f){return function(){b.confirm(mxResources.get("delete")+' "'+n[f]+'"?',function(){null!=d&&d(n[f]);n.splice(f,1);c()})}}(f))}}}var g=document.createElement("div"),k=document.createElement("div");k.style.height="120px";k.style.overflow="auto";var n=mxSettings.getPlugins().slice();g.appendChild(k);c();var f=
@@ -10140,32 +10162,32 @@ k.style.paddingLeft="6px";mxUtils.write(l,mxResources.get("relative")+":");var p
q.setAttribute("type","text");q.style.width="100px";q.value=null!=c?c.x:"";m.appendChild(q);f.appendChild(l);f.appendChild(m);n.appendChild(f);f=document.createElement("tr");l=document.createElement("td");m=document.createElement("td");mxUtils.write(l,mxResources.get("top")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=c?c.y:"";m.appendChild(t);f.appendChild(l);f.appendChild(m);n.appendChild(f);f=document.createElement("tr");l=document.createElement("td");
m=document.createElement("td");mxUtils.write(l,mxResources.get("dx")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=c&&null!=c.offset?c.offset.x:"";m.appendChild(u);f.appendChild(l);f.appendChild(m);n.appendChild(f);f=document.createElement("tr");l=document.createElement("td");m=document.createElement("td");mxUtils.write(l,mxResources.get("dy")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";
v.value=null!=c&&null!=c.offset?c.offset.y:"";m.appendChild(v);f.appendChild(l);f.appendChild(m);n.appendChild(f);f=document.createElement("tr");l=document.createElement("td");m=document.createElement("td");mxUtils.write(l,mxResources.get("width")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=null!=c?c.width:"";m.appendChild(x);f.appendChild(l);f.appendChild(m);n.appendChild(f);f=document.createElement("tr");l=document.createElement("td");m=
-document.createElement("td");mxUtils.write(l,mxResources.get("height")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.width="100px";A.value=null!=c?c.height:"";m.appendChild(A);f.appendChild(l);f.appendChild(m);n.appendChild(f);f=document.createElement("tr");l=document.createElement("td");m=document.createElement("td");mxUtils.write(l,mxResources.get("rotation")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";z.value=
-1==e.length?mxUtils.getValue(d.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";m.appendChild(z);f.appendChild(l);f.appendChild(m);n.appendChild(f);k.appendChild(n);g.appendChild(k);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var y=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();d.getModel().beginUpdate();try{for(var c=0;c<e.length;c++){var f=d.getCellGeometry(e[c]);null!=f&&(f=f.clone(),d.isCellMovable(e[c])&&(f.relative=p.checked,
-0<mxUtils.trim(q.value).length&&(f.x=Number(q.value)),0<mxUtils.trim(t.value).length&&(f.y=Number(t.value)),0<mxUtils.trim(u.value).length&&(null==f.offset&&(f.offset=new mxPoint),f.offset.x=Number(u.value)),0<mxUtils.trim(v.value).length&&(null==f.offset&&(f.offset=new mxPoint),f.offset.y=Number(v.value))),d.isCellResizable(e[c])&&(0<mxUtils.trim(x.value).length&&(f.width=Number(x.value)),0<mxUtils.trim(A.value).length&&(f.height=Number(A.value))),d.getModel().setGeometry(e[c],f));0<mxUtils.trim(z.value).length&&
-d.setCellStyles(mxConstants.STYLE_ROTATION,Number(z.value),[e[c]])}}finally{d.getModel().endUpdate()}});y.className="geBtn gePrimaryBtn";mxEvent.addListener(g,"keypress",function(b){13==b.keyCode&&y.click()});k=document.createElement("div");k.style.marginTop="20px";k.style.textAlign="right";b.editor.cancelFirst?(k.appendChild(c),k.appendChild(y)):(k.appendChild(y),k.appendChild(c));g.appendChild(k);this.container=g},LibraryDialog=function(b,e,d,c,g,k){function n(b){for(b=document.elementFromPoint(b.clientX,
-b.clientY);null!=b&&b.parentNode!=u;)b=b.parentNode;var c=null;if(null!=b)for(var f=u.firstChild,c=0;null!=f&&f!=b;)f=f.nextSibling,c++;return c}function f(c,d,e,l,m,g,k,q,t){try{if(b.spinner.stop(),null==d||"image/"==d.substring(0,6))if(null==c&&null!=k||null==x[c]){var O=function(){K.innerHTML="";K.style.cursor="pointer";K.style.whiteSpace="nowrap";K.style.textOverflow="ellipsis";mxUtils.write(K,null!=M.title&&0<M.title.length?M.title:mxResources.get("untitled"));K.style.color=null==M.title||0==
-M.title.length?"#d0d0d0":""};u.style.backgroundImage="";v.style.display="none";var G=m,D=g;if(m>b.maxImageSize||g>b.maxImageSize){var z=Math.min(1,Math.min(b.maxImageSize/Math.max(1,m)),b.maxImageSize/Math.max(1,g));m*=z;g*=z}G>D?(D=Math.round(100*D/G),G=100):(G=Math.round(100*G/D),D=100);var L=document.createElement("div");L.setAttribute("draggable","true");L.style.display="inline-block";L.style.position="relative";L.style.padding="0 12px";L.style.cursor="move";mxUtils.setPrefixedStyle(L.style,"transition",
-"transform .1s ease-in-out");if(null!=c){var I=document.createElement("img");I.setAttribute("src",B.convert(c));I.style.width=G+"px";I.style.height=D+"px";I.style.margin="10px";I.style.paddingBottom=Math.floor((100-D)/2)+"px";I.style.paddingLeft=Math.floor((100-G)/2)+"px";L.appendChild(I)}else if(null!=k){var E=b.stringToCells(Graph.decompress(k.xml));0<E.length&&(b.sidebar.createThumb(E,100,100,L,null,!0,!1),L.firstChild.style.display="inline-block",L.firstChild.style.cursor="")}var F=document.createElement("img");
+document.createElement("td");mxUtils.write(l,mxResources.get("height")+":");var B=document.createElement("input");B.setAttribute("type","text");B.style.width="100px";B.value=null!=c?c.height:"";m.appendChild(B);f.appendChild(l);f.appendChild(m);n.appendChild(f);f=document.createElement("tr");l=document.createElement("td");m=document.createElement("td");mxUtils.write(l,mxResources.get("rotation")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.width="100px";A.value=
+1==e.length?mxUtils.getValue(d.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";m.appendChild(A);f.appendChild(l);f.appendChild(m);n.appendChild(f);k.appendChild(n);g.appendChild(k);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var y=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();d.getModel().beginUpdate();try{for(var c=0;c<e.length;c++){var f=d.getCellGeometry(e[c]);null!=f&&(f=f.clone(),d.isCellMovable(e[c])&&(f.relative=p.checked,
+0<mxUtils.trim(q.value).length&&(f.x=Number(q.value)),0<mxUtils.trim(t.value).length&&(f.y=Number(t.value)),0<mxUtils.trim(u.value).length&&(null==f.offset&&(f.offset=new mxPoint),f.offset.x=Number(u.value)),0<mxUtils.trim(v.value).length&&(null==f.offset&&(f.offset=new mxPoint),f.offset.y=Number(v.value))),d.isCellResizable(e[c])&&(0<mxUtils.trim(x.value).length&&(f.width=Number(x.value)),0<mxUtils.trim(B.value).length&&(f.height=Number(B.value))),d.getModel().setGeometry(e[c],f));0<mxUtils.trim(A.value).length&&
+d.setCellStyles(mxConstants.STYLE_ROTATION,Number(A.value),[e[c]])}}finally{d.getModel().endUpdate()}});y.className="geBtn gePrimaryBtn";mxEvent.addListener(g,"keypress",function(b){13==b.keyCode&&y.click()});k=document.createElement("div");k.style.marginTop="20px";k.style.textAlign="right";b.editor.cancelFirst?(k.appendChild(c),k.appendChild(y)):(k.appendChild(y),k.appendChild(c));g.appendChild(k);this.container=g},LibraryDialog=function(b,e,d,c,g,k){function n(b){for(b=document.elementFromPoint(b.clientX,
+b.clientY);null!=b&&b.parentNode!=u;)b=b.parentNode;var c=null;if(null!=b)for(var f=u.firstChild,c=0;null!=f&&f!=b;)f=f.nextSibling,c++;return c}function f(c,d,e,l,m,g,k,q,t){try{if(b.spinner.stop(),null==d||"image/"==d.substring(0,6))if(null==c&&null!=k||null==x[c]){var P=function(){E.innerHTML="";E.style.cursor="pointer";E.style.whiteSpace="nowrap";E.style.textOverflow="ellipsis";mxUtils.write(E,null!=M.title&&0<M.title.length?M.title:mxResources.get("untitled"));E.style.color=null==M.title||0==
+M.title.length?"#d0d0d0":""};u.style.backgroundImage="";v.style.display="none";var G=m,D=g;if(m>b.maxImageSize||g>b.maxImageSize){var A=Math.min(1,Math.min(b.maxImageSize/Math.max(1,m)),b.maxImageSize/Math.max(1,g));m*=A;g*=A}G>D?(D=Math.round(100*D/G),G=100):(G=Math.round(100*G/D),D=100);var L=document.createElement("div");L.setAttribute("draggable","true");L.style.display="inline-block";L.style.position="relative";L.style.padding="0 12px";L.style.cursor="move";mxUtils.setPrefixedStyle(L.style,"transition",
+"transform .1s ease-in-out");if(null!=c){var H=document.createElement("img");H.setAttribute("src",z.convert(c));H.style.width=G+"px";H.style.height=D+"px";H.style.margin="10px";H.style.paddingBottom=Math.floor((100-D)/2)+"px";H.style.paddingLeft=Math.floor((100-G)/2)+"px";L.appendChild(H)}else if(null!=k){var K=b.stringToCells(Graph.decompress(k.xml));0<K.length&&(b.sidebar.createThumb(K,100,100,L,null,!0,!1),L.firstChild.style.display="inline-block",L.firstChild.style.cursor="")}var F=document.createElement("img");
F.setAttribute("src",Editor.closeBlackImage);F.setAttribute("border","0");F.setAttribute("title",mxResources.get("delete"));F.setAttribute("align","top");F.style.paddingTop="4px";F.style.position="absolute";F.style.marginLeft="-12px";F.style.zIndex="1";F.style.cursor="pointer";mxEvent.addListener(F,"dragstart",function(b){mxEvent.consume(b)});(function(b,c,f){mxEvent.addListener(F,"click",function(d){x[c]=null;for(var e=0;e<p.length;e++)if(null!=p[e].data&&p[e].data==c||null!=p[e].xml&&null!=f&&p[e].xml==
-f.xml){p.splice(e,1);break}L.parentNode.removeChild(b);0==p.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(d)});mxEvent.addListener(F,"dblclick",function(b){mxEvent.consume(b)})})(L,c,k);L.appendChild(F);L.style.marginBottom="30px";var K=document.createElement("div");K.style.position="absolute";K.style.boxSizing="border-box";K.style.bottom="-18px";K.style.left="10px";K.style.right="10px";K.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":
-"#ffffff";K.style.overflow="hidden";K.style.textAlign="center";var M=null;null!=c?(M={data:c,w:m,h:g,title:t},null!=q&&(M.aspect=q),x[c]=I,p.push(M)):null!=k&&(k.aspect="fixed",p.push(k),M=k);mxEvent.addListener(K,"keydown",function(b){13==b.keyCode&&null!=y&&(y(),y=null,mxEvent.consume(b))});O();L.appendChild(K);mxEvent.addListener(K,"mousedown",function(b){"true"!=K.getAttribute("contentEditable")&&mxEvent.consume(b)});E=function(c){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||
-9<document.documentMode)){var f=new FilenameDialog(b,M.title||"",mxResources.get("ok"),function(b){null!=b&&(M.title=b,O())},mxResources.get("enterValue"));b.showDialog(f.container,300,80,!0,!0);f.init();mxEvent.consume(c)}else if("true"!=K.getAttribute("contentEditable")){null!=y&&(y(),y=null);if(null==M.title||0==M.title.length)K.innerHTML="";K.style.textOverflow="";K.style.whiteSpace="";K.style.cursor="text";K.style.color="";K.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(K.style,
-"user-select","text");K.focus();document.execCommand("selectAll",!1,null);y=function(){K.removeAttribute("contentEditable");K.style.cursor="pointer";M.title=K.innerHTML;O()};mxEvent.consume(c)}};mxEvent.addListener(K,"click",E);mxEvent.addListener(L,"dblclick",E);u.appendChild(L);mxEvent.addListener(L,"dragstart",function(b){null==c&&null!=k&&(F.style.visibility="hidden",K.style.visibility="hidden");mxClient.IS_FF&&null!=k.xml&&b.dataTransfer.setData("Text",k.xml);A=n(b);mxClient.IS_GC&&(L.style.opacity=
-"0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(L.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(L,30);F.style.visibility="";K.style.visibility=""},0)});mxEvent.addListener(L,"dragend",function(b){"hidden"==F.style.visibility&&(F.style.visibility="",K.style.visibility="");A=null;mxUtils.setOpacity(L,100);mxUtils.setPrefixedStyle(L.style,"transform",null)})}else C||(C=!0,b.handleError({message:mxResources.get("fileExists")}));else{m=!1;try{if(G=mxUtils.parseXml(c),"mxlibrary"==
-G.documentElement.nodeName){D=JSON.parse(mxUtils.getTextContent(G.documentElement));if(null!=D&&0<D.length)for(var H=0;H<D.length;H++)null!=D[H].xml?f(null,null,0,0,0,0,D[H]):f(D[H].data,null,0,0,D[H].w,D[H].h,null,"fixed",D[H].title);m=!0}else if("mxfile"==G.documentElement.nodeName){for(var P=G.documentElement.getElementsByTagName("diagram"),H=0;H<P.length;H++){var D=mxUtils.getTextContent(P[H]),E=b.stringToCells(Graph.decompress(D)),N=b.editor.graph.getBoundingBoxFromGeometry(E);f(null,null,0,
-0,0,0,{xml:D,w:N.width,h:N.height})}m=!0}}catch(S){}m||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(S){}return null}function l(b){b.dataTransfer.dropEffect=null!=A?"move":"copy";b.stopPropagation();b.preventDefault()}function m(c){c.stopPropagation();c.preventDefault();C=!1;z=n(c);if(null!=A)null!=z&&z<u.children.length?(p.splice(z>A?z-1:z,0,p.splice(A,1)[0]),u.insertBefore(u.children[A],u.children[z])):(p.push(p.splice(A,1)[0]),u.appendChild(u.children[A]));
-else if(0<c.dataTransfer.files.length)b.importFiles(c.dataTransfer.files,0,0,b.maxImageSize,E(c));else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var d=decodeURIComponent(c.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(d)||/(\.png)($|\?)/i.test(d)||/(\.gif)($|\?)/i.test(d)||/(\.svg)($|\?)/i.test(d))&&b.loadImage(d,function(b){f(d,null,0,0,b.width,b.height);u.scrollTop=u.scrollHeight})}c.stopPropagation();c.preventDefault()}var p=[];d=document.createElement("div");
+f.xml){p.splice(e,1);break}L.parentNode.removeChild(b);0==p.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(d)});mxEvent.addListener(F,"dblclick",function(b){mxEvent.consume(b)})})(L,c,k);L.appendChild(F);L.style.marginBottom="30px";var E=document.createElement("div");E.style.position="absolute";E.style.boxSizing="border-box";E.style.bottom="-18px";E.style.left="10px";E.style.right="10px";E.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":
+"#ffffff";E.style.overflow="hidden";E.style.textAlign="center";var M=null;null!=c?(M={data:c,w:m,h:g,title:t},null!=q&&(M.aspect=q),x[c]=H,p.push(M)):null!=k&&(k.aspect="fixed",p.push(k),M=k);mxEvent.addListener(E,"keydown",function(b){13==b.keyCode&&null!=y&&(y(),y=null,mxEvent.consume(b))});P();L.appendChild(E);mxEvent.addListener(E,"mousedown",function(b){"true"!=E.getAttribute("contentEditable")&&mxEvent.consume(b)});K=function(c){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||
+9<document.documentMode)){var f=new FilenameDialog(b,M.title||"",mxResources.get("ok"),function(b){null!=b&&(M.title=b,P())},mxResources.get("enterValue"));b.showDialog(f.container,300,80,!0,!0);f.init();mxEvent.consume(c)}else if("true"!=E.getAttribute("contentEditable")){null!=y&&(y(),y=null);if(null==M.title||0==M.title.length)E.innerHTML="";E.style.textOverflow="";E.style.whiteSpace="";E.style.cursor="text";E.style.color="";E.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(E.style,
+"user-select","text");E.focus();document.execCommand("selectAll",!1,null);y=function(){E.removeAttribute("contentEditable");E.style.cursor="pointer";M.title=E.innerHTML;P()};mxEvent.consume(c)}};mxEvent.addListener(E,"click",K);mxEvent.addListener(L,"dblclick",K);u.appendChild(L);mxEvent.addListener(L,"dragstart",function(b){null==c&&null!=k&&(F.style.visibility="hidden",E.style.visibility="hidden");mxClient.IS_FF&&null!=k.xml&&b.dataTransfer.setData("Text",k.xml);B=n(b);mxClient.IS_GC&&(L.style.opacity=
+"0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(L.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(L,30);F.style.visibility="";E.style.visibility=""},0)});mxEvent.addListener(L,"dragend",function(b){"hidden"==F.style.visibility&&(F.style.visibility="",E.style.visibility="");B=null;mxUtils.setOpacity(L,100);mxUtils.setPrefixedStyle(L.style,"transform",null)})}else C||(C=!0,b.handleError({message:mxResources.get("fileExists")}));else{m=!1;try{if(G=mxUtils.parseXml(c),"mxlibrary"==
+G.documentElement.nodeName){D=JSON.parse(mxUtils.getTextContent(G.documentElement));if(null!=D&&0<D.length)for(var I=0;I<D.length;I++)null!=D[I].xml?f(null,null,0,0,0,0,D[I]):f(D[I].data,null,0,0,D[I].w,D[I].h,null,"fixed",D[I].title);m=!0}else if("mxfile"==G.documentElement.nodeName){for(var N=G.documentElement.getElementsByTagName("diagram"),I=0;I<N.length;I++){var D=mxUtils.getTextContent(N[I]),K=b.stringToCells(Graph.decompress(D)),O=b.editor.graph.getBoundingBoxFromGeometry(K);f(null,null,0,
+0,0,0,{xml:D,w:O.width,h:O.height})}m=!0}}catch(T){}m||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(T){}return null}function l(b){b.dataTransfer.dropEffect=null!=B?"move":"copy";b.stopPropagation();b.preventDefault()}function m(c){c.stopPropagation();c.preventDefault();C=!1;A=n(c);if(null!=B)null!=A&&A<u.children.length?(p.splice(A>B?A-1:A,0,p.splice(B,1)[0]),u.insertBefore(u.children[B],u.children[A])):(p.push(p.splice(B,1)[0]),u.appendChild(u.children[B]));
+else if(0<c.dataTransfer.files.length)b.importFiles(c.dataTransfer.files,0,0,b.maxImageSize,F(c));else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var d=decodeURIComponent(c.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(d)||/(\.png)($|\?)/i.test(d)||/(\.gif)($|\?)/i.test(d)||/(\.svg)($|\?)/i.test(d))&&b.loadImage(d,function(b){f(d,null,0,0,b.width,b.height);u.scrollTop=u.scrollHeight})}c.stopPropagation();c.preventDefault()}var p=[];d=document.createElement("div");
d.style.height="100%";var q=document.createElement("div");q.style.whiteSpace="nowrap";q.style.height="40px";d.appendChild(q);mxUtils.write(q,mxResources.get("filename")+":");null==e&&(e=b.defaultLibraryName+".xml");var t=document.createElement("input");t.setAttribute("value",e);t.style.marginRight="20px";t.style.marginLeft="10px";t.style.width="500px";null==g||g.isRenamable()||t.setAttribute("disabled","true");this.init=function(){if(null==g||g.isRenamable())t.focus(),mxClient.IS_GC||mxClient.IS_FF||
5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null)};q.appendChild(t);var u=document.createElement("div");u.style.borderWidth="1px 0px 1px 0px";u.style.borderColor="#d3d3d3";u.style.borderStyle="solid";u.style.marginTop="6px";u.style.overflow="auto";u.style.height="340px";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";0==p.length&&Graph.fileSupport&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var v=document.createElement("div");
-v.style.position="absolute";v.style.width="640px";v.style.top="260px";v.style.textAlign="center";v.style.fontSize="22px";v.style.color="#a0c3ff";mxUtils.write(v,mxResources.get("dragImagesHere"));d.appendChild(v);var x={},A=null,z=null,y=null;e=function(b){"true"!=mxEvent.getSource(b).getAttribute("contentEditable")&&null!=y&&(y(),y=null,mxEvent.consume(b))};mxEvent.addListener(u,"mousedown",e);mxEvent.addListener(u,"pointerdown",e);mxEvent.addListener(u,"touchstart",e);var B=new mxUrlConverter,C=
-!1;if(null!=c)for(e=0;e<c.length;e++)q=c[e],f(q.data,null,0,0,q.w,q.h,q,q.aspect,q.title);mxEvent.addListener(u,"dragleave",function(b){v.style.cursor="";for(var c=mxEvent.getSource(b);null!=c;){if(c==u||c==v){b.stopPropagation();b.preventDefault();break}c=c.parentNode}});var E=function(c){return function(d,e,l,m,g,k,p,q,t){null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t.name)||/(\.vs(x|sx?))($|\?)/i.test(t.name))?b.importVisio(t,mxUtils.bind(this,function(b){f(b,e,l,m,g,k,p,"fixed",mxEvent.isAltDown(c)?
+v.style.position="absolute";v.style.width="640px";v.style.top="260px";v.style.textAlign="center";v.style.fontSize="22px";v.style.color="#a0c3ff";mxUtils.write(v,mxResources.get("dragImagesHere"));d.appendChild(v);var x={},B=null,A=null,y=null;e=function(b){"true"!=mxEvent.getSource(b).getAttribute("contentEditable")&&null!=y&&(y(),y=null,mxEvent.consume(b))};mxEvent.addListener(u,"mousedown",e);mxEvent.addListener(u,"pointerdown",e);mxEvent.addListener(u,"touchstart",e);var z=new mxUrlConverter,C=
+!1;if(null!=c)for(e=0;e<c.length;e++)q=c[e],f(q.data,null,0,0,q.w,q.h,q,q.aspect,q.title);mxEvent.addListener(u,"dragleave",function(b){v.style.cursor="";for(var c=mxEvent.getSource(b);null!=c;){if(c==u||c==v){b.stopPropagation();b.preventDefault();break}c=c.parentNode}});var F=function(c){return function(d,e,l,m,g,k,p,q,t){null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t.name)||/(\.vs(x|sx?))($|\?)/i.test(t.name))?b.importVisio(t,mxUtils.bind(this,function(b){f(b,e,l,m,g,k,p,"fixed",mxEvent.isAltDown(c)?
null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))})):null!=t&&!b.isOffline()&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(d,t.name)?b.parseFile(t,mxUtils.bind(this,function(d){4==d.readyState&&(b.spinner.stop(),200<=d.status&&299>=d.status&&(f(d.responseText,e,l,m,g,k,p,"fixed",mxEvent.isAltDown(c)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(f(d,e,l,m,g,k,p,"fixed",mxEvent.isAltDown(c)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g,
" ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",l);mxEvent.addListener(u,"drop",m);mxEvent.addListener(v,"dragover",l);mxEvent.addListener(v,"drop",m);d.appendChild(u);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});e.setAttribute("id","btnCancel");e.className="geBtn";b.editor.cancelFirst&&c.appendChild(e);"draw.io"!=b.getServiceName()||null==g||g.constructor!=DriveLibrary&&
g.constructor!=GitHubLibrary||(q=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&g.getPublicUrl(function(c){b.spinner.stop();if(null!=c){var f=b.getSearch("create title mode url drive splash state clibs ui".split(" ")),f=f+((0==f.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(c));c=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+f,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(c.container,
440,240,!0);c.init()}else g.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(g.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),q.className="geBtn",c.appendChild(q));q=mxUtils.button(mxResources.get("export"),function(){var c=b.createLibraryDataFromImages(p),f=t.value;/(\.xml)$/i.test(f)||
-(f+=".xml");b.isLocalFileSave()?b.saveLocalFile(c,f,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(f)+"&format=xml&xml="+encodeURIComponent(c))).simulate(document,"_blank")});q.setAttribute("id","btnDownload");q.className="geBtn";c.appendChild(q);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var F=document.createElement("input");F.setAttribute("multiple","multiple");F.setAttribute("type","file");mxEvent.addListener(F,"change",function(c){C=!1;
-b.importFiles(F.files,0,0,b.maxImageSize,function(b,f,d,e,l,m,g,k,p){null!=F.files&&(E(c)(b,f,d,e,l,m,g,k,p),F.type="",F.type="file",F.value="")});u.scrollTop=u.scrollHeight});F.style.display="none";document.body.appendChild(F);b.libDlgFileInputElt=F}q=mxUtils.button(mxResources.get("import"),function(){null!=y&&(y(),y=null);b.libDlgFileInputElt.click()});q.setAttribute("id","btnAddImage");q.className="geBtn";c.appendChild(q)}q=mxUtils.button(mxResources.get("addImages"),function(){null!=y&&(y(),
+(f+=".xml");b.isLocalFileSave()?b.saveLocalFile(c,f,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(f)+"&format=xml&xml="+encodeURIComponent(c))).simulate(document,"_blank")});q.setAttribute("id","btnDownload");q.className="geBtn";c.appendChild(q);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var E=document.createElement("input");E.setAttribute("multiple","multiple");E.setAttribute("type","file");mxEvent.addListener(E,"change",function(c){C=!1;
+b.importFiles(E.files,0,0,b.maxImageSize,function(b,f,d,e,l,m,g,k,p){null!=E.files&&(F(c)(b,f,d,e,l,m,g,k,p),E.type="",E.type="file",E.value="")});u.scrollTop=u.scrollHeight});E.style.display="none";document.body.appendChild(E);b.libDlgFileInputElt=E}q=mxUtils.button(mxResources.get("import"),function(){null!=y&&(y(),y=null);b.libDlgFileInputElt.click()});q.setAttribute("id","btnAddImage");q.className="geBtn";c.appendChild(q)}q=mxUtils.button(mxResources.get("addImages"),function(){null!=y&&(y(),
y=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(b,c,d){C=!1;if(null!=b){if("data:image/"==b.substring(0,11)){var e=b.indexOf(",");0<e&&(b=b.substring(0,e)+";base64,"+b.substring(e+1))}f(b,null,0,0,c,d);u.scrollTop=u.scrollHeight}})});q.setAttribute("id","btnAddImageUrl");q.className="geBtn";c.appendChild(q);this.saveBtnClickHandler=function(c,f,d,e){b.saveLibrary(c,f,d,e)};q=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=y&&(y(),y=null);this.saveBtnClickHandler(t.value,
p,g,k)}));q.setAttribute("id","btnSave");q.className="geBtn gePrimaryBtn";c.appendChild(q);b.editor.cancelFirst||c.appendChild(e);d.appendChild(c);this.container=d},EditShapeDialog=function(b,e,d,c,g){c=null!=c?c:300;g=null!=g?g:120;var k,n,f=document.createElement("table"),l=document.createElement("tbody");f.style.cellPadding="4px";k=document.createElement("tr");n=document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";mxUtils.write(n,d);k.appendChild(n);l.appendChild(k);
k=document.createElement("tr");n=document.createElement("td");var m=document.createElement("textarea");m.style.outline="none";m.style.resize="none";m.style.width=c-200+"px";m.style.height=g+"px";this.textarea=m;this.init=function(){m.focus();m.scrollTop=0};n.appendChild(m);k.appendChild(n);n=document.createElement("td");d=document.createElement("div");d.style.position="relative";d.style.border="1px solid gray";d.style.top="6px";d.style.width="200px";d.style.height=g+4+"px";d.style.overflow="hidden";
@@ -10174,44 +10196,44 @@ n.setAttribute("colspan","2");n.style.paddingTop="2px";n.style.whiteSpace="nowra
l=l.documentElement.getElementsByTagName("parsererror");if(null!=l&&0<l.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(d&&b.hideDialog(),l=!c.model.contains(f),!d||l||e!=t){e=Graph.compress(e);c.getModel().beginUpdate();try{if(l){var g=b.editor.graph.getFreeInsertPoint();f.geometry.x=g.x;f.geometry.y=g.y;c.addCell(f)}c.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+e+")",[f])}catch(C){throw C;}finally{c.getModel().endUpdate()}l&&
(c.setSelectionCell(f),c.scrollCellToVisible(f))}};d=mxUtils.button(mxResources.get("preview"),function(){u(p,q,!1)});d.className="geBtn";n.appendChild(d);d=mxUtils.button(mxResources.get("apply"),function(){u(b.editor.graph,e,!0)});d.className="geBtn gePrimaryBtn";n.appendChild(d);b.editor.cancelFirst||n.appendChild(g);k.appendChild(n);l.appendChild(k);f.appendChild(l);this.container=f},CustomDialog=function(b,e,d,c,g,k,n,f,l,m){var p=document.createElement("div");p.appendChild(e);e=document.createElement("div");
e.style.marginTop="30px";e.style.textAlign="center";null!=n&&e.appendChild(n);b.isOffline()||null==k||(n=mxUtils.button(mxResources.get("help"),function(){b.openLink(k)}),n.className="geBtn",e.appendChild(n));l=mxUtils.button(l||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});l.className="geBtn";f&&(l.style.display="none");b.editor.cancelFirst&&e.appendChild(l);g=mxUtils.button(g||mxResources.get("ok"),mxUtils.bind(this,function(){m||b.hideDialog(null,null,this.container);if(null!=
-d){var c=d();if("string"===typeof c){b.showError(mxResources.get("error"),c);return}}m&&b.hideDialog(null,null,this.container)}));e.appendChild(g);g.className="geBtn gePrimaryBtn";b.editor.cancelFirst||e.appendChild(l);p.appendChild(e);this.cancelBtn=l;this.okButton=g;this.container=p},TemplatesDialog=function(b,e,d,c,g,k,n,f,l,m,p,q,t,u,v){function x(b){R.innerHTML=mxUtils.htmlEntities(b);R.style.display="block";setTimeout(function(){R.style.display="none"},4E3)}function A(){null!=T&&(T.style.fontWeight=
-"normal",T.style.textDecoration="none",Q=T,T=null)}function z(b,c,f,d,e,l,m){if(-1<b.className.indexOf("geTempDlgRadioBtnActive"))return!1;b.className+=" geTempDlgRadioBtnActive";G.querySelector(".geTempDlgRadioBtn[data-id="+d+"]").className="geTempDlgRadioBtn "+(m?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");G.querySelector("."+c).src="/images/"+f+"-sel.svg";G.querySelector("."+e).src="/images/"+l+".svg";return!0}function y(c,f,d,e){function m(c,f){if(null==k){var d=c,d=/^https?:\/\//.test(d)&&
+d){var c=d();if("string"===typeof c){b.showError(mxResources.get("error"),c);return}}m&&b.hideDialog(null,null,this.container)}));e.appendChild(g);g.className="geBtn gePrimaryBtn";b.editor.cancelFirst||e.appendChild(l);p.appendChild(e);this.cancelBtn=l;this.okButton=g;this.container=p},TemplatesDialog=function(b,e,d,c,g,k,n,f,l,m,p,q,t,u,v){function x(b){S.innerHTML=mxUtils.htmlEntities(b);S.style.display="block";setTimeout(function(){S.style.display="none"},4E3)}function B(){null!=R&&(R.style.fontWeight=
+"normal",R.style.textDecoration="none",Q=R,R=null)}function A(b,c,f,d,e,l,m){if(-1<b.className.indexOf("geTempDlgRadioBtnActive"))return!1;b.className+=" geTempDlgRadioBtnActive";G.querySelector(".geTempDlgRadioBtn[data-id="+d+"]").className="geTempDlgRadioBtn "+(m?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");G.querySelector("."+c).src="/images/"+f+"-sel.svg";G.querySelector("."+e).src="/images/"+l+".svg";return!0}function y(c,f,d,e){function m(c,f){if(null==k){var d=c,d=/^https?:\/\//.test(d)&&
!b.editor.isCorsEnabledForUrl(d)?PROXY_URL+"?url="+encodeURIComponent(d):TEMPLATE_PATH+"/"+d;mxUtils.get(d,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(k=b.getText());f(k)}))}else f(k)}function g(d,e,l){if(null!=d&&mxUtils.isAncestorNode(document.body,f)&&(d=mxUtils.parseXml(d),d=Editor.extractGraphModel(d.documentElement,!0),null!=d)){"mxfile"==d.nodeName&&(d=Editor.parseDiagramNode(d.getElementsByTagName("diagram")[0]));var m=new mxCodec(d.ownerDocument),g=new mxGraphModel;
m.decode(d,g);d=g.root.getChildAt(0).children||[];b.sidebar.createTooltip(f,d,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=c.title?mxResources.get(c.title,null,c.title):null,!0,new mxPoint(e,l),!0,null,!0);var k=document.createElement("div");k.className="geTempDlgDialogMask";G.appendChild(k);var p=b.sidebar.hideTooltip;b.sidebar.hideTooltip=
-function(){k&&(G.removeChild(k),k=null,p.apply(this,arguments),b.sidebar.hideTooltip=p)};mxEvent.addListener(k,"click",function(){b.sidebar.hideTooltip()})}}var k=null;if(X||b.sidebar.currentElt==f)b.sidebar.hideTooltip();else{var p=function(c){X&&b.sidebar.currentElt==f&&g(c,mxEvent.getClientX(e),mxEvent.getClientY(e));X=!1;d.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=f;X=!0;d.src="/images/aui-wait.gif";c.isExt?l(c,p,function(){x(mxResources.get("cantLoadPrev"));
-X=!1;d.src="/images/icon-search.svg"}):m(c.url,p)}}function B(b,c,f){if(null!=Y){for(var d=Y.className.split(" "),e=0;e<d.length;e++)if(-1<d[e].indexOf("Active")){d.splice(e,1);break}Y.className=d.join(" ")}null!=b?(Y=b,Y.className+=" "+c,ga=f,ka.className="geTempDlgCreateBtn"):(ga=Y=null,ka.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function C(c,f){if(null!=ga){var d=function(c){t.isExternal?l(t,function(b){g(b,c)},k):t.url?mxUtils.get(TEMPLATE_PATH+"/"+t.url,mxUtils.bind(this,function(b){200<=
-b.getStatus()&&299>=b.getStatus()?g(b.getText(),c):k()})):g(b.emptyDiagramXml,c)},g=function(c,d){v||b.hideDialog(!0);e(c,d,t,f)},k=function(){x(mxResources.get("cannotLoad"));p()},p=function(){ga=t;ka.className="geTempDlgCreateBtn";f&&(pa.className="geTempDlgOpenBtn")},t=ga;ga=null;"boolean"!==typeof f&&(f=t.isExternal&&q);if(1==c)m(t.url,t);else if(f)pa.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",d();else{ka.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy";
-var n=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),n=new FilenameDialog(b,b.defaultFilename+".drawio",mxResources.get("ok"),d,n,function(b){var c=null!=b&&0<b.length;return c&&v?(d(b),!1):c},null,null,null,p,u?null:[]);b.showDialog(n.container,350,80,!0,!0);n.init()}}}function E(b){ka.innerHTML=mxUtils.htmlEntities(mxResources.get(S||b?"create":"copy"));b=b?"none":"";q&&(pa.style.display=b);for(var c=G.querySelectorAll(".geTempDlgLinkToDiagram"),
-f=0;f<c.length;f++)c[f].style.display=b}function F(c,f,d,e,l){l||(U.innerHTML="",B(),Z=c,ja=e);var m=null;if(d){m=document.createElement("table");m.className="geTempDlgDiagramsListGrid";var g=document.createElement("tr"),k=document.createElement("th");k.style.width="50%";k.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram"));g.appendChild(k);k=document.createElement("th");k.style.width="25%";k.innerHTML=mxUtils.htmlEntities(mxResources.get("changedBy"));g.appendChild(k);k=document.createElement("th");
-k.style.width="25%";k.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn"));g.appendChild(k);m.appendChild(g);U.appendChild(m)}for(g=0;g<c.length;g++){c[g].isExternal=!f;var p=c[g].url,q=(k=mxUtils.htmlEntities(f?mxResources.get(c[g].title,null,c[g].title):c[g].title))||c[g].url,t=c[g].imgUrl,n=mxUtils.htmlEntities(c[g].changedBy||""),O="";c[g].lastModifiedOn&&(O=b.timeSince(new Date(c[g].lastModifiedOn)),null==O&&(O=mxResources.get("lessThanAMinute")),O=mxUtils.htmlEntities(mxResources.get("timeAgo",
-[O],"{1} ago")));t||(t=TEMPLATE_PATH+"/"+p.substring(0,p.length-4)+".png");p=d?50:15;null!=k&&k.length>p&&(k=k.substring(0,p)+"&hellip;");if(d){var u=document.createElement("tr"),t=document.createElement("td"),v=document.createElement("img");v.src="/images/icon-search.svg";v.className="geTempDlgDiagramListPreviewBtn";v.setAttribute("title",mxResources.get("preview"));l||t.appendChild(v);q=document.createElement("span");q.className="geTempDlgDiagramTitle";q.innerHTML=k;t.appendChild(q);u.appendChild(t);
-t=document.createElement("td");t.innerHTML=n;u.appendChild(t);t=document.createElement("td");t.innerHTML=O;u.appendChild(t);m.appendChild(u);null==Y&&(E(f),B(u,"geTempDlgDiagramsListGridActive",c[g]));(function(b,c,d){mxEvent.addListener(u,"click",function(){Y!=c&&(E(f),B(c,"geTempDlgDiagramsListGridActive",b))});mxEvent.addListener(u,"dblclick",C);mxEvent.addListener(v,"click",function(f){y(b,c,d,f)})})(c[g],u,v)}else{var G=document.createElement("div");G.className="geTempDlgDiagramTile";G.setAttribute("title",
-q);null==Y&&(E(f),B(G,"geTempDlgDiagramTileActive",c[g]));n=document.createElement("div");n.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var A=document.createElement("img");A.style.display="none";(function(b,c,f){A.onload=function(){c.className="geTempDlgDiagramTileImg";b.style.display=""};A.onerror=function(){this.src!=f?this.src=f:c.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(A,n,t?t.replace(".drawio.xml","").replace(".drawio","").replace(".xml",""):
-"");A.src=t;n.appendChild(A);G.appendChild(n);n=document.createElement("div");n.className="geTempDlgDiagramTileLbl";n.innerHTML=null!=k?k:"";G.appendChild(n);v=document.createElement("img");v.src="/images/icon-search.svg";v.className="geTempDlgDiagramPreviewBtn";v.setAttribute("title",mxResources.get("preview"));l||G.appendChild(v);(function(b,c,d){mxEvent.addListener(G,"click",function(){Y!=c&&(E(f),B(c,"geTempDlgDiagramTileActive",b))});mxEvent.addListener(G,"dblclick",C);mxEvent.addListener(v,
-"click",function(f){y(b,c,d,f)})})(c[g],G,v);U.appendChild(G)}}for(var J in e)c=e[J],0<c.length&&(l=document.createElement("div"),l.className="geTempDlgImportCat",l.innerHTML=mxResources.get(J,null,J),U.appendChild(l),F(c,f,d,null,!0))}function I(b,c){ea.innerHTML="";B();for(var f=Math.floor(ea.offsetWidth/150)-1,d=!c&&b.length>f?f:b.length,e=0;e<d;e++){var l=b[e];l.isCategory=!0;var m=document.createElement("div"),g=mxResources.get(l.title);null==g&&(g=l.title.substring(0,1).toUpperCase()+l.title.substring(1));
-m.className="geTempDlgNewDiagramCatItem";m.setAttribute("title",g);g=mxUtils.htmlEntities(g);15<g.length&&(g=g.substring(0,15)+"&hellip;");null==Y&&(E(!0),B(m,"geTempDlgNewDiagramCatItemActive",l));var k=document.createElement("div");k.className="geTempDlgNewDiagramCatItemImg";var p=document.createElement("img");p.src=NEW_DIAGRAM_CATS_PATH+"/"+l.img;k.appendChild(p);m.appendChild(k);k=document.createElement("div");k.className="geTempDlgNewDiagramCatItemLbl";k.innerHTML=g;m.appendChild(k);ea.appendChild(m);
-(function(b,c){mxEvent.addListener(m,"click",function(){Y!=c&&(E(!0),B(c,"geTempDlgNewDiagramCatItemActive",b))});mxEvent.addListener(m,"dblclick",C)})(l,m)}m=document.createElement("div");m.className="geTempDlgNewDiagramCatItem";g=mxResources.get("showAllTemps");m.setAttribute("title",g);k=document.createElement("div");k.className="geTempDlgNewDiagramCatItemImg";k.innerHTML="...";k.style.fontSize="32px";m.appendChild(k);k=document.createElement("div");k.className="geTempDlgNewDiagramCatItemLbl";
-k.innerHTML=g;m.appendChild(k);ea.appendChild(m);mxEvent.addListener(m,"click",function(){function b(){var f=c.querySelector(".geTemplateDrawioCatLink");null!=f?f.click():setTimeout(b,200)}S=!0;var c=G.querySelector(".geTemplatesList");c.style.display="block";na.style.width="";oa.style.display="";oa.value="";da=null;b()});la.style.display=b.length<=f?"none":""}function D(b,c,f){function d(b,c){var f=mxResources.get(b);null==f&&(f=b.substring(0,1).toUpperCase()+b.substring(1));var d=f+" ("+c.length+
-")",e=f=mxUtils.htmlEntities(f);15<f.length&&(f=f.substring(0,15)+"&hellip;");return{lbl:f+" ("+c.length+")",fullLbl:d,lblOnly:e}}function e(f,d,e,l,m){mxEvent.addListener(e,"click",function(){T!=e&&(null!=T?(T.style.fontWeight="normal",T.style.textDecoration="none"):(ca.style.display="none",V.style.minHeight="100%"),T=e,T.style.fontWeight="bold",T.style.textDecoration="underline",na.scrollTop=0,J&&(W=!0),fa.innerHTML=d,ia.style.display="none",F(m?c[f]:l?xa[f][l]:b[f],m?!1:!0))})}var l=G.querySelector(".geTemplatesList");
+function(){k&&(G.removeChild(k),k=null,p.apply(this,arguments),b.sidebar.hideTooltip=p)};mxEvent.addListener(k,"click",function(){b.sidebar.hideTooltip()})}}var k=null;if(Y||b.sidebar.currentElt==f)b.sidebar.hideTooltip();else{var p=function(c){Y&&b.sidebar.currentElt==f&&g(c,mxEvent.getClientX(e),mxEvent.getClientY(e));Y=!1;d.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=f;Y=!0;d.src="/images/aui-wait.gif";c.isExt?l(c,p,function(){x(mxResources.get("cantLoadPrev"));
+Y=!1;d.src="/images/icon-search.svg"}):m(c.url,p)}}function z(b,c,f){if(null!=X){for(var d=X.className.split(" "),e=0;e<d.length;e++)if(-1<d[e].indexOf("Active")){d.splice(e,1);break}X.className=d.join(" ")}null!=b?(X=b,X.className+=" "+c,ha=f,ka.className="geTempDlgCreateBtn"):(ha=X=null,ka.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function C(c,f){if(null!=ha){var d=function(c){t.isExternal?l(t,function(b){g(b,c)},k):t.url?mxUtils.get(TEMPLATE_PATH+"/"+t.url,mxUtils.bind(this,function(b){200<=
+b.getStatus()&&299>=b.getStatus()?g(b.getText(),c):k()})):g(b.emptyDiagramXml,c)},g=function(c,d){v||b.hideDialog(!0);e(c,d,t,f)},k=function(){x(mxResources.get("cannotLoad"));p()},p=function(){ha=t;ka.className="geTempDlgCreateBtn";f&&(pa.className="geTempDlgOpenBtn")},t=ha;ha=null;"boolean"!==typeof f&&(f=t.isExternal&&q);if(1==c)m(t.url,t);else if(f)pa.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",d();else{ka.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy";
+var n=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),n=new FilenameDialog(b,b.defaultFilename+".drawio",mxResources.get("ok"),d,n,function(b){var c=null!=b&&0<b.length;return c&&v?(d(b),!1):c},null,null,null,p,u?null:[]);b.showDialog(n.container,350,80,!0,!0);n.init()}}}function F(b){ka.innerHTML=mxUtils.htmlEntities(mxResources.get(T||b?"create":"copy"));b=b?"none":"";q&&(pa.style.display=b);for(var c=G.querySelectorAll(".geTempDlgLinkToDiagram"),
+f=0;f<c.length;f++)c[f].style.display=b}function E(c,f,d,e,l){l||(U.innerHTML="",z(),Z=c,ja=e);var m=null;if(d){m=document.createElement("table");m.className="geTempDlgDiagramsListGrid";var g=document.createElement("tr"),k=document.createElement("th");k.style.width="50%";k.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram"));g.appendChild(k);k=document.createElement("th");k.style.width="25%";k.innerHTML=mxUtils.htmlEntities(mxResources.get("changedBy"));g.appendChild(k);k=document.createElement("th");
+k.style.width="25%";k.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn"));g.appendChild(k);m.appendChild(g);U.appendChild(m)}for(g=0;g<c.length;g++){c[g].isExternal=!f;var p=c[g].url,q=(k=mxUtils.htmlEntities(f?mxResources.get(c[g].title,null,c[g].title):c[g].title))||c[g].url,t=c[g].imgUrl,n=mxUtils.htmlEntities(c[g].changedBy||""),P="";c[g].lastModifiedOn&&(P=b.timeSince(new Date(c[g].lastModifiedOn)),null==P&&(P=mxResources.get("lessThanAMinute")),P=mxUtils.htmlEntities(mxResources.get("timeAgo",
+[P],"{1} ago")));t||(t=TEMPLATE_PATH+"/"+p.substring(0,p.length-4)+".png");p=d?50:15;null!=k&&k.length>p&&(k=k.substring(0,p)+"&hellip;");if(d){var u=document.createElement("tr"),t=document.createElement("td"),v=document.createElement("img");v.src="/images/icon-search.svg";v.className="geTempDlgDiagramListPreviewBtn";v.setAttribute("title",mxResources.get("preview"));l||t.appendChild(v);q=document.createElement("span");q.className="geTempDlgDiagramTitle";q.innerHTML=k;t.appendChild(q);u.appendChild(t);
+t=document.createElement("td");t.innerHTML=n;u.appendChild(t);t=document.createElement("td");t.innerHTML=P;u.appendChild(t);m.appendChild(u);null==X&&(F(f),z(u,"geTempDlgDiagramsListGridActive",c[g]));(function(b,c,d){mxEvent.addListener(u,"click",function(){X!=c&&(F(f),z(c,"geTempDlgDiagramsListGridActive",b))});mxEvent.addListener(u,"dblclick",C);mxEvent.addListener(v,"click",function(f){y(b,c,d,f)})})(c[g],u,v)}else{var G=document.createElement("div");G.className="geTempDlgDiagramTile";G.setAttribute("title",
+q);null==X&&(F(f),z(G,"geTempDlgDiagramTileActive",c[g]));n=document.createElement("div");n.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var B=document.createElement("img");B.style.display="none";(function(b,c,f){B.onload=function(){c.className="geTempDlgDiagramTileImg";b.style.display=""};B.onerror=function(){this.src!=f?this.src=f:c.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(B,n,t?t.replace(".drawio.xml","").replace(".drawio","").replace(".xml",""):
+"");B.src=t;n.appendChild(B);G.appendChild(n);n=document.createElement("div");n.className="geTempDlgDiagramTileLbl";n.innerHTML=null!=k?k:"";G.appendChild(n);v=document.createElement("img");v.src="/images/icon-search.svg";v.className="geTempDlgDiagramPreviewBtn";v.setAttribute("title",mxResources.get("preview"));l||G.appendChild(v);(function(b,c,d){mxEvent.addListener(G,"click",function(){X!=c&&(F(f),z(c,"geTempDlgDiagramTileActive",b))});mxEvent.addListener(G,"dblclick",C);mxEvent.addListener(v,
+"click",function(f){y(b,c,d,f)})})(c[g],G,v);U.appendChild(G)}}for(var J in e)c=e[J],0<c.length&&(l=document.createElement("div"),l.className="geTempDlgImportCat",l.innerHTML=mxResources.get(J,null,J),U.appendChild(l),E(c,f,d,null,!0))}function H(b,c){ea.innerHTML="";z();for(var f=Math.floor(ea.offsetWidth/150)-1,d=!c&&b.length>f?f:b.length,e=0;e<d;e++){var l=b[e];l.isCategory=!0;var m=document.createElement("div"),g=mxResources.get(l.title);null==g&&(g=l.title.substring(0,1).toUpperCase()+l.title.substring(1));
+m.className="geTempDlgNewDiagramCatItem";m.setAttribute("title",g);g=mxUtils.htmlEntities(g);15<g.length&&(g=g.substring(0,15)+"&hellip;");null==X&&(F(!0),z(m,"geTempDlgNewDiagramCatItemActive",l));var k=document.createElement("div");k.className="geTempDlgNewDiagramCatItemImg";var p=document.createElement("img");p.src=NEW_DIAGRAM_CATS_PATH+"/"+l.img;k.appendChild(p);m.appendChild(k);k=document.createElement("div");k.className="geTempDlgNewDiagramCatItemLbl";k.innerHTML=g;m.appendChild(k);ea.appendChild(m);
+(function(b,c){mxEvent.addListener(m,"click",function(){X!=c&&(F(!0),z(c,"geTempDlgNewDiagramCatItemActive",b))});mxEvent.addListener(m,"dblclick",C)})(l,m)}m=document.createElement("div");m.className="geTempDlgNewDiagramCatItem";g=mxResources.get("showAllTemps");m.setAttribute("title",g);k=document.createElement("div");k.className="geTempDlgNewDiagramCatItemImg";k.innerHTML="...";k.style.fontSize="32px";m.appendChild(k);k=document.createElement("div");k.className="geTempDlgNewDiagramCatItemLbl";
+k.innerHTML=g;m.appendChild(k);ea.appendChild(m);mxEvent.addListener(m,"click",function(){function b(){var f=c.querySelector(".geTemplateDrawioCatLink");null!=f?f.click():setTimeout(b,200)}T=!0;var c=G.querySelector(".geTemplatesList");c.style.display="block";na.style.width="";oa.style.display="";oa.value="";da=null;b()});la.style.display=b.length<=f?"none":""}function D(b,c,f){function d(b,c){var f=mxResources.get(b);null==f&&(f=b.substring(0,1).toUpperCase()+b.substring(1));var d=f+" ("+c.length+
+")",e=f=mxUtils.htmlEntities(f);15<f.length&&(f=f.substring(0,15)+"&hellip;");return{lbl:f+" ("+c.length+")",fullLbl:d,lblOnly:e}}function e(f,d,e,l,m){mxEvent.addListener(e,"click",function(){R!=e&&(null!=R?(R.style.fontWeight="normal",R.style.textDecoration="none"):(ca.style.display="none",V.style.minHeight="100%"),R=e,R.style.fontWeight="bold",R.style.textDecoration="underline",na.scrollTop=0,J&&(W=!0),fa.innerHTML=d,ia.style.display="none",E(m?c[f]:l?xa[f][l]:b[f],m?!1:!0))})}var l=G.querySelector(".geTemplatesList");
if(0<f){f=document.createElement("div");f.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(f,mxResources.get("custom"));l.appendChild(f);for(var m in c){f=document.createElement("div");var g=c[m],g=d(m,g);f.className="geTemplateCatLink";f.setAttribute("title",g.fullLbl);f.innerHTML=g.lbl;l.appendChild(f);e(m,g.lblOnly,f,null,!0)}f=document.createElement("div");f.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";
-mxUtils.write(f,"draw.io");l.appendChild(f)}for(m in b){var k=xa[m],p=f=document.createElement(k?"ul":"div"),g=b[m],g=d(m,g);if(null!=k){var q=document.createElement("li"),t=document.createElement("div");t.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";t.style.padding="0";t.setAttribute("title",g.fullLbl);t.innerHTML=g.lbl;p=t;q.appendChild(t);var n=document.createElement("ul");n.className="geTempTreeNested";n.style.visibility="hidden";for(var y in k){var O=document.createElement("li"),
-u=d(y,k[y]);O.setAttribute("title",u.fullLbl);O.innerHTML=u.lbl;O.className="geTemplateCatLink";O.style.padding="0";O.style.margin="0";e(m,u.lblOnly,O,y);n.appendChild(O)}q.appendChild(n);f.className="geTempTree";f.appendChild(q);(function(b,c){mxEvent.addListener(c,"click",function(){for(var f=b.querySelectorAll("li"),d=0;d<f.length;d++)f[d].style.margin="";b.style.visibility="visible";b.classList.toggle("geTempTreeActive");b.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var c=
-0;c<f.length;c++)f[c].style.margin="0";b.style.visibility="hidden"},250);c.classList.toggle("geTempTreeCaret-down")})})(n,t)}else f.className="geTemplateCatLink geTemplateDrawioCatLink",f.setAttribute("title",g.fullLbl),f.innerHTML=g.lbl;l.appendChild(f);e(m,g.lblOnly,p)}}function H(){mxUtils.get(c,function(b){if(!ta){ta=!0;b=b.getXml().documentElement.firstChild;for(var c={};null!=b;){if("undefined"!==typeof b.getAttribute)if("clibs"==b.nodeName){for(var f=b.getAttribute("name"),d=b.getElementsByTagName("add"),
+mxUtils.write(f,"draw.io");l.appendChild(f)}for(m in b){var k=xa[m],p=f=document.createElement(k?"ul":"div"),g=b[m],g=d(m,g);if(null!=k){var q=document.createElement("li"),t=document.createElement("div");t.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";t.style.padding="0";t.setAttribute("title",g.fullLbl);t.innerHTML=g.lbl;p=t;q.appendChild(t);var n=document.createElement("ul");n.className="geTempTreeNested";n.style.visibility="hidden";for(var y in k){var P=document.createElement("li"),
+u=d(y,k[y]);P.setAttribute("title",u.fullLbl);P.innerHTML=u.lbl;P.className="geTemplateCatLink";P.style.padding="0";P.style.margin="0";e(m,u.lblOnly,P,y);n.appendChild(P)}q.appendChild(n);f.className="geTempTree";f.appendChild(q);(function(b,c){mxEvent.addListener(c,"click",function(){for(var f=b.querySelectorAll("li"),d=0;d<f.length;d++)f[d].style.margin="";b.style.visibility="visible";b.classList.toggle("geTempTreeActive");b.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var c=
+0;c<f.length;c++)f[c].style.margin="0";b.style.visibility="hidden"},250);c.classList.toggle("geTempTreeCaret-down")})})(n,t)}else f.className="geTemplateCatLink geTemplateDrawioCatLink",f.setAttribute("title",g.fullLbl),f.innerHTML=g.lbl;l.appendChild(f);e(m,g.lblOnly,p)}}function I(){mxUtils.get(c,function(b){if(!ta){ta=!0;b=b.getXml().documentElement.firstChild;for(var c={};null!=b;){if("undefined"!==typeof b.getAttribute)if("clibs"==b.nodeName){for(var f=b.getAttribute("name"),d=b.getElementsByTagName("add"),
e=[],l=0;l<d.length;l++)e.push(encodeURIComponent(mxUtils.getTextContent(d[l])));null!=f&&0<e.length&&(c[f]=e.join(";"))}else if(e=b.getAttribute("url"),null!=e){d=b.getAttribute("section");f=b.getAttribute("subsection");if(null==d&&(l=e.indexOf("/"),d=e.substring(0,l),null==f)){var m=e.indexOf("/",l+1);-1<m&&(f=e.substring(l+1,m))}l=qa[d];null==l&&(za++,l=[],qa[d]=l);e=b.getAttribute("clibs");null!=c[e]&&(e=c[e]);e={url:b.getAttribute("url"),libs:b.getAttribute("libs"),title:b.getAttribute("title")||
b.getAttribute("name"),preview:b.getAttribute("preview"),clibs:e,tags:b.getAttribute("tags")};l.push(e);null!=f&&(l=xa[d],null==l&&(l={},xa[d]=l),d=l[f],null==d&&(d=[],l[f]=d),d.push(e))}b=b.nextSibling}D(qa,ya,va)}})}function K(b){n&&(na.scrollTop=0,U.innerHTML="",ma.spin(U),W=!1,J=!0,fa.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),da=null,n(wa,function(){x(mxResources.get("cannotLoad"));wa([])},b?null:k))}function M(b){if(""==b)null!=Q&&(Q.click(),Q=null);else{if(null==TemplatesDialog.tagsList[c]){var f=
{},d;for(d in qa)for(var e=qa[d],l=0;l<e.length;l++){var m=e[l];if(null!=m.tags)for(var g=m.tags.toLowerCase().split(";"),k=0;k<g.length;k++)null==f[g[k]]&&(f[g[k]]=[]),f[g[k]].push(m)}TemplatesDialog.tagsList[c]=f}var p=b.toLowerCase().split(" "),f=TemplatesDialog.tagsList[c];if(0<va&&null==f.__tagsList__){for(d in ya)for(e=ya[d],l=0;l<e.length;l++)for(m=e[l],g=m.title.split(" "),g.push(d),k=0;k<g.length;k++){var q=g[k].toLowerCase();null==f[q]&&(f[q]=[]);f[q].push(m)}f.__tagsList__=!0}d=[];e={};
-for(l=g=0;l<p.length;l++)if(0<p[l].length){var q=f[p[l]],t={};d=[];if(null!=q)for(k=0;k<q.length;k++)m=q[k],0==g==(null==e[m.url])&&(t[m.url]=!0,d.push(m));e=t;g++}0==d.length?fa.innerHTML=mxResources.get("noResultsFor",[b]):F(d,!0)}}function L(b){if(da!=b||ba!=N)A(),na.scrollTop=0,U.innerHTML="",fa.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(b)+'"',sa=null,S?M(b):f&&(b?(ma.spin(U),W=!1,J=!0,f(b,wa,function(){x(mxResources.get("searchFailed"));wa([])},
-ba?null:k)):K(ba)),da=b,N=ba}function P(b){null!=sa&&clearTimeout(sa);13==b.keyCode?L(oa.value):sa=setTimeout(function(){L(oa.value)},1E3)}var O='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(f?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">&lt; '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+
+for(l=g=0;l<p.length;l++)if(0<p[l].length){var q=f[p[l]],t={};d=[];if(null!=q)for(k=0;k<q.length;k++)m=q[k],0==g==(null==e[m.url])&&(t[m.url]=!0,d.push(m));e=t;g++}0==d.length?fa.innerHTML=mxResources.get("noResultsFor",[b]):E(d,!0)}}function L(b){if(da!=b||aa!=O)B(),na.scrollTop=0,U.innerHTML="",fa.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(b)+'"',sa=null,T?M(b):f&&(b?(ma.spin(U),W=!1,J=!0,f(b,wa,function(){x(mxResources.get("searchFailed"));wa([])},
+aa?null:k)):K(aa)),da=b,O=aa}function N(b){null!=sa&&clearTimeout(sa);13==b.keyCode?L(oa.value):sa=setTimeout(function(){L(oa.value)},1E3)}var P='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(f?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">&lt; '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+
mxResources.get("templates")+'</div></div><div class="geTempDlgContent" style="width: 100%"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+mxResources.get("newDiagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showMore")+'</div></div></div><div class="geTempDlgDiagramsList"><div class="geTempDlgDiagramsListHeader"><div class="geTempDlgDiagramsListTitle"></div><div class="geTempDlgDiagramsListBtns"><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge" data-id="myDiagramsBtn"><img src="/images/my-diagrams.svg" class="geTempDlgMyDiagramsBtnImg"> <span>'+
mxResources.get("myDiagrams")+'</span></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge geTempDlgRadioBtnActive" data-id="allDiagramsBtn"><img src="/images/all-diagrams-sel.svg" class="geTempDlgAllDiagramsBtnImg"> <span>'+mxResources.get("allDiagrams")+'</span></div><div class="geTempDlgSpacer"> </div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall geTempDlgRadioBtnActive" data-id="tilesBtn"><img src="/images/tiles-sel.svg" class="geTempDlgTilesBtnImg"></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall" data-id="listBtn"><img src="/images/list.svg" class="geTempDlgListBtnImg"></div></div></div><div class="geTempDlgDiagramsTiles"></div></div></div><br style="clear:both;"/><div class="geTempDlgFooter"><div class="geTempDlgErrMsg"></div>'+
-(t?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(q?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",G=document.createElement("div");G.innerHTML=O;G.className=
-"geTemplateDlg";this.container=G;c=null!=c?c:TEMPLATE_PATH+"/index.xml";g=null!=g?g:NEW_DIAGRAM_CATS_PATH+"/index.xml";var J=!1,W=!1,T=null,Q=null,Y=null,ga=null,ha=!1,ba=!0,aa=!1,Z=[],ja=null,da,N,S=!1,la=G.querySelector(".geTempDlgShowAllBtn"),U=G.querySelector(".geTempDlgDiagramsTiles"),fa=G.querySelector(".geTempDlgDiagramsListTitle"),ia=G.querySelector(".geTempDlgDiagramsListBtns"),na=G.querySelector(".geTempDlgContent"),V=G.querySelector(".geTempDlgDiagramsList"),ca=G.querySelector(".geTempDlgNewDiagramCat"),
-ea=G.querySelector(".geTempDlgNewDiagramCatList"),ka=G.querySelector(".geTempDlgCreateBtn"),pa=G.querySelector(".geTempDlgOpenBtn"),oa=G.querySelector(".geTempDlgSearchBox"),R=G.querySelector(".geTempDlgErrMsg"),ma=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(G.querySelector(".geTempDlgBack"),"click",function(){A();S=!1;G.querySelector(".geTemplatesList").style.display="none";na.style.width=
-"100%";ca.style.display="";V.style.minHeight="calc(100% - 280px)";oa.style.display=f?"":"none";oa.value="";da=null;K(ba)});mxEvent.addListener(G.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){z(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(ba=!0,null==da?K(ba):L(da))});mxEvent.addListener(G.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){z(this,"geTempDlgMyDiagramsBtnImg",
-"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(ba=!1,null==da?K(ba):L(da))});mxEvent.addListener(G.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){z(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(aa=!0,F(Z,!1,aa,ja))});mxEvent.addListener(G.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){z(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(aa=!1,F(Z,!1,
-aa,ja))});var X=!1;mxEvent.addListener(la,"click",function(){ha?(ca.style.height="280px",ea.style.height="190px",la.innerHTML=mxUtils.htmlEntities(mxResources.get("showMore")),I(ua)):(ca.style.height="440px",ea.style.height="355px",la.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess")),I(ua,!0));ha=!ha});var ta=!1,ra=!1,qa={},xa={},ya={},ua=[],za=1,va=0;null!=p?p(function(b,c){ya=b;va=c;H()},H):H();mxUtils.get(g,function(b){if(!ra){ra=!0;for(b=b.getXml().documentElement.firstChild;null!=b;)"undefined"!==
-typeof b.getAttribute&&null!=b.getAttribute("title")&&ua.push({img:b.getAttribute("img"),libs:b.getAttribute("libs"),clibs:b.getAttribute("clibs"),title:b.getAttribute("title")}),b=b.nextSibling;I(ua)}});var wa=function(b,c,f){ia.style.display="";ma.stop();J=!1;if(W)W=!1;else if(c)U.innerHTML=c;else{f=f||{};c=0;for(var d in f)c+=f[d].length;0==b.length&&0==c?U.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):F(b,!1,aa,0==c?null:f)}};K(ba);var sa=null;mxEvent.addListener(oa,"keyup",P);
-mxEvent.addListener(oa,"search",P);mxEvent.addListener(oa,"input",P);mxEvent.addListener(ka,"click",function(b){C(!1,!1)});q&&mxEvent.addListener(pa,"click",function(b){C(!1,!0)});t&&mxEvent.addListener(G.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(b){C(!0)});mxEvent.addListener(G.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=d&&d();v||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
+(t?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(q?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",G=document.createElement("div");G.innerHTML=P;G.className=
+"geTemplateDlg";this.container=G;c=null!=c?c:TEMPLATE_PATH+"/index.xml";g=null!=g?g:NEW_DIAGRAM_CATS_PATH+"/index.xml";var J=!1,W=!1,R=null,Q=null,X=null,ha=null,ga=!1,aa=!0,ba=!1,Z=[],ja=null,da,O,T=!1,la=G.querySelector(".geTempDlgShowAllBtn"),U=G.querySelector(".geTempDlgDiagramsTiles"),fa=G.querySelector(".geTempDlgDiagramsListTitle"),ia=G.querySelector(".geTempDlgDiagramsListBtns"),na=G.querySelector(".geTempDlgContent"),V=G.querySelector(".geTempDlgDiagramsList"),ca=G.querySelector(".geTempDlgNewDiagramCat"),
+ea=G.querySelector(".geTempDlgNewDiagramCatList"),ka=G.querySelector(".geTempDlgCreateBtn"),pa=G.querySelector(".geTempDlgOpenBtn"),oa=G.querySelector(".geTempDlgSearchBox"),S=G.querySelector(".geTempDlgErrMsg"),ma=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(G.querySelector(".geTempDlgBack"),"click",function(){B();T=!1;G.querySelector(".geTemplatesList").style.display="none";na.style.width=
+"100%";ca.style.display="";V.style.minHeight="calc(100% - 280px)";oa.style.display=f?"":"none";oa.value="";da=null;K(aa)});mxEvent.addListener(G.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){A(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(aa=!0,null==da?K(aa):L(da))});mxEvent.addListener(G.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){A(this,"geTempDlgMyDiagramsBtnImg",
+"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(aa=!1,null==da?K(aa):L(da))});mxEvent.addListener(G.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){A(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(ba=!0,E(Z,!1,ba,ja))});mxEvent.addListener(G.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){A(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(ba=!1,E(Z,!1,
+ba,ja))});var Y=!1;mxEvent.addListener(la,"click",function(){ga?(ca.style.height="280px",ea.style.height="190px",la.innerHTML=mxUtils.htmlEntities(mxResources.get("showMore")),H(ua)):(ca.style.height="440px",ea.style.height="355px",la.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess")),H(ua,!0));ga=!ga});var ta=!1,ra=!1,qa={},xa={},ya={},ua=[],za=1,va=0;null!=p?p(function(b,c){ya=b;va=c;I()},I):I();mxUtils.get(g,function(b){if(!ra){ra=!0;for(b=b.getXml().documentElement.firstChild;null!=b;)"undefined"!==
+typeof b.getAttribute&&null!=b.getAttribute("title")&&ua.push({img:b.getAttribute("img"),libs:b.getAttribute("libs"),clibs:b.getAttribute("clibs"),title:b.getAttribute("title")}),b=b.nextSibling;H(ua)}});var wa=function(b,c,f){ia.style.display="";ma.stop();J=!1;if(W)W=!1;else if(c)U.innerHTML=c;else{f=f||{};c=0;for(var d in f)c+=f[d].length;0==b.length&&0==c?U.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):E(b,!1,ba,0==c?null:f)}};K(aa);var sa=null;mxEvent.addListener(oa,"keyup",N);
+mxEvent.addListener(oa,"search",N);mxEvent.addListener(oa,"input",N);mxEvent.addListener(ka,"click",function(b){C(!1,!1)});q&&mxEvent.addListener(pa,"click",function(b){C(!1,!0)});t&&mxEvent.addListener(G.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(b){C(!0)});mxEvent.addListener(G.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=d&&d();v||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
var BtnDialog=function(b,e,d,c){var g=document.createElement("div");g.style.textAlign="center";var k=document.createElement("p");k.style.fontSize="16pt";k.style.padding="0px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,mxResources.get("done"));var n="Unknown",f=document.createElement("img");f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.style.marginRight="10px";e==b.drive?(n=mxResources.get("googleDrive"),f.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?
(n=mxResources.get("dropbox"),f.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(n=mxResources.get("oneDrive"),f.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(n=mxResources.get("github"),f.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(n=mxResources.get("gitlab"),f.src=IMAGE_PATH+"/gitlab-logo.svg"):e==b.notion?(n=mxResources.get("notion"),f.src=IMAGE_PATH+"/notion-logo.svg"):e==b.trello&&(n=mxResources.get("trello"),f.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");
mxUtils.write(b,mxResources.get("authorizedIn",[n],"You are now authorized in {1}"));d=mxUtils.button(d,c);d.insertBefore(f,d.firstChild);d.style.marginTop="6px";d.className="geBigButton";d.style.fontSize="18px";d.style.padding="14px";g.appendChild(k);g.appendChild(b);g.appendChild(d);this.container=g},FontDialog=function(b,e,d,c,g){function k(b){this.style.border="";13==b.keyCode&&y.click()}var n,f,l,m=document.createElement("table"),p=document.createElement("tbody");m.style.marginTop="8px";n=document.createElement("tr");
@@ -10220,16 +10242,16 @@ null,"System Fonts"));f.appendChild(l);n.appendChild(f);p.appendChild(n);n=docum
n.appendChild(f);p.appendChild(n);n=document.createElement("tr");f=document.createElement("td");f.colSpan=2;f.style.whiteSpace="nowrap";f.style.fontSize="10pt";f.style.fontWeight="bold";var u=document.createElement("input");u.style.cssText="margin-right:8px;margin-bottom:8px;";u.setAttribute("value","googlefonts");u.setAttribute("type","radio");u.setAttribute("name","current-fontdialog");u.setAttribute("id","fontdialog-googlefonts");f.appendChild(u);l=document.createElement("label");l.setAttribute("for",
"fontdialog-googlefonts");mxUtils.write(l,mxResources.get("googleFonts",null,"Google Fonts"));f.appendChild(l);mxClient.IS_CHROMEAPP||b.isOffline()&&!EditorUi.isElectronApp||(l=b.menus.createHelpLink("https://fonts.google.com/"),l.getElementsByTagName("img")[0].setAttribute("valign","middle"),f.appendChild(l));n.appendChild(f);p.appendChild(n);n=document.createElement("tr");f=document.createElement("td");f.style.whiteSpace="nowrap";f.style.fontSize="10pt";f.style.width="120px";f.style.paddingLeft=
"15px";mxUtils.write(f,mxResources.get("fontname",null,"Font Name")+":");n.appendChild(f);var v=document.createElement("input");"g"==c&&v.setAttribute("value",e);v.style.marginLeft="4px";v.style.width="250px";v.className="dlg_fontName_g";f=document.createElement("td");f.appendChild(v);n.appendChild(f);p.appendChild(n);n=document.createElement("tr");f=document.createElement("td");f.colSpan=2;f.style.whiteSpace="nowrap";f.style.fontSize="10pt";f.style.fontWeight="bold";var x=document.createElement("input");
-x.style.cssText="margin-right:8px;margin-bottom:8px;";x.setAttribute("value","webfonts");x.setAttribute("type","radio");x.setAttribute("name","current-fontdialog");x.setAttribute("id","fontdialog-webfonts");f.appendChild(x);l=document.createElement("label");l.setAttribute("for","fontdialog-webfonts");mxUtils.write(l,mxResources.get("webfonts",null,"Web Fonts"));f.appendChild(l);n.appendChild(f);FontDialog.enableWebFonts&&p.appendChild(n);n=document.createElement("tr");f=document.createElement("td");
-f.style.whiteSpace="nowrap";f.style.fontSize="10pt";f.style.width="120px";f.style.paddingLeft="15px";mxUtils.write(f,mxResources.get("fontname",null,"Font Name")+":");n.appendChild(f);var A=document.createElement("input");"w"==c&&(FontDialog.enableWebFonts?A.setAttribute("value",e):t.setAttribute("value",e));A.style.marginLeft="4px";A.style.width="250px";A.className="dlg_fontName_w";f=document.createElement("td");f.appendChild(A);n.appendChild(f);FontDialog.enableWebFonts&&p.appendChild(n);n=document.createElement("tr");
-f=document.createElement("td");f.style.whiteSpace="nowrap";f.style.fontSize="10pt";f.style.width="120px";f.style.paddingLeft="15px";mxUtils.write(f,mxResources.get("fontUrl",null,"Font URL")+":");n.appendChild(f);var z=document.createElement("input");z.setAttribute("value",d||"");z.style.marginLeft="4px";z.style.width="250px";z.className="dlg_fontUrl";f=document.createElement("td");f.appendChild(z);n.appendChild(f);FontDialog.enableWebFonts&&p.appendChild(n);this.init=function(){var b=t;"g"==c?b=
-v:"w"==c&&FontDialog.enableWebFonts&&(b=A);b.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?b.select():document.execCommand("selectAll",!1,null)};n=document.createElement("tr");f=document.createElement("td");f.colSpan=2;f.style.paddingTop="20px";f.style.whiteSpace="nowrap";f.setAttribute("align","right");b.isOffline()||(e=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),e.className="geBtn",f.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),
-function(){b.hideDialog();g()});e.className="geBtn";b.editor.cancelFirst&&f.appendChild(e);var y=mxUtils.button(mxResources.get("apply"),function(){var c,f,d;q.checked?(c=t.value,d="s"):u.checked?(c=v.value,f=Editor.GOOGLE_FONTS+encodeURIComponent(c).replace(/%20/g,"+"),d="g"):x.checked&&(c=A.value,f=z.value,d="w");var e;e=f;var l=d,k=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==c||0==c.length?(m.querySelector(".dlg_fontName_"+l).style.border="1px solid red",
-e=!1):"w"!=l||k.test(e)?e=!0:(m.querySelector(".dlg_fontUrl").style.border="1px solid red",e=!1);e&&(g(c,f,d),b.hideDialog())});y.className="geBtn gePrimaryBtn";mxEvent.addListener(t,"keypress",k);mxEvent.addListener(v,"keypress",k);mxEvent.addListener(A,"keypress",k);mxEvent.addListener(z,"keypress",k);mxEvent.addListener(t,"focus",function(){q.setAttribute("checked","checked");q.checked=!0});mxEvent.addListener(v,"focus",function(){u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(A,
-"focus",function(){x.setAttribute("checked","checked");x.checked=!0});mxEvent.addListener(z,"focus",function(){x.setAttribute("checked","checked");x.checked=!0});f.appendChild(y);b.editor.cancelFirst||f.appendChild(e);n.appendChild(f);p.appendChild(n);m.appendChild(p);this.container=m};
+x.style.cssText="margin-right:8px;margin-bottom:8px;";x.setAttribute("value","webfonts");x.setAttribute("type","radio");x.setAttribute("name","current-fontdialog");x.setAttribute("id","fontdialog-webfonts");f.appendChild(x);l=document.createElement("label");l.setAttribute("for","fontdialog-webfonts");mxUtils.write(l,mxResources.get("webfonts",null,"Web Fonts"));f.appendChild(l);n.appendChild(f);Editor.enableWebFonts&&p.appendChild(n);n=document.createElement("tr");f=document.createElement("td");f.style.whiteSpace=
+"nowrap";f.style.fontSize="10pt";f.style.width="120px";f.style.paddingLeft="15px";mxUtils.write(f,mxResources.get("fontname",null,"Font Name")+":");n.appendChild(f);var B=document.createElement("input");"w"==c&&(Editor.enableWebFonts?B.setAttribute("value",e):t.setAttribute("value",e));B.style.marginLeft="4px";B.style.width="250px";B.className="dlg_fontName_w";f=document.createElement("td");f.appendChild(B);n.appendChild(f);Editor.enableWebFonts&&p.appendChild(n);n=document.createElement("tr");f=
+document.createElement("td");f.style.whiteSpace="nowrap";f.style.fontSize="10pt";f.style.width="120px";f.style.paddingLeft="15px";mxUtils.write(f,mxResources.get("fontUrl",null,"Font URL")+":");n.appendChild(f);var A=document.createElement("input");A.setAttribute("value",d||"");A.style.marginLeft="4px";A.style.width="250px";A.className="dlg_fontUrl";f=document.createElement("td");f.appendChild(A);n.appendChild(f);Editor.enableWebFonts&&p.appendChild(n);this.init=function(){var b=t;"g"==c?b=v:"w"==
+c&&Editor.enableWebFonts&&(b=B);b.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?b.select():document.execCommand("selectAll",!1,null)};n=document.createElement("tr");f=document.createElement("td");f.colSpan=2;f.style.paddingTop="20px";f.style.whiteSpace="nowrap";f.setAttribute("align","right");b.isOffline()||(e=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),e.className="geBtn",f.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),
+function(){b.hideDialog();g()});e.className="geBtn";b.editor.cancelFirst&&f.appendChild(e);var y=mxUtils.button(mxResources.get("apply"),function(){var c,f,d;q.checked?(c=t.value,d="s"):u.checked?(c=v.value,f=Editor.GOOGLE_FONTS+encodeURIComponent(c).replace(/%20/g,"+"),d="g"):x.checked&&(c=B.value,f=A.value,d="w");var e;e=f;var l=d,k=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==c||0==c.length?(m.querySelector(".dlg_fontName_"+l).style.border="1px solid red",
+e=!1):"w"!=l||k.test(e)?e=!0:(m.querySelector(".dlg_fontUrl").style.border="1px solid red",e=!1);e&&(g(c,f,d),b.hideDialog())});y.className="geBtn gePrimaryBtn";mxEvent.addListener(t,"keypress",k);mxEvent.addListener(v,"keypress",k);mxEvent.addListener(B,"keypress",k);mxEvent.addListener(A,"keypress",k);mxEvent.addListener(t,"focus",function(){q.setAttribute("checked","checked");q.checked=!0});mxEvent.addListener(v,"focus",function(){u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(B,
+"focus",function(){x.setAttribute("checked","checked");x.checked=!0});mxEvent.addListener(A,"focus",function(){x.setAttribute("checked","checked");x.checked=!0});f.appendChild(y);b.editor.cancelFirst||f.appendChild(e);n.appendChild(f);p.appendChild(n);m.appendChild(p);this.container=m};
function AspectDialog(b,e,d,c,g){this.aspect={pageId:e||(b.pages?b.pages[0].getId():null),layerIds:d||[]};e=document.createElement("div");var k=document.createElement("h5");k.style.margin="0 0 10px";mxUtils.write(k,mxResources.get("pages"));e.appendChild(k);d=document.createElement("div");d.className="geAspectDlgList";e.appendChild(d);k=document.createElement("h5");k.style.margin="0 0 10px";mxUtils.write(k,mxResources.get("layers"));e.appendChild(k);k=document.createElement("div");k.className="geAspectDlgList";
e.appendChild(k);this.pagesContainer=d;this.layersContainer=k;this.ui=b;d=document.createElement("div");d.style.marginTop="16px";d.style.textAlign="center";k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=g&&g()});k.className="geBtn";b.editor.cancelFirst&&d.appendChild(k);var n=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();c({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));d.appendChild(n);n.className="geBtn gePrimaryBtn";
-b.editor.cancelFirst||d.appendChild(k);n.setAttribute("disabled","disabled");this.okBtn=n;e.appendChild(d);this.container=e}FontDialog.enableWebFonts="1"!=urlParams["safe-style-src"];AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var e=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(e.getId(),e.getName(),e.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
+b.editor.cancelFirst||d.appendChild(k);n.setAttribute("disabled","disabled");this.okBtn=n;e.appendChild(d);this.container=e}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var e=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(e.getId(),e.getName(),e.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
AspectDialog.prototype.createViewer=function(b,e,d){mxEvent.disableContextMenu(b);b.style.userSelect="none";var c=new Graph(b);c.setTooltips(!1);c.setEnabled(!1);c.setPanning(!1);c.minFitScale=null;c.maxFitScale=null;c.centerZoom=!0;e="mxGraphModel"==e.nodeName?e:Editor.parseDiagramNode(e);if(null!=e){var g=e.getAttribute("background");if(null==g||""==g||g==mxConstants.NONE)g="#ffffff";b.style.backgroundColor=g;g=new mxCodec(e.ownerDocument);b=c.getModel();g.decode(e,b);e=b.getChildCount(b.root);
for(var g=null==d,k=0;k<e;k++){var n=b.getChildAt(b.root,k);b.setVisible(n,g||d==n.id)}c.maxFitScale=1;c.fit(0);c.center()}return c};
AspectDialog.prototype.createPageItem=function(b,e,d){var c=document.createElement("div");c.className="geAspectDlgListItem";c.setAttribute("data-page-id",b);c.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(e)+"</div>";this.pagesContainer.appendChild(c);var g=this.createViewer(c.childNodes[0],d);e=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=c;
@@ -10257,33 +10279,35 @@ Editor.syncImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5v
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTAgNi4zNVY0LjI2Yy0uOC4yMS0xLjU1LjU0LTIuMjMuOTZsMS40NiAxLjQ2Yy4yNS0uMTIuNS0uMjQuNzctLjMzem0tNy4xNC0uOTRsMi4zNiAyLjM2QzQuNDUgOC45OSA0IDEwLjQ0IDQgMTJjMCAyLjIxLjkxIDQuMiAyLjM2IDUuNjRMNCAyMGg2di02bC0yLjI0IDIuMjRDNi42OCAxNS4xNSA2IDEzLjY2IDYgMTJjMC0xIC4yNS0xLjk0LjY4LTIuNzdsOC4wOCA4LjA4Yy0uMjUuMTMtLjUuMjUtLjc3LjM0djIuMDljLjgtLjIxIDEuNTUtLjU0IDIuMjMtLjk2bDIuMzYgMi4zNiAxLjI3LTEuMjdMNC4xNCA0LjE0IDIuODYgNS40MXpNMjAgNGgtNnY2bDIuMjQtMi4yNEMxNy4zMiA4Ljg1IDE4IDEwLjM0IDE4IDEyYzAgMS0uMjUgMS45NC0uNjggMi43N2wxLjQ2IDEuNDZDMTkuNTUgMTUuMDEgMjAgMTMuNTYgMjAgMTJjMC0yLjIxLS45MS00LjItMi4zNi01LjY0TDIwIDR6Ii8+PC9zdmc+";
Editor.syncProblemImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyAxMmMwIDIuMjEuOTEgNC4yIDIuMzYgNS42NEwzIDIwaDZ2LTZsLTIuMjQgMi4yNEM1LjY4IDE1LjE1IDUgMTMuNjYgNSAxMmMwLTIuNjEgMS42Ny00LjgzIDQtNS42NVY0LjI2QzUuNTUgNS4xNSAzIDguMjcgMyAxMnptOCA1aDJ2LTJoLTJ2MnpNMjEgNGgtNnY2bDIuMjQtMi4yNEMxOC4zMiA4Ljg1IDE5IDEwLjM0IDE5IDEyYzAgMi42MS0xLjY3IDQuODMtNCA1LjY1djIuMDljMy40NS0uODkgNi00LjAxIDYtNy43NCAwLTIuMjEtLjkxLTQuMi0yLjM2LTUuNjRMMjEgNHptLTEwIDloMlY3aC0ydjZ6Ii8+PC9zdmc+";
Editor.drawLogoImage="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJFYmVuZV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMjUwIDI1MCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjUwIDI1MDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MntmaWxsOiMwMDA7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QyIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLDE1KSIgZD0iTTE5Ny4xLDEzOC4zaC0yMy43bC0yNS00Mi43YzUuNy0xLjIsOS44LTYuMiw5LjctMTJWNTEuNWMwLTYuOC01LjQtMTIuMy0xMi4yLTEyLjNjMCwwLTAuMSwwLTAuMSwwaC00MS43CgljLTYuOCwwLTEyLjMsNS40LTEyLjMsMTIuMmMwLDAsMCwwLjEsMCwwLjF2MzIuMWMwLDUuOCw0LDEwLjgsOS43LDEybC0yNSw0Mi43SDUyLjljLTYuOCwwLTEyLjMsNS40LTEyLjMsMTIuMmMwLDAsMCwwLjEsMCwwLjEKCXYzMi4xYzAsNi44LDUuNCwxMi4zLDEyLjIsMTIuM2MwLDAsMC4xLDAsMC4xLDBoNDEuN2M2LjgsMCwxMi4zLTUuNCwxMi4zLTEyLjJjMCwwLDAtMC4xLDAtMC4xdi0zMi4xYzAtNi44LTUuNC0xMi4zLTEyLjItMTIuMwoJYzAsMC0wLjEsMC0wLjEsMGgtNGwyNC44LTQyLjRoMTkuM2wyNC45LDQyLjRoLTQuMWMtNi44LDAtMTIuMyw1LjQtMTIuMywxMi4yYzAsMCwwLDAuMSwwLDAuMXYzMi4xYzAsNi44LDUuNCwxMi4zLDEyLjIsMTIuMwoJYzAsMCwwLjEsMCwwLjEsMGg0MS43YzYuOCwwLDEyLjMtNS40LDEyLjMtMTIuMmMwLDAsMC0wLjEsMC0wLjF2LTMyLjFjMC02LjgtNS40LTEyLjMtMTIuMi0xMi4zCglDMTk3LjIsMTM4LjMsMTk3LjIsMTM4LjMsMTk3LjEsMTM4LjN6Ii8+Cjwvc3ZnPgo=";
+Editor.tailSpin="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9Ii0yIC0yIDQ0IDQ0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogICAgPGRlZnM+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IHgxPSI4LjA0MiUiIHkxPSIwJSIgeDI9IjY1LjY4MiUiIHkyPSIyMy44NjUlIiBpZD0iYSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiM4MDgwODAiIHN0b3Atb3BhY2l0eT0iMCIgb2Zmc2V0PSIwJSIvPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjODA4MDgwIiBzdG9wLW9wYWNpdHk9Ii42MzEiIG9mZnNldD0iNjMuMTQ2JSIvPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjODA4MDgwIiBvZmZzZXQ9IjEwMCUiLz4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPC9kZWZzPgogICAgPGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxIDEpIj4KICAgICAgICAgICAgPHBhdGggZD0iTTM2IDE4YzAtOS45NC04LjA2LTE4LTE4LTE4IiBzdHJva2U9InVybCgjYSkiIHN0cm9rZS13aWR0aD0iNiI+CiAgICAgICAgICAgICAgICA8YW5pbWF0ZVRyYW5zZm9ybQogICAgICAgICAgICAgICAgICAgIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIKICAgICAgICAgICAgICAgICAgICB0eXBlPSJyb3RhdGUiCiAgICAgICAgICAgICAgICAgICAgZnJvbT0iMCAxOCAxOCIKICAgICAgICAgICAgICAgICAgICB0bz0iMzYwIDE4IDE4IgogICAgICAgICAgICAgICAgICAgIGR1cj0iMC45cyIKICAgICAgICAgICAgICAgICAgICByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgLz4KICAgICAgICAgICAgPC9wYXRoPgogICAgICAgICAgICA8Y2lyY2xlIGZpbGw9IiM4MDgwODAiIGN4PSIzNiIgY3k9IjE4IiByPSIxIj4KICAgICAgICAgICAgICAgIDxhbmltYXRlVHJhbnNmb3JtCiAgICAgICAgICAgICAgICAgICAgYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIgogICAgICAgICAgICAgICAgICAgIHR5cGU9InJvdGF0ZSIKICAgICAgICAgICAgICAgICAgICBmcm9tPSIwIDE4IDE4IgogICAgICAgICAgICAgICAgICAgIHRvPSIzNjAgMTggMTgiCiAgICAgICAgICAgICAgICAgICAgZHVyPSIwLjlzIgogICAgICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPgogICAgICAgICAgICA8L2NpcmNsZT4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPgo=";
Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";Editor.hiResImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAh1BMVEUAAABMTExERERBQUFBQUFFRUVAQEBCQkJAQEA6OjpDQ0NKSkpBQUFBQUFERERERERBQUFCQkJCQkJCQkJJSUlBQUFCQkJDQ0NDQ0NCQkJDQ0NBQUFBQUFCQkJBQUFCQkJCQkJDQ0NCQkJHR0dBQUFCQkJCQkJAQEBCQkJDQ0NAQEBERERCQkIk1hS2AAAAKnRSTlMAAjj96BL7PgQFRwfu3TYazKuVjRXl1V1DPCn1uLGjnWNVIgy9hU40eGqPkM38AAACG0lEQVRYw+2X63KbMBCFzwZblgGDceN74muatpLe//m6MHV3gHGFAv2RjM94MAbxzdnVsQbBDKwH8AH8MDAyafzjqYeyOG04XE7RS8nIRDXg6BlT+rA0nmtAPh+NQRDxIASIMG44rAMrGunBgHwy3uUldxggIStGKp2f+DQc2O4h4eQsX3O2IFB/oEbsjOKbStnjAEA+zJ0ylZTbgvoDn8xNyn6Dbj5Kd4GsNpABa6duQPfSdEj88TgMAhKuCWjAkgmFXPLnsD0pWd3OFGdrMugQII/eOMPEiGOzqPMIeWrcSoMCg71W1pXBPvCP+gS/OdXqQ3uW23+93XGWLl/OaBb805bNcBPoEIcVJsnHzcxpZH86u5KZ9gDby5dQCcnKqdbke4ItI4Tzd7IW9hZQt4EO6GG9b9sYuuK9Wwn8TIr2xKbF2+3Nhr+qxChJ/AI6pIfCu4z4Zowp4ZUNihz79vewzctnHDwTvQO/hCdFBzrUGDOPn2Y/F8YKT4oOATLvlhOznzmBSdFBJWtc58y7r+UVFOCQczy3wpN6pegDqHtsCPTGvH9JuTO0Dyg8icldYPk+RB6g8Aofj4m2EKBvtTmUPD9xDd1pPcSReV2U5iD/ik2yrngtvvqBfPzOvKiDTKTsCdoHZJ7pLLffgTwlJ5vJdtJV2/jiAYaLvLGhMAEDO5QcDg2M/jOw/8Zn+K3ZwJvHT7ZffgC/NvA3zcybTeIfE4EAAAAASUVORK5CYII=":
IMAGE_PATH+"/img-hi-res.png";Editor.loResImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==":
IMAGE_PATH+"/img-lo-res.png";Editor.cameraImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE0LjEyIDRsMS44MyAySDIwdjEySDRWNmg0LjA1bDEuODMtMmg0LjI0TTE1IDJIOUw3LjE3IDRINGMtMS4xIDAtMiAuOS0yIDJ2MTJjMCAxLjEuOSAyIDIgMmgxNmMxLjEgMCAyLS45IDItMlY2YzAtMS4xLS45LTItMi0yaC0zLjE3TDE1IDJ6bS0zIDdjMS42NSAwIDMgMS4zNSAzIDNzLTEuMzUgMy0zIDMtMy0xLjM1LTMtMyAxLjM1LTMgMy0zbTAtMmMtMi43NiAwLTUgMi4yNC01IDVzMi4yNCA1IDUgNSA1LTIuMjQgNS01LTIuMjQtNS01LTV6Ii8+PC9zdmc+";
Editor.tagsImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjE4cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjE4cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMjEuNDEsMTEuNDFsLTguODMtOC44M0MxMi4yMSwyLjIxLDExLjcsMiwxMS4xNywySDRDMi45LDIsMiwyLjksMiw0djcuMTdjMCwwLjUzLDAuMjEsMS4wNCwwLjU5LDEuNDFsOC44Myw4LjgzIGMwLjc4LDAuNzgsMi4wNSwwLjc4LDIuODMsMGw3LjE3LTcuMTdDMjIuMiwxMy40NiwyMi4yLDEyLjIsMjEuNDEsMTEuNDF6IE0xMi44MywyMEw0LDExLjE3VjRoNy4xN0wyMCwxMi44M0wxMi44MywyMHoiLz48Y2lyY2xlIGN4PSI2LjUiIGN5PSI2LjUiIHI9IjEuNSIvPjwvZz48L2c+PC9zdmc+";
Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.errorImage="data:image/gif;base64,R0lGODlhEAAQAPcAAADGAIQAAISEhP8AAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAAALAAAAAAQABAAAAhoAAEIFBigYMGBCAkGGMCQ4cGECxtKHBAAYUQCEzFSHLiQgMeGHjEGEAAg4oCQJz86LCkxpEqHAkwyRClxpEyXGmGaREmTIsmOL1GO/DkzI0yOE2sKIMlRJsWhCQHENDiUaVSpS5cmDAgAOw==";
-Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.compressXml=!0;Editor.globalVars=null;Editor.shadowOptionEnabled=!mxClient.IS_SF;Editor.config=
-null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(b,c){return"1"!=mxUtils.getValue(b.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(b,c){return"1"==mxUtils.getValue(b.style,"comic","0")||"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(b,c){return"1"==
-mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(b,c){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(b,c){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(b,c){return"1"==
-mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(b,c){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(b,c){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",
-defVal:!1,isVisible:function(b,c){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(b,c){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(b,c){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(b,
-c){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(b,c){return"1"==mxUtils.getValue(b.style,"comic","0")||"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(b,c){return"1"==mxUtils.getValue(b.style,"sketch","1"==
-urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",
-dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(b){return"orthogonalEdgeStyle"==mxUtils.getValue(b.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",
-dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",
-defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",
-type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(b,c){var f=c.editorUi.editor.graph.getCellStyle(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null);return"1"==mxUtils.getValue(f,"resizeLastRow","0")},isVisible:function(b,
-c){var f=c.editorUi.editor.graph;return 1==b.vertices.length&&0==b.edges.length&&f.isTable(b.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(b,c){var f=c.editorUi.editor.graph.getCellStyle(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null);return"1"==mxUtils.getValue(f,"resizeLast","0")},isVisible:function(b,c){var f=c.editorUi.editor.graph;return 1==b.vertices.length&&0==b.edges.length&&f.isTable(b.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",
-type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",
-dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",
-dispName:"Connectable",type:"bool",getDefaultValue:function(b,c){return c.editorUi.editor.graph.isCellConnectable(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null)},isVisible:function(b,c){return 1==b.vertices.length&&0==b.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",
-dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",
-dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(b,c){return 1==b.vertices.length&&0==b.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(b,c){var f=1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null,d=c.editorUi.editor.graph;return null!=
-f&&(d.isSwimlane(f)||0<d.model.getChildCount(f))},isVisible:function(b,c){return 1==b.vertices.length&&0==b.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(b,c){var f=1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null,d=c.editorUi.editor.graph;return null!=f&&(d.isContainer(f)&&"0"!=b.style.collapsible||!d.isContainer(f)&&"1"==b.style.collapsible)},isVisible:function(b,c){return 1==b.vertices.length&&0==b.edges.length}},{name:"recursiveResize",
-dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(b,c){return 1==b.vertices.length&&0==b.edges.length&&!c.editorUi.editor.graph.isSwimlane(b.vertices[0])&&null==mxUtils.getValue(b.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(b,c){var f=c.editorUi.editor.graph.model;return 0<b.vertices.length?f.isVertex(f.getParent(b.vertices[0])):!1}},{name:"editable",dispName:"Editable",
-type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(b,c){var f=0<b.vertices.length?c.editorUi.editor.graph.getCellGeometry(b.vertices[0]):null;return null!=f&&!f.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",
-dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,
-isVisible:function(b,c){var f=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,null);return c.editorUi.editor.graph.isSwimlane(b.vertices[0])||null==f||f==mxConstants.NONE||null!=b.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(b,c){return 0<b.vertices.length&&c.editorUi.editor.graph.isContainer(b.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
+Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;
+Editor.compressXml=!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(b,c){return"1"!=mxUtils.getValue(b.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(b,c){return"1"==mxUtils.getValue(b.style,"comic","0")||"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",
+type:"int",defVal:-1,isVisible:function(b,c){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(b,c){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(b,c){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"curveFitting",dispName:"Curve Fitting",
+type:"float",defVal:.95,isVisible:function(b,c){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(b,c){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(b,c){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",
+dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(b,c){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(b,c){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(b,c){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"zigzagOffset",
+dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(b,c){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(b,c){return"1"==mxUtils.getValue(b.style,"comic","0")||"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(b,
+c){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",
+type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(b){return"orthogonalEdgeStyle"==mxUtils.getValue(b.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",
+type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},
+{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",
+defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(b,c){var f=c.editorUi.editor.graph;return"1"==urlParams.test&&1==b.vertices.length&&0==b.edges.length&&f.isTableCell(b.vertices[0])}},{type:"separator"},
+{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(b,c){var f=c.editorUi.editor.graph.getCellStyle(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null);return"1"==mxUtils.getValue(f,"resizeLastRow","0")},isVisible:function(b,c){var f=c.editorUi.editor.graph;return 1==b.vertices.length&&0==b.edges.length&&f.isTable(b.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(b,c){var f=c.editorUi.editor.graph.getCellStyle(1==
+b.vertices.length&&0==b.edges.length?b.vertices[0]:null);return"1"==mxUtils.getValue(f,"resizeLast","0")},isVisible:function(b,c){var f=c.editorUi.editor.graph;return 1==b.vertices.length&&0==b.edges.length&&f.isTable(b.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},
+{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",
+defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(b,c){return c.editorUi.editor.graph.isCellConnectable(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null)},isVisible:function(b,c){return 1==b.vertices.length&&
+0==b.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",
+dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",
+type:"bool",defVal:!1,isVisible:function(b,c){return 1==b.vertices.length&&0==b.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(b,c){var f=1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null,d=c.editorUi.editor.graph;return null!=f&&(d.isSwimlane(f)||0<d.model.getChildCount(f))},isVisible:function(b,c){return 1==b.vertices.length&&0==b.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(b,c){var f=1==b.vertices.length&&
+0==b.edges.length?b.vertices[0]:null,d=c.editorUi.editor.graph;return null!=f&&(d.isContainer(f)&&"0"!=b.style.collapsible||!d.isContainer(f)&&"1"==b.style.collapsible)},isVisible:function(b,c){return 1==b.vertices.length&&0==b.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(b,c){return 1==b.vertices.length&&0==b.edges.length&&!c.editorUi.editor.graph.isSwimlane(b.vertices[0])&&null==mxUtils.getValue(b.style,"childLayout",null)}},{name:"expand",
+dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(b,c){var f=c.editorUi.editor.graph.model;return 0<b.vertices.length?f.isVertex(f.getParent(b.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",
+dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(b,c){var f=0<b.vertices.length?c.editorUi.editor.graph.getCellGeometry(b.vertices[0]):null;return null!=f&&!f.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},
+{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(b,c){var f=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,null);return c.editorUi.editor.graph.isSwimlane(b.vertices[0])||null==f||f==mxConstants.NONE||null!=b.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",
+type:"bool",defVal:!1,isVisible:function(b,c){return 0<b.vertices.length&&c.editorUi.editor.graph.isContainer(b.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
Editor.createRoughCanvas=function(b){var c=rough.canvas({getContext:function(){return b}});c.draw=function(c){var f=c.sets||[];c=c.options||this.getDefaultOptions();for(var d=0;d<f.length;d++){var e=f[d];switch(e.type){case "path":null!=c.stroke&&this._drawToContext(b,e,c);break;case "fillPath":this._drawToContext(b,e,c);break;case "fillSketch":this.fillSketch(b,e,c)}}};c.fillSketch=function(c,f,d){var e=b.state.strokeColor,l=b.state.strokeWidth,m=b.state.strokeAlpha,g=b.state.dashed,k=d.fillWeight;
0>k&&(k=d.strokeWidth/2);b.setStrokeAlpha(b.state.fillAlpha);b.setStrokeColor(d.fill||"");b.setStrokeWidth(k);b.setDashed(!1);this._drawToContext(c,f,d);b.setDashed(g);b.setStrokeWidth(l);b.setStrokeColor(e);b.setStrokeAlpha(m)};c._drawToContext=function(b,c,f){b.begin();for(var d=0;d<c.ops.length;d++){var e=c.ops[d],l=e.data;switch(e.op){case "move":b.moveTo(l[0],l[1]);break;case "bcurveTo":b.curveTo(l[0],l[1],l[2],l[3],l[4],l[5]);break;case "lineTo":b.lineTo(l[0],l[1])}}b.end();"fillPath"===c.type&&
f.filled?b.fill():b.stroke()};return c};(function(){function b(c,f,d){this.canvas=c;this.rc=f;this.shape=d;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,b.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,b.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,b.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
@@ -10297,7 +10321,7 @@ this.originalEnd.apply(this.canvas,arguments)};b.prototype.addOp=function(){if(n
function(b,c){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,b,c),this.lastX=b,this.lastY=c,this.firstX=b,this.firstY=c)};b.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};b.prototype.quadTo=function(b,c,f,d){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,b,c,f,d),this.lastX=f,this.lastY=d)};b.prototype.curveTo=function(b,c,f,d,e,l){this.passThrough?
this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,b,c,f,d,e,l),this.lastX=e,this.lastY=l)};b.prototype.arcTo=function(b,c,f,d,e,l,m){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var g=mxUtils.arcToCurves(this.lastX,this.lastY,b,c,f,d,e,l,m);if(null!=g)for(var k=0;k<g.length;k+=6)this.curveTo(g[k],g[k+1],g[k+2],g[k+3],g[k+4],g[k+5]);this.lastX=l;this.lastY=m}};b.prototype.rect=function(b,c,f,d){this.passThrough?this.originalRect.apply(this.canvas,
arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(b,c,f,d,this.getStyle(!0,!0)))};b.prototype.ellipse=function(b,c,f,d){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(b+f/2,c+d/2,f,d,this.getStyle(!0,!0)))};b.prototype.roundrect=function(b,c,f,d,e,l){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(b+e,c),this.lineTo(b+f-e,c),this.quadTo(b+f,c,b+f,c+l),this.lineTo(b+
-f,c+d-l),this.quadTo(b+f,c+d,b+f-e,c+d),this.lineTo(b+e,c+d),this.quadTo(b,c+d,b,c+d-l),this.lineTo(b,c+l),this.quadTo(b,c,b+e,c))};b.prototype.drawPath=function(b){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),b)}catch(Y){}this.passThrough=!1}else if(null!=this.nextShape){for(var c in b)this.nextShape.options[c]=b[c];null==b.stroke&&delete this.nextShape.options.stroke;b.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);
+f,c+d-l),this.quadTo(b+f,c+d,b+f-e,c+d),this.lineTo(b+e,c+d),this.quadTo(b,c+d,b,c+d-l),this.lineTo(b,c+l),this.quadTo(b,c,b+e,c))};b.prototype.drawPath=function(b){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),b)}catch(X){}this.passThrough=!1}else if(null!=this.nextShape){for(var c in b)this.nextShape.options[c]=b[c];null==b.stroke&&delete this.nextShape.options.stroke;b.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);
this.passThrough=!1}};b.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};b.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};b.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};b.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;
this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;
this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(c){return new b(c,Editor.createRoughCanvas(c),this)};var c=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(b){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0")?c.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(b):this.createRoughCanvas(b)};var f=mxShape.prototype.paint;
@@ -10310,7 +10334,7 @@ d=null;0<f.length?(f=Graph.decompress(f,null,c),null!=f&&0<f.length&&(d=mxUtils.
!mxClient.IS_SF?atob(b):Base64.decode(b,!0);if("%PDF-1.7"==b.substring(0,8)){var c=b.indexOf("EmbeddedFile");if(-1<c){var f=b.indexOf("stream",c)+9;if(0<b.substring(c,f).indexOf("application#2Fvnd.jgraph.mxfile"))return c=b.indexOf("endstream",f-1),pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(f,c)),{to:"string"})}return null}for(var f=null,c="",d=0,e=0,l=[],m=null;e<b.length;){var g=b.charCodeAt(e),e=e+1;10!=g&&(c+=String.fromCharCode(g));g=="/Subject (%3Cmxfile".charCodeAt(d)?d++:d=0;if(19==
d){var k=b.indexOf("%3C%2Fmxfile%3E)",e)+15,e=e-9;if(k>e){f=b.substring(e,k);break}}10==g&&("endobj"==c?m=null:"obj"==c.substring(c.length-3,c.length)||"xref"==c||"trailer"==c?(m=[],l[c.split(" ")[0]]=m):null!=m&&m.push(c),c="")}null==f&&(f=Editor.extractGraphModelFromXref(l));null!=f&&(f=decodeURIComponent(f.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return f};Editor.extractGraphModelFromXref=function(b){var c=b.trailer,f=null;null!=c&&(c=/.* \/Info (\d+) (\d+) R/g.exec(c.join("\n")),null!=c&&0<
c.length&&(c=b[c[1]],null!=c&&(c=/.* \/Subject (\d+) (\d+) R/g.exec(c.join("\n")),null!=c&&0<c.length&&(b=b[c[1]],null!=b&&(b=b.join("\n"),f=b.substring(1,b.length-1))))));return f};Editor.extractGraphModelFromPng=function(b){var c=null;try{var f=b.substring(b.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(b,f,e){b=d.substring(b+8,b+8+e);"zTXt"==f?(e=b.indexOf(String.fromCharCode(0)),"mxGraphModel"==b.substring(0,e)&&(b=pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(e+
-2)),{to:"string"}).replace(/\+/g," "),null!=b&&0<b.length&&(c=b))):"tEXt"==f&&(b=b.split(String.fromCharCode(0)),1<b.length&&("mxGraphModel"==b[0]||"mxfile"==b[0])&&(c=b[1]));if(null!=c||"IDAT"==f)return!0}))}catch(T){}null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));return c};Editor.extractParserError=function(b,c){var f=null,d=null!=b?b.getElementsByTagName("parsererror"):null;null!=d&&0<d.length&&(f=c||mxResources.get("invalidChars"),d=d[0].getElementsByTagName("div"),
+2)),{to:"string"}).replace(/\+/g," "),null!=b&&0<b.length&&(c=b))):"tEXt"==f&&(b=b.split(String.fromCharCode(0)),1<b.length&&("mxGraphModel"==b[0]||"mxfile"==b[0])&&(c=b[1]));if(null!=c||"IDAT"==f)return!0}))}catch(R){}null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));return c};Editor.extractParserError=function(b,c){var f=null,d=null!=b?b.getElementsByTagName("parsererror"):null;null!=d&&0<d.length&&(f=c||mxResources.get("invalidChars"),d=d[0].getElementsByTagName("div"),
0<d.length&&(f=mxUtils.getTextContent(d[0])));return null!=f?mxUtils.trim(f):f};Editor.addRetryToError=function(b,c){if(null!=b){var f=null!=b.error?b.error:b;null==f.retry&&(f.retry=c)}};Editor.configure=function(b,c){if(null!=b){Editor.config=b;Editor.configVersion=b.version;Menus.prototype.defaultFonts=b.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=b.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=b.defaultColors||ColorDialog.prototype.defaultColors;
ColorDialog.prototype.colorNames=b.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=b.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=b.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=b.autosaveDelay||DrawioFile.prototype.autosaveDelay;null!=b.templateFile&&(EditorUi.templateFile=b.templateFile);null!=b.styles&&(Editor.styles=b.styles);null!=b.globalVars&&(Editor.globalVars=
b.globalVars);null!=b.compressXml&&(Editor.compressXml=b.compressXml);null!=b.includeDiagram&&(Editor.defaultIncludeDiagram=b.includeDiagram);null!=b.simpleLabels&&(Editor.simpleLabels=b.simpleLabels);b.customFonts&&(Menus.prototype.defaultFonts=b.customFonts.concat(Menus.prototype.defaultFonts));b.customPresetColors&&(ColorDialog.prototype.presetColors=b.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=b.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=b.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));
@@ -10323,7 +10347,7 @@ b){Editor.prototype.fontCss=b;var c=document.getElementsByTagName("script")[0];i
Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!0;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(c){c=null!=c&&"mxlibrary"!=c.nodeName?this.extractGraphModel(c):null;if(null!=c){var f=c.getElementsByTagName("parsererror");if(null!=f&&0<f.length){var f=f[0],d=f.getElementsByTagName("div");null!=d&&0<d.length&&
(f=d[0]);throw{message:mxUtils.getTextContent(f)};}if("mxGraphModel"==c.nodeName){f=c.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=f&&""!=f)f!=this.graph.currentStyle&&(d=null!=this.graph.themes?this.graph.themes[f]:mxUtils.load(STYLE_PATH+"/"+f+".xml").getDocumentElement(),null!=d&&(e=new mxCodec(d.ownerDocument),e.decode(d,this.graph.getStylesheet())));else if(d=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),
null!=d){var e=new mxCodec(d.ownerDocument);e.decode(d,this.graph.getStylesheet())}this.graph.currentStyle=f;this.graph.mathEnabled="1"==urlParams.math||"1"==c.getAttribute("math");f=c.getAttribute("backgroundImage");null!=f?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(f)):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();
-this.graph.updateCssTransform();this.graph.setShadowVisible("1"==c.getAttribute("shadow"),!1);if(f=c.getAttribute("extFonts"))try{for(f=f.split("|").map(function(b){b=b.split("^");return{name:b[0],url:b[1]}}),d=0;d<f.length;d++)this.graph.addExtFont(f[d].name,f[d].url)}catch(T){console.log("ExtFonts format error: "+T.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",
+this.graph.updateCssTransform();this.graph.setShadowVisible("1"==c.getAttribute("shadow"),!1);if(f=c.getAttribute("extFonts"))try{for(f=f.split("|").map(function(b){b=b.split("^");return{name:b[0],url:b[1]}}),d=0;d<f.length;d++)this.graph.addExtFont(f[d].name,f[d].url)}catch(R){console.log("ExtFonts format error: "+R.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",
toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(b,c){b=null!=b?b:!0;var f=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&f.setAttribute("style",this.graph.currentStyle);var d=this.graph.getBackgroundImageObject(this.graph.backgroundImage,c);null!=d&&f.setAttribute("backgroundImage",JSON.stringify(d));f.setAttribute("math",this.graph.mathEnabled?"1":"0");f.setAttribute("shadow",this.graph.shadowVisible?
"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(d=this.graph.extFonts.map(function(b){return b.name+"^"+b.url}),f.setAttribute("extFonts",d.join("|")));return f};Editor.prototype.isDataSvg=function(b){try{var c=mxUtils.parseXml(b).documentElement.getAttribute("content");if(null!=c&&(null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var f=mxUtils.parseXml(c).documentElement;
return"mxfile"==f.nodeName||"mxGraphModel"==f.nodeName}}catch(W){}return!1};Editor.prototype.extractGraphModel=function(b,c,f){return Editor.extractGraphModel.apply(this,arguments)};var d=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&
@@ -10331,34 +10355,34 @@ this.graph.isCssTransformsSupported();this.graph.updateCssTransform();d.apply(th
"div.MathJax_SVG_Display { position: static; }\nspan.MathJax_SVG { position: static !important; }";Editor.initMath=function(b,c){if("undefined"===typeof window.MathJax){b=(null!=b?b:DRAW_MATH_URL+"/MathJax.js")+"?config=TeX-MML-AM_"+("html"==urlParams["math-output"]?"HTMLorMML":"SVG")+"-full";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(b){window.setTimeout(function(){"hidden"!=b.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,b])},0)};var f=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):
"TeX";c=null!=c?c:{"HTML-CSS":{availableFonts:[f],imageFont:null},SVG:{font:f,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(c);MathJax.Hub.Register.StartupHook("Begin",function(){for(var b=0;b<Editor.mathJaxQueue.length;b++)Editor.doMathJaxRender(Editor.mathJaxQueue[b])})}};Editor.MathJaxRender=function(b){"undefined"!==typeof MathJax&&
"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(b):Editor.mathJaxQueue.push(b)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var d=Editor.prototype.init;Editor.prototype.init=function(){d.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};f=document.getElementsByTagName("script");if(null!=f&&0<f.length){var e=document.createElement("script");
-e.setAttribute("type","text/javascript");e.setAttribute("src",b);f[0].parentNode.appendChild(e)}try{if(mxClient.IS_GC||mxClient.IS_SF){var l=document.createElement("style");l.type="text/css";l.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(l)}}catch(Y){}}};Editor.prototype.csvToArray=function(b){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(b))return null;
+e.setAttribute("type","text/javascript");e.setAttribute("src",b);f[0].parentNode.appendChild(e)}try{if(mxClient.IS_GC||mxClient.IS_SF){var l=document.createElement("style");l.type="text/css";l.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(l)}}catch(X){}}};Editor.prototype.csvToArray=function(b){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(b))return null;
var c=[];b.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(b,f,d,e){void 0!==f?c.push(f.replace(/\\'/g,"'")):void 0!==d?c.push(d.replace(/\\"/g,'"')):void 0!==e&&c.push(e);return""});/,\s*$/.test(b)&&c.push("");return c};Editor.prototype.isCorsEnabledForUrl=function(b){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||b.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&
null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(b)||"https://raw.githubusercontent.com/"===b.substring(0,34)};Editor.prototype.createImageUrlConverter=function(){var b=new mxUrlConverter;b.updateBaseUrl();var c=b.convert,f=this;b.convert=function(d){if(null!=d){var e="http://"==d.substring(0,7)||"https://"==d.substring(0,8);e&&!navigator.onLine?d=Editor.svgBrokenImage.src:!e||d.substring(0,b.baseUrl.length)==
b.baseUrl||f.crossOriginImages&&f.isCorsEnabledForUrl(d)?"chrome-extension://"==d.substring(0,19)||mxClient.IS_CHROMEAPP||(d=c.apply(this,arguments)):d=PROXY_URL+"?url="+encodeURIComponent(d)}return d};return b};Editor.createSvgDataUri=function(b){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(b)))};Editor.prototype.convertImageToDataUri=function(b,c){try{var f=!0,d=window.setTimeout(mxUtils.bind(this,function(){f=!1;c(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(b))mxUtils.get(b,
-mxUtils.bind(this,function(b){window.clearTimeout(d);f&&c(Editor.createSvgDataUri(b.getText()))}),function(){window.clearTimeout(d);f&&c(Editor.svgBrokenImage.src)});else{var e=new Image;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(d);if(f)try{var b=document.createElement("canvas"),l=b.getContext("2d");b.height=e.height;b.width=e.width;l.drawImage(e,0,0);c(b.toDataURL())}catch(ga){c(Editor.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(d);
+mxUtils.bind(this,function(b){window.clearTimeout(d);f&&c(Editor.createSvgDataUri(b.getText()))}),function(){window.clearTimeout(d);f&&c(Editor.svgBrokenImage.src)});else{var e=new Image;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(d);if(f)try{var b=document.createElement("canvas"),l=b.getContext("2d");b.height=e.height;b.width=e.width;l.drawImage(e,0,0);c(b.toDataURL())}catch(ha){c(Editor.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(d);
f&&c(Editor.svgBrokenImage.src)};e.src=b}}catch(Q){c(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(b,c,f,d){null==d&&(d=this.createImageUrlConverter());var e=0,l=f||{};f=mxUtils.bind(this,function(f,m){for(var g=b.getElementsByTagName(f),k=0;k<g.length;k++)mxUtils.bind(this,function(f){try{if(null!=f){var g=d.convert(f.getAttribute(m));if(null!=g&&"data:"!=g.substring(0,5)){var k=l[g];null==k?(e++,this.convertImageToDataUri(g,function(d){null!=d&&(l[g]=d,f.setAttribute(m,d));
e--;0==e&&c(b)})):f.setAttribute(m,k)}else null!=g&&f.setAttribute(m,g)}}catch(da){}})(g[k])});f("image","xlink:href");f("img","src");0==e&&c(b)};Editor.base64Encode=function(b){for(var c="",f=0,d=b.length,e,l,m;f<d;){e=b.charCodeAt(f++)&255;if(f==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);c+="==";break}l=b.charCodeAt(f++);if(f==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>
2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(l&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2);c+="=";break}m=b.charCodeAt(f++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(l&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2|(m&192)>>6);
c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(m&63)}return c};Editor.prototype.loadUrl=function(b,c,f,d,e,l,m,g){try{var k=!m&&(d||/(\.png)($|\?)/i.test(b)||/(\.jpe?g)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b)||/(\.pdf)($|\?)/i.test(b));e=null!=e?e:!0;var p=mxUtils.bind(this,function(){mxUtils.get(b,mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){if(null!=c){var d=b.getText();if(k){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==
typeof window.mxUtilsBinaryToArray){b=mxUtilsBinaryToArray(b.request.responseBody).toArray();for(var d=Array(b.length),e=0;e<b.length;e++)d[e]=String.fromCharCode(b[e]);d=d.join("")}l=null!=l?l:"data:image/png;base64,";d=l+Editor.base64Encode(d)}c(d)}}else null!=f&&(0==b.getStatus()?f({message:mxResources.get("accessDenied")},b):f({message:mxResources.get("error")+" "+b.getStatus()},b))}),function(b){null!=f&&f({message:mxResources.get("error")+" "+b.getStatus()})},k,this.timeout,function(){e&&null!=
-f&&f({code:App.ERROR_TIMEOUT,retry:p})},g)});p()}catch(aa){null!=f&&f(aa)}};Editor.prototype.absoluteCssFonts=function(b){var c=null;if(null!=b){var f=b.split("url(");if(0<f.length){c=[f[0]];b=window.location.pathname;var d=null!=b?b.lastIndexOf("/"):-1;0<=d&&(b=b.substring(0,d+1));var d=document.getElementsByTagName("base"),e=null;null!=d&&0<d.length&&(e=d[0].getAttribute("href"));for(var l=1;l<f.length;l++)if(d=f[l].indexOf(")"),0<d){var m=Editor.trimCssUrl(f[l].substring(0,d));this.graph.isRelativeUrl(m)&&
+f&&f({code:App.ERROR_TIMEOUT,retry:p})},g)});p()}catch(ba){null!=f&&f(ba)}};Editor.prototype.absoluteCssFonts=function(b){var c=null;if(null!=b){var f=b.split("url(");if(0<f.length){c=[f[0]];b=window.location.pathname;var d=null!=b?b.lastIndexOf("/"):-1;0<=d&&(b=b.substring(0,d+1));var d=document.getElementsByTagName("base"),e=null;null!=d&&0<d.length&&(e=d[0].getAttribute("href"));for(var l=1;l<f.length;l++)if(d=f[l].indexOf(")"),0<d){var m=Editor.trimCssUrl(f[l].substring(0,d));this.graph.isRelativeUrl(m)&&
(m=null!=e?e+m:window.location.protocol+"//"+window.location.hostname+("/"==m.charAt(0)?"":b)+m);c.push('url("'+m+'"'+f[l].substring(d))}else c.push(f[l])}else c=[b]}return null!=c?c.join(""):null};Editor.prototype.embedCssFonts=function(b,c){var f=b.split("url("),d=0;null==this.cachedFonts&&(this.cachedFonts={});var e=mxUtils.bind(this,function(){if(0==d){for(var b=[f[0]],e=1;e<f.length;e++){var l=f[e].indexOf(")");b.push('url("');b.push(this.cachedFonts[Editor.trimCssUrl(f[e].substring(0,l))]);
b.push('"'+f[e].substring(l))}c(b.join(""))}});if(0<f.length){for(var l=1;l<f.length;l++){var m=f[l].indexOf(")"),g=null,k=f[l].indexOf("format(",m);0<k&&(g=Editor.trimCssUrl(f[l].substring(k+7,f[l].indexOf(")",k))));mxUtils.bind(this,function(b){if(null==this.cachedFonts[b]){this.cachedFonts[b]=b;d++;var c="application/x-font-ttf";if("svg"==g||/(\.svg)($|\?)/i.test(b))c="image/svg+xml";else if("otf"==g||"embedded-opentype"==g||/(\.otf)($|\?)/i.test(b))c="application/x-font-opentype";else if("woff"==
g||/(\.woff)($|\?)/i.test(b))c="application/font-woff";else if("woff2"==g||/(\.woff2)($|\?)/i.test(b))c="application/font-woff2";else if("eot"==g||/(\.eot)($|\?)/i.test(b))c="application/vnd.ms-fontobject";else if("sfnt"==g||/(\.sfnt)($|\?)/i.test(b))c="application/font-sfnt";var f=b;/^https?:\/\//.test(f)&&!this.isCorsEnabledForUrl(f)&&(f=PROXY_URL+"?url="+encodeURIComponent(b));this.loadUrl(f,mxUtils.bind(this,function(c){this.cachedFonts[b]=c;d--;e()}),mxUtils.bind(this,function(b){d--;e()}),!0,
null,"data:"+c+";charset=utf-8;base64,")}})(Editor.trimCssUrl(f[l].substring(0,m)),g)}e()}else c(b)};Editor.prototype.loadFonts=function(b){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(c){this.resolvedFontCss=c;b()})):b()};Editor.prototype.embedExtFonts=function(b){var c=this.graph.getCustomFonts();if(0<c.length){var f="",d=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var e=mxUtils.bind(this,function(){0==d&&this.embedCssFonts(f,
b)}),l=0;l<c.length;l++)mxUtils.bind(this,function(b,c){Graph.isCssFontUrl(c)?null==this.cachedGoogleFonts[c]?(d++,this.loadUrl(c,mxUtils.bind(this,function(b){this.cachedGoogleFonts[c]=b;f+=b;d--;e()}),mxUtils.bind(this,function(b){d--;f+="@import url("+c+");";e()}))):f+=this.cachedGoogleFonts[c]:f+='@font-face {font-family: "'+b+'";src: url("'+c+'")}'})(c[l].name,c[l].url);e()}else b()};Editor.prototype.addMathCss=function(b){b=b.getElementsByTagName("defs");if(null!=b&&0<b.length)for(var c=document.getElementsByTagName("style"),
f=0;f<c.length;f++)0<mxUtils.getTextContent(c[f]).indexOf("MathJax")&&b[0].appendChild(c[f].cloneNode(!0))};Editor.prototype.addFontCss=function(b,c){c=null!=c?c:this.absoluteCssFonts(this.fontCss);if(null!=c){var f=b.getElementsByTagName("defs"),d=b.ownerDocument;0==f.length?(f=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"defs"):d.createElement("defs"),null!=b.firstChild?b.insertBefore(f,b.firstChild):b.appendChild(f)):f=f[0];d=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,
-"style"):d.createElement("style");d.setAttribute("type","text/css");mxUtils.setTextContent(d,c);f.appendChild(d)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(b,c,f){var d=mxClient.IS_FF?8192:16384;return Math.min(f,Math.min(d/b,d/c))};Editor.prototype.exportToCanvas=function(b,c,f,d,e,l,m,g,k,p,q,t,n,y,u,v,B,A){try{l=null!=l?l:!0;m=null!=m?m:!0;t=null!=t?t:this.graph;n=null!=n?n:0;var x=k?null:t.background;
-x==mxConstants.NONE&&(x=null);null==x&&(x=d);null==x&&0==k&&(x=v?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(t.getSvg(null,null,n,y,null,m,null,null,null,p,null,v,B,A),mxUtils.bind(this,function(f){try{var d=new Image;d.onload=mxUtils.bind(this,function(){try{var m=function(){mxClient.IS_SF?window.setTimeout(function(){y.drawImage(d,0,0);b(k,f)},0):(y.drawImage(d,0,0),b(k,f))},k=document.createElement("canvas"),p=parseInt(f.getAttribute("width")),q=parseInt(f.getAttribute("height"));
-g=null!=g?g:1;null!=c&&(g=l?Math.min(1,Math.min(3*c/(4*q),c/p)):c/p);g=this.getMaxCanvasScale(p,q,g);p=Math.ceil(g*p);q=Math.ceil(g*q);k.setAttribute("width",p);k.setAttribute("height",q);var y=k.getContext("2d");null!=x&&(y.beginPath(),y.rect(0,0,p,q),y.fillStyle=x,y.fill());1!=g&&y.scale(g,g);if(u){var v=t.view,B=v.scale;v.scale=1;var A=btoa(unescape(encodeURIComponent(v.createSvgGrid(v.gridColor))));v.scale=B;var A="data:image/svg+xml;base64,"+A,C=t.gridSize*v.gridSteps*g,D=t.getGraphBounds(),
-O=v.translate.x*B,G=v.translate.y*B,z=O+(D.x-O)/B-n,L=G+(D.y-G)/B-n,J=new Image;J.onload=function(){try{for(var b=-Math.round(C-mxUtils.mod((O-z)*g,C)),c=-Math.round(C-mxUtils.mod((G-L)*g,C));b<p;b+=C)for(var f=c;f<q;f+=C)y.drawImage(J,b/g,f/g);m()}catch(Aa){null!=e&&e(Aa)}};J.onerror=function(b){null!=e&&e(b)};J.src=A}else m()}catch(va){null!=e&&e(va)}});d.onerror=function(b){null!=e&&e(b)};p&&this.graph.addSvgShadow(f);this.graph.mathEnabled&&this.addMathCss(f);var m=mxUtils.bind(this,function(){try{null!=
+"style"):d.createElement("style");d.setAttribute("type","text/css");mxUtils.setTextContent(d,c);f.appendChild(d)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(b,c,f){var d=mxClient.IS_FF?8192:16384;return Math.min(f,Math.min(d/b,d/c))};Editor.prototype.exportToCanvas=function(b,c,f,d,e,l,m,g,k,p,q,t,n,y,u,z,v,B){try{l=null!=l?l:!0;m=null!=m?m:!0;t=null!=t?t:this.graph;n=null!=n?n:0;var x=k?null:t.background;
+x==mxConstants.NONE&&(x=null);null==x&&(x=d);null==x&&0==k&&(x=z?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(t.getSvg(null,null,n,y,null,m,null,null,null,p,null,z,v,B),mxUtils.bind(this,function(f){try{var d=new Image;d.onload=mxUtils.bind(this,function(){try{var m=function(){mxClient.IS_SF?window.setTimeout(function(){y.drawImage(d,0,0);b(k,f)},0):(y.drawImage(d,0,0),b(k,f))},k=document.createElement("canvas"),p=parseInt(f.getAttribute("width")),q=parseInt(f.getAttribute("height"));
+g=null!=g?g:1;null!=c&&(g=l?Math.min(1,Math.min(3*c/(4*q),c/p)):c/p);g=this.getMaxCanvasScale(p,q,g);p=Math.ceil(g*p);q=Math.ceil(g*q);k.setAttribute("width",p);k.setAttribute("height",q);var y=k.getContext("2d");null!=x&&(y.beginPath(),y.rect(0,0,p,q),y.fillStyle=x,y.fill());1!=g&&y.scale(g,g);if(u){var z=t.view,v=z.scale;z.scale=1;var B=btoa(unescape(encodeURIComponent(z.createSvgGrid(z.gridColor))));z.scale=v;var B="data:image/svg+xml;base64,"+B,C=t.gridSize*z.gridSteps*g,D=t.getGraphBounds(),
+P=z.translate.x*v,G=z.translate.y*v,A=P+(D.x-P)/v-n,L=G+(D.y-G)/v-n,J=new Image;J.onload=function(){try{for(var b=-Math.round(C-mxUtils.mod((P-A)*g,C)),c=-Math.round(C-mxUtils.mod((G-L)*g,C));b<p;b+=C)for(var f=c;f<q;f+=C)y.drawImage(J,b/g,f/g);m()}catch(Aa){null!=e&&e(Aa)}};J.onerror=function(b){null!=e&&e(b)};J.src=B}else m()}catch(va){null!=e&&e(va)}});d.onerror=function(b){null!=e&&e(b)};p&&this.graph.addSvgShadow(f);this.graph.mathEnabled&&this.addMathCss(f);var m=mxUtils.bind(this,function(){try{null!=
this.resolvedFontCss&&this.addFontCss(f,this.resolvedFontCss),d.src=Editor.createSvgDataUri(mxUtils.getXml(f))}catch(ca){null!=e&&e(ca)}});this.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.addFontCss(f,b),this.loadFonts(m)}catch(ea){null!=e&&e(ea)}}))}catch(ca){null!=e&&e(ca)}}),f,q)}catch(ia){null!=e&&e(ia)}};Editor.crcTable=[];for(var g=0;256>g;g++)for(var k=g,n=0;8>n;n++)k=1==(k&1)?3988292384^k>>>1:k>>>1,Editor.crcTable[g]=k;Editor.updateCRC=function(b,c,f,d){for(var e=0;e<d;e++)b=
Editor.crcTable[(b^c.charCodeAt(f+e))&255]^b>>>8;return b};Editor.crc32=function(b){for(var c=-1,f=0;f<b.length;f++)c=c>>>8^Editor.crcTable[(c^b.charCodeAt(f))&255];return(c^-1)>>>0};Editor.writeGraphModelToPng=function(b,c,f,d,e){function l(b,c){var f=k;k+=c;return b.substring(f,k)}function m(b){b=l(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}function g(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}b=b.substring(b.indexOf(",")+
1);b=window.atob?atob(b):Base64.decode(b,!0);var k=0;if(l(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(l(b,4),"IHDR"!=l(b,4))null!=e&&e();else{l(b,17);e=b.substring(0,k);do{var p=m(b);if("IDAT"==l(b,4)){e=b.substring(0,k-8);"pHYs"==c&&"dpi"==f?(f=Math.round(d/.0254),f=g(f)+g(f)+String.fromCharCode(1)):f=f+String.fromCharCode(0)+("zTXt"==c?String.fromCharCode(0):"")+d;d=4294967295;d=Editor.updateCRC(d,c,0,4);d=Editor.updateCRC(d,f,0,f.length);e+=g(f.length)+
c+f+g(d^4294967295);e+=b.substring(k-8,b.length);break}e+=b.substring(k-8,k-4+p);l(b,p);l(b,4)}while(p);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var f=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(b,c){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var l=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=
function(){l.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(b,c){var f=null;null!=b.editor.graph.getModel().getParent(c)?f=c.getId():null!=b.currentPage&&(f=b.currentPage.getId());return f});if(null!=window.StyleFormatPanel){var m=Format.prototype.init;Format.prototype.init=function(){m.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var p=Format.prototype.refresh;
Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?p.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var b=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=b&&b.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(b){return!1};var q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(b){b=q.apply(this,arguments);
-this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var c=this.editorUi,f=c.editor.graph,d=this.createOption(mxResources.get("shadow"),function(){return f.shadowVisible},function(b){var d=new ChangePageSetup(c);d.ignoreColor=!0;d.ignoreImage=!0;d.shadowVisible=b;f.model.execute(d)},{install:function(b){this.listener=function(){b(f.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});Editor.shadowOptionEnabled||
+this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var c=this.editorUi,f=c.editor.graph,d=this.createOption(mxResources.get("shadow"),function(){return f.shadowVisible},function(b){var d=new ChangePageSetup(c);d.ignoreColor=!0;d.ignoreImage=!0;d.shadowVisible=b;f.model.execute(d)},{install:function(b){this.listener=function(){b(f.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});Editor.enableShadowOption||
(d.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(d,60));b.appendChild(d)}return b};var t=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(b){b=t.apply(this,arguments);var c=this.editorUi,f=c.editor.graph;if(f.isEnabled()){var d=c.getCurrentFile();if(null!=d&&d.isAutosaveOptional()){var e=this.createOption(mxResources.get("autosave"),function(){return c.editor.autosave},function(b){c.editor.setAutosave(b);c.editor.autosave&&
d.isModified()&&d.fileChanged()},{install:function(b){this.listener=function(){b(c.editor.autosave)};c.editor.addListener("autosaveChanged",this.listener)},destroy:function(){c.editor.removeListener(this.listener)}});b.appendChild(e)}}if(this.isMathOptionVisible()&&f.isEnabled()&&"undefined"!==typeof MathJax){e=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return f.mathEnabled},function(b){c.actions.get("mathematicalTypesetting").funct()},{install:function(b){this.listener=
function(){b(f.mathEnabled)};c.addListener("mathEnabledChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});e.style.paddingTop="5px";b.appendChild(e);var l=c.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");l.style.position="relative";l.style.marginLeft="6px";l.style.top="2px";e.appendChild(l)}return b};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
@@ -10393,16 +10417,16 @@ if(p.length>c)p=p.slice(0,c);else for(var n=p.length;n<c;n++)p.push(k);p=p.join(
f.style.top=l.y-e.y+"px";f.style.width=c.offsetWidth+"px";f.style.height=c.offsetHeight-(d?4:0)+"px";f.style.zIndex=5}function l(b,c,f){var e=document.createElement("div");e.style.width="32px";e.style.height="4px";e.style.margin="2px";e.style.border="1px solid black";e.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(q,function(l){this.editorUi.pickColor(c,function(c){e.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":
c;d(b,c,f)});mxEvent.consume(l)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(e);return btn}function m(b,c,f,e,l,m,g){null!=c&&(c=c.split(","),n.push({name:b,values:c,type:f,defVal:e,countProperty:l,parentRow:m,isDeletable:!0,flipBkg:g}));btn=mxUtils.button("+",mxUtils.bind(q,function(c){for(var k=m,q=0;null!=k.nextSibling;)if(k.nextSibling.getAttribute("data-pName")==b)k=k.nextSibling,q++;else break;var t={type:f,parentRow:m,index:q,isDeletable:!0,defVal:e,
countProperty:l},q=p(b,"",t,0==q%2,g);d(b,e,t);k.parentNode.insertBefore(q,k.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function g(b,c,f,d,e,l,m){if(0<e){var g=Array(e);c=null!=c?c.split(","):[];for(var k=0;k<e;k++)g[k]=null!=c[k]?c[k]:null!=d?d:"";n.push({name:b,values:g,type:f,defVal:d,parentRow:l,flipBkg:m,size:e})}return document.createElement("div")}function k(b,c,f){var e=document.createElement("input");e.type="checkbox";
-e.checked="1"==c;mxEvent.addListener(e,"change",function(){d(b,e.checked?"1":"0",f)});return e}function p(c,f,p,t,n){var y=p.dispName,u=p.type,v=document.createElement("tr");v.className="gePropRow"+(n?"Dark":"")+(t?"Alt":"")+" gePropNonHeaderRow";v.setAttribute("data-pName",c);v.setAttribute("data-pValue",f);t=!1;null!=p.index&&(v.setAttribute("data-index",p.index),y=(null!=y?y:"")+"["+p.index+"]",t=!0);var B=document.createElement("td");B.className="gePropRowCell";B.innerHTML=mxUtils.htmlEntities(mxResources.get(y,
-null,y));t&&(B.style.textAlign="right");v.appendChild(B);B=document.createElement("td");B.className="gePropRowCell";if("color"==u)B.appendChild(l(c,f,p));else if("bool"==u||"boolean"==u)B.appendChild(k(c,f,p));else if("enum"==u){var A=p.enumList;for(n=0;n<A.length;n++)if(y=A[n],y.val==f){B.innerHTML=mxUtils.htmlEntities(mxResources.get(y.dispName,null,y.dispName));break}mxEvent.addListener(B,"click",mxUtils.bind(q,function(){var l=document.createElement("select");e(B,l);for(var m=0;m<A.length;m++){var g=
-A[m],k=document.createElement("option");k.value=mxUtils.htmlEntities(g.val);k.innerHTML=mxUtils.htmlEntities(mxResources.get(g.dispName,null,g.dispName));l.appendChild(k)}l.value=f;b.appendChild(l);mxEvent.addListener(l,"change",function(){var b=mxUtils.htmlEntities(l.value);d(c,b,p)});l.focus();mxEvent.addListener(l,"blur",function(){b.removeChild(l)})}))}else"dynamicArr"==u?B.appendChild(m(c,f,p.subType,p.subDefVal,p.countProperty,v,n)):"staticArr"==u?B.appendChild(g(c,f,p.subType,p.subDefVal,p.size,
-v,n)):"readOnly"==u?(n=document.createElement("input"),n.setAttribute("readonly",""),n.value=f,n.style.width="96px",n.style.borderWidth="0px",B.appendChild(n)):(B.innerHTML=f,mxEvent.addListener(B,"click",mxUtils.bind(q,function(){function l(){var b=m.value,b=0==b.length&&"string"!=u?0:b;p.allowAuto&&(null!=b.trim&&"auto"==b.trim().toLowerCase()?(b="auto",u="string"):(b=parseFloat(b),b=isNaN(b)?0:b));null!=p.min&&b<p.min?b=p.min:null!=p.max&&b>p.max&&(b=p.max);b=mxUtils.htmlEntities(("int"==u?parseInt(b):
-b)+"");d(c,b,p)}var m=document.createElement("input");e(B,m,!0);m.value=f;m.className="gePropEditor";"int"!=u&&"float"!=u||p.allowAuto||(m.type="number",m.step="int"==u?"1":"any",null!=p.min&&(m.min=parseFloat(p.min)),null!=p.max&&(m.max=parseFloat(p.max)));b.appendChild(m);mxEvent.addListener(m,"keypress",function(b){13==b.keyCode&&l()});m.focus();mxEvent.addListener(m,"blur",function(){l()})})));p.isDeletable&&(n=mxUtils.button("-",mxUtils.bind(q,function(b){d(c,"",p,p.index);mxEvent.consume(b)})),
-n.style.height="16px",n.style.width="25px",n.style["float"]="right",n.className="geColorBtn",B.appendChild(n));v.appendChild(B);return v}var q=this,t=this.editorUi.editor.graph,n=[];b.style.position="relative";b.style.padding="0";var y=document.createElement("table");y.className="geProperties";y.style.whiteSpace="nowrap";y.style.width="100%";var u=document.createElement("tr");u.className="gePropHeader";var v=document.createElement("th");v.className="gePropHeaderCell";var B=document.createElement("img");
-B.src=Sidebar.prototype.expandedImage;v.appendChild(B);mxUtils.write(v,mxResources.get("property"));u.style.cursor="pointer";var A=function(){var c=y.querySelectorAll(".gePropNonHeaderRow"),f;if(q.editorUi.propertiesCollapsed){B.src=Sidebar.prototype.collapsedImage;f="none";for(var d=b.childNodes.length-1;0<=d;d--)try{var e=b.childNodes[d],l=e.nodeName.toUpperCase();"INPUT"!=l&&"SELECT"!=l||b.removeChild(e)}catch(ra){}}else B.src=Sidebar.prototype.expandedImage,f="";for(d=0;d<c.length;d++)c[d].style.display=
-f};mxEvent.addListener(u,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;A()});u.appendChild(v);v=document.createElement("th");v.className="gePropHeaderCell";v.innerHTML=mxResources.get("value");u.appendChild(v);y.appendChild(u);var x=!1,C=!1,u=null;1==f.vertices.length&&0==f.edges.length?u=f.vertices[0].id:0==f.vertices.length&&1==f.edges.length&&(u=f.edges[0].id);null!=u&&y.appendChild(p("id",mxUtils.htmlEntities(u),{dispName:"ID",type:"readOnly"},!0,!1));for(var D in c)if(u=
-c[D],"function"!=typeof u.isVisible||u.isVisible(f,this)){var z=null!=f.style[D]?mxUtils.htmlEntities(f.style[D]+""):null!=u.getDefaultValue?u.getDefaultValue(f,this):u.defVal;if("separator"==u.type)C=!C;else{if("staticArr"==u.type)u.size=parseInt(f.style[u.sizeProperty]||c[u.sizeProperty].defVal)||0;else if(null!=u.dependentProps){for(var G=u.dependentProps,L=[],O=[],v=0;v<G.length;v++){var E=f.style[G[v]];O.push(c[G[v]].subDefVal);L.push(null!=E?E.split(","):[])}u.dependentPropsDefVal=O;u.dependentPropsVals=
-L}y.appendChild(p(D,z,u,x,C));x=!x}}for(v=0;v<n.length;v++)for(u=n[v],c=u.parentRow,f=0;f<u.values.length;f++)D=p(u.name,u.values[f],{type:u.type,parentRow:u.parentRow,isDeletable:u.isDeletable,index:f,defVal:u.defVal,countProperty:u.countProperty,size:u.size},0==f%2,u.flipBkg),c.parentNode.insertBefore(D,c.nextSibling),c=D;b.appendChild(y);A();return b};StyleFormatPanel.prototype.addStyles=function(b){function c(b){mxEvent.addListener(b,"mouseenter",function(){b.style.opacity="1"});mxEvent.addListener(b,
+e.checked="1"==c;mxEvent.addListener(e,"change",function(){d(b,e.checked?"1":"0",f)});return e}function p(c,f,p,t,n){var y=p.dispName,u=p.type,z=document.createElement("tr");z.className="gePropRow"+(n?"Dark":"")+(t?"Alt":"")+" gePropNonHeaderRow";z.setAttribute("data-pName",c);z.setAttribute("data-pValue",f);t=!1;null!=p.index&&(z.setAttribute("data-index",p.index),y=(null!=y?y:"")+"["+p.index+"]",t=!0);var v=document.createElement("td");v.className="gePropRowCell";v.innerHTML=mxUtils.htmlEntities(mxResources.get(y,
+null,y));t&&(v.style.textAlign="right");z.appendChild(v);v=document.createElement("td");v.className="gePropRowCell";if("color"==u)v.appendChild(l(c,f,p));else if("bool"==u||"boolean"==u)v.appendChild(k(c,f,p));else if("enum"==u){var B=p.enumList;for(n=0;n<B.length;n++)if(y=B[n],y.val==f){v.innerHTML=mxUtils.htmlEntities(mxResources.get(y.dispName,null,y.dispName));break}mxEvent.addListener(v,"click",mxUtils.bind(q,function(){var l=document.createElement("select");e(v,l);for(var m=0;m<B.length;m++){var g=
+B[m],k=document.createElement("option");k.value=mxUtils.htmlEntities(g.val);k.innerHTML=mxUtils.htmlEntities(mxResources.get(g.dispName,null,g.dispName));l.appendChild(k)}l.value=f;b.appendChild(l);mxEvent.addListener(l,"change",function(){var b=mxUtils.htmlEntities(l.value);d(c,b,p)});l.focus();mxEvent.addListener(l,"blur",function(){b.removeChild(l)})}))}else"dynamicArr"==u?v.appendChild(m(c,f,p.subType,p.subDefVal,p.countProperty,z,n)):"staticArr"==u?v.appendChild(g(c,f,p.subType,p.subDefVal,p.size,
+z,n)):"readOnly"==u?(n=document.createElement("input"),n.setAttribute("readonly",""),n.value=f,n.style.width="96px",n.style.borderWidth="0px",v.appendChild(n)):(v.innerHTML=f,mxEvent.addListener(v,"click",mxUtils.bind(q,function(){function l(){var b=m.value,b=0==b.length&&"string"!=u?0:b;p.allowAuto&&(null!=b.trim&&"auto"==b.trim().toLowerCase()?(b="auto",u="string"):(b=parseFloat(b),b=isNaN(b)?0:b));null!=p.min&&b<p.min?b=p.min:null!=p.max&&b>p.max&&(b=p.max);b=mxUtils.htmlEntities(("int"==u?parseInt(b):
+b)+"");d(c,b,p)}var m=document.createElement("input");e(v,m,!0);m.value=f;m.className="gePropEditor";"int"!=u&&"float"!=u||p.allowAuto||(m.type="number",m.step="int"==u?"1":"any",null!=p.min&&(m.min=parseFloat(p.min)),null!=p.max&&(m.max=parseFloat(p.max)));b.appendChild(m);mxEvent.addListener(m,"keypress",function(b){13==b.keyCode&&l()});m.focus();mxEvent.addListener(m,"blur",function(){l()})})));p.isDeletable&&(n=mxUtils.button("-",mxUtils.bind(q,function(b){d(c,"",p,p.index);mxEvent.consume(b)})),
+n.style.height="16px",n.style.width="25px",n.style["float"]="right",n.className="geColorBtn",v.appendChild(n));z.appendChild(v);return z}var q=this,t=this.editorUi.editor.graph,n=[];b.style.position="relative";b.style.padding="0";var y=document.createElement("table");y.className="geProperties";y.style.whiteSpace="nowrap";y.style.width="100%";var u=document.createElement("tr");u.className="gePropHeader";var z=document.createElement("th");z.className="gePropHeaderCell";var v=document.createElement("img");
+v.src=Sidebar.prototype.expandedImage;z.appendChild(v);mxUtils.write(z,mxResources.get("property"));u.style.cursor="pointer";var B=function(){var c=y.querySelectorAll(".gePropNonHeaderRow"),f;if(q.editorUi.propertiesCollapsed){v.src=Sidebar.prototype.collapsedImage;f="none";for(var d=b.childNodes.length-1;0<=d;d--)try{var e=b.childNodes[d],l=e.nodeName.toUpperCase();"INPUT"!=l&&"SELECT"!=l||b.removeChild(e)}catch(ra){}}else v.src=Sidebar.prototype.expandedImage,f="";for(d=0;d<c.length;d++)c[d].style.display=
+f};mxEvent.addListener(u,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;B()});u.appendChild(z);z=document.createElement("th");z.className="gePropHeaderCell";z.innerHTML=mxResources.get("value");u.appendChild(z);y.appendChild(u);var x=!1,C=!1,u=null;1==f.vertices.length&&0==f.edges.length?u=f.vertices[0].id:0==f.vertices.length&&1==f.edges.length&&(u=f.edges[0].id);null!=u&&y.appendChild(p("id",mxUtils.htmlEntities(u),{dispName:"ID",type:"readOnly"},!0,!1));for(var D in c)if(u=
+c[D],"function"!=typeof u.isVisible||u.isVisible(f,this)){var A=null!=f.style[D]?mxUtils.htmlEntities(f.style[D]+""):null!=u.getDefaultValue?u.getDefaultValue(f,this):u.defVal;if("separator"==u.type)C=!C;else{if("staticArr"==u.type)u.size=parseInt(f.style[u.sizeProperty]||c[u.sizeProperty].defVal)||0;else if(null!=u.dependentProps){for(var G=u.dependentProps,L=[],P=[],z=0;z<G.length;z++){var E=f.style[G[z]];P.push(c[G[z]].subDefVal);L.push(null!=E?E.split(","):[])}u.dependentPropsDefVal=P;u.dependentPropsVals=
+L}y.appendChild(p(D,A,u,x,C));x=!x}}for(z=0;z<n.length;z++)for(u=n[z],c=u.parentRow,f=0;f<u.values.length;f++)D=p(u.name,u.values[f],{type:u.type,parentRow:u.parentRow,isDeletable:u.isDeletable,index:f,defVal:u.defVal,countProperty:u.countProperty,size:u.size},0==f%2,u.flipBkg),c.parentNode.insertBefore(D,c.nextSibling),c=D;b.appendChild(y);B();return b};StyleFormatPanel.prototype.addStyles=function(b){function c(b){mxEvent.addListener(b,"mouseenter",function(){b.style.opacity="1"});mxEvent.addListener(b,
"mouseleave",function(){b.style.opacity="0.5"})}var f=this.editorUi,d=f.editor.graph,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.paddingLeft="24px";e.style.paddingRight="20px";b.style.paddingLeft="16px";b.style.paddingBottom="6px";b.style.position="relative";b.appendChild(e);var l="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),m=document.createElement("div");
m.style.whiteSpace="nowrap";m.style.position="relative";m.style.textAlign="center";for(var g=[],k=0;k<this.defaultColorSchemes.length;k++){var p=document.createElement("div");p.style.display="inline-block";p.style.width="6px";p.style.height="6px";p.style.marginLeft="4px";p.style.marginRight="3px";p.style.borderRadius="3px";p.style.cursor="pointer";p.style.background="transparent";p.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(b){mxEvent.addListener(p,"click",mxUtils.bind(this,function(){q(b)}))})(k);
g.push(p);m.appendChild(p)}var q=mxUtils.bind(this,function(b){null!=this.format.currentScheme&&(g[this.format.currentScheme].style.background="transparent");this.format.currentScheme=b;t(this.defaultColorSchemes[this.format.currentScheme]);g[this.format.currentScheme].style.background="#84d7ff"}),t=mxUtils.bind(this,function(b){var c=mxUtils.bind(this,function(b){var c=mxUtils.button("",mxUtils.bind(this,function(c){d.getModel().beginUpdate();try{for(var e=this.format.getSelectionState().cells,m=
@@ -10425,7 +10449,7 @@ b[c].getAttribute("face"):b[c].style.fontFamily;null!=d&&Graph.addFont(d,f)}}};G
"mouseenter",b);mxEvent.addListener(this.container,"mousemove",b);mxEvent.addListener(this.container,"mouseleave",function(b){c=null});this.isMouseInsertPoint=function(){return null!=c};var f=this.getInsertPoint;this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):f.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(b){var c=this.graph.getCellStyle(b);if(null!=c){if("rack"==c.childLayout){var f=new mxStackLayout(this.graph,!1);f.gridSize=
null!=c.rackUnitSize?parseFloat(c.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;f.marginLeft=c.marginLeft||0;f.marginRight=c.marginRight||0;f.marginTop=c.marginTop||0;f.marginBottom=c.marginBottom||0;f.allowGaps=c.allowGaps||0;f.horizontal="1"==mxUtils.getValue(c,"horizontalRack","0");f.resizeParent=!1;f.fill=!0;return f}if("undefined"!==typeof mxTableLayout&&"tableLayout"==c.childLayout)return f=new mxTableLayout(this.graph),f.rows=c.tableRows||2,f.columns=c.tableColumns||
2,f.colPercentages=c.colPercentages,f.rowPercentages=c.rowPercentages,f.equalColumns="1"==mxUtils.getValue(c,"equalColumns",f.colPercentages?"0":"1"),f.equalRows="1"==mxUtils.getValue(c,"equalRows",f.rowPercentages?"0":"1"),f.resizeParent="1"==mxUtils.getValue(c,"resizeParent","1"),f.border=c.tableBorder||f.border,f.marginLeft=c.marginLeft||0,f.marginRight=c.marginRight||0,f.marginTop=c.marginTop||0,f.marginBottom=c.marginBottom||0,f.autoAddCol="1"==mxUtils.getValue(c,"autoAddCol","0"),f.autoAddRow=
-"1"==mxUtils.getValue(c,"autoAddRow",f.autoAddCol?"0":"1"),f.colWidths=c.colWidths||"100",f.rowHeights=c.rowHeights||"50",f}return d.apply(this,arguments)};this.updateGlobalUrlVariables()};var A=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(b){return Graph.processFontStyle(A.apply(this,arguments))};var z=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(b,c,f,d,e,l,m,g,k,p,q){z.apply(this,arguments);Graph.processFontAttributes(q)};
+"1"==mxUtils.getValue(c,"autoAddRow",f.autoAddCol?"0":"1"),f.colWidths=c.colWidths||"100",f.rowHeights=c.rowHeights||"50",f}return d.apply(this,arguments)};this.updateGlobalUrlVariables()};var B=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(b){return Graph.processFontStyle(B.apply(this,arguments))};var A=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(b,c,f,d,e,l,m,g,k,p,q){A.apply(this,arguments);Graph.processFontAttributes(q)};
var y=mxText.prototype.redraw;mxText.prototype.redraw=function(){y.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(b,c,f){function d(){for(var b=m.getSelectionCells(),c=[],f=0;f<b.length;f++)m.isCellVisible(b[f])&&c.push(b[f]);m.setSelectionCells(c)}function e(b){m.hiddenTags=b?[]:g.slice();d();m.refresh()}function l(b,f){p.innerHTML="";if(0<b.length){var l=document.createElement("table");l.setAttribute("cellpadding",
"2");l.style.boxSizing="border-box";l.style.tableLayout="fixed";l.style.width="100%";var k=document.createElement("tbody");if(null!=b&&0<b.length)for(var q=0;q<b.length;q++)(function(b){var l=0>mxUtils.indexOf(m.hiddenTags,b),p=document.createElement("tr"),q=document.createElement("td");q.style.align="center";q.style.width="16px";var t=document.createElement("img");t.setAttribute("src",l?Editor.visibleImage:Editor.hiddenImage);t.setAttribute("title",mxResources.get(l?"hideIt":"show",[b]));mxUtils.setOpacity(t,
l?75:25);t.style.verticalAlign="middle";t.style.cursor="pointer";t.style.width="16px";if(c||Editor.isDarkMode())t.style.filter="invert(100%)";q.appendChild(t);mxEvent.addListener(t,"click",function(c){var f=mxUtils.indexOf(m.hiddenTags,b);mxEvent.isShiftDown(c)?e(0<=mxUtils.indexOf(m.hiddenTags,b)):(0>f?m.hiddenTags.push(b):0<=f&&m.hiddenTags.splice(f,1),d(),m.refresh());mxEvent.consume(c)});p.appendChild(q);q=document.createElement("td");q.style.overflow="hidden";q.style.whiteSpace="nowrap";q.style.textOverflow=
@@ -10436,13 +10460,13 @@ if(c||Editor.isDarkMode())t.style.filter="invert(100%)";mxEvent.addListener(t,"c
"border-box";p.style.borderRadius="4px";p.style.userSelect="none";p.style.overflow="auto";p.style.position="absolute";p.style.left="10px";p.style.right="10px";p.style.top="10px";p.style.border=m.isEnabled()?"1px solid #808080":"none";p.style.bottom=m.isEnabled()?"48px":"10px";k.appendChild(p);var q=mxUtils.button(mxResources.get("reset"),function(b){m.hiddenTags=[];mxEvent.isShiftDown(b)||(g=m.hiddenTags.slice());d();m.refresh()});q.setAttribute("title",mxResources.get("reset"));q.className="geBtn";
q.style.margin="0 4px 0 0";var t=mxUtils.button(mxResources.get("add"),function(){null!=f&&f(g,function(b){g=b;n()})});t.setAttribute("title",mxResources.get("add"));t.className="geBtn";t.style.margin="0";m.addListener(mxEvent.ROOT,function(){g=m.hiddenTags.slice()});var n=mxUtils.bind(this,function(c,f){if(b()){for(var d=m.getAllTags(),e=0;e<d.length;e++)0>mxUtils.indexOf(g,d[e])&&g.push(d[e]);g.sort();m.isSelectionEmpty()?l(g):l(g,m.getCommonTagsForCells(m.getSelectionCells()))}});m.selectionModel.addListener(mxEvent.CHANGE,
n);m.model.addListener(mxEvent.CHANGE,n);m.addListener(mxEvent.REFRESH,n);var y=document.createElement("div");y.style.boxSizing="border-box";y.style.whiteSpace="nowrap";y.style.position="absolute";y.style.overflow="hidden";y.style.bottom="0px";y.style.height="42px";y.style.right="10px";y.style.left="10px";m.isEnabled()&&(y.appendChild(q),y.appendChild(t),k.appendChild(y));return{div:k,refresh:n}};Graph.prototype.getCustomFonts=function(){var b=this.extFonts,b=null!=b?b.slice():[],c;for(c in Graph.customFontElements){var f=
-Graph.customFontElements[c];b.push({name:f.name,url:f.url})}return b};Graph.prototype.setFont=function(b,c){Graph.addFont(b,c);document.execCommand("fontname",!1,b);if(null!=c){var f=this.cellEditor.textarea.getElementsByTagName("font");c=Graph.getFontUrl(b,c);for(var d=0;d<f.length;d++)f[d].getAttribute("face")==b&&f[d].getAttribute("data-font-src")!=c&&f[d].setAttribute("data-font-src",c)}};var B=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return B.apply(this,
+Graph.customFontElements[c];b.push({name:f.name,url:f.url})}return b};Graph.prototype.setFont=function(b,c){Graph.addFont(b,c);document.execCommand("fontname",!1,b);if(null!=c){var f=this.cellEditor.textarea.getElementsByTagName("font");c=Graph.getFontUrl(b,c);for(var d=0;d<f.length;d++)f[d].getAttribute("face")==b&&f[d].getAttribute("data-font-src")!=c&&f[d].setAttribute("data-font-src",c)}};var z=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return z.apply(this,
arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var b=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=b)for(var c in b)this.globalVars[c]=b[c]}catch(J){null!=window.console&&console.log("Error in vars URL parameter: "+J)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):
-{}};var C=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(b){var c=C.apply(this,arguments);null==c&&null!=this.globalVars&&(c=this.globalVars[b]);return c};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var b=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(b.ownerDocument)).decode(b)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var E=Graph.prototype.getSvg;Graph.prototype.getSvg=
-function(b,c,f,d,e,l,m,g,k,p,q,t,n,y){var u=null,v=null;t||null==this.themes||"darkTheme"!=this.defaultThemeName||(u=this.stylesheet,v=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":"#2a2a2a",this.stylesheet=this.getDefaultStylesheet(),this.refresh());var B=E.apply(this,arguments),A=this.getCustomFonts();if(q&&0<A.length){var x=B.ownerDocument,C=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"style"):x.createElement("style");
-null!=x.setAttributeNS?C.setAttributeNS("type","text/css"):C.setAttribute("type","text/css");for(var D="",z="",L=0;L<A.length;L++){var K=A[L].name,G=A[L].url;Graph.isCssFontUrl(G)?D+="@import url("+G+");\n":z+='@font-face {\nfont-family: "'+K+'";\nsrc: url("'+G+'");\n}\n'}C.appendChild(x.createTextNode(D+z));B.getElementsByTagName("defs")[0].appendChild(C)}null!=u&&(this.defaultPageBackgroundColor=v,this.stylesheet=u,this.refresh());return B};var F=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=
-function(){var b=F.apply(this,arguments);if(this.mathEnabled){var c=b.drawText;b.drawText=function(b,f){if(null!=b.text&&null!=b.text.value&&b.text.checkBounds()&&(mxUtils.isNode(b.text.value)||b.text.dialect==mxConstants.DIALECT_STRICTHTML)){var d=b.text.getContentNode();if(null!=d){d=d.cloneNode(!0);if(d.getElementsByTagNameNS)for(var e=d.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<e.length;)e[0].parentNode.removeChild(e[0]);null!=d.innerHTML&&(e=b.text.value,b.text.value=
-d.innerHTML,c.apply(this,arguments),b.text.value=e)}}else c.apply(this,arguments)}}return b};var I=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){I.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var b=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||
+{}};var C=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(b){var c=C.apply(this,arguments);null==c&&null!=this.globalVars&&(c=this.globalVars[b]);return c};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var b=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(b.ownerDocument)).decode(b)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var F=Graph.prototype.getSvg;Graph.prototype.getSvg=
+function(b,c,f,d,e,l,m,g,k,p,q,t,n,y){var u=null,z=null;t||null==this.themes||"darkTheme"!=this.defaultThemeName||(u=this.stylesheet,z=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":"#2a2a2a",this.stylesheet=this.getDefaultStylesheet(),this.refresh());var v=F.apply(this,arguments),B=this.getCustomFonts();if(q&&0<B.length){var x=v.ownerDocument,C=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"style"):x.createElement("style");
+null!=x.setAttributeNS?C.setAttributeNS("type","text/css"):C.setAttribute("type","text/css");for(var D="",A="",L=0;L<B.length;L++){var E=B[L].name,H=B[L].url;Graph.isCssFontUrl(H)?D+="@import url("+H+");\n":A+='@font-face {\nfont-family: "'+E+'";\nsrc: url("'+H+'");\n}\n'}C.appendChild(x.createTextNode(D+A));v.getElementsByTagName("defs")[0].appendChild(C)}null!=u&&(this.defaultPageBackgroundColor=z,this.stylesheet=u,this.refresh());return v};var E=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=
+function(){var b=E.apply(this,arguments);if(this.mathEnabled){var c=b.drawText;b.drawText=function(b,f){if(null!=b.text&&null!=b.text.value&&b.text.checkBounds()&&(mxUtils.isNode(b.text.value)||b.text.dialect==mxConstants.DIALECT_STRICTHTML)){var d=b.text.getContentNode();if(null!=d){d=d.cloneNode(!0);if(d.getElementsByTagNameNS)for(var e=d.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<e.length;)e[0].parentNode.removeChild(e[0]);null!=d.innerHTML&&(e=b.text.value,b.text.value=
+d.innerHTML,c.apply(this,arguments),b.text.value=e)}}else c.apply(this,arguments)}}return b};var H=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){H.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var b=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||
this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",b.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,b.ownerSVGElement))}};
Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&this.setBackgroundImage(this.backgroundImage)};var D=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){D.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(b){"data:action/json,"==b.substring(0,17)&&(b=JSON.parse(b.substring(17)),null!=b.actions&&this.executeCustomActions(b.actions))};Graph.prototype.executeCustomActions=
function(b,c){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var f=!1,d=0,e=0,l=mxUtils.bind(this,function(){f||(f=!0,this.model.beginUpdate())}),m=mxUtils.bind(this,function(){f&&(f=!1,this.model.endUpdate())}),g=mxUtils.bind(this,function(){0<
@@ -10454,7 +10478,7 @@ p.viewbox.border);0<t.length&&this.scrollCellToVisible(t[0]);if(null!=p.tags){t=
function(b,c){var f=this.getLinkForCell(c);null!=f&&"data:action/json,"==f.substring(0,17)&&this.setLinkForCell(c,this.updateCustomLink(b,f));if(this.isHtmlLabel(c)){var d=document.createElement("div");d.innerHTML=this.sanitizeHtml(this.getLabel(c));for(var e=d.getElementsByTagName("a"),l=!1,m=0;m<e.length;m++)f=e[m].getAttribute("href"),null!=f&&"data:action/json,"==f.substring(0,17)&&(e[m].setAttribute("href",this.updateCustomLink(b,f)),l=!0);l&&this.labelChanged(c,d.innerHTML)}};Graph.prototype.updateCustomLink=
function(b,c){if("data:action/json,"==c.substring(0,17))try{var f=JSON.parse(c.substring(17));null!=f.actions&&(this.updateCustomLinkActions(b,f.actions),c="data:action/json,"+JSON.stringify(f))}catch(W){}return c};Graph.prototype.updateCustomLinkActions=function(b,c){for(var f=0;f<c.length;f++){var d=c[f],e;for(e in d)this.updateCustomLinkAction(b,d[e],"cells"),this.updateCustomLinkAction(b,d[e],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(b,c,f){if(null!=c&&null!=c[f]){for(var d=
[],e=0;e<c[f].length;e++)if("*"==c[f][e])d.push(c[f][e]);else{var l=b[c[f][e]];null!=l?""!=l&&d.push(l):d.push(c[f][e])}c[f]=d}};Graph.prototype.getCellsForAction=function(b,c){var f=this.getCellsById(b.cells).concat(this.getCellsForTags(b.tags,null,c));if(null!=b.excludeCells){for(var d=[],e=0;e<f.length;e++)0>b.excludeCells.indexOf(f[e].id)&&d.push(f[e]);f=d}return f};Graph.prototype.getCellsById=function(b){var c=[];if(null!=b)for(var f=0;f<b.length;f++)if("*"==b[f])var d=this.model.getRoot(),
-c=c.concat(this.model.filterDescendants(function(b){return b!=d},d));else{var e=this.model.getCell(b[f]);null!=e&&c.push(e)}return c};var H=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(b){return H.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(b))};Graph.prototype.isAllTagsHidden=function(b){if(null==b||0==b.length||0==this.hiddenTags.length)return!1;b=b.split(" ");if(b.length>this.hiddenTags.length)return!1;for(var c=0;c<b.length;c++)if(0>mxUtils.indexOf(this.hiddenTags,
+c=c.concat(this.model.filterDescendants(function(b){return b!=d},d));else{var e=this.model.getCell(b[f]);null!=e&&c.push(e)}return c};var I=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(b){return I.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(b))};Graph.prototype.isAllTagsHidden=function(b){if(null==b||0==b.length||0==this.hiddenTags.length)return!1;b=b.split(" ");if(b.length>this.hiddenTags.length)return!1;for(var c=0;c<b.length;c++)if(0>mxUtils.indexOf(this.hiddenTags,
b[c]))return!1;return!0};Graph.prototype.getCellsForTags=function(b,c,f,d){var e=[];if(null!=b){c=null!=c?c:this.model.getDescendants(this.model.getRoot());for(var l=0,m={},g=0;g<b.length;g++)0<b[g].length&&(m[b[g]]=!0,l++);for(g=0;g<c.length;g++)if(f&&this.model.getParent(c[g])==this.model.root||this.model.isVertex(c[g])||this.model.isEdge(c[g])){var k=this.getTagsForCell(c[g]),p=!1;if(0<k.length&&(k=k.split(" "),k.length>=b.length)){for(var q=p=0;q<k.length&&p<l;q++)null!=m[k[q]]&&p++;p=p==l}p&&
(1!=d||this.isCellVisible(c[g]))&&e.push(c[g])}}return e};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(b){for(var c=null,f=[],d=0;d<b.length;d++){var e=this.getTagsForCell(b[d]),f=[];if(0<e.length){for(var e=e.split(" "),l={},m=0;m<e.length;m++)if(null==c||null!=c[e[m]])l[e[m]]=!0,f.push(e[m]);c=l}else return[]}return f};Graph.prototype.getTagsForCells=function(b){for(var c=[],f={},
d=0;d<b.length;d++){var e=this.getTagsForCell(b[d]);if(0<e.length)for(var e=e.split(" "),l=0;l<e.length;l++)null==f[e[l]]&&(f[e[l]]=!0,c.push(e[l]))}return c};Graph.prototype.getTagsForCell=function(b){return this.getAttributeForCell(b,"tags","")};Graph.prototype.addTagsForCells=function(b,c){if(0<b.length&&0<c.length){this.model.beginUpdate();try{for(var f=0;f<b.length;f++){for(var d=this.getTagsForCell(b[f]),e=d.split(" "),l=!1,m=0;m<c.length;m++){var g=mxUtils.trim(c[m]);""!=g&&0>mxUtils.indexOf(e,
@@ -10478,30 +10502,30 @@ mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupN
[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=
[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=
[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(b){var c=null;null!=b&&0<b.length&&("ER"==b.substring(0,2)?c="mxgraph.er":"sysML"==b.substring(0,5)&&(c="mxgraph.sysml"));return c};var K=mxMarker.createMarker;mxMarker.createMarker=function(b,c,f,d,e,l,m,g,k,p){if(null!=f&&null==mxMarker.markers[f]){var q=this.getPackageForType(f);null!=q&&mxStencilRegistry.getStencil(q)}return K.apply(this,arguments)};PrintDialog.prototype.create=function(b,c){function f(){y.value=Math.max(1,
-Math.min(g,Math.max(parseInt(y.value),parseInt(n.value))));n.value=Math.max(1,Math.min(g,Math.min(parseInt(y.value),parseInt(n.value))))}function d(c){function f(c,f,l){var m=c.useCssTransforms,g=c.currentTranslate,k=c.currentScale,p=c.view.translate,q=c.view.scale;c.useCssTransforms&&(c.useCssTransforms=!1,c.currentTranslate=new mxPoint(0,0),c.currentScale=1,c.view.translate=new mxPoint(0,0),c.view.scale=1);var t=c.getGraphBounds(),n=0,y=0,u=P.get(),v=1/c.pageScale,x=A.checked;if(x)var v=parseInt(M.value),
-C=parseInt(H.value),v=Math.min(u.height*C/(t.height/c.view.scale),u.width*v/(t.width/c.view.scale));else v=parseInt(B.value)/(100*c.pageScale),isNaN(v)&&(d=1/c.pageScale,B.value="100 %");u=mxRectangle.fromRectangle(u);u.width=Math.ceil(u.width*d);u.height=Math.ceil(u.height*d);v*=d;!x&&c.pageVisible?(t=c.getPageLayout(),n-=t.x*u.width,y-=t.y*u.height):x=!0;if(null==f){f=PrintDialog.createPrintPreview(c,v,u,0,n,y,x);f.pageSelector=!1;f.mathEnabled=!1;n=b.getCurrentFile();null!=n&&(f.title=n.getTitle());
+Math.min(g,Math.max(parseInt(y.value),parseInt(n.value))));n.value=Math.max(1,Math.min(g,Math.min(parseInt(y.value),parseInt(n.value))))}function d(c){function f(c,f,l){var m=c.useCssTransforms,g=c.currentTranslate,k=c.currentScale,p=c.view.translate,q=c.view.scale;c.useCssTransforms&&(c.useCssTransforms=!1,c.currentTranslate=new mxPoint(0,0),c.currentScale=1,c.view.translate=new mxPoint(0,0),c.view.scale=1);var t=c.getGraphBounds(),n=0,y=0,u=N.get(),z=1/c.pageScale,x=B.checked;if(x)var z=parseInt(M.value),
+C=parseInt(I.value),z=Math.min(u.height*C/(t.height/c.view.scale),u.width*z/(t.width/c.view.scale));else z=parseInt(v.value)/(100*c.pageScale),isNaN(z)&&(d=1/c.pageScale,v.value="100 %");u=mxRectangle.fromRectangle(u);u.width=Math.ceil(u.width*d);u.height=Math.ceil(u.height*d);z*=d;!x&&c.pageVisible?(t=c.getPageLayout(),n-=t.x*u.width,y-=t.y*u.height):x=!0;if(null==f){f=PrintDialog.createPrintPreview(c,z,u,0,n,y,x);f.pageSelector=!1;f.mathEnabled=!1;n=b.getCurrentFile();null!=n&&(f.title=n.getTitle());
var D=f.writeHead;f.writeHead=function(f){D.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)f.writeln('<style type="text/css">'),f.writeln(Editor.mathJaxWebkitCss),f.writeln("</style>");mxClient.IS_GC&&(f.writeln('<style type="text/css">'),f.writeln("@media print {"),f.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),f.writeln("}"),f.writeln("</style>"));null!=b.editor.fontCss&&(f.writeln('<style type="text/css">'),f.writeln(b.editor.fontCss),f.writeln("</style>"));for(var d=
-c.getCustomFonts(),e=0;e<d.length;e++){var l=d[e].name,m=d[e].url;Graph.isCssFontUrl(m)?f.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(m)+'" charset="UTF-8" type="text/css">'):(f.writeln('<style type="text/css">'),f.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(l)+'";\nsrc: url("'+mxUtils.htmlEntities(m)+'");\n}'),f.writeln("</style>"))}};if("undefined"!==typeof MathJax){var z=f.renderPage;f.renderPage=function(c,f,d,e,l,m){var g=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&
-!b.editor.useForeignObjectForMath?!0:b.editor.originalNoForeignObject;var k=z.apply(this,arguments);mxClient.NO_FO=g;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:k.className="geDisableMathJax";return k}}n=null;y=e.enableFlowAnimation;e.enableFlowAnimation=!1;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(n=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());f.open(null,null,l,!0);e.enableFlowAnimation=y;null!=n&&(e.stylesheet=n,e.refresh())}else{u=c.background;if(null==
-u||""==u||u==mxConstants.NONE)u="#ffffff";f.backgroundColor=u;f.autoOrigin=x;f.appendGraph(c,v,n,y,l,!0);l=c.getCustomFonts();if(null!=f.wnd)for(n=0;n<l.length;n++)y=l[n].name,x=l[n].url,Graph.isCssFontUrl(x)?f.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(x)+'" charset="UTF-8" type="text/css">'):(f.wnd.document.writeln('<style type="text/css">'),f.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(y)+'";\nsrc: url("'+mxUtils.htmlEntities(x)+'");\n}'),
-f.wnd.document.writeln("</style>"))}m&&(c.useCssTransforms=m,c.currentTranslate=g,c.currentScale=k,c.view.translate=p,c.view.scale=q);return f}var d=parseInt(G.value)/100;isNaN(d)&&(d=1,G.value="100 %");var d=.75*d,l=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(l=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());var m=n.value,g=y.value,p=!q.checked,t=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(b,q.checked,m,g,A.checked,M.value,H.value,parseInt(B.value)/100,parseInt(G.value)/
-100,P.get());else{p&&(p=m==k&&g==k);if(!p&&null!=b.pages&&b.pages.length){var u=0,p=b.pages.length-1;q.checked||(u=parseInt(m)-1,p=parseInt(g)-1);for(var v=u;v<=p;v++){var x=b.pages[v],m=x==b.currentPage?e:null;if(null==m){var m=b.createTemporaryGraph(e.stylesheet),g=!0,u=!1,C=null,D=null;null==x.viewState&&null==x.root&&b.updatePageRoot(x);null!=x.viewState&&(g=x.viewState.pageVisible,u=x.viewState.mathEnabled,C=x.viewState.background,D=x.viewState.backgroundImage,m.extFonts=x.viewState.extFonts);
-m.background=C;m.backgroundImage=null!=D?new mxImage(D.src,D.width,D.height):null;m.pageVisible=g;m.mathEnabled=u;var z=m.getGlobalVariable;m.getGlobalVariable=function(c){return"page"==c?x.getName():"pagenumber"==c?v+1:"pagecount"==c?null!=b.pages?b.pages.length:1:z.apply(this,arguments)};document.body.appendChild(m.container);b.updatePageRoot(x);m.model.setRoot(x.root)}t=f(m,t,v!=p);m!=e&&m.container.parentNode.removeChild(m.container)}}else t=f(e);null==t?b.handleError({message:mxResources.get("errorUpdatingPreview")}):
+c.getCustomFonts(),e=0;e<d.length;e++){var l=d[e].name,m=d[e].url;Graph.isCssFontUrl(m)?f.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(m)+'" charset="UTF-8" type="text/css">'):(f.writeln('<style type="text/css">'),f.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(l)+'";\nsrc: url("'+mxUtils.htmlEntities(m)+'");\n}'),f.writeln("</style>"))}};if("undefined"!==typeof MathJax){var A=f.renderPage;f.renderPage=function(c,f,d,e,l,m){var g=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&
+!b.editor.useForeignObjectForMath?!0:b.editor.originalNoForeignObject;var k=A.apply(this,arguments);mxClient.NO_FO=g;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:k.className="geDisableMathJax";return k}}n=null;y=e.enableFlowAnimation;e.enableFlowAnimation=!1;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(n=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());f.open(null,null,l,!0);e.enableFlowAnimation=y;null!=n&&(e.stylesheet=n,e.refresh())}else{u=c.background;if(null==
+u||""==u||u==mxConstants.NONE)u="#ffffff";f.backgroundColor=u;f.autoOrigin=x;f.appendGraph(c,z,n,y,l,!0);l=c.getCustomFonts();if(null!=f.wnd)for(n=0;n<l.length;n++)y=l[n].name,x=l[n].url,Graph.isCssFontUrl(x)?f.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(x)+'" charset="UTF-8" type="text/css">'):(f.wnd.document.writeln('<style type="text/css">'),f.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(y)+'";\nsrc: url("'+mxUtils.htmlEntities(x)+'");\n}'),
+f.wnd.document.writeln("</style>"))}m&&(c.useCssTransforms=m,c.currentTranslate=g,c.currentScale=k,c.view.translate=p,c.view.scale=q);return f}var d=parseInt(G.value)/100;isNaN(d)&&(d=1,G.value="100 %");var d=.75*d,l=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(l=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());var m=n.value,g=y.value,p=!q.checked,t=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(b,q.checked,m,g,B.checked,M.value,I.value,parseInt(v.value)/100,parseInt(G.value)/
+100,N.get());else{p&&(p=m==k&&g==k);if(!p&&null!=b.pages&&b.pages.length){var u=0,p=b.pages.length-1;q.checked||(u=parseInt(m)-1,p=parseInt(g)-1);for(var z=u;z<=p;z++){var x=b.pages[z],m=x==b.currentPage?e:null;if(null==m){var m=b.createTemporaryGraph(e.stylesheet),g=!0,u=!1,C=null,D=null;null==x.viewState&&null==x.root&&b.updatePageRoot(x);null!=x.viewState&&(g=x.viewState.pageVisible,u=x.viewState.mathEnabled,C=x.viewState.background,D=x.viewState.backgroundImage,m.extFonts=x.viewState.extFonts);
+m.background=C;m.backgroundImage=null!=D?new mxImage(D.src,D.width,D.height):null;m.pageVisible=g;m.mathEnabled=u;var A=m.getGlobalVariable;m.getGlobalVariable=function(c){return"page"==c?x.getName():"pagenumber"==c?z+1:"pagecount"==c?null!=b.pages?b.pages.length:1:A.apply(this,arguments)};document.body.appendChild(m.container);b.updatePageRoot(x);m.model.setRoot(x.root)}t=f(m,t,z!=p);m!=e&&m.container.parentNode.removeChild(m.container)}}else t=f(e);null==t?b.handleError({message:mxResources.get("errorUpdatingPreview")}):
(t.mathEnabled&&(p=t.wnd.document,c&&(t.wnd.IMMEDIATE_PRINT=!0),p.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),t.closeDocument(),!t.mathEnabled&&c&&PrintDialog.printPreview(t));null!=l&&(e.stylesheet=l,e.refresh())}}var e=b.editor.graph,l=document.createElement("div"),m=document.createElement("h3");m.style.width="100%";m.style.textAlign="center";m.style.marginTop="0px";mxUtils.write(m,c||mxResources.get("print"));l.appendChild(m);var g=1,k=1,p=
document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");p.appendChild(q);m=document.createElement("span");mxUtils.write(m,mxResources.get("printAllPages"));p.appendChild(m);mxUtils.br(p);var t=q.cloneNode(!0);q.setAttribute("checked","checked");
t.setAttribute("value","range");p.appendChild(t);m=document.createElement("span");mxUtils.write(m,mxResources.get("pages")+":");p.appendChild(m);var n=document.createElement("input");n.style.cssText="margin:0 8px 0 8px;";n.setAttribute("value","1");n.setAttribute("type","number");n.setAttribute("min","1");n.style.width="50px";p.appendChild(n);m=document.createElement("span");mxUtils.write(m,mxResources.get("to"));p.appendChild(m);var y=n.cloneNode(!0);p.appendChild(y);mxEvent.addListener(n,"focus",
-function(){t.checked=!0});mxEvent.addListener(y,"focus",function(){t.checked=!0});mxEvent.addListener(n,"change",f);mxEvent.addListener(y,"change",f);if(null!=b.pages&&(g=b.pages.length,null!=b.currentPage))for(m=0;m<b.pages.length;m++)if(b.currentPage==b.pages[m]){k=m+1;n.value=k;y.value=k;break}n.setAttribute("max",g);y.setAttribute("max",g);b.isPagesEnabled()?1<g&&(l.appendChild(p),t.checked=!0):t.checked=!0;var u=document.createElement("div");u.style.marginBottom="10px";var v=document.createElement("input");
-v.style.marginRight="8px";v.setAttribute("value","adjust");v.setAttribute("type","radio");v.setAttribute("name","printZoom");u.appendChild(v);m=document.createElement("span");mxUtils.write(m,mxResources.get("adjustTo"));u.appendChild(m);var B=document.createElement("input");B.style.cssText="margin:0 8px 0 8px;";B.setAttribute("value","100 %");B.style.width="50px";u.appendChild(B);mxEvent.addListener(B,"focus",function(){v.checked=!0});l.appendChild(u);var p=p.cloneNode(!1),A=v.cloneNode(!0);A.setAttribute("value",
-"fit");v.setAttribute("checked","checked");m=document.createElement("div");m.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";m.appendChild(A);p.appendChild(m);u=document.createElement("table");u.style.display="inline-block";var x=document.createElement("tbody"),C=document.createElement("tr"),D=C.cloneNode(!0),z=document.createElement("td"),L=z.cloneNode(!0),E=z.cloneNode(!0),K=z.cloneNode(!0),I=z.cloneNode(!0),F=z.cloneNode(!0);z.style.textAlign="right";K.style.textAlign=
-"right";mxUtils.write(z,mxResources.get("fitTo"));var M=document.createElement("input");M.style.cssText="margin:0 8px 0 8px;";M.setAttribute("value","1");M.setAttribute("min","1");M.setAttribute("type","number");M.style.width="40px";L.appendChild(M);m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsAcross"));E.appendChild(m);mxUtils.write(K,mxResources.get("fitToBy"));var H=M.cloneNode(!0);I.appendChild(H);mxEvent.addListener(M,"focus",function(){A.checked=!0});mxEvent.addListener(H,
-"focus",function(){A.checked=!0});m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsDown"));F.appendChild(m);C.appendChild(z);C.appendChild(L);C.appendChild(E);D.appendChild(K);D.appendChild(I);D.appendChild(F);x.appendChild(C);x.appendChild(D);u.appendChild(x);p.appendChild(u);l.appendChild(p);p=document.createElement("div");m=document.createElement("div");m.style.fontWeight="bold";m.style.marginBottom="12px";mxUtils.write(m,mxResources.get("paperSize"));p.appendChild(m);
-m=document.createElement("div");m.style.marginBottom="12px";var P=PageSetupDialog.addPageFormatPanel(m,"printdialog",b.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);p.appendChild(m);m=document.createElement("span");mxUtils.write(m,mxResources.get("pageScale"));p.appendChild(m);var G=document.createElement("input");G.style.cssText="margin:0 8px 0 8px;";G.setAttribute("value","100 %");G.style.width="60px";p.appendChild(G);l.appendChild(p);m=document.createElement("div");m.style.cssText=
+function(){t.checked=!0});mxEvent.addListener(y,"focus",function(){t.checked=!0});mxEvent.addListener(n,"change",f);mxEvent.addListener(y,"change",f);if(null!=b.pages&&(g=b.pages.length,null!=b.currentPage))for(m=0;m<b.pages.length;m++)if(b.currentPage==b.pages[m]){k=m+1;n.value=k;y.value=k;break}n.setAttribute("max",g);y.setAttribute("max",g);b.isPagesEnabled()?1<g&&(l.appendChild(p),t.checked=!0):t.checked=!0;var u=document.createElement("div");u.style.marginBottom="10px";var z=document.createElement("input");
+z.style.marginRight="8px";z.setAttribute("value","adjust");z.setAttribute("type","radio");z.setAttribute("name","printZoom");u.appendChild(z);m=document.createElement("span");mxUtils.write(m,mxResources.get("adjustTo"));u.appendChild(m);var v=document.createElement("input");v.style.cssText="margin:0 8px 0 8px;";v.setAttribute("value","100 %");v.style.width="50px";u.appendChild(v);mxEvent.addListener(v,"focus",function(){z.checked=!0});l.appendChild(u);var p=p.cloneNode(!1),B=z.cloneNode(!0);B.setAttribute("value",
+"fit");z.setAttribute("checked","checked");m=document.createElement("div");m.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";m.appendChild(B);p.appendChild(m);u=document.createElement("table");u.style.display="inline-block";var x=document.createElement("tbody"),C=document.createElement("tr"),D=C.cloneNode(!0),A=document.createElement("td"),L=A.cloneNode(!0),E=A.cloneNode(!0),F=A.cloneNode(!0),H=A.cloneNode(!0),K=A.cloneNode(!0);A.style.textAlign="right";F.style.textAlign=
+"right";mxUtils.write(A,mxResources.get("fitTo"));var M=document.createElement("input");M.style.cssText="margin:0 8px 0 8px;";M.setAttribute("value","1");M.setAttribute("min","1");M.setAttribute("type","number");M.style.width="40px";L.appendChild(M);m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsAcross"));E.appendChild(m);mxUtils.write(F,mxResources.get("fitToBy"));var I=M.cloneNode(!0);H.appendChild(I);mxEvent.addListener(M,"focus",function(){B.checked=!0});mxEvent.addListener(I,
+"focus",function(){B.checked=!0});m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsDown"));K.appendChild(m);C.appendChild(A);C.appendChild(L);C.appendChild(E);D.appendChild(F);D.appendChild(H);D.appendChild(K);x.appendChild(C);x.appendChild(D);u.appendChild(x);p.appendChild(u);l.appendChild(p);p=document.createElement("div");m=document.createElement("div");m.style.fontWeight="bold";m.style.marginBottom="12px";mxUtils.write(m,mxResources.get("paperSize"));p.appendChild(m);
+m=document.createElement("div");m.style.marginBottom="12px";var N=PageSetupDialog.addPageFormatPanel(m,"printdialog",b.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);p.appendChild(m);m=document.createElement("span");mxUtils.write(m,mxResources.get("pageScale"));p.appendChild(m);var G=document.createElement("input");G.style.cssText="margin:0 8px 0 8px;";G.setAttribute("value","100 %");G.style.width="60px";p.appendChild(G);l.appendChild(p);m=document.createElement("div");m.style.cssText=
"text-align:right;margin:48px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";b.editor.cancelFirst&&m.appendChild(p);b.isOffline()||(u=mxUtils.button(mxResources.get("help"),function(){e.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),u.className="geBtn",m.appendChild(u));PrintDialog.previewEnabled&&(u=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();d(!1)}),u.className="geBtn",m.appendChild(u));u=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?
"print":"ok"),function(){b.hideDialog();d(!0)});u.className="geBtn gePrimaryBtn";m.appendChild(u);b.editor.cancelFirst||m.appendChild(p);l.appendChild(m);this.container=l};var M=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var b=this.image;null!=b&&null!=b.src&&Graph.isPageLink(b.src)&&
(b={originalSrc:b.src});this.page.viewState.backgroundImage=b}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else M.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 L=document.createElement("canvas"),P=new Image;P.onload=function(){try{L.getContext("2d").drawImage(P,0,0);var b=L.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=b&&6<b.length}catch(G){}};P.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(O){}})();
+this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var L=document.createElement("canvas"),N=new Image;N.onload=function(){try{L.getContext("2d").drawImage(N,0,0);var b=L.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=b&&6<b.length}catch(G){}};N.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(P){}})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(b,d,c){c.ui=b.ui;return d};b.afterDecode=function(b,d,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(b,d,c){c.ui=b.ui;return d};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="15.2.7";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(b,d,c){c.ui=b.ui;return d};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="15.2.9";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=
!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,
noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(b,c,d,e,g,k,n){k=null!=k?k:0<=b.indexOf("NetworkError")||0<=b.indexOf("SecurityError")||0<=b.indexOf("NS_ERROR_FAILURE")||0<=b.indexOf("out of memory")?"CONFIG":
@@ -10525,11 +10549,11 @@ c&&g.selectPage(g.pages[0])};if(39==b.keyCode)return function(){c<g.pages.length
15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var g=mxUtils.parseXml(b),k=this.editor.extractGraphModel(g.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),c=null!=k?mxUtils.getXml(k):""}catch(u){}return c};EditorUi.prototype.validateFileData=function(b){if(null!=b&&0<b.length){var c=b.indexOf('<meta charset="utf-8">');0<=c&&(b=b.slice(0,c)+'<meta charset="utf-8"/>'+b.slice(c+23-1,b.length));b=Graph.zapGremlins(b)}return b};
EditorUi.prototype.replaceFileData=function(b){b=this.validateFileData(b);b=null!=b&&0<b.length?mxUtils.parseXml(b).documentElement:null;var c=null!=b?this.editor.extractGraphModel(b,!0):null;null!=c&&(b=c);if(null!=b){c=this.editor.graph;c.model.beginUpdate();try{var f=null!=this.pages?this.pages.slice():null,d=b.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=b;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-
1;0<=e;e--){var g=this.updatePageRoot(new DiagramPage(d[e]));null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,g,0==e?g:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),
-this.editor.setGraphXml(b),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=f)for(e=0;e<f.length;e++)c.model.execute(new ChangePage(this,f[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(b,c,d,e,g,k,n,v,x,A,z){c=null!=c?c:this.editor.graph;g=null!=g?g:!1;x=null!=x?x:!0;var f,l=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?f="_blank":l=f=e;if(null==b)return"";var m=b;if("mxfile"!=m.nodeName.toLowerCase()){if(z){var p=
-b.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());p.appendChild(b)}else{p=Graph.zapGremlins(mxUtils.getXml(b));m=Graph.compress(p);if(Graph.decompress(m)!=p)return p;p=b.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,m)}m=b.ownerDocument.createElement("mxfile");m.appendChild(p)}A?(m=m.cloneNode(!0),m.removeAttribute("modified"),m.removeAttribute("host"),m.removeAttribute("agent"),m.removeAttribute("etag"),m.removeAttribute("userAgent"),
+this.editor.setGraphXml(b),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=f)for(e=0;e<f.length;e++)c.model.execute(new ChangePage(this,f[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(b,c,d,e,g,k,n,v,x,B,A){c=null!=c?c:this.editor.graph;g=null!=g?g:!1;x=null!=x?x:!0;var f,l=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?f="_blank":l=f=e;if(null==b)return"";var m=b;if("mxfile"!=m.nodeName.toLowerCase()){if(A){var p=
+b.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());p.appendChild(b)}else{p=Graph.zapGremlins(mxUtils.getXml(b));m=Graph.compress(p);if(Graph.decompress(m)!=p)return p;p=b.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,m)}m=b.ownerDocument.createElement("mxfile");m.appendChild(p)}B?(m=m.cloneNode(!0),m.removeAttribute("modified"),m.removeAttribute("host"),m.removeAttribute("agent"),m.removeAttribute("etag"),m.removeAttribute("userAgent"),
m.removeAttribute("version"),m.removeAttribute("editor"),m.removeAttribute("type")):(m.removeAttribute("userAgent"),m.removeAttribute("version"),m.removeAttribute("editor"),m.removeAttribute("pages"),m.removeAttribute("type"),mxClient.IS_CHROMEAPP?m.setAttribute("host","Chrome"):EditorUi.isElectronApp?m.setAttribute("host","Electron"):m.setAttribute("host",window.location.hostname),m.setAttribute("modified",(new Date).toISOString()),m.setAttribute("agent",navigator.appVersion),m.setAttribute("version",
-EditorUi.VERSION),m.setAttribute("etag",Editor.guid()),b=null!=d?d.getMode():this.mode,null!=b&&m.setAttribute("type",b),1<m.getElementsByTagName("diagram").length&&null!=this.pages&&m.setAttribute("pages",this.pages.length));z=z?mxUtils.getPrettyXml(m):mxUtils.getXml(m);if(!k&&!g&&(n||null!=d&&/(\.html)$/i.test(d.getTitle())))z=this.getHtml2(mxUtils.getXml(m),c,null!=d?d.getTitle():null,f,l);else if(k||!g&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=
-App.MODE_BROWSER||(e=null),z=this.getEmbeddedSvg(z,c,e,null,v,x,l);return z};EditorUi.prototype.getXmlFileData=function(b,c,d,e){b=null!=b?b:!0;c=null!=c?c:!1;d=null!=d?d:!Editor.compressXml;var f=this.editor.getGraphXml(b,e);if(b&&null!=this.fileNode&&null!=this.currentPage)if(b=function(b){var c=b.getElementsByTagName("mxGraphModel"),c=0<c.length?c[0]:null;null==c&&d?(c=mxUtils.trim(mxUtils.getTextContent(b)),b=b.cloneNode(!1),0<c.length&&(c=Graph.decompress(c),null!=c&&0<c.length&&b.appendChild(mxUtils.parseXml(c).documentElement))):
+EditorUi.VERSION),m.setAttribute("etag",Editor.guid()),b=null!=d?d.getMode():this.mode,null!=b&&m.setAttribute("type",b),1<m.getElementsByTagName("diagram").length&&null!=this.pages&&m.setAttribute("pages",this.pages.length));A=A?mxUtils.getPrettyXml(m):mxUtils.getXml(m);if(!k&&!g&&(n||null!=d&&/(\.html)$/i.test(d.getTitle())))A=this.getHtml2(mxUtils.getXml(m),c,null!=d?d.getTitle():null,f,l);else if(k||!g&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=
+App.MODE_BROWSER||(e=null),A=this.getEmbeddedSvg(A,c,e,null,v,x,l);return A};EditorUi.prototype.getXmlFileData=function(b,c,d,e){b=null!=b?b:!0;c=null!=c?c:!1;d=null!=d?d:!Editor.compressXml;var f=this.editor.getGraphXml(b,e);if(b&&null!=this.fileNode&&null!=this.currentPage)if(b=function(b){var c=b.getElementsByTagName("mxGraphModel"),c=0<c.length?c[0]:null;null==c&&d?(c=mxUtils.trim(mxUtils.getTextContent(b)),b=b.cloneNode(!1),0<c.length&&(c=Graph.decompress(c),null!=c&&0<c.length&&b.appendChild(mxUtils.parseXml(c).documentElement))):
null==c||d?b=b.cloneNode(!0):(b=b.cloneNode(!1),mxUtils.setTextContent(b,Graph.compressNode(c)));f.appendChild(b)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(f)),f=this.fileNode.cloneNode(!1),c)b(this.currentPage.node);else for(c=0;c<this.pages.length;c++){var l=this.pages[c],m=l.node;if(l!=this.currentPage)if(l.needsUpdate){var g=new mxCodec(mxUtils.createXmlDocument()),g=g.encode(new mxGraphModel(l.root));this.editor.graph.saveViewState(l.viewState,
g,null,e);EditorUi.removeChildNodes(m);mxUtils.setTextContent(m,Graph.compressNode(g));delete l.needsUpdate}else e&&(this.updatePageRoot(l),null!=l.viewState.backgroundImage&&(null!=l.viewState.backgroundImage.originalSrc?l.viewState.backgroundImage=this.createImageForPageLink(l.viewState.backgroundImage.originalSrc,l):Graph.isPageLink(l.viewState.backgroundImage.src)&&(l.viewState.backgroundImage=this.createImageForPageLink(l.viewState.backgroundImage.src,l))),null!=l.viewState.backgroundImage&&
null!=l.viewState.backgroundImage.originalSrc&&(g=new mxCodec(mxUtils.createXmlDocument()),g=g.encode(new mxGraphModel(l.root)),this.editor.graph.saveViewState(l.viewState,g,null,e),m=m.cloneNode(!1),mxUtils.setTextContent(m,Graph.compressNode(g))));b(m)}return f};EditorUi.prototype.anonymizeString=function(b,c){for(var f=[],d=0;d<b.length;d++){var e=b.charAt(d);0<=EditorUi.ignoredAnonymizedChars.indexOf(e)?f.push(e):isNaN(parseInt(e))?e.toLowerCase()!=e?f.push(String.fromCharCode(65+Math.round(25*
@@ -10539,8 +10563,8 @@ b[EditorUi.DIFF_INSERT][c].data=mxUtils.getXml(f)}catch(t){b[EditorUi.DIFF_INSER
b.setAttribute(b.attributes[f].name,this.anonymizeString(b.attributes[f].value,c));if(null!=b.childNodes)for(f=0;f<b.childNodes.length;f++)this.anonymizeAttributes(b.childNodes[f],c)};EditorUi.prototype.anonymizeNode=function(b,c){for(var f=b.getElementsByTagName("mxCell"),d=0;d<f.length;d++)null!=f[d].getAttribute("value")&&f[d].setAttribute("value","["+f[d].getAttribute("value").length+"]"),null!=f[d].getAttribute("xmlValue")&&f[d].setAttribute("xmlValue","["+f[d].getAttribute("xmlValue").length+
"]"),null!=f[d].getAttribute("style")&&f[d].setAttribute("style","["+f[d].getAttribute("style").length+"]"),null!=f[d].parentNode&&"root"!=f[d].parentNode.nodeName&&null!=f[d].parentNode.parentNode&&(f[d].setAttribute("id",f[d].parentNode.getAttribute("id")),f[d].parentNode.parentNode.replaceChild(f[d],f[d].parentNode));return b};EditorUi.prototype.synchronizeCurrentFile=function(b){var c=this.getCurrentFile();null!=c&&(c.savingFile?this.handleError({message:mxResources.get("busy")}):!b&&c.invalidChecksum?
c.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(c.clearAutosave(),this.editor.setStatus(""),b?c.reloadFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){c.handleFileError(b,!0)})):c.synchronizeFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){c.handleFileError(b,!0)}))))};EditorUi.prototype.getFileData=function(b,c,d,e,g,k,n,
-v,x,A,z){g=null!=g?g:!0;k=null!=k?k:!1;var f=this.editor.graph;if(c||!b&&null!=x&&/(\.svg)$/i.test(x.getTitle())){var l=null!=f.themes&&"darkTheme"==f.defaultThemeName;A=!1;if(l||null!=this.pages&&this.currentPage!=this.pages[0]){var m=f.getGlobalVariable,f=this.createTemporaryGraph(f.getStylesheet()),p=this.pages[0];f.getGlobalVariable=function(b){return"page"==b?p.getName():"pagenumber"==b?1:m.apply(this,arguments)};document.body.appendChild(f.container);f.model.setRoot(p.root)}}n=null!=n?n:this.getXmlFileData(g,
-k,A,z);x=null!=x?x:this.getCurrentFile();b=this.createFileData(n,f,x,window.location.href,b,c,d,e,g,v,A);f!=this.editor.graph&&f.container.parentNode.removeChild(f.container);return b};EditorUi.prototype.getHtml=function(b,c,d,e,g,k){k=null!=k?k:!0;var f=null,l=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=c){var f=k?c.getGraphBounds():c.getBoundingBox(c.getSelectionCells()),m=c.view.scale;k=Math.floor(f.x/m-c.view.translate.x);m=Math.floor(f.y/m-c.view.translate.y);f=c.background;null==g&&
+v,x,B,A){g=null!=g?g:!0;k=null!=k?k:!1;var f=this.editor.graph;if(c||!b&&null!=x&&/(\.svg)$/i.test(x.getTitle())){var l=null!=f.themes&&"darkTheme"==f.defaultThemeName;B=!1;if(l||null!=this.pages&&this.currentPage!=this.pages[0]){var m=f.getGlobalVariable,f=this.createTemporaryGraph(f.getStylesheet()),p=this.pages[0];f.getGlobalVariable=function(b){return"page"==b?p.getName():"pagenumber"==b?1:m.apply(this,arguments)};document.body.appendChild(f.container);f.model.setRoot(p.root)}}n=null!=n?n:this.getXmlFileData(g,
+k,B,A);x=null!=x?x:this.getCurrentFile();b=this.createFileData(n,f,x,window.location.href,b,c,d,e,g,v,B);f!=this.editor.graph&&f.container.parentNode.removeChild(f.container);return b};EditorUi.prototype.getHtml=function(b,c,d,e,g,k){k=null!=k?k:!0;var f=null,l=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=c){var f=k?c.getGraphBounds():c.getBoundingBox(c.getSelectionCells()),m=c.view.scale;k=Math.floor(f.x/m-c.view.translate.x);m=Math.floor(f.y/m-c.view.translate.y);f=c.background;null==g&&
(c=this.getBasenames().join(";"),0<c.length&&(l=EditorUi.drawHost+"/embed.js?s="+c));b.setAttribute("x0",k);b.setAttribute("y0",m)}null!=b&&(b.setAttribute("pan","1"),b.setAttribute("zoom","1"),b.setAttribute("resize","0"),b.setAttribute("fit","0"),b.setAttribute("border","20"),b.setAttribute("links","1"),null!=e&&b.setAttribute("edit",e));null!=g&&(g=g.replace(/&/g,"&amp;"));b=null!=b?Graph.zapGremlins(mxUtils.getXml(b)):"";e=Graph.compress(b);Graph.decompress(e)!=b&&(e=encodeURIComponent(b));return(null==
g?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=g?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==g?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=g?'<meta http-equiv="refresh" content="0;URL=\''+g+"'\"/>\n":"")+"</head>\n<body"+(null==g&&null!=f&&f!=mxConstants.NONE?' style="background-color:'+f+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+
e+"</div>\n</div>\n"+(null==g?'<script type="text/javascript" src="'+l+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+g+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(b,c,d,e,g){c=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=g&&(g=g.replace(/&/g,"&amp;"));b={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,
@@ -10550,134 +10574,133 @@ function(b){b=this.validateFileData(b);this.pages=this.fileNode=this.currentPage
null;this.fileNode=b;this.pages=[];for(var d=0;d<c.length;d++)null==c[d].getAttribute("id")&&c[d].setAttribute("id",d),b=new DiagramPage(c[d]),null==b.getName()&&b.setName(mxResources.get("pageWithNumber",[d+1])),this.pages.push(b),null!=urlParams["page-id"]&&b.getId()==urlParams["page-id"]&&(f=b);this.currentPage=null!=f?f:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];b=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=b&&(this.fileNode=b.ownerDocument.createElement("mxfile"),
this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var e=urlParams["layer-ids"].split(" ");b={};for(d=0;d<e.length;d++)b[e[d]]=!0;for(var g=this.editor.graph.getModel(),k=g.getChildren(g.root),d=0;d<k.length;d++){var n=k[d];g.setVisible(n,b[n.id]||
!1)}}catch(x){}};EditorUi.prototype.getBaseFilename=function(b){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(c)||/(\.html)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.png)$/i.test(c))c=c.substring(0,c.lastIndexOf("."));/(\.drawio)$/i.test(c)&&(c=c.substring(0,c.lastIndexOf(".")));!b&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(c=c+"-"+
-this.currentPage.getName());return c};EditorUi.prototype.downloadFile=function(b,c,d,e,g,k,n,v,x,A,z,y){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var f=this.getBaseFilename(!g),l=f+("xml"==b||"pdf"==b&&z?".drawio":"")+"."+b;if("xml"==b){var m='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,e,g,null,null,null,c);this.saveData(l,b,m,"text/xml")}else if("html"==b)m=this.getHtml2(this.getFileData(!0),this.editor.graph,f),this.saveData(l,b,m,"text/html");else if("svg"!=
-b&&"xmlsvg"!=b||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==b?l=f+".png":"jpeg"==b&&(l=f+".jpg"),this.saveRequest(l,b,mxUtils.bind(this,function(c,f){try{var d=this.editor.graph.pageVisible;null!=k&&(this.editor.graph.pageVisible=k);var l=this.createDownloadRequest(c,b,e,f,n,g,v,x,A,z,y);this.editor.graph.pageVisible=d;return l}catch(O){this.handleError(O)}}));else{var p=null,q=mxUtils.bind(this,function(b){b.length<=MAX_REQUEST_SIZE?this.saveData(l,"svg",b,"image/svg+xml"):
-this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==b){var t=this.editor.graph.background;if(n||t==mxConstants.NONE)t=null;var u=this.editor.graph.getSvg(t,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(u);this.editor.convertImages(u,mxUtils.bind(this,mxUtils.bind(this,function(b){this.spinner.stop();q('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
-mxUtils.getXml(b))})))}else l=f+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(b){this.spinner.stop();q(b)}),e)}}catch(K){this.handleError(K)}};EditorUi.prototype.createDownloadRequest=function(b,c,d,e,g,k,n,v,x,A,z){var f=this.editor.graph,l=f.getGraphBounds();d=this.getFileData(!0,null,null,null,d,0==k?!1:"xmlpng"!=c,null,null,null,!1,"pdf"==c);var m="",p="";if(l.width*l.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};A=A?"1":"0";"pdf"==
-c&&(null!=z?p="&from="+z.from+"&to="+z.to:0==k&&(p="&allPages=1"));if("xmlpng"==c&&(A="1",c="png",null!=this.pages&&null!=this.currentPage))for(k=0;k<this.pages.length;k++)if(this.pages[k]==this.currentPage){m="&from="+k;break}k=f.background;"png"!=c&&"pdf"!=c||!g?g||null!=k&&k!=mxConstants.NONE||(k="#ffffff"):k=mxConstants.NONE;g={globalVars:f.getExportVariables()};x&&(g.grid={size:f.gridSize,steps:f.view.gridSteps,color:f.view.gridColor});Graph.translateDiagram&&(g.diagramLanguage=Graph.diagramLanguage);
-return new mxXmlRequest(EXPORT_URL,"format="+c+m+p+"&bg="+(null!=k?k:mxConstants.NONE)+"&base64="+e+"&embedXml="+A+"&xml="+encodeURIComponent(d)+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(g))+(null!=n?"&scale="+n:"")+(null!=v?"&border="+v:""))};EditorUi.prototype.setMode=function(b,c){this.mode=b};EditorUi.prototype.loadDescriptor=function(b,c,d){var f=window.location.hash,e=mxUtils.bind(this,function(d){var e=null!=b.data?b.data:"";null!=d&&0<d.length&&
-(0<e.length&&(e+="\n"),e+=d);d=new LocalFile(this,"csv"!=b.format&&0<e.length?e:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);d.getHash=function(){return f};this.fileLoaded(d);"csv"==b.format&&this.importCsv(e,mxUtils.bind(this,function(b){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=b.update){var l=null!=b.interval?parseInt(b.interval):6E4,m=null,g=mxUtils.bind(this,function(){var c=this.currentPage;
-mxUtils.post(b.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(b){c===this.currentPage&&(200<=b.getStatus()&&300>=b.getStatus()?(this.updateDiagram(b.getText()),k()):this.handleError({message:mxResources.get("error")+" "+b.getStatus()}))}),mxUtils.bind(this,function(b){this.handleError(b)}))}),k=mxUtils.bind(this,function(){window.clearTimeout(m);m=window.setTimeout(g,l)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){k();
-g()}));k();g()}null!=c&&c()});null!=b.url&&0<b.url.length?this.editor.loadUrl(b.url,mxUtils.bind(this,function(b){e(b)}),mxUtils.bind(this,function(b){null!=d&&d(b)})):e("")};EditorUi.prototype.updateDiagram=function(b){function c(b){var c=new mxCellOverlay(b.image||e.warningImage,b.tooltip,b.align,b.valign,b.offset);c.addListener(mxEvent.CLICK,function(c,f){d.alert(b.tooltip)});return c}var f=null,d=this;if(null!=b&&0<b.length&&(f=mxUtils.parseXml(b),b=null!=f?f.documentElement:null,null!=b&&"updates"==
-b.nodeName)){var e=this.editor.graph,g=e.getModel();g.beginUpdate();var k=null;try{for(b=b.firstChild;null!=b;){if("update"==b.nodeName){var n=g.getCell(b.getAttribute("id"));if(null!=n){try{var x=b.getAttribute("value");if(null!=x){var A=mxUtils.parseXml(x).documentElement;if(null!=A)if("1"==A.getAttribute("replace-value"))g.setValue(n,A);else for(var z=A.attributes,y=0;y<z.length;y++)e.setAttributeForCell(n,z[y].nodeName,0<z[y].nodeValue.length?z[y].nodeValue:null)}}catch(K){null!=window.console&&
-console.log("Error in value for "+n.id+": "+K)}try{var B=b.getAttribute("style");null!=B&&e.model.setStyle(n,B)}catch(K){null!=window.console&&console.log("Error in style for "+n.id+": "+K)}try{var C=b.getAttribute("icon");if(null!=C){var E=0<C.length?JSON.parse(C):null;null!=E&&E.append||e.removeCellOverlays(n);null!=E&&e.addCellOverlay(n,c(E))}}catch(K){null!=window.console&&console.log("Error in icon for "+n.id+": "+K)}try{var F=b.getAttribute("geometry");if(null!=F){var F=JSON.parse(F),I=e.getCellGeometry(n);
-if(null!=I){I=I.clone();for(key in F){var D=parseFloat(F[key]);"dx"==key?I.x+=D:"dy"==key?I.y+=D:"dw"==key?I.width+=D:"dh"==key?I.height+=D:I[key]=parseFloat(F[key])}e.model.setGeometry(n,I)}}}catch(K){null!=window.console&&console.log("Error in icon for "+n.id+": "+K)}}}else if("model"==b.nodeName){for(var H=b.firstChild;null!=H&&H.nodeType!=mxConstants.NODETYPE_ELEMENT;)H=H.nextSibling;null!=H&&(new mxCodec(b.firstChild)).decode(H,g)}else if("view"==b.nodeName){if(b.hasAttribute("scale")&&(e.view.scale=
-parseFloat(b.getAttribute("scale"))),b.hasAttribute("dx")||b.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(b.getAttribute("dx")||0),parseFloat(b.getAttribute("dy")||0))}else"fit"==b.nodeName&&(k=b.hasAttribute("max-scale")?parseFloat(b.getAttribute("max-scale")):1);b=b.nextSibling}}finally{g.endUpdate()}null!=k&&this.chromelessResize&&this.chromelessResize(!0,k)}return f};EditorUi.prototype.getCopyFilename=function(b,c){var f=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename,
-d="",e=f.lastIndexOf(".");0<=e&&(d=f.substring(e),f=f.substring(0,e));if(c)var l=new Date,e=l.getFullYear(),g=l.getMonth()+1,k=l.getDate(),n=l.getHours(),A=l.getMinutes(),l=l.getSeconds(),f=f+(" "+(e+"-"+g+"-"+k+"-"+n+"-"+A+"-"+l));return f=mxResources.get("copyOf",[f])+d};EditorUi.prototype.fileLoaded=function(b,c){var f=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var d=!1;this.hideDialog();null!=f&&(EditorUi.debug("File.closed",[f]),f.removeListener(this.descriptorChangedListener),
-f.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var e=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=f&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!c&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));
-this.editor.setStatus("");this.updateUi();c||this.showSplash()});if(null!=b)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(b);b.addListener("descriptorChanged",this.descriptorChangedListener);b.addListener("contentChanged",this.descriptorChangedListener);b.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(b.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();
-this.updateUi();b.isEditable()?b.isModified()?(b.addUnsavedStatus(),null!=b.backupPatch&&b.patch([b.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+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"));d=!0;this.isOffline()||null==b.getMode()||EditorUi.logEvent({category:b.getMode().toUpperCase()+"-OPEN-FILE-"+b.getHash(),action:"size_"+b.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[b]);if(this.editor.editable&&this.mode==b.getMode()&&b.getMode()!=App.MODE_DEVICE&&null!=b.getMode())try{this.addRecent({id:b.getHash(),title:b.getTitle(),mode:b.getMode()})}catch(u){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+
-1),mxSettings.save()}catch(u){}}catch(u){this.fileLoadedError=u;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=b?b.getHash():"none"),action:"message_"+u.message,label:"stack_"+u.stack})}catch(v){}var l=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=f?this.fileLoaded(f):e()});c?l():this.handleError(u,mxResources.get("errorLoadingFile"),
-l,!0,null,null,!0)}else e();return d};EditorUi.prototype.getHashValueForPages=function(b,c){var f=0,d=new mxGraphModel,e=new mxCodec;null!=c&&(c.byteCount=0,c.attrCount=0,c.eltCount=0,c.nodeCount=0);for(var l=0;l<b.length;l++){this.updatePageRoot(b[l]);var g=b[l].node.cloneNode(!1);g.removeAttribute("name");d.root=b[l].root;var k=e.encode(d);this.editor.graph.saveViewState(b[l].viewState,k,!0);k.removeAttribute("pageWidth");k.removeAttribute("pageHeight");g.appendChild(k);null!=c&&(c.eltCount+=g.getElementsByTagName("*").length,
-c.nodeCount+=g.getElementsByTagName("mxCell").length);f=(f<<5)-f+this.hashValue(g,function(b,c,f,d){return!d||"mxGeometry"!=b.nodeName&&"mxPoint"!=b.nodeName||"x"!=c&&"y"!=c&&"width"!=c&&"height"!=c?d&&"mxCell"==b.nodeName&&"previous"==c?null:f:Math.round(f)},c)<<0}return f};EditorUi.prototype.hashValue=function(b,c,d){var f=0;if(null!=b&&"object"===typeof b&&"number"===typeof b.nodeType&&"string"===typeof b.nodeName&&"function"===typeof b.getAttribute){null!=b.nodeName&&(f^=this.hashValue(b.nodeName,
-c,d));if(null!=b.attributes){null!=d&&(d.attrCount+=b.attributes.length);for(var e=0;e<b.attributes.length;e++){var l=b.attributes[e].name,m=null!=c?c(b,l,b.attributes[e].value,!0):b.attributes[e].value;null!=m&&(f^=this.hashValue(l,c,d)+this.hashValue(m,c,d))}}if(null!=b.childNodes)for(e=0;e<b.childNodes.length;e++)f=(f<<5)-f+this.hashValue(b.childNodes[e],c,d)<<0}else if(null!=b&&"function"!==typeof b){b=String(b);c=0;null!=d&&(d.byteCount+=b.length);for(e=0;e<b.length;e++)c=(c<<5)-c+b.charCodeAt(e)<<
-0;f^=c}return f};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(b,c,d,e,g,k,n){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(b){null==b&&(b=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,
-b,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(b){var c=mxUtils.createXmlDocument(),f=c.createElement("mxlibrary");mxUtils.setTextContent(f,JSON.stringify(b));c.appendChild(f);return mxUtils.getXml(c)};EditorUi.prototype.closeLibrary=function(b){null!=b&&(this.removeLibrarySidebar(b.getHash()),b.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(b.getHash()),".scratchpad"==b.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=
-function(b){var c=this.sidebar.palettes[b];if(null!=c){for(var f=0;f<c.length;f++)c[f].parentNode.removeChild(c[f]);delete this.sidebar.palettes[b]}};EditorUi.prototype.repositionLibrary=function(b){var c=this.sidebar.container;if(null==b){var f=this.sidebar.palettes["L.scratchpad"];null==f&&(f=this.sidebar.palettes.search);null!=f&&(b=f[f.length-1].nextSibling)}b=null!=b?b:c.firstChild.nextSibling.nextSibling;var f=c.lastChild,d=f.previousSibling;c.insertBefore(f,b);c.insertBefore(d,f)};EditorUi.prototype.loadLibrary=
-function(b,c){var f=mxUtils.parseXml(b.getData());if("mxlibrary"==f.documentElement.nodeName){var d=JSON.parse(mxUtils.getTextContent(f.documentElement));this.libraryLoaded(b,d,f.documentElement.getAttribute("title"),c)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(b){return""};EditorUi.prototype.libraryLoaded=function(b,c,d,e){if(null!=this.sidebar){b.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(b.getHash());".scratchpad"==b.title&&
-(this.scratchpad=b);var f=this.sidebar.palettes[b.getHash()],f=null!=f?f[f.length-1].nextSibling:null;this.removeLibrarySidebar(b.getHash());var l=null,m=mxUtils.bind(this,function(c,f){0==c.length&&b.isEditable()?(null==l&&(l=document.createElement("div"),l.className="geDropTarget",mxUtils.write(l,mxResources.get("dragElementsHere"))),f.appendChild(l)):this.addLibraryEntries(c,f)});null!=this.sidebar&&null!=c&&this.sidebar.addEntries(c);d=null!=d&&0<d.length?d:b.getTitle();var g=this.sidebar.addPalette(b.getHash(),
-d,null!=e?e:!0,mxUtils.bind(this,function(b){m(c,b)}));this.repositionLibrary(f);var k=g.parentNode.previousSibling;e=k.getAttribute("title");null!=e&&0<e.length&&".scratchpad"!=b.title&&k.setAttribute("title",this.getLibraryStorageHint(b)+"\n"+e);var p=document.createElement("div");p.style.position="absolute";p.style.right="0px";p.style.top="0px";p.style.padding="8px";p.style.backgroundColor="inherit";k.style.position="relative";var n=document.createElement("img");n.setAttribute("src",Editor.crossImage);
-n.setAttribute("title",mxResources.get("close"));n.setAttribute("valign","absmiddle");n.setAttribute("border","0");n.style.position="relative";n.style.top="2px";n.style.width="14px";n.style.cursor="pointer";n.style.margin="0 3px";Editor.isDarkMode()&&(n.style.filter="invert(100%)");var y=null;if(".scratchpad"!=b.title||this.closableScratchpad)p.appendChild(n),mxEvent.addListener(n,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var f=mxUtils.bind(this,function(){this.closeLibrary(b)});
-null!=y?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):f();mxEvent.consume(c)}}));if(b.isEditable()){var B=this.editor.graph,C=null,E=mxUtils.bind(this,function(f){this.showLibraryDialog(b.getTitle(),g,c,b,b.getMode());mxEvent.consume(f)}),F=mxUtils.bind(this,function(f){b.setModified(!0);b.isAutosave()?(null!=C&&null!=C.parentNode&&C.parentNode.removeChild(C),C=n.cloneNode(!1),C.setAttribute("src",Editor.spinImage),C.setAttribute("title",
-mxResources.get("saving")),C.style.cursor="default",C.style.marginRight="2px",C.style.marginTop="-2px",p.insertBefore(C,p.firstChild),k.style.paddingRight=18*p.childNodes.length+"px",this.saveLibrary(b.getTitle(),c,b,b.getMode(),!0,!0,function(){null!=C&&null!=C.parentNode&&(C.parentNode.removeChild(C),k.style.paddingRight=18*p.childNodes.length+"px")})):null==y&&(y=n.cloneNode(!1),y.setAttribute("src",Editor.saveImage),y.setAttribute("title",mxResources.get("save")),p.insertBefore(y,p.firstChild),
-mxEvent.addListener(y,"click",mxUtils.bind(this,function(f){this.saveLibrary(b.getTitle(),c,b,b.getMode(),b.constructor==LocalLibrary,!0,function(){null==y||b.isModified()||(k.style.paddingRight=18*p.childNodes.length+"px",y.parentNode.removeChild(y),y=null)});mxEvent.consume(f)})),k.style.paddingRight=18*p.childNodes.length+"px")}),I=mxUtils.bind(this,function(b,f,d,e){b=B.cloneCells(mxUtils.sortCells(B.model.getTopmostCells(b)));for(var m=0;m<b.length;m++){var k=B.getCellGeometry(b[m]);null!=k&&
-k.translate(-f.x,-f.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(b,f.width,f.height,e||"",!0,!1,!1));b={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(b))),w:f.width,h:f.height};null!=e&&(b.title=e);c.push(b);F(d);null!=l&&null!=l.parentNode&&0<c.length&&(l.parentNode.removeChild(l),l=null)}),D=mxUtils.bind(this,function(b){if(B.isSelectionEmpty())B.getRubberband().isActive()?(B.getRubberband().execute(b),B.getRubberband().reset()):this.showError(mxResources.get("error"),
-mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=B.getSelectionCells(),f=B.view.getBounds(c),d=B.view.scale;f.x/=d;f.y/=d;f.width/=d;f.height/=d;f.x-=B.view.translate.x;f.y-=B.view.translate.y;I(c,f)}mxEvent.consume(b)});mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(b){B.isMouseDown&&null!=B.panningManager&&null!=B.graphHandler.first&&(B.graphHandler.suspend(),null!=B.graphHandler.hint&&(B.graphHandler.hint.style.visibility="hidden"),g.style.backgroundColor=
-"#f1f3f4",g.style.cursor="copy",B.panningManager.stop(),B.autoScroll=!1,mxEvent.consume(b))}),mxUtils.bind(this,function(b){B.isMouseDown&&null!=B.panningManager&&null!=B.graphHandler&&(g.style.backgroundColor="",g.style.cursor="default",this.sidebar.showTooltips=!0,B.panningManager.stop(),B.graphHandler.reset(),B.isMouseDown=!1,B.autoScroll=!0,D(b),mxEvent.consume(b))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(b){B.isMouseDown&&null!=B.graphHandler.first&&(B.graphHandler.resume(),
-null!=B.graphHandler.hint&&(B.graphHandler.hint.style.visibility="visible"),g.style.backgroundColor="",g.style.cursor="",B.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(b){g.style.backgroundColor="#f1f3f4";b.dataTransfer.dropEffect="copy";g.style.cursor="copy";this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(b){g.style.cursor="";g.style.backgroundColor="";0<b.dataTransfer.files.length&&
-this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(f,d,e,k,p,n,q,t,y){if(null!=f&&"image/"==d.substring(0,6))f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(f),f=[new mxCell("",new mxGeometry(0,0,p,n),f)],f[0].vertex=!0,I(f,new mxRectangle(0,0,p,n),b,mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=l&&null!=l.parentNode&&0<c.length&&(l.parentNode.removeChild(l),
-l=null);else{var u=!1,B=mxUtils.bind(this,function(f,d){if(null!=f&&"application/pdf"==d){var e=Editor.extractGraphModelFromPdf(f);null!=e&&0<e.length&&(f=e)}if(null!=f)if(e=mxUtils.parseXml(f),"mxlibrary"==e.documentElement.nodeName)try{var k=JSON.parse(mxUtils.getTextContent(e.documentElement));m(k,g);c=c.concat(k);F(b);this.spinner.stop();u=!0}catch(N){}else if("mxfile"==e.documentElement.nodeName)try{for(var p=e.documentElement.getElementsByTagName("diagram"),k=0;k<p.length;k++){var n=this.stringToCells(Editor.getDiagramNodeXml(p[k])),
-q=this.editor.graph.getBoundingBoxFromGeometry(n);I(n,new mxRectangle(0,0,q.width,q.height),b)}u=!0}catch(N){null!=window.console&&console.log("error in drop handler:",N)}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=l&&null!=l.parentNode&&0<c.length&&(l.parentNode.removeChild(l),l=null)});null!=y&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?this.importVisio(y,function(b){B(b,"text/xml")},null,q):!this.isOffline()&&(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(f,q)&&null!=y?this.parseFile(y,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?B(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):B(f,d)}}));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(g,"dragleave",function(b){g.style.cursor="";g.style.backgroundColor="";b.stopPropagation();b.preventDefault()}));
-n=n.cloneNode(!1);n.setAttribute("src",Editor.editImage);n.setAttribute("title",mxResources.get("edit"));p.insertBefore(n,p.firstChild);mxEvent.addListener(n,"click",E);mxEvent.addListener(g,"dblclick",function(b){mxEvent.getSource(b)==g&&E(b)});e=n.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));p.insertBefore(e,p.firstChild);mxEvent.addListener(e,"click",D);this.isOffline()||".scratchpad"!=b.title||null==EditorUi.scratchpadHelpLink||(e=document.createElement("span"),
-e.setAttribute("title",mxResources.get("help")),e.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(b){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(b)})),p.insertBefore(e,p.firstChild))}k.appendChild(p);k.style.paddingRight=18*p.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(b,c){for(var f=0;f<b.length;f++){var d=b[f],e=d.data;if(null!=e){var e=this.convertDataUri(e),
-l="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(l+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(l+"image="+e,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(e=this.stringToCells(Graph.decompress(d.xml)),0<e.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(e,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(b){return null!=b?b[mxLanguage]||b.main:null};EditorUi.prototype.footerHeight=
-0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):
-Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily=
-"Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";"1"==urlParams.sketch&&(Graph.zoomWheel=!0,Graph.prototype.defaultVertexStyle={pointerEvents:"0",hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},"0"!=urlParams.rough&&(Graph.prototype.defaultVertexStyle.fontFamily=
-Editor.sketchFontFamily,Graph.prototype.defaultVertexStyle.fontSource=Editor.sketchFontSource,Graph.prototype.defaultVertexStyle.fontSize="20",Graph.prototype.defaultVertexStyle.sketch="1",Graph.prototype.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,Graph.prototype.defaultEdgeStyle.fontSource=Editor.sketchFontSource,Graph.prototype.defaultEdgeStyle.fontSize="20",Graph.prototype.defaultEdgeStyle.sketch="1",Menus.prototype.defaultFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)},
-{fontFamily:"Rock Salt",fontUrl:"https://fonts.googleapis.com/css?family=Rock+Salt"},{fontFamily:"Permanent Marker",fontUrl:"https://fonts.googleapis.com/css?family=Permanent+Marker"}].concat(Menus.prototype.defaultFonts)),Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled=!1,Graph.prototype.defaultPageVisible=!1,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=
-function(b,c,d,e,g){b=new ImageDialog(this,b,c,d,e,g);this.showDialog(b.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);b.init()};EditorUi.prototype.showBackgroundImageDialog=function(b,c){b=null!=b?b:mxUtils.bind(this,function(b,c){if(!c){var f=new ChangePageSetup(this,null,b);f.ignoreColor=!0;this.editor.graph.model.execute(f)}});var f=new BackgroundImageDialog(this,b,c);this.showDialog(f.container,360,200,!0,!0);f.init()};EditorUi.prototype.showLibraryDialog=function(b,c,d,
-e,g){b=new LibraryDialog(this,b,c,d,e,g);this.showDialog(b.container,640,440,!0,!1,mxUtils.bind(this,function(b){b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));b.init()};var d=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(b){var c=d.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(b){this.editor.graph.isSelectionEmpty()&&c.refresh()}));return c};EditorUi.prototype.createSidebarFooterContainer=function(){var b=
-this.createDiv("geSidebarContainer geSidebarFooter");b.style.position="absolute";b.style.overflow="hidden";var c=document.createElement("a");c.className="geTitle";c.style.color="#DF6C0C";c.style.fontWeight="bold";c.style.height="100%";c.style.paddingTop="9px";c.innerHTML="<span>+</span>";var d=c.getElementsByTagName("span")[0];d.style.fontSize="18px";d.style.marginRight="5px";mxUtils.write(c,mxResources.get("moreShapes")+"...");mxEvent.addListener(c,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,
-function(b){b.preventDefault()}));mxEvent.addListener(c,"click",mxUtils.bind(this,function(b){this.actions.get("shapes").funct();mxEvent.consume(b)}));b.appendChild(c);return b};EditorUi.prototype.handleError=function(b,c,d,e,g,k,n){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},l=null!=b&&null!=b.error?b.error:b;if(null!=b&&null!=b.stack&&null!=b.message)try{n?null!=window.console&&console.error("EditorUi.handleError:",b):EditorUi.logError("Caught: "+(""==b.message&&
-null!=b.name)?b.name:b.message,b.filename,b.lineNumber,b.columnNumber,b,"INFO")}catch(C){}if(null!=l||null!=c){n=mxUtils.htmlEntities(mxResources.get("unknownError"));var m=mxResources.get("ok"),p=null;c=null!=c?c:mxResources.get("error");if(null!=l){null!=l.retry&&(m=mxResources.get("cancel"),p=function(){f();l.retry()});if(404==l.code||404==l.status||403==l.code){n=403==l.code?null!=l.message?mxUtils.htmlEntities(l.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=g?g:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+
-(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var q=null!=g?null:null!=k?k:window.location.hash;if(null!=q&&("#G"==q.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==q.substring(0,45))&&(null!=b&&null!=b.error&&(null!=b.error.errors&&0<b.error.errors.length&&"fileAccess"==b.error.errors[0].reason||null!=b.error.data&&0<b.error.data.length&&"fileAccess"==b.error.data[0].reason)||404==l.code||404==l.status)){q="#U"==q.substring(0,
-2)?q.substring(45,q.lastIndexOf("%26ex")):q.substring(2);this.showError(c,n,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+q);this.handleError(b,c,d,e,g)}),p,mxResources.get("changeUser"),mxUtils.bind(this,function(){function b(){e.innerHTML="";for(var b=0;b<c.length;b++){var f=document.createElement("option");mxUtils.write(f,c[b].displayName);f.value=b;e.appendChild(f);f=document.createElement("option");f.innerHTML="&nbsp;&nbsp;&nbsp;";
-mxUtils.write(f,"<"+c[b].email+">");f.setAttribute("disabled","disabled");e.appendChild(f)}f=document.createElement("option");mxUtils.write(f,mxResources.get("addAccount"));f.value=c.length;e.appendChild(f)}var c=this.drive.getUsersList(),f=document.createElement("div"),d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+": ");f.appendChild(d);var e=document.createElement("select");e.style.width="200px";b();mxEvent.addListener(e,"change",mxUtils.bind(this,
-function(){var f=e.value,d=c.length!=f;d&&this.drive.setUser(c[f]);this.drive.authorize(d,mxUtils.bind(this,function(){d||(c=this.drive.getUsersList(),b())}),mxUtils.bind(this,function(b){this.handleError(b)}),!0)}));f.appendChild(e);f=new CustomDialog(this,f,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(f.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=d&&d()}),480,150);return}}null!=l.message?
-n=""==l.message&&null!=l.name?mxUtils.htmlEntities(l.name):mxUtils.htmlEntities(l.message):null!=l.response&&null!=l.response.error?n=mxUtils.htmlEntities(l.response.error):"undefined"!==typeof window.App&&(l.code==App.ERROR_TIMEOUT?n=mxUtils.htmlEntities(mxResources.get("timeout")):l.code==App.ERROR_BUSY?n=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof l&&0<l.length&&(n=mxUtils.htmlEntities(l)))}var t=k=null;null!=l&&null!=l.helpLink&&(k=mxResources.get("help"),t=mxUtils.bind(this,
-function(){return this.editor.graph.openLink(l.helpLink)}));this.showError(c,n,m,d,p,null,null,k,t,null,null,null,e?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(b,c,d){b=new ErrorDialog(this,null,b,mxResources.get("ok"),c);this.showDialog(b.container,d||340,100,!0,!1);b.init()};EditorUi.prototype.confirm=function(b,c,d,e,g,k){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},l=Math.min(200,28*Math.ceil(b.length/50));b=new ConfirmDialog(this,b,function(){f();
-null!=c&&c()},function(){f();null!=d&&d()},e,g,null,null,null,null,l);this.showDialog(b.container,340,46+l,!0,k);b.init()};EditorUi.prototype.showBanner=function(b,c,d,e){var f=!1;if(!(this.bannerShowing||this["hideBanner"+b]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+b])){var l=document.createElement("div");l.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+
-mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(l.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(l.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(l.style,"transition","all 1s ease");l.className="geBtn gePrimaryBtn";f=document.createElement("img");f.setAttribute("src",IMAGE_PATH+"/logo.png");f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";l.appendChild(f);
-f=document.createElement("img");f.setAttribute("src",Dialog.prototype.closeImage);f.setAttribute("title",mxResources.get(e?"doNotShowAgain":"close"));f.setAttribute("border","0");f.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";l.appendChild(f);mxUtils.write(l,c);document.body.appendChild(l);this.bannerShowing=!0;c=document.createElement("div");c.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var g=document.createElement("input");
-g.setAttribute("type","checkbox");g.setAttribute("id","geDoNotShowAgainCheckbox");g.style.marginRight="6px";if(!e){c.appendChild(g);var m=document.createElement("label");m.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(m,mxResources.get("doNotShowAgain"));c.appendChild(m);l.style.paddingBottom="30px";l.appendChild(c)}var k=mxUtils.bind(this,function(){null!=l.parentNode&&(l.parentNode.removeChild(l),this.bannerShowing=!1,g.checked||e)&&(this["hideBanner"+b]=!0,isLocalStorage&&null!=
-mxSettings.settings&&(mxSettings.settings["close"+b]=Date.now(),mxSettings.save()))});mxEvent.addListener(f,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);k()}));var p=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(l.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){k()}),1E3)});mxEvent.addListener(l,"click",mxUtils.bind(this,function(b){var c=mxEvent.getSource(b);c!=g&&c!=m?(null!=d&&d(),k(),mxEvent.consume(b)):p()}));window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setPrefixedStyle(l.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(p,3E4);f=!0}return f};EditorUi.prototype.setCurrentFile=function(b){null!=b&&(b.opened=new Date);this.currentFile=b};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(b,c,d,e){b=b.toDataURL("image/"+d);if(null!=b&&6<b.length)null!=c&&(b=Editor.writeGraphModelToPng(b,
-"tEXt","mxfile",encodeURIComponent(c))),0<e&&(b=Editor.writeGraphModelToPng(b,"pHYs","dpi",e));else throw{message:mxResources.get("unknownError")};return b};EditorUi.prototype.saveCanvas=function(b,c,d,e,g){var f="jpeg"==d?"jpg":d;e=this.getBaseFilename(e)+(null!=c?".drawio":"")+"."+f;b=this.createImageDataUri(b,c,d,g);this.saveData(e,f,b.substring(b.lastIndexOf(",")+1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&
-"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(b,c){var f=new TextareaDialog(this,b,c,null,null,mxResources.get("close"));f.textarea.style.width="600px";f.textarea.style.height="380px";this.showDialog(f.container,620,460,!0,!0,null,null,null,null,!0);f.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(b,c,d,e,
-g,k){"text/xml"!=d||/(\.drawio)$/i.test(c)||/(\.xml)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.html)$/i.test(c)||(c=c+"."+(null!=k?k:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)b=e?this.base64ToBlob(b,d):new Blob([b],{type:d}),navigator.msSaveOrOpenBlob(b,c);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(b,!0):(d.document.write(b),d.document.close(),d.document.execCommand("SaveAs",!0,c),d.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||
-null==d||"image/"!=d.substring(0,6)?this.showTextDialog(c+":",b):this.openInNewWindow(b,d,e);else{var f=document.createElement("a");k=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof f.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var l=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);k=65==(l?parseInt(l[2],10):!1)?!1:k}if(k||this.isOffline()){f.href=URL.createObjectURL(e?this.base64ToBlob(b,d):new Blob([b],{type:d}));k?f.download=c:f.setAttribute("target",
-"_blank");document.body.appendChild(f);try{window.setTimeout(function(){URL.revokeObjectURL(f.href)},2E4),f.click(),f.parentNode.removeChild(f)}catch(x){}}else this.createEchoRequest(b,c,d,e,g).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(b,c,d,e,g,k){b="xml="+encodeURIComponent(b);return new mxXmlRequest(SAVE_URL,b+(null!=d?"&mime="+d:"")+(null!=g?"&format="+g:"")+(null!=k?"&base64="+k:"")+(null!=c?"&filename="+encodeURIComponent(c):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=
-function(b,c){c=c||"";for(var f=atob(b),d=f.length,e=Math.ceil(d/1024),l=Array(e),g=0;g<e;++g){for(var k=1024*g,n=Math.min(k+1024,d),A=Array(n-k),z=0;k<n;++z,++k)A[z]=f[k].charCodeAt(0);l[g]=new Uint8Array(A)}return new Blob(l,{type:c})};EditorUi.prototype.saveLocalFile=function(b,c,d,e,g,k,n,v){k=null!=k?k:!1;n=null!=n?n:"vsdx"!=g&&(!mxClient.IS_IOS||!navigator.standalone);g=this.getServiceCount(k);isLocalStorage&&g++;var f=4>=g?2:6<g?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(c,f){try{if("_blank"==
-f)if(null!=d&&"image/"==d.substring(0,6))this.openInNewWindow(b,d,e);else if(null!=d&&"text/html"==d.substring(0,9)){var l=new EmbedDialog(this,b);this.showDialog(l.container,440,240,!0,!0);l.init()}else{var g=window.open("about:blank");null==g?mxUtils.popup(b,!0):(g.document.write("<pre>"+mxUtils.htmlEntities(b,!1)+"</pre>"),g.document.close())}else f==App.MODE_DEVICE||"download"==f?this.doSaveLocalFile(b,c,d,e,null,v):null!=c&&0<c.length&&this.pickFolder(f,mxUtils.bind(this,function(l){try{this.exportFile(b,
-c,d,e,f,l)}catch(E){this.handleError(E)}}))}catch(C){this.handleError(C)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,k,n,null,1<g,f,b,d,e);k=this.isServices(g)?g>f?390:270:160;this.showDialog(c.container,400,k,!0,!0);c.init()};EditorUi.prototype.openInNewWindow=function(b,c,d){var f=window.open("about:blank");null==f||null==f.document?mxUtils.popup(b,!0):("image/svg+xml"!=c||mxClient.IS_SVG?"image/svg+xml"==c?f.document.write("<html>"+
-b+"</html>"):(b=d?b:btoa(unescape(encodeURIComponent(b))),f.document.write('<html><img style="max-width:100%;" src="data:'+c+";base64,"+b+'"/></html>')):f.document.write("<html><pre>"+mxUtils.htmlEntities(b,!1)+"</pre></html>"),f.document.close())};var c=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};
-EditorUi.prototype.addChromelessToolbarItems=function(b){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=b(mxUtils.bind(this,function(b){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",
-this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,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 c=f.getBoundingClientRect();
-this.tagsDialog.style.left=c.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=c.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(b)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,
-mxUtils.bind(this,function(){var b=this.editor.graph.getAllTags();f.style.display=0<b.length?"":"none"}));c.apply(this,arguments)}this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",
-mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),
-this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var d=b(mxUtils.bind(this,function(b){var c=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",c);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)c.apply(this);else{this.exportDialog=document.createElement("div");var f=d.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,
-"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=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=f.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
-this.chromelessToolbar.offsetHeight+4+"px";f=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=f.zIndex;var e=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});e.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(b){e.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var f=this.createImageDataUri(b,
-null,"png");b=document.createElement("img");b.style.maxWidth="140px";b.style.maxHeight="140px";b.style.cursor="pointer";b.style.backgroundColor="white";b.setAttribute("title",mxResources.get("openInNewWindow"));b.setAttribute("border","0");b.setAttribute("src",f);this.exportDialog.appendChild(b);mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.openInNewWindow(f.substring(f.indexOf(",")+1),"image/png",!0);c.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,
-function(b){this.spinner.stop();this.handleError(b)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",c);document.body.appendChild(this.exportDialog)}mxEvent.consume(b)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(b,c,d,e,g){this.isLocalFileSave()?this.saveLocalFile(d,b,e,g,c):this.saveRequest(b,c,mxUtils.bind(this,function(b,f){return this.createEchoRequest(d,b,e,g,c,f)}),d,g,e)};EditorUi.prototype.saveRequest=
-function(b,c,d,e,g,k,n){n=null!=n?n:!mxClient.IS_IOS||!navigator.standalone;var f=this.getServiceCount(!1);isLocalStorage&&f++;var l=4>=f?2:6<f?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,f){if("_blank"==f||null!=b&&0<b.length){var l=d("_blank"==f?null:b,f==App.MODE_DEVICE||"download"==f||null==f||"_blank"==f?"0":"1");null!=l&&(f==App.MODE_DEVICE||"download"==f||"_blank"==f?l.simulate(document,"_blank"):this.pickFolder(f,mxUtils.bind(this,function(d){k=null!=k?k:"pdf"==c?"application/pdf":
-"image/"+c;if(null!=e)try{this.exportFile(e,b,k,!0,f,d)}catch(C){this.handleError(C)}else this.spinner.spin(document.body,mxResources.get("saving"))&&l.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=l.getStatus()&&299>=l.getStatus())try{this.exportFile(l.getText(),b,k,!0,f,d)}catch(C){this.handleError(C)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(b){this.spinner.stop();this.handleError(b)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),
-mxResources.get("saveAs"),mxResources.get("download"),!1,!1,n,null,1<f,l,e,k,g);f=this.isServices(f)?4<f?390:270:160;this.showDialog(b.container,380,f,!0,!0);b.init()};EditorUi.prototype.isServices=function(b){return 1!=b};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(b,c,d,e,g,k){};EditorUi.prototype.pickFolder=function(b,c,d){c(null)};EditorUi.prototype.exportSvg=function(b,c,d,e,g,k,n,v,x,A,z,y){if(this.spinner.spin(document.body,
-mxResources.get("export")))try{var f=this.editor.graph.isSelectionEmpty();d=null!=d?d:f;var l=c?null:this.editor.graph.background;l==mxConstants.NONE&&(l=null);null==l&&0==c&&(l=z?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var m=this.editor.graph.getSvg(l,b,n,v,null,d,null,null,"blank"==A?"_blank":"self"==A?"_top":null,null,!0,z,y);e&&this.editor.graph.addSvgShadow(m);var p=this.getBaseFilename()+(g?".drawio":"")+".svg",q=mxUtils.bind(this,function(b){this.spinner.stop();g&&b.setAttribute("content",
-this.getFileData(!0,null,null,null,d,x,null,null,null,!1));var c='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(b);this.isLocalFileSave()||c.length<=MAX_REQUEST_SIZE?this.saveData(p,"svg",c,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}))});this.editor.addFontCss(m);this.editor.graph.mathEnabled&&
-this.editor.addMathCss(m);k?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(m,q,this.thumbImageCache)):q(m)}catch(D){this.handleError(D)}};EditorUi.prototype.addRadiobox=function(b,c,d,e,g,k,n){return this.addCheckbox(b,d,e,g,k,n,!0,c)};EditorUi.prototype.addCheckbox=function(b,c,d,e,g,k,n,v){k=null!=k?k:!0;var f=document.createElement("input");f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type",n?"radio":"checkbox");n="geCheckbox-"+Editor.guid();
-f.id=n;null!=v&&f.setAttribute("name",v);d&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);e&&f.setAttribute("disabled","disabled");k&&(b.appendChild(f),d=document.createElement("label"),mxUtils.write(d,c),d.setAttribute("for",n),b.appendChild(d),g||mxUtils.br(b));return f};EditorUi.prototype.addEditButton=function(b,c){var f=this.addCheckbox(b,mxResources.get("edit")+":",!0,null,!0);f.style.marginLeft="24px";var d=this.getCurrentFile(),e="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=
-App.MODE_BROWSER&&(e=window.location.href);var l=document.createElement("select");l.style.width="120px";l.style.marginLeft="8px";l.style.marginRight="10px";l.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));l.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");l.appendChild(d);b.appendChild(l);mxEvent.addListener(l,"change",mxUtils.bind(this,
-function(){if("custom"==l.value){var b=new FilenameDialog(this,e,mxResources.get("ok"),function(b){null!=b?e=b:l.value="blank"},mxResources.get("url"),null,null,null,null,function(){l.value="blank"});this.showDialog(b.container,300,80,!0,!1);b.init()}}));mxEvent.addListener(f,"change",mxUtils.bind(this,function(){f.checked&&(null==c||c.checked)?l.removeAttribute("disabled"):l.setAttribute("disabled","disabled")}));mxUtils.br(b);return{getLink:function(){return f.checked?"blank"===l.value?"_blank":
-e:null},getEditInput:function(){return f},getEditSelect:function(){return l}}};EditorUi.prototype.addLinkSection=function(b,c){function f(){g.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=l&&l!=mxConstants.NONE?"border:1px solid black;background-color:"+l:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(b,mxResources.get("links")+":");var d=document.createElement("select");
+this.currentPage.getName());return c};EditorUi.prototype.downloadFile=function(b,c,d,e,g,k,n,v,x,B,A,y){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var f=this.getBaseFilename(!g),l=f+("xml"==b||"pdf"==b&&A?".drawio":"")+"."+b;if("xml"==b){var m=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,e,g,null,null,null,c);this.saveData(l,b,m,"text/xml")}else if("html"==b)m=this.getHtml2(this.getFileData(!0),this.editor.graph,f),this.saveData(l,b,m,"text/html");else if("svg"!=b&&"xmlsvg"!=
+b||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==b?l=f+".png":"jpeg"==b&&(l=f+".jpg"),this.saveRequest(l,b,mxUtils.bind(this,function(c,f){try{var d=this.editor.graph.pageVisible;null!=k&&(this.editor.graph.pageVisible=k);var l=this.createDownloadRequest(c,b,e,f,n,g,v,x,B,A,y);this.editor.graph.pageVisible=d;return l}catch(P){this.handleError(P)}}));else{var p=null,q=mxUtils.bind(this,function(b){b.length<=MAX_REQUEST_SIZE?this.saveData(l,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
+mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==b){var t=this.editor.graph.background;if(n||t==mxConstants.NONE)t=null;var u=this.editor.graph.getSvg(t,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(u);this.editor.convertImages(u,mxUtils.bind(this,mxUtils.bind(this,function(b){this.spinner.stop();q(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(b))})))}else l=f+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(b){this.spinner.stop();
+q(b)}),e)}}catch(K){this.handleError(K)}};EditorUi.prototype.createDownloadRequest=function(b,c,d,e,g,k,n,v,x,B,A){var f=this.editor.graph,l=f.getGraphBounds();d=this.getFileData(!0,null,null,null,d,0==k?!1:"xmlpng"!=c,null,null,null,!1,"pdf"==c);var m="",p="";if(l.width*l.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};B=B?"1":"0";"pdf"==c&&(null!=A?p="&from="+A.from+"&to="+A.to:0==k&&(p="&allPages=1"));if("xmlpng"==c&&(B="1",c="png",null!=this.pages&&
+null!=this.currentPage))for(k=0;k<this.pages.length;k++)if(this.pages[k]==this.currentPage){m="&from="+k;break}k=f.background;"png"!=c&&"pdf"!=c||!g?g||null!=k&&k!=mxConstants.NONE||(k="#ffffff"):k=mxConstants.NONE;g={globalVars:f.getExportVariables()};x&&(g.grid={size:f.gridSize,steps:f.view.gridSteps,color:f.view.gridColor});Graph.translateDiagram&&(g.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+c+m+p+"&bg="+(null!=k?k:mxConstants.NONE)+"&base64="+e+"&embedXml="+
+B+"&xml="+encodeURIComponent(d)+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(g))+(null!=n?"&scale="+n:"")+(null!=v?"&border="+v:""))};EditorUi.prototype.setMode=function(b,c){this.mode=b};EditorUi.prototype.loadDescriptor=function(b,c,d){var f=window.location.hash,e=mxUtils.bind(this,function(d){var e=null!=b.data?b.data:"";null!=d&&0<d.length&&(0<e.length&&(e+="\n"),e+=d);d=new LocalFile(this,"csv"!=b.format&&0<e.length?e:this.emptyDiagramXml,null!=
+urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);d.getHash=function(){return f};this.fileLoaded(d);"csv"==b.format&&this.importCsv(e,mxUtils.bind(this,function(b){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=b.update){var l=null!=b.interval?parseInt(b.interval):6E4,m=null,g=mxUtils.bind(this,function(){var c=this.currentPage;mxUtils.post(b.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,
+function(b){c===this.currentPage&&(200<=b.getStatus()&&300>=b.getStatus()?(this.updateDiagram(b.getText()),k()):this.handleError({message:mxResources.get("error")+" "+b.getStatus()}))}),mxUtils.bind(this,function(b){this.handleError(b)}))}),k=mxUtils.bind(this,function(){window.clearTimeout(m);m=window.setTimeout(g,l)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){k();g()}));k();g()}null!=c&&c()});null!=b.url&&0<b.url.length?this.editor.loadUrl(b.url,mxUtils.bind(this,function(b){e(b)}),
+mxUtils.bind(this,function(b){null!=d&&d(b)})):e("")};EditorUi.prototype.updateDiagram=function(b){function c(b){var c=new mxCellOverlay(b.image||e.warningImage,b.tooltip,b.align,b.valign,b.offset);c.addListener(mxEvent.CLICK,function(c,f){d.alert(b.tooltip)});return c}var f=null,d=this;if(null!=b&&0<b.length&&(f=mxUtils.parseXml(b),b=null!=f?f.documentElement:null,null!=b&&"updates"==b.nodeName)){var e=this.editor.graph,g=e.getModel();g.beginUpdate();var k=null;try{for(b=b.firstChild;null!=b;){if("update"==
+b.nodeName){var n=g.getCell(b.getAttribute("id"));if(null!=n){try{var x=b.getAttribute("value");if(null!=x){var B=mxUtils.parseXml(x).documentElement;if(null!=B)if("1"==B.getAttribute("replace-value"))g.setValue(n,B);else for(var A=B.attributes,y=0;y<A.length;y++)e.setAttributeForCell(n,A[y].nodeName,0<A[y].nodeValue.length?A[y].nodeValue:null)}}catch(K){null!=window.console&&console.log("Error in value for "+n.id+": "+K)}try{var z=b.getAttribute("style");null!=z&&e.model.setStyle(n,z)}catch(K){null!=
+window.console&&console.log("Error in style for "+n.id+": "+K)}try{var C=b.getAttribute("icon");if(null!=C){var F=0<C.length?JSON.parse(C):null;null!=F&&F.append||e.removeCellOverlays(n);null!=F&&e.addCellOverlay(n,c(F))}}catch(K){null!=window.console&&console.log("Error in icon for "+n.id+": "+K)}try{var E=b.getAttribute("geometry");if(null!=E){var E=JSON.parse(E),H=e.getCellGeometry(n);if(null!=H){H=H.clone();for(key in E){var D=parseFloat(E[key]);"dx"==key?H.x+=D:"dy"==key?H.y+=D:"dw"==key?H.width+=
+D:"dh"==key?H.height+=D:H[key]=parseFloat(E[key])}e.model.setGeometry(n,H)}}}catch(K){null!=window.console&&console.log("Error in icon for "+n.id+": "+K)}}}else if("model"==b.nodeName){for(var I=b.firstChild;null!=I&&I.nodeType!=mxConstants.NODETYPE_ELEMENT;)I=I.nextSibling;null!=I&&(new mxCodec(b.firstChild)).decode(I,g)}else if("view"==b.nodeName){if(b.hasAttribute("scale")&&(e.view.scale=parseFloat(b.getAttribute("scale"))),b.hasAttribute("dx")||b.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(b.getAttribute("dx")||
+0),parseFloat(b.getAttribute("dy")||0))}else"fit"==b.nodeName&&(k=b.hasAttribute("max-scale")?parseFloat(b.getAttribute("max-scale")):1);b=b.nextSibling}}finally{g.endUpdate()}null!=k&&this.chromelessResize&&this.chromelessResize(!0,k)}return f};EditorUi.prototype.getCopyFilename=function(b,c){var f=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename,d="",e=f.lastIndexOf(".");0<=e&&(d=f.substring(e),f=f.substring(0,e));if(c)var l=new Date,e=l.getFullYear(),g=l.getMonth()+1,k=l.getDate(),
+n=l.getHours(),B=l.getMinutes(),l=l.getSeconds(),f=f+(" "+(e+"-"+g+"-"+k+"-"+n+"-"+B+"-"+l));return f=mxResources.get("copyOf",[f])+d};EditorUi.prototype.fileLoaded=function(b,c){var f=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var d=!1;this.hideDialog();null!=f&&(EditorUi.debug("File.closed",[f]),f.removeListener(this.descriptorChangedListener),f.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var e=mxUtils.bind(this,function(){this.setGraphEnabled(!1);
+this.setCurrentFile(null);null!=f&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!c&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();c||this.showSplash()});if(null!=b)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility=
+"");this.openingFile=!0;this.setCurrentFile(b);b.addListener("descriptorChanged",this.descriptorChangedListener);b.addListener("contentChanged",this.descriptorChangedListener);b.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(b.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();b.isEditable()?b.isModified()?(b.addUnsavedStatus(),null!=b.backupPatch&&b.patch([b.backupPatch])):this.editor.setStatus(""):
+this.editor.setStatus('<span class="geStatusAlert">'+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"));d=!0;this.isOffline()||null==b.getMode()||EditorUi.logEvent({category:b.getMode().toUpperCase()+
+"-OPEN-FILE-"+b.getHash(),action:"size_"+b.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[b]);if(this.editor.editable&&this.mode==b.getMode()&&b.getMode()!=App.MODE_DEVICE&&null!=b.getMode())try{this.addRecent({id:b.getHash(),title:b.getTitle(),mode:b.getMode()})}catch(u){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(u){}}catch(u){this.fileLoadedError=u;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+
+(null!=b?b.getHash():"none"),action:"message_"+u.message,label:"stack_"+u.stack})}catch(v){}var l=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=f?this.fileLoaded(f):e()});c?l():this.handleError(u,mxResources.get("errorLoadingFile"),l,!0,null,null,!0)}else e();return d};EditorUi.prototype.getHashValueForPages=function(b,c){var f=0,d=new mxGraphModel,e=new mxCodec;null!=c&&(c.byteCount=
+0,c.attrCount=0,c.eltCount=0,c.nodeCount=0);for(var l=0;l<b.length;l++){this.updatePageRoot(b[l]);var g=b[l].node.cloneNode(!1);g.removeAttribute("name");d.root=b[l].root;var k=e.encode(d);this.editor.graph.saveViewState(b[l].viewState,k,!0);k.removeAttribute("pageWidth");k.removeAttribute("pageHeight");g.appendChild(k);null!=c&&(c.eltCount+=g.getElementsByTagName("*").length,c.nodeCount+=g.getElementsByTagName("mxCell").length);f=(f<<5)-f+this.hashValue(g,function(b,c,f,d){return!d||"mxGeometry"!=
+b.nodeName&&"mxPoint"!=b.nodeName||"x"!=c&&"y"!=c&&"width"!=c&&"height"!=c?d&&"mxCell"==b.nodeName&&"previous"==c?null:f:Math.round(f)},c)<<0}return f};EditorUi.prototype.hashValue=function(b,c,d){var f=0;if(null!=b&&"object"===typeof b&&"number"===typeof b.nodeType&&"string"===typeof b.nodeName&&"function"===typeof b.getAttribute){null!=b.nodeName&&(f^=this.hashValue(b.nodeName,c,d));if(null!=b.attributes){null!=d&&(d.attrCount+=b.attributes.length);for(var e=0;e<b.attributes.length;e++){var l=b.attributes[e].name,
+m=null!=c?c(b,l,b.attributes[e].value,!0):b.attributes[e].value;null!=m&&(f^=this.hashValue(l,c,d)+this.hashValue(m,c,d))}}if(null!=b.childNodes)for(e=0;e<b.childNodes.length;e++)f=(f<<5)-f+this.hashValue(b.childNodes[e],c,d)<<0}else if(null!=b&&"function"!==typeof b){b=String(b);c=0;null!=d&&(d.byteCount+=b.length);for(e=0;e<b.length;e++)c=(c<<5)-c+b.charCodeAt(e)<<0;f^=c}return f};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=
+function(b,c,d,e,g,k,n){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(b){null==b&&(b=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,b,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(b){var c=mxUtils.createXmlDocument(),
+f=c.createElement("mxlibrary");mxUtils.setTextContent(f,JSON.stringify(b));c.appendChild(f);return mxUtils.getXml(c)};EditorUi.prototype.closeLibrary=function(b){null!=b&&(this.removeLibrarySidebar(b.getHash()),b.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(b.getHash()),".scratchpad"==b.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(b){var c=this.sidebar.palettes[b];if(null!=c){for(var f=0;f<c.length;f++)c[f].parentNode.removeChild(c[f]);delete this.sidebar.palettes[b]}};
+EditorUi.prototype.repositionLibrary=function(b){var c=this.sidebar.container;if(null==b){var f=this.sidebar.palettes["L.scratchpad"];null==f&&(f=this.sidebar.palettes.search);null!=f&&(b=f[f.length-1].nextSibling)}b=null!=b?b:c.firstChild.nextSibling.nextSibling;var f=c.lastChild,d=f.previousSibling;c.insertBefore(f,b);c.insertBefore(d,f)};EditorUi.prototype.loadLibrary=function(b,c){var f=mxUtils.parseXml(b.getData());if("mxlibrary"==f.documentElement.nodeName){var d=JSON.parse(mxUtils.getTextContent(f.documentElement));
+this.libraryLoaded(b,d,f.documentElement.getAttribute("title"),c)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(b){return""};EditorUi.prototype.libraryLoaded=function(b,c,d,e){if(null!=this.sidebar){b.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(b.getHash());".scratchpad"==b.title&&(this.scratchpad=b);var f=this.sidebar.palettes[b.getHash()],f=null!=f?f[f.length-1].nextSibling:null;this.removeLibrarySidebar(b.getHash());var l=
+null,m=mxUtils.bind(this,function(c,f){0==c.length&&b.isEditable()?(null==l&&(l=document.createElement("div"),l.className="geDropTarget",mxUtils.write(l,mxResources.get("dragElementsHere"))),f.appendChild(l)):this.addLibraryEntries(c,f)});null!=this.sidebar&&null!=c&&this.sidebar.addEntries(c);d=null!=d&&0<d.length?d:b.getTitle();var g=this.sidebar.addPalette(b.getHash(),d,null!=e?e:!0,mxUtils.bind(this,function(b){m(c,b)}));this.repositionLibrary(f);var k=g.parentNode.previousSibling;e=k.getAttribute("title");
+null!=e&&0<e.length&&".scratchpad"!=b.title&&k.setAttribute("title",this.getLibraryStorageHint(b)+"\n"+e);var p=document.createElement("div");p.style.position="absolute";p.style.right="0px";p.style.top="0px";p.style.padding="8px";p.style.backgroundColor="inherit";k.style.position="relative";var n=document.createElement("img");n.setAttribute("src",Editor.crossImage);n.setAttribute("title",mxResources.get("close"));n.setAttribute("valign","absmiddle");n.setAttribute("border","0");n.style.position="relative";
+n.style.top="2px";n.style.width="14px";n.style.cursor="pointer";n.style.margin="0 3px";Editor.isDarkMode()&&(n.style.filter="invert(100%)");var y=null;if(".scratchpad"!=b.title||this.closableScratchpad)p.appendChild(n),mxEvent.addListener(n,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var f=mxUtils.bind(this,function(){this.closeLibrary(b)});null!=y?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):f();mxEvent.consume(c)}}));
+if(b.isEditable()){var z=this.editor.graph,C=null,F=mxUtils.bind(this,function(f){this.showLibraryDialog(b.getTitle(),g,c,b,b.getMode());mxEvent.consume(f)}),E=mxUtils.bind(this,function(f){b.setModified(!0);b.isAutosave()?(null!=C&&null!=C.parentNode&&C.parentNode.removeChild(C),C=n.cloneNode(!1),C.setAttribute("src",Editor.spinImage),C.setAttribute("title",mxResources.get("saving")),C.style.cursor="default",C.style.marginRight="2px",C.style.marginTop="-2px",p.insertBefore(C,p.firstChild),k.style.paddingRight=
+18*p.childNodes.length+"px",this.saveLibrary(b.getTitle(),c,b,b.getMode(),!0,!0,function(){null!=C&&null!=C.parentNode&&(C.parentNode.removeChild(C),k.style.paddingRight=18*p.childNodes.length+"px")})):null==y&&(y=n.cloneNode(!1),y.setAttribute("src",Editor.saveImage),y.setAttribute("title",mxResources.get("save")),p.insertBefore(y,p.firstChild),mxEvent.addListener(y,"click",mxUtils.bind(this,function(f){this.saveLibrary(b.getTitle(),c,b,b.getMode(),b.constructor==LocalLibrary,!0,function(){null==
+y||b.isModified()||(k.style.paddingRight=18*p.childNodes.length+"px",y.parentNode.removeChild(y),y=null)});mxEvent.consume(f)})),k.style.paddingRight=18*p.childNodes.length+"px")}),H=mxUtils.bind(this,function(b,f,d,e){b=z.cloneCells(mxUtils.sortCells(z.model.getTopmostCells(b)));for(var m=0;m<b.length;m++){var k=z.getCellGeometry(b[m]);null!=k&&k.translate(-f.x,-f.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(b,f.width,f.height,e||"",!0,!1,!1));b={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(b))),
+w:f.width,h:f.height};null!=e&&(b.title=e);c.push(b);E(d);null!=l&&null!=l.parentNode&&0<c.length&&(l.parentNode.removeChild(l),l=null)}),D=mxUtils.bind(this,function(b){if(z.isSelectionEmpty())z.getRubberband().isActive()?(z.getRubberband().execute(b),z.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=z.getSelectionCells(),f=z.view.getBounds(c),d=z.view.scale;f.x/=d;f.y/=d;f.width/=d;f.height/=d;f.x-=z.view.translate.x;
+f.y-=z.view.translate.y;H(c,f)}mxEvent.consume(b)});mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(b){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler.first&&(z.graphHandler.suspend(),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility="hidden"),g.style.backgroundColor="#f1f3f4",g.style.cursor="copy",z.panningManager.stop(),z.autoScroll=!1,mxEvent.consume(b))}),mxUtils.bind(this,function(b){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler&&
+(g.style.backgroundColor="",g.style.cursor="default",this.sidebar.showTooltips=!0,z.panningManager.stop(),z.graphHandler.reset(),z.isMouseDown=!1,z.autoScroll=!0,D(b),mxEvent.consume(b))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(b){z.isMouseDown&&null!=z.graphHandler.first&&(z.graphHandler.resume(),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility="visible"),g.style.backgroundColor="",g.style.cursor="",z.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(g,
+"dragover",mxUtils.bind(this,function(b){g.style.backgroundColor="#f1f3f4";b.dataTransfer.dropEffect="copy";g.style.cursor="copy";this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(b){g.style.cursor="";g.style.backgroundColor="";0<b.dataTransfer.files.length&&this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(f,d,e,k,p,n,q,t,y){if(null!=f&&"image/"==d.substring(0,6))f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
+this.convertDataUri(f),f=[new mxCell("",new mxGeometry(0,0,p,n),f)],f[0].vertex=!0,H(f,new mxRectangle(0,0,p,n),b,mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=l&&null!=l.parentNode&&0<c.length&&(l.parentNode.removeChild(l),l=null);else{var u=!1,z=mxUtils.bind(this,function(f,d){if(null!=f&&"application/pdf"==d){var e=Editor.extractGraphModelFromPdf(f);null!=e&&0<e.length&&(f=e)}if(null!=f)if(e=mxUtils.parseXml(f),"mxlibrary"==e.documentElement.nodeName)try{var k=
+JSON.parse(mxUtils.getTextContent(e.documentElement));m(k,g);c=c.concat(k);E(b);this.spinner.stop();u=!0}catch(O){}else if("mxfile"==e.documentElement.nodeName)try{for(var p=e.documentElement.getElementsByTagName("diagram"),k=0;k<p.length;k++){var n=this.stringToCells(Editor.getDiagramNodeXml(p[k])),q=this.editor.graph.getBoundingBoxFromGeometry(n);H(n,new mxRectangle(0,0,q.width,q.height),b)}u=!0}catch(O){null!=window.console&&console.log("error in drop handler:",O)}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
+null!=l&&null!=l.parentNode&&0<c.length&&(l.parentNode.removeChild(l),l=null)});null!=y&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?this.importVisio(y,function(b){z(b,"text/xml")},null,q):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(f,q)&&null!=y?this.parseFile(y,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?z(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?
+"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):z(f,d)}}));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(g,"dragleave",function(b){g.style.cursor="";g.style.backgroundColor="";b.stopPropagation();b.preventDefault()}));n=n.cloneNode(!1);n.setAttribute("src",Editor.editImage);n.setAttribute("title",mxResources.get("edit"));p.insertBefore(n,p.firstChild);mxEvent.addListener(n,"click",F);mxEvent.addListener(g,"dblclick",function(b){mxEvent.getSource(b)==
+g&&F(b)});e=n.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));p.insertBefore(e,p.firstChild);mxEvent.addListener(e,"click",D);this.isOffline()||".scratchpad"!=b.title||null==EditorUi.scratchpadHelpLink||(e=document.createElement("span"),e.setAttribute("title",mxResources.get("help")),e.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(b){this.openLink(EditorUi.scratchpadHelpLink);
+mxEvent.consume(b)})),p.insertBefore(e,p.firstChild))}k.appendChild(p);k.style.paddingRight=18*p.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(b,c){for(var f=0;f<b.length;f++){var d=b[f],e=d.data;if(null!=e){var e=this.convertDataUri(e),l="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(l+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(l+"image="+e,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(e=this.stringToCells(Graph.decompress(d.xml)),
+0<e.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(e,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(b){return null!=b?b[mxLanguage]||b.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",
+Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=
+"#2a2a2a",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";"1"==urlParams.sketch&&(Graph.zoomWheel=!0,Graph.prototype.defaultVertexStyle={pointerEvents:"0",hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",
+orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},"0"!=urlParams.rough&&(Graph.prototype.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,Graph.prototype.defaultVertexStyle.fontSource=Editor.sketchFontSource,Graph.prototype.defaultVertexStyle.fontSize="20",Graph.prototype.defaultVertexStyle.sketch="1",Graph.prototype.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,Graph.prototype.defaultEdgeStyle.fontSource=Editor.sketchFontSource,
+Graph.prototype.defaultEdgeStyle.fontSize="20",Graph.prototype.defaultEdgeStyle.sketch="1",Menus.prototype.defaultFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)},{fontFamily:"Rock Salt",fontUrl:"https://fonts.googleapis.com/css?family=Rock+Salt"},{fontFamily:"Permanent Marker",fontUrl:"https://fonts.googleapis.com/css?family=Permanent+Marker"}].concat(Menus.prototype.defaultFonts)),Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",
+Graph.prototype.defaultGridEnabled=!1,Graph.prototype.defaultPageVisible=!1,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(b,c,d,e,g){b=new ImageDialog(this,b,c,d,e,g);this.showDialog(b.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);b.init()};EditorUi.prototype.showBackgroundImageDialog=function(b,c){b=null!=b?b:mxUtils.bind(this,function(b,c){if(!c){var f=new ChangePageSetup(this,
+null,b);f.ignoreColor=!0;this.editor.graph.model.execute(f)}});var f=new BackgroundImageDialog(this,b,c);this.showDialog(f.container,360,200,!0,!0);f.init()};EditorUi.prototype.showLibraryDialog=function(b,c,d,e,g){b=new LibraryDialog(this,b,c,d,e,g);this.showDialog(b.container,640,440,!0,!1,mxUtils.bind(this,function(b){b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));b.init()};var d=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(b){var c=d.apply(this,
+arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(b){this.editor.graph.isSelectionEmpty()&&c.refresh()}));return c};EditorUi.prototype.createSidebarFooterContainer=function(){var b=this.createDiv("geSidebarContainer geSidebarFooter");b.style.position="absolute";b.style.overflow="hidden";var c=document.createElement("a");c.className="geTitle";c.style.color="#DF6C0C";c.style.fontWeight="bold";c.style.height="100%";c.style.paddingTop="9px";c.innerHTML="<span>+</span>";
+var d=c.getElementsByTagName("span")[0];d.style.fontSize="18px";d.style.marginRight="5px";mxUtils.write(c,mxResources.get("moreShapes")+"...");mxEvent.addListener(c,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}));mxEvent.addListener(c,"click",mxUtils.bind(this,function(b){this.actions.get("shapes").funct();mxEvent.consume(b)}));b.appendChild(c);return b};EditorUi.prototype.handleError=function(b,c,d,e,g,k,n){var f=null!=this.spinner&&null!=this.spinner.pause?
+this.spinner.pause():function(){},l=null!=b&&null!=b.error?b.error:b;if(null!=b&&null!=b.stack&&null!=b.message)try{n?null!=window.console&&console.error("EditorUi.handleError:",b):EditorUi.logError("Caught: "+(""==b.message&&null!=b.name)?b.name:b.message,b.filename,b.lineNumber,b.columnNumber,b,"INFO")}catch(C){}if(null!=l||null!=c){n=mxUtils.htmlEntities(mxResources.get("unknownError"));var m=mxResources.get("ok"),p=null;c=null!=c?c:mxResources.get("error");if(null!=l){null!=l.retry&&(m=mxResources.get("cancel"),
+p=function(){f();l.retry()});if(404==l.code||404==l.status||403==l.code){n=403==l.code?null!=l.message?mxUtils.htmlEntities(l.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=g?g:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var q=null!=g?null:null!=k?k:window.location.hash;if(null!=q&&("#G"==q.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==
+q.substring(0,45))&&(null!=b&&null!=b.error&&(null!=b.error.errors&&0<b.error.errors.length&&"fileAccess"==b.error.errors[0].reason||null!=b.error.data&&0<b.error.data.length&&"fileAccess"==b.error.data[0].reason)||404==l.code||404==l.status)){q="#U"==q.substring(0,2)?q.substring(45,q.lastIndexOf("%26ex")):q.substring(2);this.showError(c,n,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+q);this.handleError(b,c,d,e,g)}),
+p,mxResources.get("changeUser"),mxUtils.bind(this,function(){function b(){e.innerHTML="";for(var b=0;b<c.length;b++){var f=document.createElement("option");mxUtils.write(f,c[b].displayName);f.value=b;e.appendChild(f);f=document.createElement("option");f.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(f,"<"+c[b].email+">");f.setAttribute("disabled","disabled");e.appendChild(f)}f=document.createElement("option");mxUtils.write(f,mxResources.get("addAccount"));f.value=c.length;e.appendChild(f)}var c=this.drive.getUsersList(),
+f=document.createElement("div"),d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+": ");f.appendChild(d);var e=document.createElement("select");e.style.width="200px";b();mxEvent.addListener(e,"change",mxUtils.bind(this,function(){var f=e.value,d=c.length!=f;d&&this.drive.setUser(c[f]);this.drive.authorize(d,mxUtils.bind(this,function(){d||(c=this.drive.getUsersList(),b())}),mxUtils.bind(this,function(b){this.handleError(b)}),!0)}));f.appendChild(e);
+f=new CustomDialog(this,f,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(f.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=d&&d()}),480,150);return}}null!=l.message?n=""==l.message&&null!=l.name?mxUtils.htmlEntities(l.name):mxUtils.htmlEntities(l.message):null!=l.response&&null!=l.response.error?n=mxUtils.htmlEntities(l.response.error):"undefined"!==typeof window.App&&(l.code==App.ERROR_TIMEOUT?
+n=mxUtils.htmlEntities(mxResources.get("timeout")):l.code==App.ERROR_BUSY?n=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof l&&0<l.length&&(n=mxUtils.htmlEntities(l)))}var t=k=null;null!=l&&null!=l.helpLink&&(k=mxResources.get("help"),t=mxUtils.bind(this,function(){return this.editor.graph.openLink(l.helpLink)}));this.showError(c,n,m,d,p,null,null,k,t,null,null,null,e?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(b,c,d){b=new ErrorDialog(this,null,b,mxResources.get("ok"),
+c);this.showDialog(b.container,d||340,100,!0,!1);b.init()};EditorUi.prototype.confirm=function(b,c,d,e,g,k){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},l=Math.min(200,28*Math.ceil(b.length/50));b=new ConfirmDialog(this,b,function(){f();null!=c&&c()},function(){f();null!=d&&d()},e,g,null,null,null,null,l);this.showDialog(b.container,340,46+l,!0,k);b.init()};EditorUi.prototype.showBanner=function(b,c,d,e){var f=!1;if(!(this.bannerShowing||this["hideBanner"+b]||
+isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+b])){var l=document.createElement("div");l.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(l.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(l.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(l.style,"transition",
+"all 1s ease");l.className="geBtn gePrimaryBtn";f=document.createElement("img");f.setAttribute("src",IMAGE_PATH+"/logo.png");f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";l.appendChild(f);f=document.createElement("img");f.setAttribute("src",Dialog.prototype.closeImage);f.setAttribute("title",mxResources.get(e?"doNotShowAgain":"close"));f.setAttribute("border","0");f.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
+l.appendChild(f);mxUtils.write(l,c);document.body.appendChild(l);this.bannerShowing=!0;c=document.createElement("div");c.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("id","geDoNotShowAgainCheckbox");g.style.marginRight="6px";if(!e){c.appendChild(g);var m=document.createElement("label");m.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(m,mxResources.get("doNotShowAgain"));c.appendChild(m);
+l.style.paddingBottom="30px";l.appendChild(c)}var k=mxUtils.bind(this,function(){null!=l.parentNode&&(l.parentNode.removeChild(l),this.bannerShowing=!1,g.checked||e)&&(this["hideBanner"+b]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+b]=Date.now(),mxSettings.save()))});mxEvent.addListener(f,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);k()}));var p=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(l.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
+function(){k()}),1E3)});mxEvent.addListener(l,"click",mxUtils.bind(this,function(b){var c=mxEvent.getSource(b);c!=g&&c!=m?(null!=d&&d(),k(),mxEvent.consume(b)):p()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(l.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(p,3E4);f=!0}return f};EditorUi.prototype.setCurrentFile=function(b){null!=b&&(b.opened=new Date);this.currentFile=b};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
+function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(b,c,d,e){b=b.toDataURL("image/"+d);if(null!=b&&6<b.length)null!=c&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(c))),0<e&&(b=Editor.writeGraphModelToPng(b,"pHYs","dpi",e));else throw{message:mxResources.get("unknownError")};return b};EditorUi.prototype.saveCanvas=function(b,c,d,e,g){var f="jpeg"==d?"jpg":d;e=this.getBaseFilename(e)+(null!=c?".drawio":"")+"."+f;b=this.createImageDataUri(b,
+c,d,g);this.saveData(e,f,b.substring(b.lastIndexOf(",")+1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(b,c){var f=new TextareaDialog(this,b,c,null,null,mxResources.get("close"));f.textarea.style.width="600px";
+f.textarea.style.height="380px";this.showDialog(f.container,620,460,!0,!0,null,null,null,null,!0);f.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(b,c,d,e,g,k){"text/xml"!=d||/(\.drawio)$/i.test(c)||/(\.xml)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.html)$/i.test(c)||(c=c+"."+(null!=k?k:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)b=e?this.base64ToBlob(b,d):new Blob([b],{type:d}),navigator.msSaveOrOpenBlob(b,c);else if(mxClient.IS_IE)d=window.open("about:blank",
+"_blank"),null==d?mxUtils.popup(b,!0):(d.document.write(b),d.document.close(),d.document.execCommand("SaveAs",!0,c),d.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==d||"image/"!=d.substring(0,6)?this.showTextDialog(c+":",b):this.openInNewWindow(b,d,e);else{var f=document.createElement("a");k=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof f.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var l=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
+k=65==(l?parseInt(l[2],10):!1)?!1:k}if(k||this.isOffline()){f.href=URL.createObjectURL(e?this.base64ToBlob(b,d):new Blob([b],{type:d}));k?f.download=c:f.setAttribute("target","_blank");document.body.appendChild(f);try{window.setTimeout(function(){URL.revokeObjectURL(f.href)},2E4),f.click(),f.parentNode.removeChild(f)}catch(x){}}else this.createEchoRequest(b,c,d,e,g).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(b,c,d,e,g,k){b="xml="+encodeURIComponent(b);return new mxXmlRequest(SAVE_URL,
+b+(null!=d?"&mime="+d:"")+(null!=g?"&format="+g:"")+(null!=k?"&base64="+k:"")+(null!=c?"&filename="+encodeURIComponent(c):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(b,c){c=c||"";for(var f=atob(b),d=f.length,e=Math.ceil(d/1024),l=Array(e),g=0;g<e;++g){for(var k=1024*g,n=Math.min(k+1024,d),B=Array(n-k),A=0;k<n;++A,++k)B[A]=f[k].charCodeAt(0);l[g]=new Uint8Array(B)}return new Blob(l,{type:c})};EditorUi.prototype.saveLocalFile=function(b,c,d,e,g,k,n,v){k=null!=k?k:!1;n=null!=n?
+n:"vsdx"!=g&&(!mxClient.IS_IOS||!navigator.standalone);g=this.getServiceCount(k);isLocalStorage&&g++;var f=4>=g?2:6<g?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(c,f){try{if("_blank"==f)if(null!=d&&"image/"==d.substring(0,6))this.openInNewWindow(b,d,e);else if(null!=d&&"text/html"==d.substring(0,9)){var l=new EmbedDialog(this,b);this.showDialog(l.container,440,240,!0,!0);l.init()}else{var g=window.open("about:blank");null==g?mxUtils.popup(b,!0):(g.document.write("<pre>"+mxUtils.htmlEntities(b,
+!1)+"</pre>"),g.document.close())}else f==App.MODE_DEVICE||"download"==f?this.doSaveLocalFile(b,c,d,e,null,v):null!=c&&0<c.length&&this.pickFolder(f,mxUtils.bind(this,function(l){try{this.exportFile(b,c,d,e,f,l)}catch(F){this.handleError(F)}}))}catch(C){this.handleError(C)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,k,n,null,1<g,f,b,d,e);k=this.isServices(g)?g>f?390:270:160;this.showDialog(c.container,400,k,!0,!0);c.init()};EditorUi.prototype.openInNewWindow=
+function(b,c,d){var f=window.open("about:blank");null==f||null==f.document?mxUtils.popup(b,!0):("image/svg+xml"!=c||mxClient.IS_SVG?"image/svg+xml"==c?f.document.write("<html>"+b+"</html>"):(b=d?b:btoa(unescape(encodeURIComponent(b))),f.document.write('<html><img style="max-width:100%;" src="data:'+c+";base64,"+b+'"/></html>')):f.document.write("<html><pre>"+mxUtils.htmlEntities(b,!1)+"</pre></html>"),f.document.close())};var c=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=
+function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(b){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=b(mxUtils.bind(this,function(b){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position=
+"",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,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 c=f.getBoundingClientRect();this.tagsDialog.style.left=c.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=c.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(b)}),
+Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var b=this.editor.graph.getAllTags();f.style.display=0<b.length?"":"none"}));c.apply(this,arguments)}this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&
+(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),
+this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var d=b(mxUtils.bind(this,function(b){var c=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",c);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)c.apply(this);
+else{this.exportDialog=document.createElement("div");var f=d.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=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=f.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";f=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=f.zIndex;var e=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});e.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,
+function(b){e.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var f=this.createImageDataUri(b,null,"png");b=document.createElement("img");b.style.maxWidth="140px";b.style.maxHeight="140px";b.style.cursor="pointer";b.style.backgroundColor="white";b.setAttribute("title",mxResources.get("openInNewWindow"));b.setAttribute("border","0");b.setAttribute("src",f);this.exportDialog.appendChild(b);mxEvent.addListener(b,"click",mxUtils.bind(this,
+function(){this.openInNewWindow(f.substring(f.indexOf(",")+1),"image/png",!0);c.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",c);document.body.appendChild(this.exportDialog)}mxEvent.consume(b)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(b,c,d,e,g){this.isLocalFileSave()?
+this.saveLocalFile(d,b,e,g,c):this.saveRequest(b,c,mxUtils.bind(this,function(b,f){return this.createEchoRequest(d,b,e,g,c,f)}),d,g,e)};EditorUi.prototype.saveRequest=function(b,c,d,e,g,k,n){n=null!=n?n:!mxClient.IS_IOS||!navigator.standalone;var f=this.getServiceCount(!1);isLocalStorage&&f++;var l=4>=f?2:6<f?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,f){if("_blank"==f||null!=b&&0<b.length){var l=d("_blank"==f?null:b,f==App.MODE_DEVICE||"download"==f||null==f||"_blank"==f?"0":"1");
+null!=l&&(f==App.MODE_DEVICE||"download"==f||"_blank"==f?l.simulate(document,"_blank"):this.pickFolder(f,mxUtils.bind(this,function(d){k=null!=k?k:"pdf"==c?"application/pdf":"image/"+c;if(null!=e)try{this.exportFile(e,b,k,!0,f,d)}catch(C){this.handleError(C)}else this.spinner.spin(document.body,mxResources.get("saving"))&&l.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=l.getStatus()&&299>=l.getStatus())try{this.exportFile(l.getText(),b,k,!0,f,d)}catch(C){this.handleError(C)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
+function(b){this.spinner.stop();this.handleError(b)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,n,null,1<f,l,e,k,g);f=this.isServices(f)?4<f?390:270:160;this.showDialog(b.container,380,f,!0,!0);b.init()};EditorUi.prototype.isServices=function(b){return 1!=b};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(b,c,d,e,g,k){};EditorUi.prototype.pickFolder=function(b,
+c,d){c(null)};EditorUi.prototype.exportSvg=function(b,c,d,e,g,k,n,v,x,B,A,y){if(this.spinner.spin(document.body,mxResources.get("export")))try{var f=this.editor.graph.isSelectionEmpty();d=null!=d?d:f;var l=c?null:this.editor.graph.background;l==mxConstants.NONE&&(l=null);null==l&&0==c&&(l=A?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var m=this.editor.graph.getSvg(l,b,n,v,null,d,null,null,"blank"==B?"_blank":"self"==B?"_top":null,null,!0,A,y);e&&this.editor.graph.addSvgShadow(m);var p=
+this.getBaseFilename()+(g?".drawio":"")+".svg",q=mxUtils.bind(this,function(b){this.spinner.stop();g&&b.setAttribute("content",this.getFileData(!0,null,null,null,d,x,null,null,null,!1));var c=Graph.xmlDeclaration+"\n"+(g?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(b);this.isLocalFileSave()||c.length<=MAX_REQUEST_SIZE?this.saveData(p,"svg",c,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}))});
+this.editor.addFontCss(m);this.editor.graph.mathEnabled&&this.editor.addMathCss(m);k?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(m,q,this.thumbImageCache)):q(m)}catch(D){this.handleError(D)}};EditorUi.prototype.addRadiobox=function(b,c,d,e,g,k,n){return this.addCheckbox(b,d,e,g,k,n,!0,c)};EditorUi.prototype.addCheckbox=function(b,c,d,e,g,k,n,v){k=null!=k?k:!0;var f=document.createElement("input");f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type",
+n?"radio":"checkbox");n="geCheckbox-"+Editor.guid();f.id=n;null!=v&&f.setAttribute("name",v);d&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);e&&f.setAttribute("disabled","disabled");k&&(b.appendChild(f),d=document.createElement("label"),mxUtils.write(d,c),d.setAttribute("for",n),b.appendChild(d),g||mxUtils.br(b));return f};EditorUi.prototype.addEditButton=function(b,c){var f=this.addCheckbox(b,mxResources.get("edit")+":",!0,null,!0);f.style.marginLeft="24px";var d=this.getCurrentFile(),
+e="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(e=window.location.href);var l=document.createElement("select");l.style.width="120px";l.style.marginLeft="8px";l.style.marginRight="10px";l.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));l.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");l.appendChild(d);b.appendChild(l);
+mxEvent.addListener(l,"change",mxUtils.bind(this,function(){if("custom"==l.value){var b=new FilenameDialog(this,e,mxResources.get("ok"),function(b){null!=b?e=b:l.value="blank"},mxResources.get("url"),null,null,null,null,function(){l.value="blank"});this.showDialog(b.container,300,80,!0,!1);b.init()}}));mxEvent.addListener(f,"change",mxUtils.bind(this,function(){f.checked&&(null==c||c.checked)?l.removeAttribute("disabled"):l.setAttribute("disabled","disabled")}));mxUtils.br(b);return{getLink:function(){return f.checked?
+"blank"===l.value?"_blank":e:null},getEditInput:function(){return f},getEditSelect:function(){return l}}};EditorUi.prototype.addLinkSection=function(b,c){function f(){g.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=l&&l!=mxConstants.NONE?"border:1px solid black;background-color:"+l:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(b,mxResources.get("links")+":");var d=document.createElement("select");
d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));d.appendChild(e);c&&
(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(e));b.appendChild(d);mxUtils.write(b,mxResources.get("borderColor")+":");var l="#0000ff",g=null,g=mxUtils.button("",mxUtils.bind(this,function(b){this.pickColor(l||"none",function(b){l=b;f()});mxEvent.consume(b)}));f();g.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";g.style.marginLeft="4px";g.style.height="22px";g.style.width=
"22px";g.style.position="relative";g.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";g.className="geColorBtn";b.appendChild(g);mxUtils.br(b);return{getColor:function(){return l},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createUrlParameters=function(b,c,d,e,g,k,n){n=null!=n?n:[];e&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||n.push("lightbox=1"),"auto"!=b&&n.push("target="+b),null!=c&&c!=mxConstants.NONE&&
-n.push("highlight="+("#"==c.charAt(0)?c.substring(1):c)),null!=g&&0<g.length&&n.push("edit="+encodeURIComponent(g)),k&&n.push("layers=1"),this.editor.graph.foldingEnabled&&n.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&n.push("page-id="+this.currentPage.getId());return n};EditorUi.prototype.createLink=function(b,c,d,e,g,k,n,v,x,A){x=this.createUrlParameters(b,c,d,e,g,k,x);b=this.getCurrentFile();c=!0;null!=n?d="#U"+encodeURIComponent(n):(b=this.getCurrentFile(),
-v||null==b||b.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+b.getHash(),c=!1));c&&null!=b&&null!=b.getTitle()&&b.getTitle()!=this.defaultFilename&&x.push("title="+encodeURIComponent(b.getTitle()));A&&1<d.length&&(x.push("open="+d.substring(1)),d="");return(e&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
-EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<x.length?"?"+x.join("&"):"")+d};EditorUi.prototype.createHtml=function(b,c,d,e,g,k,n,v,x,A,z,y){this.getBasenames();var f={};""!=g&&g!=mxConstants.NONE&&(f.highlight=g);"auto"!==e&&(f.target=e);A||(f.lightbox=!1);f.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(f.zoom=d/100);d=[];n&&(d.push("pages"),f.resize=!0,null!=this.pages&&null!=this.currentPage&&(f.page=mxUtils.indexOf(this.pages,this.currentPage)));c&&(d.push("zoom"),
-f.resize=!0);v&&d.push("layers");x&&d.push("tags");0<d.length&&(A&&d.push("lightbox"),f.toolbar=d.join(" "));null!=z&&0<z.length&&(f.edit=z);null!=b?f.url=b:f.xml=this.getFileData(!0,null,null,null,null,!n);c='<div class="mxgraph" style="'+(k?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(f))+'"></div>';b=null!=b?"&fetch="+encodeURIComponent(b):"";y(c,'<script type="text/javascript" src="'+(0<b.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":
+n.push("highlight="+("#"==c.charAt(0)?c.substring(1):c)),null!=g&&0<g.length&&n.push("edit="+encodeURIComponent(g)),k&&n.push("layers=1"),this.editor.graph.foldingEnabled&&n.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&n.push("page-id="+this.currentPage.getId());return n};EditorUi.prototype.createLink=function(b,c,d,e,g,k,n,v,x,B){x=this.createUrlParameters(b,c,d,e,g,k,x);b=this.getCurrentFile();c=!0;null!=n?d="#U"+encodeURIComponent(n):(b=this.getCurrentFile(),
+v||null==b||b.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+b.getHash(),c=!1));c&&null!=b&&null!=b.getTitle()&&b.getTitle()!=this.defaultFilename&&x.push("title="+encodeURIComponent(b.getTitle()));B&&1<d.length&&(x.push("open="+d.substring(1)),d="");return(e&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
+EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<x.length?"?"+x.join("&"):"")+d};EditorUi.prototype.createHtml=function(b,c,d,e,g,k,n,v,x,B,A,y){this.getBasenames();var f={};""!=g&&g!=mxConstants.NONE&&(f.highlight=g);"auto"!==e&&(f.target=e);B||(f.lightbox=!1);f.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(f.zoom=d/100);d=[];n&&(d.push("pages"),f.resize=!0,null!=this.pages&&null!=this.currentPage&&(f.page=mxUtils.indexOf(this.pages,this.currentPage)));c&&(d.push("zoom"),
+f.resize=!0);v&&d.push("layers");x&&d.push("tags");0<d.length&&(B&&d.push("lightbox"),f.toolbar=d.join(" "));null!=A&&0<A.length&&(f.edit=A);null!=b?f.url=b:f.xml=this.getFileData(!0,null,null,null,null,!n);c='<div class="mxgraph" style="'+(k?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(f))+'"></div>';b=null!=b?"&fetch="+encodeURIComponent(b):"";y(c,'<script type="text/javascript" src="'+(0<b.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":
EditorUi.lightboxHost+"/embed2.js?")+b:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=document.createElement("h3");mxUtils.write(l,mxResources.get("html"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(l);var g=
document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var m=document.createElement("input");m.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";m.setAttribute("value","url");m.setAttribute("type","radio");m.setAttribute("name","type-embedhtmldialog");l=m.cloneNode(!0);l.setAttribute("value","copy");g.appendChild(l);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(k);
mxUtils.br(g);g.appendChild(m);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));g.appendChild(k);var p=this.getCurrentFile();null==d&&null!=p&&p.constructor==window.DriveFile&&(k=document.createElement("a"),k.style.paddingLeft="12px",k.style.color="gray",k.style.cursor="pointer",mxUtils.write(k,mxResources.get("share")),g.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(p.getId())})));l.setAttribute("checked",
-"checked");null==d&&m.setAttribute("disabled","disabled");f.appendChild(g);var n=this.addLinkSection(f),y=this.addCheckbox(f,mxResources.get("zoom"),!0,null,!0);mxUtils.write(f,":");var B=document.createElement("input");B.setAttribute("type","text");B.style.marginRight="16px";B.style.width="60px";B.style.marginLeft="4px";B.style.marginRight="12px";B.value="100%";f.appendChild(B);var C=this.addCheckbox(f,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,E=E=this.addCheckbox(f,mxResources.get("allPages"),
-g,!g),F=this.addCheckbox(f,mxResources.get("layers"),!0),I=this.addCheckbox(f,mxResources.get("tags"),!0),D=this.addCheckbox(f,mxResources.get("lightbox"),!0),H=this.addEditButton(f,D),K=H.getEditInput();K.style.marginBottom="16px";mxEvent.addListener(D,"change",function(){D.checked?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled");K.checked&&D.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,
-mxUtils.bind(this,function(){e(m.checked?d:null,y.checked,B.value,n.getTarget(),n.getColor(),C.checked,E.checked,F.checked,I.checked,D.checked,H.getLink())}),null,b,c);this.showDialog(b.container,340,430,!0,!0);l.focus()};EditorUi.prototype.showPublishLinkDialog=function(b,c,d,e,g,k){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=document.createElement("h3");mxUtils.write(l,b||mxResources.get("link"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
+"checked");null==d&&m.setAttribute("disabled","disabled");f.appendChild(g);var n=this.addLinkSection(f),y=this.addCheckbox(f,mxResources.get("zoom"),!0,null,!0);mxUtils.write(f,":");var z=document.createElement("input");z.setAttribute("type","text");z.style.marginRight="16px";z.style.width="60px";z.style.marginLeft="4px";z.style.marginRight="12px";z.value="100%";f.appendChild(z);var C=this.addCheckbox(f,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,F=F=this.addCheckbox(f,mxResources.get("allPages"),
+g,!g),E=this.addCheckbox(f,mxResources.get("layers"),!0),H=this.addCheckbox(f,mxResources.get("tags"),!0),D=this.addCheckbox(f,mxResources.get("lightbox"),!0),I=this.addEditButton(f,D),K=I.getEditInput();K.style.marginBottom="16px";mxEvent.addListener(D,"change",function(){D.checked?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled");K.checked&&D.checked?I.getEditSelect().removeAttribute("disabled"):I.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,
+mxUtils.bind(this,function(){e(m.checked?d:null,y.checked,z.value,n.getTarget(),n.getColor(),C.checked,F.checked,E.checked,H.checked,D.checked,I.getLink())}),null,b,c);this.showDialog(b.container,340,430,!0,!0);l.focus()};EditorUi.prototype.showPublishLinkDialog=function(b,c,d,e,g,k){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=document.createElement("h3");mxUtils.write(l,b||mxResources.get("link"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
f.appendChild(l);var m=this.getCurrentFile(),l="https://www.diagrams.net/doc/faq/publish-diagram-as-link";b=0;if(null!=m&&m.constructor==window.DriveFile&&!c){b=80;var l="https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram",p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var n=document.createElement("div");n.style.whiteSpace="normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));
p.appendChild(n);n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(m.getId())}));n.style.marginTop="12px";n.className="geBtn";p.appendChild(n);f.appendChild(p);n=document.createElement("a");n.style.paddingLeft="12px";n.style.color="gray";n.style.fontSize="11px";n.style.cursor="pointer";mxUtils.write(n,mxResources.get("check"));p.appendChild(n);mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&
this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(b){this.spinner.stop();b=new ErrorDialog(this,null,mxResources.get(null!=b?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(b.container,300,80,!0,!1);b.init()}))}))}var q=null,t=null;if(null!=d||null!=e)b+=30,mxUtils.write(f,mxResources.get("width")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.marginRight="16px",q.style.width="50px",q.style.marginLeft="6px",q.style.marginRight=
-"16px",q.style.marginBottom="10px",q.value="100%",f.appendChild(q),mxUtils.write(f,mxResources.get("height")+":"),t=document.createElement("input"),t.setAttribute("type","text"),t.style.width="50px",t.style.marginLeft="6px",t.style.marginBottom="10px",t.value=e+"px",f.appendChild(t),mxUtils.br(f);var C=this.addLinkSection(f,k);d=null!=this.pages&&1<this.pages.length;var E=null;if(null==m||m.constructor!=window.DriveFile||c)E=this.addCheckbox(f,mxResources.get("allPages"),d,!d);var F=this.addCheckbox(f,
-mxResources.get("lightbox"),!0,null,null,!k),I=this.addEditButton(f,F),D=I.getEditInput();k&&(D.style.marginLeft=F.style.marginLeft,F.style.display="none",b-=20);var H=this.addCheckbox(f,mxResources.get("layers"),!0);H.style.marginLeft=D.style.marginLeft;H.style.marginTop="8px";var K=this.addCheckbox(f,mxResources.get("tags"),!0);K.style.marginLeft=D.style.marginLeft;K.style.marginBottom="16px";K.style.marginTop="16px";mxEvent.addListener(F,"change",function(){F.checked?(H.removeAttribute("disabled"),
-D.removeAttribute("disabled")):(H.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"));D.checked&&F.checked?I.getEditSelect().removeAttribute("disabled"):I.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,f,mxUtils.bind(this,function(){g(C.getTarget(),C.getColor(),null==E?!0:E.checked,F.checked,I.getLink(),H.checked,null!=q?q.value:null,null!=t?t.value:null,K.checked)}),null,mxResources.get("create"),l);this.showDialog(c.container,340,300+b,!0,!0);
+"16px",q.style.marginBottom="10px",q.value="100%",f.appendChild(q),mxUtils.write(f,mxResources.get("height")+":"),t=document.createElement("input"),t.setAttribute("type","text"),t.style.width="50px",t.style.marginLeft="6px",t.style.marginBottom="10px",t.value=e+"px",f.appendChild(t),mxUtils.br(f);var C=this.addLinkSection(f,k);d=null!=this.pages&&1<this.pages.length;var F=null;if(null==m||m.constructor!=window.DriveFile||c)F=this.addCheckbox(f,mxResources.get("allPages"),d,!d);var E=this.addCheckbox(f,
+mxResources.get("lightbox"),!0,null,null,!k),H=this.addEditButton(f,E),D=H.getEditInput();k&&(D.style.marginLeft=E.style.marginLeft,E.style.display="none",b-=20);var I=this.addCheckbox(f,mxResources.get("layers"),!0);I.style.marginLeft=D.style.marginLeft;I.style.marginTop="8px";var K=this.addCheckbox(f,mxResources.get("tags"),!0);K.style.marginLeft=D.style.marginLeft;K.style.marginBottom="16px";K.style.marginTop="16px";mxEvent.addListener(E,"change",function(){E.checked?(I.removeAttribute("disabled"),
+D.removeAttribute("disabled")):(I.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"));D.checked&&E.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,f,mxUtils.bind(this,function(){g(C.getTarget(),C.getColor(),null==F?!0:F.checked,E.checked,H.getLink(),I.checked,null!=q?q.value:null,null!=t?t.value:null,K.checked)}),null,mxResources.get("create"),l);this.showDialog(c.container,340,300+b,!0,!0);
null!=q?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)):C.focus()};EditorUi.prototype.showRemoteExportDialog=function(b,c,d,e,g){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=document.createElement("h3");mxUtils.write(l,mxResources.get("image"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(g?"10":"4")+"px";f.appendChild(l);if(g){mxUtils.write(f,mxResources.get("zoom")+
-":");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.style.marginRight="12px";k.value=this.lastExportZoom||"100%";f.appendChild(k);mxUtils.write(f,mxResources.get("borderWidth")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.value=this.lastExportBorder||"0";f.appendChild(m);mxUtils.br(f)}var p=this.addCheckbox(f,
-mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),n=e?null:this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),l=this.editor.graph,q=e?null:this.addCheckbox(f,mxResources.get("transparentBackground"),l.background==mxConstants.NONE||null==l.background);null!=q&&(q.style.marginBottom="16px");b=new CustomDialog(this,f,mxUtils.bind(this,function(){var b=parseInt(k.value)/100||1,c=parseInt(m.value)||0;d(!p.checked,null!=n?n.checked:!1,null!=
+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="12px";m.value=this.lastExportZoom||"100%";f.appendChild(m);mxUtils.write(f,mxResources.get("borderWidth")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.value=this.lastExportBorder||"0";f.appendChild(k);mxUtils.br(f)}var p=this.addCheckbox(f,
+mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),n=e?null:this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),l=this.editor.graph,q=e?null:this.addCheckbox(f,mxResources.get("transparentBackground"),l.background==mxConstants.NONE||null==l.background);null!=q&&(q.style.marginBottom="16px");b=new CustomDialog(this,f,mxUtils.bind(this,function(){var b=parseInt(m.value)/100||1,c=parseInt(k.value)||0;d(!p.checked,null!=n?n.checked:!1,null!=
q?q.checked:!1,b,c)}),null,b,c);this.showDialog(b.container,300,(g?25:0)+(e?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(b,c,d,e,g,k,n,v,x){n=null!=n?n:Editor.defaultIncludeDiagram;var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=this.editor.graph,m="jpeg"==v?220:300,p=document.createElement("h3");mxUtils.write(p,b);p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";f.appendChild(p);mxUtils.write(f,mxResources.get("zoom")+":");var q=
document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value=this.lastExportZoom||"100%";f.appendChild(q);mxUtils.write(f,mxResources.get("borderWidth")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.value=this.lastExportBorder||"0";f.appendChild(t);mxUtils.br(f);var u=this.addCheckbox(f,mxResources.get("selectionOnly"),
-!1,l.isSelectionEmpty()),I=document.createElement("input");I.style.marginTop="16px";I.style.marginRight="8px";I.style.marginLeft="24px";I.setAttribute("disabled","disabled");I.setAttribute("type","checkbox");var D=document.createElement("select");D.style.marginTop="16px";D.style.marginLeft="8px";b=["selectionOnly","diagram","page"];for(p=0;p<b.length;p++)if(!l.isSelectionEmpty()||"selectionOnly"!=b[p]){var H=document.createElement("option");mxUtils.write(H,mxResources.get(b[p]));H.setAttribute("value",
-b[p]);D.appendChild(H)}x?(mxUtils.write(f,mxResources.get("size")+":"),f.appendChild(D),mxUtils.br(f),m+=26,mxEvent.addListener(D,"change",function(){"selectionOnly"==D.value&&(u.checked=!0)})):k&&(f.appendChild(I),mxUtils.write(f,mxResources.get("crop")),mxUtils.br(f),m+=30,mxEvent.addListener(u,"change",function(){u.checked?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled")}));l.isSelectionEmpty()?x&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display=
-"none",m-=30):(D.value="diagram",I.setAttribute("checked","checked"),I.defaultChecked=!0,mxEvent.addListener(u,"change",function(){D.value=u.checked?"selectionOnly":"diagram"}));var K=this.addCheckbox(f,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=v),M=null;Editor.isDarkMode()&&(M=this.addCheckbox(f,mxResources.get("dark"),!0),m+=26);var L=this.addCheckbox(f,mxResources.get("shadow"),l.shadowVisible),P=document.createElement("input");P.style.marginTop="16px";P.style.marginRight="8px";
-P.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||P.setAttribute("disabled","disabled");c&&(f.appendChild(P),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f),m+=30);var O=null;if("png"==v||"jpeg"==v)O=this.addCheckbox(f,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),m+=30;var G=this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),n,null,null,"jpeg"!=v);G.style.marginBottom="16px";var J=document.createElement("select");J.style.maxWidth=
+!1,l.isSelectionEmpty()),H=document.createElement("input");H.style.marginTop="16px";H.style.marginRight="8px";H.style.marginLeft="24px";H.setAttribute("disabled","disabled");H.setAttribute("type","checkbox");var D=document.createElement("select");D.style.marginTop="16px";D.style.marginLeft="8px";b=["selectionOnly","diagram","page"];for(p=0;p<b.length;p++)if(!l.isSelectionEmpty()||"selectionOnly"!=b[p]){var I=document.createElement("option");mxUtils.write(I,mxResources.get(b[p]));I.setAttribute("value",
+b[p]);D.appendChild(I)}x?(mxUtils.write(f,mxResources.get("size")+":"),f.appendChild(D),mxUtils.br(f),m+=26,mxEvent.addListener(D,"change",function(){"selectionOnly"==D.value&&(u.checked=!0)})):k&&(f.appendChild(H),mxUtils.write(f,mxResources.get("crop")),mxUtils.br(f),m+=30,mxEvent.addListener(u,"change",function(){u.checked?H.removeAttribute("disabled"):H.setAttribute("disabled","disabled")}));l.isSelectionEmpty()?x&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display=
+"none",m-=30):(D.value="diagram",H.setAttribute("checked","checked"),H.defaultChecked=!0,mxEvent.addListener(u,"change",function(){D.value=u.checked?"selectionOnly":"diagram"}));var K=this.addCheckbox(f,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=v),M=null;Editor.isDarkMode()&&(M=this.addCheckbox(f,mxResources.get("dark"),!0),m+=26);var L=this.addCheckbox(f,mxResources.get("shadow"),l.shadowVisible),N=document.createElement("input");N.style.marginTop="16px";N.style.marginRight="8px";
+N.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||N.setAttribute("disabled","disabled");c&&(f.appendChild(N),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f),m+=30);var P=null;if("png"==v||"jpeg"==v)P=this.addCheckbox(f,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),m+=30;var G=this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),n,null,null,"jpeg"!=v);G.style.marginBottom="16px";var J=document.createElement("select");J.style.maxWidth=
"260px";J.style.marginLeft="8px";J.style.marginRight="10px";J.className="geBtn";c=document.createElement("option");c.setAttribute("value","auto");mxUtils.write(c,mxResources.get("automatic"));J.appendChild(c);c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("openInNewWindow"));J.appendChild(c);c=document.createElement("option");c.setAttribute("value","self");mxUtils.write(c,mxResources.get("openInThisWindow"));J.appendChild(c);"svg"==v&&(mxUtils.write(f,
-mxResources.get("links")+":"),f.appendChild(J),mxUtils.br(f),mxUtils.br(f),m+=50);d=new CustomDialog(this,f,mxUtils.bind(this,function(){this.lastExportBorder=t.value;this.lastExportZoom=q.value;g(q.value,K.checked,!u.checked,L.checked,G.checked,P.checked,t.value,I.checked,!1,J.value,null!=O?O.checked:null,null!=M?M.checked:null,D.value)}),null,d,e);this.showDialog(d.container,340,m,!0,!0,null,null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",
-!1,null)};EditorUi.prototype.showEmbedImageDialog=function(b,c,d,e,g){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=this.editor.graph;if(null!=c){var k=document.createElement("h3");mxUtils.write(k,c);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(k)}var m=this.addCheckbox(f,mxResources.get("fit"),!0),p=this.addCheckbox(f,mxResources.get("shadow"),l.shadowVisible&&e,!e),n=this.addCheckbox(f,d),q=this.addCheckbox(f,mxResources.get("lightbox"),
-!0),B=this.addEditButton(f,q),C=B.getEditInput(),E=1<l.model.getChildCount(l.model.getRoot()),F=this.addCheckbox(f,mxResources.get("layers"),E,!E);F.style.marginLeft=C.style.marginLeft;F.style.marginBottom="12px";F.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?(E&&F.removeAttribute("disabled"),C.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"));C.checked&&q.checked?B.getEditSelect().removeAttribute("disabled"):B.getEditSelect().setAttribute("disabled",
-"disabled")});c=new CustomDialog(this,f,mxUtils.bind(this,function(){b(m.checked,p.checked,n.checked,q.checked,B.getLink(),F.checked)}),null,mxResources.get("embed"),g);this.showDialog(c.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(b,c,d,e,g,k,n,v){function f(c){var f=" ",p="";e&&(f=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+mxResources.get("links")+":"),f.appendChild(J),mxUtils.br(f),mxUtils.br(f),m+=50);d=new CustomDialog(this,f,mxUtils.bind(this,function(){this.lastExportBorder=t.value;this.lastExportZoom=q.value;g(q.value,K.checked,!u.checked,L.checked,G.checked,N.checked,t.value,H.checked,!1,J.value,null!=P?P.checked:null,null!=M?M.checked:null,D.value)}),null,d,e);this.showDialog(d.container,340,m,!0,!0,null,null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",
+!1,null)};EditorUi.prototype.showEmbedImageDialog=function(b,c,d,e,g){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=this.editor.graph;if(null!=c){var m=document.createElement("h3");mxUtils.write(m,c);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(m)}var k=this.addCheckbox(f,mxResources.get("fit"),!0),p=this.addCheckbox(f,mxResources.get("shadow"),l.shadowVisible&&e,!e),n=this.addCheckbox(f,d),q=this.addCheckbox(f,mxResources.get("lightbox"),
+!0),z=this.addEditButton(f,q),C=z.getEditInput(),F=1<l.model.getChildCount(l.model.getRoot()),E=this.addCheckbox(f,mxResources.get("layers"),F,!F);E.style.marginLeft=C.style.marginLeft;E.style.marginBottom="12px";E.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?(F&&E.removeAttribute("disabled"),C.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"));C.checked&&q.checked?z.getEditSelect().removeAttribute("disabled"):z.getEditSelect().setAttribute("disabled",
+"disabled")});c=new CustomDialog(this,f,mxUtils.bind(this,function(){b(k.checked,p.checked,n.checked,q.checked,z.getLink(),E.checked)}),null,mxResources.get("embed"),g);this.showDialog(c.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(b,c,d,e,g,k,n,v){function f(c){var f=" ",p="";e&&(f=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
EditorUi.lightboxHost+"/?client=1"+(null!=m?"&page="+m:"")+(g?"&edit=_blank":"")+(k?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");b&&(p+="max-width:100%;");var q="";d&&(q=' width="'+Math.round(l.width)+'" height="'+Math.round(l.height)+'"');n('<img src="'+c+'"'+q+(""!=p?' style="'+p+'"':"")+f+"/>")}var l=this.editor.graph.getGraphBounds(),m=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(b){var c=e?this.getFileData(!0):null;b=
this.createImageDataUri(b,c,"png");f(b)}),null,null,null,mxUtils.bind(this,function(b){v({message:mxResources.get("unknownError")})}),null,!0,d?2:1,null,c,null,null,Editor.defaultBorder);else if(c=this.getFileData(!0),l.width*l.height<=MAX_AREA&&c.length<=MAX_REQUEST_SIZE){var p="";d&&(p="&w="+Math.round(2*l.width)+"&h="+Math.round(2*l.height));var q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+p+"&xml="+encodeURIComponent(c));q.send(mxUtils.bind(this,function(){200<=q.getStatus()&&
299>=q.getStatus()?f("data:image/png;base64,"+q.getText()):v({message:mxResources.get("unknownError")})}))}else v({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(b,c,d,e,g,k,n){var f=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!d),l=f.getElementsByTagName("a");if(null!=l)for(var m=0;m<l.length;m++){var p=l[m].getAttribute("href");null!=p&&"#"==p.charAt(0)&&"_blank"==l[m].getAttribute("target")&&l[m].removeAttribute("target")}e&&
@@ -10687,198 +10710,197 @@ EditorUi.lightboxHost+"/?client=1"+(null!=c?"&page="+c:"")+(g?"&edit=_blank":"")
Math.floor((new Date-b)/1E3);var c=Math.floor(b/31536E3);if(1<c)return c+" "+mxResources.get("years");c=Math.floor(b/2592E3);if(1<c)return c+" "+mxResources.get("months");c=Math.floor(b/86400);if(1<c)return c+" "+mxResources.get("days");c=Math.floor(b/3600);if(1<c)return c+" "+mxResources.get("hours");c=Math.floor(b/60);return 1<c?c+" "+mxResources.get("minutes"):1==c?c+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(b,c){if(null!=b){var f=null;if("diagram"==b.nodeName)f=
b;else if("mxfile"==b.nodeName){var d=b.getElementsByTagName("diagram");if(0<d.length){var f=d[0],e=c.getGlobalVariable;c.getGlobalVariable=function(b){return"page"==b?f.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==b?1:e.apply(this,arguments)}}}null!=f&&(b=Editor.parseDiagramNode(f))}d=this.editor.graph;try{this.editor.graph=c,this.editor.setGraphXml(b)}catch(t){}finally{this.editor.graph=d}return b};EditorUi.prototype.getPngFileProperties=function(b){var c=1,f=0;if(null!=
b){if(b.hasAttribute("scale")){var d=parseFloat(b.getAttribute("scale"));!isNaN(d)&&0<d&&(c=d)}b.hasAttribute("border")&&(d=parseInt(b.getAttribute("border")),!isNaN(d)&&0<d&&(f=d))}return{scale:c,border:f}};EditorUi.prototype.getEmbeddedPng=function(b,c,d,e,g){try{var f=this.editor.graph,l=null!=f.themes&&"darkTheme"==f.defaultThemeName,k=null;if(null!=d&&0<d.length)f=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(f.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,
-!0),f),k=d;else if(l||null!=this.pages&&this.currentPage!=this.pages[0]){var f=this.createTemporaryGraph(f.getStylesheet()),m=f.getGlobalVariable,p=this.pages[0];f.getGlobalVariable=function(b){return"page"==b?p.getName():"pagenumber"==b?1:m.apply(this,arguments)};document.body.appendChild(f.container);f.model.setRoot(p.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(d){try{null==k&&(k=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var e=d.toDataURL("image/png"),e=Editor.writeGraphModelToPng(e,
-"tEXt","mxfile",encodeURIComponent(k));b(e.substring(e.lastIndexOf(",")+1));f!=this.editor.graph&&f.container.parentNode.removeChild(f.container)}catch(B){null!=c&&c(B)}}),null,null,null,mxUtils.bind(this,function(b){null!=c&&c(b)}),null,null,e,null,f.shadowVisible,null,f,g)}catch(z){null!=c&&c(z)}};EditorUi.prototype.getEmbeddedSvg=function(b,c,d,e,g,k,n,v,x,A,z,y,B){v=null!=v?v:!0;n=null!=x?x:c.background;n==mxConstants.NONE&&(n=null);k=c.getSvg(n,A,z,null,null,k,null,null,null,c.shadowVisible||
-y,null,B);(c.shadowVisible||y)&&c.addSvgShadow(k);null!=b&&k.setAttribute("content",b);null!=d&&k.setAttribute("resource",d);if(null!=g)this.embedFonts(k,mxUtils.bind(this,function(b){v?this.editor.convertImages(b,mxUtils.bind(this,function(b){g((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(b))})):g((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
-mxUtils.getXml(b))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(k)};EditorUi.prototype.embedFonts=function(b,c){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(b,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(f){try{null!=f&&this.editor.addFontCss(b,f),c(b)}catch(p){c(b)}}))}catch(m){c(b)}}))};
-EditorUi.prototype.exportImage=function(b,c,d,e,g,k,n,v,x,A,z,y,B){x=null!=x?x:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var f=this.editor.graph.isSelectionEmpty();d=null!=d?d:f;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(b){this.spinner.stop();try{this.saveCanvas(b,g?this.getFileData(!0,null,null,null,d,v):null,x,null==this.pages||0==this.pages.length,z)}catch(F){this.handleError(F)}}),null,this.thumbImageCache,
-null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,d,b||1,c,e,null,null,k,n,A,y,B)}catch(E){this.spinner.stop(),this.handleError(E)}}};EditorUi.prototype.isCorsEnabledForUrl=function(b){return this.editor.isCorsEnabledForUrl(b)};EditorUi.prototype.importXml=function(b,c,d,e,g,k,n){c=null!=c?c:0;d=null!=d?d:0;var f=[];try{var l=this.editor.graph;if(null!=b&&0<b.length){l.model.beginUpdate();try{var m=mxUtils.parseXml(b);b={};var p=this.editor.extractGraphModel(m.documentElement,
-null!=this.pages);if(null!=p&&"mxfile"==p.nodeName&&null!=this.pages){var q=p.getElementsByTagName("diagram");if(1==q.length&&!k){if(p=Editor.parseDiagramNode(q[0]),null!=this.currentPage&&(b[q[0].getAttribute("id")]=this.currentPage.getId(),null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1]))){var t=q[0].getAttribute("name");null!=t&&""!=t&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,t))}}else if(0<
-q.length){k=[];var u=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(b[q[0].getAttribute("id")]=this.pages[0].getId(),p=Editor.parseDiagramNode(q[0]),e=!1,u=1);for(;u<q.length;u++){var E=q[u].getAttribute("id");q[u].removeAttribute("id");var F=this.updatePageRoot(new DiagramPage(q[u]));b[E]=q[u].getAttribute("id");var I=this.pages.length;null==F.getName()&&F.setName(mxResources.get("pageWithNumber",[I+1]));l.model.execute(new ChangePage(this,F,F,I,!0));k.push(F)}this.updatePageLinks(b,
-k)}}if(null!=p&&"mxGraphModel"===p.nodeName&&(f=l.importGraphModel(p,c,d,e),null!=f))for(u=0;u<f.length;u++)this.updatePageLinksForCell(b,f[u]);n&&this.insertHandler(f,null,null,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,!0,!0)}finally{l.model.endUpdate()}}}catch(D){if(g)throw D;this.handleError(D)}return f};EditorUi.prototype.updatePageLinks=function(b,c){for(var d=0;d<c.length;d++)this.updatePageLinksForCell(b,c[d].root)};EditorUi.prototype.updatePageLinksForCell=function(b,
-c){var d=document.createElement("div"),f=this.editor.graph,e=f.getLinkForCell(c);null!=e&&f.setLinkForCell(c,this.updatePageLink(b,e));if(f.isHtmlLabel(c)){d.innerHTML=f.sanitizeHtml(f.getLabel(c));for(var l=d.getElementsByTagName("a"),g=!1,k=0;k<l.length;k++)e=l[k].getAttribute("href"),null!=e&&(l[k].setAttribute("href",this.updatePageLink(b,e)),g=!0);g&&f.labelChanged(c,d.innerHTML)}for(k=0;k<f.model.getChildCount(c);k++)this.updatePageLinksForCell(b,f.model.getChildAt(c,k))};EditorUi.prototype.updatePageLink=
-function(b,c){if(Graph.isPageLink(c)){var d=b[c.substring(c.indexOf(",")+1)];c=null!=d?"data:page/id,"+d:null}else if("data:action/json,"==c.substring(0,17))try{var f=JSON.parse(c.substring(17));if(null!=f.actions){for(var e=0;e<f.actions.length;e++){var l=f.actions[e];if(null!=l.open&&Graph.isPageLink(l.open)){var g=l.open.substring(l.open.indexOf(",")+1),d=b[g];null!=d?l.open="data:page/id,"+d:null==this.getPageById(g)&&delete l.open}}c="data:action/json,"+JSON.stringify(f)}}catch(v){}return c};
-EditorUi.prototype.isRemoteVisioFormat=function(b){return/(\.v(sd|dx))($|\?)/i.test(b)||/(\.vs(s|x))($|\?)/i.test(b)};EditorUi.prototype.importVisio=function(b,c,d,e,g){e=null!=e?e:b.name;d=null!=d?d:mxUtils.bind(this,function(b){this.handleError(b)});var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var f=this.isRemoteVisioFormat(e);try{var l="UNKNOWN-VISIO",k=e.lastIndexOf(".");if(0<=k&&k<e.length)l=e.substring(k+1).toUpperCase();else{var m=e.lastIndexOf("/");0<=
-m&&m<e.length&&(e=e.substring(m+1))}EditorUi.logEvent({category:l+"-MS-IMPORT-FILE",action:"filename_"+e,label:f?"remote":"local"})}catch(y){}if(f)if(null==VSD_CONVERT_URL||this.isOffline())d({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{f=new FormData;f.append("file1",b,e);var n=new XMLHttpRequest;n.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(e)?"?stencil=1":""));n.responseType="blob";this.addRemoteServiceSecurityCheck(n);
-null!=g&&n.setRequestHeader("x-convert-custom",g);n.onreadystatechange=mxUtils.bind(this,function(){if(4==n.readyState)if(200<=n.status&&299>=n.status)try{var b=n.response;if("text/xml"==b.type){var f=new FileReader;f.onload=mxUtils.bind(this,function(b){try{c(b.target.result)}catch(E){d({message:mxResources.get("errorLoadingFile")})}});f.readAsText(b)}else this.doImportVisio(b,c,d,e)}catch(C){d(C)}else try{""==n.responseType||"text"==n.responseType?d({message:n.responseText}):(f=new FileReader,f.onload=
-function(){d({message:JSON.parse(f.result).Message})},f.readAsText(n.response))}catch(C){d({})}});n.send(f)}else try{this.doImportVisio(b,c,d,e)}catch(y){d(y)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importGraphML=function(b,c,d){d=null!=d?d:mxUtils.bind(this,function(b){this.handleError(b)});
-var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(b,c,d)}catch(q){d(q)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.exportVisio=function(b){var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(b)||
-this.handleError({message:mxResources.get("unknownError")})}catch(m){this.handleError(m)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.convertLucidChart=function(b,c,d){var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",
-action:"size_"+b.length}),EditorUi.debug("convertLucidChart",b)}catch(q){}try{c(LucidImporter.importState(JSON.parse(b)))}catch(q){null!=window.console&&console.error(q),d(q)}}else d({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(f,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",
-function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})})}):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generateMermaidImage=function(b,c,d,e){var f=this,l=function(){try{this.loadingMermaid=!1,c=null!=c?c:EditorUi.defaultMermaidConfig,c.securityLevel="strict",c.startOnLoad=!1,mermaid.mermaidAPI.initialize(c),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),b,function(b){try{if(mxClient.IS_IE||mxClient.IS_IE11)b=
-b.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var c=mxUtils.parseXml(b).getElementsByTagName("svg");if(0<c.length){var l=parseFloat(c[0].getAttribute("width")),g=parseFloat(c[0].getAttribute("height"));if(isNaN(l)||isNaN(g))try{var k=c[0].getAttribute("viewBox").split(/\s+/),l=parseFloat(k[2]),g=parseFloat(k[3])}catch(y){l=l||100,g=g||100}d(f.convertDataUri(Editor.createSvgDataUri(b)),l,g)}else e({message:mxResources.get("invalidInput")})}catch(y){e(y)}})}catch(u){e(u)}};
-"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?l():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",l):mxscript("js/extensions.min.js",l))};EditorUi.prototype.generatePlantUmlImage=function(b,c,d,e){function f(b,c,d){c1=b>>2;c2=(b&3)<<4|c>>4;c3=(c&15)<<2|d>>6;c4=d&63;r="";r+=l(c1&63);r+=l(c2&63);r+=l(c3&63);return r+=l(c4&63)}function l(b){if(10>b)return String.fromCharCode(48+b);b-=10;if(26>b)return String.fromCharCode(65+b);b-=26;if(26>b)return String.fromCharCode(97+
-b);b-=26;return 0==b?"-":1==b?"_":"?"}var g=new XMLHttpRequest;g.open("GET",("txt"==c?PLANT_URL+"/txt/":"png"==c?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(b){r="";for(i=0;i<b.length;i+=3)r=i+2==b.length?r+f(b.charCodeAt(i),b.charCodeAt(i+1),0):i+1==b.length?r+f(b.charCodeAt(i),0,0):r+f(b.charCodeAt(i),b.charCodeAt(i+1),b.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(b))),!0);"txt"!=c&&(g.responseType="blob");g.onload=function(b){if(200<=this.status&&300>this.status)if("txt"==
-c)d(this.response);else{var f=new FileReader;f.readAsDataURL(this.response);f.onloadend=function(b){var c=new Image;c.onload=function(){try{var b=c.width,l=c.height;if(0==b&&0==l){var g=f.result,k=g.indexOf(","),m=decodeURIComponent(escape(atob(g.substring(k+1)))),n=mxUtils.parseXml(m).getElementsByTagName("svg");0<n.length&&(b=parseFloat(n[0].getAttribute("width")),l=parseFloat(n[0].getAttribute("height")))}d(f.result,b,l)}catch(D){e(D)}};c.src=f.result};f.onerror=function(b){e(b)}}else e(b)};g.onerror=
-function(b){e(b)};g.send()};EditorUi.prototype.insertAsPreText=function(b,c,d){var f=this.editor.graph,e=null;f.getModel().beginUpdate();try{e=f.insertVertex(null,null,"<pre>"+b+"</pre>",c,d,1,1,"text;html=1;align=left;verticalAlign=top;"),f.updateCellSize(e,!0)}finally{f.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(b,c,d,e,g,k,n,v){k=null!=k?k:!0;n=null!=n?n:!0;if(null!=b)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b))this.parseFile(new Blob([b.replace(/\s+/g,
-" ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&this.editor.graph.setSelectionCells(this.insertTextAt(b.responseText,c,d,!0))}));else if("data:"==b.substring(0,5)||!this.isOffline()&&(g||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b))){var f=this.editor.graph;if("data:application/pdf;base64,"==b.substring(0,28)){var l=Editor.extractGraphModelFromPdf(b);if(null!=l&&0<l.length)return this.importXml(l,c,d,k,!0,v)}if("data:image/png;base64,"==
-b.substring(0,22)&&(l=this.extractGraphModelFromPng(b),null!=l&&0<l.length))return this.importXml(l,c,d,k,!0,v);if("data:image/svg+xml;"==b.substring(0,19))try{l=null;"data:image/svg+xml;base64,"==b.substring(0,26)?(l=b.substring(b.indexOf(",")+1),l=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l,!0)):l=decodeURIComponent(b.substring(b.indexOf(",")+1));var m=this.importXml(l,c,d,k,!0,v);if(0<m.length)return m}catch(B){}this.loadImage(b,mxUtils.bind(this,function(e){if("data:"==b.substring(0,
-5))this.resizeImage(e,b,mxUtils.bind(this,function(b,e,g){f.setSelectionCell(f.insertVertex(null,null,"",f.snap(c),f.snap(d),e,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(b)+";"))}),n,this.maxImageSize);else{var g=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),l=Math.round(e.width*g);e=Math.round(e.height*g);f.setSelectionCell(f.insertVertex(null,null,"",f.snap(c),f.snap(d),
-l,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";"))}}),mxUtils.bind(this,function(){var g=null;f.getModel().beginUpdate();try{g=f.insertVertex(f.getDefaultParent(),null,b,f.snap(c),f.snap(d),1,1,"text;"+(e?"html=1;":"")),f.updateCellSize(g),f.fireEvent(new mxEventObject("textInserted","cells",[g]))}finally{f.getModel().endUpdate()}f.setSelectionCell(g)}))}else{b=Graph.zapGremlins(mxUtils.trim(b));if(this.isCompatibleString(b))return this.importXml(b,
-c,d,k,null,v);if(0<b.length)if(this.isLucidChartData(b))this.convertLucidChart(b,mxUtils.bind(this,function(b){this.editor.graph.setSelectionCells(this.importXml(b,c,d,k,null,v))}),mxUtils.bind(this,function(b){this.handleError(b)}));else{f=this.editor.graph;g=null;f.getModel().beginUpdate();try{g=f.insertVertex(f.getDefaultParent(),null,"",f.snap(c),f.snap(d),1,1,"text;whiteSpace=wrap;"+(e?"html=1;":""));f.fireEvent(new mxEventObject("textInserted","cells",[g]));"<"==b.charAt(0)&&b.indexOf(">")==
-b.length-1&&(b=mxUtils.htmlEntities(b));b.length>this.maxTextBytes&&(b=b.substring(0,this.maxTextBytes)+"...");g.value=b;f.updateCellSize(g);if(0<this.maxTextWidth&&g.geometry.width>this.maxTextWidth){var p=f.getPreferredSizeForCell(g,this.maxTextWidth);g.geometry.width=p.width;g.geometry.height=p.height}Graph.isLink(g.value)&&f.setLinkForCell(g,g.value);g.geometry.width+=f.gridSize;g.geometry.height+=f.gridSize}finally{f.getModel().endUpdate()}return[g]}}return[]};EditorUi.prototype.formatFileSize=
-function(b){var c=-1;do b/=1024,c++;while(1024<b);return Math.max(b,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[c]};EditorUi.prototype.convertDataUri=function(b){if("data:"==b.substring(0,5)){var c=b.indexOf(";");0<c&&(b=b.substring(0,c)+b.substring(b.indexOf(",",c+1)))}return b};EditorUi.prototype.isRemoteFileFormat=function(b,c){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(b)};EditorUi.prototype.isLucidChartData=function(b){return null!=b&&('{"state":"{\\"Properties\\":'==
-b.substring(0,26)||'{"Properties":'==b.substring(0,14))};EditorUi.prototype.importLocalFile=function(b,c){if(b&&Graph.fileSupport){if(null==this.importFileInputElt){var d=document.createElement("input");d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){null!=d.files&&(this.importFiles(d.files,null,null,this.maxImageSize),d.type="",d.type="file",d.value="")}));d.style.display="none";document.body.appendChild(d);this.importFileInputElt=d}this.importFileInputElt.click()}else{window.openNew=
-!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(b,c){StorageFile.listFiles(this,"F",b,c)});window.openBrowserFile=mxUtils.bind(this,function(b,c,d){StorageFile.getFileContent(this,b,c,d)});window.deleteBrowserFile=mxUtils.bind(this,function(b,c,d){StorageFile.deleteFile(this,b,c,d)});if(!c){var f=Editor.useLocalStorage;Editor.useLocalStorage=!b}window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));window.openFile.setConsumer(mxUtils.bind(this,
-function(b,c){if(null!=c&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(c)){var d=new Blob([b],{type:"application/octet-stream"});this.importVisio(d,mxUtils.bind(this,function(b){this.importXml(b,0,0,!0)}),null,c)}else this.editor.graph.setSelectionCells(this.importXml(b,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!c){var e=this.dialog,g=e.close;this.dialog.close=mxUtils.bind(this,
-function(b){Editor.useLocalStorage=f;g.apply(e,arguments);b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(b,c,d){var f=this,e=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(b).then(function(e){if(0==Object.keys(e.files).length)d();else{var g=0,l,k=!1;e.forEach(function(b,f){var e=f.name.toLowerCase();"diagram/diagram.xml"==e?(k=!0,f.async("string").then(function(b){0==b.indexOf("<mxfile ")?
-c(b):d()})):0==e.indexOf("versions/")&&(e=parseInt(e.substr(9)),e>g&&(g=e,l=f))});0<g?l.async("string").then(function(e){!f.isOffline()&&(new XMLHttpRequest).upload&&f.isRemoteFileFormat(e,b.name)?f.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?c(b.responseText):d())}),b.name):d()}):k||d()}},function(b){d(b)}):d()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=
-!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(b,c,d,e,g,k,n,v,x,A,z,y){A=null!=A?A:!0;var f=!1,l=null,m=mxUtils.bind(this,function(b){var c=null;null!=b&&"<mxlibrary"==b.substring(0,10)?this.loadLibrary(new LocalLibrary(this,b,n)):c=this.importXml(b,d,e,A,null,null!=y?mxEvent.isControlDown(y):null);null!=v&&v(c)});"image"==c.substring(0,5)?(x=!1,"image/png"==c.substring(0,9)&&(c=z?null:this.extractGraphModelFromPng(b),null!=c&&0<c.length&&(l=this.importXml(c,d,e,A,
-null,null!=y?mxEvent.isControlDown(y):null),x=!0)),x||(c=this.editor.graph,z=b.indexOf(";"),0<z&&(b=b.substring(0,z)+b.substring(b.indexOf(",",z+1))),A&&c.isGridEnabled()&&(d=c.snap(d),e=c.snap(e)),l=[c.insertVertex(null,null,"",d,e,g,k,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";")])):/(\.*<graphml )/.test(b)?(f=!0,this.importGraphML(b,m)):null!=x&&null!=n&&(/(\.v(dx|sdx?))($|\?)/i.test(n)||/(\.vs(x|sx?))($|\?)/i.test(n))?
-(f=!0,this.importVisio(x,m)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,n)?(f=!0,this.parseFile(null!=x?x:new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?m(b.responseText):null!=v&&v(null))}),n)):0==b.indexOf("PK")&&null!=x?(f=!0,this.importZipFile(x,m,mxUtils.bind(this,function(){l=this.insertTextAt(this.validateFileData(b),d,e,!0,null,A);v(l)}))):/(\.v(sd|dx))($|\?)/i.test(n)||/(\.vs(s|x))($|\?)/i.test(n)||
-(l=this.insertTextAt(this.validateFileData(b),d,e,!0,null,A,null,null!=y?mxEvent.isControlDown(y):null));f||null==v||v(l);return l};EditorUi.prototype.importFiles=function(b,c,d,e,g,k,n,v,x,A,z,y,B){e=null!=e?e:this.maxImageSize;A=null!=A?A:this.maxImageBytes;var f=null!=c&&null!=d,l=!0;c=null!=c?c:0;d=null!=d?d:0;var m=!1;if(!mxClient.IS_CHROMEAPP&&null!=b)for(var p=z||this.resampleThreshold,q=0;q<b.length;q++)if("image/"==b[q].type.substring(0,6)&&b[q].size>p){m=!0;break}var t=mxUtils.bind(this,
-function(){var m=this.editor.graph,p=m.gridSize;g=null!=g?g:mxUtils.bind(this,function(b,c,d,e,g,l,k,m,n){try{return null!=b&&"<mxlibrary"==b.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,b,k)),null):this.importFile(b,c,d,e,g,l,k,m,n,f,y,B)}catch(ja){return this.handleError(ja),null}});k=null!=k?k:mxUtils.bind(this,function(b){m.setSelectionCells(b)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=b.length,t=q,u=[],D=mxUtils.bind(this,function(b,
-c){u[b]=c;if(0==--t){this.spinner.stop();if(null!=v)v(u);else{var d=[];m.getModel().beginUpdate();try{for(var f=0;f<u.length;f++){var e=u[f]();null!=e&&(d=d.concat(e))}}finally{m.getModel().endUpdate()}}k(d)}}),C=0;C<q;C++)mxUtils.bind(this,function(f){var k=b[f];if(null!=k){var q=new FileReader;q.onload=mxUtils.bind(this,function(b){if(null==n||n(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var q=Graph.clipSvgDataUri(b.target.result),t=q.indexOf(","),u=decodeURIComponent(escape(atob(q.substring(t+
-1)))),B=mxUtils.parseXml(u),u=B.getElementsByTagName("svg");if(0<u.length){var u=u[0],v=y?null:u.getAttribute("content");null!=v&&"<"!=v.charAt(0)&&"%"!=v.charAt(0)&&(v=unescape(window.atob?atob(v):Base64.decode(v,!0)));null!=v&&"%"==v.charAt(0)&&(v=decodeURIComponent(v));null==v||"<mxfile "!==v.substring(0,8)&&"<mxGraphModel "!==v.substring(0,14)?D(f,mxUtils.bind(this,function(){try{if(q.substring(0,t+1),null!=B){var b=B.getElementsByTagName("svg");if(0<b.length){var l=b[0],n=l.getAttribute("width"),
-y=l.getAttribute("height"),n=null!=n&&"%"!=n.charAt(n.length-1)?parseFloat(n):NaN,y=null!=y&&"%"!=y.charAt(y.length-1)?parseFloat(y):NaN,u=l.getAttribute("viewBox");if(null==u||0==u.length)l.setAttribute("viewBox","0 0 "+n+" "+y);else if(isNaN(n)||isNaN(y)){var v=u.split(" ");3<v.length&&(n=parseFloat(v[2]),y=parseFloat(v[3]))}q=Editor.createSvgDataUri(mxUtils.getXml(l));var D=Math.min(1,Math.min(e/Math.max(1,n)),e/Math.max(1,y)),A=g(q,k.type,c+f*p,d+f*p,Math.max(1,Math.round(n*D)),Math.max(1,Math.round(y*
-D)),k.name);if(isNaN(n)||isNaN(y)){var C=new Image;C.onload=mxUtils.bind(this,function(){n=Math.max(1,C.width);y=Math.max(1,C.height);A[0].geometry.width=n;A[0].geometry.height=y;l.setAttribute("viewBox","0 0 "+n+" "+y);q=Editor.createSvgDataUri(mxUtils.getXml(l));var b=q.indexOf(";");0<b&&(q=q.substring(0,b)+q.substring(q.indexOf(",",b+1)));m.setCellStyles("image",q,[A[0]])});C.src=Editor.createSvgDataUri(mxUtils.getXml(l))}return A}}}catch(ea){}return null})):D(f,mxUtils.bind(this,function(){return g(v,
-"text/xml",c+f*p,d+f*p,0,0,k.name)}))}else D(f,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==k.type){var C=y?null:this.extractGraphModelFromPng(b.target.result);if(null!=C&&0<C.length){var x=new Image;x.src=b.target.result;D(f,mxUtils.bind(this,function(){return g(C,"text/xml",c+f*p,d+f*p,x.width,x.height,k.name)}));u=!0}}u||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
-mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(b.target.result,mxUtils.bind(this,function(m){this.resizeImage(m,b.target.result,mxUtils.bind(this,function(b,m,n){D(f,mxUtils.bind(this,function(){if(null!=b&&b.length<A){var q=l&&this.isResampleImageSize(k.size,z)?Math.min(1,Math.min(e/m,e/n)):1;return g(b,k.type,c+f*p,d+f*p,Math.round(m*q),Math.round(n*q),k.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),l,e,z,k.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else q=b.target.result,g(q,k.type,c+f*p,d+f*p,240,160,k.name,function(b){D(f,function(){return b})},k)});/(\.v(dx|sdx?))($|\?)/i.test(k.name)||/(\.vs(x|sx?))($|\?)/i.test(k.name)?g(null,k.type,c+f*p,d+f*p,240,160,k.name,function(b){D(f,function(){return b})},k):"image"==k.type.substring(0,5)||"application/pdf"==k.type?q.readAsDataURL(k):q.readAsText(k)}})(C)});if(m){m=
-[];for(q=0;q<b.length;q++)m.push(b[q]);b=m;this.confirmImageResize(function(b){l=b;t()},x)}else t()};EditorUi.prototype.confirmImageResize=function(b,c){c=null!=c?c:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(f,e){if(f||c)mxSettings.setResizeImages(f?e:null),mxSettings.save();d();b(e)};null==f||c?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
-function(b){e(b,!0)},function(b){e(b,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,f)};EditorUi.prototype.parseFile=function(b,c,d){d=null!=d?d:b.name;var f=new FormData;f.append("format","xml");f.append("upfile",b,d);var e=new XMLHttpRequest;e.open("POST",
-OPEN_URL);e.onreadystatechange=function(){c(e)};e.send(f);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+b.size})}catch(t){}};EditorUi.prototype.isResampleImageSize=function(b,c){c=null!=c?c:this.resampleThreshold;return b>c};EditorUi.prototype.resizeImage=function(b,c,d,e,g,k,n){g=null!=g?g:this.maxImageSize;var f=Math.max(1,b.width),l=Math.max(1,b.height);if(e&&this.isResampleImageSize(null!=n?n:c.length,k))try{var m=Math.max(f/g,l/g);if(1<m){var p=Math.round(f/m),q=Math.round(l/
-m),t=document.createElement("canvas");t.width=p;t.height=q;t.getContext("2d").drawImage(b,0,0,p,q);var u=t.toDataURL();if(u.length<c.length){var E=document.createElement("canvas");E.width=p;E.height=q;var F=E.toDataURL();u!==F&&(c=u,f=p,l=q)}}}catch(I){}d(c,f,l)};EditorUi.prototype.extractGraphModelFromPng=function(b){return Editor.extractGraphModelFromPng(b)};EditorUi.prototype.loadImage=function(b,c,d){try{var f=new Image;f.onload=function(){f.width=0<f.width?f.width:120;f.height=0<f.height?f.height:
-120;c(f)};null!=d&&(f.onerror=d);f.src=b}catch(q){if(null!=d)d(q);else throw q;}};var g=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;Editor.isDarkMode()&&(c.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);c.cellEditor.editPlantUmlData=function(d,f,e){var g=JSON.parse(e);f=
-new TextareaDialog(b,mxResources.get("plantUml")+":",g.data,function(f){null!=f&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generatePlantUmlImage(f,g.format,function(e,l,k){b.spinner.stop();c.getModel().beginUpdate();try{if("txt"==g.format)c.labelChanged(d,"<pre>"+e+"</pre>"),c.updateCellSize(d,!0);else{c.setCellStyles("image",b.convertDataUri(e),[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=l,m.height=k,c.cellsResized([d],[m],!1))}c.setAttributeForCell(d,"plantUmlData",
-JSON.stringify({data:f,format:g.format}))}finally{c.getModel().endUpdate()}},function(c){b.handleError(c)})},null,null,400,220);b.showDialog(f.container,420,300,!0,!0);f.init()};c.cellEditor.editMermaidData=function(d,f,e){var g=JSON.parse(e);f=new TextareaDialog(b,mxResources.get("mermaid")+":",g.data,function(f){null!=f&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generateMermaidImage(f,g.config,function(e,l,k){b.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",
-e,[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=Math.max(m.width,l),m.height=Math.max(m.height,k),c.cellsResized([d],[m],!1));c.setAttributeForCell(d,"mermaidData",JSON.stringify({data:f,config:g.config},null,2))}finally{c.getModel().endUpdate()}},function(c){b.handleError(c)})},null,null,400,220);b.showDialog(f.container,420,300,!0,!0);f.init()};var d=c.cellEditor.startEditing;c.cellEditor.startEditing=function(f,e){try{var g=this.graph.getAttributeForCell(f,"plantUmlData");if(null!=
-g)this.editPlantUmlData(f,e,g);else if(g=this.graph.getAttributeForCell(f,"mermaidData"),null!=g)this.editMermaidData(f,e,g);else{var l=c.getCellStyle(f);"1"==mxUtils.getValue(l,"metaEdit","0")?b.showDataDialog(f):d.apply(this,arguments)}}catch(M){b.handleError(M)}};c.getLinkTitle=function(c){return b.getLinkTitle(c)};c.customLinkClicked=function(c){var d=!1;try{b.handleCustomLink(c),d=!0}catch(H){b.handleError(H)}return d};var e=c.parseBackgroundImage;c.parseBackgroundImage=function(b){var c=e.apply(this,
-arguments);null!=c&&null!=c.src&&Graph.isPageLink(c.src)&&(c={originalSrc:c.src});return c};var k=c.setBackgroundImage;c.setBackgroundImage=function(c){null!=c&&null!=c.originalSrc&&(c=b.createImageForPageLink(c.originalSrc,b.currentPage));k.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,
-function(b,d){var f=null!=c.backgroundImage?c.backgroundImage.originalSrc:null;if(null!=f){var e=f.indexOf(",");if(0<e)for(var f=f.substring(e+1),e=d.getProperty("patches"),g=0;g<e.length;g++)if(null!=e[g][EditorUi.DIFF_UPDATE]&&null!=e[g][EditorUi.DIFF_UPDATE][f]){c.refreshBackgroundImage();c.view.validateBackgroundImage();break}}}));var n=c.getBackgroundImageObject;c.getBackgroundImageObject=function(b,c){var d=n.apply(this,arguments);null==d||null==d.originalSrc||c||(d={src:d.originalSrc});return d};
-var u=this.clearDefaultStyle;this.clearDefaultStyle=function(){u.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var v=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";"1"==
-urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1");return v.apply(this,arguments)};var x=c.addClickHandler;c.addClickHandler=function(b,d,f){var e=d;d=function(b,d){if(null==d){var f=mxEvent.getSource(b);"a"==f.nodeName.toLowerCase()&&(d=f.getAttribute("href"))}null!=d&&c.isCustomLink(d)&&(mxEvent.isTouchEvent(b)||!mxEvent.isPopupTrigger(b))&&c.customLinkClicked(d)&&mxEvent.consume(b);null!=e&&e(b,d)};x.call(this,b,d,f)};g.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,
-null,!0);if(null!=this.menus){var A=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(c,d,f){b.editor.graph.isSelectionEmpty()?A.apply(this,arguments):b.menus.addMenuItems(c,"delete - cut copy copyAsImage - duplicate".split(" "),null,f)}}b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var z=c.getExportVariables;c.getExportVariables=
-function(){var c=z.apply(this,arguments),d=b.getCurrentFile();null!=d&&(c.filename=d.getTitle());c.pagecount=null!=b.pages?b.pages.length:1;c.page=null!=b.currentPage?b.currentPage.getName():"";c.pagenumber=null!=b.pages&&null!=b.currentPage?mxUtils.indexOf(b.pages,b.currentPage)+1:1;return c};var y=c.getGlobalVariable;c.getGlobalVariable=function(c){var d=b.getCurrentFile();return"filename"==c&&null!=d?d.getTitle():"page"==c&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==c?null!=b.currentPage&&
-null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:"pagecount"==c?null!=b.pages?b.pages.length:1:y.apply(this,arguments)};var B=c.labelLinkClicked;c.labelLinkClicked=function(b,d,f){var e=d.getAttribute("href");if(null==e||!c.isCustomLink(e)||!mxEvent.isTouchEvent(f)&&mxEvent.isPopupTrigger(f))B.apply(this,arguments);else{if(!c.isEnabled()||null!=b&&c.isCellLocked(b.cell))c.customLinkClicked(e),c.getRubberband().reset();mxEvent.consume(f)}};this.editor.getOrCreateFilename=function(){var c=b.defaultFilename,
-d=b.getCurrentFile();null!=d&&(c=null!=d.getTitle()?d.getTitle():c);return c};var C=this.actions.get("print");C.setEnabled(!mxClient.IS_IOS||!navigator.standalone);C.visible=C.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,
-!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&c.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(b){var d=c.cellEditor.text2,f=null;null!=d&&(mxEvent.addListener(d,"dragleave",function(b){null!=f&&(f.parentNode.removeChild(f),f=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(d,
-"dragover",mxUtils.bind(this,function(b){null==f&&(!mxClient.IS_IE||10<document.documentMode)&&(f=this.highlightElement(d));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(b){null!=f&&(f.parentNode.removeChild(f),f=null);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,function(b,d,f,e,g,l){c.insertImage(b,g,l)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var c=0;c<b.length;c++)b[c]()},
-mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)?this.loadImage(decodeURIComponent(d),mxUtils.bind(this,function(b){var f=Math.max(1,b.width);b=Math.max(1,b.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,f)),e/Math.max(1,b));c.insertImage(decodeURIComponent(d),f*e,b*e)})):document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"))}else 0<=
-mxUtils.indexOf(b.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"));b.stopPropagation();b.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(C=this.editor.graph.view,C.setUnit(mxSettings.getUnit()),C.addListener("unitChanged",function(b,c){mxSettings.setUnit(c.getProperty("unit"));mxSettings.save()}),
-this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,C.unit),this.refresh());if("1"==urlParams.styledev){C=document.getElementById("geFooter");null!=C&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width=
-"98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),C.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(b,c){if(0<this.editor.graph.getSelectionCount()){var d=this.editor.graph.getSelectionCell(),d=this.editor.graph.getModel().getStyle(d);
-this.styleInput.value=d||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var E=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==this.styleInput?!0:E.apply(this,arguments)}}C=document.getElementById("geInfo");null!=C&&C.parentNode.removeChild(C);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var F=null;mxEvent.addListener(c.container,"dragleave",function(b){c.isEnabled()&&(null!=F&&(F.parentNode.removeChild(F),
-F=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(b){null==F&&(!mxClient.IS_IE||10<document.documentMode)&&(F=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(b){null!=F&&(F.parentNode.removeChild(F),F=null);if(c.isEnabled()){var d=mxUtils.convertPoint(c.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),
-f=c.view.translate,e=c.view.scale,g=d.x/e-f.x,l=d.y/e-f.y;if(0<b.dataTransfer.files.length)mxEvent.isShiftDown(b)?this.openFiles(b.dataTransfer.files,!0):(mxEvent.isAltDown(b)&&(l=g=null),this.importFiles(b.dataTransfer.files,g,l,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b),b));else{mxEvent.isAltDown(b)&&(l=g=0);var k=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):null,d=this.extractGraphModelFromEvent(b,
-null!=this.pages);if(null!=d)c.setSelectionCells(this.importXml(d,g,l,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){var m=b.dataTransfer.getData("text/html"),d=document.createElement("div");d.innerHTML=c.sanitizeHtml(m);var n=null,f=d.getElementsByTagName("img");null!=f&&1==f.length?(m=f[0].getAttribute("src"),null==m&&(m=f[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||(n=!0)):(f=d.getElementsByTagName("a"),null!=f&&1==f.length?m=f[0].getAttribute("href"):
-(d=d.getElementsByTagName("pre"),null!=d&&1==d.length&&(m=mxUtils.getTextContent(d[0]))));var p=!0,q=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(m,g,l,!0,n,null,p,mxEvent.isControlDown(b)))});n&&null!=m&&m.length>this.resampleThreshold?this.confirmImageResize(function(b){p=b;q()},mxEvent.isControlDown(b)):q()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(b){var d=Math.max(1,b.width);b=Math.max(1,b.height);
-var f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,d)),f/Math.max(1,b));c.setSelectionCell(c.insertVertex(null,null,"",g,l,d*f,b*f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(b){c.setSelectionCells(this.insertTextAt(k,g,l,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),g,l,!0))}}b.stopPropagation();
-b.preventDefault()}),!1)}c.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var b=this.editor.graph;b.container.addEventListener("paste",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c))try{for(var d=c.clipboardData||c.originalEvent.clipboardData,f=!1,e=0;e<d.types.length;e++)if("text/"===d.types[e].substring(0,5)){f=!0;break}if(!f){var g=d.items;for(index in g){var l=
-g[index];if("file"===l.kind){if(b.isEditing())this.importFiles([l.getAsFile()],0,0,this.maxImageSize,function(c,d,f,e,g,l){b.insertImage(c,g,l)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var c=0;c<b.length;c++)b[c]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([l.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(c)}break}}}}catch(x){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function b(){window.setTimeout(function(){d.innerHTML=
-"&nbsp;";d.focus();document.execCommand("selectAll",!1,null)},0)}var c=this.editor.graph,d=document.createElement("div");d.setAttribute("autocomplete","off");d.setAttribute("autocorrect","off");d.setAttribute("autocapitalize","off");d.setAttribute("spellcheck","false");d.style.textRendering="optimizeSpeed";d.style.fontFamily="monospace";d.style.wordBreak="break-all";d.style.background="transparent";d.style.color="transparent";d.style.position="absolute";d.style.whiteSpace="nowrap";d.style.overflow=
-"hidden";d.style.display="block";d.style.fontSize="1";d.style.zIndex="-1";d.style.resize="none";d.style.outline="none";d.style.width="1px";d.style.height="1px";mxUtils.setOpacity(d,0);d.contentEditable=!0;d.innerHTML="&nbsp;";var e=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var f=mxEvent.getSource(b);null==c.container||!c.isEnabled()||c.isMouseDown||
-c.isEditing()||null!=this.dialog||"INPUT"==f.nodeName||"TEXTAREA"==f.nodeName||224!=b.keyCode&&(mxClient.IS_MAC||17!=b.keyCode)&&(!mxClient.IS_MAC||91!=b.keyCode&&93!=b.keyCode)||e||(d.style.left=c.container.scrollLeft+10+"px",d.style.top=c.container.scrollTop+10+"px",c.container.appendChild(d),e=!0,d.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var f=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){!e||224!=f&&17!=
-f&&91!=f&&93!=f||(e=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),d.parentNode.removeChild(d),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(d,"copy",mxUtils.bind(this,function(f){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(d),b()}catch(u){this.handleError(u)}}));mxEvent.addListener(d,"cut",mxUtils.bind(this,function(f){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(d,!0),b()}catch(u){this.handleError(u)}}));mxEvent.addListener(d,
-"paste",mxUtils.bind(this,function(b){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(d.innerHTML="&nbsp;",d.focus(),null!=b.clipboardData&&this.pasteCells(b,d,!0,!0),mxEvent.isConsumed(b)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,d,!1,!0)}),0))}),!0);var g=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==d?!0:g.apply(this,arguments)}};EditorUi.prototype.getLinkTitle=function(b){var c=Graph.prototype.getLinkTitle.apply(this,arguments);
-if(Graph.isPageLink(b)){var d=b.indexOf(",");0<d&&(c=this.getPageById(b.substring(d+1)),c=null!=c?c.getName():mxResources.get("pageNotFound"))}else"data:"==b.substring(0,5)&&(c=mxResources.get("action"));return c};EditorUi.prototype.handleCustomLink=function(b){if(Graph.isPageLink(b)){var c=b.indexOf(",");if(b=this.getPageById(b.substring(c+1)))this.selectPage(b);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(b)};EditorUi.prototype.isSettingsEnabled=
-function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(b){b.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(f){}this.fireEvent(new mxEventObject("styleChanged",
-"keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(b,c){if("1"!=urlParams["ext-fonts"])mxSettings.setCustomFonts(this.menus.customFonts);else{var d=c.getProperty("customFonts");this.menus.customFonts=d;mxSettings.setCustomFonts(d)}mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",
-mxUtils.bind(this,function(b,c){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(b,c){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.addListener("gridColorChanged",
-mxUtils.bind(this,function(b,c){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(b,c){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
-this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(b,c,d){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
-this.editor.exportToCanvas(mxUtils.bind(this,function(b,d){try{this.spinner.stop();var f=this.createImageDataUri(b,c,"png"),e=parseInt(d.getAttribute("width")),g=parseInt(d.getAttribute("height"));this.writeImageToClipboard(f,e,g,mxUtils.bind(this,function(b){this.handleError(b)}))}catch(x){this.handleError(x)}}),null,null,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,null,null!=d?d:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
-null,null,null,10,null,null,!0,null,0<b.length?b:null)}catch(p){this.handleError(p)}};EditorUi.prototype.writeImageToClipboard=function(b,c,d,e){var f=this.base64ToBlob(b.substring(b.indexOf(",")+1),"image/png");b=new ClipboardItem({"image/png":f,"text/html":new Blob(['<img src="'+b+'" width="'+c+'" height="'+d+'">'],{type:"text/html"})});navigator.clipboard.write([b])["catch"](e)};EditorUi.prototype.copyCells=function(b,c){var d=this.editor.graph;if(d.isSelectionEmpty())b.innerHTML="";else{var f=
-mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),e=mxUtils.getXml(d.encodeCells(f));mxUtils.setTextContent(b,encodeURIComponent(e));c?(d.removeCells(f,!1),d.lastPasteXml=null):(d.lastPasteXml=e,d.pasteCounter=0);b.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var b=null;if(Editor.enableNativeCipboard){var c=this.editor.graph;c.isSelectionEmpty()||(b=mxUtils.sortCells(c.getExportableCells(c.model.getTopmostCells(c.getSelectionCells()))),
-c=mxUtils.getXml(c.encodeCells(b)),navigator.clipboard.writeText(c))}return b};EditorUi.prototype.pasteXml=function(b,c,d,e){var f=this.editor.graph,g=null;f.lastPasteXml==b?f.pasteCounter++:(f.lastPasteXml=b,f.pasteCounter=0);var k=f.pasteCounter*f.gridSize;if(d||this.isCompatibleString(b))g=this.importXml(b,k,k),f.setSelectionCells(g);else if(c&&1==f.getSelectionCount()){k=f.getStartEditingCell(f.getSelectionCell(),e);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)&&"image"==f.getCurrentCellStyle(k)[mxConstants.STYLE_SHAPE])f.setCellStyles(mxConstants.STYLE_IMAGE,
-b,[k]);else{f.model.beginUpdate();try{f.labelChanged(k,b),Graph.isLink(b)&&f.setLinkForCell(k,b)}finally{f.model.endUpdate()}}f.setSelectionCell(k)}else g=f.getInsertPoint(),f.isMouseInsertPoint()&&(k=0,f.lastPasteXml==b&&0<f.pasteCounter&&f.pasteCounter--),g=this.insertTextAt(b,g.x+k,g.y+k,!0),f.setSelectionCells(g);f.isSelectionEmpty()||(f.scrollCellToVisible(f.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(f.view.getState(f.getSelectionCell())));return g};EditorUi.prototype.pasteCells=
-function(b,c,d,e){if(!mxEvent.isConsumed(b)){var f=c,g=!1;if(d&&null!=b.clipboardData&&b.clipboardData.getData){var k=b.clipboardData.getData("text/plain"),l=!1;if(null!=k&&0<k.length&&"%3CmxGraphModel%3E"==k.substring(0,18)){var m=decodeURIComponent(k);this.isCompatibleString(m)&&(l=!0,k=m)}l=l?null:b.clipboardData.getData("text/html");null!=l&&0<l.length?(f=this.parseHtmlData(l),g="text/plain"!=f.getAttribute("data-type")):null!=k&&0<k.length&&(f=document.createElement("div"),mxUtils.setTextContent(f,
-l))}k=f.getElementsByTagName("span");if(null!=k&&0<k.length&&"application/vnd.lucid.chart.objects"===k[0].getAttribute("data-lucid-type"))d=k[0].getAttribute("data-lucid-content"),null!=d&&0<d.length&&(this.convertLucidChart(d,mxUtils.bind(this,function(b){var c=this.editor.graph;c.lastPasteXml==b?c.pasteCounter++:(c.lastPasteXml=b,c.pasteCounter=0);var d=c.pasteCounter*c.gridSize;c.setSelectionCells(this.importXml(b,d,d));c.scrollCellToVisible(c.getSelectionCell())}),mxUtils.bind(this,function(b){this.handleError(b)})),
-mxEvent.consume(b));else{g=g?f.innerHTML:mxUtils.trim(null==f.innerText?mxUtils.getTextContent(f):f.innerText);l=!1;try{var n=g.lastIndexOf("%3E");0<=n&&n<g.length-3&&(g=g.substring(0,n+3))}catch(y){}try{k=f.getElementsByTagName("span"),m=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(g),this.isCompatibleString(m)&&(l=!0,g=m)}catch(y){}try{if(null!=g&&0<g.length){this.pasteXml(g,e,l,b);try{mxEvent.consume(b)}catch(y){}}else if(!d){var p=this.editor.graph;
-p.lastPasteXml=null;p.pasteCounter=0}}catch(y){this.handleError(y)}}}c.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(b){if(Graph.fileSupport)for(var c=null,d=0;d<b.length;d++)mxEvent.addListener(b[d],"dragleave",function(b){null!=c&&(c.parentNode.removeChild(c),c=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(b[d],"dragover",mxUtils.bind(this,function(b){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==c&&(!mxClient.IS_IE||10<document.documentMode&&
-12>document.documentMode)&&(c=this.highlightElement());b.stopPropagation();b.preventDefault()})),mxEvent.addListener(b[d],"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<b.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b)):this.openFiles(b.dataTransfer.files,!0);
-else{var d=this.extractGraphModelFromEvent(b);if(null==d){var f=null!=b.dataTransfer?b.dataTransfer:b.clipboardData;null!=f&&(10==document.documentMode||11==document.documentMode?d=f.getData("Text"):(d=null,d=0<=mxUtils.indexOf(f.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(f.types,"text/html")?f.getData("text/html"):null,null!=d&&0<d.length?(f=document.createElement("div"),f.innerHTML=this.editor.graph.sanitizeHtml(d),f=f.getElementsByTagName("img"),0<f.length&&
-(d=f[0].getAttribute("src"))):0<=mxUtils.indexOf(f.types,"text/plain")&&(d=f.getData("text/plain"))),null!=d&&("data:image/png;base64,"==d.substring(0,22)?(d=this.extractGraphModelFromPng(d),null!=d&&0<d.length&&this.openLocalFile(d,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(d)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(d))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&this.openLocalFile(b.getText(),null,!0)})):/^https?:\/\//.test(d)&&
-(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(d):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(d)))))}else this.openLocalFile(d,null,!0)}b.stopPropagation();b.preventDefault()}))};EditorUi.prototype.highlightElement=function(b){var c=0,d=0,f,e;if(null==b){e=document.body;var g=document.documentElement;f=(e.clientWidth||g.clientWidth)-3;e=Math.max(e.clientHeight||0,g.clientHeight)-
-3}else c=b.offsetTop,d=b.offsetLeft,f=b.clientWidth,e=b.clientHeight;g=document.createElement("div");g.style.zIndex=mxPopupMenu.prototype.zIndex+2;g.style.border="3px dotted rgb(254, 137, 12)";g.style.pointerEvents="none";g.style.position="absolute";g.style.top=c+"px";g.style.left=d+"px";g.style.width=Math.max(0,f-3)+"px";g.style.height=Math.max(0,e-3)+"px";null!=b&&b.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(g):document.body.appendChild(g);return g};EditorUi.prototype.stringToCells=
-function(b){b=mxUtils.parseXml(b);var c=this.editor.extractGraphModel(b.documentElement);b=[];if(null!=c){var d=new mxCodec(c.ownerDocument),f=new mxGraphModel;d.decode(c,f);c=f.getChildAt(f.getRoot(),0);for(d=0;d<f.getChildCount(c);d++)b.push(f.getChildAt(c,d))}return b};EditorUi.prototype.openFileHandle=function(b,c,d,e,g){if(null!=c&&0<c.length){!this.useCanvasForExport&&/(\.png)$/i.test(c)?c=c.substring(0,c.length-4)+".drawio":/(\.pdf)$/i.test(c)&&(c=c.substring(0,c.length-4)+".drawio");var f=
-mxUtils.bind(this,function(b){c=0<=c.lastIndexOf(".")?c.substring(0,c.lastIndexOf("."))+".drawio":c+".drawio";if("<mxlibrary"==b.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,e);try{this.loadLibrary(new LocalLibrary(this,b,c))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(b,c,e)});if(/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c))this.importVisio(d,mxUtils.bind(this,
-function(b){this.spinner.stop();f(b)}));else if(/(\.*<graphml )/.test(b))this.importGraphML(b,mxUtils.bind(this,function(b){this.spinner.stop();f(b)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,c))this.parseFile(d,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?f(b.responseText):this.handleError({message:mxResources.get(413==b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));
-else if(this.isLucidChartData(b))/(\.json)$/i.test(c)&&(c=c.substring(0,c.length-5)+".drawio"),this.convertLucidChart(b,mxUtils.bind(this,function(b){this.spinner.stop();this.openLocalFile(b,c,e)}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}));else if("<mxlibrary"==b.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,e);try{this.loadLibrary(new LocalLibrary(this,b,d.name))}catch(v){this.handleError(v,
-mxResources.get("errorLoadingFile"))}}else if(0==b.indexOf("PK"))this.importZipFile(d,mxUtils.bind(this,function(b){this.spinner.stop();f(b)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(b,c,e)}));else{if("image/png"==d.type.substring(0,9))b=this.extractGraphModelFromPng(b);else if("application/pdf"==d.type){var k=Editor.extractGraphModelFromPdf(b);null!=k&&(g=null,e=!0,b=k)}this.spinner.stop();this.openLocalFile(b,c,e,g,null!=g?d:null)}}};EditorUi.prototype.openFiles=function(b,
-c){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=0;d<b.length;d++)mxUtils.bind(this,function(b){var d=new FileReader;d.onload=mxUtils.bind(this,function(d){try{this.openFileHandle(d.target.result,b.name,b,c)}catch(u){this.handleError(u)}});d.onerror=mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b);window.openFile=null});"image"!==b.type.substring(0,5)&&"application/pdf"!==b.type||"image/svg"===b.type.substring(0,9)?d.readAsText(b):d.readAsDataURL(b)})(b[d])};
-EditorUi.prototype.openLocalFile=function(b,c,d,e,g){var f=this.getCurrentFile(),k=mxUtils.bind(this,function(){window.openFile=null;if(null==c&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var f=mxUtils.parseXml(b);null!=f&&(this.editor.setGraphXml(f.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,b,c||this.defaultFilename,d,e,g))});if(null!=b&&0<b.length)null==f||!f.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=e)?k():(mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp||null!=e)&&null!=f&&f.isModified()?this.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b,c),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=f&&f.isModified()?this.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),mxResources.get("discardChanges")):k()})));else throw Error(mxResources.get("notADiagramFile"));
-};EditorUi.prototype.getBasenames=function(){var b={};if(null!=this.pages)for(var c=0;c<this.pages.length;c++)this.updatePageRoot(this.pages[c]),this.addBasenamesForCell(this.pages[c].root,b);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),b);var c=[],d;for(d in b)c.push(d);return c};EditorUi.prototype.addBasenamesForCell=function(b,c){function d(b){if(null!=b){var d=b.lastIndexOf(".");0<d&&(b=b.substring(d+1,b.length));null==c[b]&&(c[b]=!0)}}var f=this.editor.graph,e=f.getCellStyle(b);
-d(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));f.model.isEdge(b)&&(d(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),d(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=f.model.getChildCount(b),g=0;g<e;g++)this.addBasenamesForCell(f.model.getChildAt(b,g),c)};EditorUi.prototype.setGraphEnabled=function(b){this.diagramContainer.style.visibility=b?"":"hidden";this.formatContainer.style.visibility=b?"":"hidden";this.sidebarFooterContainer.style.display=
-b?"":"none";this.sidebarContainer.style.display=b?"":"none";this.hsplit.style.display=b?"":"none";this.editor.graph.setEnabled(b);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=b?"":"hidden",this.ruler.vRuler.container.style.visibility=b?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=b?"":"hidden");b||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),
-null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(b,c,d,e){this.spinner.stop();
-this.addEmbedButtons();this.setGraphEnabled(!0);if(null==b||0==b.length)b=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,b,{}));this.mode=App.MODE_EMBED;this.setFileData(b);if(e)try{var f=this.editor.graph;f.setGridEnabled(!1);f.pageVisible=!1;var g=f.model.cells,k;for(k in g){var l=g[k];null!=l&&null!=l.style&&(l.style+=";sketch=1;"+(-1==l.style.indexOf("fontFamily=")||-1<l.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
-""))}}catch(x){console.log(x)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=d?d:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
-this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(b,c){null!=b?b.getPublicUrl(c):c(null)};EditorUi.prototype.createLoadMessage=function(b){var c=this.editor.graph;return{event:b,pageVisible:c.pageVisible,translate:c.view.translate,bounds:c.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:c.view.scale,page:c.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(b){var c=null,d=!1,
-f=!1,e=null,g=mxUtils.bind(this,function(b,c){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,g);mxEvent.addListener(window,"message",mxUtils.bind(this,function(g){if(g.source==(window.opener||window.parent)){var l=g.data,m=mxUtils.bind(this,function(b){if(null!=b&&"function"===typeof b.charAt&&"<"!=b.charAt(0))try{"data:image/png;base64,"==
-b.substring(0,22)?b=this.extractGraphModelFromPng(b):"data:image/svg+xml;base64,"==b.substring(0,26)?b=atob(b.substring(26)):"data:image/svg+xml;utf8,"==b.substring(0,24)&&(b=b.substring(24)),null!=b&&("%"==b.charAt(0)?b=decodeURIComponent(b):"<"!=b.charAt(0)&&(b=Graph.decompress(b)))}catch(la){}return b});if("json"==urlParams.proto){var n=!1;try{l=JSON.parse(l)}catch(S){l=null}try{if(null==l)return;if("dialog"==l.action){this.showError(null!=l.titleKey?mxResources.get(l.titleKey):l.title,null!=l.messageKey?
-mxResources.get(l.messageKey):l.message,null!=l.buttonKey?mxResources.get(l.buttonKey):l.button);null!=l.modified&&(this.editor.modified=l.modified);return}if("layout"==l.action){this.executeLayoutList(l.layouts);return}if("prompt"==l.action){this.spinner.stop();var p=new FilenameDialog(this,l.defaultValue||"",null!=l.okKey?mxResources.get(l.okKey):l.ok,function(b){null!=b?k.postMessage(JSON.stringify({event:"prompt",value:b,message:l}),"*"):k.postMessage(JSON.stringify({event:"prompt-cancel",message:l}),
-"*")},null!=l.titleKey?mxResources.get(l.titleKey):l.title);this.showDialog(p.container,300,80,!0,!1);p.init();return}if("draft"==l.action){var q=m(l.xml);this.spinner.stop();p=new DraftDialog(this,mxResources.get("draftFound",[l.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:l}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:l}),
-"*")}),l.editKey?mxResources.get(l.editKey):null,l.discardKey?mxResources.get(l.discardKey):null,l.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:l}),"*")}):null);this.showDialog(p.container,640,480,!0,!1,mxUtils.bind(this,function(b){b&&this.actions.get("exit").funct()}));try{p.init()}catch(S){k.postMessage(JSON.stringify({event:"draft",error:S.toString(),message:l}),"*")}return}if("template"==l.action){this.spinner.stop();
-var t=1==l.enableRecent,u=1==l.enableSearch,v=1==l.enableCustomTemp;if("1"==urlParams.newTempDlg&&!l.templatesOnly&&null!=l.callback){var D=this.getCurrentUser(),x=new TemplatesDialog(this,function(b,c,d){b=b||this.emptyDiagramXml;k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c,tempUrl:d.url,libs:d.libs,builtIn:null!=d.info&&null!=d.info.custContentId,message:l}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=D?D.id:
-null,t?mxUtils.bind(this,function(b,c,d){this.remoteInvoke("getRecentDiagrams",[d],null,b,c)}):null,u?mxUtils.bind(this,function(b,c,d,f){this.remoteInvoke("searchDiagrams",[b,f],null,c,d)}):null,mxUtils.bind(this,function(b,c,d){this.remoteInvoke("getFileContent",[b.url],null,c,d)}),null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,!1,!1,!0,!0);this.showDialog(x.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}p=
-new NewDialog(this,!1,l.templatesOnly?!1:null!=l.callback,mxUtils.bind(this,function(c,d,f,e){c=c||this.emptyDiagramXml;null!=l.callback?k.postMessage(JSON.stringify({event:"template",xml:c,blank:c==this.emptyDiagramXml,name:d,tempUrl:f,libs:e,builtIn:!0,message:l}),"*"):(b(c,g,c!=this.emptyDiagramXml,l.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,t?mxUtils.bind(this,function(b){this.remoteInvoke("getRecentDiagrams",[null],null,b,function(){b(null,
-"Network Error!")})}):null,u?mxUtils.bind(this,function(b,c){this.remoteInvoke("searchDiagrams",[b,null],null,c,function(){c(null,"Network Error!")})}):null,mxUtils.bind(this,function(b,c,d){k.postMessage(JSON.stringify({event:"template",docUrl:b,info:c,name:d}),"*")}),null,null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,1==l.withoutType);this.showDialog(p.container,620,460,!0,!1,mxUtils.bind(this,function(b){this.sidebar.hideTooltip();
-b&&this.actions.get("exit").funct()}));p.init();return}if("textContent"==l.action){var K=this.getDiagramTextContent();k.postMessage(JSON.stringify({event:"textContent",data:K,message:l}),"*");return}if("status"==l.action){null!=l.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(l.messageKey))):null!=l.message&&this.editor.setStatus(mxUtils.htmlEntities(l.message));null!=l.modified&&(this.editor.modified=l.modified);return}if("spinner"==l.action){var M=null!=l.messageKey?mxResources.get(l.messageKey):
-l.message;null==l.show||l.show?this.spinner.spin(document.body,M):this.spinner.stop();return}if("export"==l.action){if("png"==l.format||"xmlpng"==l.format){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin)){var L=null!=l.xml?l.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var P=this.editor.graph,O=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();var c=this.createLoadMessage("export");c.format=
-l.format;c.message=l;c.data=b;c.xml=L;k.postMessage(JSON.stringify(c),"*")}),G=mxUtils.bind(this,function(b){null==b&&(b=Editor.blankImage);"xmlpng"==l.format&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(L)));P!=this.editor.graph&&P.container.parentNode.removeChild(P.container);O(b)}),J=l.pageId||(null!=this.pages?l.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){null!=l.xml&&0<l.xml.length&&(d=!0,this.setFileData(L),d=!1);if(null!=
-this.pages&&this.currentPage.getId()!=J){for(var W=P.getGlobalVariable,P=this.createTemporaryGraph(P.getStylesheet()),T,Q=0;Q<this.pages.length;Q++)if(this.pages[Q].getId()==J){T=this.updatePageRoot(this.pages[Q]);break}null==T&&(T=this.currentPage);P.getGlobalVariable=function(b){return"page"==b?T.getName():"pagenumber"==b?1:W.apply(this,arguments)};document.body.appendChild(P.container);P.model.setRoot(T.root)}if(null!=l.layerIds){for(var Y=P.model,ga=Y.getChildCells(Y.getRoot()),p={},Q=0;Q<l.layerIds.length;Q++)p[l.layerIds[Q]]=
-!0;for(Q=0;Q<ga.length;Q++)Y.setVisible(ga[Q],p[ga[Q].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(b){G(b.toDataURL("image/png"))}),l.width,null,l.background,mxUtils.bind(this,function(){G(null)}),null,null,l.scale,l.transparent,l.shadow,null,P,l.border,null,l.grid,l.keepTheme)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==l.format?"1":"0")+(null!=J?"&pageId="+J:"")+(null!=l.layerIds&&0<l.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:l.layerIds})):
-"")+(null!=l.scale?"&scale="+l.scale:"")+"&base64=1&xml="+encodeURIComponent(L))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?O("data:image/png;base64,"+b.getText()):G(null)}),mxUtils.bind(this,function(){G(null)}))}}else{null!=l.xml&&0<l.xml.length&&(d=!0,this.setFileData(l.xml),d=!1);M=this.createLoadMessage("export");M.message=l;if("html2"==l.format||"html"==l.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ha=this.getXmlFileData();M.xml=
-mxUtils.getXml(ha);M.data=this.getFileData(null,null,!0,null,null,null,ha);M.format=l.format}else if("html"==l.format)L=this.editor.getGraphXml(),M.data=this.getHtml(L,this.editor.graph),M.xml=mxUtils.getXml(L),M.format=l.format;else{mxSvgCanvas2D.prototype.foAltText=null;var ba=null!=l.background?l.background:this.editor.graph.background;ba==mxConstants.NONE&&(ba=null);M.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);M.format="svg";var aa=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);
-this.spinner.stop();M.data=Editor.createSvgDataUri(b);k.postMessage(JSON.stringify(M),"*")});if("xmlsvg"==l.format)(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin))&&this.getEmbeddedSvg(M.xml,this.editor.graph,null,!0,aa,null,null,l.embedImages,ba,l.scale,l.border,l.shadow,l.keepTheme);else if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin)){this.editor.graph.setEnabled(!1);
-var Z=this.editor.graph.getSvg(ba,l.scale,l.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||l.shadow,null,l.keepTheme);(this.editor.graph.shadowVisible||l.shadow)&&this.editor.graph.addSvgShadow(Z);this.embedFonts(Z,mxUtils.bind(this,function(b){l.embedImages||null==l.embedImages?this.editor.convertImages(b,mxUtils.bind(this,function(b){aa(mxUtils.getXml(b))})):aa(mxUtils.getXml(b))}))}return}k.postMessage(JSON.stringify(M),"*")}return}if("load"==l.action){n=l.toSketch;f=1==
-l.autosave;this.hideDialog();null!=l.modified&&null==urlParams.modified&&(urlParams.modified=l.modified);null!=l.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=l.saveAndExit);null!=l.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=l.noSaveBtn);null!=l.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=l.noExitBtn);null!=l.title&&null!=this.buttonContainer&&(q=document.createElement("span"),mxUtils.write(q,l.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight=
-"12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="1"==urlParams.noLangIcon?"0":"25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(q),this.embedFilenameSpan=q);try{l.libs&&this.sidebar.showEntries(l.libs)}catch(S){}l=null!=l.xmlpng?this.extractGraphModelFromPng(l.xmlpng):
-null!=l.descriptor?l.descriptor:l.xml}else{if("merge"==l.action){var ja=this.getCurrentFile();null!=ja&&(q=m(l.xml),null!=q&&""!=q&&ja.mergeFile(new LocalFile(this,q),function(){k.postMessage(JSON.stringify({event:"merge",message:l}),"*")},function(b){k.postMessage(JSON.stringify({event:"merge",message:l,error:b}),"*")}))}else"remoteInvokeReady"==l.action?this.handleRemoteInvokeReady(k):"remoteInvoke"==l.action?this.handleRemoteInvoke(l,g.origin):"remoteInvokeResponse"==l.action?this.handleRemoteInvokeResponse(l):
-k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(l)}),"*");return}}catch(S){this.handleError(S)}}var da=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),N=mxUtils.bind(this,function(g,l){d=!0;try{b(g,l,null,n)}catch(fa){this.handleError(fa)}d=!1;null!=urlParams.modified&&this.editor.setStatus("");e=da();f&&null==c&&(c=mxUtils.bind(this,function(b,c){var f=da();if(f!=
-e&&!d){var g=this.createLoadMessage("autosave");g.xml=f;(window.opener||window.parent).postMessage(JSON.stringify(g),"*")}e=f}),this.editor.graph.model.addListener(mxEvent.CHANGE,c),this.editor.graph.addListener("gridSizeChanged",c),this.editor.graph.addListener("shadowVisibleChanged",c),this.addListener("pageFormatChanged",c),this.addListener("pageScaleChanged",c),this.addListener("backgroundColorChanged",c),this.addListener("backgroundImageChanged",c),this.addListener("foldingEnabledChanged",c),
-this.addListener("mathEnabledChanged",c),this.addListener("gridEnabledChanged",c),this.addListener("guidesEnabledChanged",c),this.addListener("pageViewChanged",c));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var m=this.createLoadMessage("load");m.xml=g;k.postMessage(JSON.stringify(m),"*")}});null!=l&&"function"===typeof l.substring&&"data:application/vnd.visio;base64,"==l.substring(0,34)?(m="0M8R4KGxGuE"==l.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(l.substring(l.indexOf(",")+
-1)),function(b){N(b,g)},mxUtils.bind(this,function(b){this.handleError(b)}),m)):null!=l&&"function"===typeof l.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(l,"")?this.parseFile(new Blob([l],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&"<mxGraphModel"==b.responseText.substring(0,13)&&N(b.responseText,g)}),""):null!=l&&"function"===typeof l.substring&&this.isLucidChartData(l)?this.convertLucidChart(l,
-mxUtils.bind(this,function(b){N(b)}),mxUtils.bind(this,function(b){this.handleError(b)})):null==l||"object"!==typeof l||null==l.format||null==l.data&&null==l.url?(l=m(l),N(l,g)):this.loadDescriptor(l,mxUtils.bind(this,function(b){N(da(),g)}),mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"))}))}}));var k=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(g,"*");if("json"==urlParams.proto){var n=
-this.editor.graph.openLink;this.editor.graph.openLink=function(b,c,d){n.apply(this,arguments);k.postMessage(JSON.stringify({event:"openLink",href:b,target:c,allowOpener:d}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var b=document.createElement("div");b.style.display="inline-block";b.style.position="absolute";b.style.paddingTop="atlas"==uiTheme?"2px":"0px";b.style.paddingLeft="8px";b.style.paddingBottom="2px";var c=document.createElement("button");c.className="geBigButton";
-var d=c;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var e="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,e);c.setAttribute("title",e);mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));b.appendChild(c)}}else mxUtils.write(c,mxResources.get("save")),c.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),
-b.appendChild(c),"1"==urlParams.saveAndExit&&(c=document.createElement("a"),mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),b.appendChild(c),d=c);"1"!=urlParams.noExitBtn&&(c=document.createElement("a"),d="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),
-mxUtils.write(c,d),c.setAttribute("title",d),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),b.appendChild(c),d=c);d.style.marginRight="20px";this.toolbar.container.appendChild(b);this.toolbar.staticElements.push(b);b.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,
-mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(b){this.importCsv(b)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(b,c){for(var d=this.editor.graph,f=d.getSelectionCells(),e=0;e<b.length;e++){var g=new window[b[e].layout](d);
-if(null!=b[e].config)for(var l in b[e].config)g[l]=b[e].config[l];this.executeLayout(function(){g.execute(d.getDefaultParent(),0==f.length?null:f)},e==b.length-1,c)}};EditorUi.prototype.importCsv=function(b,c){try{var d=b.split("\n"),f=[],e=[],g={};if(0<d.length){var l={},k=null,n=null,A=null,z=null,y=null,B=null,C=null,E=null,F=null,I="",D="auto",H="auto",K=null,M=null,L=40,P=40,O=100,G=0,J=this.editor.graph;J.getGraphBounds();for(var W=function(){null!=c?c(X):(J.setSelectionCells(X),J.scrollCellToVisible(J.getSelectionCell()))},
-T=J.getFreeInsertPoint(),Q=T.x,Y=T.y,T=Y,ga=null,ha="auto",F=null,ba=[],aa=null,Z=null,ja=0;ja<d.length&&"#"==d[ja].charAt(0);){b=d[ja];for(ja++;ja<d.length&&"\\"==b.charAt(b.length-1)&&"#"==d[ja].charAt(0);)b=b.substring(0,b.length-1)+mxUtils.trim(d[ja].substring(1)),ja++;if("#"!=b.charAt(1)){var da=b.indexOf(":");if(0<da){var N=mxUtils.trim(b.substring(1,da)),S=mxUtils.trim(b.substring(da+1));"label"==N?ga=J.sanitizeHtml(S):"labelname"==N&&0<S.length&&"-"!=S?y=S:"labels"==N&&0<S.length&&"-"!=S?
-B=JSON.parse(S):"style"==N?n=S:"parentstyle"==N?C=S:"stylename"==N&&0<S.length&&"-"!=S?z=S:"styles"==N&&0<S.length&&"-"!=S?A=JSON.parse(S):"vars"==N&&0<S.length&&"-"!=S?k=JSON.parse(S):"identity"==N&&0<S.length&&"-"!=S?E=S:"parent"==N&&0<S.length&&"-"!=S?F=S:"namespace"==N&&0<S.length&&"-"!=S?I=S:"width"==N?D=S:"height"==N?H=S:"left"==N&&0<S.length?K=S:"top"==N&&0<S.length?M=S:"ignore"==N?Z=S.split(","):"connect"==N?ba.push(JSON.parse(S)):"link"==N?aa=S:"padding"==N?G=parseFloat(S):"edgespacing"==
-N?L=parseFloat(S):"nodespacing"==N?P=parseFloat(S):"levelspacing"==N?O=parseFloat(S):"layout"==N&&(ha=S)}}}if(null==d[ja])throw Error(mxResources.get("invalidOrMissingFile"));for(var la=this.editor.csvToArray(d[ja]),N=da=null,S=[],U=0;U<la.length;U++)E==la[U]&&(da=U),F==la[U]&&(N=U),S.push(mxUtils.trim(la[U]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ga&&(ga="%"+S[0]+"%");if(null!=ba)for(var fa=0;fa<ba.length;fa++)null==l[ba[fa].to]&&(l[ba[fa].to]={});E=[];for(U=ja+1;U<
-d.length;U++){var ia=this.editor.csvToArray(d[U]);if(null==ia){var na=40<d[U].length?d[U].substring(0,40)+"...":d[U];throw Error(na+" ("+U+"):\n"+mxResources.get("containsValidationErrors"));}0<ia.length&&E.push(ia)}J.model.beginUpdate();try{for(U=0;U<E.length;U++){var ia=E[U],V=null,ca=null!=da?I+ia[da]:null;null!=ca&&(V=J.model.getCell(ca));var d=null!=V,ea=new mxCell(ga,new mxGeometry(Q,T,0,0),n||"whiteSpace=wrap;html=1;");ea.vertex=!0;ea.id=ca;for(var ka=0;ka<ia.length;ka++)J.setAttributeForCell(ea,
-S[ka],ia[ka]);if(null!=y&&null!=B){var pa=B[ea.getAttribute(y)];null!=pa&&J.labelChanged(ea,pa)}if(null!=z&&null!=A){var oa=A[ea.getAttribute(z)];null!=oa&&(ea.style=oa)}J.setAttributeForCell(ea,"placeholders","1");ea.style=J.replacePlaceholders(ea,ea.style,k);d&&(J.model.setGeometry(V,ea.geometry),J.model.setStyle(V,ea.style),0>mxUtils.indexOf(e,V)&&e.push(V));V=ea;if(!d)for(fa=0;fa<ba.length;fa++)l[ba[fa].to][V.getAttribute(ba[fa].to)]=V;null!=aa&&"link"!=aa&&(J.setLinkForCell(V,V.getAttribute(aa)),
-J.setAttributeForCell(V,aa,null));J.fireEvent(new mxEventObject("cellsInserted","cells",[V]));var R=this.editor.graph.getPreferredSizeForCell(V);V.vertex&&(null!=K&&null!=V.getAttribute(K)&&(V.geometry.x=Q+parseFloat(V.getAttribute(K))),null!=M&&null!=V.getAttribute(M)&&(V.geometry.y=Y+parseFloat(V.getAttribute(M))),"@"==D.charAt(0)&&null!=V.getAttribute(D.substring(1))?V.geometry.width=parseFloat(V.getAttribute(D.substring(1))):V.geometry.width="auto"==D?R.width+G:parseFloat(D),"@"==H.charAt(0)&&
-null!=V.getAttribute(H.substring(1))?V.geometry.height=parseFloat(V.getAttribute(H.substring(1))):V.geometry.height="auto"==H?R.height+G:parseFloat(H),T+=V.geometry.height+P);d?(null==g[ca]&&(g[ca]=[]),g[ca].push(V)):(F=null!=N?J.model.getCell(I+ia[N]):null,f.push(V),null!=F?(F.style=J.replacePlaceholders(F,C,k),J.addCell(V,F)):e.push(J.addCell(V)))}for(var ma=e.slice(),X=e.slice(),fa=0;fa<ba.length;fa++)for(var ta=ba[fa],U=0;U<f.length;U++){var V=f[U],ra=mxUtils.bind(this,function(b,c,d){var f=c.getAttribute(d.from);
-if(null!=f&&(J.setAttributeForCell(c,d.from,null),""!=f))for(var f=f.split(","),e=0;e<f.length;e++){var g=l[d.to][f[e]];if(null!=g){var m=d.label;null!=d.fromlabel&&(m=(c.getAttribute(d.fromlabel)||"")+(m||""));null!=d.sourcelabel&&(m=J.replacePlaceholders(c,d.sourcelabel,k)+(m||""));null!=d.tolabel&&(m=(m||"")+(g.getAttribute(d.tolabel)||""));null!=d.targetlabel&&(m=(m||"")+J.replacePlaceholders(g,d.targetlabel,k));var n="target"==d.placeholders==!d.invert?g:b,n=null!=d.style?J.replacePlaceholders(n,
-d.style,k):J.createCurrentEdgeStyle(),m=J.insertEdge(null,null,m||"",d.invert?g:b,d.invert?b:g,n);if(null!=d.labels)for(n=0;n<d.labels.length;n++){var p=d.labels[n],y=new mxCell(p.label||n,new mxGeometry(null!=p.x?p.x:0,null!=p.y?p.y:0,0,0),"resizable=0;html=1;");y.vertex=!0;y.connectable=!1;y.geometry.relative=!0;null!=p.placeholders&&(y.value=J.replacePlaceholders("target"==p.placeholders==!d.invert?g:b,y.value,k));if(null!=p.dx||null!=p.dy)y.geometry.offset=new mxPoint(null!=p.dx?p.dx:0,null!=
-p.dy?p.dy:0);m.insert(y)}X.push(m);mxUtils.remove(d.invert?b:g,ma)}}});ra(V,V,ta);if(null!=g[V.id])for(ka=0;ka<g[V.id].length;ka++)ra(V,g[V.id][ka],ta)}if(null!=Z)for(U=0;U<f.length;U++)for(V=f[U],ka=0;ka<Z.length;ka++)J.setAttributeForCell(V,mxUtils.trim(Z[ka]),null);if(0<e.length){var qa=new mxParallelEdgeLayout(J);qa.spacing=L;qa.checkOverlap=!0;var xa=function(){0<qa.spacing&&qa.execute(J.getDefaultParent());for(var b=0;b<e.length;b++){var c=J.getCellGeometry(e[b]);c.x=Math.round(J.snap(c.x));
-c.y=Math.round(J.snap(c.y));"auto"==D&&(c.width=Math.round(J.snap(c.width)));"auto"==H&&(c.height=Math.round(J.snap(c.height)))}};if("["==ha.charAt(0)){var ya=W;J.view.validate();this.executeLayoutList(JSON.parse(ha),function(){xa();ya()});W=null}else if("circle"==ha){var ua=new mxCircleLayout(J);ua.disableEdgeStyle=!1;ua.resetEdges=!1;var za=ua.isVertexIgnored;ua.isVertexIgnored=function(b){return za.apply(this,arguments)||0>mxUtils.indexOf(e,b)};this.executeLayout(function(){ua.execute(J.getDefaultParent());
-xa()},!0,W);W=null}else if("horizontaltree"==ha||"verticaltree"==ha||"auto"==ha&&X.length==2*e.length-1&&1==ma.length){J.view.validate();var va=new mxCompactTreeLayout(J,"horizontaltree"==ha);va.levelDistance=P;va.edgeRouting=!1;va.resetEdges=!1;this.executeLayout(function(){va.execute(J.getDefaultParent(),0<ma.length?ma[0]:null)},!0,W);W=null}else if("horizontalflow"==ha||"verticalflow"==ha||"auto"==ha&&1==ma.length){J.view.validate();var wa=new mxHierarchicalLayout(J,"horizontalflow"==ha?mxConstants.DIRECTION_WEST:
-mxConstants.DIRECTION_NORTH);wa.intraCellSpacing=P;wa.parallelEdgeSpacing=L;wa.interRankCellSpacing=O;wa.disableEdgeStyle=!1;this.executeLayout(function(){wa.execute(J.getDefaultParent(),X);J.moveCells(X,Q,Y)},!0,W);W=null}else if("organic"==ha||"auto"==ha&&X.length>e.length){J.view.validate();var sa=new mxFastOrganicLayout(J);sa.forceConstant=3*P;sa.disableEdgeStyle=!1;sa.resetEdges=!1;var Aa=sa.isVertexIgnored;sa.isVertexIgnored=function(b){return Aa.apply(this,arguments)||0>mxUtils.indexOf(e,b)};
-this.executeLayout(function(){sa.execute(J.getDefaultParent());xa()},!0,W);W=null}}this.hideDialog()}finally{J.model.endUpdate()}null!=W&&W()}}catch(Ba){this.handleError(Ba)}};EditorUi.prototype.getSearch=function(b){var c="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=b&&0<window.location.search.length){var d="?",f;for(f in urlParams)0>mxUtils.indexOf(b,f)&&null!=urlParams[f]&&(c+=d+f+"="+urlParams[f],d="&")}else c=window.location.search;return c};EditorUi.prototype.getUrl=function(b){b=
-null!=b?b:window.location.pathname;var c=0<b.indexOf("?")?1:0;if("1"==urlParams.offline)b+=window.location.search;else{var d="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),f;for(f in urlParams)0>mxUtils.indexOf(d,f)&&(b=0==c?b+"?":b+"&",null!=urlParams[f]&&(b+=f+"="+urlParams[f],c++))}return b};EditorUi.prototype.showLinkDialog=function(b,c,d,e,g){b=new LinkDialog(this,b,c,d,!0,e,g);this.showDialog(b.container,560,130,!0,!0);b.init()};EditorUi.prototype.getServiceCount=
-function(b){var c=1;null==this.drive&&"function"!==typeof window.DriveClient||c++;null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;null!=this.gitHub&&c++;null!=this.gitLab&&c++;null!=this.notion&&c++;b&&isLocalStorage&&"1"==urlParams.browser&&c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var b=this.getCurrentFile(),c=null!=b||"1"==urlParams.embed&&this.editor.graph.isEnabled();
-this.menus.get("viewPanels").setEnabled(c);this.menus.get("viewZoom").setEnabled(c);var d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==b||b.isRestricted());this.actions.get("makeCopy").setEnabled(!d);this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d);d="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(d);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(d),
-this.menus.get("newLibrary").setEnabled(d));b="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=b&&b.isEditable();this.actions.get("image").setEnabled(c);this.actions.get("zoomIn").setEnabled(c);this.actions.get("zoomOut").setEnabled(c);this.actions.get("resetView").setEnabled(c);this.actions.get("undo").setEnabled(this.canUndo()&&b);this.actions.get("redo").setEnabled(this.canRedo()&&b);this.menus.get("edit").setEnabled(c);this.menus.get("view").setEnabled(c);this.menus.get("importFrom").setEnabled(b);
-this.menus.get("arrange").setEnabled(b);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(b),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(b));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var b=this.getCurrentFile();
-return null!=b&&b.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var k=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){k.apply(this,arguments);var b=this.editor.graph,c=this.getCurrentFile(),d=this.isDiagramActive(),e=b.getEditableCells(b.getSelectionCells());this.actions.get("pageSetup").setEnabled(d);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(d);this.actions.get("editData").setEnabled(0<
-e.length||b.isSelectionEmpty());this.actions.get("shadowVisible").setEnabled(d);this.actions.get("connectionArrows").setEnabled(d);this.actions.get("connectionPoints").setEnabled(d);this.actions.get("copyStyle").setEnabled(d&&!b.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(d&&0<e.length);this.actions.get("editGeometry").setEnabled(0<e.length&&b.getModel().isVertex(e[0]));this.actions.get("createShape").setEnabled(d);this.actions.get("createRevision").setEnabled(d);this.actions.get("moveToFolder").setEnabled(null!=
-c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(d&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=
-c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());c=this.actions.get("findReplace");c.setEnabled("hidden"!=this.diagramContainer.style.visibility);c.label=mxResources.get("find")+(b.isEnabled()?"/"+mxResources.get("replace"):"")+"...";b=b.view.getState(b.getSelectionCell());this.actions.get("editShape").setEnabled(d&&null!=b&&null!=b.shape&&null!=b.shape.stencil)};var n=EditorUi.prototype.destroy;
-EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);n.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(b,c,d,e,g,k,n,v){var f=b.editor.graph;if("xml"==d)b.hideDialog(),b.saveData(c,"xml",mxUtils.getXml(b.editor.getGraphXml()),"text/xml");else if("svg"==d)b.hideDialog(),b.saveData(c,"svg",mxUtils.getXml(f.getSvg(e,
-g,k)),"image/svg+xml");else{var l=b.getFileData(!0,null,null,null,null,!0),m=f.getGraphBounds(),p=Math.floor(m.width*g/f.view.scale),q=Math.floor(m.height*g/f.view.scale);if(l.length<=MAX_REQUEST_SIZE&&p*q<MAX_AREA)if(b.hideDialog(),"png"!=d&&"jpg"!=d&&"jpeg"!=d||!b.isExportToCanvas()){var t={globalVars:f.getExportVariables()};v&&(t.grid={size:f.gridSize,steps:f.view.gridSteps,color:f.view.gridColor});b.saveRequest(c,d,function(b,c){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(c||"0")+
-(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(t))+(0<n?"&dpi="+n:"")+"&bg="+(null!=e?e:"none")+"&w="+p+"&h="+q+"&border="+k+"&xml="+encodeURIComponent(l))})}else"png"==d?b.exportImage(g,null==e||"none"==e,!0,!1,!1,k,!0,!1,null,v,n):b.exportImage(g,!1,!0,!1,!1,k,!0,!1,"jpeg",v);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var b=this.editor.graph,c="";if(null!=
-this.pages)for(var d=0;d<this.pages.length;d++){var e=b;this.currentPage!=this.pages[d]&&(e=this.createTemporaryGraph(b.getStylesheet()),this.updatePageRoot(this.pages[d]),e.model.setRoot(this.pages[d].root));c+=this.pages[d].getName()+" "+e.getIndexableText()+" "}else c=b.getIndexableText();this.editor.graph.setEnabled(!0);return c};EditorUi.prototype.showRemotelyStoredLibrary=function(b){var c={},d=document.createElement("div");d.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,
-mxUtils.htmlEntities(b));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(e);var f=document.createElement("div");f.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";f.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var g={};try{var k=mxSettings.getCustomLibraries();for(b=0;b<k.length;b++){var n=k[b];if("R"==n.substring(0,1)){var x=JSON.parse(decodeURIComponent(n.substring(1)));g[x[0]]=
-{id:x[0],title:x[1],downloadUrl:x[2]}}}}catch(A){}this.remoteInvoke("getCustomLibraries",null,null,function(b){f.innerHTML="";if(0==b.length)f.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var d=0;d<b.length;d++){var e=b[d];g[e.id]&&(c[e.id]=e);var k=this.addCheckbox(f,e.title,g[e.id]);(function(b,d){mxEvent.addListener(d,"change",function(){this.checked?c[b.id]=b:delete c[b.id]})})(e,k)}},mxUtils.bind(this,
+!0),f),k=d;else if(l||null!=this.pages&&this.currentPage!=this.pages[0]){var f=this.createTemporaryGraph(f.getStylesheet()),m=f.getGlobalVariable,n=this.pages[0];f.getGlobalVariable=function(b){return"page"==b?n.getName():"pagenumber"==b?1:m.apply(this,arguments)};document.body.appendChild(f.container);f.model.setRoot(n.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(d){try{null==k&&(k=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var e=d.toDataURL("image/png"),e=Editor.writeGraphModelToPng(e,
+"tEXt","mxfile",encodeURIComponent(k));b(e.substring(e.lastIndexOf(",")+1));f!=this.editor.graph&&f.container.parentNode.removeChild(f.container)}catch(z){null!=c&&c(z)}}),null,null,null,mxUtils.bind(this,function(b){null!=c&&c(b)}),null,null,e,null,f.shadowVisible,null,f,g)}catch(A){null!=c&&c(A)}};EditorUi.prototype.getEmbeddedSvg=function(b,c,d,e,g,k,n,v,x,B,A,y,z){v=null!=v?v:!0;n=null!=x?x:c.background;n==mxConstants.NONE&&(n=null);k=c.getSvg(n,B,A,null,null,k,null,null,null,c.shadowVisible||
+y,null,z);(c.shadowVisible||y)&&c.addSvgShadow(k);null!=b&&k.setAttribute("content",b);null!=d&&k.setAttribute("resource",d);var f=(e?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(k);if(null!=g)this.embedFonts(k,mxUtils.bind(this,function(b){v?this.editor.convertImages(b,mxUtils.bind(this,function(b){g(f)})):g(f)}));else return f};EditorUi.prototype.embedFonts=function(b,c){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&
+this.editor.addFontCss(b,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(f){try{null!=f&&this.editor.addFontCss(b,f),c(b)}catch(p){c(b)}}))}catch(m){c(b)}}))};EditorUi.prototype.exportImage=function(b,c,d,e,g,k,n,v,x,B,A,y,z){x=null!=x?x:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var f=this.editor.graph.isSelectionEmpty();d=null!=d?d:f;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,
+function(b){this.spinner.stop();try{this.saveCanvas(b,g?this.getFileData(!0,null,null,null,d,v):null,x,null==this.pages||0==this.pages.length,A)}catch(E){this.handleError(E)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,d,b||1,c,e,null,null,k,n,B,y,z)}catch(F){this.spinner.stop(),this.handleError(F)}}};EditorUi.prototype.isCorsEnabledForUrl=function(b){return this.editor.isCorsEnabledForUrl(b)};EditorUi.prototype.importXml=function(b,
+c,d,e,g,k,n){c=null!=c?c:0;d=null!=d?d:0;var f=[];try{var l=this.editor.graph;if(null!=b&&0<b.length){l.model.beginUpdate();try{var m=mxUtils.parseXml(b);b={};var p=this.editor.extractGraphModel(m.documentElement,null!=this.pages);if(null!=p&&"mxfile"==p.nodeName&&null!=this.pages){var q=p.getElementsByTagName("diagram");if(1==q.length&&!k){if(p=Editor.parseDiagramNode(q[0]),null!=this.currentPage&&(b[q[0].getAttribute("id")]=this.currentPage.getId(),null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&
+this.currentPage.getName()==mxResources.get("pageWithNumber",[1]))){var t=q[0].getAttribute("name");null!=t&&""!=t&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,t))}}else if(0<q.length){k=[];var u=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(b[q[0].getAttribute("id")]=this.pages[0].getId(),p=Editor.parseDiagramNode(q[0]),e=!1,u=1);for(;u<q.length;u++){var F=q[u].getAttribute("id");q[u].removeAttribute("id");var E=this.updatePageRoot(new DiagramPage(q[u]));
+b[F]=q[u].getAttribute("id");var H=this.pages.length;null==E.getName()&&E.setName(mxResources.get("pageWithNumber",[H+1]));l.model.execute(new ChangePage(this,E,E,H,!0));k.push(E)}this.updatePageLinks(b,k)}}if(null!=p&&"mxGraphModel"===p.nodeName&&(f=l.importGraphModel(p,c,d,e),null!=f))for(u=0;u<f.length;u++)this.updatePageLinksForCell(b,f[u]);n&&this.insertHandler(f,null,null,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,!0,!0)}finally{l.model.endUpdate()}}}catch(D){if(g)throw D;
+this.handleError(D)}return f};EditorUi.prototype.updatePageLinks=function(b,c){for(var d=0;d<c.length;d++)this.updatePageLinksForCell(b,c[d].root)};EditorUi.prototype.updatePageLinksForCell=function(b,c){var d=document.createElement("div"),f=this.editor.graph,e=f.getLinkForCell(c);null!=e&&f.setLinkForCell(c,this.updatePageLink(b,e));if(f.isHtmlLabel(c)){d.innerHTML=f.sanitizeHtml(f.getLabel(c));for(var l=d.getElementsByTagName("a"),g=!1,k=0;k<l.length;k++)e=l[k].getAttribute("href"),null!=e&&(l[k].setAttribute("href",
+this.updatePageLink(b,e)),g=!0);g&&f.labelChanged(c,d.innerHTML)}for(k=0;k<f.model.getChildCount(c);k++)this.updatePageLinksForCell(b,f.model.getChildAt(c,k))};EditorUi.prototype.updatePageLink=function(b,c){if(Graph.isPageLink(c)){var d=b[c.substring(c.indexOf(",")+1)];c=null!=d?"data:page/id,"+d:null}else if("data:action/json,"==c.substring(0,17))try{var f=JSON.parse(c.substring(17));if(null!=f.actions){for(var e=0;e<f.actions.length;e++){var l=f.actions[e];if(null!=l.open&&Graph.isPageLink(l.open)){var g=
+l.open.substring(l.open.indexOf(",")+1),d=b[g];null!=d?l.open="data:page/id,"+d:null==this.getPageById(g)&&delete l.open}}c="data:action/json,"+JSON.stringify(f)}}catch(v){}return c};EditorUi.prototype.isRemoteVisioFormat=function(b){return/(\.v(sd|dx))($|\?)/i.test(b)||/(\.vs(s|x))($|\?)/i.test(b)};EditorUi.prototype.importVisio=function(b,c,d,e,g){e=null!=e?e:b.name;d=null!=d?d:mxUtils.bind(this,function(b){this.handleError(b)});var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var f=
+this.isRemoteVisioFormat(e);try{var l="UNKNOWN-VISIO",k=e.lastIndexOf(".");if(0<=k&&k<e.length)l=e.substring(k+1).toUpperCase();else{var m=e.lastIndexOf("/");0<=m&&m<e.length&&(e=e.substring(m+1))}EditorUi.logEvent({category:l+"-MS-IMPORT-FILE",action:"filename_"+e,label:f?"remote":"local"})}catch(y){}if(f)if(null==VSD_CONVERT_URL||this.isOffline())d({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{f=new FormData;f.append("file1",
+b,e);var n=new XMLHttpRequest;n.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(e)?"?stencil=1":""));n.responseType="blob";this.addRemoteServiceSecurityCheck(n);null!=g&&n.setRequestHeader("x-convert-custom",g);n.onreadystatechange=mxUtils.bind(this,function(){if(4==n.readyState)if(200<=n.status&&299>=n.status)try{var b=n.response;if("text/xml"==b.type){var f=new FileReader;f.onload=mxUtils.bind(this,function(b){try{c(b.target.result)}catch(F){d({message:mxResources.get("errorLoadingFile")})}});
+f.readAsText(b)}else this.doImportVisio(b,c,d,e)}catch(C){d(C)}else try{""==n.responseType||"text"==n.responseType?d({message:n.responseText}):(f=new FileReader,f.onload=function(){d({message:JSON.parse(f.result).Message})},f.readAsText(n.response))}catch(C){d({})}});n.send(f)}else try{this.doImportVisio(b,c,d,e)}catch(y){d(y)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=
+!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importGraphML=function(b,c,d){d=null!=d?d:mxUtils.bind(this,function(b){this.handleError(b)});var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(b,c,d)}catch(q){d(q)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",
+f))};EditorUi.prototype.exportVisio=function(b){var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(b)||this.handleError({message:mxResources.get("unknownError")})}catch(m){this.handleError(m)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",
+c))};EditorUi.prototype.convertLucidChart=function(b,c,d){var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+b.length}),EditorUi.debug("convertLucidChart",b)}catch(q){}try{c(LucidImporter.importState(JSON.parse(b)))}catch(q){null!=window.console&&console.error(q),d(q)}}else d({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||
+this.loadingExtensions||this.isOffline(!0)?window.setTimeout(f,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})})}):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generateMermaidImage=function(b,c,d,e){var f=this,l=function(){try{this.loadingMermaid=
+!1,c=null!=c?c:EditorUi.defaultMermaidConfig,c.securityLevel="strict",c.startOnLoad=!1,mermaid.mermaidAPI.initialize(c),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),b,function(b){try{if(mxClient.IS_IE||mxClient.IS_IE11)b=b.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var c=mxUtils.parseXml(b).getElementsByTagName("svg");if(0<c.length){var l=parseFloat(c[0].getAttribute("width")),g=parseFloat(c[0].getAttribute("height"));
+if(isNaN(l)||isNaN(g))try{var k=c[0].getAttribute("viewBox").split(/\s+/),l=parseFloat(k[2]),g=parseFloat(k[3])}catch(y){l=l||100,g=g||100}d(f.convertDataUri(Editor.createSvgDataUri(b)),l,g)}else e({message:mxResources.get("invalidInput")})}catch(y){e(y)}})}catch(u){e(u)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?l():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",l):mxscript("js/extensions.min.js",l))};EditorUi.prototype.generatePlantUmlImage=
+function(b,c,d,e){function f(b,c,d){c1=b>>2;c2=(b&3)<<4|c>>4;c3=(c&15)<<2|d>>6;c4=d&63;r="";r+=l(c1&63);r+=l(c2&63);r+=l(c3&63);return r+=l(c4&63)}function l(b){if(10>b)return String.fromCharCode(48+b);b-=10;if(26>b)return String.fromCharCode(65+b);b-=26;if(26>b)return String.fromCharCode(97+b);b-=26;return 0==b?"-":1==b?"_":"?"}var g=new XMLHttpRequest;g.open("GET",("txt"==c?PLANT_URL+"/txt/":"png"==c?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(b){r="";for(i=0;i<b.length;i+=3)r=i+2==b.length?r+
+f(b.charCodeAt(i),b.charCodeAt(i+1),0):i+1==b.length?r+f(b.charCodeAt(i),0,0):r+f(b.charCodeAt(i),b.charCodeAt(i+1),b.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(b))),!0);"txt"!=c&&(g.responseType="blob");g.onload=function(b){if(200<=this.status&&300>this.status)if("txt"==c)d(this.response);else{var f=new FileReader;f.readAsDataURL(this.response);f.onloadend=function(b){var c=new Image;c.onload=function(){try{var b=c.width,l=c.height;if(0==b&&0==l){var g=f.result,k=g.indexOf(","),
+m=decodeURIComponent(escape(atob(g.substring(k+1)))),n=mxUtils.parseXml(m).getElementsByTagName("svg");0<n.length&&(b=parseFloat(n[0].getAttribute("width")),l=parseFloat(n[0].getAttribute("height")))}d(f.result,b,l)}catch(D){e(D)}};c.src=f.result};f.onerror=function(b){e(b)}}else e(b)};g.onerror=function(b){e(b)};g.send()};EditorUi.prototype.insertAsPreText=function(b,c,d){var f=this.editor.graph,e=null;f.getModel().beginUpdate();try{e=f.insertVertex(null,null,"<pre>"+b+"</pre>",c,d,1,1,"text;html=1;align=left;verticalAlign=top;"),
+f.updateCellSize(e,!0)}finally{f.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(b,c,d,e,g,k,n,v){k=null!=k?k:!0;n=null!=n?n:!0;if(null!=b)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b))this.parseFile(new Blob([b.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&this.editor.graph.setSelectionCells(this.insertTextAt(b.responseText,c,d,!0))}));
+else if("data:"==b.substring(0,5)||!this.isOffline()&&(g||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b))){var f=this.editor.graph;if("data:application/pdf;base64,"==b.substring(0,28)){var l=Editor.extractGraphModelFromPdf(b);if(null!=l&&0<l.length)return this.importXml(l,c,d,k,!0,v)}if("data:image/png;base64,"==b.substring(0,22)&&(l=this.extractGraphModelFromPng(b),null!=l&&0<l.length))return this.importXml(l,c,d,k,!0,v);if("data:image/svg+xml;"==b.substring(0,19))try{l=null;"data:image/svg+xml;base64,"==
+b.substring(0,26)?(l=b.substring(b.indexOf(",")+1),l=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l,!0)):l=decodeURIComponent(b.substring(b.indexOf(",")+1));var m=this.importXml(l,c,d,k,!0,v);if(0<m.length)return m}catch(z){}this.loadImage(b,mxUtils.bind(this,function(e){if("data:"==b.substring(0,5))this.resizeImage(e,b,mxUtils.bind(this,function(b,e,g){f.setSelectionCell(f.insertVertex(null,null,"",f.snap(c),f.snap(d),e,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+this.convertDataUri(b)+";"))}),n,this.maxImageSize);else{var g=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),l=Math.round(e.width*g);e=Math.round(e.height*g);f.setSelectionCell(f.insertVertex(null,null,"",f.snap(c),f.snap(d),l,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";"))}}),mxUtils.bind(this,function(){var g=null;f.getModel().beginUpdate();try{g=f.insertVertex(f.getDefaultParent(),
+null,b,f.snap(c),f.snap(d),1,1,"text;"+(e?"html=1;":"")),f.updateCellSize(g),f.fireEvent(new mxEventObject("textInserted","cells",[g]))}finally{f.getModel().endUpdate()}f.setSelectionCell(g)}))}else{b=Graph.zapGremlins(mxUtils.trim(b));if(this.isCompatibleString(b))return this.importXml(b,c,d,k,null,v);if(0<b.length)if(this.isLucidChartData(b))this.convertLucidChart(b,mxUtils.bind(this,function(b){this.editor.graph.setSelectionCells(this.importXml(b,c,d,k,null,v))}),mxUtils.bind(this,function(b){this.handleError(b)}));
+else{f=this.editor.graph;g=null;f.getModel().beginUpdate();try{g=f.insertVertex(f.getDefaultParent(),null,"",f.snap(c),f.snap(d),1,1,"text;whiteSpace=wrap;"+(e?"html=1;":""));f.fireEvent(new mxEventObject("textInserted","cells",[g]));"<"==b.charAt(0)&&b.indexOf(">")==b.length-1&&(b=mxUtils.htmlEntities(b));b.length>this.maxTextBytes&&(b=b.substring(0,this.maxTextBytes)+"...");g.value=b;f.updateCellSize(g);if(0<this.maxTextWidth&&g.geometry.width>this.maxTextWidth){var p=f.getPreferredSizeForCell(g,
+this.maxTextWidth);g.geometry.width=p.width;g.geometry.height=p.height}Graph.isLink(g.value)&&f.setLinkForCell(g,g.value);g.geometry.width+=f.gridSize;g.geometry.height+=f.gridSize}finally{f.getModel().endUpdate()}return[g]}}return[]};EditorUi.prototype.formatFileSize=function(b){var c=-1;do b/=1024,c++;while(1024<b);return Math.max(b,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[c]};EditorUi.prototype.convertDataUri=function(b){if("data:"==b.substring(0,5)){var c=b.indexOf(";");0<c&&(b=
+b.substring(0,c)+b.substring(b.indexOf(",",c+1)))}return b};EditorUi.prototype.isRemoteFileFormat=function(b,c){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(b)};EditorUi.prototype.isLucidChartData=function(b){return null!=b&&('{"state":"{\\"Properties\\":'==b.substring(0,26)||'{"Properties":'==b.substring(0,14))};EditorUi.prototype.importLocalFile=function(b,c){if(b&&Graph.fileSupport){if(null==this.importFileInputElt){var d=document.createElement("input");d.setAttribute("type",
+"file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){null!=d.files&&(this.importFiles(d.files,null,null,this.maxImageSize),d.type="",d.type="file",d.value="")}));d.style.display="none";document.body.appendChild(d);this.importFileInputElt=d}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(b,c){StorageFile.listFiles(this,"F",b,c)});window.openBrowserFile=mxUtils.bind(this,function(b,c,d){StorageFile.getFileContent(this,
+b,c,d)});window.deleteBrowserFile=mxUtils.bind(this,function(b,c,d){StorageFile.deleteFile(this,b,c,d)});if(!c){var f=Editor.useLocalStorage;Editor.useLocalStorage=!b}window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));window.openFile.setConsumer(mxUtils.bind(this,function(b,c){if(null!=c&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(c)){var d=new Blob([b],{type:"application/octet-stream"});this.importVisio(d,mxUtils.bind(this,function(b){this.importXml(b,0,0,!0)}),
+null,c)}else this.editor.graph.setSelectionCells(this.importXml(b,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!c){var e=this.dialog,g=e.close;this.dialog.close=mxUtils.bind(this,function(b){Editor.useLocalStorage=f;g.apply(e,arguments);b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(b,c,d){var f=this,e=mxUtils.bind(this,
+function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(b).then(function(e){if(0==Object.keys(e.files).length)d();else{var g=0,l,k=!1;e.forEach(function(b,f){var e=f.name.toLowerCase();"diagram/diagram.xml"==e?(k=!0,f.async("string").then(function(b){0==b.indexOf("<mxfile ")?c(b):d()})):0==e.indexOf("versions/")&&(e=parseInt(e.substr(9)),e>g&&(g=e,l=f))});0<g?l.async("string").then(function(e){!f.isOffline()&&(new XMLHttpRequest).upload&&f.isRemoteFileFormat(e,b.name)?f.parseFile(new Blob([e],
+{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?c(b.responseText):d())}),b.name):d()}):k||d()}},function(b){d(b)}):d()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(b,c,d,e,g,k,n,v,x,B,A,y){B=null!=B?B:!0;var f=!1,l=null,m=mxUtils.bind(this,function(b){var c=null;null!=b&&"<mxlibrary"==b.substring(0,10)?
+this.loadLibrary(new LocalLibrary(this,b,n)):c=this.importXml(b,d,e,B,null,null!=y?mxEvent.isControlDown(y):null);null!=v&&v(c)});"image"==c.substring(0,5)?(x=!1,"image/png"==c.substring(0,9)&&(c=A?null:this.extractGraphModelFromPng(b),null!=c&&0<c.length&&(l=this.importXml(c,d,e,B,null,null!=y?mxEvent.isControlDown(y):null),x=!0)),x||(c=this.editor.graph,A=b.indexOf(";"),0<A&&(b=b.substring(0,A)+b.substring(b.indexOf(",",A+1))),B&&c.isGridEnabled()&&(d=c.snap(d),e=c.snap(e)),l=[c.insertVertex(null,
+null,"",d,e,g,k,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";")])):/(\.*<graphml )/.test(b)?(f=!0,this.importGraphML(b,m)):null!=x&&null!=n&&(/(\.v(dx|sdx?))($|\?)/i.test(n)||/(\.vs(x|sx?))($|\?)/i.test(n))?(f=!0,this.importVisio(x,m)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,n)?(f=!0,this.parseFile(null!=x?x:new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==
+b.readyState&&(200<=b.status&&299>=b.status?m(b.responseText):null!=v&&v(null))}),n)):0==b.indexOf("PK")&&null!=x?(f=!0,this.importZipFile(x,m,mxUtils.bind(this,function(){l=this.insertTextAt(this.validateFileData(b),d,e,!0,null,B);v(l)}))):/(\.v(sd|dx))($|\?)/i.test(n)||/(\.vs(s|x))($|\?)/i.test(n)||(l=this.insertTextAt(this.validateFileData(b),d,e,!0,null,B,null,null!=y?mxEvent.isControlDown(y):null));f||null==v||v(l);return l};EditorUi.prototype.importFiles=function(b,c,d,e,g,k,n,v,x,B,A,y,z){e=
+null!=e?e:this.maxImageSize;B=null!=B?B:this.maxImageBytes;var f=null!=c&&null!=d,l=!0;c=null!=c?c:0;d=null!=d?d:0;var m=!1;if(!mxClient.IS_CHROMEAPP&&null!=b)for(var p=A||this.resampleThreshold,q=0;q<b.length;q++)if("image/"==b[q].type.substring(0,6)&&b[q].size>p){m=!0;break}var t=mxUtils.bind(this,function(){var m=this.editor.graph,p=m.gridSize;g=null!=g?g:mxUtils.bind(this,function(b,c,d,e,g,l,k,m,n){try{return null!=b&&"<mxlibrary"==b.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,
+b,k)),null):this.importFile(b,c,d,e,g,l,k,m,n,f,y,z)}catch(ja){return this.handleError(ja),null}});k=null!=k?k:mxUtils.bind(this,function(b){m.setSelectionCells(b)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=b.length,t=q,u=[],D=mxUtils.bind(this,function(b,c){u[b]=c;if(0==--t){this.spinner.stop();if(null!=v)v(u);else{var d=[];m.getModel().beginUpdate();try{for(var f=0;f<u.length;f++){var e=u[f]();null!=e&&(d=d.concat(e))}}finally{m.getModel().endUpdate()}}k(d)}}),C=
+0;C<q;C++)mxUtils.bind(this,function(f){var k=b[f];if(null!=k){var q=new FileReader;q.onload=mxUtils.bind(this,function(b){if(null==n||n(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var q=Graph.clipSvgDataUri(b.target.result),t=q.indexOf(","),z=decodeURIComponent(escape(atob(q.substring(t+1)))),u=mxUtils.parseXml(z),z=u.getElementsByTagName("svg");if(0<z.length){var z=z[0],v=y?null:z.getAttribute("content");null!=v&&"<"!=v.charAt(0)&&"%"!=v.charAt(0)&&(v=unescape(window.atob?
+atob(v):Base64.decode(v,!0)));null!=v&&"%"==v.charAt(0)&&(v=decodeURIComponent(v));null==v||"<mxfile "!==v.substring(0,8)&&"<mxGraphModel "!==v.substring(0,14)?D(f,mxUtils.bind(this,function(){try{if(q.substring(0,t+1),null!=u){var b=u.getElementsByTagName("svg");if(0<b.length){var l=b[0],n=l.getAttribute("width"),y=l.getAttribute("height"),n=null!=n&&"%"!=n.charAt(n.length-1)?parseFloat(n):NaN,y=null!=y&&"%"!=y.charAt(y.length-1)?parseFloat(y):NaN,z=l.getAttribute("viewBox");if(null==z||0==z.length)l.setAttribute("viewBox",
+"0 0 "+n+" "+y);else if(isNaN(n)||isNaN(y)){var v=z.split(" ");3<v.length&&(n=parseFloat(v[2]),y=parseFloat(v[3]))}q=Editor.createSvgDataUri(mxUtils.getXml(l));var D=Math.min(1,Math.min(e/Math.max(1,n)),e/Math.max(1,y)),B=g(q,k.type,c+f*p,d+f*p,Math.max(1,Math.round(n*D)),Math.max(1,Math.round(y*D)),k.name);if(isNaN(n)||isNaN(y)){var C=new Image;C.onload=mxUtils.bind(this,function(){n=Math.max(1,C.width);y=Math.max(1,C.height);B[0].geometry.width=n;B[0].geometry.height=y;l.setAttribute("viewBox",
+"0 0 "+n+" "+y);q=Editor.createSvgDataUri(mxUtils.getXml(l));var b=q.indexOf(";");0<b&&(q=q.substring(0,b)+q.substring(q.indexOf(",",b+1)));m.setCellStyles("image",q,[B[0]])});C.src=Editor.createSvgDataUri(mxUtils.getXml(l))}return B}}}catch(ea){}return null})):D(f,mxUtils.bind(this,function(){return g(v,"text/xml",c+f*p,d+f*p,0,0,k.name)}))}else D(f,mxUtils.bind(this,function(){return null}))}else{z=!1;if("image/png"==k.type){var C=y?null:this.extractGraphModelFromPng(b.target.result);if(null!=C&&
+0<C.length){var x=new Image;x.src=b.target.result;D(f,mxUtils.bind(this,function(){return g(C,"text/xml",c+f*p,d+f*p,x.width,x.height,k.name)}));z=!0}}z||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(b.target.result,mxUtils.bind(this,function(m){this.resizeImage(m,
+b.target.result,mxUtils.bind(this,function(b,m,n){D(f,mxUtils.bind(this,function(){if(null!=b&&b.length<B){var q=l&&this.isResampleImageSize(k.size,A)?Math.min(1,Math.min(e/m,e/n)):1;return g(b,k.type,c+f*p,d+f*p,Math.round(m*q),Math.round(n*q),k.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),l,e,A,k.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else q=b.target.result,g(q,k.type,c+f*p,d+f*p,240,160,k.name,
+function(b){D(f,function(){return b})},k)});/(\.v(dx|sdx?))($|\?)/i.test(k.name)||/(\.vs(x|sx?))($|\?)/i.test(k.name)?g(null,k.type,c+f*p,d+f*p,240,160,k.name,function(b){D(f,function(){return b})},k):"image"==k.type.substring(0,5)||"application/pdf"==k.type?q.readAsDataURL(k):q.readAsText(k)}})(C)});if(m){m=[];for(q=0;q<b.length;q++)m.push(b[q]);b=m;this.confirmImageResize(function(b){l=b;t()},x)}else t()};EditorUi.prototype.confirmImageResize=function(b,c){c=null!=c?c:!1;var d=null!=this.spinner&&
+null!=this.spinner.pause?this.spinner.pause():function(){},f=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(f,e){if(f||c)mxSettings.setResizeImages(f?e:null),mxSettings.save();d();b(e)};null==f||c?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(b){e(b,!0)},function(b){e(b,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+
+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,f)};EditorUi.prototype.parseFile=function(b,c,d){d=null!=d?d:b.name;var f=new FormData;f.append("format","xml");f.append("upfile",b,d);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){c(e)};e.send(f);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+b.size})}catch(t){}};EditorUi.prototype.isResampleImageSize=function(b,
+c){c=null!=c?c:this.resampleThreshold;return b>c};EditorUi.prototype.resizeImage=function(b,c,d,e,g,k,n){g=null!=g?g:this.maxImageSize;var f=Math.max(1,b.width),l=Math.max(1,b.height);if(e&&this.isResampleImageSize(null!=n?n:c.length,k))try{var m=Math.max(f/g,l/g);if(1<m){var p=Math.round(f/m),q=Math.round(l/m),t=document.createElement("canvas");t.width=p;t.height=q;t.getContext("2d").drawImage(b,0,0,p,q);var u=t.toDataURL();if(u.length<c.length){var F=document.createElement("canvas");F.width=p;F.height=
+q;var E=F.toDataURL();u!==E&&(c=u,f=p,l=q)}}}catch(H){}d(c,f,l)};EditorUi.prototype.extractGraphModelFromPng=function(b){return Editor.extractGraphModelFromPng(b)};EditorUi.prototype.loadImage=function(b,c,d){try{var f=new Image;f.onload=function(){f.width=0<f.width?f.width:120;f.height=0<f.height?f.height:120;c(f)};null!=d&&(f.onerror=d);f.src=b}catch(q){if(null!=d)d(q);else throw q;}};var g=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&
+!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;Editor.isDarkMode()&&(c.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);c.cellEditor.editPlantUmlData=function(d,f,e){var g=JSON.parse(e);f=new TextareaDialog(b,mxResources.get("plantUml")+":",g.data,function(f){null!=f&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generatePlantUmlImage(f,g.format,function(e,l,k){b.spinner.stop();
+c.getModel().beginUpdate();try{if("txt"==g.format)c.labelChanged(d,"<pre>"+e+"</pre>"),c.updateCellSize(d,!0);else{c.setCellStyles("image",b.convertDataUri(e),[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=l,m.height=k,c.cellsResized([d],[m],!1))}c.setAttributeForCell(d,"plantUmlData",JSON.stringify({data:f,format:g.format}))}finally{c.getModel().endUpdate()}},function(c){b.handleError(c)})},null,null,400,220);b.showDialog(f.container,420,300,!0,!0);f.init()};c.cellEditor.editMermaidData=
+function(d,f,e){var g=JSON.parse(e);f=new TextareaDialog(b,mxResources.get("mermaid")+":",g.data,function(f){null!=f&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generateMermaidImage(f,g.config,function(e,l,k){b.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",e,[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=Math.max(m.width,l),m.height=Math.max(m.height,k),c.cellsResized([d],[m],!1));c.setAttributeForCell(d,"mermaidData",JSON.stringify({data:f,
+config:g.config},null,2))}finally{c.getModel().endUpdate()}},function(c){b.handleError(c)})},null,null,400,220);b.showDialog(f.container,420,300,!0,!0);f.init()};var d=c.cellEditor.startEditing;c.cellEditor.startEditing=function(f,e){try{var g=this.graph.getAttributeForCell(f,"plantUmlData");if(null!=g)this.editPlantUmlData(f,e,g);else if(g=this.graph.getAttributeForCell(f,"mermaidData"),null!=g)this.editMermaidData(f,e,g);else{var l=c.getCellStyle(f);"1"==mxUtils.getValue(l,"metaEdit","0")?b.showDataDialog(f):
+d.apply(this,arguments)}}catch(M){b.handleError(M)}};c.getLinkTitle=function(c){return b.getLinkTitle(c)};c.customLinkClicked=function(c){var d=!1;try{b.handleCustomLink(c),d=!0}catch(I){b.handleError(I)}return d};var e=c.parseBackgroundImage;c.parseBackgroundImage=function(b){var c=e.apply(this,arguments);null!=c&&null!=c.src&&Graph.isPageLink(c.src)&&(c={originalSrc:c.src});return c};var k=c.setBackgroundImage;c.setBackgroundImage=function(c){null!=c&&null!=c.originalSrc&&(c=b.createImageForPageLink(c.originalSrc,
+b.currentPage));k.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(b,d){var f=null!=c.backgroundImage?c.backgroundImage.originalSrc:null;if(null!=f){var e=f.indexOf(",");if(0<e)for(var f=f.substring(e+1),e=d.getProperty("patches"),g=0;g<e.length;g++)if(null!=e[g][EditorUi.DIFF_UPDATE]&&
+null!=e[g][EditorUi.DIFF_UPDATE][f]){c.refreshBackgroundImage();c.view.validateBackgroundImage();break}}}));var n=c.getBackgroundImageObject;c.getBackgroundImageObject=function(b,c){var d=n.apply(this,arguments);null==d||null==d.originalSrc||c||(d={src:d.originalSrc});return d};var u=this.clearDefaultStyle;this.clearDefaultStyle=function(){u.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");
+if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var v=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1");return v.apply(this,arguments)};var x=c.addClickHandler;c.addClickHandler=function(b,d,f){var e=d;d=function(b,d){if(null==d){var f=mxEvent.getSource(b);"a"==f.nodeName.toLowerCase()&&(d=f.getAttribute("href"))}null!=
+d&&c.isCustomLink(d)&&(mxEvent.isTouchEvent(b)||!mxEvent.isPopupTrigger(b))&&c.customLinkClicked(d)&&mxEvent.consume(b);null!=e&&e(b,d)};x.call(this,b,d,f)};g.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var B=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(c,d,f){b.editor.graph.isSelectionEmpty()?B.apply(this,arguments):b.menus.addMenuItems(c,"delete - cut copy copyAsImage - duplicate".split(" "),
+null,f)}}b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var A=c.getExportVariables;c.getExportVariables=function(){var c=A.apply(this,arguments),d=b.getCurrentFile();null!=d&&(c.filename=d.getTitle());c.pagecount=null!=b.pages?b.pages.length:1;c.page=null!=b.currentPage?b.currentPage.getName():"";c.pagenumber=null!=b.pages&&null!=b.currentPage?mxUtils.indexOf(b.pages,
+b.currentPage)+1:1;return c};var y=c.getGlobalVariable;c.getGlobalVariable=function(c){var d=b.getCurrentFile();return"filename"==c&&null!=d?d.getTitle():"page"==c&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==c?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:"pagecount"==c?null!=b.pages?b.pages.length:1:y.apply(this,arguments)};var z=c.labelLinkClicked;c.labelLinkClicked=function(b,d,f){var e=d.getAttribute("href");if(null==e||!c.isCustomLink(e)||!mxEvent.isTouchEvent(f)&&
+mxEvent.isPopupTrigger(f))z.apply(this,arguments);else{if(!c.isEnabled()||null!=b&&c.isCellLocked(b.cell))c.customLinkClicked(e),c.getRubberband().reset();mxEvent.consume(f)}};this.editor.getOrCreateFilename=function(){var c=b.defaultFilename,d=b.getCurrentFile();null!=d&&(c=null!=d.getTitle()?d.getTitle():c);return c};var C=this.actions.get("print");C.setEnabled(!mxClient.IS_IOS||!navigator.standalone);C.visible=C.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,
+!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&c.addListener(mxEvent.EDITING_STARTED,
+mxUtils.bind(this,function(b){var d=c.cellEditor.text2,f=null;null!=d&&(mxEvent.addListener(d,"dragleave",function(b){null!=f&&(f.parentNode.removeChild(f),f=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(b){null==f&&(!mxClient.IS_IE||10<document.documentMode)&&(f=this.highlightElement(d));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(b){null!=f&&(f.parentNode.removeChild(f),f=null);if(0<
+b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,function(b,d,f,e,g,l){c.insertImage(b,g,l)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var c=0;c<b.length;c++)b[c]()},mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)?this.loadImage(decodeURIComponent(d),mxUtils.bind(this,function(b){var f=Math.max(1,
+b.width);b=Math.max(1,b.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,f)),e/Math.max(1,b));c.insertImage(decodeURIComponent(d),f*e,b*e)})):document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"));b.stopPropagation();
+b.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(C=this.editor.graph.view,C.setUnit(mxSettings.getUnit()),C.addListener("unitChanged",function(b,c){mxSettings.setUnit(c.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,C.unit),this.refresh());if("1"==urlParams.styledev){C=document.getElementById("geFooter");
+null!=C&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),C.appendChild(this.styleInput),
+this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(b,c){if(0<this.editor.graph.getSelectionCount()){var d=this.editor.graph.getSelectionCell(),d=this.editor.graph.getModel().getStyle(d);this.styleInput.value=d||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var F=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==this.styleInput?!0:F.apply(this,arguments)}}C=document.getElementById("geInfo");
+null!=C&&C.parentNode.removeChild(C);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var E=null;mxEvent.addListener(c.container,"dragleave",function(b){c.isEnabled()&&(null!=E&&(E.parentNode.removeChild(E),E=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(b){null==E&&(!mxClient.IS_IE||10<document.documentMode)&&(E=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();
+b.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(b){null!=E&&(E.parentNode.removeChild(E),E=null);if(c.isEnabled()){var d=mxUtils.convertPoint(c.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),f=c.view.translate,e=c.view.scale,g=d.x/e-f.x,l=d.y/e-f.y;if(0<b.dataTransfer.files.length)mxEvent.isShiftDown(b)?this.openFiles(b.dataTransfer.files,!0):(mxEvent.isAltDown(b)&&(l=g=null),this.importFiles(b.dataTransfer.files,g,l,this.maxImageSize,null,null,null,
+null,mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b),b));else{mxEvent.isAltDown(b)&&(l=g=0);var k=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):null,d=this.extractGraphModelFromEvent(b,null!=this.pages);if(null!=d)c.setSelectionCells(this.importXml(d,g,l,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){var m=b.dataTransfer.getData("text/html"),d=document.createElement("div");d.innerHTML=c.sanitizeHtml(m);var n=null,f=d.getElementsByTagName("img");
+null!=f&&1==f.length?(m=f[0].getAttribute("src"),null==m&&(m=f[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||(n=!0)):(f=d.getElementsByTagName("a"),null!=f&&1==f.length?m=f[0].getAttribute("href"):(d=d.getElementsByTagName("pre"),null!=d&&1==d.length&&(m=mxUtils.getTextContent(d[0]))));var p=!0,q=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(m,g,l,!0,n,null,p,mxEvent.isControlDown(b)))});n&&null!=m&&m.length>this.resampleThreshold?this.confirmImageResize(function(b){p=
+b;q()},mxEvent.isControlDown(b)):q()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(b){var d=Math.max(1,b.width);b=Math.max(1,b.height);var f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,d)),f/Math.max(1,b));c.setSelectionCell(c.insertVertex(null,null,"",g,l,d*f,b*f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(b){c.setSelectionCells(this.insertTextAt(k,
+g,l,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),g,l,!0))}}b.stopPropagation();b.preventDefault()}),!1)}c.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var b=this.editor.graph;b.container.addEventListener("paste",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c))try{for(var d=
+c.clipboardData||c.originalEvent.clipboardData,f=!1,e=0;e<d.types.length;e++)if("text/"===d.types[e].substring(0,5)){f=!0;break}if(!f){var g=d.items;for(index in g){var l=g[index];if("file"===l.kind){if(b.isEditing())this.importFiles([l.getAsFile()],0,0,this.maxImageSize,function(c,d,f,e,g,l){b.insertImage(c,g,l)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var c=0;c<b.length;c++)b[c]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([l.getAsFile()],
+k.x,k.y,this.maxImageSize);mxEvent.consume(c)}break}}}}catch(x){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function b(){window.setTimeout(function(){d.innerHTML="&nbsp;";d.focus();document.execCommand("selectAll",!1,null)},0)}var c=this.editor.graph,d=document.createElement("div");d.setAttribute("autocomplete","off");d.setAttribute("autocorrect","off");d.setAttribute("autocapitalize","off");d.setAttribute("spellcheck","false");d.style.textRendering="optimizeSpeed";d.style.fontFamily=
+"monospace";d.style.wordBreak="break-all";d.style.background="transparent";d.style.color="transparent";d.style.position="absolute";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.display="block";d.style.fontSize="1";d.style.zIndex="-1";d.style.resize="none";d.style.outline="none";d.style.width="1px";d.style.height="1px";mxUtils.setOpacity(d,0);d.contentEditable=!0;d.innerHTML="&nbsp;";var e=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,
+null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var f=mxEvent.getSource(b);null==c.container||!c.isEnabled()||c.isMouseDown||c.isEditing()||null!=this.dialog||"INPUT"==f.nodeName||"TEXTAREA"==f.nodeName||224!=b.keyCode&&(mxClient.IS_MAC||17!=b.keyCode)&&(!mxClient.IS_MAC||91!=b.keyCode&&93!=b.keyCode)||e||(d.style.left=c.container.scrollLeft+10+"px",d.style.top=c.container.scrollTop+10+"px",c.container.appendChild(d),e=!0,d.focus(),document.execCommand("selectAll",!1,null))}));
+mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var f=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){!e||224!=f&&17!=f&&91!=f&&93!=f||(e=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),d.parentNode.removeChild(d),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(d,"copy",mxUtils.bind(this,function(f){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(d),b()}catch(u){this.handleError(u)}}));mxEvent.addListener(d,"cut",
+mxUtils.bind(this,function(f){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(d,!0),b()}catch(u){this.handleError(u)}}));mxEvent.addListener(d,"paste",mxUtils.bind(this,function(b){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(d.innerHTML="&nbsp;",d.focus(),null!=b.clipboardData&&this.pasteCells(b,d,!0,!0),mxEvent.isConsumed(b)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,d,!1,!0)}),0))}),!0);var g=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==
+d?!0:g.apply(this,arguments)}};EditorUi.prototype.getLinkTitle=function(b){var c=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(b)){var d=b.indexOf(",");0<d&&(c=this.getPageById(b.substring(d+1)),c=null!=c?c.getName():mxResources.get("pageNotFound"))}else"data:"==b.substring(0,5)&&(c=mxResources.get("action"));return c};EditorUi.prototype.handleCustomLink=function(b){if(Graph.isPageLink(b)){var c=b.indexOf(",");if(b=this.getPageById(b.substring(c+1)))this.selectPage(b);else throw Error(mxResources.get("pageNotFound")||
+"Page not found");}else this.editor.graph.handleCustomLink(b)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(b){b.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),
+this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(f){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(b,c){if("1"!=urlParams["ext-fonts"])mxSettings.setCustomFonts(this.menus.customFonts);else{var d=c.getProperty("customFonts");this.menus.customFonts=d;mxSettings.setCustomFonts(d)}mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());
+this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(b,c){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(b,c){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));
+this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.addListener("gridColorChanged",mxUtils.bind(this,function(b,c){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(b,c){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=
+urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};
+EditorUi.prototype.copyImage=function(b,c,d){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(b,d){try{this.spinner.stop();var f=this.createImageDataUri(b,c,"png"),e=parseInt(d.getAttribute("width")),g=parseInt(d.getAttribute("height"));this.writeImageToClipboard(f,e,g,mxUtils.bind(this,function(b){this.handleError(b)}))}catch(x){this.handleError(x)}}),null,null,null,mxUtils.bind(this,function(b){this.spinner.stop();
+this.handleError(b)}),null,null,null!=d?d:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!0,null,0<b.length?b:null)}catch(p){this.handleError(p)}};EditorUi.prototype.writeImageToClipboard=function(b,c,d,e){var f=this.base64ToBlob(b.substring(b.indexOf(",")+1),"image/png");b=new ClipboardItem({"image/png":f,"text/html":new Blob(['<img src="'+b+'" width="'+c+'" height="'+d+'">'],{type:"text/html"})});navigator.clipboard.write([b])["catch"](e)};
+EditorUi.prototype.copyCells=function(b,c){var d=this.editor.graph;if(d.isSelectionEmpty())b.innerHTML="";else{var f=mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),e=mxUtils.getXml(d.encodeCells(f));mxUtils.setTextContent(b,encodeURIComponent(e));c?(d.removeCells(f,!1),d.lastPasteXml=null):(d.lastPasteXml=e,d.pasteCounter=0);b.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var b=null;if(Editor.enableNativeCipboard){var c=this.editor.graph;
+c.isSelectionEmpty()||(b=mxUtils.sortCells(c.getExportableCells(c.model.getTopmostCells(c.getSelectionCells()))),c=mxUtils.getXml(c.encodeCells(b)),navigator.clipboard.writeText(c))}return b};EditorUi.prototype.pasteXml=function(b,c,d,e){var f=this.editor.graph,g=null;f.lastPasteXml==b?f.pasteCounter++:(f.lastPasteXml=b,f.pasteCounter=0);var k=f.pasteCounter*f.gridSize;if(d||this.isCompatibleString(b))g=this.importXml(b,k,k),f.setSelectionCells(g);else if(c&&1==f.getSelectionCount()){k=f.getStartEditingCell(f.getSelectionCell(),
+e);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)&&"image"==f.getCurrentCellStyle(k)[mxConstants.STYLE_SHAPE])f.setCellStyles(mxConstants.STYLE_IMAGE,b,[k]);else{f.model.beginUpdate();try{f.labelChanged(k,b),Graph.isLink(b)&&f.setLinkForCell(k,b)}finally{f.model.endUpdate()}}f.setSelectionCell(k)}else g=f.getInsertPoint(),f.isMouseInsertPoint()&&(k=0,f.lastPasteXml==b&&0<f.pasteCounter&&f.pasteCounter--),g=this.insertTextAt(b,g.x+k,g.y+k,!0),f.setSelectionCells(g);f.isSelectionEmpty()||(f.scrollCellToVisible(f.getSelectionCell()),
+null!=this.hoverIcons&&this.hoverIcons.update(f.view.getState(f.getSelectionCell())));return g};EditorUi.prototype.pasteCells=function(b,c,d,e){if(!mxEvent.isConsumed(b)){var f=c,g=!1;if(d&&null!=b.clipboardData&&b.clipboardData.getData){var k=b.clipboardData.getData("text/plain"),l=!1;if(null!=k&&0<k.length&&"%3CmxGraphModel%3E"==k.substring(0,18)){var m=decodeURIComponent(k);this.isCompatibleString(m)&&(l=!0,k=m)}l=l?null:b.clipboardData.getData("text/html");null!=l&&0<l.length?(f=this.parseHtmlData(l),
+g="text/plain"!=f.getAttribute("data-type")):null!=k&&0<k.length&&(f=document.createElement("div"),mxUtils.setTextContent(f,l))}k=f.getElementsByTagName("span");if(null!=k&&0<k.length&&"application/vnd.lucid.chart.objects"===k[0].getAttribute("data-lucid-type"))d=k[0].getAttribute("data-lucid-content"),null!=d&&0<d.length&&(this.convertLucidChart(d,mxUtils.bind(this,function(b){var c=this.editor.graph;c.lastPasteXml==b?c.pasteCounter++:(c.lastPasteXml=b,c.pasteCounter=0);var d=c.pasteCounter*c.gridSize;
+c.setSelectionCells(this.importXml(b,d,d));c.scrollCellToVisible(c.getSelectionCell())}),mxUtils.bind(this,function(b){this.handleError(b)})),mxEvent.consume(b));else{g=g?f.innerHTML:mxUtils.trim(null==f.innerText?mxUtils.getTextContent(f):f.innerText);l=!1;try{var n=g.lastIndexOf("%3E");0<=n&&n<g.length-3&&(g=g.substring(0,n+3))}catch(y){}try{k=f.getElementsByTagName("span"),m=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(g),this.isCompatibleString(m)&&
+(l=!0,g=m)}catch(y){}try{if(null!=g&&0<g.length){this.pasteXml(g,e,l,b);try{mxEvent.consume(b)}catch(y){}}else if(!d){var p=this.editor.graph;p.lastPasteXml=null;p.pasteCounter=0}}catch(y){this.handleError(y)}}}c.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(b){if(Graph.fileSupport)for(var c=null,d=0;d<b.length;d++)mxEvent.addListener(b[d],"dragleave",function(b){null!=c&&(c.parentNode.removeChild(c),c=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(b[d],"dragover",
+mxUtils.bind(this,function(b){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==c&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(c=this.highlightElement());b.stopPropagation();b.preventDefault()})),mxEvent.addListener(b[d],"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<b.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(b.dataTransfer.files,
+0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b)):this.openFiles(b.dataTransfer.files,!0);else{var d=this.extractGraphModelFromEvent(b);if(null==d){var f=null!=b.dataTransfer?b.dataTransfer:b.clipboardData;null!=f&&(10==document.documentMode||11==document.documentMode?d=f.getData("Text"):(d=null,d=0<=mxUtils.indexOf(f.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(f.types,"text/html")?f.getData("text/html"):null,null!=
+d&&0<d.length?(f=document.createElement("div"),f.innerHTML=this.editor.graph.sanitizeHtml(d),f=f.getElementsByTagName("img"),0<f.length&&(d=f[0].getAttribute("src"))):0<=mxUtils.indexOf(f.types,"text/plain")&&(d=f.getData("text/plain"))),null!=d&&("data:image/png;base64,"==d.substring(0,22)?(d=this.extractGraphModelFromPng(d),null!=d&&0<d.length&&this.openLocalFile(d,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(d)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(d))).send(mxUtils.bind(this,
+function(b){200<=b.getStatus()&&299>=b.getStatus()&&this.openLocalFile(b.getText(),null,!0)})):/^https?:\/\//.test(d)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(d):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(d)))))}else this.openLocalFile(d,null,!0)}b.stopPropagation();b.preventDefault()}))};EditorUi.prototype.highlightElement=function(b){var c=0,d=0,f,e;if(null==b){e=document.body;
+var g=document.documentElement;f=(e.clientWidth||g.clientWidth)-3;e=Math.max(e.clientHeight||0,g.clientHeight)-3}else c=b.offsetTop,d=b.offsetLeft,f=b.clientWidth,e=b.clientHeight;g=document.createElement("div");g.style.zIndex=mxPopupMenu.prototype.zIndex+2;g.style.border="3px dotted rgb(254, 137, 12)";g.style.pointerEvents="none";g.style.position="absolute";g.style.top=c+"px";g.style.left=d+"px";g.style.width=Math.max(0,f-3)+"px";g.style.height=Math.max(0,e-3)+"px";null!=b&&b.parentNode==this.editor.graph.container?
+this.editor.graph.container.appendChild(g):document.body.appendChild(g);return g};EditorUi.prototype.stringToCells=function(b){b=mxUtils.parseXml(b);var c=this.editor.extractGraphModel(b.documentElement);b=[];if(null!=c){var d=new mxCodec(c.ownerDocument),f=new mxGraphModel;d.decode(c,f);c=f.getChildAt(f.getRoot(),0);for(d=0;d<f.getChildCount(c);d++)b.push(f.getChildAt(c,d))}return b};EditorUi.prototype.openFileHandle=function(b,c,d,e,g){if(null!=c&&0<c.length){!this.useCanvasForExport&&/(\.png)$/i.test(c)?
+c=c.substring(0,c.length-4)+".drawio":/(\.pdf)$/i.test(c)&&(c=c.substring(0,c.length-4)+".drawio");var f=mxUtils.bind(this,function(b){c=0<=c.lastIndexOf(".")?c.substring(0,c.lastIndexOf("."))+".drawio":c+".drawio";if("<mxlibrary"==b.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,e);try{this.loadLibrary(new LocalLibrary(this,b,c))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(b,
+c,e)});if(/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c))this.importVisio(d,mxUtils.bind(this,function(b){this.spinner.stop();f(b)}));else if(/(\.*<graphml )/.test(b))this.importGraphML(b,mxUtils.bind(this,function(b){this.spinner.stop();f(b)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,c))this.parseFile(d,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?f(b.responseText):this.handleError({message:mxResources.get(413==
+b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(b))/(\.json)$/i.test(c)&&(c=c.substring(0,c.length-5)+".drawio"),this.convertLucidChart(b,mxUtils.bind(this,function(b){this.spinner.stop();this.openLocalFile(b,c,e)}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}));else if("<mxlibrary"==b.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,
+this.defaultFilename,e);try{this.loadLibrary(new LocalLibrary(this,b,d.name))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else if(0==b.indexOf("PK"))this.importZipFile(d,mxUtils.bind(this,function(b){this.spinner.stop();f(b)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(b,c,e)}));else{if("image/png"==d.type.substring(0,9))b=this.extractGraphModelFromPng(b);else if("application/pdf"==d.type){var k=Editor.extractGraphModelFromPdf(b);null!=k&&(g=null,e=!0,
+b=k)}this.spinner.stop();this.openLocalFile(b,c,e,g,null!=g?d:null)}}};EditorUi.prototype.openFiles=function(b,c){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=0;d<b.length;d++)mxUtils.bind(this,function(b){var d=new FileReader;d.onload=mxUtils.bind(this,function(d){try{this.openFileHandle(d.target.result,b.name,b,c)}catch(u){this.handleError(u)}});d.onerror=mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b);window.openFile=null});"image"!==b.type.substring(0,
+5)&&"application/pdf"!==b.type||"image/svg"===b.type.substring(0,9)?d.readAsText(b):d.readAsDataURL(b)})(b[d])};EditorUi.prototype.openLocalFile=function(b,c,d,e,g){var f=this.getCurrentFile(),k=mxUtils.bind(this,function(){window.openFile=null;if(null==c&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var f=mxUtils.parseXml(b);null!=f&&(this.editor.setGraphXml(f.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,b,c||this.defaultFilename,d,e,g))});if(null!=
+b&&0<b.length)null==f||!f.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=e)?k():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=e)&&null!=f&&f.isModified()?this.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b,c),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=f&&f.isModified()?this.confirm(mxResources.get("allChangesLost"),
+null,k,mxResources.get("cancel"),mxResources.get("discardChanges")):k()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var b={};if(null!=this.pages)for(var c=0;c<this.pages.length;c++)this.updatePageRoot(this.pages[c]),this.addBasenamesForCell(this.pages[c].root,b);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),b);var c=[],d;for(d in b)c.push(d);return c};EditorUi.prototype.addBasenamesForCell=function(b,c){function d(b){if(null!=
+b){var d=b.lastIndexOf(".");0<d&&(b=b.substring(d+1,b.length));null==c[b]&&(c[b]=!0)}}var f=this.editor.graph,e=f.getCellStyle(b);d(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));f.model.isEdge(b)&&(d(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),d(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=f.model.getChildCount(b),g=0;g<e;g++)this.addBasenamesForCell(f.model.getChildAt(b,g),c)};EditorUi.prototype.setGraphEnabled=function(b){this.diagramContainer.style.visibility=
+b?"":"hidden";this.formatContainer.style.visibility=b?"":"hidden";this.sidebarFooterContainer.style.display=b?"":"none";this.sidebarContainer.style.display=b?"":"none";this.hsplit.style.display=b?"":"none";this.editor.graph.setEnabled(b);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=b?"":"hidden",this.ruler.vRuler.container.style.visibility=b?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=b?"":"hidden");b||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),
+null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&
+this.installMessageHandler(mxUtils.bind(this,function(b,c,d,e){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);if(null==b||0==b.length)b=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,b,{}));this.mode=App.MODE_EMBED;this.setFileData(b);if(e)try{var f=this.editor.graph;f.setGridEnabled(!1);f.pageVisible=!1;var g=f.model.cells,k;for(k in g){var l=g[k];null!=l&&null!=l.style&&(l.style+=";sketch=1;"+(-1==l.style.indexOf("fontFamily=")||-1<l.style.indexOf("fontFamily=Helvetica;")?
+"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(x){console.log(x)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=d?d:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=
+function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(b,c){null!=b?b.getPublicUrl(c):c(null)};EditorUi.prototype.createLoadMessage=function(b){var c=this.editor.graph;return{event:b,pageVisible:c.pageVisible,translate:c.view.translate,bounds:c.getGraphBounds(),currentPage:this.getSelectedPageIndex(),
+scale:c.view.scale,page:c.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(b){var c=null,d=!1,f=!1,e=null,g=mxUtils.bind(this,function(b,c){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,g);mxEvent.addListener(window,"message",mxUtils.bind(this,function(g){if(g.source==(window.opener||
+window.parent)){var l=g.data,m=mxUtils.bind(this,function(b){if(null!=b&&"function"===typeof b.charAt&&"<"!=b.charAt(0))try{"data:image/png;base64,"==b.substring(0,22)?b=this.extractGraphModelFromPng(b):"data:image/svg+xml;base64,"==b.substring(0,26)?b=atob(b.substring(26)):"data:image/svg+xml;utf8,"==b.substring(0,24)&&(b=b.substring(24)),null!=b&&("%"==b.charAt(0)?b=decodeURIComponent(b):"<"!=b.charAt(0)&&(b=Graph.decompress(b)))}catch(la){}return b});if("json"==urlParams.proto){var n=!1;try{l=
+JSON.parse(l)}catch(T){l=null}try{if(null==l)return;if("dialog"==l.action){this.showError(null!=l.titleKey?mxResources.get(l.titleKey):l.title,null!=l.messageKey?mxResources.get(l.messageKey):l.message,null!=l.buttonKey?mxResources.get(l.buttonKey):l.button);null!=l.modified&&(this.editor.modified=l.modified);return}if("layout"==l.action){this.executeLayoutList(l.layouts);return}if("prompt"==l.action){this.spinner.stop();var p=new FilenameDialog(this,l.defaultValue||"",null!=l.okKey?mxResources.get(l.okKey):
+l.ok,function(b){null!=b?k.postMessage(JSON.stringify({event:"prompt",value:b,message:l}),"*"):k.postMessage(JSON.stringify({event:"prompt-cancel",message:l}),"*")},null!=l.titleKey?mxResources.get(l.titleKey):l.title);this.showDialog(p.container,300,80,!0,!1);p.init();return}if("draft"==l.action){var q=m(l.xml);this.spinner.stop();p=new DraftDialog(this,mxResources.get("draftFound",[l.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",
+result:"edit",message:l}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:l}),"*")}),l.editKey?mxResources.get(l.editKey):null,l.discardKey?mxResources.get(l.discardKey):null,l.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:l}),"*")}):null);this.showDialog(p.container,640,480,!0,!1,mxUtils.bind(this,function(b){b&&this.actions.get("exit").funct()}));
+try{p.init()}catch(T){k.postMessage(JSON.stringify({event:"draft",error:T.toString(),message:l}),"*")}return}if("template"==l.action){this.spinner.stop();var t=1==l.enableRecent,u=1==l.enableSearch,v=1==l.enableCustomTemp;if("1"==urlParams.newTempDlg&&!l.templatesOnly&&null!=l.callback){var D=this.getCurrentUser(),x=new TemplatesDialog(this,function(b,c,d){b=b||this.emptyDiagramXml;k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c,tempUrl:d.url,libs:d.libs,
+builtIn:null!=d.info&&null!=d.info.custContentId,message:l}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=D?D.id:null,t?mxUtils.bind(this,function(b,c,d){this.remoteInvoke("getRecentDiagrams",[d],null,b,c)}):null,u?mxUtils.bind(this,function(b,c,d,f){this.remoteInvoke("searchDiagrams",[b,f],null,c,d)}):null,mxUtils.bind(this,function(b,c,d){this.remoteInvoke("getFileContent",[b.url],null,c,d)}),null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",
+null,null,b,function(){b({},0)})}):null,!1,!1,!0,!0);this.showDialog(x.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}p=new NewDialog(this,!1,l.templatesOnly?!1:null!=l.callback,mxUtils.bind(this,function(c,d,f,e){c=c||this.emptyDiagramXml;null!=l.callback?k.postMessage(JSON.stringify({event:"template",xml:c,blank:c==this.emptyDiagramXml,name:d,tempUrl:f,libs:e,builtIn:!0,message:l}),"*"):(b(c,g,c!=this.emptyDiagramXml,l.toSketch),this.editor.modified||this.editor.setStatus(""))}),
+null,null,null,null,null,null,null,t?mxUtils.bind(this,function(b){this.remoteInvoke("getRecentDiagrams",[null],null,b,function(){b(null,"Network Error!")})}):null,u?mxUtils.bind(this,function(b,c){this.remoteInvoke("searchDiagrams",[b,null],null,c,function(){c(null,"Network Error!")})}):null,mxUtils.bind(this,function(b,c,d){k.postMessage(JSON.stringify({event:"template",docUrl:b,info:c,name:d}),"*")}),null,null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},
+0)})}):null,1==l.withoutType);this.showDialog(p.container,620,460,!0,!1,mxUtils.bind(this,function(b){this.sidebar.hideTooltip();b&&this.actions.get("exit").funct()}));p.init();return}if("textContent"==l.action){var K=this.getDiagramTextContent();k.postMessage(JSON.stringify({event:"textContent",data:K,message:l}),"*");return}if("status"==l.action){null!=l.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(l.messageKey))):null!=l.message&&this.editor.setStatus(mxUtils.htmlEntities(l.message));
+null!=l.modified&&(this.editor.modified=l.modified);return}if("spinner"==l.action){var M=null!=l.messageKey?mxResources.get(l.messageKey):l.message;null==l.show||l.show?this.spinner.spin(document.body,M):this.spinner.stop();return}if("export"==l.action){if("png"==l.format||"xmlpng"==l.format){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin)){var L=null!=l.xml?l.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var N=this.editor.graph,
+P=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();var c=this.createLoadMessage("export");c.format=l.format;c.message=l;c.data=b;c.xml=L;k.postMessage(JSON.stringify(c),"*")}),G=mxUtils.bind(this,function(b){null==b&&(b=Editor.blankImage);"xmlpng"==l.format&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(L)));N!=this.editor.graph&&N.container.parentNode.removeChild(N.container);P(b)}),J=l.pageId||(null!=this.pages?l.currentPage?this.currentPage.getId():
+this.pages[0].getId():null);if(this.isExportToCanvas()){null!=l.xml&&0<l.xml.length&&(d=!0,this.setFileData(L),d=!1);if(null!=this.pages&&this.currentPage.getId()!=J){for(var W=N.getGlobalVariable,N=this.createTemporaryGraph(N.getStylesheet()),R,Q=0;Q<this.pages.length;Q++)if(this.pages[Q].getId()==J){R=this.updatePageRoot(this.pages[Q]);break}null==R&&(R=this.currentPage);N.getGlobalVariable=function(b){return"page"==b?R.getName():"pagenumber"==b?1:W.apply(this,arguments)};document.body.appendChild(N.container);
+N.model.setRoot(R.root)}if(null!=l.layerIds){for(var X=N.model,ha=X.getChildCells(X.getRoot()),p={},Q=0;Q<l.layerIds.length;Q++)p[l.layerIds[Q]]=!0;for(Q=0;Q<ha.length;Q++)X.setVisible(ha[Q],p[ha[Q].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(b){G(b.toDataURL("image/png"))}),l.width,null,l.background,mxUtils.bind(this,function(){G(null)}),null,null,l.scale,l.transparent,l.shadow,null,N,l.border,null,l.grid,l.keepTheme)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==
+l.format?"1":"0")+(null!=J?"&pageId="+J:"")+(null!=l.layerIds&&0<l.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:l.layerIds})):"")+(null!=l.scale?"&scale="+l.scale:"")+"&base64=1&xml="+encodeURIComponent(L))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?P("data:image/png;base64,"+b.getText()):G(null)}),mxUtils.bind(this,function(){G(null)}))}}else{null!=l.xml&&0<l.xml.length&&(d=!0,this.setFileData(l.xml),d=!1);M=this.createLoadMessage("export");
+M.message=l;if("html2"==l.format||"html"==l.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ga=this.getXmlFileData();M.xml=mxUtils.getXml(ga);M.data=this.getFileData(null,null,!0,null,null,null,ga);M.format=l.format}else if("html"==l.format)L=this.editor.getGraphXml(),M.data=this.getHtml(L,this.editor.graph),M.xml=mxUtils.getXml(L),M.format=l.format;else{mxSvgCanvas2D.prototype.foAltText=null;var aa=null!=l.background?l.background:this.editor.graph.background;aa==mxConstants.NONE&&
+(aa=null);M.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);M.format="svg";var ba=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();M.data=Editor.createSvgDataUri(b);k.postMessage(JSON.stringify(M),"*")});if("xmlsvg"==l.format)(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin))&&this.getEmbeddedSvg(M.xml,this.editor.graph,null,!0,ba,null,null,l.embedImages,aa,l.scale,l.border,l.shadow,
+l.keepTheme);else if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin)){this.editor.graph.setEnabled(!1);var Z=this.editor.graph.getSvg(aa,l.scale,l.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||l.shadow,null,l.keepTheme);(this.editor.graph.shadowVisible||l.shadow)&&this.editor.graph.addSvgShadow(Z);this.embedFonts(Z,mxUtils.bind(this,function(b){l.embedImages||null==l.embedImages?this.editor.convertImages(b,mxUtils.bind(this,
+function(b){ba(mxUtils.getXml(b))})):ba(mxUtils.getXml(b))}))}return}k.postMessage(JSON.stringify(M),"*")}return}if("load"==l.action){n=l.toSketch;f=1==l.autosave;this.hideDialog();null!=l.modified&&null==urlParams.modified&&(urlParams.modified=l.modified);null!=l.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=l.saveAndExit);null!=l.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=l.noSaveBtn);null!=l.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=l.noExitBtn);
+null!=l.title&&null!=this.buttonContainer&&(q=document.createElement("span"),mxUtils.write(q,l.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="1"==urlParams.noLangIcon?"0":"25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(q),
+this.embedFilenameSpan=q);try{l.libs&&this.sidebar.showEntries(l.libs)}catch(T){}l=null!=l.xmlpng?this.extractGraphModelFromPng(l.xmlpng):null!=l.descriptor?l.descriptor:l.xml}else{if("merge"==l.action){var ja=this.getCurrentFile();null!=ja&&(q=m(l.xml),null!=q&&""!=q&&ja.mergeFile(new LocalFile(this,q),function(){k.postMessage(JSON.stringify({event:"merge",message:l}),"*")},function(b){k.postMessage(JSON.stringify({event:"merge",message:l,error:b}),"*")}))}else"remoteInvokeReady"==l.action?this.handleRemoteInvokeReady(k):
+"remoteInvoke"==l.action?this.handleRemoteInvoke(l,g.origin):"remoteInvokeResponse"==l.action?this.handleRemoteInvokeResponse(l):k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(l)}),"*");return}}catch(T){this.handleError(T)}}var da=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),O=mxUtils.bind(this,function(g,l){d=!0;try{b(g,l,null,n)}catch(fa){this.handleError(fa)}d=
+!1;null!=urlParams.modified&&this.editor.setStatus("");e=da();f&&null==c&&(c=mxUtils.bind(this,function(b,c){var f=da();if(f!=e&&!d){var g=this.createLoadMessage("autosave");g.xml=f;(window.opener||window.parent).postMessage(JSON.stringify(g),"*")}e=f}),this.editor.graph.model.addListener(mxEvent.CHANGE,c),this.editor.graph.addListener("gridSizeChanged",c),this.editor.graph.addListener("shadowVisibleChanged",c),this.addListener("pageFormatChanged",c),this.addListener("pageScaleChanged",c),this.addListener("backgroundColorChanged",
+c),this.addListener("backgroundImageChanged",c),this.addListener("foldingEnabledChanged",c),this.addListener("mathEnabledChanged",c),this.addListener("gridEnabledChanged",c),this.addListener("guidesEnabledChanged",c),this.addListener("pageViewChanged",c));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var m=this.createLoadMessage("load");m.xml=g;k.postMessage(JSON.stringify(m),"*")}});null!=l&&"function"===typeof l.substring&&"data:application/vnd.visio;base64,"==l.substring(0,34)?(m="0M8R4KGxGuE"==
+l.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(l.substring(l.indexOf(",")+1)),function(b){O(b,g)},mxUtils.bind(this,function(b){this.handleError(b)}),m)):null!=l&&"function"===typeof l.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(l,"")?this.parseFile(new Blob([l],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&"<mxGraphModel"==b.responseText.substring(0,13)&&O(b.responseText,
+g)}),""):null!=l&&"function"===typeof l.substring&&this.isLucidChartData(l)?this.convertLucidChart(l,mxUtils.bind(this,function(b){O(b)}),mxUtils.bind(this,function(b){this.handleError(b)})):null==l||"object"!==typeof l||null==l.format||null==l.data&&null==l.url?(l=m(l),O(l,g)):this.loadDescriptor(l,mxUtils.bind(this,function(b){O(da(),g)}),mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"))}))}}));var k=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):
+urlParams.ready||"ready";k.postMessage(g,"*");if("json"==urlParams.proto){var n=this.editor.graph.openLink;this.editor.graph.openLink=function(b,c,d){n.apply(this,arguments);k.postMessage(JSON.stringify({event:"openLink",href:b,target:c,allowOpener:d}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var b=document.createElement("div");b.style.display="inline-block";b.style.position="absolute";b.style.paddingTop="atlas"==uiTheme?"2px":"0px";b.style.paddingLeft="8px";b.style.paddingBottom=
+"2px";var c=document.createElement("button");c.className="geBigButton";var d=c;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var e="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,e);c.setAttribute("title",e);mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));b.appendChild(c)}}else mxUtils.write(c,mxResources.get("save")),c.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+
+"+S)"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),b.appendChild(c),"1"==urlParams.saveAndExit&&(c=document.createElement("a"),mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),b.appendChild(c),d=c);"1"!=urlParams.noExitBtn&&
+(c=document.createElement("a"),d="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(c,d),c.setAttribute("title",d),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),b.appendChild(c),d=c);d.style.marginRight="20px";this.toolbar.container.appendChild(b);this.toolbar.staticElements.push(b);b.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=
+function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(b){this.importCsv(b)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(b,c){for(var d=this.editor.graph,
+f=d.getSelectionCells(),e=0;e<b.length;e++){var g=new window[b[e].layout](d);if(null!=b[e].config)for(var l in b[e].config)g[l]=b[e].config[l];this.executeLayout(function(){g.execute(d.getDefaultParent(),0==f.length?null:f)},e==b.length-1,c)}};EditorUi.prototype.importCsv=function(b,c){try{var d=b.split("\n"),f=[],e=[],g={};if(0<d.length){var l={},k=null,n=null,B=null,A=null,y=null,z=null,C=null,F=null,E=null,H="",D="auto",I="auto",K=null,M=null,L=40,N=40,P=100,G=0,J=this.editor.graph;J.getGraphBounds();
+for(var W=function(){null!=c?c(Y):(J.setSelectionCells(Y),J.scrollCellToVisible(J.getSelectionCell()))},R=J.getFreeInsertPoint(),Q=R.x,X=R.y,R=X,ha=null,ga="auto",E=null,aa=[],ba=null,Z=null,ja=0;ja<d.length&&"#"==d[ja].charAt(0);){b=d[ja];for(ja++;ja<d.length&&"\\"==b.charAt(b.length-1)&&"#"==d[ja].charAt(0);)b=b.substring(0,b.length-1)+mxUtils.trim(d[ja].substring(1)),ja++;if("#"!=b.charAt(1)){var da=b.indexOf(":");if(0<da){var O=mxUtils.trim(b.substring(1,da)),T=mxUtils.trim(b.substring(da+1));
+"label"==O?ha=J.sanitizeHtml(T):"labelname"==O&&0<T.length&&"-"!=T?y=T:"labels"==O&&0<T.length&&"-"!=T?z=JSON.parse(T):"style"==O?n=T:"parentstyle"==O?C=T:"stylename"==O&&0<T.length&&"-"!=T?A=T:"styles"==O&&0<T.length&&"-"!=T?B=JSON.parse(T):"vars"==O&&0<T.length&&"-"!=T?k=JSON.parse(T):"identity"==O&&0<T.length&&"-"!=T?F=T:"parent"==O&&0<T.length&&"-"!=T?E=T:"namespace"==O&&0<T.length&&"-"!=T?H=T:"width"==O?D=T:"height"==O?I=T:"left"==O&&0<T.length?K=T:"top"==O&&0<T.length?M=T:"ignore"==O?Z=T.split(","):
+"connect"==O?aa.push(JSON.parse(T)):"link"==O?ba=T:"padding"==O?G=parseFloat(T):"edgespacing"==O?L=parseFloat(T):"nodespacing"==O?N=parseFloat(T):"levelspacing"==O?P=parseFloat(T):"layout"==O&&(ga=T)}}}if(null==d[ja])throw Error(mxResources.get("invalidOrMissingFile"));for(var la=this.editor.csvToArray(d[ja]),O=da=null,T=[],U=0;U<la.length;U++)F==la[U]&&(da=U),E==la[U]&&(O=U),T.push(mxUtils.trim(la[U]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ha&&(ha="%"+T[0]+"%");if(null!=
+aa)for(var fa=0;fa<aa.length;fa++)null==l[aa[fa].to]&&(l[aa[fa].to]={});F=[];for(U=ja+1;U<d.length;U++){var ia=this.editor.csvToArray(d[U]);if(null==ia){var na=40<d[U].length?d[U].substring(0,40)+"...":d[U];throw Error(na+" ("+U+"):\n"+mxResources.get("containsValidationErrors"));}0<ia.length&&F.push(ia)}J.model.beginUpdate();try{for(U=0;U<F.length;U++){var ia=F[U],V=null,ca=null!=da?H+ia[da]:null;null!=ca&&(V=J.model.getCell(ca));var d=null!=V,ea=new mxCell(ha,new mxGeometry(Q,R,0,0),n||"whiteSpace=wrap;html=1;");
+ea.vertex=!0;ea.id=ca;for(var ka=0;ka<ia.length;ka++)J.setAttributeForCell(ea,T[ka],ia[ka]);if(null!=y&&null!=z){var pa=z[ea.getAttribute(y)];null!=pa&&J.labelChanged(ea,pa)}if(null!=A&&null!=B){var oa=B[ea.getAttribute(A)];null!=oa&&(ea.style=oa)}J.setAttributeForCell(ea,"placeholders","1");ea.style=J.replacePlaceholders(ea,ea.style,k);d&&(J.model.setGeometry(V,ea.geometry),J.model.setStyle(V,ea.style),0>mxUtils.indexOf(e,V)&&e.push(V));V=ea;if(!d)for(fa=0;fa<aa.length;fa++)l[aa[fa].to][V.getAttribute(aa[fa].to)]=
+V;null!=ba&&"link"!=ba&&(J.setLinkForCell(V,V.getAttribute(ba)),J.setAttributeForCell(V,ba,null));J.fireEvent(new mxEventObject("cellsInserted","cells",[V]));var S=this.editor.graph.getPreferredSizeForCell(V);V.vertex&&(null!=K&&null!=V.getAttribute(K)&&(V.geometry.x=Q+parseFloat(V.getAttribute(K))),null!=M&&null!=V.getAttribute(M)&&(V.geometry.y=X+parseFloat(V.getAttribute(M))),"@"==D.charAt(0)&&null!=V.getAttribute(D.substring(1))?V.geometry.width=parseFloat(V.getAttribute(D.substring(1))):V.geometry.width=
+"auto"==D?S.width+G:parseFloat(D),"@"==I.charAt(0)&&null!=V.getAttribute(I.substring(1))?V.geometry.height=parseFloat(V.getAttribute(I.substring(1))):V.geometry.height="auto"==I?S.height+G:parseFloat(I),R+=V.geometry.height+N);d?(null==g[ca]&&(g[ca]=[]),g[ca].push(V)):(E=null!=O?J.model.getCell(H+ia[O]):null,f.push(V),null!=E?(E.style=J.replacePlaceholders(E,C,k),J.addCell(V,E)):e.push(J.addCell(V)))}for(var ma=e.slice(),Y=e.slice(),fa=0;fa<aa.length;fa++)for(var ta=aa[fa],U=0;U<f.length;U++){var V=
+f[U],ra=mxUtils.bind(this,function(b,c,d){var f=c.getAttribute(d.from);if(null!=f&&(J.setAttributeForCell(c,d.from,null),""!=f))for(var f=f.split(","),e=0;e<f.length;e++){var g=l[d.to][f[e]];if(null!=g){var m=d.label;null!=d.fromlabel&&(m=(c.getAttribute(d.fromlabel)||"")+(m||""));null!=d.sourcelabel&&(m=J.replacePlaceholders(c,d.sourcelabel,k)+(m||""));null!=d.tolabel&&(m=(m||"")+(g.getAttribute(d.tolabel)||""));null!=d.targetlabel&&(m=(m||"")+J.replacePlaceholders(g,d.targetlabel,k));var n="target"==
+d.placeholders==!d.invert?g:b,n=null!=d.style?J.replacePlaceholders(n,d.style,k):J.createCurrentEdgeStyle(),m=J.insertEdge(null,null,m||"",d.invert?g:b,d.invert?b:g,n);if(null!=d.labels)for(n=0;n<d.labels.length;n++){var p=d.labels[n],y=new mxCell(p.label||n,new mxGeometry(null!=p.x?p.x:0,null!=p.y?p.y:0,0,0),"resizable=0;html=1;");y.vertex=!0;y.connectable=!1;y.geometry.relative=!0;null!=p.placeholders&&(y.value=J.replacePlaceholders("target"==p.placeholders==!d.invert?g:b,y.value,k));if(null!=p.dx||
+null!=p.dy)y.geometry.offset=new mxPoint(null!=p.dx?p.dx:0,null!=p.dy?p.dy:0);m.insert(y)}Y.push(m);mxUtils.remove(d.invert?b:g,ma)}}});ra(V,V,ta);if(null!=g[V.id])for(ka=0;ka<g[V.id].length;ka++)ra(V,g[V.id][ka],ta)}if(null!=Z)for(U=0;U<f.length;U++)for(V=f[U],ka=0;ka<Z.length;ka++)J.setAttributeForCell(V,mxUtils.trim(Z[ka]),null);if(0<e.length){var qa=new mxParallelEdgeLayout(J);qa.spacing=L;qa.checkOverlap=!0;var xa=function(){0<qa.spacing&&qa.execute(J.getDefaultParent());for(var b=0;b<e.length;b++){var c=
+J.getCellGeometry(e[b]);c.x=Math.round(J.snap(c.x));c.y=Math.round(J.snap(c.y));"auto"==D&&(c.width=Math.round(J.snap(c.width)));"auto"==I&&(c.height=Math.round(J.snap(c.height)))}};if("["==ga.charAt(0)){var ya=W;J.view.validate();this.executeLayoutList(JSON.parse(ga),function(){xa();ya()});W=null}else if("circle"==ga){var ua=new mxCircleLayout(J);ua.disableEdgeStyle=!1;ua.resetEdges=!1;var za=ua.isVertexIgnored;ua.isVertexIgnored=function(b){return za.apply(this,arguments)||0>mxUtils.indexOf(e,b)};
+this.executeLayout(function(){ua.execute(J.getDefaultParent());xa()},!0,W);W=null}else if("horizontaltree"==ga||"verticaltree"==ga||"auto"==ga&&Y.length==2*e.length-1&&1==ma.length){J.view.validate();var va=new mxCompactTreeLayout(J,"horizontaltree"==ga);va.levelDistance=N;va.edgeRouting=!1;va.resetEdges=!1;this.executeLayout(function(){va.execute(J.getDefaultParent(),0<ma.length?ma[0]:null)},!0,W);W=null}else if("horizontalflow"==ga||"verticalflow"==ga||"auto"==ga&&1==ma.length){J.view.validate();
+var wa=new mxHierarchicalLayout(J,"horizontalflow"==ga?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);wa.intraCellSpacing=N;wa.parallelEdgeSpacing=L;wa.interRankCellSpacing=P;wa.disableEdgeStyle=!1;this.executeLayout(function(){wa.execute(J.getDefaultParent(),Y);J.moveCells(Y,Q,X)},!0,W);W=null}else if("organic"==ga||"auto"==ga&&Y.length>e.length){J.view.validate();var sa=new mxFastOrganicLayout(J);sa.forceConstant=3*N;sa.disableEdgeStyle=!1;sa.resetEdges=!1;var Aa=sa.isVertexIgnored;sa.isVertexIgnored=
+function(b){return Aa.apply(this,arguments)||0>mxUtils.indexOf(e,b)};this.executeLayout(function(){sa.execute(J.getDefaultParent());xa()},!0,W);W=null}}this.hideDialog()}finally{J.model.endUpdate()}null!=W&&W()}}catch(Ba){this.handleError(Ba)}};EditorUi.prototype.getSearch=function(b){var c="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=b&&0<window.location.search.length){var d="?",f;for(f in urlParams)0>mxUtils.indexOf(b,f)&&null!=urlParams[f]&&(c+=d+f+"="+urlParams[f],d="&")}else c=window.location.search;
+return c};EditorUi.prototype.getUrl=function(b){b=null!=b?b:window.location.pathname;var c=0<b.indexOf("?")?1:0;if("1"==urlParams.offline)b+=window.location.search;else{var d="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),f;for(f in urlParams)0>mxUtils.indexOf(d,f)&&(b=0==c?b+"?":b+"&",null!=urlParams[f]&&(b+=f+"="+urlParams[f],c++))}return b};EditorUi.prototype.showLinkDialog=function(b,c,d,e,g){b=new LinkDialog(this,b,c,d,!0,e,g);this.showDialog(b.container,
+560,130,!0,!0);b.init()};EditorUi.prototype.getServiceCount=function(b){var c=1;null==this.drive&&"function"!==typeof window.DriveClient||c++;null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;null!=this.gitHub&&c++;null!=this.gitLab&&c++;null!=this.notion&&c++;b&&isLocalStorage&&"1"==urlParams.browser&&c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var b=
+this.getCurrentFile(),c=null!=b||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(c);this.menus.get("viewZoom").setEnabled(c);var d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==b||b.isRestricted());this.actions.get("makeCopy").setEnabled(!d);this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d);d="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(d);
+Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(d),this.menus.get("newLibrary").setEnabled(d));b="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=b&&b.isEditable();this.actions.get("image").setEnabled(c);this.actions.get("zoomIn").setEnabled(c);this.actions.get("zoomOut").setEnabled(c);this.actions.get("resetView").setEnabled(c);this.actions.get("undo").setEnabled(this.canUndo()&&b);this.actions.get("redo").setEnabled(this.canRedo()&&b);this.menus.get("edit").setEnabled(c);
+this.menus.get("view").setEnabled(c);this.menus.get("importFrom").setEnabled(b);this.menus.get("arrange").setEnabled(b);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(b),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(b));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=
+function(){};EditorUi.prototype.isDiagramActive=function(){var b=this.getCurrentFile();return null!=b&&b.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var k=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){k.apply(this,arguments);var b=this.editor.graph,c=this.getCurrentFile(),d=this.isDiagramActive(),e=b.getEditableCells(b.getSelectionCells());this.actions.get("pageSetup").setEnabled(d);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&
+c.isAutosaveOptional());this.actions.get("guides").setEnabled(d);this.actions.get("editData").setEnabled(0<e.length||b.isSelectionEmpty());this.actions.get("shadowVisible").setEnabled(d);this.actions.get("connectionArrows").setEnabled(d);this.actions.get("connectionPoints").setEnabled(d);this.actions.get("copyStyle").setEnabled(d&&!b.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(d&&0<e.length);this.actions.get("editGeometry").setEnabled(0<e.length&&b.getModel().isVertex(e[0]));this.actions.get("createShape").setEnabled(d);
+this.actions.get("createRevision").setEnabled(d);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(d&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=
+this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());c=this.actions.get("findReplace");c.setEnabled("hidden"!=this.diagramContainer.style.visibility);c.label=mxResources.get("find")+(b.isEnabled()?"/"+mxResources.get("replace"):"")+"...";b=b.view.getState(b.getSelectionCell());this.actions.get("editShape").setEnabled(d&&
+null!=b&&null!=b.shape&&null!=b.shape.stencil)};var n=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);n.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(b,c,d,e,g,k,n,v){var f=b.editor.graph;if("xml"==d)b.hideDialog(),b.saveData(c,"xml",mxUtils.getXml(b.editor.getGraphXml()),"text/xml");
+else if("svg"==d)b.hideDialog(),b.saveData(c,"svg",mxUtils.getXml(f.getSvg(e,g,k)),"image/svg+xml");else{var l=b.getFileData(!0,null,null,null,null,!0),m=f.getGraphBounds(),p=Math.floor(m.width*g/f.view.scale),q=Math.floor(m.height*g/f.view.scale);if(l.length<=MAX_REQUEST_SIZE&&p*q<MAX_AREA)if(b.hideDialog(),"png"!=d&&"jpg"!=d&&"jpeg"!=d||!b.isExportToCanvas()){var t={globalVars:f.getExportVariables()};v&&(t.grid={size:f.gridSize,steps:f.view.gridSteps,color:f.view.gridColor});b.saveRequest(c,d,function(b,
+c){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(c||"0")+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(t))+(0<n?"&dpi="+n:"")+"&bg="+(null!=e?e:"none")+"&w="+p+"&h="+q+"&border="+k+"&xml="+encodeURIComponent(l))})}else"png"==d?b.exportImage(g,null==e||"none"==e,!0,!1,!1,k,!0,!1,null,v,n):b.exportImage(g,!1,!0,!1,!1,k,!0,!1,"jpeg",v);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);
+var b=this.editor.graph,c="";if(null!=this.pages)for(var d=0;d<this.pages.length;d++){var e=b;this.currentPage!=this.pages[d]&&(e=this.createTemporaryGraph(b.getStylesheet()),this.updatePageRoot(this.pages[d]),e.model.setRoot(this.pages[d].root));c+=this.pages[d].getName()+" "+e.getIndexableText()+" "}else c=b.getIndexableText();this.editor.graph.setEnabled(!0);return c};EditorUi.prototype.showRemotelyStoredLibrary=function(b){var c={},d=document.createElement("div");d.style.whiteSpace="nowrap";var e=
+document.createElement("h3");mxUtils.write(e,mxUtils.htmlEntities(b));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(e);var f=document.createElement("div");f.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";f.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var g={};try{var k=mxSettings.getCustomLibraries();for(b=0;b<k.length;b++){var n=k[b];if("R"==n.substring(0,1)){var x=JSON.parse(decodeURIComponent(n.substring(1)));
+g[x[0]]={id:x[0],title:x[1],downloadUrl:x[2]}}}}catch(B){}this.remoteInvoke("getCustomLibraries",null,null,function(b){f.innerHTML="";if(0==b.length)f.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var d=0;d<b.length;d++){var e=b[d];g[e.id]&&(c[e.id]=e);var k=this.addCheckbox(f,e.title,g[e.id]);(function(b,d){mxEvent.addListener(d,"change",function(){this.checked?c[b.id]=b:delete c[b.id]})})(e,k)}},mxUtils.bind(this,
function(b){f.innerHTML="";var c=document.createElement("div");c.style.padding="8px";c.style.textAlign="center";mxUtils.write(c,mxResources.get("error")+": ");mxUtils.write(c,null!=b&&null!=b.message?b.message:mxResources.get("unknownError"));f.appendChild(c)}));d.appendChild(f);d=new CustomDialog(this,d,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var b=0,d;for(d in c)null==g[d]&&(b++,mxUtils.bind(this,function(c){this.remoteInvoke("getFileContent",[c.downloadUrl],
null,mxUtils.bind(this,function(d){b--;0==b&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,d,c))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){b--;0==b&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(c[d]));for(d in g)c[d]||this.closeLibrary(new RemoteLibrary(this,null,g[d]));0==b&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(d.container,
340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(b){this.remoteWin=b;for(var c=0;c<this.remoteInvokeQueue.length;c++)b.postMessage(this.remoteInvokeQueue[c],
"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(b){var c=b.msgMarkers,d=this.remoteInvokeCallbacks[c.callbackId];if(null==d)throw Error("No callback for "+(null!=c?c.callbackId:"null"));b.error?d.error&&d.error(b.error.errResp):d.callback&&d.callback.apply(this,b.resp);this.remoteInvokeCallbacks[c.callbackId]=null};EditorUi.prototype.remoteInvoke=function(b,c,d,e,g){var f=!0,k=window.setTimeout(mxUtils.bind(this,function(){f=!1;g({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),
this.timeout),l=mxUtils.bind(this,function(){window.clearTimeout(k);f&&e.apply(this,arguments)}),m=mxUtils.bind(this,function(){window.clearTimeout(k);f&&g.apply(this,arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:l,error:m});b=JSON.stringify({event:"remoteInvoke",funtionName:b,functionArgs:c,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(b,"*"):this.remoteInvokeQueue.push(b)};EditorUi.prototype.handleRemoteInvoke=function(b,
c){var d=mxUtils.bind(this,function(c,d){var e={event:"remoteInvokeResponse",msgMarkers:b.msgMarkers};null!=d?e.error={errResp:d}:null!=c&&(e.resp=c);this.remoteWin.postMessage(JSON.stringify(e),"*")});try{var e=b.funtionName,f=this.remoteInvokableFns[e];if(null!=f&&"function"===typeof this[e]){if(f.allowedDomains){for(var g=!1,k=0;k<f.allowedDomains.length;k++)if(c=="https://"+f.allowedDomains[k]){g=!0;break}if(!g){d(null,"Invalid Call: "+e+" is not allowed.");return}}var l=b.functionArgs;Array.isArray(l)||
-(l=[]);if(f.isAsync)l.push(function(){d(Array.prototype.slice.apply(arguments))}),l.push(function(b){d(null,b||"Unkown Error")}),this[e].apply(this,l);else{var n=this[e].apply(this,l);d([n])}}else d(null,"Invalid Call: "+e+" is not found.")}catch(A){d(null,"Invalid Call: An error occurred, "+A.message)}};EditorUi.prototype.openDatabase=function(b,c){if(null==this.database){var d=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=d)try{var e=d.open("database",2);e.onupgradeneeded=
+(l=[]);if(f.isAsync)l.push(function(){d(Array.prototype.slice.apply(arguments))}),l.push(function(b){d(null,b||"Unkown Error")}),this[e].apply(this,l);else{var n=this[e].apply(this,l);d([n])}}else d(null,"Invalid Call: "+e+" is not found.")}catch(B){d(null,"Invalid Call: An error occurred, "+B.message)}};EditorUi.prototype.openDatabase=function(b,c){if(null==this.database){var d=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=d)try{var e=d.open("database",2);e.onupgradeneeded=
function(b){try{var d=e.result;1>b.oldVersion&&d.createObjectStore("objects",{keyPath:"key"});2>b.oldVersion&&(d.createObjectStore("files",{keyPath:"title"}),d.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(u){null!=c&&c(u)}};e.onsuccess=mxUtils.bind(this,function(c){var d=e.result;this.database=d;EditorUi.migrateStorageFiles&&(StorageFile.migrate(d),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||
(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(b){if(!b||"1"==urlParams.forceMigration){var c=document.createElement("iframe");c.style.display="none";c.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(c);var d=!0,e=!1,f,g=0,k=mxUtils.bind(this,function(){e=!0;this.setDatabaseItem(".drawioMigrated3",!0);c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
funtionName:"setMigratedFlag"}),"*")}),l=mxUtils.bind(this,function(){g++;m()}),m=mxUtils.bind(this,function(){try{if(g>=f.length)k();else{var b=f[g];StorageFile.getFileContent(this,b,mxUtils.bind(this,function(d){null==d||".scratchpad"==b&&d==this.emptyLibraryXml?c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[b]}),"*"):l()}),l)}}catch(D){console.log(D)}}),n=mxUtils.bind(this,function(b){try{this.setDatabaseItem(null,[{title:b.title,
-size:b.data.length,lastModified:Date.now(),type:b.isLib?"L":"F"},{title:b.title,data:b.data}],l,l,["filesInfo","files"])}catch(D){console.log(D)}});b=mxUtils.bind(this,function(b){try{if(b.source==c.contentWindow){var g={};try{g=JSON.parse(b.data)}catch(H){}"init"==g.event?(c.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=g.event||e||
-(d?null!=g.resp&&0<g.resp.length&&null!=g.resp[0]?(f=g.resp[0],d=!1,m()):k():null!=g.resp&&0<g.resp.length&&null!=g.resp[0]?n(g.resp[0]):l())}}catch(H){console.log(H)}});window.addEventListener("message",b)}})));b(d);d.onversionchange=function(){d.close()}});e.onerror=c;e.onblocked=function(){}}catch(q){null!=c&&c(q)}else null!=c&&c()}else b(this.database)};EditorUi.prototype.setDatabaseItem=function(b,c,d,e,g){this.openDatabase(mxUtils.bind(this,function(f){try{g=g||"objects";Array.isArray(g)||(g=
+size:b.data.length,lastModified:Date.now(),type:b.isLib?"L":"F"},{title:b.title,data:b.data}],l,l,["filesInfo","files"])}catch(D){console.log(D)}});b=mxUtils.bind(this,function(b){try{if(b.source==c.contentWindow){var g={};try{g=JSON.parse(b.data)}catch(I){}"init"==g.event?(c.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=g.event||e||
+(d?null!=g.resp&&0<g.resp.length&&null!=g.resp[0]?(f=g.resp[0],d=!1,m()):k():null!=g.resp&&0<g.resp.length&&null!=g.resp[0]?n(g.resp[0]):l())}}catch(I){console.log(I)}});window.addEventListener("message",b)}})));b(d);d.onversionchange=function(){d.close()}});e.onerror=c;e.onblocked=function(){}}catch(q){null!=c&&c(q)}else null!=c&&c()}else b(this.database)};EditorUi.prototype.setDatabaseItem=function(b,c,d,e,g){this.openDatabase(mxUtils.bind(this,function(f){try{g=g||"objects";Array.isArray(g)||(g=
[g],b=[b],c=[c]);var k=f.transaction(g,"readwrite");k.oncomplete=d;k.onerror=e;for(f=0;f<g.length;f++)k.objectStore(g[f]).put(null!=b&&null!=b[f]?{key:b[f],data:c[f]}:c[f])}catch(v){null!=e&&e(v)}}),e)};EditorUi.prototype.removeDatabaseItem=function(b,c,d,e){this.openDatabase(mxUtils.bind(this,function(f){e=e||"objects";Array.isArray(e)||(e=[e],b=[b]);f=f.transaction(e,"readwrite");f.oncomplete=c;f.onerror=d;for(var g=0;g<e.length;g++)f.objectStore(e[g])["delete"](b[g])}),d)};EditorUi.prototype.getDatabaseItem=
function(b,c,d,e){this.openDatabase(mxUtils.bind(this,function(f){try{e=e||"objects";var g=f.transaction([e],"readonly").objectStore(e).get(b);g.onsuccess=function(){c(g.result)};g.onerror=d}catch(u){null!=d&&d(u)}}),d)};EditorUi.prototype.getDatabaseItems=function(b,c,d){this.openDatabase(mxUtils.bind(this,function(e){try{d=d||"objects";var f=e.transaction([d],"readonly").objectStore(d).openCursor(IDBKeyRange.lowerBound(0)),g=[];f.onsuccess=function(c){null==c.target.result?b(g):(g.push(c.target.result.value),
c.target.result["continue"]())};f.onerror=c}catch(u){null!=c&&c(u)}}),c)};EditorUi.prototype.getDatabaseItemKeys=function(b,c,d){this.openDatabase(mxUtils.bind(this,function(e){try{d=d||"objects";var f=e.transaction([d],"readonly").objectStore(d).getAllKeys();f.onsuccess=function(){b(f.result)};f.onerror=c}catch(t){null!=c&&c(t)}}),c)};EditorUi.prototype.commentsSupported=function(){var b=this.getCurrentFile();return null!=b?b.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var b=
@@ -10886,40 +10908,40 @@ this.getCurrentFile();return null!=b?b.commentsRefreshNeeded():!0};EditorUi.prot
b.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var b=this.getCurrentFile();return null!=b?b.canComment():!0};EditorUi.prototype.newComment=function(b,c){var d=this.getCurrentFile();return null!=d?d.newComment(b,c):new DrawioComment(this,null,b,Date.now(),Date.now(),!1,c)};EditorUi.prototype.isRevisionHistorySupported=function(){var b=this.getCurrentFile();return null!=b&&b.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(b,c){var d=this.getCurrentFile();null!=
d&&d.getRevisions?d.getRevisions(b,c):c({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var b=this.getCurrentFile();return null!=b&&(b.constructor==DriveFile&&b.isEditable()||b.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(b){b.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(b,c,d,e,g,k,n,v){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
return this.editor.loadUrl(b,c,d,e,g,k,n,v)};EditorUi.prototype.loadFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(b)};EditorUi.prototype.createSvgDataUri=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(b)};EditorUi.prototype.embedCssFonts=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(b,c)};EditorUi.prototype.embedExtFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
-return this.editor.embedExtFonts(b)};EditorUi.prototype.exportToCanvas=function(b,c,d,e,g,k,n,v,x,A,z,y,B,C,E,F){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(b,c,d,e,g,k,n,v,x,A,z,y,B,C,E,F)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(b,c,d,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
+return this.editor.embedExtFonts(b)};EditorUi.prototype.exportToCanvas=function(b,c,d,e,g,k,n,v,x,B,A,y,z,C,F,E){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(b,c,d,e,g,k,n,v,x,B,A,y,z,C,F,E)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(b,c,d,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
return this.editor.convertImages(b,c,d,e)};EditorUi.prototype.convertImageToDataUri=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(b,c)};EditorUi.prototype.base64Encode=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(b)};EditorUi.prototype.updateCRC=function(b,c,d,e){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(b,c,d,e)};EditorUi.prototype.crc32=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
return Editor.crc32(b)};EditorUi.prototype.writeGraphModelToPng=function(b,c,d,e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(b,c,d,e,g)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var b=[],c=0;c<localStorage.length;c++){var d=localStorage.key(c),e=localStorage.getItem(d);if(0<d.length&&(".scratchpad"==d||"."!=d.charAt(0))&&0<e.length){var g=
"<mxfile "===e.substring(0,8)||"<?xml"===e.substring(0,5)||"\x3c!--[if IE]>"===e.substring(0,12),e="<mxlibrary>"===e.substring(0,11);(g||e)&&b.push(d)}}return b};EditorUi.prototype.getLocalStorageFile=function(b){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var c=localStorage.getItem(b);return{title:b,data:c,isLib:"<mxlibrary>"===c.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,e,d,c,g,k){function n(){for(var b=y.getElementsByTagName("div"),c=0,d=0;d<b.length;d++)"none"!=b[d].style.display&&b[d].parentNode==y&&c++;B.style.display=0==c?"block":"none"}function f(b,c,d,e){function f(){c.removeChild(l);c.removeChild(m);k.style.display="block";g.style.display="block"}x={div:c,comment:b,saveCallback:d,deleteOnCancel:e};var g=c.querySelector(".geCommentTxt"),k=c.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
+var CommentsWindow=function(b,e,d,c,g,k){function n(){for(var b=y.getElementsByTagName("div"),c=0,d=0;d<b.length;d++)"none"!=b[d].style.display&&b[d].parentNode==y&&c++;z.style.display=0==c?"block":"none"}function f(b,c,d,e){function f(){c.removeChild(l);c.removeChild(m);k.style.display="block";g.style.display="block"}x={div:c,comment:b,saveCallback:d,deleteOnCancel:e};var g=c.querySelector(".geCommentTxt"),k=c.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
"geCommentEditTxtArea";l.style.minHeight=g.offsetHeight+"px";l.value=b.content;c.insertBefore(l,g);var m=document.createElement("div");m.className="geCommentEditBtns";var p=mxUtils.button(mxResources.get("cancel"),function(){e?(c.parentNode.removeChild(c),n()):f();x=null});p.className="geCommentEditBtn";m.appendChild(p);var y=mxUtils.button(mxResources.get("save"),function(){g.innerHTML="";b.content=l.value;mxUtils.write(g,b.content);f();d(b);x=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this,
function(b){mxEvent.isConsumed(b)||((mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b))&&13==b.keyCode?(y.click(),mxEvent.consume(b)):27==b.keyCode&&(p.click(),mxEvent.consume(b)))}));y.focus();y.className="geCommentEditBtn gePrimaryBtn";m.appendChild(y);c.insertBefore(m,g);k.style.display="none";g.style.display="none";l.focus()}function l(c,d){d.innerHTML="";var e=new Date(c.modifiedDate),f=b.timeSince(e);null==f&&(f=mxResources.get("lessThanAMinute"));mxUtils.write(d,mxResources.get("timeAgo",
[f],"{1} ago"));d.setAttribute("title",e.toLocaleDateString()+" "+e.toLocaleTimeString())}function m(b){var c=document.createElement("img");c.className="geCommentBusyImg";c.src=IMAGE_PATH+"/spin.gif";b.appendChild(c);b.busyImg=c}function p(b){b.style.border="1px solid red";b.removeChild(b.busyImg)}function q(b){b.style.border="";b.removeChild(b.busyImg)}function t(c,d,e,g,k){function C(b,d,e){var f=document.createElement("li");f.className="geCommentAction";var g=document.createElement("a");g.className=
-"geCommentActionLnk";mxUtils.write(g,b);f.appendChild(g);mxEvent.addListener(g,"click",function(b){d(b,c);b.preventDefault();mxEvent.consume(b)});M.appendChild(f);e&&(f.style.display="none")}function D(){function b(c){d.push(e);if(null!=c.replies)for(var f=0;f<c.replies.length;f++)e=e.nextSibling,b(c.replies[f])}var d=[],e=z;b(c);return{pdiv:e,replies:d}}function L(d,e,k,l,n){function y(){m(C);c.addReply(v,function(b){v.id=b;c.replies.push(v);q(C);k&&k()},function(c){B();p(C);b.handleError(c,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},l,n)}function B(){f(v,C,function(b){y()},!0)}var u=D().pdiv,v=b.newComment(d,b.getCurrentUser());v.pCommentId=c.id;null==c.replies&&(c.replies=[]);var C=t(v,c.replies,u,g+1);e?B():y()}if(k||!c.isResolved){B.style.display="none";var z=document.createElement("div");z.className="geCommentContainer";z.setAttribute("data-commentId",c.id);z.style.marginLeft=20*g+5+"px";c.isResolved&&!Editor.isDarkMode()&&(z.style.backgroundColor="ghostWhite");
-var E=document.createElement("div");E.className="geCommentHeader";var A=document.createElement("img");A.className="geCommentUserImg";A.src=c.user.pictureUrl||Editor.userImage;E.appendChild(A);A=document.createElement("div");A.className="geCommentHeaderTxt";E.appendChild(A);var P=document.createElement("div");P.className="geCommentUsername";mxUtils.write(P,c.user.displayName||"");A.appendChild(P);P=document.createElement("div");P.className="geCommentDate";P.setAttribute("data-commentId",c.id);l(c,
-P);A.appendChild(P);z.appendChild(E);E=document.createElement("div");E.className="geCommentTxt";mxUtils.write(E,c.content||"");z.appendChild(E);c.isLocked&&(z.style.opacity="0.5");E=document.createElement("div");E.className="geCommentActions";var M=document.createElement("ul");M.className="geCommentActionsList";E.appendChild(M);u||c.isLocked||0!=g&&!v||C(mxResources.get("reply"),function(){L("",!0)},c.isResolved);A=b.getCurrentUser();null==A||A.id!=c.user.id||u||c.isLocked||(C(mxResources.get("edit"),
-function(){function d(){f(c,z,function(){m(z);c.editComment(c.content,function(){q(z)},function(c){p(z);d();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}d()},c.isResolved),C(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){m(z);c.deleteComment(function(b){if(!0===b){b=z.querySelector(".geCommentTxt");b.innerHTML="";mxUtils.write(b,mxResources.get("msgDeleted"));var e=z.querySelectorAll(".geCommentAction");for(b=
-0;b<e.length;b++)e[b].parentNode.removeChild(e[b]);q(z);z.style.opacity="0.5"}else{e=D(c).replies;for(b=0;b<e.length;b++)y.removeChild(e[b]);for(b=0;b<d.length;b++)if(d[b]==c){d.splice(b,1);break}B.style.display=0==y.getElementsByTagName("div").length?"block":"none"}},function(c){p(z);b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));u||c.isLocked||0!=g||C(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(b){function d(){var d=
-b.target;d.innerHTML="";c.isResolved=!c.isResolved;mxUtils.write(d,c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var e=c.isResolved?"none":"",f=D(c).replies,g=Editor.isDarkMode()?"transparent":c.isResolved?"ghostWhite":"white",k=0;k<f.length;k++){f[k].style.backgroundColor=g;for(var l=f[k].querySelectorAll(".geCommentAction"),m=0;m<l.length;m++)l[m]!=d.parentNode&&(l[m].style.display=e);F||(f[k].style.display="none")}n()}c.isResolved?L(mxResources.get("reOpened")+": ",!0,
-d,!1,!0):L(mxResources.get("markedAsResolved"),!1,d,!0)});z.appendChild(E);null!=e?y.insertBefore(z,e.nextSibling):y.appendChild(z);for(e=0;null!=c.replies&&e<c.replies.length;e++)E=c.replies[e],E.isResolved=c.isResolved,t(E,c.replies,null,g+1,k);null!=x&&(x.comment.id==c.id?(k=c.content,c.content=x.comment.content,f(c,z,x.saveCallback,x.deleteOnCancel),c.content=k):null==x.comment.id&&x.comment.pCommentId==c.id&&(y.appendChild(x.div),f(x.comment,x.div,x.saveCallback,x.deleteOnCancel)));return z}}
-var u=!b.canComment(),v=b.canReplyToReplies(),x=null,A=document.createElement("div");A.className="geCommentsWin";A.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var z=EditorUi.compactUi?"26px":"30px",y=document.createElement("div");y.className="geCommentsList";y.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";y.style.bottom=parseInt(z)+7+"px";A.appendChild(y);var B=document.createElement("span");B.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(B,mxResources.get("noCommentsFound"));var C=document.createElement("div");C.className="geToolbarContainer geCommentsToolbar";C.style.height=z;C.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";C.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";z=document.createElement("a");z.className="geButton";if(!u){var E=z.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';E.setAttribute("title",mxResources.get("create")+
-"...");mxEvent.addListener(E,"click",function(c){function d(){f(e,g,function(c){m(g);b.addComment(c,function(b){c.id=b;I.push(c);q(g)},function(c){p(g);d();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var e=b.newComment("",b.getCurrentUser()),g=t(e,I,null,0);d();c.preventDefault();mxEvent.consume(c)});C.appendChild(E)}E=z.cloneNode();E.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';E.setAttribute("title",mxResources.get("showResolved"));
-var F=!1;Editor.isDarkMode()&&(E.style.filter="invert(100%)");mxEvent.addListener(E,"click",function(b){this.className=(F=!F)?"geButton geCheckedBtn":"geButton";D();b.preventDefault();mxEvent.consume(b)});C.appendChild(E);b.commentsRefreshNeeded()&&(E=z.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',E.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(E.style.filter="invert(100%)"),mxEvent.addListener(E,"click",function(b){D();
-b.preventDefault();mxEvent.consume(b)}),C.appendChild(E));b.commentsSaveNeeded()&&(z=z.cloneNode(),z.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',z.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(z.style.filter="invert(100%)"),mxEvent.addListener(z,"click",function(b){k();b.preventDefault();mxEvent.consume(b)}),C.appendChild(z));A.appendChild(C);var I=[],D=mxUtils.bind(this,function(){this.hasError=!1;if(null!=x)try{x.div=x.div.cloneNode(!0);
+"geCommentActionLnk";mxUtils.write(g,b);f.appendChild(g);mxEvent.addListener(g,"click",function(b){d(b,c);b.preventDefault();mxEvent.consume(b)});M.appendChild(f);e&&(f.style.display="none")}function D(){function b(c){d.push(e);if(null!=c.replies)for(var f=0;f<c.replies.length;f++)e=e.nextSibling,b(c.replies[f])}var d=[],e=F;b(c);return{pdiv:e,replies:d}}function L(d,e,k,l,n){function y(){m(C);c.addReply(v,function(b){v.id=b;c.replies.push(v);q(C);k&&k()},function(c){z();p(C);b.handleError(c,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},l,n)}function z(){f(v,C,function(b){y()},!0)}var u=D().pdiv,v=b.newComment(d,b.getCurrentUser());v.pCommentId=c.id;null==c.replies&&(c.replies=[]);var C=t(v,c.replies,u,g+1);e?z():y()}if(k||!c.isResolved){z.style.display="none";var F=document.createElement("div");F.className="geCommentContainer";F.setAttribute("data-commentId",c.id);F.style.marginLeft=20*g+5+"px";c.isResolved&&!Editor.isDarkMode()&&(F.style.backgroundColor="ghostWhite");
+var A=document.createElement("div");A.className="geCommentHeader";var B=document.createElement("img");B.className="geCommentUserImg";B.src=c.user.pictureUrl||Editor.userImage;A.appendChild(B);B=document.createElement("div");B.className="geCommentHeaderTxt";A.appendChild(B);var N=document.createElement("div");N.className="geCommentUsername";mxUtils.write(N,c.user.displayName||"");B.appendChild(N);N=document.createElement("div");N.className="geCommentDate";N.setAttribute("data-commentId",c.id);l(c,
+N);B.appendChild(N);F.appendChild(A);A=document.createElement("div");A.className="geCommentTxt";mxUtils.write(A,c.content||"");F.appendChild(A);c.isLocked&&(F.style.opacity="0.5");A=document.createElement("div");A.className="geCommentActions";var M=document.createElement("ul");M.className="geCommentActionsList";A.appendChild(M);u||c.isLocked||0!=g&&!v||C(mxResources.get("reply"),function(){L("",!0)},c.isResolved);B=b.getCurrentUser();null==B||B.id!=c.user.id||u||c.isLocked||(C(mxResources.get("edit"),
+function(){function d(){f(c,F,function(){m(F);c.editComment(c.content,function(){q(F)},function(c){p(F);d();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}d()},c.isResolved),C(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){m(F);c.deleteComment(function(b){if(!0===b){b=F.querySelector(".geCommentTxt");b.innerHTML="";mxUtils.write(b,mxResources.get("msgDeleted"));var e=F.querySelectorAll(".geCommentAction");for(b=
+0;b<e.length;b++)e[b].parentNode.removeChild(e[b]);q(F);F.style.opacity="0.5"}else{e=D(c).replies;for(b=0;b<e.length;b++)y.removeChild(e[b]);for(b=0;b<d.length;b++)if(d[b]==c){d.splice(b,1);break}z.style.display=0==y.getElementsByTagName("div").length?"block":"none"}},function(c){p(F);b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));u||c.isLocked||0!=g||C(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(b){function d(){var d=
+b.target;d.innerHTML="";c.isResolved=!c.isResolved;mxUtils.write(d,c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var e=c.isResolved?"none":"",f=D(c).replies,g=Editor.isDarkMode()?"transparent":c.isResolved?"ghostWhite":"white",k=0;k<f.length;k++){f[k].style.backgroundColor=g;for(var l=f[k].querySelectorAll(".geCommentAction"),m=0;m<l.length;m++)l[m]!=d.parentNode&&(l[m].style.display=e);E||(f[k].style.display="none")}n()}c.isResolved?L(mxResources.get("reOpened")+": ",!0,
+d,!1,!0):L(mxResources.get("markedAsResolved"),!1,d,!0)});F.appendChild(A);null!=e?y.insertBefore(F,e.nextSibling):y.appendChild(F);for(e=0;null!=c.replies&&e<c.replies.length;e++)A=c.replies[e],A.isResolved=c.isResolved,t(A,c.replies,null,g+1,k);null!=x&&(x.comment.id==c.id?(k=c.content,c.content=x.comment.content,f(c,F,x.saveCallback,x.deleteOnCancel),c.content=k):null==x.comment.id&&x.comment.pCommentId==c.id&&(y.appendChild(x.div),f(x.comment,x.div,x.saveCallback,x.deleteOnCancel)));return F}}
+var u=!b.canComment(),v=b.canReplyToReplies(),x=null,B=document.createElement("div");B.className="geCommentsWin";B.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var A=EditorUi.compactUi?"26px":"30px",y=document.createElement("div");y.className="geCommentsList";y.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";y.style.bottom=parseInt(A)+7+"px";B.appendChild(y);var z=document.createElement("span");z.style.cssText="display:none;padding-top:10px;text-align:center;";
+mxUtils.write(z,mxResources.get("noCommentsFound"));var C=document.createElement("div");C.className="geToolbarContainer geCommentsToolbar";C.style.height=A;C.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";C.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";A=document.createElement("a");A.className="geButton";if(!u){var F=A.cloneNode();F.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';F.setAttribute("title",mxResources.get("create")+
+"...");mxEvent.addListener(F,"click",function(c){function d(){f(e,g,function(c){m(g);b.addComment(c,function(b){c.id=b;H.push(c);q(g)},function(c){p(g);d();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var e=b.newComment("",b.getCurrentUser()),g=t(e,H,null,0);d();c.preventDefault();mxEvent.consume(c)});C.appendChild(F)}F=A.cloneNode();F.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';F.setAttribute("title",mxResources.get("showResolved"));
+var E=!1;Editor.isDarkMode()&&(F.style.filter="invert(100%)");mxEvent.addListener(F,"click",function(b){this.className=(E=!E)?"geButton geCheckedBtn":"geButton";D();b.preventDefault();mxEvent.consume(b)});C.appendChild(F);b.commentsRefreshNeeded()&&(F=A.cloneNode(),F.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',F.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(F.style.filter="invert(100%)"),mxEvent.addListener(F,"click",function(b){D();
+b.preventDefault();mxEvent.consume(b)}),C.appendChild(F));b.commentsSaveNeeded()&&(A=A.cloneNode(),A.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',A.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(A.style.filter="invert(100%)"),mxEvent.addListener(A,"click",function(b){k();b.preventDefault();mxEvent.consume(b)}),C.appendChild(A));B.appendChild(C);var H=[],D=mxUtils.bind(this,function(){this.hasError=!1;if(null!=x)try{x.div=x.div.cloneNode(!0);
var c=x.div.querySelector(".geCommentEditTxtArea"),d=x.div.querySelector(".geCommentEditBtns");x.comment.content=c.value;c.parentNode.removeChild(c);d.parentNode.removeChild(d)}catch(L){b.handleError(L)}y.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";v=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(b){function c(b){if(null!=b){b.sort(function(b,c){return new Date(b.modifiedDate)-
-new Date(c.modifiedDate)});for(var d=0;d<b.length;d++)c(b[d].replies)}}b.sort(function(b,c){return new Date(b.modifiedDate)-new Date(c.modifiedDate)});y.innerHTML="";y.appendChild(B);B.style.display="block";I=b;for(b=0;b<I.length;b++)c(I[b].replies),t(I[b],I,null,0,F);null!=x&&null==x.comment.id&&null==x.comment.pCommentId&&(y.appendChild(x.div),f(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},mxUtils.bind(this,function(b){y.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(b&&b.message?
-": "+b.message:""));this.hasError=!0})):y.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});D();this.refreshComments=D;C=mxUtils.bind(this,function(){function b(c){var e=d[c.id];if(null!=e)for(l(c,e),e=0;null!=c.replies&&e<c.replies.length;e++)b(c.replies[e])}if(this.window.isVisible()){for(var c=y.querySelectorAll(".geCommentDate"),d={},e=0;e<c.length;e++){var f=c[e];d[f.getAttribute("data-commentId")]=f}for(e=0;e<I.length;e++)b(I[e])}});setInterval(C,6E4);this.refreshCommentsTime=C;this.window=
-new mxWindow(mxResources.get("comments"),A,e,d,c,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(b,c){var d=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||
-document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,d-this.table.clientHeight-48));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};var H=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",H);this.destroy=function(){mxEvent.removeListener(window,"resize",H);this.window.destroy()}},ConfirmDialog=function(b,e,d,
+new Date(c.modifiedDate)});for(var d=0;d<b.length;d++)c(b[d].replies)}}b.sort(function(b,c){return new Date(b.modifiedDate)-new Date(c.modifiedDate)});y.innerHTML="";y.appendChild(z);z.style.display="block";H=b;for(b=0;b<H.length;b++)c(H[b].replies),t(H[b],H,null,0,E);null!=x&&null==x.comment.id&&null==x.comment.pCommentId&&(y.appendChild(x.div),f(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},mxUtils.bind(this,function(b){y.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(b&&b.message?
+": "+b.message:""));this.hasError=!0})):y.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});D();this.refreshComments=D;C=mxUtils.bind(this,function(){function b(c){var e=d[c.id];if(null!=e)for(l(c,e),e=0;null!=c.replies&&e<c.replies.length;e++)b(c.replies[e])}if(this.window.isVisible()){for(var c=y.querySelectorAll(".geCommentDate"),d={},e=0;e<c.length;e++){var f=c[e];d[f.getAttribute("data-commentId")]=f}for(e=0;e<H.length;e++)b(H[e])}});setInterval(C,6E4);this.refreshCommentsTime=C;this.window=
+new mxWindow(mxResources.get("comments"),B,e,d,c,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(b,c){var d=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||
+document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,d-this.table.clientHeight-48));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};var I=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",I);this.destroy=function(){mxEvent.removeListener(window,"resize",I);this.window.destroy()}},ConfirmDialog=function(b,e,d,
c,g,k,n,f,l,m,p){var q=document.createElement("div");q.style.textAlign="center";p=null!=p?p:44;var t=document.createElement("div");t.style.padding="6px";t.style.overflow="auto";t.style.maxHeight=p+"px";t.style.lineHeight="1.2em";mxUtils.write(t,e);q.appendChild(t);null!=m&&(t=document.createElement("div"),t.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",m),t.appendChild(e),q.appendChild(t));m=document.createElement("div");m.style.textAlign="center";m.style.whiteSpace=
"nowrap";var u=document.createElement("input");u.setAttribute("type","checkbox");k=mxUtils.button(k||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c(u.checked)});k.className="geBtn";null!=f&&(k.innerHTML=f+"<br>"+k.innerHTML,k.style.paddingBottom="8px",k.style.paddingTop="8px",k.style.height="auto",k.style.width="40%");b.editor.cancelFirst&&m.appendChild(k);var v=mxUtils.button(g||mxResources.get("ok"),function(){b.hideDialog();null!=d&&d(u.checked)});m.appendChild(v);null!=n?(v.innerHTML=
n+"<br>"+v.innerHTML+"<br>",v.style.paddingBottom="8px",v.style.paddingTop="8px",v.style.height="auto",v.className="geBtn",v.style.width="40%"):v.className="geBtn gePrimaryBtn";b.editor.cancelFirst||m.appendChild(k);q.appendChild(m);l?(m.style.marginTop="10px",t=document.createElement("p"),t.style.marginTop="20px",t.style.marginBottom="0px",t.appendChild(u),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),t.appendChild(g),q.appendChild(t),mxEvent.addListener(g,
"click",function(b){u.checked=!u.checked;mxEvent.consume(b)})):m.style.marginTop="12px";this.init=function(){v.focus()};this.container=q};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};
EditorUi.prototype.patchPages=function(b,e,d,c,g){var k={},n=[],f={},l={},m={},p={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var q in c[EditorUi.DIFF_UPDATE])k[q]=c[EditorUi.DIFF_UPDATE][q];if(null!=e[EditorUi.DIFF_REMOVE])for(c=0;c<e[EditorUi.DIFF_REMOVE].length;c++)l[e[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=e[EditorUi.DIFF_INSERT])for(c=0;c<e[EditorUi.DIFF_INSERT].length;c++)f[e[EditorUi.DIFF_INSERT][c].previous]=e[EditorUi.DIFF_INSERT][c];if(null!=e[EditorUi.DIFF_UPDATE])for(q in e[EditorUi.DIFF_UPDATE])c=
e[EditorUi.DIFF_UPDATE][q],null!=c.previous&&(p[c.previous]=q);if(null!=b){var t="";for(c=0;c<b.length;c++){var u=b[c].getId();m[u]=b[c];null!=p[t]||l[u]||null!=e[EditorUi.DIFF_UPDATE]&&null!=e[EditorUi.DIFF_UPDATE][u]&&null!=e[EditorUi.DIFF_UPDATE][u].previous||(p[t]=u);t=u}}var v={},x=mxUtils.bind(this,function(b){var c=null!=b?b.getId():"";if(null!=b&&!v[c]){v[c]=!0;n.push(b);var l=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][c]:null;null!=l&&(this.updatePageRoot(b),null!=l.name&&b.setName(l.name),
-null!=l.view&&this.patchViewState(b,l.view),null!=l.cells&&this.patchPage(b,l.cells,k[b.getId()],g),!d||null==l.cells&&null==l.view||(b.needsUpdate=!0))}b=p[c];null!=b&&(delete p[c],x(m[b]));b=f[c];null!=b&&(delete f[c],A(b))}),A=mxUtils.bind(this,function(b){b=mxUtils.parseXml(b.data).documentElement;b=new DiagramPage(b);this.updatePageRoot(b);var c=m[b.getId()];null==c?x(b):(c.root=b.root,this.currentPage==c?this.editor.graph.model.setRoot(c.root):d&&(c.needsUpdate=!0))});x();for(q in p)x(m[p[q]]),
-delete p[q];for(q in f)A(f[q]),delete f[q];return n};EditorUi.prototype.patchViewState=function(b,e){if(null!=b.viewState&&null!=e){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var d in e)try{b.viewState[d]=JSON.parse(e[d])}catch(c){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};
+null!=l.view&&this.patchViewState(b,l.view),null!=l.cells&&this.patchPage(b,l.cells,k[b.getId()],g),!d||null==l.cells&&null==l.view||(b.needsUpdate=!0))}b=p[c];null!=b&&(delete p[c],x(m[b]));b=f[c];null!=b&&(delete f[c],B(b))}),B=mxUtils.bind(this,function(b){b=mxUtils.parseXml(b.data).documentElement;b=new DiagramPage(b);this.updatePageRoot(b);var c=m[b.getId()];null==c?x(b):(c.root=b.root,this.currentPage==c?this.editor.graph.model.setRoot(c.root):d&&(c.needsUpdate=!0))});x();for(q in p)x(m[p[q]]),
+delete p[q];for(q in f)B(f[q]),delete f[q];return n};EditorUi.prototype.patchViewState=function(b,e){if(null!=b.viewState&&null!=e){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var d in e)try{b.viewState[d]=JSON.parse(e[d])}catch(c){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};
EditorUi.prototype.createParentLookup=function(b,e){function d(b){var d=c[b];null==d&&(d={inserted:[],moved:{}},c[b]=d);return d}var c={};if(null!=e[EditorUi.DIFF_INSERT])for(var g=0;g<e[EditorUi.DIFF_INSERT].length;g++){var k=e[EditorUi.DIFF_INSERT][g],n=null!=k.parent?k.parent:"",f=null!=k.previous?k.previous:"";d(n).inserted[f]=k}if(null!=e[EditorUi.DIFF_UPDATE])for(var l in e[EditorUi.DIFF_UPDATE])k=e[EditorUi.DIFF_UPDATE][l],null!=k.previous&&(n=k.parent,null==n&&(g=b.getCell(l),null!=g&&(g=
b.getParent(g),null!=g&&(n=g.getId()))),null!=n&&(d(n).moved[k.previous]=l));return c};
EditorUi.prototype.patchPage=function(b,e,d,c){var g=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),k=this.createParentLookup(g,e);g.beginUpdate();try{var n=g.updateEdgeParent,f=new mxDictionary,l=[];g.updateEdgeParent=function(b,d){!f.get(b)&&c&&(f.put(b,!0),l.push(b))};var m=k[""],p=null!=m&&null!=m.inserted?m.inserted[""]:null,q=null;null!=p&&(q=this.getCellForJson(p));if(null==q){var t=null!=m&&null!=m.moved?m.moved[""]:null;null!=t&&(q=g.getCell(t))}null!=q&&(g.setRoot(q),
@@ -10983,7 +11005,7 @@ DrawioFileSync.prototype.p2pCatchup=function(b,e,d,c,g,k,n,f){if(null!=g&&(null=
else{failed=!0;d=[];break}}}catch(m){d=[],null!=window.console&&"1"==urlParams.test&&console.log(m)}try{0<d.length?(this.file.stats.cacheHits++,this.merge(d,e,g,k,n,f)):(this.file.stats.cacheFail++,this.reload(k,n,f))}catch(m){null!=n&&n(m)}}}else null!=n&&n()};
DrawioFileSync.prototype.catchup=function(b,e,d,c){if(null!=b&&(null==c||!c())){var g=this.file.getDescriptorRevisionId(b),k=this.file.getCurrentRevisionId();if(k==g)this.file.patchDescriptor(this.file.getDescriptor(),b),null!=e&&e();else if(this.isValidState()){var n=this.file.getDescriptorSecret(b);if(null==n||"1"==urlParams.lockdown)this.reload(e,d,c);else{var f=0,l=!1,m=mxUtils.bind(this,function(){if(null==c||!c())if(k!=this.file.getCurrentRevisionId())null!=e&&e();else if(this.isValidState()){var p=
!0,q=window.setTimeout(mxUtils.bind(this,function(){p=!1;this.reload(e,d,c)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(k)+"&to="+encodeURIComponent(g)+(null!=n?"&secret="+encodeURIComponent(n):""),mxUtils.bind(this,function(g){this.file.stats.bytesReceived+=g.getText().length;window.clearTimeout(q);if(p&&(null==c||!c()))if(k!=this.file.getCurrentRevisionId())null!=e&&e();else if(this.isValidState()){var n=null,t=[];if(200<=
-g.getStatus()&&299>=g.getStatus()&&0<g.getText().length)try{var x=JSON.parse(g.getText());if(null!=x&&0<x.length)for(var A=0;A<x.length;A++){var z=this.stringToObject(x[A]);if(z.v>DrawioFileSync.PROTOCOL){l=!0;t=[];break}else if(z.v===DrawioFileSync.PROTOCOL&&null!=z.d)n=z.d.checksum,t.push(z.d.patch);else{l=!0;t=[];break}}}catch(y){t=[],null!=window.console&&"1"==urlParams.test&&console.log(y)}try{0<t.length?(this.file.stats.cacheHits++,this.merge(t,n,b,e,d,c)):f<=this.maxCacheReadyRetries-1&&!l&&
+g.getStatus()&&299>=g.getStatus()&&0<g.getText().length)try{var x=JSON.parse(g.getText());if(null!=x&&0<x.length)for(var B=0;B<x.length;B++){var A=this.stringToObject(x[B]);if(A.v>DrawioFileSync.PROTOCOL){l=!0;t=[];break}else if(A.v===DrawioFileSync.PROTOCOL&&null!=A.d)n=A.d.checksum,t.push(A.d.patch);else{l=!0;t=[];break}}}catch(y){t=[],null!=window.console&&"1"==urlParams.test&&console.log(y)}try{0<t.length?(this.file.stats.cacheHits++,this.merge(t,n,b,e,d,c)):f<=this.maxCacheReadyRetries-1&&!l&&
401!=g.getStatus()&&503!=g.getStatus()?(f++,this.file.stats.cacheMiss++,window.setTimeout(m,(f+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(e,d,c))}catch(y){null!=d&&d(y)}}else null!=d&&d()}))}else null!=d&&d()});window.setTimeout(m,this.cacheReadyDelay)}}else null!=d&&d()}};
DrawioFileSync.prototype.reload=function(b,e,d,c){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(b){null!=e&&e(b)}),d,c)};
DrawioFileSync.prototype.merge=function(b,e,d,c,g,k){try{this.file.stats.merged++;this.lastModified=new Date;this.file.shadowPages=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);this.file.backupPatch=this.file.isModified()?this.ui.diffPages(this.file.shadowPages,this.ui.pages):null;var n=this.file.ignorePatches(b),f=this.file.getDescriptorRevisionId(d);if(!n){for(k=0;k<b.length;k++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages,
@@ -11065,9 +11087,9 @@ function(){return this.user};DriveClient.prototype.getUsersList=function(){var b
this.setUser(null);b=null};DriveClient.prototype.execute=function(b){var c=mxUtils.bind(this,function(c){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(c,d){this.authorize(!1,mxUtils.bind(this,function(){null!=d&&d();b()}),mxUtils.bind(this,function(b){var c=mxResources.get("cannotLogin");null!=b&&null!=b.error&&403==b.error.code&&null!=b.error.data&&0<b.error.data.length&&"domainPolicy"==b.error.data[0].reason&&(c=b.error.message);this.logout();this.ui.showError(mxResources.get("error"),
c,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.diagrams.net/doc/faq/gsuite-authorisation-troubleshoot")}),null,mxResources.get("ok"))}),c)}))});this.authorize(!0,b,c)};DriveClient.prototype.executeRequest=function(d,c,e){try{var g=!0,n=null,f=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var l=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=d;null!=n&&window.clearTimeout(n);n=window.setTimeout(mxUtils.bind(this,
function(){g=!1;null!=e&&e({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:l})}),this.ui.timeout);var k=null,p=!1;"string"===typeof d.params?k=d.params:null!=d.params&&(k=JSON.stringify(d.params),p=!0);var q=d.fullUrl||this.GDriveBaseUrl+d.url;p&&(q+=(0<q.indexOf("?")?"&":"?")+"alt=json");var t=new mxXmlRequest(q,k,d.method||"GET");t.setRequestHeaders=mxUtils.bind(this,function(c,e){if(null!=d.headers)for(var f in d.headers)c.setRequestHeader(f,d.headers[f]);else null!=d.contentType?
-c.setRequestHeader("Content-Type",d.contentType):p&&c.setRequestHeader("Content-Type","application/json");c.setRequestHeader("Authorization","Bearer "+b)});t.send(mxUtils.bind(this,function(b){try{if(window.clearTimeout(n),g){var k;try{k=JSON.parse(b.getText())}catch(z){k=null}if(200<=b.getStatus()&&299>=b.getStatus())null!=c&&c(k);else{var m=null!=k&&null!=k.error?null!=k.error.data?k.error.data:k.error.errors:null,p=null!=m&&0<m.length?m[0].reason:null;null==e||null==k||null==k.error||-1!=k.error.code&&
+c.setRequestHeader("Content-Type",d.contentType):p&&c.setRequestHeader("Content-Type","application/json");c.setRequestHeader("Authorization","Bearer "+b)});t.send(mxUtils.bind(this,function(b){try{if(window.clearTimeout(n),g){var k;try{k=JSON.parse(b.getText())}catch(A){k=null}if(200<=b.getStatus()&&299>=b.getStatus())null!=c&&c(k);else{var m=null!=k&&null!=k.error?null!=k.error.data?k.error.data:k.error.errors:null,p=null!=m&&0<m.length?m[0].reason:null;null==e||null==k||null==k.error||-1!=k.error.code&&
(403!=k.error.code||"domainPolicy"!=p&&"The requested mime type change is forbidden."!=k.error.message)?null!=k&&null!=k.error&&(401==k.error.code||403==k.error.code&&"rateLimitExceeded"!=p)?403==k.error.code&&this.retryAuth||401==k.error.code&&this.retryAuth&&"authError"==p?(null!=e&&e(k),this.retryAuth=!1):(this.retryAuth=!0,this.execute(l)):null!=k&&null!=k.error&&412!=k.error.code&&404!=k.error.code&&400!=k.error.code&&this.currentRequest==d&&f<this.maxRetries?(f++,this.requestThread=window.setTimeout(l,
-Math.round(Math.pow(2,f)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=e&&e(k):e(k)}}}catch(z){if(null!=e)e(z);else throw z;}}))}catch(u){if(null!=e)e(u);else throw u;}});null!=b&&this.authCalled?l():this.execute(l)}catch(m){if(null!=e)e(m);else throw m;}};DriveClient.prototype.createAuthWin=function(b){return window.open(b?b:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())};
+Math.round(Math.pow(2,f)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=e&&e(k):e(k)}}}catch(A){if(null!=e)e(A);else throw A;}}))}catch(u){if(null!=e)e(u);else throw u;}});null!=b&&this.authCalled?l():this.execute(l)}catch(m){if(null!=e)e(m);else throw m;}};DriveClient.prototype.createAuthWin=function(b){return window.open(b?b:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())};
DriveClient.prototype.authorize=function(b,c,e,k,n){this.isExtAuth&&!b?window.parent.driveAuth(mxUtils.bind(this,function(b){this.updateAuthInfo(b,!0,!0,c,e)}),e):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(d){200<=d.getStatus()&&299>=d.getStatus()?this.authorizeStep2(d.getText(),b,c,e,k,n):null!=e&&e(d)}),e)};DriveClient.prototype.updateAuthInfo=function(d,c,e,k,n){b=d.access_token;delete d.access_token;d.expires=Date.now()+1E3*parseInt(d.expires_in);
d.remember=c;this.resetTokenRefresh(d);this.authCalled=!0;if(e||null==this.user){var f=JSON.stringify(d);this.updateUser(mxUtils.bind(this,function(){var b=JSON.parse(f);this.setPersistentToken(b,!c);null!=k&&k()}),n)}else null!=k&&(this.setPersistentToken(d,!c),k())};DriveClient.prototype.authorizeStep2=function(b,c,e,k,n,f){try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(this.userId=this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));if(null==this.userId){var d=
JSON.parse(this.getPersistentToken(!0));d&&null!=d.current&&(this.userId=d.current.userId)}if(c&&null==this.userId)null!=k&&k();else if(c)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+b)+"&userId="+this.userId,null,"GET")).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?(b=JSON.parse(b.getText()),this.updateAuthInfo(b,!0,!1,e,k)):(0!=b.getStatus()&&this.logout(),null!=k&&k(b))}),k);else{var g=
@@ -11082,23 +11104,23 @@ c,e,!0,!0)};DriveClient.prototype.loadDescriptor=function(b,c,e,k){this.executeR
c,e)}),e):this.loadDescriptor(d,mxUtils.bind(this,function(d){try{if(null!=this.user){var f=/\.png$/i.test(d.title);/\.v(dx|sdx?)$/i.test(d.title)||/\.gliffy$/i.test(d.title)||!this.ui.useCanvasForExport&&f?this.ui.convertFile(d.downloadUrl,d.title,d.mimeType,this.extension,c,e,null,{Authorization:"Bearer "+b}):k||n||d.mimeType==this.libraryMimeType||d.mimeType==this.xmlMimeType?this.getXmlFile(d,c,e,!0,n):this.getXmlFile(d,c,e)}else e({message:mxResources.get("loggedOut")})}catch(m){if(null!=e)e(m);
else throw m;}}),e)};DriveClient.prototype.isGoogleRealtimeMimeType=function(b){return null!=b&&"application/vnd.jgraph.mxfile."==b.substring(0,30)};DriveClient.prototype.getXmlFile=function(d,c,e,k,n){try{var f={Authorization:"Bearer "+b},g=d.downloadUrl;if(null==g)null!=e&&e({message:mxResources.get("exportOptionsDisabledDetails")});else{var m=0,p=mxUtils.bind(this,function(){this.ui.editor.loadUrl(g,mxUtils.bind(this,function(b){try{if(null==b)e({message:mxResources.get("invalidOrMissingFile")});
else if(d.mimeType==this.libraryMimeType||n)d.mimeType!=this.libraryMimeType||n?c(new DriveLibrary(this.ui,b,d)):e({message:mxResources.get("notADiagramFile")});else{var f=!1;if(/\.png$/i.test(d.title)){var k=b.lastIndexOf(",");if(0<k){var l=this.ui.extractGraphModelFromPng(b);if(null!=l&&0<l.length)b=l;else try{var l=b.substring(k+1),m=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(l):atob(l),p=this.ui.editor.extractGraphModel(mxUtils.parseXml(m).documentElement,!0);null==p||0<p.getElementsByTagName("parsererror").length?
-f=!0:b=m}catch(z){f=!0}}}else/\.pdf$/i.test(d.title)?(l=Editor.extractGraphModelFromPdf(b),null!=l&&0<l.length&&(f=!0,b=l)):"data:image/png;base64,PG14ZmlsZS"==b.substring(0,32)&&(m=b.substring(22),b=window.atob&&!mxClient.IS_SF?atob(m):Base64.decode(m));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(b,g)?this.ui.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){try{4==b.readyState&&(200<=b.status&&299>=b.status?c(new LocalFile(this.ui,
-b.responseText,d.title+this.extension,!0)):null!=e&&e({message:mxResources.get("errorLoadingFile")}))}catch(y){if(null!=e)e(y);else throw y;}}),d.title):c(f?new LocalFile(this.ui,b,d.title,!0):new DriveFile(this.ui,b,d))}}catch(z){if(null!=e)e(z);else throw z;}}),mxUtils.bind(this,function(b,c){if(m<this.maxRetries&&null!=c&&403==c.getStatus())m++,window.setTimeout(p,2*m*this.coolOff*(1+.1*(Math.random()-.5)));else if(null!=e)e(b);else throw b;}),null!=d.mimeType&&"image/"==d.mimeType.substring(0,
+f=!0:b=m}catch(A){f=!0}}}else/\.pdf$/i.test(d.title)?(l=Editor.extractGraphModelFromPdf(b),null!=l&&0<l.length&&(f=!0,b=l)):"data:image/png;base64,PG14ZmlsZS"==b.substring(0,32)&&(m=b.substring(22),b=window.atob&&!mxClient.IS_SF?atob(m):Base64.decode(m));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(b,g)?this.ui.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){try{4==b.readyState&&(200<=b.status&&299>=b.status?c(new LocalFile(this.ui,
+b.responseText,d.title+this.extension,!0)):null!=e&&e({message:mxResources.get("errorLoadingFile")}))}catch(y){if(null!=e)e(y);else throw y;}}),d.title):c(f?new LocalFile(this.ui,b,d.title,!0):new DriveFile(this.ui,b,d))}}catch(A){if(null!=e)e(A);else throw A;}}),mxUtils.bind(this,function(b,c){if(m<this.maxRetries&&null!=c&&403==c.getStatus())m++,window.setTimeout(p,2*m*this.coolOff*(1+.1*(Math.random()-.5)));else if(null!=e)e(b);else throw b;}),null!=d.mimeType&&"image/"==d.mimeType.substring(0,
6)&&"image/svg"!=d.mimeType.substring(0,9)||/\.png$/i.test(d.title)||/\.jpe?g$/i.test(d.title)||/\.pdf$/i.test(d.title),null,null,null,f)});p()}}catch(q){if(null!=e)e(q);else throw q;}};DriveClient.prototype.saveFile=function(b,c,e,k,n,f,l,m,p){try{var d=0;b.saveLevel=1;var g=mxUtils.bind(this,function(c){if(null!=k)k(c);else throw c;try{if(!b.isConflict(c)){var d="sl_"+b.saveLevel+"-error_"+(b.getErrorMessage(c)||"unknown");null!=c&&null!=c.error&&null!=c.error.code&&(d+="-code_"+c.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+
-b.getHash()+"-rev_"+b.desc.headRevisionId+"-mod_"+b.desc.modifiedDate+"-size_"+b.getSize()+"-mime_"+b.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(b.isAutosave()?"":"-noauto")+(b.changeListenerEnabled?"":"-nolisten")+(b.inConflictState?"-conflict":"")+(b.invalidChecksum?"-invalid":""),action:d,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=b.sync?"-client_"+b.sync.clientId:"-nosync")})}}catch(H){}}),u=mxUtils.bind(this,function(b){g(b);try{EditorUi.logError(b.message,null,null,
-b)}catch(D){}});if(b.isEditable()&&null!=b.desc){var v=(new Date).getTime(),x=b.desc.etag,A=b.desc.modifiedDate,z=b.desc.headRevisionId,y=this.ui.useCanvasForExport&&/(\.png)$/i.test(b.getTitle());f=null!=f?f:!1;var B=null,C=!1,E={mimeType:b.desc.mimeType,title:b.getTitle()};if(this.isGoogleRealtimeMimeType(E.mimeType))E.mimeType=this.xmlMimeType,B=b.desc,C=c=!0;else if("application/octet-stream"==E.mimeType||"1"==urlParams["override-mime"]&&E.mimeType!=this.xmlMimeType)E.mimeType=this.xmlMimeType;
-var F=mxUtils.bind(this,function(k,n,q){try{b.saveLevel=3;b.constructor==DriveFile&&(null==m&&(m=[]),null==b.getChannelId()&&m.push({key:"channel",value:Editor.guid(32)}),null==b.getChannelKey()&&m.push({key:"key",value:Editor.guid(32)}),m.push({key:"secret",value:null!=p?p:Editor.guid(32)}));q||(null!=k||f||(k=this.placeholderThumbnail,n=this.placeholderMimeType),null!=k&&null!=n&&(E.thumbnail={image:k,mimeType:n}));var t=b.getData(),D=mxUtils.bind(this,function(d){try{if(b.saveDelay=(new Date).getTime()-
-v,b.saveLevel=11,null==d)g({message:mxResources.get("errorSavingFile")+": Empty response"});else{var f=(new Date(d.modifiedDate)).getTime()-(new Date(A)).getTime();if(0>=f||x==d.etag||c&&z==d.headRevisionId){b.saveLevel=12;var k=[];0>=f&&k.push("invalid modified time");x==d.etag&&k.push("stale etag");c&&z==d.headRevisionId&&k.push("stale revision");var l=k.join(", ");g({message:mxResources.get("errorSavingFile")+": "+l},d);try{EditorUi.logError("Critical: Error saving to Google Drive "+b.desc.id,
-null,"from-"+z+"."+A+"-"+this.ui.hashValue(x)+"-to-"+d.headRevisionId+"."+d.modifiedDate+"-"+this.ui.hashValue(d.etag)+(0<l.length?"-errors-"+l:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=b.sync?"-client_"+b.sync.clientId:"-nosync"))}catch(T){}}else if(b.saveLevel=null,e(d,t),null!=B){this.executeRequest({url:"/files/"+B.id+"/revisions/"+B.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(b){b.pinned=!0;this.executeRequest({url:"/files/"+B.id+"/revisions/"+
-B.headRevisionId,method:"PUT",params:b})})));try{EditorUi.logEvent({category:b.convertedFrom+"-CONVERT-FILE-"+b.getHash(),action:"from_"+B.id+"."+B.headRevisionId+"-to_"+b.desc.id+"."+b.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=b.sync?"-client_"+b.sync.clientId:"nosync")})}catch(T){}}}}catch(T){u(T)}}),L=mxUtils.bind(this,function(e,f){b.saveLevel=4;try{null!=m&&(E.properties=m);var n=l||b.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?
-null:b.getCurrentEtag(),p=mxUtils.bind(this,function(k){b.saveLevel=5;try{var l=b.desc.mimeType!=this.xmlMimeType&&b.desc.mimeType!=this.mimeType&&b.desc.mimeType!=this.libraryMimeType,m=!0,p=null;try{p=window.setTimeout(mxUtils.bind(this,function(){m=!1;g({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(aa){}this.executeRequest(this.createUploadRequest(b.getId(),E,e,c||k||l,f,k?null:n,C),mxUtils.bind(this,function(b){window.clearTimeout(p);m&&D(b)}),mxUtils.bind(this,function(c){window.clearTimeout(p);
+b.getHash()+"-rev_"+b.desc.headRevisionId+"-mod_"+b.desc.modifiedDate+"-size_"+b.getSize()+"-mime_"+b.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(b.isAutosave()?"":"-noauto")+(b.changeListenerEnabled?"":"-nolisten")+(b.inConflictState?"-conflict":"")+(b.invalidChecksum?"-invalid":""),action:d,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=b.sync?"-client_"+b.sync.clientId:"-nosync")})}}catch(I){}}),u=mxUtils.bind(this,function(b){g(b);try{EditorUi.logError(b.message,null,null,
+b)}catch(D){}});if(b.isEditable()&&null!=b.desc){var v=(new Date).getTime(),x=b.desc.etag,B=b.desc.modifiedDate,A=b.desc.headRevisionId,y=this.ui.useCanvasForExport&&/(\.png)$/i.test(b.getTitle());f=null!=f?f:!1;var z=null,C=!1,F={mimeType:b.desc.mimeType,title:b.getTitle()};if(this.isGoogleRealtimeMimeType(F.mimeType))F.mimeType=this.xmlMimeType,z=b.desc,C=c=!0;else if("application/octet-stream"==F.mimeType||"1"==urlParams["override-mime"]&&F.mimeType!=this.xmlMimeType)F.mimeType=this.xmlMimeType;
+var E=mxUtils.bind(this,function(k,n,q){try{b.saveLevel=3;b.constructor==DriveFile&&(null==m&&(m=[]),null==b.getChannelId()&&m.push({key:"channel",value:Editor.guid(32)}),null==b.getChannelKey()&&m.push({key:"key",value:Editor.guid(32)}),m.push({key:"secret",value:null!=p?p:Editor.guid(32)}));q||(null!=k||f||(k=this.placeholderThumbnail,n=this.placeholderMimeType),null!=k&&null!=n&&(F.thumbnail={image:k,mimeType:n}));var t=b.getData(),D=mxUtils.bind(this,function(d){try{if(b.saveDelay=(new Date).getTime()-
+v,b.saveLevel=11,null==d)g({message:mxResources.get("errorSavingFile")+": Empty response"});else{var f=(new Date(d.modifiedDate)).getTime()-(new Date(B)).getTime();if(0>=f||x==d.etag||c&&A==d.headRevisionId){b.saveLevel=12;var k=[];0>=f&&k.push("invalid modified time");x==d.etag&&k.push("stale etag");c&&A==d.headRevisionId&&k.push("stale revision");var l=k.join(", ");g({message:mxResources.get("errorSavingFile")+": "+l},d);try{EditorUi.logError("Critical: Error saving to Google Drive "+b.desc.id,
+null,"from-"+A+"."+B+"-"+this.ui.hashValue(x)+"-to-"+d.headRevisionId+"."+d.modifiedDate+"-"+this.ui.hashValue(d.etag)+(0<l.length?"-errors-"+l:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=b.sync?"-client_"+b.sync.clientId:"-nosync"))}catch(R){}}else if(b.saveLevel=null,e(d,t),null!=z){this.executeRequest({url:"/files/"+z.id+"/revisions/"+z.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(b){b.pinned=!0;this.executeRequest({url:"/files/"+z.id+"/revisions/"+
+z.headRevisionId,method:"PUT",params:b})})));try{EditorUi.logEvent({category:b.convertedFrom+"-CONVERT-FILE-"+b.getHash(),action:"from_"+z.id+"."+z.headRevisionId+"-to_"+b.desc.id+"."+b.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=b.sync?"-client_"+b.sync.clientId:"nosync")})}catch(R){}}}}catch(R){u(R)}}),L=mxUtils.bind(this,function(e,f){b.saveLevel=4;try{null!=m&&(F.properties=m);var n=l||b.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?
+null:b.getCurrentEtag(),p=mxUtils.bind(this,function(k){b.saveLevel=5;try{var l=b.desc.mimeType!=this.xmlMimeType&&b.desc.mimeType!=this.mimeType&&b.desc.mimeType!=this.libraryMimeType,m=!0,p=null;try{p=window.setTimeout(mxUtils.bind(this,function(){m=!1;g({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(ba){}this.executeRequest(this.createUploadRequest(b.getId(),F,e,c||k||l,f,k?null:n,C),mxUtils.bind(this,function(b){window.clearTimeout(p);m&&D(b)}),mxUtils.bind(this,function(c){window.clearTimeout(p);
if(m){b.saveLevel=6;try{b.isConflict(c)?this.executeRequest({url:"/files/"+b.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(e){b.saveLevel=7;try{if(null!=e&&e.etag==n)if(d<this.staleEtagMaxRetries){d++;var f=2*d*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(q,f);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",d,"delay",f)}else{q(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+b.getHash(),action:"rev_"+
-b.desc.headRevisionId+"-mod_"+b.desc.modifiedDate+"-size_"+b.getSize()+"-mime_"+b.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(b.isAutosave()?"":"-noauto")+(b.changeListenerEnabled?"":"-nolisten")+(b.inConflictState?"-conflict":"")+(b.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=b.sync?"-client_"+b.sync.clientId:"-nosync")})}catch(da){}}else"1"==urlParams.test&&e.headRevisionId==z&&EditorUi.debug("DriveClient: Remote Etag Changed","local",n,
-"remote",e.etag,"rev",b.desc.headRevisionId,"response",[e],"file",[b]),g(c,e)}catch(da){u(da)}}),mxUtils.bind(this,function(){g(c)})):g(c)}catch(Z){u(Z)}}}))}catch(aa){u(aa)}}),q=mxUtils.bind(this,function(c){b.saveLevel=9;if(c||null==n)p(c);else{var d=!0,e=null;try{e=window.setTimeout(mxUtils.bind(this,function(){d=!1;g({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(ba){}this.executeRequest({url:"/files/"+b.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(f){window.clearTimeout(e);
-if(d){b.saveLevel=10;try{null!=f&&f.headRevisionId==z?("1"==urlParams.test&&n!=f.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",n,"to",f.etag,"rev",b.desc.headRevisionId,"response",[f],"file",[b]),n=f.etag,p(c)):g({error:{code:412}},f)}catch(aa){u(aa)}}}),mxUtils.bind(this,function(c){window.clearTimeout(e);d&&(b.saveLevel=11,g(c))}))}});if(y&&null==k){b.saveLevel=8;var t=new Image;t.onload=mxUtils.bind(this,function(){try{var b=this.thumbnailWidth/t.width,c=document.createElement("canvas");
-c.width=this.thumbnailWidth;c.height=Math.floor(t.height*b);c.getContext("2d").drawImage(t,0,0,c.width,c.height);var d=c.toDataURL(),d=d.substring(d.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");E.thumbnail={image:d,mimeType:"image/png"};q(!1)}catch(ba){try{q(!1)}catch(aa){u(aa)}}});t.src="data:image/png;base64,"+e}else q(!1)}catch(Y){u(Y)}});if(y){var F=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){L(b,!0)}),g,this.ui.getCurrentFile()!=
-b?t:null,F.scale,F.border)}else L(t,!1)}catch(O){u(O)}});try{b.saveLevel=2,(f||y||b.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=E.mimeType&&"application/vnd.jgraph.mxfile"!=E.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(b){try{var c=null;try{null!=b&&(c=b.toDataURL("image/png")),null!=c&&(c=c.length>this.maxThumbnailSize?null:c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(H){c=null}F(c,
-"image/png")}catch(H){u(H)}})))&&F(null,null,b.constructor!=DriveLibrary)}catch(I){u(I)}}else this.ui.editor.graph.reset(),g({message:mxResources.get("readOnly")})}catch(I){u(I)}};DriveClient.prototype.insertFile=function(b,c,e,k,n,f,l){f=null!=f?f:this.xmlMimeType;b={mimeType:f,title:b};null!=e&&(b.parents=[{kind:"drive#fileLink",id:e}]);this.executeRequest(this.createUploadRequest(null,b,c,!1,l),mxUtils.bind(this,function(b){f==this.libraryMimeType?k(new DriveLibrary(this.ui,c,b)):0==b?null!=n&&
+b.desc.headRevisionId+"-mod_"+b.desc.modifiedDate+"-size_"+b.getSize()+"-mime_"+b.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(b.isAutosave()?"":"-noauto")+(b.changeListenerEnabled?"":"-nolisten")+(b.inConflictState?"-conflict":"")+(b.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=b.sync?"-client_"+b.sync.clientId:"-nosync")})}catch(da){}}else"1"==urlParams.test&&e.headRevisionId==A&&EditorUi.debug("DriveClient: Remote Etag Changed","local",n,
+"remote",e.etag,"rev",b.desc.headRevisionId,"response",[e],"file",[b]),g(c,e)}catch(da){u(da)}}),mxUtils.bind(this,function(){g(c)})):g(c)}catch(Z){u(Z)}}}))}catch(ba){u(ba)}}),q=mxUtils.bind(this,function(c){b.saveLevel=9;if(c||null==n)p(c);else{var d=!0,e=null;try{e=window.setTimeout(mxUtils.bind(this,function(){d=!1;g({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(aa){}this.executeRequest({url:"/files/"+b.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(f){window.clearTimeout(e);
+if(d){b.saveLevel=10;try{null!=f&&f.headRevisionId==A?("1"==urlParams.test&&n!=f.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",n,"to",f.etag,"rev",b.desc.headRevisionId,"response",[f],"file",[b]),n=f.etag,p(c)):g({error:{code:412}},f)}catch(ba){u(ba)}}}),mxUtils.bind(this,function(c){window.clearTimeout(e);d&&(b.saveLevel=11,g(c))}))}});if(y&&null==k){b.saveLevel=8;var z=new Image;z.onload=mxUtils.bind(this,function(){try{var b=this.thumbnailWidth/z.width,c=document.createElement("canvas");
+c.width=this.thumbnailWidth;c.height=Math.floor(z.height*b);c.getContext("2d").drawImage(z,0,0,c.width,c.height);var d=c.toDataURL(),d=d.substring(d.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");F.thumbnail={image:d,mimeType:"image/png"};q(!1)}catch(aa){try{q(!1)}catch(ba){u(ba)}}});z.src="data:image/png;base64,"+e}else q(!1)}catch(X){u(X)}});if(y){var E=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){L(b,!0)}),g,this.ui.getCurrentFile()!=
+b?t:null,E.scale,E.border)}else L(t,!1)}catch(P){u(P)}});try{b.saveLevel=2,(f||y||b.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=F.mimeType&&"application/vnd.jgraph.mxfile"!=F.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(b){try{var c=null;try{null!=b&&(c=b.toDataURL("image/png")),null!=c&&(c=c.length>this.maxThumbnailSize?null:c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(I){c=null}E(c,
+"image/png")}catch(I){u(I)}})))&&E(null,null,b.constructor!=DriveLibrary)}catch(H){u(H)}}else this.ui.editor.graph.reset(),g({message:mxResources.get("readOnly")})}catch(H){u(H)}};DriveClient.prototype.insertFile=function(b,c,e,k,n,f,l){f=null!=f?f:this.xmlMimeType;b={mimeType:f,title:b};null!=e&&(b.parents=[{kind:"drive#fileLink",id:e}]);this.executeRequest(this.createUploadRequest(null,b,c,!1,l),mxUtils.bind(this,function(b){f==this.libraryMimeType?k(new DriveLibrary(this.ui,c,b)):0==b?null!=n&&
n({message:mxResources.get("errorSavingFile")}):k(new DriveFile(this.ui,c,b))}),n)};DriveClient.prototype.createUploadRequest=function(b,c,e,k,n,f,l){n=null!=n?n:!1;var d={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=f&&(d["If-Match"]=f);b={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=b?"/"+b:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=b?"PUT":"POST",headers:d,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+
JSON.stringify(c)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!=e?n?e:!window.btoa||mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(e):Graph.base64EncodeUnicode(e):"")+"\r\n---------314159265358979323846--"};k||(b.fullUrl+="&newRevision=false");l&&(b.fullUrl+="&pinned=true");return b};DriveClient.prototype.createLinkPicker=function(){var d=e.linkPicker;if(null==d||e.linkPickerToken!=b){e.linkPickerToken=b;var d=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),
c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),g=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0),d=(new google.picker.PickerBuilder).setAppId(this.appId).setLocale(mxLanguage).setOAuthToken(e.linkPickerToken).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(d).addView(c).addView(g).addView(google.picker.ViewId.RECENTLY_PICKED)}return d};DriveClient.prototype.pickFile=function(d,c,g){this.filePickerCallback=
@@ -11159,10 +11181,10 @@ OneDriveFile.prototype.saveFile=function(b,e,d,c,g,k){if(!this.isEditable())null
this.savingFile=!1;this.meta=b;this.fileSaved(f,e,mxUtils.bind(this,function(){this.contentChanged();null!=d&&d()}),c)}),mxUtils.bind(this,function(b,d){try{this.savingFile=!1,this.isConflict(d)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();n()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&
c(b)}catch(q){if(this.savingFile=!1,null!=c)c(q);else throw q;}}),b)}catch(m){if(this.savingFile=!1,null!=c)c(m);else throw m;}});n()}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.oneDrive.insertFile(b,this.getData(),mxUtils.bind(this,function(b){this.setModified(this.getShadowModified());this.savingFile=!1;null!=d&&d();this.ui.fileLoaded(b)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))};
OneDriveFile.prototype.rename=function(b,e,d){var c=this.getCurrentEtag();this.ui.oneDrive.renameFile(this,b,mxUtils.bind(this,function(g){this.hasSameExtension(b,this.getTitle())?(this.meta=g,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=e&&e(g)):(this.meta=g,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,e,d))}),d)};
-OneDriveFile.prototype.move=function(b,e,d){this.ui.oneDrive.moveFile(this.getId(),b,mxUtils.bind(this,function(b){this.meta=b;this.descriptorChanged();null!=e&&e(b)}),d)};OneDriveLibrary=function(b,e,d){OneDriveFile.call(this,b,e,d)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.save=function(b,e,d){this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(b){this.desc=b;null!=e&&e(b)}),d)};OneDriveLibrary.prototype.open=function(){};(function(){var b=null;window.OneDriveClient=function(b,d,c,g){null==d&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(d=!0);null==c&&(null!=window.urlParams&&"1"==window.urlParams.inlinePicker||mxClient.IS_ANDROID||mxClient.IS_IOS)&&(c=!0);null==g&&null!=window.urlParams&&"1"==window.urlParams.noLogoutOD&&(g=!0);DrawioClient.call(this,b,d?"oneDriveExtAuthInfo":"oneDriveAuthInfo");this.isExtAuth=d;this.inlinePicker=c;this.noLogout=g;b=JSON.parse(this.token);null!=b&&(this.endpointHint=null!=
-b.endpointHint?b.endpointHint.replace("/Documents","/_layouts/15/onedrive.aspx"):b.endpointHint)};mxUtils.extend(OneDriveClient,DrawioClient);OneDriveClient.prototype.clientId=window.DRAWIO_MSGRAPH_CLIENT_ID||("test.draw.io"==window.location.hostname?"2e598409-107f-4b59-89ca-d7723c8e00a4":"45c10911-200f-4e27-a666-9e9fca147395");OneDriveClient.prototype.clientId="app.diagrams.net"==window.location.hostname?"b5ff67d6-3155-4fca-965a-59a3655c4476":OneDriveClient.prototype.clientId;OneDriveClient.prototype.clientId=
-"viewer.diagrams.net"==window.location.hostname?"417a451a-a343-4788-b6c1-901e63182565":OneDriveClient.prototype.clientId;OneDriveClient.prototype.scopes="user.read files.readwrite.all sites.read.all";OneDriveClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/microsoft";OneDriveClient.prototype.pickerRedirectUri=window.location.protocol+"//"+window.location.host+"/onedrive3.html";OneDriveClient.prototype.defEndpointHint="api.onedrive.com";OneDriveClient.prototype.endpointHint=
-OneDriveClient.prototype.defEndpointHint;OneDriveClient.prototype.extension=".drawio";OneDriveClient.prototype.baseUrl="https://graph.microsoft.com/v1.0";OneDriveClient.prototype.emptyFn=function(){};OneDriveClient.prototype.invalidFilenameRegExs=[/[~"#%\*:<>\?\/\\{\|}]/,/^\.lock$/i,/^CON$/i,/^PRN$/i,/^AUX$/i,/^NUL$/i,/^COM\d$/i,/^LPT\d$/i,/^desktop\.ini$/i,/_vti_/i];OneDriveClient.prototype.isValidFilename=function(b){if(null==b||""===b)return!1;for(var d=0;d<this.invalidFilenameRegExs.length;d++)if(this.invalidFilenameRegExs[d].test(b))return!1;
+OneDriveFile.prototype.move=function(b,e,d){this.ui.oneDrive.moveFile(this.getId(),b,mxUtils.bind(this,function(b){this.meta=b;this.descriptorChanged();null!=e&&e(b)}),d)};OneDriveLibrary=function(b,e,d){OneDriveFile.call(this,b,e,d)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.save=function(b,e,d){this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(b){this.desc=b;null!=e&&e(b)}),d)};OneDriveLibrary.prototype.open=function(){};(function(){var b=null;window.OneDriveClient=function(b,d,c,g){null==d&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(d=!0);null==c&&(c=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0);null==g&&null!=window.urlParams&&"1"==window.urlParams.noLogoutOD&&(g=!0);DrawioClient.call(this,b,d?"oneDriveExtAuthInfo":"oneDriveAuthInfo");this.isExtAuth=d;this.inlinePicker=c;this.noLogout=g;b=JSON.parse(this.token);null!=b&&(this.endpointHint=null!=b.endpointHint?b.endpointHint.replace("/Documents",
+"/_layouts/15/onedrive.aspx"):b.endpointHint)};mxUtils.extend(OneDriveClient,DrawioClient);OneDriveClient.prototype.clientId=window.DRAWIO_MSGRAPH_CLIENT_ID||("test.draw.io"==window.location.hostname?"2e598409-107f-4b59-89ca-d7723c8e00a4":"45c10911-200f-4e27-a666-9e9fca147395");OneDriveClient.prototype.clientId="app.diagrams.net"==window.location.hostname?"b5ff67d6-3155-4fca-965a-59a3655c4476":OneDriveClient.prototype.clientId;OneDriveClient.prototype.clientId="viewer.diagrams.net"==window.location.hostname?
+"417a451a-a343-4788-b6c1-901e63182565":OneDriveClient.prototype.clientId;OneDriveClient.prototype.scopes="user.read files.readwrite.all sites.read.all";OneDriveClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/microsoft";OneDriveClient.prototype.pickerRedirectUri=window.location.protocol+"//"+window.location.host+"/onedrive3.html";OneDriveClient.prototype.defEndpointHint="api.onedrive.com";OneDriveClient.prototype.endpointHint=OneDriveClient.prototype.defEndpointHint;
+OneDriveClient.prototype.extension=".drawio";OneDriveClient.prototype.baseUrl="https://graph.microsoft.com/v1.0";OneDriveClient.prototype.emptyFn=function(){};OneDriveClient.prototype.invalidFilenameRegExs=[/[~"#%\*:<>\?\/\\{\|}]/,/^\.lock$/i,/^CON$/i,/^PRN$/i,/^AUX$/i,/^NUL$/i,/^COM\d$/i,/^LPT\d$/i,/^desktop\.ini$/i,/_vti_/i];OneDriveClient.prototype.isValidFilename=function(b){if(null==b||""===b)return!1;for(var d=0;d<this.invalidFilenameRegExs.length;d++)if(this.invalidFilenameRegExs[d].test(b))return!1;
return!0};OneDriveClient.prototype.get=function(e,d,c){e=new mxXmlRequest(e,null,"GET");e.setRequestHeaders=mxUtils.bind(this,function(c,d){c.setRequestHeader("Authorization","Bearer "+b)});e.send(d,c);return e};OneDriveClient.prototype.updateUser=function(b,d,c){var e=!0,k=window.setTimeout(mxUtils.bind(this,function(){e=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.get(this.baseUrl+"/me",mxUtils.bind(this,function(g){window.clearTimeout(k);e&&(200>g.getStatus()||300<=g.getStatus()?c?d({message:mxResources.get("accessDenied")}):
(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(b,d,!0)}),d)):(g=JSON.parse(g.getText()),this.setUser(new DrawioUser(g.id,null,g.displayName)),b()))}),mxUtils.bind(this,function(b){window.clearTimeout(k);e&&d(b)}))};OneDriveClient.prototype.resetTokenRefresh=function(b){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);0<b&&(this.tokenRefreshInterval=1E3*b,this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,
function(){this.authenticate(this.emptyFn,this.emptyFn,!0)}),900*b))};OneDriveClient.prototype.authenticate=function(b,d,c){if(this.isExtAuth)window.parent.oneDriveAuth(mxUtils.bind(this,function(c){this.updateAuthInfo(c,!0,null==this.endpointHint,b,d)}),d,null!=window.urlParams&&"1"==urlParams.odAuthCancellable);else(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(e){200<=e.getStatus()&&299>=e.getStatus()?this.authenticateStep2(e.getText(),b,d,c):null!=
@@ -11175,9 +11197,9 @@ this.setPersistentToken(JSON.stringify(k),!k.remember));b();return}}catch(n){}d(
this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),d(e)):b||401!==e.getStatus()&&400!==e.getStatus()?c(this.parseRequestText(e)):this.authenticate(function(){g(!0)},c,b))}),mxUtils.bind(this,function(b){window.clearTimeout(f);k&&c(b)}))});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){g(!0)},c):g(!1)};OneDriveClient.prototype.checkToken=function(e){null==b||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(e,this.emptyFn):e()};OneDriveClient.prototype.getItemRef=
function(b){var d=b.split("/");return 1<d.length?{driveId:d[0],id:d[1]}:{id:b}};OneDriveClient.prototype.getItemURL=function(b,d){var c=b.split("/");if(1<c.length){var e=c[1];return(d?"":this.baseUrl)+"/drives/"+c[0]+("root"==e?"/root":"/items/"+e)}return(d?"":this.baseUrl)+"/me/drive/items/"+b};OneDriveClient.prototype.getLibrary=function(b,d,c){this.getFile(b,d,c,!1,!0)};OneDriveClient.prototype.removeExtraHtmlContent=function(b){var d=b.lastIndexOf('<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"><meta name="Robots" ');
0<d&&(b=b.substring(0,d));return b};OneDriveClient.prototype.getFile=function(b,d,c,g,k){k=null!=k?k:!1;this.executeRequest(this.getItemURL(b),mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){var e=JSON.parse(b.getText()),g=/\.png$/i.test(e.name);if(/\.v(dx|sdx?)$/i.test(e.name)||/\.gliffy$/i.test(e.name)||/\.pdf$/i.test(e.name)||!this.ui.useCanvasForExport&&g)this.ui.convertFile(e["@microsoft.graph.downloadUrl"],e.name,null!=e.file?e.file.mimeType:null,this.extension,d,c);
-else{var n=!0,p=window.setTimeout(mxUtils.bind(this,function(){n=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(e["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(b){try{if(window.clearTimeout(p),n){/\.html$/i.test(e.name)&&(b=this.removeExtraHtmlContent(b));var f=null;if(0<(g?b.lastIndexOf(","):-1)){var l=this.ui.extractGraphModelFromPng(b);null!=l&&0<l.length?b=l:f=new LocalFile(this.ui,b,e.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==b.substring(0,32)){var m=
-b.substring(22);b=window.atob&&!mxClient.IS_SF?atob(m):Base64.decode(m)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(b,e["@microsoft.graph.downloadUrl"])?this.ui.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){try{4==b.readyState&&(200<=b.status&&299>=b.status?d(new LocalFile(this.ui,b.responseText,e.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(A){if(null!=c)c(A);else throw A;}}),e.name):
-null!=f?d(f):k?d(new OneDriveLibrary(this.ui,b,e)):d(new OneDriveFile(this.ui,b,e))}}catch(x){if(null!=c)c(x);else throw x;}}),mxUtils.bind(this,function(b){window.clearTimeout(p);n&&c(this.parseRequestText(b))}),g||null!=e.file&&null!=e.file.mimeType&&("image/"==e.file.mimeType.substring(0,6)&&"image/svg"!=e.file.mimeType.substring(0,9)||"application/pdf"==e.file.mimeType))}}else this.isExtAuth?c({message:mxResources.get("fileNotFoundOrDenied")+(null!=this.user?" ("+this.user.displayName+")":"")}):
+else{var m=!0,n=window.setTimeout(mxUtils.bind(this,function(){m=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(e["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(b){try{if(window.clearTimeout(n),m){/\.html$/i.test(e.name)&&(b=this.removeExtraHtmlContent(b));var f=null;if(0<(g?b.lastIndexOf(","):-1)){var l=this.ui.extractGraphModelFromPng(b);null!=l&&0<l.length?b=l:f=new LocalFile(this.ui,b,e.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==b.substring(0,32)){var p=
+b.substring(22);b=window.atob&&!mxClient.IS_SF?atob(p):Base64.decode(p)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(b,e["@microsoft.graph.downloadUrl"])?this.ui.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){try{4==b.readyState&&(200<=b.status&&299>=b.status?d(new LocalFile(this.ui,b.responseText,e.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(B){if(null!=c)c(B);else throw B;}}),e.name):
+null!=f?d(f):k?d(new OneDriveLibrary(this.ui,b,e)):d(new OneDriveFile(this.ui,b,e))}}catch(x){if(null!=c)c(x);else throw x;}}),mxUtils.bind(this,function(b){window.clearTimeout(n);m&&c(this.parseRequestText(b))}),g||null!=e.file&&null!=e.file.mimeType&&("image/"==e.file.mimeType.substring(0,6)&&"image/svg"!=e.file.mimeType.substring(0,9)||"application/pdf"==e.file.mimeType))}}else this.isExtAuth?c({message:mxResources.get("fileNotFoundOrDenied")+(null!=this.user?" ("+this.user.displayName+")":"")}):
c(this.parseRequestText(b))}),c)};OneDriveClient.prototype.renameFile=function(b,d,c,g){null!=b&&null!=d&&(this.isValidFilename(d)?this.checkExists(b.getParentId(),d,!1,mxUtils.bind(this,function(e){e?this.writeFile(this.getItemURL(b.getId()),JSON.stringify({name:d}),"PATCH","application/json",c,g):g()})):g({message:this.invalidFilenameRegExs[0].test(d)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};OneDriveClient.prototype.moveFile=function(b,d,c,g){d=
this.getItemRef(d);var e=this.getItemRef(b);d.driveId!=e.driveId?g({message:mxResources.get("cannotMoveOneDrive",null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(b),JSON.stringify({parentReference:d}),"PATCH","application/json",c,g)};OneDriveClient.prototype.insertLibrary=function(b,d,c,g,k){this.insertFile(b,d,c,g,!0,k)};OneDriveClient.prototype.insertFile=function(b,d,c,g,k,n){this.isValidFilename(b)?(k=null!=k?k:!1,this.checkExists(n,b,!0,mxUtils.bind(this,
function(e){if(e){e="/me/drive/root";null!=n&&(e=this.getItemURL(n,!0));var f=mxUtils.bind(this,function(b){k?c(new OneDriveLibrary(this.ui,d,b)):c(new OneDriveFile(this.ui,d,b))});e=this.baseUrl+e+"/children/"+encodeURIComponent(b)+"/content";4E6<=d.length?this.writeFile(e,"","PUT",null,mxUtils.bind(this,function(b){this.writeLargeFile(this.getItemURL(b.id),d,f,g)}),g):this.writeFile(e,d,"PUT",null,f,g)}else g()}))):g({message:this.invalidFilenameRegExs[0].test(b)?mxResources.get("oneDriveCharsNotAllowed"):
@@ -11215,7 +11237,7 @@ this.user?this.updateUser(function(){n(!0)},c,b):k(b)});null==b?this.authenticat
function(e,d,c,g,k){g=null!=g?g:!1;var n=e.split("/"),f=n[0],l=n[1],m=n[2];e=n.slice(3,n.length).join("/");n=/\.png$/i.test(e);if(!k&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&n))if(null!=b){k=this.baseUrl+"/repos/"+f+"/"+l+"/contents/"+e+"?ref="+m;var p={Authorization:"token "+b},n=e.split("/");this.ui.convertFile(k,0<n.length?n[n.length-1]:e,null,this.extension,d,c,null,p)}else c({message:mxResources.get("accessDenied")});else n="&t="+(new Date).getTime(),
e=new mxXmlRequest(this.baseUrl+"/repos/"+f+"/"+l+"/contents/"+e+"?ref="+m+n,null,"GET"),this.executeRequest(e,mxUtils.bind(this,function(b){try{d(this.createGitHubFile(f,l,m,JSON.parse(b.getText()),g))}catch(t){c(t)}}),c)};GitHubClient.prototype.createGitHubFile=function(b,d,c,g,k){b={org:b,repo:d,ref:c,name:g.name,path:g.path,sha:g.sha,html_url:g.html_url,download_url:g.download_url};d=g.content;"base64"===g.encoding&&(/\.jpe?g$/i.test(g.name)?d="data:image/jpeg;base64,"+d:/\.gif$/i.test(g.name)?
d="data:image/gif;base64,"+d:/\.png$/i.test(g.name)?(g=this.ui.extractGraphModelFromPng(d),d=null!=g&&0<g.length?g:"data:image/png;base64,"+d):d=Base64.decode(d));return k?new GitHubLibrary(this.ui,d,b):new GitHubFile(this.ui,d,b)};GitHubClient.prototype.insertLibrary=function(b,d,c,g,k){this.insertFile(b,d,c,g,!0,k,!1)};GitHubClient.prototype.insertFile=function(b,d,c,g,k,n,f){k=null!=k?k:!1;n=n.split("/");var e=n[0],m=n[1],p=n[2],q=n.slice(3,n.length).join("/");0<q.length&&(q+="/");q+=b;this.checkExists(e+
-"/"+m+"/"+p+"/"+q,!0,mxUtils.bind(this,function(l,n){l?k?(f||(d=Base64.encode(d)),this.showCommitDialog(b,!0,mxUtils.bind(this,function(b){this.writeFile(e,m,p,q,b,d,n,mxUtils.bind(this,function(b){try{var d=JSON.parse(b.getText());c(this.createGitHubFile(e,m,p,d.content,k))}catch(z){g(z)}}),g)}),g)):c(new GitHubFile(this.ui,d,{org:e,repo:m,ref:p,name:b,path:q,sha:n,isNew:!0})):g()}))};GitHubClient.prototype.showCommitDialog=function(b,d,c,g){var e=this.ui.spinner.pause();b=new FilenameDialog(this.ui,
+"/"+m+"/"+p+"/"+q,!0,mxUtils.bind(this,function(l,n){l?k?(f||(d=Base64.encode(d)),this.showCommitDialog(b,!0,mxUtils.bind(this,function(b){this.writeFile(e,m,p,q,b,d,n,mxUtils.bind(this,function(b){try{var d=JSON.parse(b.getText());c(this.createGitHubFile(e,m,p,d.content,k))}catch(A){g(A)}}),g)}),g)):c(new GitHubFile(this.ui,d,{org:e,repo:m,ref:p,name:b,path:q,sha:n,isNew:!0})):g()}))};GitHubClient.prototype.showCommitDialog=function(b,d,c,g){var e=this.ui.spinner.pause();b=new FilenameDialog(this.ui,
mxResources.get(d?"addedFile":"updateFile",[b]),mxResources.get("ok"),mxUtils.bind(this,function(b){e();c(b)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){g()}),null,280);this.ui.showDialog(b.container,400,80,!0,!1);b.init()};GitHubClient.prototype.writeFile=function(b,d,c,g,k,n,f,l,m){n.length>=this.maxFileSize?m({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(n.length)+" / 1 MB)"}):(c={path:g,branch:decodeURIComponent(c),message:k,content:n},
null!=f&&(c.sha=f),b=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+d+"/contents/"+g,JSON.stringify(c),"PUT"),this.executeRequest(b,mxUtils.bind(this,function(b){l(b)}),mxUtils.bind(this,function(b){404==b.code&&(b.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId,b.code=null);m(b)})))};GitHubClient.prototype.checkExists=function(b,d,c){var e=b.split("/"),k=e[0],n=e[1],f=e[2];b=e.slice(3,e.length).join("/");this.getSha(k,n,b,f,mxUtils.bind(this,function(e){if(d){var f=this.ui.spinner.pause();
this.ui.confirm(mxResources.get("replaceIt",[b]),function(){f();c(!0,e)},function(){f();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(b){c(!0)}),null,!0)};GitHubClient.prototype.saveFile=function(b,d,c,g,k){var e=b.meta.org,f=b.meta.repo,l=b.meta.ref,m=b.meta.path,p=mxUtils.bind(this,function(g,n){this.writeFile(e,f,l,m,k,n,g,mxUtils.bind(this,function(c){delete b.meta.isNew;
@@ -11223,18 +11245,18 @@ d(JSON.parse(c.getText()).content.sha)}),mxUtils.bind(this,function(b){c(b)}))})
function(b){this.pickFile(b)};GitHubClient.prototype.pickFolder=function(b){this.showGitHubDialog(!1,b)};GitHubClient.prototype.pickFile=function(b){b=null!=b?b:mxUtils.bind(this,function(b){this.ui.loadFile("H"+encodeURIComponent(b))});this.showGitHubDialog(!0,b)};GitHubClient.prototype.showGitHubDialog=function(b,d){var c=null,e=null,k=null,n=null,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.height="304px";var l=document.createElement("h3");mxUtils.write(l,
mxResources.get(b?"selectFile":"selectFolder"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(l);var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.border="1px solid lightgray";m.style.boxSizing="border-box";m.style.padding="4px";m.style.overflow="auto";m.style.lineHeight="1.2em";m.style.height="274px";f.appendChild(m);var p=document.createElement("div");p.style.textOverflow="ellipsis";p.style.boxSizing="border-box";p.style.overflow=
"hidden";p.style.padding="4px";p.style.width="100%";var q=new CustomDialog(this.ui,f,mxUtils.bind(this,function(){d(c+"/"+e+"/"+encodeURIComponent(k)+"/"+n)}));this.ui.showDialog(q.container,420,370,!0,!0);b&&q.okButton.parentNode.removeChild(q.okButton);var t=mxUtils.bind(this,function(b,c,d,e){var f=document.createElement("a");f.setAttribute("title",b);f.style.cursor="pointer";mxUtils.write(f,b);mxEvent.addListener(f,"click",c);e&&(f.style.textDecoration="underline");null!=d&&(b=p.cloneNode(),b.style.padding=
-d,b.appendChild(f),f=b);return f}),u=mxUtils.bind(this,function(b){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(t(c+"/"+e,mxUtils.bind(this,function(){n=null;B()}),null,!0));b||(mxUtils.write(d," / "),d.appendChild(t(decodeURIComponent(k),mxUtils.bind(this,function(){n=null;y()}),null,!0)));if(null!=n&&0<n.length){var f=n.split("/");for(b=0;b<f.length;b++)(function(b){mxUtils.write(d," / ");d.appendChild(t(f[b],mxUtils.bind(this,function(){n=f.slice(0,b+1).join("/");
-z()}),null,!0))})(b)}m.appendChild(d)}),v=mxUtils.bind(this,function(b){this.ui.handleError(b,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(n=k=e=c=null,B()):this.ui.hideDialog()}),null,{})}),x=null,A=null,z=mxUtils.bind(this,function(f){null==f&&(m.innerHTML="",f=1);var g=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+e+"/contents/"+n+"?ref="+encodeURIComponent(k)+"&per_page=100&page="+f,null,"GET");this.ui.spinner.spin(m,mxResources.get("loading"));q.okButton.removeAttribute("disabled");
-null!=A&&(mxEvent.removeListener(m,"scroll",A),A=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var l=mxUtils.bind(this,function(){z(f+1)});mxEvent.addListener(x,"click",l);this.executeRequest(g,mxUtils.bind(this,function(g){this.ui.spinner.stop();1==f&&(u(),m.appendChild(t("../ [Up]",mxUtils.bind(this,function(){if(""==n)n=null,B();else{var b=n.split("/");
-n=b.slice(0,b.length-1).join("/");z()}}),"4px")));var l=JSON.parse(g.getText());if(null==l||0==l.length)mxUtils.write(m,mxResources.get("noFiles"));else{var y=!0,q=0;g=mxUtils.bind(this,function(f){for(var g=0;g<l.length;g++)mxUtils.bind(this,function(g,l){if(f==("dir"==g.type)){var B=p.cloneNode();B.style.backgroundColor=y?Editor.isDarkMode()?"#000000":"#eeeeee":"";y=!y;var u=document.createElement("img");u.src=IMAGE_PATH+"/"+("dir"==g.type?"folder.png":"file.png");u.setAttribute("align","absmiddle");
-u.style.marginRight="4px";u.style.marginTop="-4px";u.width=20;B.appendChild(u);B.appendChild(t(g.name+("dir"==g.type?"/":""),mxUtils.bind(this,function(){"dir"==g.type?(n=g.path,z()):b&&"file"==g.type&&(this.ui.hideDialog(),d(c+"/"+e+"/"+encodeURIComponent(k)+"/"+g.path))})));m.appendChild(B);q++}})(l[g],g)});g(!0);b&&g(!1)}}),v,!0)}),y=mxUtils.bind(this,function(b,d){null==b&&(m.innerHTML="",b=1);var f=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+e+"/branches?per_page=100&page="+b,null,"GET");q.okButton.setAttribute("disabled",
-"disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=A&&(mxEvent.removeListener(m,"scroll",A),A=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var g=mxUtils.bind(this,function(){y(b+1)});mxEvent.addListener(x,"click",g);this.executeRequest(f,mxUtils.bind(this,function(c){this.ui.spinner.stop();1==b&&(u(!0),m.appendChild(t("../ [Up]",mxUtils.bind(this,
-function(){n=null;B()}),"4px")));c=JSON.parse(c.getText());if(null==c||0==c.length)mxUtils.write(m,mxResources.get("noFiles"));else if(1==c.length&&d)k=c[0].name,n="",z();else{for(var e=0;e<c.length;e++)mxUtils.bind(this,function(b,c){var d=p.cloneNode();d.style.backgroundColor=0==c%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";d.appendChild(t(b.name,mxUtils.bind(this,function(){k=b.name;n="";z()})));m.appendChild(d)})(c[e],e);100==c.length&&(m.appendChild(x),A=function(){m.scrollTop>=m.scrollHeight-
-m.offsetHeight&&g()},mxEvent.addListener(m,"scroll",A))}}),v)}),B=mxUtils.bind(this,function(b){null==b&&(m.innerHTML="",b=1);var d=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+b,null,"GET");q.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=A&&mxEvent.removeListener(m,"scroll",A);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,
-mxResources.get("more")+"...");var f=mxUtils.bind(this,function(){B(b+1)});mxEvent.addListener(x,"click",f);this.executeRequest(d,mxUtils.bind(this,function(d){this.ui.spinner.stop();d=JSON.parse(d.getText());if(null==d||0==d.length)mxUtils.write(m,mxResources.get("noFiles"));else{1==b&&(m.appendChild(t(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var b=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(b){if(null!=b){var d=b.split("/");
-if(1<d.length){b=d[0];var f=d[1];3>d.length?(c=b,e=f,n=k=null,y()):this.ui.spinner.spin(m,mxResources.get("loading"))&&(d=encodeURIComponent(d.slice(2,d.length).join("/")),this.getFile(b+"/"+f+"/"+d,mxUtils.bind(this,function(b){this.ui.spinner.stop();c=b.meta.org;e=b.meta.repo;k=decodeURIComponent(b.meta.ref);n="";z()}),mxUtils.bind(this,function(b){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),
-mxResources.get("enterValue"));this.ui.showDialog(b.container,300,80,!0,!1);b.init()}))),mxUtils.br(m),mxUtils.br(m));for(var g=0;g<d.length;g++)mxUtils.bind(this,function(b,d){var f=p.cloneNode();f.style.backgroundColor=0==d%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";f.appendChild(t(b.full_name,mxUtils.bind(this,function(){c=b.owner.login;e=b.name;n="";y(null,!0)})));m.appendChild(f)})(d[g],g)}100==d.length&&(m.appendChild(x),A=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&f()},mxEvent.addListener(m,
-"scroll",A))}),v)});B()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,d){DrawioFile.call(this,b,e);this.meta=d;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
+d,b.appendChild(f),f=b);return f}),u=mxUtils.bind(this,function(b){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(t(c+"/"+e,mxUtils.bind(this,function(){n=null;z()}),null,!0));b||(mxUtils.write(d," / "),d.appendChild(t(decodeURIComponent(k),mxUtils.bind(this,function(){n=null;y()}),null,!0)));if(null!=n&&0<n.length){var f=n.split("/");for(b=0;b<f.length;b++)(function(b){mxUtils.write(d," / ");d.appendChild(t(f[b],mxUtils.bind(this,function(){n=f.slice(0,b+1).join("/");
+A()}),null,!0))})(b)}m.appendChild(d)}),v=mxUtils.bind(this,function(b){this.ui.handleError(b,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(n=k=e=c=null,z()):this.ui.hideDialog()}),null,{})}),x=null,B=null,A=mxUtils.bind(this,function(f){null==f&&(m.innerHTML="",f=1);var g=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+e+"/contents/"+n+"?ref="+encodeURIComponent(k)+"&per_page=100&page="+f,null,"GET");this.ui.spinner.spin(m,mxResources.get("loading"));q.okButton.removeAttribute("disabled");
+null!=B&&(mxEvent.removeListener(m,"scroll",B),B=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var l=mxUtils.bind(this,function(){A(f+1)});mxEvent.addListener(x,"click",l);this.executeRequest(g,mxUtils.bind(this,function(g){this.ui.spinner.stop();1==f&&(u(),m.appendChild(t("../ [Up]",mxUtils.bind(this,function(){if(""==n)n=null,z();else{var b=n.split("/");
+n=b.slice(0,b.length-1).join("/");A()}}),"4px")));var l=JSON.parse(g.getText());if(null==l||0==l.length)mxUtils.write(m,mxResources.get("noFiles"));else{var y=!0,q=0;g=mxUtils.bind(this,function(f){for(var g=0;g<l.length;g++)mxUtils.bind(this,function(g,l){if(f==("dir"==g.type)){var z=p.cloneNode();z.style.backgroundColor=y?Editor.isDarkMode()?"#000000":"#eeeeee":"";y=!y;var u=document.createElement("img");u.src=IMAGE_PATH+"/"+("dir"==g.type?"folder.png":"file.png");u.setAttribute("align","absmiddle");
+u.style.marginRight="4px";u.style.marginTop="-4px";u.width=20;z.appendChild(u);z.appendChild(t(g.name+("dir"==g.type?"/":""),mxUtils.bind(this,function(){"dir"==g.type?(n=g.path,A()):b&&"file"==g.type&&(this.ui.hideDialog(),d(c+"/"+e+"/"+encodeURIComponent(k)+"/"+g.path))})));m.appendChild(z);q++}})(l[g],g)});g(!0);b&&g(!1)}}),v,!0)}),y=mxUtils.bind(this,function(b,d){null==b&&(m.innerHTML="",b=1);var f=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+e+"/branches?per_page=100&page="+b,null,"GET");q.okButton.setAttribute("disabled",
+"disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=B&&(mxEvent.removeListener(m,"scroll",B),B=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var g=mxUtils.bind(this,function(){y(b+1)});mxEvent.addListener(x,"click",g);this.executeRequest(f,mxUtils.bind(this,function(c){this.ui.spinner.stop();1==b&&(u(!0),m.appendChild(t("../ [Up]",mxUtils.bind(this,
+function(){n=null;z()}),"4px")));c=JSON.parse(c.getText());if(null==c||0==c.length)mxUtils.write(m,mxResources.get("noFiles"));else if(1==c.length&&d)k=c[0].name,n="",A();else{for(var e=0;e<c.length;e++)mxUtils.bind(this,function(b,c){var d=p.cloneNode();d.style.backgroundColor=0==c%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";d.appendChild(t(b.name,mxUtils.bind(this,function(){k=b.name;n="";A()})));m.appendChild(d)})(c[e],e);100==c.length&&(m.appendChild(x),B=function(){m.scrollTop>=m.scrollHeight-
+m.offsetHeight&&g()},mxEvent.addListener(m,"scroll",B))}}),v)}),z=mxUtils.bind(this,function(b){null==b&&(m.innerHTML="",b=1);var d=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+b,null,"GET");q.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=B&&mxEvent.removeListener(m,"scroll",B);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,
+mxResources.get("more")+"...");var f=mxUtils.bind(this,function(){z(b+1)});mxEvent.addListener(x,"click",f);this.executeRequest(d,mxUtils.bind(this,function(d){this.ui.spinner.stop();d=JSON.parse(d.getText());if(null==d||0==d.length)mxUtils.write(m,mxResources.get("noFiles"));else{1==b&&(m.appendChild(t(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var b=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(b){if(null!=b){var d=b.split("/");
+if(1<d.length){b=d[0];var f=d[1];3>d.length?(c=b,e=f,n=k=null,y()):this.ui.spinner.spin(m,mxResources.get("loading"))&&(d=encodeURIComponent(d.slice(2,d.length).join("/")),this.getFile(b+"/"+f+"/"+d,mxUtils.bind(this,function(b){this.ui.spinner.stop();c=b.meta.org;e=b.meta.repo;k=decodeURIComponent(b.meta.ref);n="";A()}),mxUtils.bind(this,function(b){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),
+mxResources.get("enterValue"));this.ui.showDialog(b.container,300,80,!0,!1);b.init()}))),mxUtils.br(m),mxUtils.br(m));for(var g=0;g<d.length;g++)mxUtils.bind(this,function(b,d){var f=p.cloneNode();f.style.backgroundColor=0==d%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";f.appendChild(t(b.full_name,mxUtils.bind(this,function(){c=b.owner.login;e=b.name;n="";y(null,!0)})));m.appendChild(f)})(d[g],g)}100==d.length&&(m.appendChild(x),B=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&f()},mxEvent.addListener(m,
+"scroll",B))}),v)});z()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,d){DrawioFile.call(this,b,e);this.meta=d;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
TrelloFile.prototype.save=function(b,e,d){this.doSave(this.getTitle(),e,d)};TrelloFile.prototype.saveAs=function(b,e,d){this.doSave(b,e,d)};TrelloFile.prototype.doSave=function(b,e,d){var c=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=c;this.saveFile(b,!1,e,d)}),d])};
TrelloFile.prototype.saveFile=function(b,e,d,c){this.isEditable()?this.savingFile?null!=c&&(this.saveNeededCounter++,c({code:App.ERROR_BUSY})):(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.getTitle()==b?this.ui.trello.saveFile(this,mxUtils.bind(this,function(g){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=g;this.contentChanged();null!=d&&d();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,d,c))}),mxUtils.bind(this,
function(b){this.savingFile=!1;null!=c&&c(b)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(g){this.ui.trello.insertFile(b,this.getData(),mxUtils.bind(this,function(g){this.savingFile=!1;null!=d&&d();this.ui.fileLoaded(g);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,d,c))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,g)}))):null!=d&&d()};TrelloLibrary=function(b,e,d){TrelloFile.call(this,b,e,d)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(b,e,d){this.saveFile(b,!1,e,d)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(b){DrawioClient.call(this,b,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e73615c79cf7e381aef91c85936e9553";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml";
@@ -11278,19 +11300,19 @@ this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){p(b.meta.last_commit_id,c)}
encodeURIComponent(b))});this.showGitLabDialog(!0,b)};GitLabClient.prototype.showGitLabDialog=function(e,d){var c=null,g=null,k=null,n=null,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.height="304px";var l=document.createElement("h3");mxUtils.write(l,mxResources.get(e?"selectFile":"selectFolder"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(l);var m=document.createElement("div");m.style.whiteSpace=
"nowrap";m.style.border="1px solid lightgray";m.style.boxSizing="border-box";m.style.padding="4px";m.style.overflow="auto";m.style.lineHeight="1.2em";m.style.height="274px";f.appendChild(m);var p=document.createElement("div");p.style.textOverflow="ellipsis";p.style.boxSizing="border-box";p.style.overflow="hidden";p.style.padding="4px";p.style.width="100%";var q=new CustomDialog(this.ui,f,mxUtils.bind(this,function(){d(c+"/"+g+"/"+encodeURIComponent(k)+"/"+n)}));this.ui.showDialog(q.container,420,
370,!0,!0);e&&q.okButton.parentNode.removeChild(q.okButton);var t=mxUtils.bind(this,function(b,c,d,e){var f=document.createElement("a");f.setAttribute("title",b);f.style.cursor="pointer";mxUtils.write(f,b);mxEvent.addListener(f,"click",c);e&&(f.style.textDecoration="underline");null!=d&&(b=p.cloneNode(),b.style.padding=d,b.appendChild(f),f=b);return f}),u=mxUtils.bind(this,function(b){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(t(c+"/"+g,mxUtils.bind(this,function(){n=
-null;B()}),null,!0));b||(mxUtils.write(d," / "),d.appendChild(t(decodeURIComponent(k),mxUtils.bind(this,function(){n=null;y()}),null,!0)));if(null!=n&&0<n.length){var e=n.split("/");for(b=0;b<e.length;b++)(function(b){mxUtils.write(d," / ");d.appendChild(t(e[b],mxUtils.bind(this,function(){n=e.slice(0,b+1).join("/");z()}),null,!0))})(b)}m.appendChild(d)}),v=mxUtils.bind(this,function(b){this.ui.handleError(b,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(n=k=g=c=null,
-B()):this.ui.hideDialog()}))}),x=null,A=null,z=mxUtils.bind(this,function(b){null==b&&(m.innerHTML="",b=1);var f=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+g)+"/repository/tree?path="+n+"&ref="+k+"&per_page=100&page="+b,null,"GET");this.ui.spinner.spin(m,mxResources.get("loading"));q.okButton.removeAttribute("disabled");null!=A&&(mxEvent.removeListener(m,"scroll",A),A=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display=
-"block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var l=mxUtils.bind(this,function(){z(b+1)});mxEvent.addListener(x,"click",l);this.executeRequest(f,mxUtils.bind(this,function(f){this.ui.spinner.stop();1==b&&(u(!k),m.appendChild(t("../ [Up]",mxUtils.bind(this,function(){if(""==n)n=null,B();else{var b=n.split("/");n=b.slice(0,b.length-1).join("/");z()}}),"4px")));var y=JSON.parse(f.getText());if(null==y||0==y.length)mxUtils.write(m,mxResources.get("noFiles"));else{var q=
+null;z()}),null,!0));b||(mxUtils.write(d," / "),d.appendChild(t(decodeURIComponent(k),mxUtils.bind(this,function(){n=null;y()}),null,!0)));if(null!=n&&0<n.length){var e=n.split("/");for(b=0;b<e.length;b++)(function(b){mxUtils.write(d," / ");d.appendChild(t(e[b],mxUtils.bind(this,function(){n=e.slice(0,b+1).join("/");A()}),null,!0))})(b)}m.appendChild(d)}),v=mxUtils.bind(this,function(b){this.ui.handleError(b,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(n=k=g=c=null,
+z()):this.ui.hideDialog()}))}),x=null,B=null,A=mxUtils.bind(this,function(b){null==b&&(m.innerHTML="",b=1);var f=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+g)+"/repository/tree?path="+n+"&ref="+k+"&per_page=100&page="+b,null,"GET");this.ui.spinner.spin(m,mxResources.get("loading"));q.okButton.removeAttribute("disabled");null!=B&&(mxEvent.removeListener(m,"scroll",B),B=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display=
+"block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var l=mxUtils.bind(this,function(){A(b+1)});mxEvent.addListener(x,"click",l);this.executeRequest(f,mxUtils.bind(this,function(f){this.ui.spinner.stop();1==b&&(u(!k),m.appendChild(t("../ [Up]",mxUtils.bind(this,function(){if(""==n)n=null,z();else{var b=n.split("/");n=b.slice(0,b.length-1).join("/");A()}}),"4px")));var y=JSON.parse(f.getText());if(null==y||0==y.length)mxUtils.write(m,mxResources.get("noFiles"));else{var q=
!0,v=0;f=mxUtils.bind(this,function(b){for(var f=0;f<y.length;f++)mxUtils.bind(this,function(f){if(b==("tree"==f.type)){var l=p.cloneNode();l.style.backgroundColor=q?Editor.isDarkMode()?"#000000":"#eeeeee":"";q=!q;var y=document.createElement("img");y.src=IMAGE_PATH+"/"+("tree"==f.type?"folder.png":"file.png");y.setAttribute("align","absmiddle");y.style.marginRight="4px";y.style.marginTop="-4px";y.width=20;l.appendChild(y);l.appendChild(t(f.name+("tree"==f.type?"/":""),mxUtils.bind(this,function(){"tree"==
-f.type?(n=f.path,z()):e&&"blob"==f.type&&(this.ui.hideDialog(),d(c+"/"+g+"/"+k+"/"+f.path))})));m.appendChild(l);v++}})(y[f])});f(!0);e&&f(!1);100==v&&(m.appendChild(x),A=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&l()},mxEvent.addListener(m,"scroll",A))}}),v,!0)}),y=mxUtils.bind(this,function(b,d){null==b&&(m.innerHTML="",b=1);var e=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+g)+"/repository/branches?per_page=100&page="+b,null,"GET");q.okButton.setAttribute("disabled",
-"disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=A&&(mxEvent.removeListener(m,"scroll",A),A=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var f=mxUtils.bind(this,function(){y(b+1)});mxEvent.addListener(x,"click",f);this.executeRequest(e,mxUtils.bind(this,function(c){this.ui.spinner.stop();1==b&&(u(!0),m.appendChild(t("../ [Up]",mxUtils.bind(this,
-function(){n=null;B()}),"4px")));c=JSON.parse(c.getText());if(null==c||0==c.length)mxUtils.write(m,mxResources.get("noFiles"));else if(1==c.length&&d)k=c[0].name,n="",z();else{for(var e=0;e<c.length;e++)mxUtils.bind(this,function(b,c){var d=p.cloneNode();d.style.backgroundColor=0==c%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";d.appendChild(t(b.name,mxUtils.bind(this,function(){k=encodeURIComponent(b.name);n="";z()})));m.appendChild(d)})(c[e],e);100==c.length&&(m.appendChild(x),A=function(){m.scrollTop>=
-m.scrollHeight-m.offsetHeight&&f()},mxEvent.addListener(m,"scroll",A))}}),v)});q.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));var B=mxUtils.bind(this,function(b){var d=this.ui.spinner,e=0;this.ui.spinner.stop();var f=function(){d.spin(m,mxResources.get("loading"));e+=1},l=function(){--e;0===e&&d.stop()};null==b&&(m.innerHTML="",b=1);null!=A&&(mxEvent.removeListener(m,"scroll",A),A=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");
-x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var q=mxUtils.bind(this,function(){0===e&&B(b+1)});mxEvent.addListener(x,"click",q);var u=mxUtils.bind(this,function(b){f();var c=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(c,mxUtils.bind(this,function(c){b(JSON.parse(c.getText()));l()}),v)}),C=mxUtils.bind(this,function(b,c){f();var d=new mxXmlRequest(this.baseUrl+"/groups/"+b.id+"/projects?per_page=100",null,
-"GET");this.executeRequest(d,mxUtils.bind(this,function(d){c(b,JSON.parse(d.getText()));l()}),v)});u(mxUtils.bind(this,function(d){f();var B=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+b,null,"GET");this.executeRequest(B,mxUtils.bind(this,function(B){B=JSON.parse(B.getText());if(null!=B&&0!=B.length||null!=d&&0!=d.length){1==b&&(m.appendChild(t(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){if(0===e){var b=new FilenameDialog(this.ui,"org/repo/ref",
-mxResources.get("ok"),mxUtils.bind(this,function(b){null!=b&&(b=b.split("/"),1<b.length?(c=b[0],g=b[1],k=n=null,2<b.length?(k=encodeURIComponent(b.slice(2,b.length).join("/")),z()):y(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(b.container,300,80,!0,!1);b.init()}}))),mxUtils.br(m),mxUtils.br(m));for(var u=!0,v=0;v<B.length;v++)mxUtils.bind(this,function(b){var d=p.cloneNode();d.style.backgroundColor=
-u?Editor.isDarkMode()?"#000000":"#eeeeee":"";u=!u;d.appendChild(t(b.name_with_namespace,mxUtils.bind(this,function(){0===e&&(c=b.owner.username,g=b.path,n="",y(null,!0))})));m.appendChild(d)})(B[v]);for(v=0;v<d.length;v++)f(),C(d[v],mxUtils.bind(this,function(b,d){l();for(var f=0;f<d.length;f++){var k=p.cloneNode();k.style.backgroundColor=u?"dark"==uiTheme?"#000000":"#eeeeee":"";u=!u;mxUtils.bind(this,function(d){k.appendChild(t(d.name_with_namespace,mxUtils.bind(this,function(){0===e&&(c=b.full_path,
-g=d.path,n="",y(null,!0))})));m.appendChild(k)})(d[f])}}));l()}else mxUtils.write(m,mxResources.get("noFiles"));100==B.length&&(m.appendChild(x),A=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&q()},mxEvent.addListener(m,"scroll",A))}),v)}))});b?this.user?B():this.updateUser(function(){B()},v,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){B()},v,!0)}),v)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+
+f.type?(n=f.path,A()):e&&"blob"==f.type&&(this.ui.hideDialog(),d(c+"/"+g+"/"+k+"/"+f.path))})));m.appendChild(l);v++}})(y[f])});f(!0);e&&f(!1);100==v&&(m.appendChild(x),B=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&l()},mxEvent.addListener(m,"scroll",B))}}),v,!0)}),y=mxUtils.bind(this,function(b,d){null==b&&(m.innerHTML="",b=1);var e=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+g)+"/repository/branches?per_page=100&page="+b,null,"GET");q.okButton.setAttribute("disabled",
+"disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=B&&(mxEvent.removeListener(m,"scroll",B),B=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var f=mxUtils.bind(this,function(){y(b+1)});mxEvent.addListener(x,"click",f);this.executeRequest(e,mxUtils.bind(this,function(c){this.ui.spinner.stop();1==b&&(u(!0),m.appendChild(t("../ [Up]",mxUtils.bind(this,
+function(){n=null;z()}),"4px")));c=JSON.parse(c.getText());if(null==c||0==c.length)mxUtils.write(m,mxResources.get("noFiles"));else if(1==c.length&&d)k=c[0].name,n="",A();else{for(var e=0;e<c.length;e++)mxUtils.bind(this,function(b,c){var d=p.cloneNode();d.style.backgroundColor=0==c%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";d.appendChild(t(b.name,mxUtils.bind(this,function(){k=encodeURIComponent(b.name);n="";A()})));m.appendChild(d)})(c[e],e);100==c.length&&(m.appendChild(x),B=function(){m.scrollTop>=
+m.scrollHeight-m.offsetHeight&&f()},mxEvent.addListener(m,"scroll",B))}}),v)});q.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));var z=mxUtils.bind(this,function(b){var d=this.ui.spinner,e=0;this.ui.spinner.stop();var f=function(){d.spin(m,mxResources.get("loading"));e+=1},l=function(){--e;0===e&&d.stop()};null==b&&(m.innerHTML="",b=1);null!=B&&(mxEvent.removeListener(m,"scroll",B),B=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");
+x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var q=mxUtils.bind(this,function(){0===e&&z(b+1)});mxEvent.addListener(x,"click",q);var u=mxUtils.bind(this,function(b){f();var c=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(c,mxUtils.bind(this,function(c){b(JSON.parse(c.getText()));l()}),v)}),C=mxUtils.bind(this,function(b,c){f();var d=new mxXmlRequest(this.baseUrl+"/groups/"+b.id+"/projects?per_page=100",null,
+"GET");this.executeRequest(d,mxUtils.bind(this,function(d){c(b,JSON.parse(d.getText()));l()}),v)});u(mxUtils.bind(this,function(d){f();var z=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+b,null,"GET");this.executeRequest(z,mxUtils.bind(this,function(z){z=JSON.parse(z.getText());if(null!=z&&0!=z.length||null!=d&&0!=d.length){1==b&&(m.appendChild(t(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){if(0===e){var b=new FilenameDialog(this.ui,"org/repo/ref",
+mxResources.get("ok"),mxUtils.bind(this,function(b){null!=b&&(b=b.split("/"),1<b.length?(c=b[0],g=b[1],k=n=null,2<b.length?(k=encodeURIComponent(b.slice(2,b.length).join("/")),A()):y(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(b.container,300,80,!0,!1);b.init()}}))),mxUtils.br(m),mxUtils.br(m));for(var u=!0,v=0;v<z.length;v++)mxUtils.bind(this,function(b){var d=p.cloneNode();d.style.backgroundColor=
+u?Editor.isDarkMode()?"#000000":"#eeeeee":"";u=!u;d.appendChild(t(b.name_with_namespace,mxUtils.bind(this,function(){0===e&&(c=b.owner.username,g=b.path,n="",y(null,!0))})));m.appendChild(d)})(z[v]);for(v=0;v<d.length;v++)f(),C(d[v],mxUtils.bind(this,function(b,d){l();for(var f=0;f<d.length;f++){var k=p.cloneNode();k.style.backgroundColor=u?"dark"==uiTheme?"#000000":"#eeeeee":"";u=!u;mxUtils.bind(this,function(d){k.appendChild(t(d.name_with_namespace,mxUtils.bind(this,function(){0===e&&(c=b.full_path,
+g=d.path,n="",y(null,!0))})));m.appendChild(k)})(d[f])}}));l()}else mxUtils.write(m,mxResources.get("noFiles"));100==z.length&&(m.appendChild(x),B=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&q()},mxEvent.addListener(m,"scroll",B))}),v)}))});b?this.user?z():this.updateUser(function(){z()},v,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){z()},v,!0)}),v)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+
this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null;this.setToken(null)}})();NotionFile=function(b,e,d){DrawioFile.call(this,b,e);this.meta=d;this.peer=this.ui.notion};mxUtils.extend(NotionFile,DrawioFile);NotionFile.prototype.getId=function(){return this.meta.id};NotionFile.prototype.getHash=function(){return encodeURIComponent("N"+this.getId())};NotionFile.prototype.getMode=function(){return App.MODE_NOTION};NotionFile.prototype.isAutosave=function(){return!1};NotionFile.prototype.getTitle=function(){return this.meta.name};NotionFile.prototype.isRenamable=function(){return!1};
NotionFile.prototype.isCompressedStorage=function(){return!0};NotionFile.prototype.save=function(b,e,d,c,g){this.doSave(this.getTitle(),e,d,c,g)};NotionFile.prototype.saveAs=function(b,e,d){this.doSave(b,e,d)};NotionFile.prototype.doSave=function(b,e,d,c,g){var k=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=k;this.saveFile(b,!1,e,d,c,g)}),d,c,g])};
NotionFile.prototype.saveFile=function(b,e,d,c,g,k){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else if(this.getTitle()==b)try{this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.peer.saveFile(this,mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.savingFile=!1;null!=d&&d()}),mxUtils.bind(this,function(b){this.savingFile=!1;null!=c&&c(b)}),k)}catch(n){if(this.savingFile=!1,null!=c)c(n);else throw n;}else this.savingFileTime=
@@ -11306,40 +11328,57 @@ this.ui.formatFileSize(g.length)+" / 200 KB)"});else{for(var e=[],m=Math.ceil(g.
NotionClient.prototype.pickLibrary=function(b){this.pickFile(b)};NotionClient.prototype.pickFolder=function(b){this.showNotionDialog(!1,b)};NotionClient.prototype.pickFile=function(b){b=null!=b?b:mxUtils.bind(this,function(b){this.ui.loadFile("N"+encodeURIComponent(b))});this.showNotionDialog(!0,b)};NotionClient.prototype.showNotionDialog=function(b,d){var c,e,k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.height="304px";var n=document.createElement("h3");
mxUtils.write(n,mxResources.get(b?"officeSelDiag":"selectDB"));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(n);var f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.border="1px solid lightgray";f.style.boxSizing="border-box";f.style.padding="4px";f.style.overflow="auto";f.style.lineHeight="1.2em";f.style.height="274px";k.appendChild(f);var l=document.createElement("div");l.style.textOverflow="ellipsis";l.style.boxSizing="border-box";
l.style.overflow="hidden";l.style.padding="4px";l.style.width="100%";var m=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){d(c)}));this.ui.showDialog(m.container,420,380,!0,!0);b&&m.okButton.parentNode.removeChild(m.okButton);var p=mxUtils.bind(this,function(b,c,d,e){var f=document.createElement("a");f.setAttribute("title",b);f.style.cursor="pointer";mxUtils.write(f,b);mxEvent.addListener(f,"click",c);e&&(f.style.textDecoration="underline");null!=d&&(b=l.cloneNode(),b.style.padding=d,b.appendChild(f),
-f=b);return f}),q=mxUtils.bind(this,function(){var b=document.createElement("div");b.style.marginBottom="8px";b.appendChild(p(e,mxUtils.bind(this,function(){c=null;A()}),null,!0));f.appendChild(b)}),t=mxUtils.bind(this,function(b){this.ui.handleError(b,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(c=null,A()):this.ui.hideDialog()}),null,{})}),u=null,v=null,x=mxUtils.bind(this,function(b){null==b&&(f.innerHTML="");this.ui.spinner.spin(f,mxResources.get("loading"));
+f=b);return f}),q=mxUtils.bind(this,function(){var b=document.createElement("div");b.style.marginBottom="8px";b.appendChild(p(e,mxUtils.bind(this,function(){c=null;B()}),null,!0));f.appendChild(b)}),t=mxUtils.bind(this,function(b){this.ui.handleError(b,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(c=null,B()):this.ui.hideDialog()}),null,{})}),u=null,v=null,x=mxUtils.bind(this,function(b){null==b&&(f.innerHTML="");this.ui.spinner.spin(f,mxResources.get("loading"));
m.okButton.removeAttribute("disabled");null!=v&&(mxEvent.removeListener(f,"scroll",v),v=null);null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u);u=document.createElement("a");u.style.display="block";u.style.cursor="pointer";mxUtils.write(u,mxResources.get("more")+"...");var e=mxUtils.bind(this,function(){x(b)});mxEvent.addListener(u,"click",e);var g={page_size:100};null!=b&&(g.start_cursor=b);this.executeRequest("/v1/databases/"+encodeURIComponent(c)+"/query",JSON.stringify(g),"POST",mxUtils.bind(this,
-function(g){this.ui.spinner.stop();null==b&&(q(),f.appendChild(p("../ [Up]",mxUtils.bind(this,function(){c=null;A()}),"4px")));var k=g.results;if(null==k||0==k.length)mxUtils.write(f,mxResources.get("noFiles"));else{for(var n=!0,m=0;m<k.length;m++)mxUtils.bind(this,function(b,c){var e=l.cloneNode();e.style.backgroundColor=n?Editor.isDarkMode()?"#000000":"#eeeeee":"";n=!n;var g=document.createElement("img");g.src=IMAGE_PATH+"/file.png";g.setAttribute("align","absmiddle");g.style.marginRight="4px";
-g.style.marginTop="-4px";g.width=20;e.appendChild(g);e.appendChild(p(this.getTitle(b.properties.Name),mxUtils.bind(this,function(){this.ui.hideDialog();d(b.id)})));f.appendChild(e)})(k[m],m);g.has_more&&(b=g.next_cursor,f.appendChild(u),v=function(){f.scrollTop>=f.scrollHeight-f.offsetHeight&&e()},mxEvent.addListener(f,"scroll",v))}}),t,!0)}),A=mxUtils.bind(this,function(g){null==g&&(f.innerHTML="");m.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(f,mxResources.get("loading"));
-null!=v&&mxEvent.removeListener(f,"scroll",v);null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u);u=document.createElement("a");u.style.display="block";u.style.cursor="pointer";mxUtils.write(u,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){A(g)});mxEvent.addListener(u,"click",k);this.executeRequest("/v1/databases?page_size=100"+(null!=g?"&start_cursor="+g:""),null,"GET",mxUtils.bind(this,function(n){this.ui.spinner.stop();var m=n.results,y=0;if(null==m||0==m.length)mxUtils.write(f,
+function(g){this.ui.spinner.stop();null==b&&(q(),f.appendChild(p("../ [Up]",mxUtils.bind(this,function(){c=null;B()}),"4px")));var k=g.results;if(null==k||0==k.length)mxUtils.write(f,mxResources.get("noFiles"));else{for(var n=!0,m=0;m<k.length;m++)mxUtils.bind(this,function(b,c){var e=l.cloneNode();e.style.backgroundColor=n?Editor.isDarkMode()?"#000000":"#eeeeee":"";n=!n;var g=document.createElement("img");g.src=IMAGE_PATH+"/file.png";g.setAttribute("align","absmiddle");g.style.marginRight="4px";
+g.style.marginTop="-4px";g.width=20;e.appendChild(g);e.appendChild(p(this.getTitle(b.properties.Name),mxUtils.bind(this,function(){this.ui.hideDialog();d(b.id)})));f.appendChild(e)})(k[m],m);g.has_more&&(b=g.next_cursor,f.appendChild(u),v=function(){f.scrollTop>=f.scrollHeight-f.offsetHeight&&e()},mxEvent.addListener(f,"scroll",v))}}),t,!0)}),B=mxUtils.bind(this,function(g){null==g&&(f.innerHTML="");m.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(f,mxResources.get("loading"));
+null!=v&&mxEvent.removeListener(f,"scroll",v);null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u);u=document.createElement("a");u.style.display="block";u.style.cursor="pointer";mxUtils.write(u,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){B(g)});mxEvent.addListener(u,"click",k);this.executeRequest("/v1/databases?page_size=100"+(null!=g?"&start_cursor="+g:""),null,"GET",mxUtils.bind(this,function(n){this.ui.spinner.stop();var m=n.results,y=0;if(null==m||0==m.length)mxUtils.write(f,
mxResources.get("noDBs"));else for(var q=0;q<m.length;q++)m[q].properties.Name&&"title"==m[q].properties.Name.type&&m[q].properties.xml&&"rich_text"==m[q].properties.xml.type&&(mxUtils.bind(this,function(g,k){var n=l.cloneNode();n.style.backgroundColor=0==k%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";n.appendChild(p(this.getTitle(g),mxUtils.bind(this,function(){c=g.id;e=this.getTitle(g);b?x():(this.ui.hideDialog(),d(c))})));f.appendChild(n)})(m[q],q),y++);n.has_more?(g=n.next_cursor,0==y?k():(f.appendChild(u),
-v=function(){f.scrollTop>=f.scrollHeight-f.offsetHeight&&k()},mxEvent.addListener(f,"scroll",v))):0==y&&""==f.innerHTML&&mxUtils.write(f,mxResources.get("noDBs"))}),t)});A()};NotionClient.prototype.logout=function(){this.executeRequest("/removeToken",null,"GET",function(){},function(){});this.setUser(null);b=null}})();DrawioComment=function(b,e,d,c,g,k,n){this.file=b;this.id=e;this.content=d;this.modifiedDate=c;this.createdDate=g;this.isResolved=k;this.user=n;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,d,c,g){e()};DrawioComment.prototype.editComment=function(b,e,d){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DriveComment=function(b,e,d,c,g,k,n,f){DrawioComment.call(this,b,e,d,c,g,k,n);this.pCommentId=f};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,e,d,c,g){b={content:b.content};c?b.verb="resolve":g&&(b.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:b,method:"POST"},mxUtils.bind(this,function(b){e(b.replyId)}),d)};
+v=function(){f.scrollTop>=f.scrollHeight-f.offsetHeight&&k()},mxEvent.addListener(f,"scroll",v))):0==y&&""==f.innerHTML&&mxUtils.write(f,mxResources.get("noDBs"))}),t)});B()};NotionClient.prototype.logout=function(){this.executeRequest("/removeToken",null,"GET",function(){},function(){});this.setUser(null);b=null}})();DrawioComment=function(b,e,d,c,g,k,n){this.file=b;this.id=e;this.content=d;this.modifiedDate=c;this.createdDate=g;this.isResolved=k;this.user=n;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,d,c,g){e()};DrawioComment.prototype.editComment=function(b,e,d){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DriveComment=function(b,e,d,c,g,k,n,f){DrawioComment.call(this,b,e,d,c,g,k,n);this.pCommentId=f};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,e,d,c,g){b={content:b.content};c?b.verb="resolve":g&&(b.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:b,method:"POST"},mxUtils.bind(this,function(b){e(b.replyId)}),d)};
DriveComment.prototype.editComment=function(b,e,d){this.content=b;b={content:b};this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,params:b,method:"PATCH"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,params:b,method:"PATCH"},e,d)};
-DriveComment.prototype.deleteComment=function(b,e){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,e)};App=function(b,e,d){EditorUi.call(this,b,e,null!=d?d:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var b=this.getCurrentFile();if(null!=b&&b.isModified()){var d={category:"DISCARD-FILE-"+b.getHash(),action:(b.savingFile?"saving":"")+(b.savingFile&&null!=b.savingFileTime?"_"+Math.round((Date.now()-b.savingFileTime.getTime())/1E3):"")+(null!=b.saveLevel?"-sl_"+b.saveLevel:"")+"-age_"+(null!=
+DriveComment.prototype.deleteComment=function(b,e){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,e)};function mxODPicker(b,e,d,c,g,k,n,f,l,m,p,q,t){function u(b,c){c=c||document;return c.querySelector(b)}function v(b,d,e){if(null==b["@microsoft.graph.downloadUrl"])if(null==b.parentReference)e();else{c(b.id,b.parentReference.driveId,function(b){v(b,d,e)},e);return}var f=new XMLHttpRequest;f.open("GET",b["@microsoft.graph.downloadUrl"]);var g="image/png"==b.file.mimeType;f.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var b=f.responseText;g&&(b="data:image/png;base64,"+
+Editor.base64Encode(b),b=Editor.extractGraphModelFromPng(b));var c=mxUtils.parseXml(b);if(null!=D.extractGraphModel(c.documentElement)){d(c);return}}catch(O){}e()}};g&&f.overrideMimeType&&f.overrideMimeType("text/plain; charset=x-user-defined");f.send()}function x(){q&&null!=I?D.exportToCanvas(function(b){b=EditorUi.prototype.createImageDataUri(b,null,"png");n(K,b);k(K)},400,null,null,function(b){console.log(b)},600,null,null,null,null,null,I):(n(K,void 0),k(K))}function B(b){function c(b){var c=
+document.createElement("div");c.className="odPreviewStatus";mxUtils.write(c,b);R.appendChild(c);H.stop()}if(null!=R)if(R.innerHTML="",null==b||b.folder)c(mxResources.get("noPreview"));else{H.spin(R);try{null!=b.remoteItem&&(b=b.remoteItem),G=b,v(b,function(c){if(G==b){var d=c.getElementsByTagName("diagram");I=AspectDialog.prototype.createViewer(R,0==d.length?c.documentElement:d[0]);H.stop()}},function(){K=null;c(mxResources.get("notADiagramFile"))})}catch(aa){K=null,c(mxResources.get("notADiagramFile"))}}}
+function A(){var b=u(".odFilesBreadcrumb");b.innerHTML="";for(var c=0;c<N.length-1;c++){var d=document.createElement("span");d.className="odBCFolder";d.innerHTML=mxUtils.htmlEntities(N[c].name||mxResources.get("home"));b.appendChild(d);(function(b,c){d.addEventListener("click",function(){e(null);N=N.slice(0,c);z(b.driveId,b.folderId,b.siteId,b.name)})})(N[c],c);var f=document.createElement("span");f.innerHTML=" &gt; ";b.appendChild(f)}null!=N[N.length-1]&&(c=document.createElement("span"),c.innerHTML=
+mxUtils.htmlEntities(1==N.length?mxResources.get("officeSelDiag"):N[N.length-1].name||mxResources.get("home")),b.appendChild(c))}function y(){if(null!=K&&!L)if("sharepoint"==M)z("site",null,K.id,K.displayName);else if("site"==M)z("subsite",null,K.id,K.name);else{var b=K.folder;K=K.remoteItem?K.remoteItem:K;var c=(K.parentReference?K.parentReference.driveId:null)||M,d=K.id;b?z(c,d,null,K.name):x()}}function z(c,k,n,m,p){function q(d){H.stop();var f=document.createElement("table");f.className="odFileListGrid";
+for(var g=null,k=0,n=0;n<d.length;n++){var m=d[n];if(1!=t||!m.webUrl||0<m.webUrl.indexOf("sharepoint.com/sites/")||0>m.webUrl.indexOf("sharepoint.com/")){var p=m.displayName||m.name,q=mxUtils.htmlEntities(m.description||p),z=Math.round(.7*b.clientWidth/10),p=null!=p&&p.length>z?mxUtils.htmlEntities(p.substring(0,z))+"&hellip;":mxUtils.htmlEntities(p);t&&(m.folder=!0);var u=null!=m.folder;if(!l||u){var v=document.createElement("tr");v.className=k++%2?"odOddRow":"odEvenRow";z=document.createElement("td");
+z.style.width="24px";var D=document.createElement("img");D.src="/images/"+(u?"folder.png":"file.png");D.className="odFileImg";D.width=24;z.appendChild(D);v.appendChild(z);z=document.createElement("td");u=document.createElement("span");u.className="odFileTitle";u.innerHTML=p;u.setAttribute("title",q);z.appendChild(u);v.appendChild(z);f.appendChild(v);null==g&&(g=v,g.className+=" odRowSelected",K=m,M=c,e(K));(function(b,d){v.addEventListener("dblclick",y);v.addEventListener("click",function(){g!=d&&
+(g.className=g.className.replace("odRowSelected",""),g=d,g.className+=" odRowSelected",K=b,M=c,e(K))})})(m,v)}}}0==k?(d=document.createElement("div"),d.className="odEmptyFolder",d.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),C.appendChild(d)):C.appendChild(f);A();L=!1}if(!L){u(".odCatsList").style.display="block";u(".odFilesSec").style.display="block";null!=R&&(R.innerHTML="",R.style.top="50%");var z=L=!0,t=0;P=arguments;var v=setTimeout(function(){L=z=!1;
+H.stop();f(mxResources.get("timeout"))},2E4),C=u(".odFilesList");C.innerHTML="";H.spin(C);var D;switch(c){case "recent":N=[{name:mxResources.get("recent",null,"Recent"),driveId:c}];D=g()||{};var x=[],E;for(E in D)x.push(D[E]);clearTimeout(v);q(x);return;case "shared":D="/me/drive/sharedWithMe";N=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:c}];break;case "sharepoint":D="/sites?search=";N=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:c}];t=1;break;
+case "site":N.push({name:m,driveId:c,folderId:k,siteId:n});D="/sites/"+n+"/drives";t=2;break;case "subsite":N.push({name:m,driveId:c,folderId:k,siteId:n});D="/drives/"+n+(k?"/items/"+k:"/root")+"/children";break;case "search":c=M;N=[{driveId:c,name:mxResources.get("back",null,"Back")}];p=encodeURIComponent(p.replace(/\'/g,"\\'"));D=c?"/drives/"+c+"/root/search(q='"+p+"')":"/me/drive/root/search(q='"+p+"')";break;default:null==k?N=[{driveId:c}]:N.push({name:m,driveId:c,folderId:k}),D=(c?"/drives/"+
+c:"/me/drive")+(k?"/items/"+k:"/root")+"/children"}t||(D+=(0<D.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");d(D,function(b){if(z){clearTimeout(v);b=b.value;for(var c=t?b:[],d=0;!t&&d<b.length;d++){var e=b[d],f=e.file?e.file.mimeType:null;(e.folder||"text/html"==f||"text/xml"==f||"application/xml"==f||"image/png"==f||/\.svg$/.test(e.name)||/\.html$/.test(e.name)||/\.xml$/.test(e.name)||
+/\.png$/.test(e.name)||/\.drawio$/.test(e.name))&&c.push(e)}q(c)}},function(b){if(z){clearTimeout(v);var c=null;try{c=JSON.parse(b.responseText).error.message}catch(ca){}f(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=c?" ("+c+")":""));L=!1;H.stop()}})}}function C(b){Q.className=Q.className.replace("odCatSelected","");Q=b;Q.className+=" odCatSelected"}function F(b){L||(X=null,z("search",null,null,null,b))}var E="";null==e&&(e=B,E='<div style="text-align: center;" class="odPreview"></div>');
+null==g&&(g=function(){var b=null;try{b=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(ga){}return b});null==k&&(k=function(b){if(null!=b){var c=g()||{};delete b["@microsoft.graph.downloadUrl"];c[b.id]=b;localStorage.setItem("mxODPickerRecentList",JSON.stringify(c))}});var E='<div class="odCatsList"><div class="odCatsListLbl">OneDrive</div><div id="odFiles" class="odCatListTitle odCatSelected">'+mxResources.get("files")+'</div><div id="odRecent" class="odCatListTitle">'+mxResources.get("recent")+
+'</div><div id="odShared" class="odCatListTitle">'+mxResources.get("shared")+'</div><div id="odSharepoint" class="odCatListTitle">'+mxResources.get("sharepoint")+'</div></div><div class="odFilesSec"><div class="searchBar" style="display:none"><input type="search" id="odSearchBox" placeholder="'+mxResources.get("search")+'"></div><div class="odFilesBreadcrumb"></div><div id="refreshOD" class="odRefreshButton"><img src="/images/update32.png" width="16" height="16" title="'+mxResources.get("refresh")+
+'Refresh" border="0"/></div><div class="odFilesList"></div></div>'+E+(m?'<div id="odBackBtn" class="odLinkBtn">&lt; '+mxResources.get("back")+"</div>":"")+(p?'<button id="odSubmitBtn" class="odSubmitBtn">'+mxResources.get(l?"save":"open")+"</button>":""),H=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"#000",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),D=new Editor,I=null,K=null,M=null,L=!1,N=[],P=null,G=null;this.getSelectedItem=function(){null!=
+K&&k(K);return K};if(null==u("#mxODPickerCss")){var J=document.head||document.getElementsByTagName("head")[0],W=document.createElement("style");J.appendChild(W);W.type="text/css";W.id="mxODPickerCss";W.appendChild(document.createTextNode(".odCatsList {\tbox-sizing: border-box;\tposition:absolute;\ttop:0px;\tbottom:50%;\twidth:30%;\tborder: 1px solid #CCCCCC;\tborder-bottom:none;\tbackground-color: #FFFFFF;\tdisplay: inline-block;\toverflow-x: hidden;\toverflow-y: auto;}.odCatsListLbl {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;}.odFilesSec {\tbox-sizing: border-box;\tposition:absolute;\tleft:30%;\ttop:0px;\tbottom:50%;\twidth: 70%;\tborder: 1px solid #CCCCCC;\tborder-left:none;\tborder-bottom:none;\tbackground-color: #FFFFFF;\tdisplay: inline-block;\toverflow: hidden;}.odFilesBreadcrumb {\tbox-sizing: border-box;\tposition:absolute;\tmin-height: 32px;\tleft:0px;\tright:20px;\ttext-overflow:ellipsis;\toverflow:hidden;\tfont-size: 13px;\tcolor: #6D6D6D;\tpadding: 5px;}.odRefreshButton {\tbox-sizing: border-box;\tposition:absolute;\tright:0px;\ttop:0px;\tpadding: 4px;\tmargin: 1px;\theight:24px;\tcursor:default;}.odRefreshButton>img {\topacity:0.5;}.odRefreshButton:hover {\tbackground-color:#ddd;\tborder-radius:50%;}.odRefreshButton:active {\topacity:0.7;}.odFilesList {\tbox-sizing: border-box;\tposition:absolute;\ttop:32px;\tbottom:0px;\twidth: 100%;\toverflow-x: hidden;\toverflow-y: auto;}.odFileImg {\tpadding-left: 5px;\tpadding-right: 5px;}.odFileTitle {\tfont-weight: normal;\tcolor: #666666 !important;}.odFileListGrid {\twidth: 100%;\twhite-space: nowrap;\tfont-size: 13px; box-sizing: border-box; border-spacing: 0;}.odOddRow {\tbackground-color: #eeeeee;}.odEvenRow {\tbackground-color: #FFFFFF;}.odRowSelected {\tbackground-color: #cadfff;}.odCatListTitle {\tbox-sizing: border-box;\theight: 17px;\tcolor: #666666;\tfont-size: 14px;\tline-height: 17px;\tmargin: 5px 0 5px 0px; padding-left: 10px;}.odCatSelected {\tfont-weight: bold;\tbackground-color: #cadfff;}.odEmptyFolder {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;\twidth: 100%; text-align: center;}.odBCFolder {\tcursor: pointer;\tcolor: #0432ff;}.odPreviewStatus {\tposition:absolute;\ttext-align:center;\twidth:100%;\ttop:50%;\ttransform: translateY(-50%);\tfont-size:13px;\topacity:0.5;}.odPreview { position:absolute;\t overflow:hidden;\t border: 1px solid #CCCCCC; bottom:0px; top: 50%; left:0px; right:0px;}.odLinkBtn { position: absolute;\tfont-size: 12px;\tcursor: pointer;\tcolor: #6D6D6D;\tleft: 5px;\tbottom: 3px;}.odSubmitBtn { position: absolute;\tcolor: #333;\tright: 5px;\tbottom: 5px;}"))}b.innerHTML=
+E;for(var R=u(".odPreview"),Q=u("#odFiles"),E=function(b,c){c=c||document;return c.querySelectorAll(b)}(".odCatListTitle"),J=0;J<E.length;J++)E[J].addEventListener("click",function(){if(!L)switch(C(this),this.id){case "odFiles":z();break;case "odRecent":z("recent");break;case "odShared":z("shared");break;case "odSharepoint":z("sharepoint")}});var X=null;u("#odSearchBox").addEventListener("keyup",function(b){var c=this;null!=X&&clearTimeout(X);13==b.keyCode?F(c.value):X=setTimeout(function(){F(c.value)},
+500)});u("#refreshOD").addEventListener("click",function(){null!=P&&(e(null),z.apply(this,P))});m&&u("#odBackBtn").addEventListener("click",m);p&&u("#odSubmitBtn").addEventListener("click",x);document.body.onselectstart=function(){return!1};null!=t?(m=t.pop(),"sharepoint"==t[0].driveId&&C(u("#odSharepoint")),N=t,z(m.driveId,m.folderId,m.siteId,m.name)):z()};App=function(b,e,d){EditorUi.call(this,b,e,null!=d?d:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var b=this.getCurrentFile();if(null!=b&&b.isModified()){var d={category:"DISCARD-FILE-"+b.getHash(),action:(b.savingFile?"saving":"")+(b.savingFile&&null!=b.savingFileTime?"_"+Math.round((Date.now()-b.savingFileTime.getTime())/1E3):"")+(null!=b.saveLevel?"-sl_"+b.saveLevel:"")+"-age_"+(null!=
b.ageStart?Math.round((Date.now()-b.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(b.isAutosave()?"":"-noauto")+"-open_"+(null!=b.opened?Math.round((Date.now()-b.opened.getTime())/1E3):"x")+"-save_"+(null!=b.lastSaved?Math.round((Date.now()-b.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=b.lastChanged?Math.round((Date.now()-b.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=b.sync?"client_"+b.sync.clientId:"nosync"};
b.constructor==DriveFile&&null!=b.desc&&null!=this.drive&&(d.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+b.desc.headRevisionId+"-mod_"+b.desc.modifiedDate+"-size_"+b.getSize()+"-mime_"+b.desc.mimeType);EditorUi.logEvent(d)}}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var b=this.getCurrentFile();null!=b&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+b.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?
"on":"off")})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(b,d,e){if("1"==urlParams.openInSameWin||navigator.standalone)e();else{var c=null;try{c=window.open(b)}catch(f){}null==c||void 0===c?this.showDialog((new PopupDialog(this,b,d,e)).container,320,140,!0,!0):null!=d&&d()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(b){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(b)});this.editor.chromeless&&
!this.editor.editable||this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(b=0;b<App.DrawPlugins.length;b++)try{App.DrawPlugins[b](this)}catch(c){null!=window.console&&console.log("Plugin Error:",c,App.DrawPlugins[b])}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}window.Draw.loadPlugin=mxUtils.bind(this,function(b){try{b(this)}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}});setTimeout(mxUtils.bind(this,function(){0<App.embedModePluginsCount&&(App.embedModePluginsCount=
0,this.initializeEmbedMode())}),5E3)}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_GITHUB="github";App.MODE_GITLAB="gitlab";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";App.MODE_NOTION="notion";App.MODE_EMBED="embed";App.DROPBOX_APPKEY=window.DRAWIO_DROPBOX_ID;App.DROPBOX_URL=window.DRAWIO_BASE_URL+"/js/dropbox/Dropbox-sdk.min.js";
-App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";App.ONEDRIVE_URL=mxClient.IS_IE11?"https://js.live.net/v7.2/OneDrive.js":window.DRAWIO_BASE_URL+"/js/onedrive/OneDrive.js";App.ONEDRIVE_INLINE_PICKER_URL=window.DRAWIO_BASE_URL+"/js/onedrive/mxODPicker.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL="https://code.jquery.com/jquery-3.3.1.min.js";App.PUSHER_KEY="1e756b07a690c5bdb054";App.PUSHER_CLUSTER="eu";App.PUSHER_URL="https://js.pusher.com/4.3/pusher.min.js";
-App.SOCKET_IO_URL=window.DRAWIO_BASE_URL+"/js/socket.io/socket.io.min.js";App.SIMPLE_PEER_URL=window.DRAWIO_BASE_URL+"/js/socket.io/simplepeer9.10.0.min.js";App.SOCKET_IO_SRV="http://localhost:3030";App.GOOGLE_APIS="drive-share";App.startTime=new Date;
+App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";App.ONEDRIVE_URL=mxClient.IS_IE11?"https://js.live.net/v7.2/OneDrive.js":window.DRAWIO_BASE_URL+"/js/onedrive/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL="https://code.jquery.com/jquery-3.3.1.min.js";App.PUSHER_KEY="1e756b07a690c5bdb054";App.PUSHER_CLUSTER="eu";App.PUSHER_URL="https://js.pusher.com/4.3/pusher.min.js";App.SOCKET_IO_URL=window.DRAWIO_BASE_URL+"/js/socket.io/socket.io.min.js";
+App.SIMPLE_PEER_URL=window.DRAWIO_BASE_URL+"/js/socket.io/simplepeer9.10.0.min.js";App.SOCKET_IO_SRV="http://localhost:3030";App.GOOGLE_APIS="drive-share";App.startTime=new Date;
App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"plugins/explore.js",ex:"plugins/explore.js",p1:"plugins/p1.js",ac:"plugins/connect.js",acj:"plugins/connectJira.js",ac148:"plugins/cConf-1-4-8.js",ac148cmnt:"plugins/cConf-comments.js",voice:"plugins/voice.js",tips:"plugins/tooltips.js",svgdata:"plugins/svgdata.js",electron:"plugins/electron.js",number:"plugins/number.js",sql:"plugins/sql.js",props:"plugins/props.js",text:"plugins/text.js",anim:"plugins/animation.js",update:"plugins/update.js",trees:"plugins/trees/trees.js",
"import":"plugins/import.js",replay:"plugins/replay.js",anon:"plugins/anonymize.js",tr:"plugins/trello.js",f5:"plugins/rackF5.js",tickets:"plugins/tickets.js",flow:"plugins/flow.js",webcola:"plugins/webcola/webcola.js",rnd:"plugins/random.js",page:"plugins/page.js",gd:"plugins/googledrive.js",tags:"plugins/tags.js"};App.publicPlugin="ex voice tips svgdata number sql props text anim update trees replay anon tickets flow webcola tags".split(" ");
App.loadScripts=function(b,e){for(var d=b.length,c=0;c<d;c++)mxscript(b[c],function(){0==--d&&null!=e&&e()})};
App.getStoredMode=function(){var b=null;null==b&&isLocalStorage&&(b=localStorage.getItem(".mode"));if(null==b&&"undefined"!=typeof Storage){for(var e=document.cookie.split(";"),d=0;d<e.length;d++){var c=mxUtils.trim(e[d]);if("MODE="==c.substring(0,5)){b=c.substring(5);break}}null!=b&&isLocalStorage&&(e=new Date,e.setYear(e.getFullYear()-1),document.cookie="MODE=; expires="+e.toUTCString(),localStorage.setItem(".mode",b))}return b};
(function(){mxClient.IS_CHROMEAPP||("1"!=urlParams.offline&&("db.draw.io"==window.location.hostname&&null==urlParams.mode&&(urlParams.mode="dropbox"),App.mode=urlParams.mode),null==App.mode&&(App.mode=App.getStoredMode()),null!=window.mxscript&&"1"!=urlParams.embed&&("function"===typeof window.DriveClient&&("0"!=urlParams.gapi&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_GOOGLE||null!=urlParams.state&&""==window.location.hash||null!=window.location.hash&&
"#G"==window.location.hash.substring(0,2)?mxscript("https://apis.google.com/js/api.js"):"0"!=urlParams.chrome||null!=window.location.hash&&"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"===window.location.hash.substring(0,45)||(window.DriveClient=null):window.DriveClient=null),"function"===typeof window.DropboxClient&&("0"!=urlParams.db&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?App.mode==App.MODE_DROPBOX||null!=window.location.hash&&"#D"==window.location.hash.substring(0,
-2)?mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY,!0)}):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?"1"==urlParams.inlinePicker||mxClient.IS_ANDROID||mxClient.IS_IOS?
-mxscript(App.ONEDRIVE_INLINE_PICKER_URL,function(){window.OneDrive={}}):mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=null):window.OneDriveClient=null),"function"===typeof window.TrelloClient&&("1"==urlParams.tr&&isSvgBrowser&&!mxClient.IS_IE11&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL)}):"0"==
-urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)))})();App.clearServiceWorker=function(b){navigator.serviceWorker.getRegistrations().then(function(e){if(null!=e&&0<e.length){for(var d=0;d<e.length;d++)e[d].unregister();null!=b&&b()}})};
+2)?mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY,!0)}):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?"0"==urlParams.inlinePicker?mxscript(App.ONEDRIVE_URL):window.OneDrive=
+{}:"0"==urlParams.chrome&&(window.OneDriveClient=null):window.OneDriveClient=null),"function"===typeof window.TrelloClient&&("1"==urlParams.tr&&isSvgBrowser&&!mxClient.IS_IE11&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL)}):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)))})();
+App.clearServiceWorker=function(b){navigator.serviceWorker.getRegistrations().then(function(e){if(null!=e&&0<e.length){for(var d=0;d<e.length;d++)e[d].unregister();null!=b&&b()}})};
App.main=function(b,e){function d(c){mxUtils.getAll("1"!=urlParams.dev?[c]:[c,STYLE_PATH+"/default.xml",STYLE_PATH+"/dark-default.xml"],function(c){function d(){var c=null!=e?e():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&
(null==document.documentMode||9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&
-(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?"1"==urlParams.inlinePicker||mxClient.IS_ANDROID||mxClient.IS_IOS?mxscript(App.ONEDRIVE_INLINE_PICKER_URL,function(){window.OneDrive={};window.DrawOneDriveClientCallback()}):mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&
-"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(c);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[c,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(c[0].getText());
-if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var f=function(b){if(null!=b)for(var c=0;c<b.length;c++)if(!g[b[c]])throw Error(mxResources.get("invalidInput")+' "'+b[c])+'"';return!0},g={},k;for(k in App.pluginRegistry)g[App.pluginRegistry[k]]=!0;var l=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=l&&f(l.plugins)){EditorUi.debug("Setting configuration",JSON.stringify(l));if(null!=l.merge){var n=localStorage.getItem(Editor.configurationKey);
-if(null!=n)try{var m=JSON.parse(n);for(k in l.merge)m[k]=l.merge[k];l=m}catch(B){window.location.hash="",alert(B)}else l=l.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(l)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(B){window.location.hash="",alert(B)}2<c.length&&(Graph.prototype.defaultThemes["default-style2"]=c[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=
-c[2].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?d():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],d))},function(b){b=document.getElementById("geStatus");null!=b&&(b.innerHTML="Error loading page. <a>Please try refreshing.</a>",b.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";d(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}
-function c(){try{if(null!=mxSettings.settings){document.body.style.backgroundColor="dark"==uiTheme||mxSettings.settings.darkMode?"#2a2a2a":"#ffffff";if(null!=mxSettings.settings.autosaveDelay){var b=parseInt(mxSettings.settings.autosaveDelay);!isNaN(b)&&0<b?(DrawioFile.prototype.autosaveDelay=b,EditorUi.debug("Setting autosaveDelay",b)):EditorUi.debug("Invalid autosaveDelay",b)}null!=mxSettings.settings.defaultEdgeLength&&(b=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(b)&&0<b?(Graph.prototype.defaultEdgeLength=
+(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?"0"==urlParams.inlinePicker?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):(window.OneDrive={},window.DrawOneDriveClientCallback()):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||
+10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(c);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[c,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(c[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==
+window.location.hash.substring(0,9))try{var f=function(b){if(null!=b)for(var c=0;c<b.length;c++)if(!g[b[c]])throw Error(mxResources.get("invalidInput")+' "'+b[c])+'"';return!0},g={},k;for(k in App.pluginRegistry)g[App.pluginRegistry[k]]=!0;var l=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=l&&f(l.plugins)){EditorUi.debug("Setting configuration",JSON.stringify(l));if(null!=l.merge){var n=localStorage.getItem(Editor.configurationKey);if(null!=n)try{var m=JSON.parse(n);for(k in l.merge)m[k]=
+l.merge[k];l=m}catch(z){window.location.hash="",alert(z)}else l=l.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(l)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(z){window.location.hash="",alert(z)}2<c.length&&(Graph.prototype.defaultThemes["default-style2"]=c[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=c[2].getDocumentElement());"1"==
+urlParams.dev||EditorUi.isElectronApp?d():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],d))},function(b){b=document.getElementById("geStatus");null!=b&&(b.innerHTML="Error loading page. <a>Please try refreshing.</a>",b.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";d(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function c(){try{if(null!=
+mxSettings.settings){document.body.style.backgroundColor="dark"==uiTheme||mxSettings.settings.darkMode?"#2a2a2a":"#ffffff";if(null!=mxSettings.settings.autosaveDelay){var b=parseInt(mxSettings.settings.autosaveDelay);!isNaN(b)&&0<b?(DrawioFile.prototype.autosaveDelay=b,EditorUi.debug("Setting autosaveDelay",b)):EditorUi.debug("Invalid autosaveDelay",b)}null!=mxSettings.settings.defaultEdgeLength&&(b=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(b)&&0<b?(Graph.prototype.defaultEdgeLength=
b,EditorUi.debug("Using defaultEdgeLength",b)):EditorUi.debug("Invalid defaultEdgeLength",b))}}catch(t){null!=window.console&&console.error(t)}if(null!=Menus.prototype.defaultFonts)for(b=0;b<Menus.prototype.defaultFonts.length;b++){var c=Menus.prototype.defaultFonts[b];"string"!==typeof c&&null!=c.fontFamily&&null!=c.fontUrl&&Graph.addFont(c.fontFamily,c.fontUrl)}mxResources.loadDefaultBundle=!1;d(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}
window.onerror=function(b,c,d,e,f){EditorUi.logError("Global: "+(null!=b?b:""),c,d,e,f,null,!0)};if(window.top==window.self&&(/ac\.draw\.io$/.test(window.location.hostname)||/ac-ent\.draw\.io$/.test(window.location.hostname)||/aj\.draw\.io$/.test(window.location.hostname)))document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>';else{if("1"==urlParams.embed||"1"==urlParams.lightbox){var g=document.getElementById("geInfo");null!=g&&
g.parentNode.removeChild(g)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){g=document.getElementsByTagName("script");if(null!=g&&0<g.length){var k=mxUtils.getTextContent(g[0]);"b02227617087e21bd49f2faa15164112"!=CryptoJS.MD5(k).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",
@@ -11399,9 +11438,9 @@ App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.mod
App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var b=this.editor.appName,e=this.getCurrentFile();this.isOfflineApp()&&(b+=" app");null!=e&&(b=(null!=e.getTitle()?e.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b,b=this.editor.graph,b.invalidateDescendantsWithPlaceholders(b.model.getRoot()),b.view.validate())}};
App.prototype.getThumbnail=function(b,e){var d=!1;try{var c=!0,g=window.setTimeout(mxUtils.bind(this,function(){c=!1;e(null)}),this.timeout),k=mxUtils.bind(this,function(b){window.clearTimeout(g);c&&e(b)});null==this.thumbImageCache&&(this.thumbImageCache={});var n=this.editor.graph,f=n.backgroundImage,l=null!=n.themes&&"darkTheme"==n.defaultThemeName;if(null!=this.pages&&(l||this.currentPage!=this.pages[0])){var m=n.getGlobalVariable,n=this.createTemporaryGraph(l?n.getDefaultStylesheet():n.getStylesheet()),
p=this.pages[0];null!=p.viewState&&null!=p.viewState?(f=p.viewState.backgroundImage,n.backgroundImage=f):this.currentPage==this.pages[0]&&(n.backgroundImage=f);l&&(n.defaultThemeName="default");n.getGlobalVariable=function(b){return"page"==b?p.getName():"pagenumber"==b?1:m.apply(this,arguments)};n.getGlobalVariable=m;document.body.appendChild(n.container);n.model.setRoot(p.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(b){try{n!=this.editor.graph&&
-null!=n.container.parentNode&&n.container.parentNode.removeChild(n.container)}catch(H){b=null}k(b)}),b,this.thumbImageCache,"#ffffff",function(){k()},null,null,null,null,null,null,n,null,null,null,null,"diagram",null),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var q=document.createElement("canvas"),t=n.getGraphBounds(),u=n.view.translate,v=n.view.scale;null!=f&&t.add(new mxRectangle((u.x+f.x)*v,(u.y+f.y)*v,f.width*v,f.height*v));var x=b/t.width,x=Math.min(1,Math.min(3*b/(4*t.height),
-x)),A=Math.floor(t.x),z=Math.floor(t.y);q.setAttribute("width",Math.ceil(x*(t.width+4)));q.setAttribute("height",Math.ceil(x*(t.height+4)));var y=q.getContext("2d");y.scale(x,x);y.translate(-A,-z);var B=n.background;if(null==B||""==B||B==mxConstants.NONE)B="#ffffff";y.save();y.fillStyle=B;y.fillRect(A,z,Math.ceil(t.width+4),Math.ceil(t.height+4));y.restore();if(null!=f){var C=new Image;C.src=f.src;y.drawImage(C,f.x*x,f.y*x,f.width*x,f.height*x)}var E=new mxJsCanvas(q),F=new mxAsyncCanvas(this.thumbImageCache);
-E.images=this.thumbImageCache.images;var I=new mxImageExport;I.drawShape=function(b,c){b.shape instanceof mxShape&&b.shape.checkBounds()&&(c.save(),c.translate(.5,.5),b.shape.paint(c),c.translate(-.5,-.5),c.restore())};I.drawText=function(b,c){};I.drawState(n.getView().getState(n.model.root),F);F.finish(mxUtils.bind(this,function(){try{I.drawState(n.getView().getState(n.model.root),E),n!=this.editor.graph&&null!=n.container.parentNode&&n.container.parentNode.removeChild(n.container)}catch(D){q=null}k(q)}));
+null!=n.container.parentNode&&n.container.parentNode.removeChild(n.container)}catch(I){b=null}k(b)}),b,this.thumbImageCache,"#ffffff",function(){k()},null,null,null,null,null,null,n,null,null,null,null,"diagram",null),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var q=document.createElement("canvas"),t=n.getGraphBounds(),u=n.view.translate,v=n.view.scale;null!=f&&t.add(new mxRectangle((u.x+f.x)*v,(u.y+f.y)*v,f.width*v,f.height*v));var x=b/t.width,x=Math.min(1,Math.min(3*b/(4*t.height),
+x)),B=Math.floor(t.x),A=Math.floor(t.y);q.setAttribute("width",Math.ceil(x*(t.width+4)));q.setAttribute("height",Math.ceil(x*(t.height+4)));var y=q.getContext("2d");y.scale(x,x);y.translate(-B,-A);var z=n.background;if(null==z||""==z||z==mxConstants.NONE)z="#ffffff";y.save();y.fillStyle=z;y.fillRect(B,A,Math.ceil(t.width+4),Math.ceil(t.height+4));y.restore();if(null!=f){var C=new Image;C.src=f.src;y.drawImage(C,f.x*x,f.y*x,f.width*x,f.height*x)}var F=new mxJsCanvas(q),E=new mxAsyncCanvas(this.thumbImageCache);
+F.images=this.thumbImageCache.images;var H=new mxImageExport;H.drawShape=function(b,c){b.shape instanceof mxShape&&b.shape.checkBounds()&&(c.save(),c.translate(.5,.5),b.shape.paint(c),c.translate(-.5,-.5),c.restore())};H.drawText=function(b,c){};H.drawState(n.getView().getState(n.model.root),E);E.finish(mxUtils.bind(this,function(){try{H.drawState(n.getView().getState(n.model.root),F),n!=this.editor.graph&&null!=n.container.parentNode&&n.container.parentNode.removeChild(n.container)}catch(D){q=null}k(q)}));
d=!0}}catch(D){d=!1,null!=n&&n!=this.editor.graph&&null!=n.container.parentNode&&n.container.parentNode.removeChild(n.container)}d||window.clearTimeout(g);return d};App.prototype.createBackground=function(){var b=this.createDiv("background");b.style.position="absolute";b.style.background="white";b.style.left="0px";b.style.top="0px";b.style.bottom="0px";b.style.right="0px";mxUtils.setOpacity(b,100);return b};
(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(e,d){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var c=this.getCurrentFile();e=null!=c?c.getMode():e;e==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):e==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),
this.appIcon.style.cursor="pointer"):e==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=e==App.MODE_DEVICE?"pointer":"default")}if(d)try{if(isLocalStorage)localStorage.setItem(".mode",e);else if("undefined"!=typeof Storage){var g=new Date;g.setYear(g.getFullYear()+1);document.cookie="MODE="+e+"; expires="+g.toUTCString()}}catch(k){}}})();
@@ -11491,9 +11530,9 @@ App.prototype.getLibraryStorageHint=function(b){var e=b.getTitle();b.constructor
mxResources.get("browser")+")":b.constructor==LocalLibrary&&(e+=" ("+mxResources.get("device")+")");return e};App.prototype.restoreLibraries=function(){this.loadLibraries(mxSettings.getCustomLibraries(),mxUtils.bind(this,function(){this.loadLibraries((urlParams.clibs||"").split(";"))}))};
App.prototype.loadLibraries=function(b,e){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var d=mxUtils.bind(this,function(b,c){c||mxSettings.removeCustomLibrary(b);delete this.pendingLibraries[b]}),c=0,g=[],k=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var d=b.length-1;0<=d;d--)null!=g[d]&&this.loadLibrary(g[d]);null!=e&&e()}});if(null!=b)for(var n=0;n<b.length;n++){var f=encodeURIComponent(decodeURIComponent(b[n]));mxUtils.bind(this,function(b,e){if(null!=
b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){c++;var f=mxUtils.bind(this,function(d){delete this.pendingLibraries[b];g[e]=d;c--;k()}),l=mxUtils.bind(this,function(e){d(b,e);c--;k()});this.pendingLibraries[b]=!0;var n=b.substring(0,1);if("L"==n)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var c=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,c,mxUtils.bind(this,function(b){".scratchpad"==c&&null==b&&
-(b=this.emptyLibraryXml);null!=b?f(new StorageLibrary(this,b,c)):l()}),l)}catch(z){l()}}),0);else if("U"==n){var m=decodeURIComponent(b.substring(1));this.isOffline()||this.loadTemplate(m,mxUtils.bind(this,function(b){null!=b&&0<b.length?f(new UrlLibrary(this,b,m)):l()}),function(){l()},null,!0)}else if("R"==n){n=decodeURIComponent(b.substring(1));try{var n=JSON.parse(n),v={id:n[0],title:n[1],downloadUrl:n[2]};this.remoteInvoke("getFileContent",[v.downloadUrl],null,mxUtils.bind(this,function(b){try{f(new RemoteLibrary(this,
-b,v))}catch(z){l()}}),function(){l()})}catch(A){l()}}else if("S"==n&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(b.substring(1)),function(b){f(b)},l)}catch(A){l()}else{var x=null;"G"==n?null!=this.drive&&null!=this.drive.user&&(x=this.drive):"H"==n?null!=this.gitHub&&null!=this.gitHub.getUser()&&(x=this.gitHub):"T"==n?null!=this.trello&&this.trello.isAuthorized()&&(x=this.trello):"D"==n?null!=this.dropbox&&null!=this.dropbox.getUser()&&(x=this.dropbox):"W"==n&&null!=this.oneDrive&&
-null!=this.oneDrive.getUser()&&(x=this.oneDrive);null!=x?x.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(b){try{f(b)}catch(z){l()}}),function(b){l()}):l(!0)}}})(f,n)}k()}};
+(b=this.emptyLibraryXml);null!=b?f(new StorageLibrary(this,b,c)):l()}),l)}catch(A){l()}}),0);else if("U"==n){var m=decodeURIComponent(b.substring(1));this.isOffline()||this.loadTemplate(m,mxUtils.bind(this,function(b){null!=b&&0<b.length?f(new UrlLibrary(this,b,m)):l()}),function(){l()},null,!0)}else if("R"==n){n=decodeURIComponent(b.substring(1));try{var n=JSON.parse(n),v={id:n[0],title:n[1],downloadUrl:n[2]};this.remoteInvoke("getFileContent",[v.downloadUrl],null,mxUtils.bind(this,function(b){try{f(new RemoteLibrary(this,
+b,v))}catch(A){l()}}),function(){l()})}catch(B){l()}}else if("S"==n&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(b.substring(1)),function(b){f(b)},l)}catch(B){l()}else{var x=null;"G"==n?null!=this.drive&&null!=this.drive.user&&(x=this.drive):"H"==n?null!=this.gitHub&&null!=this.gitHub.getUser()&&(x=this.gitHub):"T"==n?null!=this.trello&&this.trello.isAuthorized()&&(x=this.trello):"D"==n?null!=this.dropbox&&null!=this.dropbox.getUser()&&(x=this.dropbox):"W"==n&&null!=this.oneDrive&&
+null!=this.oneDrive.getUser()&&(x=this.oneDrive);null!=x?x.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(b){try{f(b)}catch(A){l()}}),function(b){l()}):l(!0)}}})(f,n)}k()}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var b=this.getCurrentFile();this.commentsSupported()&&"1"!=urlParams.sketch?null==this.commentButton&&(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton",this.commentButton.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;float:left;cursor:pointer;width:24px;height:24px;background-size:24px 24px;background-position:center center;background-repeat:no-repeat;background-image:url("+
Editor.commentImage+");","atlas"==uiTheme?(this.commentButton.style.marginRight="10px",this.commentButton.style.marginTop="-3px"):this.commentButton.style.marginTop="min"==uiTheme?"1px":"-5px",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton),"dark"==uiTheme||"atlas"==uiTheme)&&(this.commentButton.style.filter="invert(100%)"):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),
this.commentButton=null);"1"==urlParams.embed||"draw.io"!=this.getServiceName()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()?null!=urlParams.notif&&this.fetchAndShowNotification(urlParams.notif):(null!=b?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.backgroundColor="#F2931E",this.shareButton.style.borderColor="#F08705",this.shareButton.style.backgroundImage=
@@ -11585,9 +11624,9 @@ new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.spinner.spin
'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+b+"\n"+d+"\n</body>\n</html>";c.saveData(e+(".drawio"==e.substring(e.lenth-7)?"":".drawio")+".html","html",f,"text/html")}))})})}));c.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||!c.isOffline()&&!c.printPdfExport){var b=null==c.pages||1>=c.pages.length,d=document.createElement("div");d.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatPdf"));
e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(e);var f=function(){m!=this&&this.checked?(x.removeAttribute("disabled"),x.checked=!g.pageVisible):(x.setAttribute("disabled","disabled"),x.checked=!1)},e=200,k=1,l=null;if(c.pdfPageExport&&!b){var n=function(){u.value=Math.max(1,Math.min(k,Math.max(parseInt(u.value),parseInt(q.value))));q.value=Math.max(1,Math.min(k,Math.min(parseInt(u.value),parseInt(q.value))))},m=c.addRadiobox(d,"pages",mxResources.get("allPages"),
!0),p=c.addRadiobox(d,"pages",mxResources.get("pages")+":",!1,null,!0),q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";q.setAttribute("value","1");q.setAttribute("type","number");q.setAttribute("min","1");q.style.width="50px";d.appendChild(q);var t=document.createElement("span");mxUtils.write(t,mxResources.get("to"));d.appendChild(t);var u=q.cloneNode(!0);d.appendChild(u);mxEvent.addListener(q,"focus",function(){p.checked=!0});mxEvent.addListener(u,"focus",function(){p.checked=
-!0});mxEvent.addListener(q,"change",n);mxEvent.addListener(u,"change",n);if(null!=c.pages&&(k=c.pages.length,null!=c.currentPage))for(n=0;n<c.pages.length;n++)if(c.currentPage==c.pages[n]){l=n+1;q.value=l;u.value=l;break}q.setAttribute("max",k);u.setAttribute("max",k);mxUtils.br(d);var v=c.addRadiobox(d,"pages",mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),x=c.addCheckbox(d,mxResources.get("crop"),!1,!0),z=c.addCheckbox(d,mxResources.get("grid"),!1,!1);mxEvent.addListener(m,"change",f);
-mxEvent.addListener(p,"change",f);mxEvent.addListener(v,"change",f);e+=64}else v=c.addCheckbox(d,mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),x=c.addCheckbox(d,mxResources.get("crop"),!g.pageVisible||!c.pdfPageExport,!c.pdfPageExport),z=c.addCheckbox(d,mxResources.get("grid"),!1,!1),c.pdfPageExport||mxEvent.addListener(v,"change",f);var f=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==c.getServiceName(),A=null,T=null;if(EditorUi.isElectronApp||f)T=c.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),
-Editor.defaultIncludeDiagram),e+=30;f&&(A=c.addCheckbox(d,mxResources.get("transparentBackground"),!1),e+=30);d=new CustomDialog(c,d,mxUtils.bind(this,function(){var d=null;if(!b)var d=parseInt(q.value),e=parseInt(u.value),d=m.checked||d==l&&e==l?null:{from:Math.max(0,Math.min(k-1,d-1)),to:Math.max(0,Math.min(k-1,e-1))};c.downloadFile("pdf",null,null,!v.checked,b?!0:!m.checked&&null==d,!x.checked,null!=A&&A.checked,null,null,z.checked,null!=T&&T.checked,d)}),null,mxResources.get("export"));c.showDialog(d.container,
+!0});mxEvent.addListener(q,"change",n);mxEvent.addListener(u,"change",n);if(null!=c.pages&&(k=c.pages.length,null!=c.currentPage))for(n=0;n<c.pages.length;n++)if(c.currentPage==c.pages[n]){l=n+1;q.value=l;u.value=l;break}q.setAttribute("max",k);u.setAttribute("max",k);mxUtils.br(d);var v=c.addRadiobox(d,"pages",mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),x=c.addCheckbox(d,mxResources.get("crop"),!1,!0),A=c.addCheckbox(d,mxResources.get("grid"),!1,!1);mxEvent.addListener(m,"change",f);
+mxEvent.addListener(p,"change",f);mxEvent.addListener(v,"change",f);e+=64}else v=c.addCheckbox(d,mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),x=c.addCheckbox(d,mxResources.get("crop"),!g.pageVisible||!c.pdfPageExport,!c.pdfPageExport),A=c.addCheckbox(d,mxResources.get("grid"),!1,!1),c.pdfPageExport||mxEvent.addListener(v,"change",f);var f=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==c.getServiceName(),B=null,R=null;if(EditorUi.isElectronApp||f)R=c.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),
+Editor.defaultIncludeDiagram),e+=30;f&&(B=c.addCheckbox(d,mxResources.get("transparentBackground"),!1),e+=30);d=new CustomDialog(c,d,mxUtils.bind(this,function(){var d=null;if(!b)var d=parseInt(q.value),e=parseInt(u.value),d=m.checked||d==l&&e==l?null:{from:Math.max(0,Math.min(k-1,d-1)),to:Math.max(0,Math.min(k-1,e-1))};c.downloadFile("pdf",null,null,!v.checked,b?!0:!m.checked&&null==d,!x.checked,null!=B&&B.checked,null,null,A.checked,null!=R&&R.checked,d)}),null,mxResources.get("export"));c.showDialog(d.container,
300,e,!0,!0)}else c.showDialog((new PrintDialog(c,mxResources.get("formatPdf"))).container,360,null!=c.pages&&1<c.pages.length&&(c.editor.editable||"1"!=urlParams["hide-pages"])?450:370,!0,!0)}));c.actions.addAction("open...",function(){c.pickFile()});c.actions.addAction("close",function(){function b(){null!=d&&d.removeDraft();c.fileLoaded(null)}var d=c.getCurrentFile();null!=d&&d.isModified()?c.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):
b()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){g.getSelectionCells();if(1==g.getSelectionCount()){var b=g.getSelectionCell(),d=g.view.getState(b);null!=d&&null!=d.shape&&null!=d.shape.stencil&&(b=new EditShapeDialog(c,b,mxResources.get("editShape")+":",630,400),c.showDialog(b.container,640,480,!0,!1),b.init())}}));c.actions.addAction("revisionHistory...",function(){c.isRevisionHistorySupported()?c.spinner.spin(document.body,mxResources.get("loading"))&&c.getRevisions(mxUtils.bind(this,
function(b,d){c.spinner.stop();var e=new RevisionDialog(c,b,d);c.showDialog(e.container,640,480,!0,!0);e.init()}),mxUtils.bind(this,function(b){c.handleError(b)})):c.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});c.actions.addAction("createRevision",function(){c.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");p=c.actions.addAction("synchronize",function(){c.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&
@@ -11606,18 +11645,18 @@ this.tagsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObje
f=e?"findReplace":"find",k=f+"Window";if(null==this[k]){var l=e?"min"==uiTheme?330:300:240;this[k]=new FindWindow(c,document.body.offsetWidth-(l+20),100,l,e?"min"==uiTheme?304:288:170,e);this[k].window.addListener("show",function(){c.fireEvent(new mxEventObject(f))});this[k].window.addListener("hide",function(){c.fireEvent(new mxEventObject(f))});this[k].window.setVisible(!0)}else this[k].window.setVisible(!this[k].window.isVisible())}),null,null,Editor.ctrlKey+"+F");p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,
function(){var b=g.isEnabled()?"findReplaceWindow":"findWindow";return null!=this[b]&&this[b].window.isVisible()}));c.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var b=null==c.pages||1>=c.pages.length;if(b)c.exportVisio();else{var d=document.createElement("div");d.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatVsdx"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(e);
var f=c.addCheckbox(d,mxResources.get("allPages"),!b,b);f.style.marginBottom="16px";b=new CustomDialog(c,d,mxUtils.bind(this,function(){c.exportVisio(!f.checked)}),null,mxResources.get("export"));c.showDialog(b.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&c.actions.addAction("configuration...",function(){var b=localStorage.getItem(Editor.configurationKey),d=[[mxResources.get("reset"),function(b,d){c.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.configurationKey),
-mxEvent.isShiftDown(b)&&(localStorage.removeItem(".drawio-config"),localStorage.removeItem(".mode")),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(F){c.handleError(F)}})}]];EditorUi.isElectronApp||d.push([mxResources.get("share"),function(b,d){if(0<d.value.length)try{var e=JSON.parse(d.value),f=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(e)),g=new EmbedDialog(c,f);c.showDialog(g.container,440,240,!0);g.init()}catch(H){c.handleError(H)}else c.handleError({message:mxResources.get("invalidInput")})}]);
-b=new TextareaDialog(c,mxResources.get("configuration")+":",null!=b?JSON.stringify(JSON.parse(b),null,2):"",function(b){if(null!=b)try{if(0<b.length){var d=JSON.parse(b);localStorage.setItem(Editor.configurationKey,JSON.stringify(d))}else localStorage.removeItem(Editor.configurationKey);c.hideDialog();c.alert(mxResources.get("restartForChangeRequired"))}catch(F){c.handleError(F)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",d);b.textarea.style.width=
+mxEvent.isShiftDown(b)&&(localStorage.removeItem(".drawio-config"),localStorage.removeItem(".mode")),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(E){c.handleError(E)}})}]];EditorUi.isElectronApp||d.push([mxResources.get("share"),function(b,d){if(0<d.value.length)try{var e=JSON.parse(d.value),f=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(e)),g=new EmbedDialog(c,f);c.showDialog(g.container,440,240,!0);g.init()}catch(I){c.handleError(I)}else c.handleError({message:mxResources.get("invalidInput")})}]);
+b=new TextareaDialog(c,mxResources.get("configuration")+":",null!=b?JSON.stringify(JSON.parse(b),null,2):"",function(b){if(null!=b)try{if(0<b.length){var d=JSON.parse(b);localStorage.setItem(Editor.configurationKey,JSON.stringify(d))}else localStorage.removeItem(Editor.configurationKey);c.hideDialog();c.alert(mxResources.get("restartForChangeRequired"))}catch(E){c.handleError(E)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",d);b.textarea.style.width=
"600px";b.textarea.style.height="380px";c.showDialog(b.container,620,460,!0,!1);b.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(b,d){var e=mxUtils.bind(this,function(e){var f=""==e?mxResources.get("automatic"):mxLanguageMap[e],g=null;""!=f&&(g=b.addItem(f,null,mxUtils.bind(this,function(){mxSettings.setLanguage(e);mxSettings.save();mxClient.language=e;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);c.alert(mxResources.get("restartForChangeRequired"))}),
d),(e==mxLanguage||""==e&&null==mxLanguage)&&b.addCheckmark(g,Editor.checkmarkImage));return g});e("");b.addSeparator(d);for(var f in mxLanguageMap)e(f)})));var u=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(b){var c=u.apply(this,arguments);if(null!=c&&"1"!=urlParams.noLangIcon){var d=this.get("language");if(null!=d){d=c.addMenu("",d.funct);d.setAttribute("title",mxResources.get("language"));d.style.width="16px";d.style.paddingTop="2px";d.style.paddingLeft="4px";d.style.zIndex=
"1";d.style.position="absolute";d.style.display="block";d.style.cursor="pointer";d.style.right="17px";"atlas"==uiTheme?(d.style.top="6px",d.style.right="15px"):d.style.top="min"==uiTheme?"2px":"0px";var e=document.createElement("div");e.style.backgroundImage="url("+Editor.globeImage+")";e.style.backgroundPosition="center center";e.style.backgroundRepeat="no-repeat";e.style.backgroundSize="19px 19px";e.style.position="absolute";e.style.height="19px";e.style.width="19px";e.style.marginTop="2px";e.style.zIndex=
"1";d.appendChild(e);mxUtils.setOpacity(d,40);if("atlas"==uiTheme||"dark"==uiTheme)d.style.opacity="0.85",d.style.filter="invert(100%)";document.body.appendChild(d)}}return c}}c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];c.actions.addAction("runLayout",function(){var b=new TextareaDialog(c,"Run Layouts:",JSON.stringify(c.customLayoutConfig,null,2),function(b){if(0<b.length)try{var d=
-JSON.parse(b);c.executeLayoutList(d);c.customLayoutConfig=d}catch(E){c.handleError(E),null!=window.console&&console.error(E)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");b.textarea.style.width="600px";b.textarea.style.height="380px";c.showDialog(b.container,620,460,!0,!0);b.init()});var p=this.get("layout"),v=p.funct;p.funct=function(b,d){v.apply(this,arguments);b.addItem(mxResources.get("orgChart"),null,function(){function b(){"undefined"!==typeof mxOrgChartLayout||
+JSON.parse(b);c.executeLayoutList(d);c.customLayoutConfig=d}catch(F){c.handleError(F),null!=window.console&&console.error(F)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");b.textarea.style.width="600px";b.textarea.style.height="380px";c.showDialog(b.container,620,460,!0,!0);b.init()});var p=this.get("layout"),v=p.funct;p.funct=function(b,d){v.apply(this,arguments);b.addItem(mxResources.get("orgChart"),null,function(){function b(){"undefined"!==typeof mxOrgChartLayout||
c.loadingOrgChart||c.isOffline(!0)?k():c.spinner.spin(document.body,mxResources.get("loading"))&&(c.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",k)})})}):mxscript("js/extensions.min.js",k))}var d=null,e=20,f=20,g=!0,k=function(){c.loadingOrgChart=!1;c.spinner.stop();if("undefined"!==typeof mxOrgChartLayout&&
null!=d&&g){var b=c.editor.graph,k=new mxOrgChartLayout(b,d,e,f),l=b.getDefaultParent();1<b.model.getChildCount(b.getSelectionCell())&&(l=b.getSelectionCell());k.execute(l);g=!1}},l=document.createElement("div"),n=document.createElement("div");n.style.marginTop="6px";n.style.display="inline-block";n.style.width="140px";mxUtils.write(n,mxResources.get("orgChartType")+": ");l.appendChild(n);var m=document.createElement("select");m.style.width="200px";m.style.boxSizing="border-box";for(var n=[mxResources.get("linear"),
mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")],p=0;p<n.length;p++){var y=document.createElement("option");mxUtils.write(y,n[p]);y.value=p;2==p&&y.setAttribute("selected","selected");m.appendChild(y)}mxEvent.addListener(m,"change",function(){d=m.value});l.appendChild(m);n=document.createElement("div");n.style.marginTop="6px";n.style.display="inline-block";
-n.style.width="140px";mxUtils.write(n,mxResources.get("parentChildSpacing")+": ");l.appendChild(n);var q=document.createElement("input");q.type="number";q.value=e;q.style.width="200px";q.style.boxSizing="border-box";l.appendChild(q);mxEvent.addListener(q,"change",function(){e=q.value});n=document.createElement("div");n.style.marginTop="6px";n.style.display="inline-block";n.style.width="140px";mxUtils.write(n,mxResources.get("siblingSpacing")+": ");l.appendChild(n);var t=document.createElement("input");
-t.type="number";t.value=f;t.style.width="200px";t.style.boxSizing="border-box";l.appendChild(t);mxEvent.addListener(t,"change",function(){f=t.value});l=new CustomDialog(c,l,function(){null==d&&(d=2);b()});c.showDialog(l.container,355,140,!0,!0)},d,null,k());b.addSeparator(d);b.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var b=new mxParallelEdgeLayout(g);b.checkOverlap=!0;b.spacing=20;c.executeLayout(function(){b.execute(g.getDefaultParent(),g.isSelectionEmpty()?null:g.getSelectionCells())},
+n.style.width="140px";mxUtils.write(n,mxResources.get("parentChildSpacing")+": ");l.appendChild(n);var q=document.createElement("input");q.type="number";q.value=e;q.style.width="200px";q.style.boxSizing="border-box";l.appendChild(q);mxEvent.addListener(q,"change",function(){e=q.value});n=document.createElement("div");n.style.marginTop="6px";n.style.display="inline-block";n.style.width="140px";mxUtils.write(n,mxResources.get("siblingSpacing")+": ");l.appendChild(n);var z=document.createElement("input");
+z.type="number";z.value=f;z.style.width="200px";z.style.boxSizing="border-box";l.appendChild(z);mxEvent.addListener(z,"change",function(){f=z.value});l=new CustomDialog(c,l,function(){null==d&&(d=2);b()});c.showDialog(l.container,355,140,!0,!0)},d,null,k());b.addSeparator(d);b.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var b=new mxParallelEdgeLayout(g);b.checkOverlap=!0;b.spacing=20;c.executeLayout(function(){b.execute(g.getDefaultParent(),g.isSelectionEmpty()?null:g.getSelectionCells())},
!1)}),d);b.addSeparator(d);c.menus.addMenuItem(b,"runLayout",d,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(b,d){if(!mxClient.IS_CHROMEAPP&&c.isOffline())this.addMenuItems(b,["about"],d);else{var e=b.addItem("Search:",null,null,d,null,null,!1);e.style.backgroundColor=Editor.isDarkMode()?"#505759":"whiteSmoke";e.style.cursor="default";var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","25");f.style.marginLeft=
"8px";mxEvent.addListener(f,"keydown",mxUtils.bind(this,function(b){var c=mxUtils.trim(f.value);13==b.keyCode&&0<c.length?(this.editorUi.openLink("https://www.google.com/search?q=site%3Adiagrams.net+inurl%3A%2Fdoc%2Ffaq%2F+"+encodeURIComponent(c)),f.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:c}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==b.keyCode&&(f.value="")}));e.firstChild.nextSibling.appendChild(f);mxEvent.addGestureListeners(f,
function(b){document.activeElement!=f&&f.focus();mxEvent.consume(b)},function(b){mxEvent.consume(b)},function(b){mxEvent.consume(b)});window.setTimeout(function(){f.focus()},0);EditorUi.isElectronApp?(console.log("electron help menu"),this.addMenuItems(b,"- keyboardShortcuts quickStart support - forkme - about".split(" "),d)):this.addMenuItems(b,"- keyboardShortcuts quickStart support - forkme downloadDesktop - about".split(" "),d)}"1"==urlParams.test&&(b.addSeparator(d),this.addSubmenu("testDevelop",
@@ -11626,9 +11665,9 @@ mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show
d.width+", "+d.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(g.encodeCells(b)))+"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var b=g.getGraphBounds(),c=g.view.translate,d=g.view.scale;g.insertVertex(g.getDefaultParent(),null,"",b.x/d-c.x,b.y/d-c.y,b.width/d,b.height/d,"fillColor=none;strokeColor=red;")}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var b=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):
"",b=new TextareaDialog(c,"Paste Data:",b,function(b){if(0<b.length)try{var d=function(b){function c(b){if(null==p[b]){if(p[b]=!0,null!=f[b]){for(;0<f[b].length;){var e=f[b].pop();c(e)}delete f[b]}}else mxLog.debug(d+": Visited: "+b)}var d=b.parentNode.id,e=b.childNodes;b={};for(var f={},g=null,k={},l=0;l<e.length;l++){var n=e[l];if(null!=n.id&&0<n.id.length)if(null==b[n.id]){b[n.id]=n.id;var m=n.getAttribute("parent");null==m?null!=g?mxLog.debug(d+": Multiple roots: "+n.id):g=n.id:(null==f[m]&&(f[m]=
[]),f[m].push(n.id))}else k[n.id]=n.id}0<Object.keys(k).length?(e=d+": "+Object.keys(k).length+" Duplicates: "+Object.keys(k).join(", "),mxLog.debug(e+" (see console)")):mxLog.debug(d+": Checked");var p={};null==g?mxLog.debug(d+": No root"):(c(g),Object.keys(p).length!=Object.keys(b).length&&(mxLog.debug(d+": Invalid tree: (see console)"),console.log(d+": Invalid tree",f)))};"<"!=b.charAt(0)&&(b=Graph.decompress(b),mxLog.debug("See console for uncompressed XML"),console.log("xml",b));var e=mxUtils.parseXml(b),
-f=c.getPagesForNode(e.documentElement,"mxGraphModel");if(null!=f&&0<f.length)try{var g=c.getHashValueForPages(f);mxLog.debug("Checksum: ",g)}catch(H){mxLog.debug("Error: ",H.message)}else mxLog.debug("No pages found for checksum");var k=e.getElementsByTagName("root");for(b=0;b<k.length;b++)d(k[b]);mxLog.show()}catch(H){c.handleError(H),null!=window.console&&console.error(H)}});b.textarea.style.width="600px";b.textarea.style.height="380px";c.showDialog(b.container,620,460,!0,!0);b.init()}));var x=
-null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var b=new TextareaDialog(c,"Diff/Sync:","",function(b){var d=c.getCurrentFile();if(0<b.length&&null!=d)try{var e=JSON.parse(b);d.patch([e],null,!0);c.hideDialog()}catch(F){c.handleError(F)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(d,e){x=c.getPagesForNode(mxUtils.parseXml(c.getFileData(!0)).documentElement);b.textarea.value="Snapshot updated "+(new Date).toLocaleString()}],["Diff",function(d,
-e){try{b.textarea.value=JSON.stringify(c.diffPages(x,c.pages),null,2)}catch(E){c.handleError(E)}}]]);b.textarea.style.width="600px";b.textarea.style.height="380px";null==x?(x=c.getPagesForNode(mxUtils.parseXml(c.getFileData(!0)).documentElement),b.textarea.value="Snapshot created "+(new Date).toLocaleString()):b.textarea.value=JSON.stringify(c.diffPages(x,c.pages),null,2);c.showDialog(b.container,620,460,!0,!0);b.init()}else c.alert("No pages")}));c.actions.addAction("testInspect",mxUtils.bind(this,
+f=c.getPagesForNode(e.documentElement,"mxGraphModel");if(null!=f&&0<f.length)try{var g=c.getHashValueForPages(f);mxLog.debug("Checksum: ",g)}catch(I){mxLog.debug("Error: ",I.message)}else mxLog.debug("No pages found for checksum");var k=e.getElementsByTagName("root");for(b=0;b<k.length;b++)d(k[b]);mxLog.show()}catch(I){c.handleError(I),null!=window.console&&console.error(I)}});b.textarea.style.width="600px";b.textarea.style.height="380px";c.showDialog(b.container,620,460,!0,!0);b.init()}));var x=
+null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var b=new TextareaDialog(c,"Diff/Sync:","",function(b){var d=c.getCurrentFile();if(0<b.length&&null!=d)try{var e=JSON.parse(b);d.patch([e],null,!0);c.hideDialog()}catch(E){c.handleError(E)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(d,e){x=c.getPagesForNode(mxUtils.parseXml(c.getFileData(!0)).documentElement);b.textarea.value="Snapshot updated "+(new Date).toLocaleString()}],["Diff",function(d,
+e){try{b.textarea.value=JSON.stringify(c.diffPages(x,c.pages),null,2)}catch(F){c.handleError(F)}}]]);b.textarea.style.width="600px";b.textarea.style.height="380px";null==x?(x=c.getPagesForNode(mxUtils.parseXml(c.getFileData(!0)).documentElement),b.textarea.value="Snapshot created "+(new Date).toLocaleString()):b.textarea.value=JSON.stringify(c.diffPages(x,c.pages),null,2);c.showDialog(b.container,620,460,!0,!0);b.init()}else c.alert("No pages")}));c.actions.addAction("testInspect",mxUtils.bind(this,
function(){console.log(c,g.getModel())}));c.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var b=new mxImageExport,c=g.getGraphBounds(),d=g.view.scale,e=mxUtils.createXmlDocument(),f=e.createElement("output");e.appendChild(f);e=new mxXmlCanvas2D(f);e.translate(Math.floor((1-c.x)/d),Math.floor((1-c.y)/d));e.scale(1/d);var k=0,l=e.save;e.save=function(){k++;l.apply(this,arguments)};var n=e.restore;e.restore=function(){k--;n.apply(this,arguments)};var m=b.drawShape;b.drawShape=function(b){mxLog.debug("entering shape",
b,k);m.apply(this,arguments);mxLog.debug("leaving shape",b,k)};b.drawState(g.getView().getState(g.model.root),e);mxLog.show();mxLog.debug(mxUtils.getXml(f));mxLog.debug("stateCounter",k)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,"createSidebarEntry showBoundingBox - testCheckFile testDiff - testInspect - testXmlImageExport - testShowConsole".split(" "),
c)})))}c.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!c.isOffline()?c.showDialog((new MoreShapesDialog(c,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):c.showDialog((new MoreShapesDialog(c,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});c.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(b){g.isEnabled()&&(b=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),b.vertex=!0,b=new EditShapeDialog(c,
@@ -11663,12 +11702,12 @@ mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,n
d):("download"==e&&(e=App.MODE_GOOGLE),null!=d&&0<d.length&&(e==App.MODE_GOOGLE?c.spinner.spin(document.body,mxResources.get("saving"))&&b.saveAs(d,mxUtils.bind(this,function(d){b.desc=d;b.save(!1,mxUtils.bind(this,function(){c.spinner.stop();b.setModified(!1);b.addAllSavedStatus()}),mxUtils.bind(this,function(b){c.handleError(b)}))}),mxUtils.bind(this,function(b){c.handleError(b)})):c.createFile(d,c.getFileData(!0),null,e)))}),mxUtils.bind(this,function(){c.hideDialog()}),mxResources.get("makeCopy"),
mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,c.editor.fileExtensions),c.showDialog(d.container,420,380,!0,!0),d.init()):c.editor.editAsNew(this.editorUi.getFileData(!0),d)}}));c.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=c.getCurrentFile();if(b.getMode()==App.MODE_GOOGLE||b.getMode()==App.MODE_ONEDRIVE){var d=!1;if(b.getMode()==App.MODE_GOOGLE&&null!=b.desc.parents)for(var e=0;e<b.desc.parents.length;e++)if(b.desc.parents[e].isRoot){d=!0;break}c.pickFolder(b.getMode(),
mxUtils.bind(this,function(d){c.spinner.spin(document.body,mxResources.get("moving"))&&b.move(d,mxUtils.bind(this,function(b){c.spinner.stop()}),mxUtils.bind(this,function(b){c.handleError(b)}))}),null,!0,d)}}));this.put("publish",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,["publishLink"],c)})));c.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){c.openLink("https://app.draw.io/")}));c.actions.put("downloadDesktop",new Action(mxResources.get("downloadDesktop")+
-"...",function(){c.openLink("https://get.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var b=c.getCurrentFile();null!=b&&b.share()}catch(B){c.handleError(B)}}));this.put("embed",new Menu(mxUtils.bind(this,function(b,d){var e=c.getCurrentFile();null==e||e.getMode()!=App.MODE_GOOGLE&&e.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(e.getTitle())||this.addMenuItems(b,["liveImage","-"],d);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],d);navigator.standalone||
+"...",function(){c.openLink("https://get.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var b=c.getCurrentFile();null!=b&&b.share()}catch(z){c.handleError(z)}}));this.put("embed",new Menu(mxUtils.bind(this,function(b,d){var e=c.getCurrentFile();null==e||e.getMode()!=App.MODE_GOOGLE&&e.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(e.getTitle())||this.addMenuItems(b,["liveImage","-"],d);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],d);navigator.standalone||
c.isOffline()||this.addMenuItems(b,["embedIframe"],d);"1"==urlParams.embed||c.isOffline()||this.addMenuItems(b,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),d)})));c.addInsertItem=function(b,d,e,f){("plantUml"!=f||EditorUi.enablePlantUml&&!c.isOffline())&&b.addItem(e,null,mxUtils.bind(this,function(){if("fromText"==f||"formatSql"==f||"plantUml"==f||"mermaid"==f){var b=new ParseDialog(c,e,f);c.showDialog(b.container,620,420,!0,!1);c.dialog.container.style.overflow=
-"auto"}else b=new CreateGraphDialog(c,e,f),c.showDialog(b.container,620,420,!0,!1);b.init()}),d,null,k())};var A=function(b,d,e,f){var k=new mxCell(b,new mxGeometry(0,0,d,e),f);k.vertex=!0;b=g.getCenterInsertPoint(g.getBoundingBoxFromGeometry([k],!0));k.geometry.x=b.x;k.geometry.y=b.y;g.getModel().beginUpdate();try{k=g.addCell(k),g.fireEvent(new mxEventObject("cellsInserted","cells",[k]))}finally{g.getModel().endUpdate()}g.scrollCellToVisible(k);g.setSelectionCell(k);g.container.focus();g.editAfterInsert&&
-g.startEditing(k);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(g.view.getState(k))},0);return k};c.actions.put("insertText",new Action(mxResources.get("text"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&g.startEditingAtCell(A("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),null,null,Editor.ctrlKey+"+Shift+X").isEnabled=k;c.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),
-function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&A("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=k;c.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&A("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=k;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&
-A("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=k;c.addInsertMenuItems=mxUtils.bind(this,function(b,d,e){for(var f=0;f<e.length;f++)"-"==e[f]?b.addSeparator(d):c.addInsertItem(b,d,mxResources.get(e[f])+"...",e[f])});this.put("insert",new Menu(mxUtils.bind(this,function(b,d){this.addMenuItems(b,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),d);c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(b,["insertTemplate"],
+"auto"}else b=new CreateGraphDialog(c,e,f),c.showDialog(b.container,620,420,!0,!1);b.init()}),d,null,k())};var B=function(b,d,e,f){var k=new mxCell(b,new mxGeometry(0,0,d,e),f);k.vertex=!0;b=g.getCenterInsertPoint(g.getBoundingBoxFromGeometry([k],!0));k.geometry.x=b.x;k.geometry.y=b.y;g.getModel().beginUpdate();try{k=g.addCell(k),g.fireEvent(new mxEventObject("cellsInserted","cells",[k]))}finally{g.getModel().endUpdate()}g.scrollCellToVisible(k);g.setSelectionCell(k);g.container.focus();g.editAfterInsert&&
+g.startEditing(k);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(g.view.getState(k))},0);return k};c.actions.put("insertText",new Action(mxResources.get("text"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&g.startEditingAtCell(B("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),null,null,Editor.ctrlKey+"+Shift+X").isEnabled=k;c.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),
+function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&B("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=k;c.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&B("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=k;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&
+B("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=k;c.addInsertMenuItems=mxUtils.bind(this,function(b,d,e){for(var f=0;f<e.length;f++)"-"==e[f]?b.addSeparator(d):c.addInsertItem(b,d,mxResources.get(e[f])+"...",e[f])});this.put("insert",new Menu(mxUtils.bind(this,function(b,d){this.addMenuItems(b,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),d);c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(b,["insertTemplate"],
d);b.addSeparator(d);this.addSubmenu("insertLayout",b,d,mxResources.get("layout"));this.addSubmenu("insertAdvanced",b,d,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(b,d){c.addInsertMenuItems(b,d,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(b,d){c.addInsertMenuItems(b,d,["fromText","plantUml","mermaid","-","formatSql"]);b.addItem(mxResources.get("csv")+
"...",null,function(){c.showImportCsvDialog()},d,null,k())})));this.put("openRecent",new Menu(function(b,d){var e=c.getRecent();if(null!=e){for(var f=0;f<e.length;f++)(function(e){var f=e.mode;f==App.MODE_GOOGLE?f="googleDrive":f==App.MODE_ONEDRIVE&&(f="oneDrive");b.addItem(e.title+" ("+mxResources.get(f)+")",null,function(){c.loadFile(e.id)},d)})(e[f]);b.addSeparator(d)}b.addItem(mxResources.get("reset"),null,function(){c.resetRecent()},d)}));this.put("openFrom",new Menu(function(b,d){null!=c.drive?
b.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},d):n&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=c.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickFile(App.MODE_ONEDRIVE)},d):l&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,
@@ -11686,7 +11725,7 @@ isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"..
(d=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(d,function(d){if(200<=d.getStatus()&&299>=d.getStatus()){c.spinner.stop();try{c.loadLibrary(new UrlLibrary(this,d.getText(),b))}catch(D){c.handleError(D,mxResources.get("errorLoadingFile"))}}else c.spinner.stop(),c.handleError(null,mxResources.get("errorLoadingFile"))},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));c.showDialog(b.container,300,80,!0,!0);b.init()},d));"1"==urlParams.confLib&&
(b.addSeparator(d),b.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showRemotelyStoredLibrary(mxResources.get("libraries"))},d))})));this.put("edit",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));p=c.actions.addAction("comments",mxUtils.bind(this,
function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(c,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("comments"));else{var b=!this.commentsWindow.window.isVisible();this.commentsWindow.window.setVisible(b);
-this.commentsWindow.refreshCommentsTime();b&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));c.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));var p=this.get("viewPanels"),z=p.funct;p.funct=function(b,d){z.apply(this,arguments);
+this.commentsWindow.refreshCommentsTime();b&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));c.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));var p=this.get("viewPanels"),A=p.funct;p.funct=function(b,d){A.apply(this,arguments);
c.menus.addMenuItems(b,["tags"],d);c.commentsSupported()&&c.menus.addMenuItems(b,["comments"],d)};this.put("view",new Menu(mxUtils.bind(this,function(b,d){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","tags"]).concat(c.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(b,["-","search"],d);if(isLocalStorage||mxClient.IS_CHROMEAPP){var e=this.addMenuItem(b,"scratchpad",d);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(e,
"https://www.diagrams.net/doc/faq/scratchpad")}this.addMenuItems(b,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",b,d);this.addMenuItems(b,"- scrollbars tooltips ruler - grid guides".split(" "),d);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",d);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),d);"1"!=urlParams.sketch&&this.addMenuItems(b,["-","fullscreen"],d)})));this.put("extras",
new Menu(mxUtils.bind(this,function(b,d){"1"==urlParams.noLangIcon&&(this.addSubmenu("language",b,d),b.addSeparator(d));"1"!=urlParams.embed&&(this.addSubmenu("theme",b,d),b.addSeparator(d));if("undefined"!==typeof MathJax){var e=this.addMenuItem(b,"mathematicalTypesetting",d);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(e,"https://www.diagrams.net/doc/faq/math-typesetting")}this.addMenuItems(b,["copyConnect","collapseExpand","-"],d);"1"!=urlParams.embed&&(isLocalStorage||
@@ -11709,7 +11748,7 @@ this.customFonts[k].name,l=this.customFonts[k].url,f(q,l,!0),this.editorUi.edito
b.isEditing()){var f=b.getSelectedEditingElement();null!=f&&(f=mxUtils.getCurrentStyle(f),null!=f&&(c=Graph.stripQuotes(f.fontFamily),e=Graph.getFontUrl(c,null),null!=e&&(Graph.isGoogleFontUrl(e)?(e=null,d="g"):d="w")))}else f=b.getView().getState(b.getSelectionCell()),null!=f&&(c=f.style[mxConstants.STYLE_FONTFAMILY]||c,"1"!=urlParams["ext-fonts"]?(f=f.style.fontSource,null!=f&&(f=decodeURIComponent(f),Graph.isGoogleFontUrl(f)?d="g":(d="w",e=f))):(d=f.style.FType||d,"w"==d&&(e=this.editorUi.editor.graph.extFonts,
f=null,null!=e&&(f=e.find(function(b){return b.name==c})),e=null!=f?f.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=e&&e.substring(0,PROXY_URL.length)==PROXY_URL&&(e=decodeURIComponent(e.substr((PROXY_URL+"?url=").length)));var g=null;document.activeElement==b.cellEditor.textarea&&(g=b.cellEditor.saveSelection());d=new FontDialog(this.editorUi,c,e,d,mxUtils.bind(this,function(c,d,e){null!=g&&(b.cellEditor.restoreSelection(g),g=null);if(null!=c&&0<c.length)if("1"!=urlParams["ext-fonts"]&&
b.isEditing())b.setFont(c,d);else{b.getModel().beginUpdate();try{b.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(b.setCellStyles(mxConstants.STYLE_FONTFAMILY,c),b.setCellStyles("fontSource",null!=d?encodeURIComponent(d):null),b.setCellStyles("FType",null)):(b.setCellStyles(mxConstants.STYLE_FONTFAMILY,c),"s"!=e&&(b.setCellStyles("FType",e),0==d.indexOf("http://")&&(d=PROXY_URL+"?url="+encodeURIComponent(d)),this.editorUi.editor.graph.addExtFont(c,d)));e=!0;for(var f=0;f<this.customFonts.length;f++)if(this.customFonts[f].name==
-c){e=!1;break}e&&(this.customFonts.push({name:c,url:d}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{b.getModel().endUpdate()}}}));this.editorUi.showDialog(d.container,380,FontDialog.enableWebFonts?250:180,!0,!0);d.init()}),e,null,!0)})))}})();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")};
+c){e=!1;break}e&&(this.customFonts.push({name:c,url:d}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{b.getModel().endUpdate()}}}));this.editorUi.showDialog(d.container,380,Editor.enableWebFonts?250:180,!0,!0);d.init()}),e,null,!0)})))}})();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")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,e,d){this.ui=b;this.page=e;this.previous=this.name=d}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(b,e,d){this.ui=b;this.oldIndex=e;this.newIndex=d}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(b,e,d){this.ui=b;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e),null!=d&&(e.viewState=d,this.neverShown=!1))}
@@ -11783,30 +11822,30 @@ d,e,n,f,l),mxUtils.bind(this,function(b){return this.isTreeEdge(b)}))};Graph.pro
!1;null!=b&&(c="1"==v.getCurrentCellStyle(b).treeMoving);return c}function e(b){var c=!1;null!=b&&(b=x.getParent(b),c=v.view.getState(b),c="tree"==(null!=c?c.style:v.getCellStyle(b)).containerType);return c}function n(b){var c=!1;null!=b&&(b=x.getParent(b),c=v.view.getState(b),v.view.getState(b),c=null!=(null!=c?c.style:v.getCellStyle(b)).childLayout);return c}function f(b){b=v.view.getState(b);if(null!=b){var c=v.getIncomingTreeEdges(b.cell);if(0<c.length&&(c=v.view.getState(c[0]),null!=c&&(c=c.absolutePoints,
null!=c&&0<c.length&&(c=c[c.length-1],null!=c)))){if(c.y==b.y&&Math.abs(c.x-b.getCenterX())<b.width/2)return mxConstants.DIRECTION_SOUTH;if(c.y==b.y+b.height&&Math.abs(c.x-b.getCenterX())<b.width/2)return mxConstants.DIRECTION_NORTH;if(c.x>b.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function l(b,c){c=null!=c?c:!0;v.model.beginUpdate();try{var d=v.model.getParent(b),e=v.getIncomingTreeEdges(b),g=v.cloneCells([e[0],b]);v.model.setTerminal(g[0],v.model.getTerminal(e[0],
!0),!0);var k=f(b),l=d.geometry;k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?g[1].geometry.x+=c?b.geometry.width+10:-g[1].geometry.width-10:g[1].geometry.y+=c?b.geometry.height+10:-g[1].geometry.height-10;v.view.currentRoot!=d&&(g[1].geometry.x-=l.x,g[1].geometry.y-=l.y);var n=v.view.getState(b),m=v.view.scale;if(null!=n){var p=mxRectangle.fromRectangle(n);k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?p.x+=(c?b.geometry.width+10:-g[1].geometry.width-10)*m:p.y+=(c?
-b.geometry.height+10:-g[1].geometry.height-10)*m;var q=v.getOutgoingTreeEdges(v.model.getTerminal(e[0],!0));if(null!=q){for(var t=k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH,u=l=e=0;u<q.length;u++){var y=v.model.getTerminal(q[u],!1);if(k==f(y)){var x=v.view.getState(y);y!=b&&null!=x&&(t&&c!=x.getCenterX()<n.getCenterX()||!t&&c!=x.getCenterY()<n.getCenterY())&&mxUtils.intersects(p,x)&&(e=10+Math.max(e,(Math.min(p.x+p.width,x.x+x.width)-Math.max(p.x,x.x))/m),l=10+Math.max(l,(Math.min(p.y+
-p.height,x.y+x.height)-Math.max(p.y,x.y))/m))}}t?l=0:e=0;for(u=0;u<q.length;u++)if(y=v.model.getTerminal(q[u],!1),k==f(y)&&(x=v.view.getState(y),y!=b&&null!=x&&(t&&c!=x.getCenterX()<n.getCenterX()||!t&&c!=x.getCenterY()<n.getCenterY()))){var B=[];v.traverse(x.cell,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&B.push(c);(null==c||d)&&B.push(b);return null==c||d});v.moveCells(B,(c?1:-1)*e,(c?1:-1)*l)}}}return v.addCells(g,d)}finally{v.model.endUpdate()}}function m(b){v.model.beginUpdate();try{var c=
+b.geometry.height+10:-g[1].geometry.height-10)*m;var q=v.getOutgoingTreeEdges(v.model.getTerminal(e[0],!0));if(null!=q){for(var t=k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH,u=l=e=0;u<q.length;u++){var y=v.model.getTerminal(q[u],!1);if(k==f(y)){var z=v.view.getState(y);y!=b&&null!=z&&(t&&c!=z.getCenterX()<n.getCenterX()||!t&&c!=z.getCenterY()<n.getCenterY())&&mxUtils.intersects(p,z)&&(e=10+Math.max(e,(Math.min(p.x+p.width,z.x+z.width)-Math.max(p.x,z.x))/m),l=10+Math.max(l,(Math.min(p.y+
+p.height,z.y+z.height)-Math.max(p.y,z.y))/m))}}t?l=0:e=0;for(u=0;u<q.length;u++)if(y=v.model.getTerminal(q[u],!1),k==f(y)&&(z=v.view.getState(y),y!=b&&null!=z&&(t&&c!=z.getCenterX()<n.getCenterX()||!t&&c!=z.getCenterY()<n.getCenterY()))){var x=[];v.traverse(z.cell,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&x.push(c);(null==c||d)&&x.push(b);return null==c||d});v.moveCells(x,(c?1:-1)*e,(c?1:-1)*l)}}}return v.addCells(g,d)}finally{v.model.endUpdate()}}function m(b){v.model.beginUpdate();try{var c=
f(b),d=v.getIncomingTreeEdges(b),e=v.cloneCells([d[0],b]);v.model.setTerminal(d[0],e[1],!1);v.model.setTerminal(e[0],e[1],!0);v.model.setTerminal(e[0],b,!1);var g=v.model.getParent(b),k=g.geometry,l=[];v.view.currentRoot!=g&&(e[1].geometry.x-=k.x,e[1].geometry.y-=k.y);v.traverse(b,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});var n=b.geometry.width+40,m=b.geometry.height+40;c==mxConstants.DIRECTION_SOUTH?n=0:c==mxConstants.DIRECTION_NORTH?
(n=0,m=-m):c==mxConstants.DIRECTION_WEST?(n=-n,m=0):c==mxConstants.DIRECTION_EAST&&(m=0);v.moveCells(l,n,m);return v.addCells(e,g)}finally{v.model.endUpdate()}}function p(b,c){v.model.beginUpdate();try{var d=v.model.getParent(b),e=v.getIncomingTreeEdges(b),g=f(b);0==e.length&&(e=[v.createEdge(d,null,"",null,null,v.createCurrentEdgeStyle())],g=c);var k=v.cloneCells([e[0],b]);v.model.setTerminal(k[0],b,!0);if(null==v.model.getTerminal(k[0],!1)){v.model.setTerminal(k[0],k[1],!1);var l=v.getCellStyle(k[1]).newEdgeStyle;
if(null!=l)try{var n=JSON.parse(l),m;for(m in n)v.setCellStyles(m,n[m],[k[0]]),"edgeStyle"==m&&"elbowEdgeStyle"==n[m]&&v.setCellStyles("elbow",g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[k[0]])}catch(ja){}}var e=v.getOutgoingTreeEdges(b),p=d.geometry,l=[];v.view.currentRoot==d&&(p=new mxRectangle);for(n=0;n<e.length;n++){var q=v.model.getTerminal(e[n],!1);null!=q&&l.push(q)}var t=v.view.getBounds(l),u=v.view.translate,y=v.view.scale;g==mxConstants.DIRECTION_SOUTH?
(k[1].geometry.x=null==t?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(t.x+t.width)/y-u.x-p.x+10,k[1].geometry.y+=k[1].geometry.height-p.y+40):g==mxConstants.DIRECTION_NORTH?(k[1].geometry.x=null==t?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(t.x+t.width)/y-u.x+-p.x+10,k[1].geometry.y-=k[1].geometry.height+p.y+40):(k[1].geometry.x=g==mxConstants.DIRECTION_WEST?k[1].geometry.x-(k[1].geometry.width+p.x+40):k[1].geometry.x+(k[1].geometry.width-p.x+40),k[1].geometry.y=null==t?b.geometry.y+
(b.geometry.height-k[1].geometry.height)/2:(t.y+t.height)/y-u.y+-p.y+10);return v.addCells(k,d)}finally{v.model.endUpdate()}}function q(b,c,d){b=v.getOutgoingTreeEdges(b);d=v.view.getState(d);var e=[];if(null!=d&&null!=b){for(var f=0;f<b.length;f++){var g=v.view.getState(v.model.getTerminal(b[f],!1));null!=g&&(!c&&Math.min(g.x+g.width,d.x+d.width)>=Math.max(g.x,d.x)||c&&Math.min(g.y+g.height,d.y+d.height)>=Math.max(g.y,d.y))&&e.push(g)}e.sort(function(b,d){return c?b.x+b.width-d.x-d.width:b.y+b.height-
d.y-d.height})}return e}function t(b,c){var d=f(b),e=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;(d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST)==e&&d!=c?u.actions.get("selectParent").funct():d==c?(e=v.getOutgoingTreeEdges(b),null!=e&&0<e.length&&v.setSelectionCell(v.model.getTerminal(e[0],!1))):(d=v.getIncomingTreeEdges(b),null!=d&&0<d.length&&(e=q(v.model.getTerminal(d[0],!0),e,b),d=v.view.getState(b),null!=d&&(d=mxUtils.indexOf(e,d),0<=d&&(d+=c==mxConstants.DIRECTION_NORTH||
-c==mxConstants.DIRECTION_WEST?-1:1,0<=d&&d<=e.length-1&&v.setSelectionCell(e[d].cell)))))}var u=this,v=u.editor.graph,x=v.getModel(),A=u.menus.createPopupMenu;u.menus.createPopupMenu=function(c,d,e){A.apply(this,arguments);if(1==v.getSelectionCount()){d=v.getSelectionCell();var f=v.getOutgoingTreeEdges(d);c.addSeparator();0<f.length&&(b(v.getSelectionCell())&&this.addMenuItems(c,["selectChildren"],null,e),this.addMenuItems(c,["selectDescendants"],null,e));b(v.getSelectionCell())?(c.addSeparator(),
+c==mxConstants.DIRECTION_WEST?-1:1,0<=d&&d<=e.length-1&&v.setSelectionCell(e[d].cell)))))}var u=this,v=u.editor.graph,x=v.getModel(),B=u.menus.createPopupMenu;u.menus.createPopupMenu=function(c,d,e){B.apply(this,arguments);if(1==v.getSelectionCount()){d=v.getSelectionCell();var f=v.getOutgoingTreeEdges(d);c.addSeparator();0<f.length&&(b(v.getSelectionCell())&&this.addMenuItems(c,["selectChildren"],null,e),this.addMenuItems(c,["selectDescendants"],null,e));b(v.getSelectionCell())?(c.addSeparator(),
0<v.getIncomingTreeEdges(d).length&&this.addMenuItems(c,["selectSiblings","selectParent"],null,e)):0<v.model.getEdgeCount(d)&&this.addMenuItems(c,["selectConnections"],null,e)}};u.actions.addAction("selectChildren",function(){if(v.isEnabled()&&1==v.getSelectionCount()){var b=v.getSelectionCell(),b=v.getOutgoingTreeEdges(b);if(null!=b){for(var c=[],d=0;d<b.length;d++)c.push(v.model.getTerminal(b[d],!1));v.setSelectionCells(c)}}},null,null,"Alt+Shift+X");u.actions.addAction("selectSiblings",function(){if(v.isEnabled()&&
1==v.getSelectionCount()){var b=v.getSelectionCell(),b=v.getIncomingTreeEdges(b);if(null!=b&&0<b.length&&(b=v.getOutgoingTreeEdges(v.model.getTerminal(b[0],!0)),null!=b)){for(var c=[],d=0;d<b.length;d++)c.push(v.model.getTerminal(b[d],!1));v.setSelectionCells(c)}}},null,null,"Alt+Shift+S");u.actions.addAction("selectParent",function(){if(v.isEnabled()&&1==v.getSelectionCount()){var b=v.getSelectionCell(),b=v.getIncomingTreeEdges(b);null!=b&&0<b.length&&v.setSelectionCell(v.model.getTerminal(b[0],
!0))}},null,null,"Alt+Shift+P");u.actions.addAction("selectDescendants",function(b,c){var d=v.getSelectionCell();if(v.isEnabled()&&v.model.isVertex(d)){if(null!=c&&mxEvent.isAltDown(c))v.setSelectionCells(v.model.getTreeEdges(d,null==c||!mxEvent.isShiftDown(c),null==c||!mxEvent.isControlDown(c)));else{var e=[];v.traverse(d,!0,function(b,d){var f=null!=d&&v.isTreeEdge(d);f&&e.push(d);null!=d&&!f||null!=c&&mxEvent.isShiftDown(c)||e.push(b);return null==d||f})}v.setSelectionCells(e)}},null,null,"Alt+Shift+D");
-var z=v.removeCells;v.removeCells=function(c,d){d=null!=d?d:!0;null==c&&(c=this.getDeletableCells(this.getSelectionCells()));d&&(c=this.getDeletableCells(this.addAllEdges(c)));for(var f=[],g=0;g<c.length;g++){var k=c[g];x.isEdge(k)&&e(k)&&(f.push(k),k=x.getTerminal(k,!1));if(b(k)){var l=[];v.traverse(k,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});0<l.length&&(f=f.concat(l),k=v.getIncomingTreeEdges(c[g]),c=c.concat(k))}else null!=k&&f.push(c[g])}c=
-f;return z.apply(this,arguments)};u.hoverIcons.getStateAt=function(c,d,e){return b(c.cell)?null:this.graph.view.getState(this.graph.getCellAt(d,e))};var y=v.duplicateCells;v.duplicateCells=function(c,d){c=null!=c?c:this.getSelectionCells();for(var e=c.slice(0),f=0;f<e.length;f++){var g=v.view.getState(e[f]);if(null!=g&&b(g.cell))for(var k=v.getIncomingTreeEdges(g.cell),g=0;g<k.length;g++)mxUtils.remove(k[g],c)}this.model.beginUpdate();try{var l=y.call(this,c,d);if(l.length==c.length)for(f=0;f<c.length;f++)if(b(c[f])){var n=
-v.getIncomingTreeEdges(l[f]),k=v.getIncomingTreeEdges(c[f]);if(0==n.length&&0<k.length){var m=this.cloneCell(k[0]);this.addEdge(m,v.getDefaultParent(),this.model.getTerminal(k[0],!0),l[f])}}}finally{this.model.endUpdate()}return l};var B=v.moveCells;v.moveCells=function(c,d,e,f,g,k,l){var n=null;this.model.beginUpdate();try{var m=g,p=this.getCurrentCellStyle(g);if(null!=c&&b(g)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var q=0;q<c.length;q++)if(b(c[q])||v.model.isEdge(c[q])&&null==v.model.getTerminal(c[q],
-!0)){g=v.model.getParent(c[q]);break}if(null!=m&&g!=m&&null!=this.view.getState(c[0])){var t=v.getIncomingTreeEdges(c[0]);if(0<t.length){var u=v.view.getState(v.model.getTerminal(t[0],!0));if(null!=u){var y=v.view.getState(m);null!=y&&(d=(y.getCenterX()-u.getCenterX())/v.view.scale,e=(y.getCenterY()-u.getCenterY())/v.view.scale)}}}}n=B.apply(this,arguments);if(null!=n&&null!=c&&n.length==c.length)for(q=0;q<n.length;q++)if(this.model.isEdge(n[q]))b(m)&&0>mxUtils.indexOf(n,this.model.getTerminal(n[q],
+var A=v.removeCells;v.removeCells=function(c,d){d=null!=d?d:!0;null==c&&(c=this.getDeletableCells(this.getSelectionCells()));d&&(c=this.getDeletableCells(this.addAllEdges(c)));for(var f=[],g=0;g<c.length;g++){var k=c[g];x.isEdge(k)&&e(k)&&(f.push(k),k=x.getTerminal(k,!1));if(b(k)){var l=[];v.traverse(k,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});0<l.length&&(f=f.concat(l),k=v.getIncomingTreeEdges(c[g]),c=c.concat(k))}else null!=k&&f.push(c[g])}c=
+f;return A.apply(this,arguments)};u.hoverIcons.getStateAt=function(c,d,e){return b(c.cell)?null:this.graph.view.getState(this.graph.getCellAt(d,e))};var y=v.duplicateCells;v.duplicateCells=function(c,d){c=null!=c?c:this.getSelectionCells();for(var e=c.slice(0),f=0;f<e.length;f++){var g=v.view.getState(e[f]);if(null!=g&&b(g.cell))for(var k=v.getIncomingTreeEdges(g.cell),g=0;g<k.length;g++)mxUtils.remove(k[g],c)}this.model.beginUpdate();try{var l=y.call(this,c,d);if(l.length==c.length)for(f=0;f<c.length;f++)if(b(c[f])){var n=
+v.getIncomingTreeEdges(l[f]),k=v.getIncomingTreeEdges(c[f]);if(0==n.length&&0<k.length){var m=this.cloneCell(k[0]);this.addEdge(m,v.getDefaultParent(),this.model.getTerminal(k[0],!0),l[f])}}}finally{this.model.endUpdate()}return l};var z=v.moveCells;v.moveCells=function(c,d,e,f,g,k,l){var n=null;this.model.beginUpdate();try{var m=g,p=this.getCurrentCellStyle(g);if(null!=c&&b(g)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var q=0;q<c.length;q++)if(b(c[q])||v.model.isEdge(c[q])&&null==v.model.getTerminal(c[q],
+!0)){g=v.model.getParent(c[q]);break}if(null!=m&&g!=m&&null!=this.view.getState(c[0])){var t=v.getIncomingTreeEdges(c[0]);if(0<t.length){var u=v.view.getState(v.model.getTerminal(t[0],!0));if(null!=u){var y=v.view.getState(m);null!=y&&(d=(y.getCenterX()-u.getCenterX())/v.view.scale,e=(y.getCenterY()-u.getCenterY())/v.view.scale)}}}}n=z.apply(this,arguments);if(null!=n&&null!=c&&n.length==c.length)for(q=0;q<n.length;q++)if(this.model.isEdge(n[q]))b(m)&&0>mxUtils.indexOf(n,this.model.getTerminal(n[q],
!0))&&this.model.setTerminal(n[q],m,!0);else if(b(c[q])&&(t=v.getIncomingTreeEdges(c[q]),0<t.length))if(!f)b(m)&&0>mxUtils.indexOf(c,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],m,!0);else if(0==v.getIncomingTreeEdges(n[q]).length){p=m;if(null==p||p==v.model.getParent(c[q]))p=v.model.getTerminal(t[0],!0);f=this.cloneCell(t[0]);this.addEdge(f,v.getDefaultParent(),p,n[q])}}finally{this.model.endUpdate()}return n};if(null!=u.sidebar){var C=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=
-function(c,d,e,f){var g=v.model,k=null;g.beginUpdate();try{if(k=C.apply(this,arguments),b(c))for(var l=0;l<k.length;l++)if(g.isEdge(k[l])&&null==g.getTerminal(k[l],!0)){g.setTerminal(k[l],c,!0);var n=v.getCellGeometry(k[l]);n.points=null;null!=n.getTerminalPoint(!0)&&n.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return k}}var E={88:u.actions.get("selectChildren"),84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},F=u.onKeyDown;u.onKeyDown=function(c){try{if(v.isEnabled()&&
+function(c,d,e,f){var g=v.model,k=null;g.beginUpdate();try{if(k=C.apply(this,arguments),b(c))for(var l=0;l<k.length;l++)if(g.isEdge(k[l])&&null==g.getTerminal(k[l],!0)){g.setTerminal(k[l],c,!0);var n=v.getCellGeometry(k[l]);n.points=null;null!=n.getTerminalPoint(!0)&&n.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return k}}var F={88:u.actions.get("selectChildren"),84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},E=u.onKeyDown;u.onKeyDown=function(c){try{if(v.isEnabled()&&
!v.isEditing()&&b(v.getSelectionCell())&&1==v.getSelectionCount()){var d=null;0<v.getIncomingTreeEdges(v.getSelectionCell()).length&&(9==c.which?d=mxEvent.isShiftDown(c)?m(v.getSelectionCell()):p(v.getSelectionCell()):13==c.which&&(d=l(v.getSelectionCell(),!mxEvent.isShiftDown(c))));if(null!=d&&0<d.length)1==d.length&&v.model.isEdge(d[0])?v.setSelectionCell(v.model.getTerminal(d[0],!1)):v.setSelectionCell(d[d.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(v.view.getState(v.getSelectionCell())),
-v.startEditingAtCell(v.getSelectionCell()),mxEvent.consume(c);else if(mxEvent.isAltDown(c)&&mxEvent.isShiftDown(c)){var e=E[c.keyCode];null!=e&&(e.funct(c),mxEvent.consume(c))}else 37==c.keyCode?(t(v.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(c)):38==c.keyCode?(t(v.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(c)):39==c.keyCode?(t(v.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(c)):40==c.keyCode&&(t(v.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(c))}}catch(G){u.handleError(G)}mxEvent.isConsumed(c)||F.apply(this,arguments)};var I=v.connectVertex;v.connectVertex=function(c,d,e,g,k,n,q){var t=v.getIncomingTreeEdges(c);if(b(c)){var u=f(c),y=u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST,x=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST;return u==d||0==t.length?p(c,d):y==x?m(c):l(c,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)}return I.apply(this,arguments)};v.getSubtree=function(c){var e=
+v.startEditingAtCell(v.getSelectionCell()),mxEvent.consume(c);else if(mxEvent.isAltDown(c)&&mxEvent.isShiftDown(c)){var e=F[c.keyCode];null!=e&&(e.funct(c),mxEvent.consume(c))}else 37==c.keyCode?(t(v.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(c)):38==c.keyCode?(t(v.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(c)):39==c.keyCode?(t(v.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(c)):40==c.keyCode&&(t(v.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
+mxEvent.consume(c))}}catch(G){u.handleError(G)}mxEvent.isConsumed(c)||E.apply(this,arguments)};var H=v.connectVertex;v.connectVertex=function(c,d,e,g,k,n,q){var t=v.getIncomingTreeEdges(c);if(b(c)){var u=f(c),y=u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST,z=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST;return u==d||0==t.length?p(c,d):y==z?m(c):l(c,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)}return H.apply(this,arguments)};v.getSubtree=function(c){var e=
[c];!d(c)&&!b(c)||n(c)||v.traverse(c,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&0>mxUtils.indexOf(e,c)&&e.push(c);(null==c||d)&&0>mxUtils.indexOf(e,b)&&e.push(b);return null==c||d});return e};var D=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){D.apply(this,arguments);(d(this.state.cell)||b(this.state.cell))&&!n(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(b){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(b),mxEvent.getClientY(b),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(b);
-this.graph.isMouseDown=!0;u.hoverIcons.reset();mxEvent.consume(b)})))};var H=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){H.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var K=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){K.apply(this,
+this.graph.isMouseDown=!0;u.hoverIcons.reset();mxEvent.consume(b)})))};var I=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){I.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var K=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){K.apply(this,
arguments);null!=this.moveHandle&&(this.moveHandle.style.display=b?"":"none")};var M=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(b,c){M.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var b=d.apply(this,arguments),e=this.graph;return b.concat([this.addEntry("tree container",
function(){var b=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");b.vertex=!0;var c=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');c.vertex=!0;var d=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");e.geometry.relative=!0;e.edge=!0;c.insertEdge(e,!0);d.insertEdge(e,!1);b.insert(e);b.insert(c);b.insert(d);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var b=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
@@ -11863,7 +11902,7 @@ Menus.prototype.addPopupMenuEditItems=function(b,c,d){u.apply(this,arguments);th
(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),
this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=null);v.apply(this,arguments)};
var x=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(b){x.apply(this,arguments);if(b){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=c&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=c||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};
-EditorUi.prototype.chromelessWindowResize=function(){};var A=Menus.prototype.init;Menus.prototype.init=function(){A.apply(this,arguments);var c=this.editorUi,d=c.editor.graph;c.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";c.actions.get("createShape").label=mxResources.get("shape")+"...";c.actions.get("outline").label=mxResources.get("outline")+"...";c.actions.get("layers").label=mxResources.get("layers")+"...";c.actions.get("tags").label=mxResources.get("tags")+"...";c.actions.get("forkme").visible=
+EditorUi.prototype.chromelessWindowResize=function(){};var B=Menus.prototype.init;Menus.prototype.init=function(){B.apply(this,arguments);var c=this.editorUi,d=c.editor.graph;c.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";c.actions.get("createShape").label=mxResources.get("shape")+"...";c.actions.get("outline").label=mxResources.get("outline")+"...";c.actions.get("layers").label=mxResources.get("layers")+"...";c.actions.get("tags").label=mxResources.get("tags")+"...";c.actions.get("forkme").visible=
"1"!=urlParams.sketch;c.actions.get("downloadDesktop").visible="1"!=urlParams.sketch;var f=c.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(b){c.setDarkMode(!Editor.darkMode)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return Editor.isDarkMode()});c.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){d.popupMenuHandler.hideMenu();c.showImportCsvDialog()}));c.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var b=
new ParseDialog(c,"Insert from Text");c.showDialog(b.container,620,420,!0,!1);b.init()}));c.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var b=new ParseDialog(c,"Insert from Text","formatSql");c.showDialog(b.container,620,420,!0,!1);b.init()}));c.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){e(c)},null,null,Editor.ctrlKey+"+Shift+K"));c.actions.put("toggleFormat",new Action(mxResources.get("format")+
"...",function(){b(c)})).shortcut=c.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!c.isOffline()&&c.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var b=new ParseDialog(c,mxResources.get("plantUml")+"...","plantUml");c.showDialog(b.container,620,420,!0,!1);b.init()}));c.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var b=new ParseDialog(c,mxResources.get("mermaid")+"...","mermaid");c.showDialog(b.container,620,420,!0,!1);
@@ -11880,68 +11919,68 @@ e){"1"==urlParams.sketch?(c.menus.addMenuItems(b,["insertFreehand"],e),c.insertT
620,420,!0,!1);b.init()}),d)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(b,c){for(var d=0;d<m.length;d++)"-"==m[d]?b.addSeparator(c):p(b,c,mxResources.get(m[d])+"...",m[d])})));this.put("view",new Menu(mxUtils.bind(this,function(b,d){c.menus.addMenuItems(b,"grid guides ruler - connectionArrows connectionPoints -".split(" "),d);if("undefined"!==typeof MathJax){var e=c.menus.addMenuItem(b,"mathematicalTypesetting",d);c.menus.addLinkToItem(e,"https://www.diagrams.net/doc/faq/math-typesetting")}c.menus.addMenuItems(b,
["copyConnect","collapseExpand","-"],d);e=c.getCurrentFile();null!=e&&null!=c.fileNode&&(e=null!=e.getTitle()?e.getTitle():c.defaultFilename,/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||this.addMenuItems(b,["properties"],d));c.menus.addMenuItems(b,["pageScale"],d);"1"!=urlParams.sketch?(c.menus.addMenuItems(b,["-","fullscreen"],d),(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&c.menus.addMenuItems(b,["toggleDarkMode"],d)):c.menus.addMenuItems(b,["pageSetup","-","layers","tags"],d)})))};
EditorUi.prototype.installFormatToolbar=function(b){var c=this.editor.graph,d=document.createElement("div");d.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";c.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(e,f){0<c.getSelectionCount()?(b.appendChild(d),d.innerHTML="Selected: "+c.getSelectionCount()):null!=d.parentNode&&d.parentNode.removeChild(d)}))};
-var z=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(b,c,d){var e=m.menus.get(b),f=u.addMenu(mxResources.get(b),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}),t);f.className="geMenuItem";f.style.display="inline-block";f.style.boxSizing="border-box";f.style.top="6px";f.style.marginRight="6px";f.style.height="30px";f.style.paddingTop="6px";f.style.paddingBottom="6px";f.style.cursor="pointer";f.setAttribute("title",mxResources.get(b));m.menus.menuCreated(e,f,"geMenuItem");
+var A=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(b,c,d){var e=m.menus.get(b),f=u.addMenu(mxResources.get(b),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}),t);f.className="geMenuItem";f.style.display="inline-block";f.style.boxSizing="border-box";f.style.top="6px";f.style.marginRight="6px";f.style.height="30px";f.style.paddingTop="6px";f.style.paddingBottom="6px";f.style.cursor="pointer";f.setAttribute("title",mxResources.get(b));m.menus.menuCreated(e,f,"geMenuItem");
null!=d?(f.style.backgroundImage="url("+d+")",f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.width="34px",f.innerHTML=""):c||(f.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",f.style.backgroundPosition="right 6px center",f.style.backgroundRepeat="no-repeat",f.style.paddingRight="22px");return f}function f(b,c,d,e,f,g){var k=document.createElement("a");k.className="geMenuItem";k.style.display="inline-block";
k.style.boxSizing="border-box";k.style.height="30px";k.style.padding="6px";k.style.position="relative";k.style.verticalAlign="top";k.style.top="0px";"1"==urlParams.sketch&&(k.style.borderStyle="none",k.style.boxShadow="none",k.style.padding="6px",k.style.margin="0px");null!=m.statusContainer?q.insertBefore(k,m.statusContainer):q.appendChild(k);null!=g?(k.style.backgroundImage="url("+g+")",k.style.backgroundPosition="center center",k.style.backgroundRepeat="no-repeat",k.style.backgroundSize="24px 24px",
k.style.width="34px"):mxUtils.write(k,b);mxEvent.addListener(k,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}));mxEvent.addListener(k,"click",function(b){"disabled"!=k.getAttribute("disabled")&&c(b);mxEvent.consume(b)});null==d&&(k.style.marginRight="4px");null!=e&&k.setAttribute("title",e);null!=f&&(b=function(){f.isEnabled()?(k.removeAttribute("disabled"),k.style.cursor="pointer"):(k.setAttribute("disabled","disabled"),k.style.cursor="default")},
f.addListener("stateChanged",b),p.addListener("enabledChanged",b),b());return k}function g(b,c,d){d=document.createElement("div");d.className="geMenuItem";d.style.display="inline-block";d.style.verticalAlign="top";d.style.marginRight="6px";d.style.padding="0 4px 0 4px";d.style.height="30px";d.style.position="relative";d.style.top="0px";"1"==urlParams.sketch&&(d.style.boxShadow="none");for(var e=0;e<b.length;e++)null!=b[e]&&("1"==urlParams.sketch&&(b[e].style.padding="10px 8px",b[e].style.width="30px"),
b[e].style.margin="0px",b[e].style.boxShadow="none",d.appendChild(b[e]));null!=c&&mxUtils.setOpacity(d,c);null!=m.statusContainer&&"1"!=urlParams.sketch?q.insertBefore(d,m.statusContainer):q.appendChild(d);return d}function k(){for(var b=q.firstChild;null!=b;){var e=b.nextSibling;"geMenuItem"!=b.className&&"geItem"!=b.className||b.parentNode.removeChild(b);b=e}t=q.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var b=1E3>d||"1"==urlParams.sketch,k=null;
-b||(k=c("diagram"));if("1"==urlParams.sketch)Y.style.left=58>Q.offsetTop-Q.offsetHeight/2?"70px":"10px";else if(e=b?c("diagram",null,Editor.drawLogoImage):null,null!=e&&(k=e),g([k,f(mxResources.get("shapes"),m.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),m.actions.get("image"),b?Editor.shapesImage:null),f(mxResources.get("format"),m.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+m.actions.get("formatPanel").shortcut+")",m.actions.get("image"),b?Editor.formatImage:
-null)],b?60:null),e=c("insert",!0,b?W:null),g([e,f(mxResources.get("delete"),m.actions.get("delete").funct,null,mxResources.get("delete"),m.actions.get("delete"),b?Editor.trashImage:null)],b?60:null),411<=d&&(g([ca,ea],60),520<=d&&(g([ka,640<=d?f("",S.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",S,Editor.zoomInImage):null,640<=d?f("",la.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",la,Editor.zoomOutImage):null],60),720<=d&&(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)))){var l=
+b||(k=c("diagram"));if("1"==urlParams.sketch)X.style.left=58>Q.offsetTop-Q.offsetHeight/2?"70px":"10px";else if(e=b?c("diagram",null,Editor.drawLogoImage):null,null!=e&&(k=e),g([k,f(mxResources.get("shapes"),m.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),m.actions.get("image"),b?Editor.shapesImage:null),f(mxResources.get("format"),m.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+m.actions.get("formatPanel").shortcut+")",m.actions.get("image"),b?Editor.formatImage:
+null)],b?60:null),e=c("insert",!0,b?W:null),g([e,f(mxResources.get("delete"),m.actions.get("delete").funct,null,mxResources.get("delete"),m.actions.get("delete"),b?Editor.trashImage:null)],b?60:null),411<=d&&(g([ca,ea],60),520<=d&&(g([ka,640<=d?f("",T.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",T,Editor.zoomInImage):null,640<=d?f("",la.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",la,Editor.zoomOutImage):null],60),720<=d&&(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)))){var l=
f("",ia.funct,null,mxResources.get("dark"),ia,Editor.isDarkMode()?Editor.lightImage:Editor.darkImage);l.style.opacity="0.4";m.addListener("darkModeChanged",mxUtils.bind(this,function(){l.style.backgroundImage="url("+(Editor.isDarkMode()?Editor.lightImage:Editor.darkImage)+")"}));null!=m.statusContainer&&"1"!=urlParams.sketch?q.insertBefore(l,m.statusContainer):q.appendChild(l)}null!=k&&(mxEvent.disableContextMenu(k),mxEvent.addGestureListeners(k,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||
mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&m.appIconClicked(b)}),null,null));e=m.menus.get("language");null!=e&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=d&&"1"!=urlParams.sketch?(null==ra&&(e=u.addMenu("",e.funct),e.setAttribute("title",mxResources.get("language")),e.className="geToolbarButton",e.style.backgroundImage="url("+Editor.globeImage+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize=
-"24px 24px",e.style.position="absolute",e.style.height="24px",e.style.width="24px",e.style.zIndex="1",e.style.right="8px",e.style.cursor="pointer",e.style.top="1"==urlParams.embed?"12px":"11px",q.appendChild(e),ra=e),m.buttonContainer.style.paddingRight="34px"):(m.buttonContainer.style.paddingRight="4px",null!=ra&&(ra.parentNode.removeChild(ra),ra=null))}z.apply(this,arguments);this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:mxSettings.settings.darkMode);
+"24px 24px",e.style.position="absolute",e.style.height="24px",e.style.width="24px",e.style.zIndex="1",e.style.right="8px",e.style.cursor="pointer",e.style.top="1"==urlParams.embed?"12px":"11px",q.appendChild(e),ra=e),m.buttonContainer.style.paddingRight="34px"):(m.buttonContainer.style.paddingRight="4px",null!=ra&&(ra.parentNode.removeChild(ra),ra=null))}A.apply(this,arguments);this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:mxSettings.settings.darkMode);
var l=document.createElement("div");l.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";l.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(l);"1"==urlParams.sketch&&this.toggleScratchpad();if("1"!=urlParams.sketch&&1E3<=d||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])e(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&
(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));this.keyHandler.bindAction(75,!0,"toggleShapes",!0);if("1"==urlParams.sketch||1E3<=d)if(b(this,!0),"1"==urlParams.sketch){this.formatWindow.window.setClosable(!1);var n=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){n.apply(this,arguments);this.minimized?(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+
150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=parseInt(this.div.style.left)-150+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(b){mxEvent.getSource(b)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.toggleMinimized()}var m=this,p=m.editor.graph;m.toolbar=this.createToolbar(m.createDiv("geToolbar"));m.defaultLibraryName=mxResources.get("untitledLibrary");
var q=document.createElement("div");q.className="geMenubarContainer";var t=null,u=new Menubar(m,q);m.statusContainer=m.createStatusContainer();m.statusContainer.style.position="relative";m.statusContainer.style.maxWidth="";m.statusContainer.style.marginTop="7px";m.statusContainer.style.marginLeft="6px";m.statusContainer.style.color="gray";m.statusContainer.style.cursor="default";var v=m.hideCurrentMenu;m.hideCurrentMenu=function(){v.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};
var x=m.descriptorChanged;m.descriptorChanged=function(){x.apply(this,arguments);var b=m.getCurrentFile();if(null!=b&&null!=b.getTitle()){var c=b.getMode();"google"==c?c="googleDrive":"github"==c?c="gitHub":"gitlab"==c?c="gitLab":"onedrive"==c&&(c="oneDrive");c=mxResources.get(c);q.setAttribute("title",b.getTitle()+(null!=c?" ("+c+")":""))}else q.removeAttribute("title")};m.setStatusText(m.editor.getStatus());q.appendChild(m.statusContainer);m.buttonContainer=document.createElement("div");m.buttonContainer.style.cssText=
-"position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";q.appendChild(m.buttonContainer);m.menubarContainer=m.buttonContainer;m.tabContainer=document.createElement("div");m.tabContainer.className="geTabContainer";m.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";var l=m.diagramContainer.parentNode,A=document.createElement("div");A.style.cssText=
-"position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";m.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";var J=m.menus.get("viewZoom"),W="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,T="1"==urlParams.sketch?document.createElement("div"):null,Q="1"==urlParams.sketch?document.createElement("div"):null,Y="1"==urlParams.sketch?document.createElement("div"):null;m.addListener("darkModeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=
+"position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";q.appendChild(m.buttonContainer);m.menubarContainer=m.buttonContainer;m.tabContainer=document.createElement("div");m.tabContainer.className="geTabContainer";m.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";var l=m.diagramContainer.parentNode,B=document.createElement("div");B.style.cssText=
+"position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";m.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";var J=m.menus.get("viewZoom"),W="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,R="1"==urlParams.sketch?document.createElement("div"):null,Q="1"==urlParams.sketch?document.createElement("div"):null,X="1"==urlParams.sketch?document.createElement("div"):null;m.addListener("darkModeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=
mxUtils.clone(p.stylesheet.styles),this.sidebar.container.innerHTML="",this.sidebar.palettes={},this.sidebar.init(),"1"==urlParams.sketch&&(this.scratchpad=null,this.toggleScratchpad()));p.refresh();p.refreshBackgroundImage();p.view.validateBackground()}));Graph.touchStyle&&(p.panningHandler.isPanningTrigger=function(b){var c=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(c)&&!p.freehand.isDrawing()||mxEvent.isPopupTrigger(c)&&(null==b.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))});
-if(null!=m.hoverIcons){var ga=m.hoverIcons.update;m.hoverIcons.update=function(){p.freehand.isDrawing()||ga.apply(this,arguments)}}if(null!=p.freehand){var ha=p.freehand.createStyle;p.freehand.createStyle=function(b){return ha.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){Q.className="geToolbarContainer";T.className="geToolbarContainer";Y.className="geToolbarContainer";q.className="geToolbarContainer";m.picker=Q;var ba=!1;mxEvent.addListener(q,"mouseenter",function(){m.statusContainer.style.display=
-"inline-block"});mxEvent.addListener(q,"mouseleave",function(){ba||(m.statusContainer.style.display="none")});var aa=mxUtils.bind(this,function(b){null!=m.notificationBtn&&(null!=b?m.notificationBtn.setAttribute("title",b):m.notificationBtn.removeAttribute("title"))});"1"!=urlParams.embed&&m.editor.addListener("statusChanged",mxUtils.bind(this,function(){m.setStatusText(m.editor.getStatus());if(0==m.statusContainer.children.length||1==m.statusContainer.children.length&&null==m.statusContainer.firstChild.getAttribute("class")){null!=
-m.statusContainer.firstChild?aa(m.statusContainer.firstChild.getAttribute("title")):aa(m.editor.getStatus());var b=m.getCurrentFile(),b=null!=b?b.savingStatusKey:DrawioFile.prototype.savingStatusKey;null!=m.notificationBtn&&m.notificationBtn.getAttribute("title")==mxResources.get(b)+"..."?(m.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(b))+'..."src="'+IMAGE_PATH+'/spin.gif">',m.statusContainer.style.display="inline-block",ba=!0):(m.statusContainer.style.display="none",
-ba=!1)}else m.statusContainer.style.display="inline-block",aa(null),ba=!0}));R=c("diagram",null,Editor.drawLogoImage);R.style.boxShadow="none";R.style.opacity="0.4";R.style.padding="6px";R.style.margin="0px";Y.appendChild(R);mxEvent.disableContextMenu(R);mxEvent.addGestureListeners(R,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&this.appIconClicked(b)}),null,null);m.statusContainer.style.position=
+if(null!=m.hoverIcons){var ha=m.hoverIcons.update;m.hoverIcons.update=function(){p.freehand.isDrawing()||ha.apply(this,arguments)}}if(null!=p.freehand){var ga=p.freehand.createStyle;p.freehand.createStyle=function(b){return ga.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){Q.className="geToolbarContainer";R.className="geToolbarContainer";X.className="geToolbarContainer";q.className="geToolbarContainer";m.picker=Q;var aa=!1;mxEvent.addListener(q,"mouseenter",function(){m.statusContainer.style.display=
+"inline-block"});mxEvent.addListener(q,"mouseleave",function(){aa||(m.statusContainer.style.display="none")});var ba=mxUtils.bind(this,function(b){null!=m.notificationBtn&&(null!=b?m.notificationBtn.setAttribute("title",b):m.notificationBtn.removeAttribute("title"))});"1"!=urlParams.embed&&m.editor.addListener("statusChanged",mxUtils.bind(this,function(){m.setStatusText(m.editor.getStatus());if(0==m.statusContainer.children.length||1==m.statusContainer.children.length&&null==m.statusContainer.firstChild.getAttribute("class")){null!=
+m.statusContainer.firstChild?ba(m.statusContainer.firstChild.getAttribute("title")):ba(m.editor.getStatus());var b=m.getCurrentFile(),b=null!=b?b.savingStatusKey:DrawioFile.prototype.savingStatusKey;null!=m.notificationBtn&&m.notificationBtn.getAttribute("title")==mxResources.get(b)+"..."?(m.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(b))+'..."src="'+Editor.tailSpin+'">',m.statusContainer.style.display="inline-block",aa=!0):(m.statusContainer.style.display="none",
+aa=!1)}else m.statusContainer.style.display="inline-block",ba(null),aa=!0}));S=c("diagram",null,Editor.drawLogoImage);S.style.boxShadow="none";S.style.opacity="0.4";S.style.padding="6px";S.style.margin="0px";X.appendChild(S);mxEvent.disableContextMenu(S);mxEvent.addGestureListeners(S,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&this.appIconClicked(b)}),null,null);m.statusContainer.style.position=
"";m.statusContainer.style.display="none";m.statusContainer.style.margin="0px";m.statusContainer.style.padding="6px 0px";m.statusContainer.style.maxWidth=Math.min(d-240,280)+"px";m.statusContainer.style.display="inline-block";m.statusContainer.style.textOverflow="ellipsis";m.buttonContainer.style.position="";m.buttonContainer.style.paddingRight="0px";m.buttonContainer.style.display="inline-block";var Z=document.createElement("a");Z.style.padding="0px";Z.style.boxShadow="none";Z.className="geMenuItem";
Z.style.display="inline-block";Z.style.width="40px";Z.style.height="12px";Z.style.marginBottom="-2px";Z.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";Z.style.backgroundPosition="top center";Z.style.backgroundRepeat="no-repeat";Z.setAttribute("title","Minimize");var ja=!1,da=mxUtils.bind(this,function(){Q.innerHTML="";if(!ja){var b=function(b,d,e){b=f("",b.funct,null,d,b,e);b.style.width="40px";return c(b,null,"pointer")},c=function(b,c,d){null!=c&&b.setAttribute("title",c);b.style.cursor=
null!=d?d:"default";b.style.margin="2px 0px";Q.appendChild(b);mxUtils.br(Q);return b};c(m.sidebar.createVertexTemplate("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;",40,20,"Text",mxResources.get("text"),!0,!0,null,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");c(m.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;fontSize=24;pointerEvents=1;"+
-("0"!=urlParams.rough?"sketch=1;jiggle=2;":""),140,160,"",mxResources.get("note"),!0,!0,null,!0),mxResources.get("note"));c(m.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!0,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");c(m.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!0,null,!0),mxResources.get("ellipse"));(function(){var b=new mxCell("",new mxGeometry(0,0,p.defaultEdgeLength,
-0),"edgeStyle=none;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=open;sourcePerimeterSpacing=8;targetPerimeterSpacing=8;fontSize=16;"+("0"!=urlParams.rough?"sketch=1;":""));b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,0),!1);b.geometry.points=[];b.geometry.relative=!0;b.edge=!0;c(m.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,b.geometry.height,mxResources.get("line"),!1,null,!0),mxResources.get("line"));
-b=b.clone();b.style+="shape=flexArrow;rounded=1;startSize=8;endSize=8;";b.geometry.width=p.defaultEdgeLength+20;b.geometry.setTerminalPoint(new mxPoint(0,20),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,20),!1);b=c(m.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,40,mxResources.get("arrow"),!1,null,!0),mxResources.get("arrow"));b.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");b.style.paddingBottom="14px";b.style.marginBottom="14px"})();b(m.actions.get("insertFreehand"),
-mxResources.get("freehand"),Editor.freehandImage);var d=m.actions.get("toggleShapes");b(d,mxResources.get("shapes")+" ("+d.shortcut+")",W);b(m.actions.get("insertTemplate"),mxResources.get("template"),Editor.templateImage)}Q.appendChild(Z)});mxEvent.addListener(Z,"click",mxUtils.bind(this,function(){ja?(mxUtils.setPrefixedStyle(Q.style,"transform","translate(0, -50%)"),Q.style.padding="8px 6px 4px",Q.style.top="50%",Q.style.bottom="",Q.style.height="",Z.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+
-")",Z.style.width="40px",Z.style.height="12px",Z.setAttribute("title","Minimize"),ja=!1,da()):(Q.innerHTML="",Q.appendChild(Z),mxUtils.setPrefixedStyle(Q.style,"transform","translate(0, 0)"),Q.style.top="",Q.style.bottom="12px",Q.style.padding="0px",Q.style.height="24px",Z.style.height="24px",Z.style.backgroundImage="url("+Editor.plusImage+")",Z.setAttribute("title",mxResources.get("insert")),Z.style.width="24px",ja=!0)}));da();m.addListener("darkModeChanged",mxUtils.bind(this,function(){da()}))}else m.editor.addListener("statusChanged",
-mxUtils.bind(this,function(){m.setStatusText(m.editor.getStatus())}));if(null!=J){var N=function(b){p.popupMenuHandler.hideMenu();mxEvent.isAltDown(b)?m.actions.get("customZoom").funct():m.actions.get("smartFit").funct()},S=m.actions.get("zoomIn"),la=m.actions.get("zoomOut"),U=m.actions.get("resetView"),fa=m.actions.get("fullscreen"),ia=m.actions.get("toggleDarkMode"),na=m.actions.get("undo"),V=m.actions.get("redo"),ca=f("",na.funct,null,mxResources.get("undo")+" ("+na.shortcut+")",na,Editor.undoImage),
-ea=f("",V.funct,null,mxResources.get("redo")+" ("+V.shortcut+")",V,Editor.redoImage),ka=f("",N,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",U,Editor.zoomFitImage),U=f("",fa.funct,null,mxResources.get("fullscreen"),fa,Editor.fullscreenImage);if(null!=T){var pa=m.actions.get("delete"),oa=f("",pa.funct,null,mxResources.get("delete"),pa,Editor.trashImage);oa.style.opacity="0.1";Y.appendChild(oa);pa.addListener("stateChanged",function(){oa.style.opacity=pa.enabled?"0.4":"0.1"});J=function(){ca.style.display=
-0<m.editor.undoManager.history.length||p.isEditing()?"inline-block":"none";ea.style.display=ca.style.display;ca.style.opacity=na.enabled?"0.4":"0.1";ea.style.opacity=V.enabled?"0.4":"0.1"};Y.appendChild(ca);Y.appendChild(ea);na.addListener("stateChanged",J);V.addListener("stateChanged",J);J();null!=urlParams.layers&&(J=m.actions.get("layers"),J=f("",J.funct,null,mxResources.get("layers"),J,Editor.layersImage),J.style.opacity="0.4",T.appendChild(J));null!=urlParams.tags&&(J=m.actions.get("tags"),J=
-f("",J.funct,null,mxResources.get("tags"),J,Editor.tagsImage),J.style.opacity="0.4",T.appendChild(J));J=m.actions.get("outline");J=f("",J.funct,null,mxResources.get("outline"),J,Editor.outlineImage);J.style.opacity="0.4";T.appendChild(J);J=f("",la.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",la,Editor.zoomOutImage);J.style.opacity="0.4";T.appendChild(J);var R=document.createElement("div");R.innerHTML="100%";R.setAttribute("title",mxResources.get("fitWindow")+"/"+mxResources.get("resetView")+
-" (Enter)");R.style.display="inline-block";R.style.cursor="pointer";R.style.textAlign="center";R.style.whiteSpace="nowrap";R.style.paddingRight="10px";R.style.textDecoration="none";R.style.verticalAlign="top";R.style.padding="6px 0";R.style.fontSize="14px";R.style.width="40px";R.style.opacity="0.4";T.appendChild(R);mxEvent.addListener(R,"click",N);N=f("",S.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",S,Editor.zoomInImage);N.style.opacity="0.4";T.appendChild(N);var ma=
-f("",ia.funct,null,mxResources.get("dark"),ia,Editor.isDarkMode()?Editor.lightImage:Editor.darkImage);ma.style.opacity="0.4";(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&T.appendChild(ma);m.addListener("darkModeChanged",mxUtils.bind(this,function(){ma.style.backgroundImage="url("+(Editor.isDarkMode()?Editor.lightImage:Editor.darkImage)+")"}));fa.visible&&(U.style.opacity="0.4",T.appendChild(U));var X=this.createPageMenuTab(!1);X.style.display="none";X.style.position="";X.style.marginLeft=
-"";X.style.top="";X.style.left="";X.style.height="100%";X.style.lineHeight="";X.style.borderStyle="none";X.style.padding="3px 0";X.style.margin="0px";X.style.background="";X.style.border="";X.style.boxShadow="none";X.style.verticalAlign="top";X.firstChild.style.height="100%";X.firstChild.style.opacity="0.6";X.firstChild.style.margin="0px";T.appendChild(X);m.addListener("fileDescriptorChanged",function(){X.style.display="1"==urlParams.pages||null!=m.pages&&1<m.pages.length?"inline-block":"none"});
-m.tabContainer.style.visibility="hidden";q.style.cssText="position:absolute;right:12px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";Y.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
-T.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";A.appendChild(Y);A.appendChild(T);Q.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";A.appendChild(Q);window.setTimeout(function(){mxUtils.setPrefixedStyle(Q.style,
-"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(A)}else q.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;",this.tabContainer.style.right="70px",R=u.addMenu("100%",J.funct),R.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)"),R.style.whiteSpace="nowrap",R.style.paddingRight="10px",R.style.textDecoration="none",R.style.textDecoration="none",R.style.overflow="hidden",
-R.style.visibility="hidden",R.style.textAlign="center",R.style.cursor="pointer",R.style.height=parseInt(m.tabContainerHeight)-1+"px",R.style.lineHeight=parseInt(m.tabContainerHeight)+1+"px",R.style.position="absolute",R.style.display="block",R.style.fontSize="12px",R.style.width="59px",R.style.right="0px",R.style.bottom="0px",R.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")",R.style.backgroundPosition="right 6px center",R.style.backgroundRepeat="no-repeat",A.appendChild(R);fa=mxUtils.bind(this,
-function(){R.innerHTML=Math.round(100*m.editor.graph.view.scale)+"%"});m.editor.graph.view.addListener(mxEvent.EVENT_SCALE,fa);m.editor.addListener("resetGraphView",fa);m.editor.addListener("pageSelected",fa);var ta=m.setGraphEnabled;m.setGraphEnabled=function(){ta.apply(this,arguments);null!=this.tabContainer&&(R.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==T?this.tabContainerHeight+"px":"0px")}}A.appendChild(q);
-A.appendChild(m.diagramContainer);l.appendChild(A);m.updateTabContainer();null==T&&A.appendChild(m.tabContainer);var ra=null;k();mxEvent.addListener(window,"resize",function(){k();null!=m.sidebarWindow&&m.sidebarWindow.window.fit();null!=m.formatWindow&&m.formatWindow.window.fit();null!=m.actions.outlineWindow&&m.actions.outlineWindow.window.fit();null!=m.actions.layersWindow&&m.actions.layersWindow.window.fit();null!=m.menus.tagsWindow&&m.menus.tagsWindow.window.fit();null!=m.menus.findWindow&&m.menus.findWindow.window.fit();
-null!=m.menus.findReplaceWindow&&m.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,d,e,n){var f=d.y,g=d.x,k=!1,p=!1;if(null!=this.states&&null!=c&&null!=d){var q=this,t=new mxCellState,u=this.graph.getView().scale,v=Math.max(2,this.getGuideTolerance()/2);t.x=c.x+g;t.y=c.y+f;t.width=c.width;t.height=c.height;for(var x=[],A=[],z=0;z<this.states.length;z++){var y=this.states[z];y instanceof mxCellState&&(n||!this.graph.isCellSelected(y.cell))&&((t.x>=y.x&&t.x<=y.x+y.width||y.x>=t.x&&y.x<=t.x+t.width)&&(t.y>
-y.y+y.height+4||t.y+t.height+4<y.y)?x.push(y):(t.y>=y.y&&t.y<=y.y+y.height||y.y>=t.y&&y.y<=t.y+t.height)&&(t.x>y.x+y.width+4||t.x+t.width+4<y.x)&&A.push(y))}var B=0,C=0,E=y=0,F=0,I=0,D=0,H=0,K=5*u;if(1<x.length){x.push(t);x.sort(function(b,c){return b.y-c.y});var M=!1,z=t==x[0],u=t==x[x.length-1];if(!z&&!u)for(z=1;z<x.length-1;z++)if(t==x[z]){u=x[z-1];z=x[z+1];y=C=E=(z.y-u.y-u.height-t.height)/2;break}for(z=0;z<x.length-1;z++){var u=x[z],L=x[z+1],P=t==u||t==L,L=L.y-u.y-u.height,M=M|t==u;if(0==C&&
-0==B)C=L,B=1;else if(Math.abs(C-L)<=(P||1==z&&M?v:0))B+=1;else if(1<B&&M){x=x.slice(0,z+1);break}else if(3<=x.length-z&&!M)B=0,y=C=0!=E?E:0,x.splice(0,0==z?1:z),z=-1;else break;0!=y||P||(C=y=L)}3==x.length&&x[1]==t&&(y=0)}if(1<A.length){A.push(t);A.sort(function(b,c){return b.x-c.x});M=!1;z=t==A[0];u=t==A[A.length-1];if(!z&&!u)for(z=1;z<A.length-1;z++)if(t==A[z]){u=A[z-1];z=A[z+1];D=I=H=(z.x-u.x-u.width-t.width)/2;break}for(z=0;z<A.length-1;z++){u=A[z];L=A[z+1];P=t==u||t==L;L=L.x-u.x-u.width;M|=t==
-u;if(0==I&&0==F)I=L,F=1;else if(Math.abs(I-L)<=(P||1==z&&M?v:0))F+=1;else if(1<F&&M){A=A.slice(0,z+1);break}else if(3<=A.length-z&&!M)F=0,D=I=0!=H?H:0,A.splice(0,0==z?1:z),z=-1;else break;0!=D||P||(I=D=L)}3==A.length&&A[1]==t&&(D=0)}v=function(b,c,d,e){var f=[],g;e?(e=K,g=0):(e=0,g=K);f.push(new mxPoint(b.x-e,b.y-g));f.push(new mxPoint(b.x+e,b.y+g));f.push(b);f.push(c);f.push(new mxPoint(c.x-e,c.y-g));f.push(new mxPoint(c.x+e,c.y+g));if(null!=d)return d.points=f,d;b=new mxPolyline(f,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);b.dialect=mxConstants.DIALECT_SVG;b.pointerEvents=!1;b.init(q.graph.getView().getOverlayPane());return b};I=function(b,c){if(b&&null!=q.guidesArrHor)for(var d=0;d<q.guidesArrHor.length;d++)q.guidesArrHor[d].node.style.visibility="hidden";if(c&&null!=q.guidesArrVer)for(d=0;d<q.guidesArrVer.length;d++)q.guidesArrVer[d].node.style.visibility="hidden"};if(1<F&&F==A.length-1){F=[];H=q.guidesArrHor;k=[];g=0;z=A[0]==t?1:0;M=A[z].y+A[z].height;if(0<D)for(z=0;z<A.length-1;z++)u=
-A[z],L=A[z+1],t==u?(g=L.x-u.width-D,k.push(new mxPoint(g+u.width+K,M)),k.push(new mxPoint(L.x-K,M))):t==L?(k.push(new mxPoint(u.x+u.width+K,M)),g=u.x+u.width+D,k.push(new mxPoint(g-K,M))):(k.push(new mxPoint(u.x+u.width+K,M)),k.push(new mxPoint(L.x-K,M)));else u=A[0],z=A[2],g=u.x+u.width+(z.x-u.x-u.width-t.width)/2,k.push(new mxPoint(u.x+u.width+K,M)),k.push(new mxPoint(g-K,M)),k.push(new mxPoint(g+t.width+K,M)),k.push(new mxPoint(z.x-K,M));for(z=0;z<k.length;z+=2)A=k[z],D=k[z+1],A=v(A,D,null!=H?
-H[z/2]:null),A.node.style.visibility="visible",A.redraw(),F.push(A);for(z=k.length/2;null!=H&&z<H.length;z++)H[z].destroy();q.guidesArrHor=F;g-=c.x;k=!0}else I(!0);if(1<B&&B==x.length-1){F=[];H=q.guidesArrVer;p=[];f=0;z=x[0]==t?1:0;B=x[z].x+x[z].width;if(0<y)for(z=0;z<x.length-1;z++)u=x[z],L=x[z+1],t==u?(f=L.y-u.height-y,p.push(new mxPoint(B,f+u.height+K)),p.push(new mxPoint(B,L.y-K))):t==L?(p.push(new mxPoint(B,u.y+u.height+K)),f=u.y+u.height+y,p.push(new mxPoint(B,f-K))):(p.push(new mxPoint(B,u.y+
-u.height+K)),p.push(new mxPoint(B,L.y-K)));else u=x[0],z=x[2],f=u.y+u.height+(z.y-u.y-u.height-t.height)/2,p.push(new mxPoint(B,u.y+u.height+K)),p.push(new mxPoint(B,f-K)),p.push(new mxPoint(B,f+t.height+K)),p.push(new mxPoint(B,z.y-K));for(z=0;z<p.length;z+=2)A=p[z],D=p[z+1],A=v(A,D,null!=H?H[z/2]:null,!0),A.node.style.visibility="visible",A.redraw(),F.push(A);for(z=p.length/2;null!=H&&z<H.length;z++)H[z].destroy();q.guidesArrVer=F;f-=c.y;p=!0}else I(!1,!0)}if(k||p)return t=new mxPoint(g,f),x=b.call(this,
-c,t,e,n),k&&!p?t.y=x.y:p&&!k&&(t.x=x.x),x.y!=t.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),x.x!=t.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),t;I(!0,!0);return b.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(b){e.call(this,b);var c=this.guidesArrVer,d=this.guidesArrHor;if(null!=c)for(var n=0;n<c.length;n++)c[n].node.style.visibility=b?"visible":"hidden";if(null!=
+("0"!=urlParams.rough?"sketch=1;jiggle=2;":""),140,160,"",mxResources.get("note"),!0,!0,null,!0),mxResources.get("note"));c(m.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!0,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");c(m.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!0,null,!0),mxResources.get("ellipse"));(function(){var b="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;endArrow=open;sourcePerimeterSpacing=8;targetPerimeterSpacing=8;fontSize=16;"+
+("0"!=urlParams.rough?"sketch=1;":""),d=new mxCell("",new mxGeometry(0,0,p.defaultEdgeLength,0),b+"curved=1;rounded=0;");d.geometry.setTerminalPoint(new mxPoint(0,0),!0);d.geometry.setTerminalPoint(new mxPoint(d.geometry.width,0),!1);d.geometry.points=[];d.geometry.relative=!0;d.edge=!0;c(m.sidebar.createEdgeTemplateFromCells([d],d.geometry.width,d.geometry.height,mxResources.get("line"),!1,null,!0),mxResources.get("line"));d=d.clone();d.style=b+"shape=flexArrow;rounded=1;startSize=8;endSize=8;";
+d.geometry.width=p.defaultEdgeLength+20;d.geometry.setTerminalPoint(new mxPoint(0,20),!0);d.geometry.setTerminalPoint(new mxPoint(d.geometry.width,20),!1);b=c(m.sidebar.createEdgeTemplateFromCells([d],d.geometry.width,40,mxResources.get("arrow"),!1,null,!0),mxResources.get("arrow"));b.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");b.style.paddingBottom="14px";b.style.marginBottom="14px"})();b(m.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);
+var d=m.actions.get("toggleShapes");b(d,mxResources.get("shapes")+" ("+d.shortcut+")",W);b(m.actions.get("insertTemplate"),mxResources.get("template"),Editor.templateImage)}Q.appendChild(Z)});mxEvent.addListener(Z,"click",mxUtils.bind(this,function(){ja?(mxUtils.setPrefixedStyle(Q.style,"transform","translate(0, -50%)"),Q.style.padding="8px 6px 4px",Q.style.top="50%",Q.style.bottom="",Q.style.height="",Z.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Z.style.width="40px",Z.style.height=
+"12px",Z.setAttribute("title","Minimize"),ja=!1,da()):(Q.innerHTML="",Q.appendChild(Z),mxUtils.setPrefixedStyle(Q.style,"transform","translate(0, 0)"),Q.style.top="",Q.style.bottom="12px",Q.style.padding="0px",Q.style.height="24px",Z.style.height="24px",Z.style.backgroundImage="url("+Editor.plusImage+")",Z.setAttribute("title",mxResources.get("insert")),Z.style.width="24px",ja=!0)}));da();m.addListener("darkModeChanged",mxUtils.bind(this,function(){da()}))}else m.editor.addListener("statusChanged",
+mxUtils.bind(this,function(){m.setStatusText(m.editor.getStatus())}));if(null!=J){var O=function(b){p.popupMenuHandler.hideMenu();mxEvent.isAltDown(b)?m.actions.get("customZoom").funct():m.actions.get("smartFit").funct()},T=m.actions.get("zoomIn"),la=m.actions.get("zoomOut"),U=m.actions.get("resetView"),fa=m.actions.get("fullscreen"),ia=m.actions.get("toggleDarkMode"),na=m.actions.get("undo"),V=m.actions.get("redo"),ca=f("",na.funct,null,mxResources.get("undo")+" ("+na.shortcut+")",na,Editor.undoImage),
+ea=f("",V.funct,null,mxResources.get("redo")+" ("+V.shortcut+")",V,Editor.redoImage),ka=f("",O,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",U,Editor.zoomFitImage),U=f("",fa.funct,null,mxResources.get("fullscreen"),fa,Editor.fullscreenImage);if(null!=R){var pa=m.actions.get("delete"),oa=f("",pa.funct,null,mxResources.get("delete"),pa,Editor.trashImage);oa.style.opacity="0.1";X.appendChild(oa);pa.addListener("stateChanged",function(){oa.style.opacity=pa.enabled?"0.4":"0.1"});J=function(){ca.style.display=
+0<m.editor.undoManager.history.length||p.isEditing()?"inline-block":"none";ea.style.display=ca.style.display;ca.style.opacity=na.enabled?"0.4":"0.1";ea.style.opacity=V.enabled?"0.4":"0.1"};X.appendChild(ca);X.appendChild(ea);na.addListener("stateChanged",J);V.addListener("stateChanged",J);J();null!=urlParams.layers&&(J=m.actions.get("layers"),J=f("",J.funct,null,mxResources.get("layers"),J,Editor.layersImage),J.style.opacity="0.4",R.appendChild(J));null!=urlParams.tags&&(J=m.actions.get("tags"),J=
+f("",J.funct,null,mxResources.get("tags"),J,Editor.tagsImage),J.style.opacity="0.4",R.appendChild(J));J=m.actions.get("outline");J=f("",J.funct,null,mxResources.get("outline"),J,Editor.outlineImage);J.style.opacity="0.4";R.appendChild(J);J=f("",la.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",la,Editor.zoomOutImage);J.style.opacity="0.4";R.appendChild(J);var S=document.createElement("div");S.innerHTML="100%";S.setAttribute("title",mxResources.get("fitWindow")+"/"+mxResources.get("resetView")+
+" (Enter)");S.style.display="inline-block";S.style.cursor="pointer";S.style.textAlign="center";S.style.whiteSpace="nowrap";S.style.paddingRight="10px";S.style.textDecoration="none";S.style.verticalAlign="top";S.style.padding="6px 0";S.style.fontSize="14px";S.style.width="40px";S.style.opacity="0.4";R.appendChild(S);mxEvent.addListener(S,"click",O);O=f("",T.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",T,Editor.zoomInImage);O.style.opacity="0.4";R.appendChild(O);var ma=
+f("",ia.funct,null,mxResources.get("dark"),ia,Editor.isDarkMode()?Editor.lightImage:Editor.darkImage);ma.style.opacity="0.4";(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&R.appendChild(ma);m.addListener("darkModeChanged",mxUtils.bind(this,function(){ma.style.backgroundImage="url("+(Editor.isDarkMode()?Editor.lightImage:Editor.darkImage)+")"}));fa.visible&&(U.style.opacity="0.4",R.appendChild(U));var Y=this.createPageMenuTab(!1);Y.style.display="none";Y.style.position="";Y.style.marginLeft=
+"";Y.style.top="";Y.style.left="";Y.style.height="100%";Y.style.lineHeight="";Y.style.borderStyle="none";Y.style.padding="3px 0";Y.style.margin="0px";Y.style.background="";Y.style.border="";Y.style.boxShadow="none";Y.style.verticalAlign="top";Y.firstChild.style.height="100%";Y.firstChild.style.opacity="0.6";Y.firstChild.style.margin="0px";R.appendChild(Y);m.addListener("fileDescriptorChanged",function(){Y.style.display="1"==urlParams.pages||null!=m.pages&&1<m.pages.length?"inline-block":"none"});
+m.tabContainer.style.visibility="hidden";q.style.cssText="position:absolute;right:12px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";X.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
+R.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";B.appendChild(X);B.appendChild(R);Q.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";B.appendChild(Q);window.setTimeout(function(){mxUtils.setPrefixedStyle(Q.style,
+"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(B)}else q.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;",this.tabContainer.style.right="70px",S=u.addMenu("100%",J.funct),S.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)"),S.style.whiteSpace="nowrap",S.style.paddingRight="10px",S.style.textDecoration="none",S.style.textDecoration="none",S.style.overflow="hidden",
+S.style.visibility="hidden",S.style.textAlign="center",S.style.cursor="pointer",S.style.height=parseInt(m.tabContainerHeight)-1+"px",S.style.lineHeight=parseInt(m.tabContainerHeight)+1+"px",S.style.position="absolute",S.style.display="block",S.style.fontSize="12px",S.style.width="59px",S.style.right="0px",S.style.bottom="0px",S.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")",S.style.backgroundPosition="right 6px center",S.style.backgroundRepeat="no-repeat",B.appendChild(S);fa=mxUtils.bind(this,
+function(){S.innerHTML=Math.round(100*m.editor.graph.view.scale)+"%"});m.editor.graph.view.addListener(mxEvent.EVENT_SCALE,fa);m.editor.addListener("resetGraphView",fa);m.editor.addListener("pageSelected",fa);var ta=m.setGraphEnabled;m.setGraphEnabled=function(){ta.apply(this,arguments);null!=this.tabContainer&&(S.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==R?this.tabContainerHeight+"px":"0px")}}B.appendChild(q);
+B.appendChild(m.diagramContainer);l.appendChild(B);m.updateTabContainer();null==R&&B.appendChild(m.tabContainer);var ra=null;k();mxEvent.addListener(window,"resize",function(){k();null!=m.sidebarWindow&&m.sidebarWindow.window.fit();null!=m.formatWindow&&m.formatWindow.window.fit();null!=m.actions.outlineWindow&&m.actions.outlineWindow.window.fit();null!=m.actions.layersWindow&&m.actions.layersWindow.window.fit();null!=m.menus.tagsWindow&&m.menus.tagsWindow.window.fit();null!=m.menus.findWindow&&m.menus.findWindow.window.fit();
+null!=m.menus.findReplaceWindow&&m.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,d,e,n){var f=d.y,g=d.x,k=!1,p=!1;if(null!=this.states&&null!=c&&null!=d){var q=this,t=new mxCellState,u=this.graph.getView().scale,v=Math.max(2,this.getGuideTolerance()/2);t.x=c.x+g;t.y=c.y+f;t.width=c.width;t.height=c.height;for(var x=[],B=[],A=0;A<this.states.length;A++){var y=this.states[A];y instanceof mxCellState&&(n||!this.graph.isCellSelected(y.cell))&&((t.x>=y.x&&t.x<=y.x+y.width||y.x>=t.x&&y.x<=t.x+t.width)&&(t.y>
+y.y+y.height+4||t.y+t.height+4<y.y)?x.push(y):(t.y>=y.y&&t.y<=y.y+y.height||y.y>=t.y&&y.y<=t.y+t.height)&&(t.x>y.x+y.width+4||t.x+t.width+4<y.x)&&B.push(y))}var z=0,C=0,F=y=0,E=0,H=0,D=0,I=0,K=5*u;if(1<x.length){x.push(t);x.sort(function(b,c){return b.y-c.y});var M=!1,A=t==x[0],u=t==x[x.length-1];if(!A&&!u)for(A=1;A<x.length-1;A++)if(t==x[A]){u=x[A-1];A=x[A+1];y=C=F=(A.y-u.y-u.height-t.height)/2;break}for(A=0;A<x.length-1;A++){var u=x[A],L=x[A+1],N=t==u||t==L,L=L.y-u.y-u.height,M=M|t==u;if(0==C&&
+0==z)C=L,z=1;else if(Math.abs(C-L)<=(N||1==A&&M?v:0))z+=1;else if(1<z&&M){x=x.slice(0,A+1);break}else if(3<=x.length-A&&!M)z=0,y=C=0!=F?F:0,x.splice(0,0==A?1:A),A=-1;else break;0!=y||N||(C=y=L)}3==x.length&&x[1]==t&&(y=0)}if(1<B.length){B.push(t);B.sort(function(b,c){return b.x-c.x});M=!1;A=t==B[0];u=t==B[B.length-1];if(!A&&!u)for(A=1;A<B.length-1;A++)if(t==B[A]){u=B[A-1];A=B[A+1];D=H=I=(A.x-u.x-u.width-t.width)/2;break}for(A=0;A<B.length-1;A++){u=B[A];L=B[A+1];N=t==u||t==L;L=L.x-u.x-u.width;M|=t==
+u;if(0==H&&0==E)H=L,E=1;else if(Math.abs(H-L)<=(N||1==A&&M?v:0))E+=1;else if(1<E&&M){B=B.slice(0,A+1);break}else if(3<=B.length-A&&!M)E=0,D=H=0!=I?I:0,B.splice(0,0==A?1:A),A=-1;else break;0!=D||N||(H=D=L)}3==B.length&&B[1]==t&&(D=0)}v=function(b,c,d,e){var f=[],g;e?(e=K,g=0):(e=0,g=K);f.push(new mxPoint(b.x-e,b.y-g));f.push(new mxPoint(b.x+e,b.y+g));f.push(b);f.push(c);f.push(new mxPoint(c.x-e,c.y-g));f.push(new mxPoint(c.x+e,c.y+g));if(null!=d)return d.points=f,d;b=new mxPolyline(f,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);b.dialect=mxConstants.DIALECT_SVG;b.pointerEvents=!1;b.init(q.graph.getView().getOverlayPane());return b};H=function(b,c){if(b&&null!=q.guidesArrHor)for(var d=0;d<q.guidesArrHor.length;d++)q.guidesArrHor[d].node.style.visibility="hidden";if(c&&null!=q.guidesArrVer)for(d=0;d<q.guidesArrVer.length;d++)q.guidesArrVer[d].node.style.visibility="hidden"};if(1<E&&E==B.length-1){E=[];I=q.guidesArrHor;k=[];g=0;A=B[0]==t?1:0;M=B[A].y+B[A].height;if(0<D)for(A=0;A<B.length-1;A++)u=
+B[A],L=B[A+1],t==u?(g=L.x-u.width-D,k.push(new mxPoint(g+u.width+K,M)),k.push(new mxPoint(L.x-K,M))):t==L?(k.push(new mxPoint(u.x+u.width+K,M)),g=u.x+u.width+D,k.push(new mxPoint(g-K,M))):(k.push(new mxPoint(u.x+u.width+K,M)),k.push(new mxPoint(L.x-K,M)));else u=B[0],A=B[2],g=u.x+u.width+(A.x-u.x-u.width-t.width)/2,k.push(new mxPoint(u.x+u.width+K,M)),k.push(new mxPoint(g-K,M)),k.push(new mxPoint(g+t.width+K,M)),k.push(new mxPoint(A.x-K,M));for(A=0;A<k.length;A+=2)B=k[A],D=k[A+1],B=v(B,D,null!=I?
+I[A/2]:null),B.node.style.visibility="visible",B.redraw(),E.push(B);for(A=k.length/2;null!=I&&A<I.length;A++)I[A].destroy();q.guidesArrHor=E;g-=c.x;k=!0}else H(!0);if(1<z&&z==x.length-1){E=[];I=q.guidesArrVer;p=[];f=0;A=x[0]==t?1:0;z=x[A].x+x[A].width;if(0<y)for(A=0;A<x.length-1;A++)u=x[A],L=x[A+1],t==u?(f=L.y-u.height-y,p.push(new mxPoint(z,f+u.height+K)),p.push(new mxPoint(z,L.y-K))):t==L?(p.push(new mxPoint(z,u.y+u.height+K)),f=u.y+u.height+y,p.push(new mxPoint(z,f-K))):(p.push(new mxPoint(z,u.y+
+u.height+K)),p.push(new mxPoint(z,L.y-K)));else u=x[0],A=x[2],f=u.y+u.height+(A.y-u.y-u.height-t.height)/2,p.push(new mxPoint(z,u.y+u.height+K)),p.push(new mxPoint(z,f-K)),p.push(new mxPoint(z,f+t.height+K)),p.push(new mxPoint(z,A.y-K));for(A=0;A<p.length;A+=2)B=p[A],D=p[A+1],B=v(B,D,null!=I?I[A/2]:null,!0),B.node.style.visibility="visible",B.redraw(),E.push(B);for(A=p.length/2;null!=I&&A<I.length;A++)I[A].destroy();q.guidesArrVer=E;f-=c.y;p=!0}else H(!1,!0)}if(k||p)return t=new mxPoint(g,f),x=b.call(this,
+c,t,e,n),k&&!p?t.y=x.y:p&&!k&&(t.x=x.x),x.y!=t.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),x.x!=t.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),t;H(!0,!0);return b.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(b){e.call(this,b);var c=this.guidesArrVer,d=this.guidesArrHor;if(null!=c)for(var n=0;n<c.length;n++)c[n].node.style.visibility=b?"visible":"hidden";if(null!=
d)for(n=0;n<d.length;n++)d[n].node.style.visibility=b?"visible":"hidden"};var d=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){d.call(this);var b=this.guidesArrVer,e=this.guidesArrHor;if(null!=b){for(var k=0;k<b.length;k++)b[k].destroy();this.guidesArrVer=null}if(null!=e){for(k=0;k<e.length;k++)e[k].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,d,c){function g(){var c=b.diagramContainer;q.style.top=c.offsetTop-l+"px";q.style.left=c.offsetLeft-l+"px";q.style.width=(d?0:c.offsetWidth)+l+"px";q.style.height=(d?c.offsetHeight:0)+l+"px"}function k(b,c,d){if(null!=n)return b;var e;return function(){var f=this,g=arguments,k=d&&!e;clearTimeout(e);e=setTimeout(function(){e=null;d||b.apply(f,g)},c);k&&b.apply(f,g)}}var n=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
f=window.cancelAnimationFrame||window.mozCancelAnimationFrame,l=this.RULER_THICKNESS,m=this;this.unit=e;var p=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:"#2a2a2a",cornerClr:"#2a2a2a",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},q=document.createElement("div");q.style.position="absolute";this.updateStyle=mxUtils.bind(this,function(){p=Editor.isDarkMode()?{bkgClr:"#202020",
outBkgClr:"#2a2a2a",cornerClr:"#2a2a2a",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};q.style.background=p.bkgClr;q.style[d?"borderRight":"borderBottom"]="0.5px solid "+p.strokeClr;q.style.borderLeft="0.5px solid "+p.strokeClr});this.updateStyle();document.body.appendChild(q);mxEvent.disableContextMenu(q);this.editorUiRefresh=b.refresh;b.refresh=function(c){m.editorUiRefresh.apply(b,
arguments);g()};g();var t=document.createElement("canvas");t.width=q.offsetWidth;t.height=q.offsetHeight;q.style.overflow="hidden";t.style.position="relative";q.appendChild(t);var u=t.getContext("2d");this.ui=b;var v=b.editor.graph;this.graph=v;this.container=q;this.canvas=t;var x=function(b,c,e,f,g){b=Math.round(b);c=Math.round(c);e=Math.round(e);f=Math.round(f);u.beginPath();u.moveTo(b+.5,c+.5);u.lineTo(e+.5,f+.5);u.stroke();g&&(d?(u.save(),u.translate(b,c),u.rotate(-Math.PI/2),u.fillText(g,0,0),
-u.restore()):u.fillText(g,b,c))},A=function(){u.clearRect(0,0,t.width,t.height);u.beginPath();u.lineWidth=.7;u.strokeStyle=p.strokeClr;u.setLineDash([]);u.font="9px Arial";u.textAlign="center";var b=v.view.scale,c=v.view.getBackgroundPageBounds(),e=v.view.translate,f=v.pageVisible,e=f?l+(d?c.y-v.container.scrollTop:c.x-v.container.scrollLeft):l+(d?e.y*b-v.container.scrollTop:e.x*b-v.container.scrollLeft),g=0;f&&(g=v.getPageLayout(),g=d?g.y*v.pageFormat.height:g.x*v.pageFormat.width);var k,n,q;switch(m.unit){case mxConstants.POINTS:k=
-q=10;n=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:q=10;k=mxConstants.PIXELS_PER_MM;n=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:q=.5>=b||4<=b?8:16,k=mxConstants.PIXELS_PER_INCH/q,n=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var y=k;2<=b?y=k/(2*Math.floor(b/2)):.5>=b&&(y=k*Math.floor(1/b/2)*(m.unit==mxConstants.MILLIMETERS?2:1));k=null;c=f?Math.min(e+(d?c.height:c.width),d?t.height:t.width):d?t.height:t.width;if(f)if(u.fillStyle=p.outBkgClr,d){var z=e-l;0<z&&u.fillRect(0,l,l,z);c<t.height&&
-u.fillRect(0,c,l,t.height)}else z=e-l,0<z&&u.fillRect(l,0,z,l),c<t.width&&u.fillRect(c,0,t.width,l);u.fillStyle=p.fontClr;for(f=f?e:e%(y*b);f<=c;f+=y*b)if(z=Math.round((f-e)/b/y),!(f<l||z==k)){k=z;var A=null;0==z%q&&(A=m.formatText(g+z*y)+"");d?x(l-n[Math.abs(z)%q],f,l,f,A):x(f,l-n[Math.abs(z)%q],f,l,A)}u.lineWidth=1;x(d?0:l,d?l:0,l,l);u.fillStyle=p.cornerClr;u.fillRect(0,0,l,l)},z=-1,y=function(){null!=n?(null!=f&&f(z),z=n(A)):A()};this.drawRuler=y;this.sizeListener=e=k(function(){var b=v.container;
+u.restore()):u.fillText(g,b,c))},B=function(){u.clearRect(0,0,t.width,t.height);u.beginPath();u.lineWidth=.7;u.strokeStyle=p.strokeClr;u.setLineDash([]);u.font="9px Arial";u.textAlign="center";var b=v.view.scale,c=v.view.getBackgroundPageBounds(),e=v.view.translate,f=v.pageVisible,e=f?l+(d?c.y-v.container.scrollTop:c.x-v.container.scrollLeft):l+(d?e.y*b-v.container.scrollTop:e.x*b-v.container.scrollLeft),g=0;f&&(g=v.getPageLayout(),g=d?g.y*v.pageFormat.height:g.x*v.pageFormat.width);var k,n,q;switch(m.unit){case mxConstants.POINTS:k=
+q=10;n=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:q=10;k=mxConstants.PIXELS_PER_MM;n=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:q=.5>=b||4<=b?8:16,k=mxConstants.PIXELS_PER_INCH/q,n=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var y=k;2<=b?y=k/(2*Math.floor(b/2)):.5>=b&&(y=k*Math.floor(1/b/2)*(m.unit==mxConstants.MILLIMETERS?2:1));k=null;c=f?Math.min(e+(d?c.height:c.width),d?t.height:t.width):d?t.height:t.width;if(f)if(u.fillStyle=p.outBkgClr,d){var A=e-l;0<A&&u.fillRect(0,l,l,A);c<t.height&&
+u.fillRect(0,c,l,t.height)}else A=e-l,0<A&&u.fillRect(l,0,A,l),c<t.width&&u.fillRect(c,0,t.width,l);u.fillStyle=p.fontClr;for(f=f?e:e%(y*b);f<=c;f+=y*b)if(A=Math.round((f-e)/b/y),!(f<l||A==k)){k=A;var B=null;0==A%q&&(B=m.formatText(g+A*y)+"");d?x(l-n[Math.abs(A)%q],f,l,f,B):x(f,l-n[Math.abs(A)%q],f,l,B)}u.lineWidth=1;x(d?0:l,d?l:0,l,l);u.fillStyle=p.cornerClr;u.fillRect(0,0,l,l)},A=-1,y=function(){null!=n?(null!=f&&f(A),A=n(B)):B()};this.drawRuler=y;this.sizeListener=e=k(function(){var b=v.container;
d?(b=b.offsetHeight+l,t.height!=b&&(t.height=b,q.style.height=b+"px",y())):(b=b.offsetWidth+l,t.width!=b&&(t.width=b,q.style.width=b+"px",y()))},10);this.pageListener=function(){y()};this.scrollListener=c=k(function(){var b=d?v.container.scrollTop:v.container.scrollLeft;m.lastScroll!=b&&(m.lastScroll=b,y())},10);this.unitListener=function(b,c){m.setUnit(c.getProperty("unit"))};v.addListener(mxEvent.SIZE,e);v.container.addEventListener("scroll",c);v.view.addListener("unitChanged",this.unitListener);
-b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(b){p=b;q.style.background=p.bkgClr;A()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,e,f){var g;if(d&&4<b.height||!d&&4<b.width){if(null!=m.guidePart)try{u.putImageData(m.guidePart.imgData1,m.guidePart.x1,m.guidePart.y1),u.putImageData(m.guidePart.imgData2,m.guidePart.x2,m.guidePart.y2),u.putImageData(m.guidePart.imgData3,
+b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(b){p=b;q.style.background=p.bkgClr;B()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,e,f){var g;if(d&&4<b.height||!d&&4<b.width){if(null!=m.guidePart)try{u.putImageData(m.guidePart.imgData1,m.guidePart.x1,m.guidePart.y1),u.putImageData(m.guidePart.imgData2,m.guidePart.x2,m.guidePart.y2),u.putImageData(m.guidePart.imgData3,
m.guidePart.x3,m.guidePart.y3)}catch(W){}g=m.origGuideMove.apply(this,arguments);try{var k,n,q,t,v,y,z,A,B;u.lineWidth=.5;u.strokeStyle=p.guideClr;u.setLineDash([2]);d?(n=b.y+g.y+l-this.graph.container.scrollTop,k=0,v=n+b.height/2,t=l/2,A=n+b.height,z=0,q=u.getImageData(k,n-1,l,3),x(k,n,l,n),n--,y=u.getImageData(t,v-1,l,3),x(t,v,l,v),v--,B=u.getImageData(z,A-1,l,3),x(z,A,l,A),A--):(n=0,k=b.x+g.x+l-this.graph.container.scrollLeft,v=l/2,t=k+b.width/2,A=0,z=k+b.width,q=u.getImageData(k-1,n,3,l),x(k,
n,k,l),k--,y=u.getImageData(t-1,v,3,l),x(t,v,t,l),t--,B=u.getImageData(z-1,A,3,l),x(z,A,z,l),z--);if(null==m.guidePart||m.guidePart.x1!=k||m.guidePart.y1!=n)m.guidePart={imgData1:q,x1:k,y1:n,imgData2:y,x2:t,y2:v,imgData3:B,x3:z,y3:A}}catch(W){}}else g=m.origGuideMove.apply(this,arguments);return g};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var b=m.origGuideDestroy.apply(this,arguments);if(null!=m.guidePart)try{u.putImageData(m.guidePart.imgData1,m.guidePart.x1,
m.guidePart.y1),u.putImageData(m.guidePart.imgData2,m.guidePart.x2,m.guidePart.y2),u.putImageData(m.guidePart.imgData3,m.guidePart.x3,m.guidePart.y3),m.guidePart=null}catch(C){}return b}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};
@@ -11952,12 +11991,12 @@ function mxDualRuler(b,e){var d=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mx
function(c){d=null!=b.currentMenu;mxEvent.consume(c)}),null,mxUtils.bind(this,function(e){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(e)||mxEvent.isPopupTrigger(e))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(e)||!d){var f=new mxPopupMenu(mxUtils.bind(this,function(c,d){b.menus.addMenuItems(c,["points","millimeters"],d)}));f.div.className+=" geMenubarMenu";f.smartSeparators=!0;f.showDisabled=!0;f.autoExpand=!0;f.hideMenu=
mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(f,arguments);b.resetCurrentMenu();f.destroy()});var g=mxEvent.getClientX(e),k=mxEvent.getClientY(e);f.popup(g,k,null,e);b.setCurrentMenu(f,c)}mxEvent.consume(e)}}))});c(this.hRuler.container);c(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var d=mxFreehand.prototype.NORMAL_SMOOTHING,c=null,g=[],k,n=[],f,l=!1,m=!0,p=!0,q=!0,t=!0,u=[],v=!1,x=!0;this.setClosedPath=function(b){l=b};this.setAutoClose=function(b){m=b};this.setAutoInsert=function(b){p=b};this.setAutoScroll=function(b){q=b};this.setOpenFill=function(b){t=b};this.setStopClickEnabled=
-function(b){x=b};this.setSmoothing=function(b){d=b};var A=function(c){v=c;b.getRubberband().setEnabled(!c);b.graphHandler.setSelectEnabled(!c);b.graphHandler.setMoveEnabled(!c);b.container.style.cursor=c?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){A(!0)};this.isDrawing=function(){return v};var z=mxUtils.bind(this,function(b){if(c){var d=f.length,e=x&&0<n.length&&null!=f&&2>f.length;e||n.push.apply(n,f);f=[];n.push(null);g.push(c);c=null;(e||
+function(b){x=b};this.setSmoothing=function(b){d=b};var B=function(c){v=c;b.getRubberband().setEnabled(!c);b.graphHandler.setSelectEnabled(!c);b.graphHandler.setMoveEnabled(!c);b.container.style.cursor=c?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){B(!0)};this.isDrawing=function(){return v};var A=mxUtils.bind(this,function(b){if(c){var d=f.length,e=x&&0<n.length&&null!=f&&2>f.length;e||n.push.apply(n,f);f=[];n.push(null);g.push(c);c=null;(e||
p)&&this.stopDrawing();p&&2<=d&&this.startDrawing();mxEvent.consume(b)}});this.createStyle=function(b){return mxConstants.STYLE_SHAPE+"="+b+";fillColor=none;"};this.stopDrawing=function(){if(0<g.length){for(var d=n[0].x,e=n[0].x,f=n[0].y,k=n[0].y,p=1;p<n.length;p++)null!=n[p]&&(d=Math.max(d,n[p].x),e=Math.min(e,n[p].x),f=Math.max(f,n[p].y),k=Math.min(k,n[p].y));d-=e;f-=k;if(0<d&&0<f){var q=100/d,u=100/f;n.map(function(b){if(null==b)return b;b.x=(b.x-e)*q;b.y=(b.y-k)*u;return b});for(var v='<shape strokewidth="inherit"><foreground>',
x=0,p=0;p<n.length;p++){var y=n[p];if(null==y){var y=!1,x=n[x],z=n[p-1];!l&&m&&(y=x.x-z.x,z=x.y-z.y,y=Math.sqrt(y*y+z*z)<=b.tolerance);if(l||y)v+='<line x="'+x.x.toFixed(2)+'" y="'+x.y.toFixed(2)+'"/>';v+="</path>"+(t||l||y?"<fillstroke/>":"<stroke/>");x=p+1}else v=p==x?v+('<path><move x="'+y.x.toFixed(2)+'" y="'+y.y.toFixed(2)+'"/>'):v+('<line x="'+y.x.toFixed(2)+'" y="'+y.y.toFixed(2)+'"/>')}v+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){p=this.createStyle("stencil("+
-Graph.compress(v)+")");v=b.view.scale;x=b.view.translate;d=new mxCell("",new mxGeometry(e/v-x.x,k/v-x.y,d/v,f/v),p);d.vertex=1;b.model.beginUpdate();try{d=b.addCell(d),b.fireEvent(new mxEventObject("cellsInserted","cells",[d])),b.fireEvent(new mxEventObject("freehandInserted","cell",d))}finally{b.model.endUpdate()}b.setSelectionCells([d])}}for(p=0;p<g.length;p++)g[p].parentNode.removeChild(g[p]);c=null;g=[];n=[]}A(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,c){var d=c.getProperty("eventName"),
+Graph.compress(v)+")");v=b.view.scale;x=b.view.translate;d=new mxCell("",new mxGeometry(e/v-x.x,k/v-x.y,d/v,f/v),p);d.vertex=1;b.model.beginUpdate();try{d=b.addCell(d),b.fireEvent(new mxEventObject("cellsInserted","cells",[d])),b.fireEvent(new mxEventObject("freehandInserted","cell",d))}finally{b.model.endUpdate()}b.setSelectionCells([d])}}for(p=0;p<g.length;p++)g[p].parentNode.removeChild(g[p]);c=null;g=[];n=[]}B(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,c){var d=c.getProperty("eventName"),
e=c.getProperty("event");d==mxEvent.MOUSE_MOVE&&v&&(null!=e.sourceState&&e.sourceState.setCursor("crosshair"),e.consume())}));var y=new mxCell;y.edge=!0;b.addMouseListener({mouseDown:mxUtils.bind(this,function(d,g){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){var l=g.getEvent();if(v&&!mxEvent.isPopupTrigger(l)&&!mxEvent.isMultiTouchEvent(l)){var m=b.getCurrentCellStyle(y),p=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1),p=Math.max(1,p*b.view.scale);c=document.createElementNS("http://www.w3.org/2000/svg",
-"path");c.setAttribute("fill","none");c.setAttribute("stroke",mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(m,mxConstants.STYLE_STROKECOLOR,"#000")));c.setAttribute("stroke-width",p);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(m=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",m=m.split(" ").map(function(b){return parseFloat(b)*p}).join(" "),c.setAttribute("stroke-dasharray",m));u=[];l=B(l);C(l);k="M"+l.x+" "+l.y;n.push(l);f=[];c.setAttribute("d",
-k);e.appendChild(c);g.consume()}}}),mouseMove:mxUtils.bind(this,function(d,e){if(c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){var g=e.getEvent(),g=B(g);C(g);var l=E(0);if(l){k+=" L"+l.x+" "+l.y;n.push(l);var m="";f=[];for(var p=2;p<u.length;p+=2)l=E(p),m+=" L"+l.x+" "+l.y,f.push(l);c.setAttribute("d",k+m)}q&&(l=b.view.translate,b.scrollRectToVisible((new mxRectangle(g.x-l.x,g.y-l.y)).grow(20)));e.consume()}}),mouseUp:mxUtils.bind(this,function(d,e){c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&
-(z(e.getEvent()),e.consume())})});var B=function(c){return mxUtils.convertPoint(b.container,mxEvent.getClientX(c),mxEvent.getClientY(c))},C=function(b){for(u.push(b);u.length>d;)u.shift()},E=function(b){var c=u.length;if(1===c%2||c>=d){var e=0,f=0,g,k=0;for(g=b;g<c;g++)k++,b=u[g],e+=b.x,f+=b.y;return{x:e/k,y:f/k}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;
+"path");c.setAttribute("fill","none");c.setAttribute("stroke",mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(m,mxConstants.STYLE_STROKECOLOR,"#000")));c.setAttribute("stroke-width",p);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(m=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",m=m.split(" ").map(function(b){return parseFloat(b)*p}).join(" "),c.setAttribute("stroke-dasharray",m));u=[];l=z(l);C(l);k="M"+l.x+" "+l.y;n.push(l);f=[];c.setAttribute("d",
+k);e.appendChild(c);g.consume()}}}),mouseMove:mxUtils.bind(this,function(d,e){if(c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){var g=e.getEvent(),g=z(g);C(g);var l=F(0);if(l){k+=" L"+l.x+" "+l.y;n.push(l);var m="";f=[];for(var p=2;p<u.length;p+=2)l=F(p),m+=" L"+l.x+" "+l.y,f.push(l);c.setAttribute("d",k+m)}q&&(l=b.view.translate,b.scrollRectToVisible((new mxRectangle(g.x-l.x,g.y-l.y)).grow(20)));e.consume()}}),mouseUp:mxUtils.bind(this,function(d,e){c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&
+(A(e.getEvent()),e.consume())})});var z=function(c){return mxUtils.convertPoint(b.container,mxEvent.getClientX(c),mxEvent.getClientY(c))},C=function(b){for(u.push(b);u.length>d;)u.shift()},F=function(b){var c=u.length;if(1===c%2||c>=d){var e=0,f=0,g,k=0;for(g=b;g<c;g++)k++,b=u[g],e+=b.x,f+=b.y;return{x:e/k,y:f/k}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;
mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;
diff --git a/src/main/webapp/js/diagramly/App.js b/src/main/webapp/js/diagramly/App.js
index a0513bc5..2b0aae31 100644
--- a/src/main/webapp/js/diagramly/App.js
+++ b/src/main/webapp/js/diagramly/App.js
@@ -265,7 +265,6 @@ App.DROPINS_URL = 'https://www.dropbox.com/static/api/2/dropins.js';
* But it doesn't work for IE11, so we fallback to the original one
*/
App.ONEDRIVE_URL = mxClient.IS_IE11? 'https://js.live.net/v7.2/OneDrive.js' : window.DRAWIO_BASE_URL + '/js/onedrive/OneDrive.js';
-App.ONEDRIVE_INLINE_PICKER_URL = window.DRAWIO_BASE_URL + '/js/onedrive/mxODPicker.js';
/**
* Trello URL
@@ -517,16 +516,13 @@ App.getStoredMode = function()
if (App.mode == App.MODE_ONEDRIVE || (window.location.hash != null &&
window.location.hash.substring(0, 2) == '#W'))
{
- if (urlParams['inlinePicker'] == '1' || mxClient.IS_ANDROID || mxClient.IS_IOS)
+ if (urlParams['inlinePicker'] == '0')
{
- mxscript(App.ONEDRIVE_INLINE_PICKER_URL, function()
- {
- window.OneDrive = {}; //Needed to allow code that check its existance to work BUT it's not used
- });
+ mxscript(App.ONEDRIVE_URL);
}
else
{
- mxscript(App.ONEDRIVE_URL);
+ window.OneDrive = {}; //Needed to allow code that check its existance to work BUT it's not used
}
}
else if (urlParams['chrome'] == '0')
@@ -958,17 +954,14 @@ App.main = function(callback, createUi)
urlParams['od'] == '1')) && (navigator.userAgent == null ||
navigator.userAgent.indexOf('MSIE') < 0 || document.documentMode >= 10))))
{
- if (urlParams['inlinePicker'] == '1' || mxClient.IS_ANDROID || mxClient.IS_IOS)
+ if (urlParams['inlinePicker'] == '0')
{
- mxscript(App.ONEDRIVE_INLINE_PICKER_URL, function()
- {
- window.OneDrive = {}; //Needed to allow code that check its existance to work BUT it's not used
- window.DrawOneDriveClientCallback();
- });
+ mxscript(App.ONEDRIVE_URL, window.DrawOneDriveClientCallback);
}
else
{
- mxscript(App.ONEDRIVE_URL, window.DrawOneDriveClientCallback);
+ window.OneDrive = {}; //Needed to allow code that check its existance to work BUT it's not used
+ window.DrawOneDriveClientCallback();
}
}
// Disables client
diff --git a/src/main/webapp/js/diagramly/Dialogs.js b/src/main/webapp/js/diagramly/Dialogs.js
index 76804f31..a15f2d92 100644
--- a/src/main/webapp/js/diagramly/Dialogs.js
+++ b/src/main/webapp/js/diagramly/Dialogs.js
@@ -11600,7 +11600,7 @@ var FontDialog = function(editorUi, curFontname, curUrl, curType, fn)
row.appendChild(td);
- if (FontDialog.enableWebFonts)
+ if (Editor.enableWebFonts)
{
tbody.appendChild(row);
}
@@ -11620,7 +11620,7 @@ var FontDialog = function(editorUi, curFontname, curUrl, curType, fn)
if (curType == 'w')
{
- if (FontDialog.enableWebFonts)
+ if (Editor.enableWebFonts)
{
webFontInput.setAttribute('value', curFontname);
}
@@ -11638,7 +11638,7 @@ var FontDialog = function(editorUi, curFontname, curUrl, curType, fn)
td.appendChild(webFontInput);
row.appendChild(td);
- if (FontDialog.enableWebFonts)
+ if (Editor.enableWebFonts)
{
tbody.appendChild(row);
}
@@ -11664,7 +11664,7 @@ var FontDialog = function(editorUi, curFontname, curUrl, curType, fn)
td.appendChild(webFontUrlInput);
row.appendChild(td);
- if (FontDialog.enableWebFonts)
+ if (Editor.enableWebFonts)
{
tbody.appendChild(row);
}
@@ -11677,7 +11677,7 @@ var FontDialog = function(editorUi, curFontname, curUrl, curType, fn)
{
input = googleFontInput;
}
- else if (curType == 'w' && FontDialog.enableWebFonts)
+ else if (curType == 'w' && Editor.enableWebFonts)
{
input = webFontInput;
}
@@ -11897,11 +11897,6 @@ function AspectDialog(editorUi, pageId, layerIds, okFn, cancelFn)
this.container = div;
};
-/**
- * Specifies if web fonts are enabled.
- */
-FontDialog.enableWebFonts = urlParams['safe-style-src'] != '1';;
-
//Drawing the graph with dialog not visible doesn't get dimensions right. It has to be visible!
AspectDialog.prototype.init = function()
{
diff --git a/src/main/webapp/js/diagramly/Editor.js b/src/main/webapp/js/diagramly/Editor.js
index 1b4ae623..d0da49d9 100644
--- a/src/main/webapp/js/diagramly/Editor.js
+++ b/src/main/webapp/js/diagramly/Editor.js
@@ -154,6 +154,11 @@
Editor.drawLogoImage = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJFYmVuZV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMjUwIDI1MCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjUwIDI1MDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MntmaWxsOiMwMDA7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QyIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLDE1KSIgZD0iTTE5Ny4xLDEzOC4zaC0yMy43bC0yNS00Mi43YzUuNy0xLjIsOS44LTYuMiw5LjctMTJWNTEuNWMwLTYuOC01LjQtMTIuMy0xMi4yLTEyLjNjMCwwLTAuMSwwLTAuMSwwaC00MS43CgljLTYuOCwwLTEyLjMsNS40LTEyLjMsMTIuMmMwLDAsMCwwLjEsMCwwLjF2MzIuMWMwLDUuOCw0LDEwLjgsOS43LDEybC0yNSw0Mi43SDUyLjljLTYuOCwwLTEyLjMsNS40LTEyLjMsMTIuMmMwLDAsMCwwLjEsMCwwLjEKCXYzMi4xYzAsNi44LDUuNCwxMi4zLDEyLjIsMTIuM2MwLDAsMC4xLDAsMC4xLDBoNDEuN2M2LjgsMCwxMi4zLTUuNCwxMi4zLTEyLjJjMCwwLDAtMC4xLDAtMC4xdi0zMi4xYzAtNi44LTUuNC0xMi4zLTEyLjItMTIuMwoJYzAsMC0wLjEsMC0wLjEsMGgtNGwyNC44LTQyLjRoMTkuM2wyNC45LDQyLjRoLTQuMWMtNi44LDAtMTIuMyw1LjQtMTIuMywxMi4yYzAsMCwwLDAuMSwwLDAuMXYzMi4xYzAsNi44LDUuNCwxMi4zLDEyLjIsMTIuMwoJYzAsMCwwLjEsMCwwLjEsMGg0MS43YzYuOCwwLDEyLjMtNS40LDEyLjMtMTIuMmMwLDAsMC0wLjEsMC0wLjF2LTMyLjFjMC02LjgtNS40LTEyLjMtMTIuMi0xMi4zCglDMTk3LjIsMTM4LjMsMTk3LjIsMTM4LjMsMTk3LjEsMTM4LjN6Ii8+Cjwvc3ZnPgo=';
/**
+ *
+ */
+ Editor.tailSpin = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9Ii0yIC0yIDQ0IDQ0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogICAgPGRlZnM+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IHgxPSI4LjA0MiUiIHkxPSIwJSIgeDI9IjY1LjY4MiUiIHkyPSIyMy44NjUlIiBpZD0iYSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiM4MDgwODAiIHN0b3Atb3BhY2l0eT0iMCIgb2Zmc2V0PSIwJSIvPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjODA4MDgwIiBzdG9wLW9wYWNpdHk9Ii42MzEiIG9mZnNldD0iNjMuMTQ2JSIvPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjODA4MDgwIiBvZmZzZXQ9IjEwMCUiLz4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPC9kZWZzPgogICAgPGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxIDEpIj4KICAgICAgICAgICAgPHBhdGggZD0iTTM2IDE4YzAtOS45NC04LjA2LTE4LTE4LTE4IiBzdHJva2U9InVybCgjYSkiIHN0cm9rZS13aWR0aD0iNiI+CiAgICAgICAgICAgICAgICA8YW5pbWF0ZVRyYW5zZm9ybQogICAgICAgICAgICAgICAgICAgIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIKICAgICAgICAgICAgICAgICAgICB0eXBlPSJyb3RhdGUiCiAgICAgICAgICAgICAgICAgICAgZnJvbT0iMCAxOCAxOCIKICAgICAgICAgICAgICAgICAgICB0bz0iMzYwIDE4IDE4IgogICAgICAgICAgICAgICAgICAgIGR1cj0iMC45cyIKICAgICAgICAgICAgICAgICAgICByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgLz4KICAgICAgICAgICAgPC9wYXRoPgogICAgICAgICAgICA8Y2lyY2xlIGZpbGw9IiM4MDgwODAiIGN4PSIzNiIgY3k9IjE4IiByPSIxIj4KICAgICAgICAgICAgICAgIDxhbmltYXRlVHJhbnNmb3JtCiAgICAgICAgICAgICAgICAgICAgYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIgogICAgICAgICAgICAgICAgICAgIHR5cGU9InJvdGF0ZSIKICAgICAgICAgICAgICAgICAgICBmcm9tPSIwIDE4IDE4IgogICAgICAgICAgICAgICAgICAgIHRvPSIzNjAgMTggMTgiCiAgICAgICAgICAgICAgICAgICAgZHVyPSIwLjlzIgogICAgICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPgogICAgICAgICAgICA8L2NpcmNsZT4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPgo=';
+
+ /**
* Used in the GraphViewer lightbox.
*/
Editor.tweetImage = IMAGE_PATH + '/tweet.png';
@@ -227,7 +232,7 @@
* Sets the default value for including a copy of the diagram.
* Default is true.
*/
- Editor.defaultIncludeDiagram = true;
+ Editor.defaultIncludeDiagram = true;
/**
* Specifies if custom properties should be enabled.
@@ -238,6 +243,16 @@
/.*\.draw\.io$/.test(window.location.hostname));
/**
+ * Specifies if web fonts are enabled.
+ */
+ Editor.enableWebFonts = urlParams['safe-style-src'] != '1';
+
+ /**
+ * Disables the shadow option in the format panel.
+ */
+ Editor.enableShadowOption = !mxClient.IS_SF;
+
+ /**
* Specifies if XML files should be compressed. Default is true.
*/
Editor.compressXml = true;
@@ -248,11 +263,6 @@
Editor.globalVars = null;
/**
- * Disables the shadow option in the format panel.
- */
- Editor.shadowOptionEnabled = !mxClient.IS_SF;
-
- /**
* Reference to the config object passed to <configure>.
*/
Editor.config = null;
@@ -377,6 +387,13 @@
* Common properties for all vertices.
*/
Editor.commonVertexProperties = [
+ {name: 'colspan', dispName: 'Colspan', type: 'int', min: 1, defVal: 1, isVisible: function(state, format)
+ {
+ var graph = format.editorUi.editor.graph;
+
+ return urlParams['test'] == '1' && state.vertices.length == 1 &&
+ state.edges.length == 0 && graph.isTableCell(state.vertices[0]);
+ }},
{type: 'separator'},
{name: 'resizeLastRow', dispName: 'Resize Last Row', type: 'bool', getDefaultValue: function(state, format)
{
@@ -3962,7 +3979,7 @@
}
});
- if (!Editor.shadowOptionEnabled)
+ if (!Editor.enableShadowOption)
{
option.getElementsByTagName('input')[0].setAttribute('disabled', 'disabled');
mxUtils.setOpacity(option, 60);
diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js
index c9c131ed..ec560fee 100644
--- a/src/main/webapp/js/diagramly/EditorUi.js
+++ b/src/main/webapp/js/diagramly/EditorUi.js
@@ -86,8 +86,8 @@
* Shortcut for capability check.
*/
EditorUi.nativeFileSupport = !mxClient.IS_OP && !EditorUi.isElectronApp &&
- urlParams['extAuth'] != '1' &&
- 'showSaveFilePicker' in window && 'showOpenFilePicker' in window;
+ urlParams['extAuth'] != '1' && 'showSaveFilePicker' in window &&
+ 'showOpenFilePicker' in window;
/**
* Specifies if drafts should be saved in IndexedDB.
@@ -1931,7 +1931,7 @@
if (format == 'xml')
{
- var data = '<?xml version="1.0" encoding="UTF-8"?>\n' +
+ var data = Graph.xmlDeclaration +'\n' +
this.getFileData(true, null, null, null, ignoreSelection, currentPage,
null, null, null, uncompressed);
@@ -1984,9 +1984,7 @@
{
this.spinner.stop();
- saveSvg('<?xml version="1.0" encoding="UTF-8"?>\n' +
- '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n' +
- mxUtils.getXml(svgRoot2));
+ saveSvg(Graph.xmlDeclaration + '\n' + Graph.svgDoctype + '\n' + mxUtils.getXml(svgRoot2));
})));
}
else
@@ -5118,9 +5116,8 @@
currentPage, null, null, null, false));
}
- var svg = '<?xml version="1.0" encoding="UTF-8"?>\n' +
- '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n' +
- mxUtils.getXml(svgRoot);
+ var svg = Graph.xmlDeclaration + '\n' + ((editable) ? Graph.svgFileComment + '\n' : '') +
+ Graph.svgDoctype + '\n' + mxUtils.getXml(svgRoot);
if (this.isLocalFileSave() || svg.length <= MAX_REQUEST_SIZE)
{
@@ -6742,6 +6739,9 @@
// svgRoot.setAttribute('onclick', 'window.location.href=\'' + redirect + '\';');
// }
+ var result = ((!noHeader) ? Graph.xmlDeclaration + '\n' + Graph.svgFileComment +
+ '\n' + Graph.svgDoctype + '\n' : '') + mxUtils.getXml(svgRoot);
+
if (callback != null)
{
this.embedFonts(svgRoot, mxUtils.bind(this, function(svgRoot)
@@ -6750,24 +6750,18 @@
{
this.editor.convertImages(svgRoot, mxUtils.bind(this, function(svgRoot)
{
- callback(((!noHeader) ? '<?xml version="1.0" encoding="UTF-8"?>\n' +
- '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n' : '') +
- mxUtils.getXml(svgRoot));
+ callback(result);
}));
}
else
{
- callback(((!noHeader) ? '<?xml version="1.0" encoding="UTF-8"?>\n' +
- '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n' : '') +
- mxUtils.getXml(svgRoot));
+ callback(result);
}
}));
}
else
{
- return ((!noHeader) ? '<?xml version="1.0" encoding="UTF-8"?>\n' +
- '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n' : '') +
- mxUtils.getXml(svgRoot);
+ return result;
}
};
diff --git a/src/main/webapp/js/diagramly/Menus.js b/src/main/webapp/js/diagramly/Menus.js
index 4b47d4a8..63cbd7b2 100644
--- a/src/main/webapp/js/diagramly/Menus.js
+++ b/src/main/webapp/js/diagramly/Menus.js
@@ -4367,7 +4367,7 @@
}
}
}));
- this.editorUi.showDialog(dlg.container, 380, FontDialog.enableWebFonts ? 250 : 180, true, true);
+ this.editorUi.showDialog(dlg.container, 380, Editor.enableWebFonts ? 250 : 180, true, true);
dlg.init();
}), parent, null, true);
})));
diff --git a/src/main/webapp/js/diagramly/Minimal.js b/src/main/webapp/js/diagramly/Minimal.js
index db7c86a9..fe917b79 100644
--- a/src/main/webapp/js/diagramly/Minimal.js
+++ b/src/main/webapp/js/diagramly/Minimal.js
@@ -1855,11 +1855,11 @@ EditorUi.initMinimalTheme = function()
var file = ui.getCurrentFile();
var key = (file != null) ? file.savingStatusKey : DrawioFile.prototype.savingStatusKey;
- if (ui.notificationBtn != null &&
- ui.notificationBtn.getAttribute('title') == mxResources.get(key) + '...')
+ if (ui.notificationBtn != null && ui.notificationBtn.getAttribute('title') ==
+ mxResources.get(key) + '...')
{
ui.statusContainer.innerHTML = '<img title="' + mxUtils.htmlEntities(
- mxResources.get(key)) + '...' + '"src="' + IMAGE_PATH + '/spin.gif">';
+ mxResources.get(key)) + '...' + '"src="' + Editor.tailSpin + '">';
ui.statusContainer.style.display = 'inline-block';
statusVisible = true;
}
@@ -1963,10 +1963,11 @@ EditorUi.initMinimalTheme = function()
(function()
{
- var cell = new mxCell('', new mxGeometry(0, 0, graph.defaultEdgeLength, 0),
- 'edgeStyle=none;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;' +
+ var edgeStyle = 'edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;' +
'endArrow=open;sourcePerimeterSpacing=8;targetPerimeterSpacing=8;fontSize=16;' +
- ((urlParams['rough'] != '0') ? 'sketch=1;' : ''));
+ ((urlParams['rough'] != '0') ? 'sketch=1;' : '');
+ var cell = new mxCell('', new mxGeometry(0, 0, graph.defaultEdgeLength, 0),
+ edgeStyle + 'curved=1;rounded=0;');
cell.geometry.setTerminalPoint(new mxPoint(0, 0), true);
cell.geometry.setTerminalPoint(new mxPoint(cell.geometry.width, 0), false);
cell.geometry.points = [];
@@ -1979,7 +1980,7 @@ EditorUi.initMinimalTheme = function()
mxResources.get('line'));
cell = cell.clone();
- cell.style += 'shape=flexArrow;rounded=1;startSize=8;endSize=8;';
+ cell.style = edgeStyle + 'shape=flexArrow;rounded=1;startSize=8;endSize=8;';
cell.geometry.width = graph.defaultEdgeLength + 20;
cell.geometry.setTerminalPoint(new mxPoint(0, 20), true);
cell.geometry.setTerminalPoint(new mxPoint(cell.geometry.width, 20), false);
diff --git a/src/main/webapp/js/diagramly/OneDriveClient.js b/src/main/webapp/js/diagramly/OneDriveClient.js
index 8b19b35f..42e41dd3 100644
--- a/src/main/webapp/js/diagramly/OneDriveClient.js
+++ b/src/main/webapp/js/diagramly/OneDriveClient.js
@@ -16,12 +16,9 @@ window.OneDriveClient = function(editorUi, isExtAuth, inlinePicker, noLogout)
isExtAuth = true;
}
- if (inlinePicker == null &&
- ((window.urlParams != null && window.urlParams['inlinePicker'] == '1') ||
- mxClient.IS_ANDROID || mxClient.IS_IOS //Mobile devices doesn't work with OneDrive picker, so, use the inline picker
- ))
+ if (inlinePicker == null) //Use inline picker as default
{
- inlinePicker = true;
+ inlinePicker = (window.urlParams != null && window.urlParams['inlinePicker'] == '0')? false : true;
}
if (noLogout == null && window.urlParams != null && window.urlParams['noLogoutOD'] == '1')
diff --git a/src/main/webapp/js/diagramly/sidebar/Sidebar-C4.js b/src/main/webapp/js/diagramly/sidebar/Sidebar-C4.js
index 3ae41e17..c4b11cae 100644
--- a/src/main/webapp/js/diagramly/sidebar/Sidebar-C4.js
+++ b/src/main/webapp/js/diagramly/sidebar/Sidebar-C4.js
@@ -120,9 +120,10 @@
bg.setValue(mxUtils.createXmlDocument().createElement('object'));
bg.setAttribute('placeholders', '1');
bg.setAttribute('c4Type', 'Database');
+ bg.setAttribute('c4Container', 'Container');
bg.setAttribute('c4Technology', 'Technology');
bg.setAttribute('c4Description', 'Description');
- bg.setAttribute('label', '%c4Type%<div>[Container:&nbsp;%c4Technology%]</div><br><div>%c4Description%</div>');
+ bg.setAttribute('label', '%c4Type%<div>[%c4Container%:&nbsp;%c4Technology%]</div><br><div>%c4Description%</div>');
return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Database');
}),
diff --git a/src/main/webapp/js/grapheditor/Format.js b/src/main/webapp/js/grapheditor/Format.js
index 7cce55b3..3abb4d12 100644
--- a/src/main/webapp/js/grapheditor/Format.js
+++ b/src/main/webapp/js/grapheditor/Format.js
@@ -15,8 +15,38 @@ Format.inactiveTabBackgroundColor = '#f1f3f4';
/**
* Icons for markers (24x16).
*/
+Format.classicFilledMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 10 2 L 5 8 L 10 14 Z M 0 8 L 24 8" stroke="#404040" fill="#404040"/>', 32, 20);
+Format.classicThinFilledMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 4 L 3 8 L 8 12 Z M 0 8 L 24 8" stroke="#404040" fill="#404040"/>', 32, 20);
+Format.openFilledMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 8 0 L 0 8 L 8 16 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>', 32, 20);
+Format.openThinFilledMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 8 4 L 0 8 L 8 12 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>', 32, 20);
+Format.openAsyncFilledMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 8 4 L 0 8 L 24 8" stroke="#404040" fill="transparent"/>', 32, 20);
+Format.blockFilledMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 2 L 8 14 Z M 0 8 L 24 8" stroke="#404040" fill="#404040"/>', 32, 20);
+Format.blockThinFilledMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 4 L 8 12 Z M 0 8 L 24 8" stroke="#404040" fill="#404040"/>', 32, 20);
+Format.asyncFilledMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 6 8 L 6 4 L 0 8 L 24 8" stroke="#404040" fill="#404040"/>', 32, 20);
+Format.ovalFilledMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 0 8 A 5 5 0 0 1 5 3 A 5 5 0 0 1 11 8 A 5 5 0 0 1 5 13 A 5 5 0 0 1 0 8 Z M 10 8 L 24 8" stroke="#404040" fill="#404040"/>', 32, 20);
+Format.diamondFilledMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 6 2 L 12 8 L 6 14 Z M 0 8 L 24 8" stroke="#404040" fill="#404040"/>', 32, 20);
+Format.diamondThinFilledMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 3 L 16 8 L 8 13 Z M 0 8 L 24 8" stroke="#404040" fill="#404040"/>', 32, 20);
+Format.classicMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 10 2 L 5 8 L 10 14 Z M 5 8 L 24 8" stroke="#404040" fill="transparent"/>', 32, 20);
+Format.classicThinMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 4 L 5 8 L 8 12 Z M 5 8 L 24 8" stroke="#404040" fill="transparent"/>', 32, 20);
+Format.blockMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 2 L 8 14 Z M 8 8 L 24 8" stroke="#404040" fill="transparent"/>', 32, 20);
+Format.blockThinMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 4 L 8 12 Z M 8 8 L 24 8" stroke="#404040" fill="transparent"/>', 32, 20);
+Format.asyncMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 6 8 L 6 4 L 0 8 L 24 8" stroke="#404040" fill="transparent"/>', 32, 20);
+Format.ovalMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 0 8 A 5 5 0 0 1 5 3 A 5 5 0 0 1 11 8 A 5 5 0 0 1 5 13 A 5 5 0 0 1 0 8 Z M 10 8 L 24 8" stroke="#404040" fill="transparent"/>', 32, 20);
+Format.diamondMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 6 2 L 12 8 L 6 14 Z M 12 8 L 24 8" stroke="#404040" fill="transparent"/>', 32, 20);
+Format.diamondThinMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 3 L 16 8 L 8 13 Z M 16 8 L 24 8" stroke="#404040" fill="transparent"/>', 32, 20);
+Format.boxMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 0 3 L 10 3 L 10 13 L 0 13 Z M 10 8 L 24 8" stroke="#404040" fill="transparent"/>', 32, 20);
+Format.halfCircleMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 0 3 A 5 5 0 0 1 5 8 A 5 5 0 0 1 0 13 M 5 8 L 24 8" stroke="#404040" fill="transparent"/>', 32, 20);
+Format.dashMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 0 2 L 12 14 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>', 32, 20);
+Format.crossMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 0 2 L 12 14 M 12 2 L 0 14 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>', 32, 20);
+Format.circlePlusMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 0 8 A 6 6 0 0 1 6 2 A 6 6 0 0 1 12 8 A 6 6 0 0 1 6 14 A 6 6 0 0 1 0 8 Z M 6 2 L 6 14 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>', 32, 20);
+Format.circleMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 0 8 A 6 6 0 0 1 6 2 A 6 6 0 0 1 12 8 A 6 6 0 0 1 6 14 A 6 6 0 0 1 0 8 Z M 12 8 L 24 8" stroke="#404040" fill="transparent"/>', 32, 20);
+Format.ERmandOneMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 6 2 L 6 14 M 9 2 L 9 14 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>', 32, 20);
+Format.ERmanyMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 0 2 L 12 8 L 0 14 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>', 32, 20);
+Format.ERoneToManyMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 0 2 L 12 8 L 0 14 M 15 2 L 15 14 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>', 32, 20);
+Format.ERzeroToOneMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 8 8 A 5 5 0 0 1 13 3 A 5 5 0 0 1 18 8 A 5 5 0 0 1 13 13 A 5 5 0 0 1 8 8 Z M 0 8 L 8 8 M 18 8 L 24 8 M 4 3 L 4 13" stroke="#404040" fill="transparent"/>', 32, 20);
+Format.ERzeroToManyMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 8 8 A 5 5 0 0 1 13 3 A 5 5 0 0 1 18 8 A 5 5 0 0 1 13 13 A 5 5 0 0 1 8 8 Z M 0 8 L 8 8 M 18 8 L 24 8 M 0 3 L 8 8 L 0 13" stroke="#404040" fill="transparent"/>', 32, 20);
+Format.EROneMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 5 2 L 5 14 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>', 32, 20);
Format.baseDashMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 0 2 L 0 14 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>', 32, 20);
-Format.erOneMarkerImage = Graph.createSvgImage(20, 22, '<path transform="translate(4,2)" stroke-width="2" d="M 5 2 L 5 14 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>', 32, 20);
/**
* Adds a style change item to the given menu.
@@ -3708,7 +3738,7 @@ TextFormatPanel.prototype.addFont = function(container)
}, insertPanel),
this.editorUi.toolbar.addMenuFunctionInContainer(insertPanel, 'geSprite-table', mxResources.get('table'), false, mxUtils.bind(this, function(menu)
{
- this.editorUi.menus.addInsertTableItem(menu);
+ this.editorUi.menus.addInsertTableItem(menu, null, null, false);
}))];
this.styleButtons(insertBtns);
this.styleButtons(btns);
@@ -5002,38 +5032,38 @@ StyleFormatPanel.prototype.addStroke = function(container)
if (ss.style.shape == 'connector' || ss.style.shape == 'filledEdge')
{
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC, 1], 'geIcon geSprite geSprite-startclassic', null, false).setAttribute('title', mxResources.get('classic'));
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC_THIN, 1], 'geIcon geSprite geSprite-startclassicthin', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OPEN, 0], 'geIcon geSprite geSprite-startopen', null, false).setAttribute('title', mxResources.get('openArrow'));
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OPEN_THIN, 0], 'geIcon geSprite geSprite-startopenthin', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['openAsync', 0], 'geIcon geSprite geSprite-startopenasync', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK, 1], 'geIcon geSprite geSprite-startblock', null, false).setAttribute('title', mxResources.get('block'));
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK_THIN, 1], 'geIcon geSprite geSprite-startblockthin', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['async', 1], 'geIcon geSprite geSprite-startasync', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OVAL, 1], 'geIcon geSprite geSprite-startoval', null, false).setAttribute('title', mxResources.get('oval'));
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND, 1], 'geIcon geSprite geSprite-startdiamond', null, false).setAttribute('title', mxResources.get('diamond'));
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND_THIN, 1], 'geIcon geSprite geSprite-startthindiamond', null, false).setAttribute('title', mxResources.get('diamondThin'));
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC, 0], 'geIcon geSprite geSprite-startclassictrans', null, false).setAttribute('title', mxResources.get('classic'));
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC_THIN, 0], 'geIcon geSprite geSprite-startclassicthintrans', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK, 0], 'geIcon geSprite geSprite-startblocktrans', null, false).setAttribute('title', mxResources.get('block'));
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK_THIN, 0], 'geIcon geSprite geSprite-startblockthintrans', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['async', 0], 'geIcon geSprite geSprite-startasynctrans', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OVAL, 0], 'geIcon geSprite geSprite-startovaltrans', null, false).setAttribute('title', mxResources.get('oval'));
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND, 0], 'geIcon geSprite geSprite-startdiamondtrans', null, false).setAttribute('title', mxResources.get('diamond'));
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND_THIN, 0], 'geIcon geSprite geSprite-startthindiamondtrans', null, false).setAttribute('title', mxResources.get('diamondThin'));
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['box', 0], 'geIcon geSprite geSvgSprite geSprite-box', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['halfCircle', 0], 'geIcon geSprite geSvgSprite geSprite-halfCircle', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['dash', 0], 'geIcon geSprite geSprite-startdash', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['cross', 0], 'geIcon geSprite geSprite-startcross', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['circlePlus', 0], 'geIcon geSprite geSprite-startcircleplus', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['circle', 1], 'geIcon geSprite geSprite-startcircle', null, false);
- //Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'baseDash'], ['dash', 0], null, null, false, Format.baseDashMarkerImage.src));
- Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['ERone', 0], null, null, false, Format.erOneMarkerImage.src));
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['ERmandOne', 0], 'geIcon geSprite geSprite-starteronetoone', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['ERmany', 0], 'geIcon geSprite geSprite-startermany', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['ERoneToMany', 0], 'geIcon geSprite geSprite-starteronetomany', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['ERzeroToOne', 1], 'geIcon geSprite geSprite-starteroneopt', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['ERzeroToMany', 1], 'geIcon geSprite geSprite-startermanyopt', null, false);
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC, 1], null, null, false, Format.classicFilledMarkerImage.src));
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC_THIN, 1], null, null, false, Format.classicThinFilledMarkerImage.src));
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OPEN, 0], null, null, false, Format.openFilledMarkerImage.src));
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OPEN_THIN, 0], null, null, false, Format.openThinFilledMarkerImage.src));
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['openAsync', 0], null, null, false, Format.openAsyncFilledMarkerImage.src));
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK, 1], null, null, false, Format.blockFilledMarkerImage.src));
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK_THIN, 1], null, null, false, Format.blockThinFilledMarkerImage.src));
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['async', 1], null, null, false, Format.asyncFilledMarkerImage.src));
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OVAL, 1], null, null, false, Format.ovalFilledMarkerImage.src));
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND, 1], null, null, false, Format.diamondFilledMarkerImage.src));
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND_THIN, 1], null, null, false, Format.diamondThinFilledMarkerImage.src));
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC, 0], null, null, false, Format.classicMarkerImage.src));
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC_THIN, 0], null, null, false, Format.classicThinMarkerImage.src));
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK, 0], null, null, false, Format.blockMarkerImage.src));
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK_THIN, 0], null, null, false, Format.blockThinMarkerImage.src));
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['async', 0], null, null, false, Format.asyncMarkerImage.src));
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OVAL, 0], null, null, false, Format.ovalMarkerImage.src));
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND, 0], null, null, false, Format.diamondMarkerImage.src));
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND_THIN, 0], null, null, false, Format.diamondThinMarkerImage.src));
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['box', 0], null, null, false, Format.boxMarkerImage.src));
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['halfCircle', 0], null, null, false, Format.halfCircleMarkerImage.src));
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['dash', 0], null, null, false, Format.dashMarkerImage.src));
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['cross', 0], null, null, false, Format.crossMarkerImage.src));
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['circlePlus', 0], null, null, false, Format.circlePlusMarkerImage.src));
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['circle', 1], null, null, false, Format.circleMarkerImage.src));
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['baseDash', 0], null, null, false, Format.baseDashMarkerImage.src));
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['ERone', 0], null, null, false, Format.EROneMarkerImage.src));
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['ERmandOne', 0], null, null, false, Format.ERmandOneMarkerImage.src));
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['ERmany', 0], null, null, false, Format.ERmanyMarkerImage.src));
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['ERoneToMany', 0], null, null, false, Format.ERoneToManyMarkerImage.src));
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['ERzeroToOne', 0], null, null, false, Format.ERzeroToOneMarkerImage.src));
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], ['ERzeroToMany', 1], null, null, false, Format.ERzeroToManyMarkerImage.src));
}
else
{
@@ -5052,38 +5082,38 @@ StyleFormatPanel.prototype.addStroke = function(container)
if (ss.style.shape == 'connector' || ss.style.shape == 'filledEdge')
{
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC, 1], 'geIcon geSprite geSprite-endclassic', null, false).setAttribute('title', mxResources.get('classic'));
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC_THIN, 1], 'geIcon geSprite geSprite-endclassicthin', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OPEN, 0], 'geIcon geSprite geSprite-endopen', null, false).setAttribute('title', mxResources.get('openArrow'));
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OPEN_THIN, 0], 'geIcon geSprite geSprite-endopenthin', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['openAsync', 0], 'geIcon geSprite geSprite-endopenasync', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK, 1], 'geIcon geSprite geSprite-endblock', null, false).setAttribute('title', mxResources.get('block'));
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK_THIN, 1], 'geIcon geSprite geSprite-endblockthin', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['async', 1], 'geIcon geSprite geSprite-endasync', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OVAL, 1], 'geIcon geSprite geSprite-endoval', null, false).setAttribute('title', mxResources.get('oval'));
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND, 1], 'geIcon geSprite geSprite-enddiamond', null, false).setAttribute('title', mxResources.get('diamond'));
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND_THIN, 1], 'geIcon geSprite geSprite-endthindiamond', null, false).setAttribute('title', mxResources.get('diamondThin'));
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC, 0], 'geIcon geSprite geSprite-endclassictrans', null, false).setAttribute('title', mxResources.get('classic'));
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC_THIN, 0], 'geIcon geSprite geSprite-endclassicthintrans', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK, 0], 'geIcon geSprite geSprite-endblocktrans', null, false).setAttribute('title', mxResources.get('block'));
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK_THIN, 0], 'geIcon geSprite geSprite-endblockthintrans', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['async', 0], 'geIcon geSprite geSprite-endasynctrans', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OVAL, 0], 'geIcon geSprite geSprite-endovaltrans', null, false).setAttribute('title', mxResources.get('oval'));
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND, 0], 'geIcon geSprite geSprite-enddiamondtrans', null, false).setAttribute('title', mxResources.get('diamond'));
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND_THIN, 0], 'geIcon geSprite geSprite-endthindiamondtrans', null, false).setAttribute('title', mxResources.get('diamondThin'));
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['box', 0], 'geIcon geSprite geSvgSprite geFlipSprite geSprite-box', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['halfCircle', 0], 'geIcon geSprite geSvgSprite geFlipSprite geSprite-halfCircle', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['dash', 0], 'geIcon geSprite geSprite-enddash', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['cross', 0], 'geIcon geSprite geSprite-endcross', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['circlePlus', 0], 'geIcon geSprite geSprite-endcircleplus', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['circle', 1], 'geIcon geSprite geSprite-endcircle', null, false);
- //Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['baseDash', 0], null, null, false, Format.baseDashMarkerImage.src), 'scaleX(-1)');
- Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['ERone', 0], null, null, false, Format.erOneMarkerImage.src), 'scaleX(-1)');
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['ERmandOne', 0], 'geIcon geSprite geSprite-enderonetoone', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['ERmany', 0], 'geIcon geSprite geSprite-endermany', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['ERoneToMany', 0], 'geIcon geSprite geSprite-enderonetomany', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['ERzeroToOne', 1], 'geIcon geSprite geSprite-enderoneopt', null, false);
- this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['ERzeroToMany', 1], 'geIcon geSprite geSprite-endermanyopt', null, false);
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC, 1], null, null, false, Format.classicFilledMarkerImage.src), 'scaleX(-1)');
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC_THIN, 1], null, null, false, Format.classicThinFilledMarkerImage.src), 'scaleX(-1)');
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OPEN, 0], null, null, false, Format.openFilledMarkerImage.src), 'scaleX(-1)');
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OPEN_THIN, 0], null, null, false, Format.openThinFilledMarkerImage.src), 'scaleX(-1)');
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['openAsync', 0], null, null, false, Format.openAsyncFilledMarkerImage.src), 'scaleX(-1)');
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK, 1], null, null, false, Format.blockFilledMarkerImage.src), 'scaleX(-1)');
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK_THIN, 1], null, null, false, Format.blockThinFilledMarkerImage.src), 'scaleX(-1)');
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['async', 1], null, null, false, Format.asyncFilledMarkerImage.src), 'scaleX(-1)');
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OVAL, 1], null, null, false, Format.ovalFilledMarkerImage.src), 'scaleX(-1)');
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND, 1], null, null, false, Format.diamondFilledMarkerImage.src), 'scaleX(-1)');
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND_THIN, 1], null, null, false, Format.diamondThinFilledMarkerImage.src), 'scaleX(-1)');
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC, 0], null, null, false, Format.classicMarkerImage.src), 'scaleX(-1)');
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC_THIN, 0], null, null, false, Format.classicThinMarkerImage.src), 'scaleX(-1)');
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK, 0], null, null, false, Format.blockMarkerImage.src), 'scaleX(-1)');
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK_THIN, 0], null, null, false, Format.blockThinMarkerImage.src), 'scaleX(-1)');
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['async', 0], null, null, false, Format.asyncMarkerImage.src), 'scaleX(-1)');
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OVAL, 0], null, null, false, Format.ovalMarkerImage.src), 'scaleX(-1)');
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND, 0], null, null, false, Format.diamondMarkerImage.src), 'scaleX(-1)');
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND_THIN, 0], null, null, false, Format.diamondThinMarkerImage.src), 'scaleX(-1)');
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['box', 0], null, null, false, Format.boxMarkerImage.src), 'scaleX(-1)');
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['halfCircle', 0], null, null, false, Format.halfCircleMarkerImage.src), 'scaleX(-1)');
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['dash', 0], null, null, false, Format.dashMarkerImage.src), 'scaleX(-1)');
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['cross', 0], null, null, false, Format.crossMarkerImage.src), 'scaleX(-1)');
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['circlePlus', 0], null, null, false, Format.circlePlusMarkerImage.src), 'scaleX(-1)');
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['circle', 0], null, null, false, Format.circleMarkerImage.src), 'scaleX(-1)');
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['baseDash', 0], null, null, false, Format.baseDashMarkerImage.src), 'scaleX(-1)');
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['ERone', 0], null, null, false, Format.EROneMarkerImage.src), 'scaleX(-1)');
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['ERmandOne', 0], null, null, false, Format.ERmandOneMarkerImage.src), 'scaleX(-1)');
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['ERmany', 0], null, null, false, Format.ERmanyMarkerImage.src), 'scaleX(-1)');
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['ERoneToMany', 0], null, null, false, Format.ERoneToManyMarkerImage.src), 'scaleX(-1)');
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['ERzeroToOne', 0], null, null, false, Format.ERzeroToOneMarkerImage.src), 'scaleX(-1)');
+ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], ['ERzeroToMany', 0], null, null, false, Format.ERzeroToManyMarkerImage.src), 'scaleX(-1)');
}
else
{
diff --git a/src/main/webapp/js/grapheditor/Graph.js b/src/main/webapp/js/grapheditor/Graph.js
index e173db4b..f8e8d5f7 100644
--- a/src/main/webapp/js/grapheditor/Graph.js
+++ b/src/main/webapp/js/grapheditor/Graph.js
@@ -325,6 +325,7 @@ Graph = function(container, model, renderHint, stylesheet, themes, standalone)
{
var me = evt.getProperty('event');
var state = me.getState();
+ var s = this.view.scale;
if (!mxEvent.isAltDown(me.getEvent()) && state != null)
{
@@ -370,12 +371,15 @@ Graph = function(container, model, renderHint, stylesheet, themes, standalone)
if (!this.isCellSelected(table))
{
- if ((mxUtils.intersects(box, new mxRectangle(state.x, state.y - 2, state.width, 3)) &&
+ var geo = this.getCellGeometry(state.cell);
+ var g = (geo.alternateBounds != null) ? geo.alternateBounds : geo;
+
+ if ((mxUtils.intersects(box, new mxRectangle(state.x, state.y - 2, g.width * s, 3)) &&
this.model.getChildAt(table, 0) != row) || mxUtils.intersects(box, new mxRectangle(
- state.x, state.y + state.height - 2, state.width, 3)) ||
- (mxUtils.intersects(box, new mxRectangle(state.x - 2, state.y, 2, state.height)) &&
+ state.x, state.y + g.height - 2, g.width, 3)) ||
+ (mxUtils.intersects(box, new mxRectangle(state.x - 2, state.y, 2, g.height * s)) &&
this.model.getChildAt(row, 0) != state.cell) || mxUtils.intersects(box, new mxRectangle(
- state.x + state.width - 2, state.y, 2, state.height)))
+ state.x + g.width * s - 2, state.y, 2, g.height * s)))
{
var wasSelected = this.selectionCellsHandler.isHandled(table);
this.selectCellForEvent(table, me.getEvent());
@@ -405,7 +409,6 @@ Graph = function(container, model, renderHint, stylesheet, themes, standalone)
if (this.isSwimlane(current.cell))
{
var offset = this.getActualStartSize(current.cell);
- var s = this.view.scale;
if (((offset.x > 0 || offset.width > 0) && mxUtils.intersects(box, new mxRectangle(
current.x + (offset.x - offset.width - 1) * s + ((offset.x == 0) ? current.width : 0),
@@ -1299,6 +1302,22 @@ Graph.foreignObjectWarningText = 'Viewer does not support full SVG 1.1';
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 = '<!-- Do not edit this file with editors other than diagrams.net -->'
+
+/**
* Minimum height for table rows.
*/
Graph.pasteStyles = ['rounded', 'shadow', 'dashed', 'dashPattern', 'fontFamily', 'fontSource', 'fontSize', 'fontColor', 'fontStyle',
@@ -1338,8 +1357,7 @@ Graph.createOffscreenGraph = function(stylesheet)
*/
Graph.createSvgImage = function(w, h, data, coordWidth, coordHeight)
{
- var tmp = unescape(encodeURIComponent(
- '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">' +
+ var tmp = unescape(encodeURIComponent(Graph.svgDoctype +
'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="' + w + 'px" height="' + h + 'px" ' +
((coordWidth != null && coordHeight != null) ? 'viewBox="0 0 ' + coordWidth + ' ' + coordHeight + '" ' : '') +
'version="1.1">' + data + '</svg>'));
@@ -5929,7 +5947,8 @@ Graph.prototype.setTableColumnWidth = function(col, dx, extend)
if (geo != null)
{
geo = geo.clone();
- geo.width += dx;
+ var g = (geo.alternateBounds != null) ? geo.alternateBounds : geo;
+ g.width += dx;
model.setGeometry(cell, geo);
}
@@ -5942,11 +5961,12 @@ Graph.prototype.setTableColumnWidth = function(col, dx, extend)
if (geo != null)
{
geo = geo.clone();
- geo.x += dx;
+ var g = (geo.alternateBounds != null) ? geo.alternateBounds : geo;
+ g.x += dx;
if (!extend)
{
- geo.width -= dx;
+ g.width -= dx;
}
model.setGeometry(cell, geo);
@@ -5962,7 +5982,8 @@ Graph.prototype.setTableColumnWidth = function(col, dx, extend)
if (tgeo != null)
{
tgeo = tgeo.clone();
- tgeo.width += dx;
+ var g = (tgeo.alternateBounds != null) ? tgeo.alternateBounds : geo;
+ g.width += dx;
model.setGeometry(table, tgeo);
}
}
@@ -6058,7 +6079,9 @@ TableLayout.prototype.getRowLayout = function(row, width)
if (cell != null)
{
- x += cell.width * rw / sw;
+ x += (cell.alternateBounds != null ?
+ cell.alternateBounds.width :
+ cell.width) * rw / sw;
result.push(Math.round(x));
}
}
@@ -6076,6 +6099,7 @@ TableLayout.prototype.layoutRow = function(row, positions, height, tw)
var model = this.graph.getModel();
var cells = model.getChildCells(row, true);
var off = this.graph.getActualStartSize(row, true);
+ var last = null;
var x = off.x;
var sw = 0;
@@ -6100,7 +6124,7 @@ TableLayout.prototype.layoutRow = function(row, positions, height, tw)
{
cell.x = positions[i];
cell.width = positions[i + 1] - cell.x;
-
+
// Fills with last cell if not enough cells
if (i == cells.length - 1 && i < positions.length - 2)
{
@@ -6122,8 +6146,31 @@ TableLayout.prototype.layoutRow = function(row, positions, height, tw)
}
}
+ cell.alternateBounds = new mxRectangle(0, 0, cell.width, cell.height);
model.setGeometry(cells[i], cell);
}
+
+ // Handles colspan
+ if (last != null && last.geo != null)
+ {
+ if (last.colspan > 1)
+ {
+ last.colspan--;
+ last.geo.width += cell.width;
+ model.setVisible(cells[i], false);
+ }
+ else
+ {
+ model.setVisible(cells[i], true);
+ }
+ }
+
+ if (last == null || last.colspan <= 1)
+ {
+ var style = this.graph.getCurrentCellStyle(cells[i], true);
+ last = {colspan: (style != null) ? parseInt(style['colspan'] || 1) : 1,
+ style: style, cell: cells[i], geo: cell};
+ }
}
return sw;
@@ -11611,37 +11658,52 @@ if (typeof mxVertexHandler != 'undefined')
if (rows.length > 0)
{
- var cols = graph.view.getCellStates(model.getChildCells(rows[0].cell, true));
+ var cols = model.getChildCells(rows[0].cell, true);
// Adds column width handles
for (var i = 0; i < cols.length; i++)
{
(mxUtils.bind(this, function(index)
{
- var colState = cols[index];
+ var colState = graph.view.getState(cols[index]);
+ var geo = graph.getCellGeometry(cols[index]);
+ var g = (geo.alternateBounds != null) ? geo.alternateBounds : geo;
+
+ if (colState == null)
+ {
+ colState = new mxCellState(graph.view, cols[index],
+ graph.getCellStyle(cols[index]));
+ colState.x = tableState.x + geo.x * graph.view.scale;
+ colState.y = tableState.y + geo.y * graph.view.scale;
+ colState.width = g.width * graph.view.scale;
+ colState.height = g.height * graph.view.scale;
+ colState.updateCachedBounds();
+ }
+
var nextCol = (index < cols.length - 1) ? cols[index + 1] : null;
+ var ngeo = (nextCol != null) ? graph.getCellGeometry(nextCol) : null;
+ var ng = (ngeo != null && ngeo.alternateBounds != null) ? ngeo.alternateBounds : ngeo;
var shape = new mxLine(new mxRectangle(), mxConstants.NONE, 1, true);
shape.isDashed = sel.isDashed;
// Workaround for event handling on overlapping cells with tolerance
shape.svgStrokeTolerance++;
-
var handle = new mxHandle(colState, 'col-resize', null, shape);
handle.tableHandle = true;
var dx = 0;
handle.shape.node.parentNode.insertBefore(handle.shape.node,
handle.shape.node.parentNode.firstChild);
-
+
handle.redraw = function()
{
- if (this.shape != null && this.state.shape != null)
+ if (this.shape != null)
{
var start = graph.getActualStartSize(tableState.cell);
this.shape.stroke = (dx == 0) ? mxConstants.NONE : sel.stroke;
- this.shape.bounds.x = this.state.x + this.state.width +
- dx * this.graph.view.scale;
+ this.shape.bounds.x = this.state.x + (g.width +
+ dx) * this.graph.view.scale;
this.shape.bounds.width = 1;
this.shape.bounds.y = tableState.y + ((index == cols.length - 1) ?
0 : start.y * this.graph.view.scale);
@@ -11656,15 +11718,15 @@ if (typeof mxVertexHandler != 'undefined')
handle.setPosition = function(bounds, pt, me)
{
- dx = Math.max(Graph.minTableColumnWidth - bounds.width,
- pt.x - bounds.x - bounds.width);
+ dx = Math.max(Graph.minTableColumnWidth - g.width,
+ pt.x - bounds.x - g.width);
shiftPressed = mxEvent.isShiftDown(me.getEvent());
- if (nextCol != null && !shiftPressed)
+ if (ngeo != null && ng != null && !shiftPressed)
{
- dx = Math.min((nextCol.x + nextCol.width - colState.x -
- colState.width) / graph.view.scale -
- Graph.minTableColumnWidth, dx);
+ dx = Math.min(colState.x / graph.view.scale -
+ g.width - Graph.minTableColumnWidth + ngeo.x +
+ graph.view.translate.x + ng.width, dx);
}
};
@@ -11683,6 +11745,12 @@ if (typeof mxVertexHandler != 'undefined')
dx = 0;
};
+
+ // Stops repaint of text label via vertex handler
+ handle.positionChanged = function()
+ {
+ // do nothing
+ };
handle.reset = function()
{
diff --git a/src/main/webapp/js/grapheditor/Menus.js b/src/main/webapp/js/grapheditor/Menus.js
index 449cfcf7..42372f0c 100644
--- a/src/main/webapp/js/grapheditor/Menus.js
+++ b/src/main/webapp/js/grapheditor/Menus.js
@@ -612,8 +612,10 @@ Menus.prototype.addInsertTableCellItem = function(menu, parent)
/**
* Adds a menu item to insert a table.
*/
-Menus.prototype.addInsertTableItem = function(menu, insertFn, parent)
+Menus.prototype.addInsertTableItem = function(menu, insertFn, parent, showOptions)
{
+ showOptions = (showOptions != null) ? showOptions : true;
+
insertFn = (insertFn != null) ? insertFn : mxUtils.bind(this, function(evt, rows, cols)
{
var graph = this.editorUi.editor.graph;
@@ -734,14 +736,12 @@ Menus.prototype.addInsertTableItem = function(menu, insertFn, parent)
var titleOption = document.createElement('input');
titleOption.setAttribute('id', 'geTitleOption');
titleOption.setAttribute('type', 'checkbox');
- elt2.firstChild.appendChild(titleOption);
-
- var lbl = document.createElement('label');
- mxUtils.write(lbl, mxResources.get('title'));
- lbl.setAttribute('for', 'geTitleOption');
- elt2.firstChild.appendChild(lbl);
-
- mxEvent.addGestureListeners(lbl, null, null, mxUtils.bind(this, function(e)
+
+ var titleLbl = document.createElement('label');
+ mxUtils.write(titleLbl, mxResources.get('title'));
+ titleLbl.setAttribute('for', 'geTitleOption');
+
+ mxEvent.addGestureListeners(titleLbl, null, null, mxUtils.bind(this, function(e)
{
mxEvent.consume(e);
}));
@@ -751,19 +751,15 @@ Menus.prototype.addInsertTableItem = function(menu, insertFn, parent)
mxEvent.consume(e);
}));
- mxUtils.br(elt2.firstChild);
-
var containerOption = document.createElement('input');
containerOption.setAttribute('id', 'geContainerOption');
containerOption.setAttribute('type', 'checkbox');
- elt2.firstChild.appendChild(containerOption);
-
- var lbl = document.createElement('label');
- mxUtils.write(lbl, mxResources.get('container'));
- lbl.setAttribute('for', 'geContainerOption');
- elt2.firstChild.appendChild(lbl);
- mxEvent.addGestureListeners(lbl, null, null, mxUtils.bind(this, function(e)
+ var containerLbl = document.createElement('label');
+ mxUtils.write(containerLbl, mxResources.get('container'));
+ containerLbl.setAttribute('for', 'geContainerOption');
+
+ mxEvent.addGestureListeners(containerLbl, null, null, mxUtils.bind(this, function(e)
{
mxEvent.consume(e);
}));
@@ -773,8 +769,16 @@ Menus.prototype.addInsertTableItem = function(menu, insertFn, parent)
mxEvent.consume(e);
}));
- mxUtils.br(elt2.firstChild);
- mxUtils.br(elt2.firstChild);
+ if (showOptions)
+ {
+ elt2.firstChild.appendChild(titleOption);
+ elt2.firstChild.appendChild(titleLbl);
+ mxUtils.br(elt2.firstChild);
+ elt2.firstChild.appendChild(containerOption);
+ elt2.firstChild.appendChild(containerLbl);
+ mxUtils.br(elt2.firstChild);
+ mxUtils.br(elt2.firstChild);
+ }
var picker = createPicker(5, 5);
elt2.firstChild.appendChild(picker);
diff --git a/src/main/webapp/js/grapheditor/Shapes.js b/src/main/webapp/js/grapheditor/Shapes.js
index abe11bf3..6ef4edb6 100644
--- a/src/main/webapp/js/grapheditor/Shapes.js
+++ b/src/main/webapp/js/grapheditor/Shapes.js
@@ -187,16 +187,23 @@
'rowLines', '1') != '0';
var columnLines = mxUtils.getValue(this.state.style,
'columnLines', '1') != '0';
+ var geo = graph.getCellGeometry(rows[0]);
+ var rowData = [{y: (geo != null) ? geo.y + geo.height : 0,
+ cells: graph.model.getChildCells(rows[0], true)}];
// Paints row lines
if (rowLines)
{
for (var i = 1; i < rows.length; i++)
{
- var geo = graph.getCellGeometry(rows[i]);
-
+ geo = graph.getCellGeometry(rows[i]);
+ var data = {y: 0, cells: graph.model.getChildCells(rows[i], true)};
+ rowData.push(data);
+
if (geo != null)
{
+ data.y = geo.y + geo.height;
+
c.begin();
c.moveTo(x + start.x, y + geo.y);
c.lineTo(x + w - start.width, y + geo.y);
@@ -213,12 +220,37 @@
// Paints column lines
for (var i = 1; i < cols.length; i++)
{
- var geo = graph.getCellGeometry(cols[i]);
+ geo = graph.getCellGeometry(cols[i]);
if (geo != null)
{
c.begin();
c.moveTo(x + geo.x + start.x, y + start.y);
+ var th = 0;
+
+ for (var j = 0; j < rowData.length; j++)
+ {
+ var data = rowData[j];
+
+ if (data != null)
+ {
+ if (graph.model.isVisible(data.cells[i]))
+ {
+ th = data.y;
+ }
+ else
+ {
+ if (th > 0)
+ {
+ c.lineTo(x + geo.x + start.x, y + th - start.height);
+ }
+
+ c.moveTo(x + geo.x + start.x, y + data.y);
+ th = 0;
+ }
+ }
+ }
+
c.lineTo(x + geo.x + start.x, y + h - start.height);
c.end();
c.stroke();
diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.js
index 37682f4b..617a9259 100644
--- a/src/main/webapp/js/viewer-static.min.js
+++ b/src/main/webapp/js/viewer-static.min.js
@@ -200,7 +200,7 @@ null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=
if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent)&&(urlParams.gapi="0");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"15.2.7",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"15.2.9",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||
0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_WIN:0<navigator.appVersion.indexOf("Win"),IS_MAC:0<navigator.appVersion.indexOf("Mac"),
@@ -628,8 +628,8 @@ var mxStencilRegistry={stencils:{},addStencil:function(a,b){mxStencilRegistry.st
(function(){function a(a){a=null!=a?a:2;return function(b,c,d,k,l,m,n,p,q,r){c=l*q*1.118;p=m*q*1.118;l*=n+q;m*=n+q;var e=k.clone();e.x-=c;e.y-=p;n=d!=mxConstants.ARROW_CLASSIC&&d!=mxConstants.ARROW_CLASSIC_THIN?1:.75;k.x+=-l*n-c;k.y+=-m*n-p;return function(){b.begin();b.moveTo(e.x,e.y);b.lineTo(e.x-l-m/a,e.y-m+l/a);d!=mxConstants.ARROW_CLASSIC&&d!=mxConstants.ARROW_CLASSIC_THIN||b.lineTo(e.x-3*l/4,e.y-3*m/4);b.lineTo(e.x+m/a-l,e.y-m-l/a);b.close();r?b.fillAndStroke():b.stroke()}}}function b(a){a=
null!=a?a:2;return function(b,c,d,k,l,m,n,p,q,r){c=l*q*1.118;d=m*q*1.118;l*=n+q;m*=n+q;var e=k.clone();e.x-=c;e.y-=d;k.x+=2*-c;k.y+=2*-d;return function(){b.begin();b.moveTo(e.x-l-m/a,e.y-m+l/a);b.lineTo(e.x,e.y);b.lineTo(e.x+m/a-l,e.y-m-l/a);b.stroke()}}}function c(a,b,c,g,k,l,m,n,p,q){n=c==mxConstants.ARROW_DIAMOND?.7071:.9862;b=k*p*n;n*=l*p;k*=m+p;l*=m+p;var d=g.clone();d.x-=b;d.y-=n;g.x+=-k-b;g.y+=-l-n;var e=c==mxConstants.ARROW_DIAMOND?2:3.4;return function(){a.begin();a.moveTo(d.x,d.y);a.lineTo(d.x-
k/2-l/e,d.y+k/e-l/2);a.lineTo(d.x-k,d.y-l);a.lineTo(d.x-k/2+l/e,d.y-l/2-k/e);a.close();q?a.fillAndStroke():a.stroke()}}mxMarker.addMarker("classic",a(2));mxMarker.addMarker("classicThin",a(3));mxMarker.addMarker("block",a(2));mxMarker.addMarker("blockThin",a(3));mxMarker.addMarker("open",b(2));mxMarker.addMarker("openThin",b(3));mxMarker.addMarker("oval",function(a,b,c,g,k,l,m,n,p,q){var d=m/2,e=g.clone();g.x-=k*d;g.y-=l*d;return function(){a.ellipse(e.x-d,e.y-d,m,m);q?a.fillAndStroke():a.stroke()}});
-mxMarker.addMarker("diamond",c);mxMarker.addMarker("diamondThin",c)})();function mxActor(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxActor,mxShape);mxActor.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();this.redrawPath(a,b,c,d,e);a.fillAndStroke()};
-mxActor.prototype.redrawPath=function(a,b,c,d,e){b=d/3;a.moveTo(0,e);a.curveTo(0,3*e/5,0,2*e/5,d/2,2*e/5);a.curveTo(d/2-b,2*e/5,d/2-b,0,d/2,0);a.curveTo(d/2+b,0,d/2+b,2*e/5,d/2,2*e/5);a.curveTo(d,2*e/5,d,3*e/5,d,e);a.close()};function mxCloud(a,b,c,d){mxActor.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxCloud,mxActor);
+mxMarker.addMarker("baseDash",function(a,b,c,g,k,l,m,n,p,q){var d=k*(m+p+1),e=l*(m+p+1);return function(){a.begin();a.moveTo(g.x-e/2,g.y+d/2);a.lineTo(g.x+e/2,g.y-d/2);a.stroke()}});mxMarker.addMarker("diamond",c);mxMarker.addMarker("diamondThin",c)})();function mxActor(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxActor,mxShape);
+mxActor.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();this.redrawPath(a,b,c,d,e);a.fillAndStroke()};mxActor.prototype.redrawPath=function(a,b,c,d,e){b=d/3;a.moveTo(0,e);a.curveTo(0,3*e/5,0,2*e/5,d/2,2*e/5);a.curveTo(d/2-b,2*e/5,d/2-b,0,d/2,0);a.curveTo(d/2+b,0,d/2+b,2*e/5,d/2,2*e/5);a.curveTo(d,2*e/5,d,3*e/5,d,e);a.close()};function mxCloud(a,b,c,d){mxActor.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxCloud,mxActor);
mxCloud.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(.25*d,.25*e);a.curveTo(.05*d,.25*e,0,.5*e,.16*d,.55*e);a.curveTo(0,.66*e,.18*d,.9*e,.31*d,.8*e);a.curveTo(.4*d,e,.7*d,e,.8*d,.8*e);a.curveTo(d,.8*e,d,.6*e,.875*d,.5*e);a.curveTo(d,.3*e,.8*d,.1*e,.625*d,.2*e);a.curveTo(.5*d,.05*e,.3*d,.05*e,.25*d,.25*e);a.close()};function mxRectangleShape(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxRectangleShape,mxShape);
mxRectangleShape.prototype.isHtmlAllowed=function(){var a=!0;null!=this.style&&(a="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));return!this.isRounded&&!this.glass&&0==this.rotation&&(a||null!=this.fill&&this.fill!=mxConstants.NONE)};
mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?f=Math.min(d/2,Math.min(e/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
@@ -2055,11 +2055,11 @@ Editor.prototype.setFilename=function(b){this.filename=b};
Editor.prototype.createUndoManager=function(){var b=this.graph,c=new mxUndoManager;this.undoListener=function(b,e){c.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(b,c){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,e);b.getView().addListener(mxEvent.UNDO,e);e=function(c,e){var g=b.getSelectionCellsForChanges(e.getProperty("edit").changes,function(b){return!(b instanceof mxChildChange)});if(0<g.length){b.getModel();for(var k=[],d=0;d<
g.length;d++)null!=b.view.getState(g[d])&&k.push(g[d]);b.setSelectionCells(k)}};c.addListener(mxEvent.UNDO,e);c.addListener(mxEvent.REDO,e);return c};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};
OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};
-function Dialog(b,c,e,k,g,p,t,d,f,l,m){var q=f?57:0,n=e,u=k,v=f?0:64,y=mxUtils.getDocumentSize();null!=window.innerHeight&&(y.height=window.innerHeight);var x=y.height,G=Math.max(1,Math.round((y.width-e-v)/2)),C=Math.max(1,Math.round((x-k-b.footerHeight)/3));c.style.maxHeight="100%";e=null!=document.body?Math.min(e,document.body.scrollWidth-v):e;k=Math.min(k,x-v);0<b.dialogs.length&&(this.zIndex+=2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",
-this.bg.style.background=Dialog.backdropColor,this.bg.style.height=x+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));y=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=y.x+"px";this.bg.style.top=y.y+"px";G+=y.x;C+=y.y;g&&document.body.appendChild(this.bg);var E=b.createDiv(f?"geTransDialog":"geDialog");g=this.getPosition(G,C,e,k);G=g.x;C=g.y;E.style.width=e+"px";E.style.height=k+"px";E.style.left=G+"px";E.style.top=C+"px";E.style.zIndex=
-this.zIndex;E.appendChild(c);document.body.appendChild(E);!d&&c.clientHeight>E.clientHeight-v&&(c.style.overflowY="auto");if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),p.setAttribute("title",mxResources.get("close")),p.className="geDialogClose",p.style.top=C+14+"px",p.style.left=G+e+38-q+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!m)){var J=!1;
-mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(b){J=!0}),null,mxUtils.bind(this,function(d){J&&(b.hideDialog(!0),J=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var f=l();null!=f&&(n=e=f.w,u=k=f.h)}f=mxUtils.getDocumentSize();x=f.height;this.bg.style.height=x+"px";G=Math.max(1,Math.round((f.width-e-v)/2));C=Math.max(1,Math.round((x-k-b.footerHeight)/3));e=null!=document.body?Math.min(n,document.body.scrollWidth-v):n;k=Math.min(u,x-v);f=this.getPosition(G,C,e,
-k);G=f.x;C=f.y;E.style.left=G+"px";E.style.top=C+"px";E.style.width=e+"px";E.style.height=k+"px";!d&&c.clientHeight>E.clientHeight-v&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=C+14+"px",this.dialogImg.style.left=G+e+38-q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=t;this.container=E;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+function Dialog(b,c,e,k,g,p,t,d,f,l,m){var q=f?57:0,n=e,u=k,v=f?0:64,y=mxUtils.getDocumentSize();null!=window.innerHeight&&(y.height=window.innerHeight);var x=y.height,E=Math.max(1,Math.round((y.width-e-v)/2)),C=Math.max(1,Math.round((x-k-b.footerHeight)/3));c.style.maxHeight="100%";e=null!=document.body?Math.min(e,document.body.scrollWidth-v):e;k=Math.min(k,x-v);0<b.dialogs.length&&(this.zIndex+=2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",
+this.bg.style.background=Dialog.backdropColor,this.bg.style.height=x+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));y=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=y.x+"px";this.bg.style.top=y.y+"px";E+=y.x;C+=y.y;g&&document.body.appendChild(this.bg);var F=b.createDiv(f?"geTransDialog":"geDialog");g=this.getPosition(E,C,e,k);E=g.x;C=g.y;F.style.width=e+"px";F.style.height=k+"px";F.style.left=E+"px";F.style.top=C+"px";F.style.zIndex=
+this.zIndex;F.appendChild(c);document.body.appendChild(F);!d&&c.clientHeight>F.clientHeight-v&&(c.style.overflowY="auto");if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),p.setAttribute("title",mxResources.get("close")),p.className="geDialogClose",p.style.top=C+14+"px",p.style.left=E+e+38-q+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!m)){var I=!1;
+mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(b){I=!0}),null,mxUtils.bind(this,function(d){I&&(b.hideDialog(!0),I=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var f=l();null!=f&&(n=e=f.w,u=k=f.h)}f=mxUtils.getDocumentSize();x=f.height;this.bg.style.height=x+"px";E=Math.max(1,Math.round((f.width-e-v)/2));C=Math.max(1,Math.round((x-k-b.footerHeight)/3));e=null!=document.body?Math.min(n,document.body.scrollWidth-v):n;k=Math.min(u,x-v);f=this.getPosition(E,C,e,
+k);E=f.x;C=f.y;F.style.left=E+"px";F.style.top=C+"px";F.style.width=e+"px";F.style.height=k+"px";!d&&c.clientHeight>F.clientHeight-v&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=C+14+"px",this.dialogImg.style.left=E+e+38-q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=t;this.container=F;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
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+
@@ -2088,19 +2088,19 @@ PageSetupDialog.addPageFormatPanel=function(b,c,e,k){function g(b,c,l){if(l||q!=
e.height==l.format.height?(d.value=l.key,p.setAttribute("checked","checked"),p.defaultChecked=!0,p.checked=!0,t.removeAttribute("checked"),t.defaultChecked=!1,t.checked=!1,b=!0):e.width==l.format.height&&e.height==l.format.width&&(d.value=l.key,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,t.setAttribute("checked","checked"),t.defaultChecked=!0,b=t.checked=!0));b?(f.style.display="",m.style.display="none"):(q.value=e.width/100,n.value=e.height/100,p.setAttribute("checked","checked"),
d.value="custom",f.style.display="none",m.style.display="")}}c="format-"+c;var p=document.createElement("input");p.setAttribute("name",c);p.setAttribute("type","radio");p.setAttribute("value","portrait");var t=document.createElement("input");t.setAttribute("name",c);t.setAttribute("type","radio");t.setAttribute("value","landscape");var d=document.createElement("select");d.style.marginBottom="8px";d.style.width="202px";var f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";
f.style.height="24px";p.style.marginRight="6px";f.appendChild(p);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));f.appendChild(c);t.style.marginLeft="10px";t.style.marginRight="6px";f.appendChild(t);var l=document.createElement("span");l.style.width="100px";mxUtils.write(l,mxResources.get("landscape"));f.appendChild(l);var m=document.createElement("div");m.style.marginLeft="4px";m.style.width="210px";m.style.height="24px";var q=document.createElement("input");
-q.setAttribute("size","7");q.style.textAlign="right";m.appendChild(q);mxUtils.write(m," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in");f.style.display="none";m.style.display="none";for(var u={},v=PageSetupDialog.getFormats(),y=0;y<v.length;y++){var x=v[y];u[x.key]=x;var G=document.createElement("option");G.setAttribute("value",x.key);mxUtils.write(G,x.title);d.appendChild(G)}var C=!1;g();b.appendChild(d);mxUtils.br(b);
-b.appendChild(f);b.appendChild(m);var E=e,J=function(b,c){var l=u[d.value];null!=l.format?(q.value=l.format.width/100,n.value=l.format.height/100,m.style.display="none",f.style.display=""):(f.style.display="none",m.style.display="");l=parseFloat(q.value);if(isNaN(l)||0>=l)q.value=e.width/100;l=parseFloat(n.value);if(isNaN(l)||0>=l)n.value=e.height/100;l=new mxRectangle(0,0,Math.floor(100*parseFloat(q.value)),Math.floor(100*parseFloat(n.value)));"custom"!=d.value&&t.checked&&(l=new mxRectangle(0,0,
-l.height,l.width));c&&C||l.width==E.width&&l.height==E.height||(E=l,null!=k&&k(E))};mxEvent.addListener(c,"click",function(b){p.checked=!0;J(b);mxEvent.consume(b)});mxEvent.addListener(l,"click",function(b){t.checked=!0;J(b);mxEvent.consume(b)});mxEvent.addListener(q,"blur",J);mxEvent.addListener(q,"click",J);mxEvent.addListener(n,"blur",J);mxEvent.addListener(n,"click",J);mxEvent.addListener(t,"change",J);mxEvent.addListener(p,"change",J);mxEvent.addListener(d,"change",function(b){C="custom"==d.value;
-J(b,!0)});J();return{set:function(b){e=b;g(null,null,!0)},get:function(){return E},widthInput:q,heightInput:n}};
+q.setAttribute("size","7");q.style.textAlign="right";m.appendChild(q);mxUtils.write(m," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in");f.style.display="none";m.style.display="none";for(var u={},v=PageSetupDialog.getFormats(),y=0;y<v.length;y++){var x=v[y];u[x.key]=x;var E=document.createElement("option");E.setAttribute("value",x.key);mxUtils.write(E,x.title);d.appendChild(E)}var C=!1;g();b.appendChild(d);mxUtils.br(b);
+b.appendChild(f);b.appendChild(m);var F=e,I=function(b,c){var l=u[d.value];null!=l.format?(q.value=l.format.width/100,n.value=l.format.height/100,m.style.display="none",f.style.display=""):(f.style.display="none",m.style.display="");l=parseFloat(q.value);if(isNaN(l)||0>=l)q.value=e.width/100;l=parseFloat(n.value);if(isNaN(l)||0>=l)n.value=e.height/100;l=new mxRectangle(0,0,Math.floor(100*parseFloat(q.value)),Math.floor(100*parseFloat(n.value)));"custom"!=d.value&&t.checked&&(l=new mxRectangle(0,0,
+l.height,l.width));c&&C||l.width==F.width&&l.height==F.height||(F=l,null!=k&&k(F))};mxEvent.addListener(c,"click",function(b){p.checked=!0;I(b);mxEvent.consume(b)});mxEvent.addListener(l,"click",function(b){t.checked=!0;I(b);mxEvent.consume(b)});mxEvent.addListener(q,"blur",I);mxEvent.addListener(q,"click",I);mxEvent.addListener(n,"blur",I);mxEvent.addListener(n,"click",I);mxEvent.addListener(t,"change",I);mxEvent.addListener(p,"change",I);mxEvent.addListener(d,"change",function(b){C="custom"==d.value;
+I(b,!0)});I();return{set:function(b){e=b;g(null,null,!0)},get:function(){return F},widthInput:q,heightInput:n}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
var FilenameDialog=function(b,c,e,k,g,p,t,d,f,l,m,q){f=null!=f?f:!0;var n,u,v=document.createElement("table"),y=document.createElement("tbody");v.style.position="absolute";v.style.top="30px";v.style.left="20px";n=document.createElement("tr");u=document.createElement("td");u.style.textOverflow="ellipsis";u.style.textAlign="right";u.style.maxWidth="100px";u.style.fontSize="10pt";u.style.width="84px";mxUtils.write(u,(g||mxResources.get("filename"))+":");n.appendChild(u);var x=document.createElement("input");
-x.setAttribute("value",c||"");x.style.marginLeft="4px";x.style.width=null!=q?q+"px":"180px";var G=mxUtils.button(e,function(){if(null==p||p(x.value))f&&b.hideDialog(),k(x.value)});G.className="geBtn gePrimaryBtn";this.init=function(){if(null!=g||null==t)if(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var b=v.parentNode;if(null!=b){var d=null;mxEvent.addListener(b,"dragleave",function(b){null!=d&&(d.style.backgroundColor=
-"",d=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(b){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=x,d.style.backgroundColor="#ebf2f9");b.stopPropagation();b.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=d&&(d.style.backgroundColor="",d=null);0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(b.dataTransfer.getData("text/uri-list")),G.click());b.stopPropagation();
+x.setAttribute("value",c||"");x.style.marginLeft="4px";x.style.width=null!=q?q+"px":"180px";var E=mxUtils.button(e,function(){if(null==p||p(x.value))f&&b.hideDialog(),k(x.value)});E.className="geBtn gePrimaryBtn";this.init=function(){if(null!=g||null==t)if(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var b=v.parentNode;if(null!=b){var d=null;mxEvent.addListener(b,"dragleave",function(b){null!=d&&(d.style.backgroundColor=
+"",d=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(b){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=x,d.style.backgroundColor="#ebf2f9");b.stopPropagation();b.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=d&&(d.style.backgroundColor="",d=null);0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(b.dataTransfer.getData("text/uri-list")),E.click());b.stopPropagation();
b.preventDefault()}))}}};u=document.createElement("td");u.style.whiteSpace="nowrap";u.appendChild(x);n.appendChild(u);if(null!=g||null==t)y.appendChild(n),null!=m&&(u.appendChild(FilenameDialog.createTypeHint(b,x,m)),null!=b.editor.diagramFileTypes&&(n=document.createElement("tr"),u=document.createElement("td"),u.style.textOverflow="ellipsis",u.style.textAlign="right",u.style.maxWidth="100px",u.style.fontSize="10pt",u.style.width="84px",mxUtils.write(u,mxResources.get("type")+":"),n.appendChild(u),
u=document.createElement("td"),u.style.whiteSpace="nowrap",n.appendChild(u),c=FilenameDialog.createFileTypes(b,x,b.editor.diagramFileTypes),c.style.marginLeft="4px",c.style.width="198px",u.appendChild(c),x.style.width=null!=q?q-40+"px":"190px",n.appendChild(u),y.appendChild(n)));null!=t&&(n=document.createElement("tr"),u=document.createElement("td"),u.colSpan=2,u.appendChild(t),n.appendChild(u),y.appendChild(n));n=document.createElement("tr");u=document.createElement("td");u.colSpan=2;u.style.paddingTop=
-null!=m?"12px":"20px";u.style.whiteSpace="nowrap";u.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});m.className="geBtn";b.editor.cancelFirst&&u.appendChild(m);null!=d&&(q=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),q.className="geBtn",u.appendChild(q));mxEvent.addListener(x,"keypress",function(b){13==b.keyCode&&G.click()});u.appendChild(G);b.editor.cancelFirst||u.appendChild(m);n.appendChild(u);y.appendChild(n);
+null!=m?"12px":"20px";u.style.whiteSpace="nowrap";u.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});m.className="geBtn";b.editor.cancelFirst&&u.appendChild(m);null!=d&&(q=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),q.className="geBtn",u.appendChild(q));mxEvent.addListener(x,"keypress",function(b){13==b.keyCode&&E.click()});u.appendChild(E);b.editor.cancelFirst||u.appendChild(m);n.appendChild(u);y.appendChild(n);
v.appendChild(y);this.container=v};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createTypeHint=function(b,c,e){var k=document.createElement("img");k.style.backgroundPosition="center bottom";k.style.backgroundRepeat="no-repeat";k.style.margin="2px 0 0 4px";k.style.verticalAlign="top";k.style.cursor="pointer";k.style.height="16px";k.style.width="16px";mxUtils.setOpacity(k,70);var g=function(){k.setAttribute("src",Editor.helpImage);k.setAttribute("title",mxResources.get("help"));for(var b=0;b<e.length;b++)if(0<e[b].ext.length&&c.value.toLowerCase().substring(c.value.length-
e[b].ext.length-1)=="."+e[b].ext){k.setAttribute("title",mxResources.get(e[b].title));break}};mxEvent.addListener(c,"keyup",g);mxEvent.addListener(c,"change",g);mxEvent.addListener(k,"click",function(c){var e=k.getAttribute("title");k.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=e&&b.showError(null,e,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(c)});
@@ -2115,8 +2115,8 @@ mxGraphView.prototype.validateBackgroundStyles=function(){var b=this.graph,d=nul
b.defaultPageBorderColor,b.container.className="geDiagramContainer geDiagramBackdrop",f.style.backgroundImage="none",f.style.backgroundColor=""):(b.container.className="geDiagramContainer",f.style.backgroundPosition=e,f.style.backgroundColor=d,f.style.backgroundImage=c)};mxGraphView.prototype.createSvgGrid=function(b){for(var d=this.graph.gridSize*this.scale;d<this.minGridSize;)d*=2;for(var f=this.gridSteps*d,c=[],e=1;e<this.gridSteps;e++){var g=e*d;c.push("M 0 "+g+" L "+f+" "+g+" M "+g+" 0 L "+g+
" "+f)}return'<svg width="'+f+'" height="'+f+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+f+'" height="'+f+'" patternUnits="userSpaceOnUse"><path d="'+c.join(" ")+'" fill="none" stroke="'+b+'" opacity="0.2" stroke-width="1"/><path d="M '+f+" 0 L 0 0 0 "+f+'" fill="none" stroke="'+b+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(c,d){b.apply(this,arguments);
if(null!=this.shiftPreview1){var f=this.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);var e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+c,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+d,e))+"px";f.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(b,d,f){var c=this.view.scale,e=this.view.translate,g=this.pageFormat,k=c*this.pageScale,p=this.view.getBackgroundPageBounds();
-d=p.width;f=p.height;var v=new mxRectangle(c*e.x,c*e.y,g.width*k,g.height*k),t=(b=b&&Math.min(v.width,v.height)>this.minPageBreakDist)?Math.ceil(f/v.height)-1:0,x=b?Math.ceil(d/v.width)-1:0,G=p.x+d,C=p.y+f;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<x&&(this.verticalPageBreaks=[]);b=mxUtils.bind(this,function(b){if(null!=b){for(var d=b==this.horizontalPageBreaks?t:x,f=0;f<=d;f++){var c=b==this.horizontalPageBreaks?[new mxPoint(Math.round(p.x),
-Math.round(p.y+(f+1)*v.height)),new mxPoint(Math.round(G),Math.round(p.y+(f+1)*v.height))]:[new mxPoint(Math.round(p.x+(f+1)*v.width),Math.round(p.y)),new mxPoint(Math.round(p.x+(f+1)*v.width),Math.round(C))];null!=b[f]?(b[f].points=c,b[f].redraw()):(c=new mxPolyline(c,this.pageBreakColor),c.dialect=this.dialect,c.isDashed=this.pageBreakDashed,c.pointerEvents=!1,c.init(this.view.backgroundPane),c.redraw(),b[f]=c)}for(f=d;f<b.length;f++)b[f].destroy();b.splice(d,b.length-d)}});b(this.horizontalPageBreaks);
+d=p.width;f=p.height;var v=new mxRectangle(c*e.x,c*e.y,g.width*k,g.height*k),t=(b=b&&Math.min(v.width,v.height)>this.minPageBreakDist)?Math.ceil(f/v.height)-1:0,x=b?Math.ceil(d/v.width)-1:0,E=p.x+d,C=p.y+f;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<x&&(this.verticalPageBreaks=[]);b=mxUtils.bind(this,function(b){if(null!=b){for(var d=b==this.horizontalPageBreaks?t:x,f=0;f<=d;f++){var c=b==this.horizontalPageBreaks?[new mxPoint(Math.round(p.x),
+Math.round(p.y+(f+1)*v.height)),new mxPoint(Math.round(E),Math.round(p.y+(f+1)*v.height))]:[new mxPoint(Math.round(p.x+(f+1)*v.width),Math.round(p.y)),new mxPoint(Math.round(p.x+(f+1)*v.width),Math.round(C))];null!=b[f]?(b[f].points=c,b[f].redraw()):(c=new mxPolyline(c,this.pageBreakColor),c.dialect=this.dialect,c.isDashed=this.pageBreakDashed,c.pointerEvents=!1,c.init(this.view.backgroundPane),c.redraw(),b[f]=c)}for(f=d;f<b.length;f++)b[f].destroy();b.splice(d,b.length-d)}});b(this.horizontalPageBreaks);
b(this.verticalPageBreaks)};var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(b,d,f){for(var e=0;e<d.length;e++){if(this.graph.isTableCell(d[e])||this.graph.isTableRow(d[e]))return!1;if(this.graph.getModel().isVertex(d[e])){var g=this.graph.getCellGeometry(d[e]);if(null!=g&&g.relative)return!1}}return c.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var b=
e.apply(this,arguments);b.intersects=mxUtils.bind(this,function(d,f){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(b,arguments)});return b};mxGraphView.prototype.createBackgroundPageShape=function(b){return new mxRectangleShape(b,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var b=this.getGraphBounds(),d=0<b.width?b.x/this.scale-this.translate.x:0,f=0<b.height?b.y/this.scale-this.translate.y:0,c=this.graph.pageFormat,
e=this.graph.pageScale,g=c.width*e,c=c.height*e,e=Math.floor(Math.min(0,d)/g),k=Math.floor(Math.min(0,f)/c);return new mxRectangle(this.scale*(this.translate.x+e*g),this.scale*(this.translate.y+k*c),this.scale*(Math.ceil(Math.max(1,d+b.width/this.scale)/g)-e)*g,this.scale*(Math.ceil(Math.max(1,f+b.height/this.scale)/c)-k)*c)};var k=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,d){k.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
@@ -2128,19 +2128,19 @@ function(){return!1},k.panningHandler.isForcePanningEvent=function(b){return!mxE
this.setDefaultStyle=function(b){try{var d=k.view.getState(b);if(null!=d){var f=b.clone();f.style="";var c=k.getCellStyle(f);b=[];var f=[],e;for(e in d.style)c[e]!=d.style[e]&&(b.push(d.style[e]),f.push(e));for(var l=k.getModel().getStyle(d.cell),g=null!=l?l.split(";"):[],l=0;l<g.length;l++){var m=g[l],q=m.indexOf("=");if(0<=q){e=m.substring(0,q);var n=m.substring(q+1);null!=c[e]&&"none"==n&&(b.push(n),f.push(e))}}k.getModel().isEdge(d.cell)?k.currentEdgeStyle={}:k.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged",
"keys",f,"values",b,"cells",[d.cell]))}}catch(ma){this.handleError(ma)}};this.clearDefaultStyle=function(){k.currentEdgeStyle=mxUtils.clone(k.defaultEdgeStyle);k.currentVertexStyle=mxUtils.clone(k.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var d=["fontFamily","fontSource","fontSize","fontColor"];for(c=0;c<d.length;c++)0>mxUtils.indexOf(p,d[c])&&p.push(d[c]);var f="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),
l=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["align","verticalAlign"],["opacity"],["html"]];for(c=0;c<l.length;c++)for(e=0;e<l[c].length;e++)p.push(l[c][e]);for(c=0;c<t.length;c++)0>mxUtils.indexOf(p,t[c])&&p.push(t[c]);var m=function(b,d,f,c,e,g,m){c=null!=c?c:k.currentVertexStyle;e=null!=e?e:k.currentEdgeStyle;f=null!=f?f:k.getModel();
-if(m){m=[];for(var F=0;F<b.length;F++)m=m.concat(f.getDescendants(b[F]));b=m}f.beginUpdate();try{for(F=0;F<b.length;F++){var q=b[F],n;if(d)n=["fontSize","fontFamily","fontColor"];else{var D=f.getStyle(q),A=null!=D?D.split(";"):[];n=p.slice();for(var v=0;v<A.length;v++){var u=A[v],x=u.indexOf("=");if(0<=x){var y=u.substring(0,x),N=mxUtils.indexOf(n,y);0<=N&&n.splice(N,1);for(m=0;m<l.length;m++){var C=l[m];if(0<=mxUtils.indexOf(C,y))for(var da=0;da<C.length;da++){var B=mxUtils.indexOf(n,C[da]);0<=B&&
-n.splice(B,1)}}}}}var E=f.isEdge(q);m=E?e:c;for(var J=f.getStyle(q),v=0;v<n.length;v++){var y=n[v],G=m[y];null!=G&&("shape"!=y||E)&&(!E||g||0>mxUtils.indexOf(t,y))&&(J=mxUtils.setStyle(J,y,G))}Editor.simpleLabels&&(J=mxUtils.setStyle(mxUtils.setStyle(J,"html",null),"whiteSpace",null));f.setStyle(q,J)}}finally{f.endUpdate()}};k.addListener("cellsInserted",function(b,d){m(d.getProperty("cells"))});k.addListener("textInserted",function(b,d){m(d.getProperty("cells"),!0)});this.insertHandler=m;this.createDivs();
+if(m){m=[];for(var G=0;G<b.length;G++)m=m.concat(f.getDescendants(b[G]));b=m}f.beginUpdate();try{for(G=0;G<b.length;G++){var q=b[G],n;if(d)n=["fontSize","fontFamily","fontColor"];else{var D=f.getStyle(q),A=null!=D?D.split(";"):[];n=p.slice();for(var v=0;v<A.length;v++){var u=A[v],x=u.indexOf("=");if(0<=x){var y=u.substring(0,x),da=mxUtils.indexOf(n,y);0<=da&&n.splice(da,1);for(m=0;m<l.length;m++){var N=l[m];if(0<=mxUtils.indexOf(N,y))for(var C=0;C<N.length;C++){var B=mxUtils.indexOf(n,N[C]);0<=B&&
+n.splice(B,1)}}}}}var F=f.isEdge(q);m=F?e:c;for(var I=f.getStyle(q),v=0;v<n.length;v++){var y=n[v],E=m[y];null!=E&&("shape"!=y||F)&&(!F||g||0>mxUtils.indexOf(t,y))&&(I=mxUtils.setStyle(I,y,E))}Editor.simpleLabels&&(I=mxUtils.setStyle(mxUtils.setStyle(I,"html",null),"whiteSpace",null));f.setStyle(q,I)}}finally{f.endUpdate()}};k.addListener("cellsInserted",function(b,d){m(d.getProperty("cells"))});k.addListener("textInserted",function(b,d){m(d.getProperty("cells"),!0)});this.insertHandler=m;this.createDivs();
this.createUi();this.refresh();var q=mxUtils.bind(this,function(b){null==b&&(b=window.event);return k.isEditing()||null!=b&&this.isSelectionAllowed(b)});this.container==document.body&&(this.menubarContainer.onselectstart=q,this.menubarContainer.onmousedown=q,this.toolbarContainer.onselectstart=q,this.toolbarContainer.onmousedown=q,this.diagramContainer.onselectstart=q,this.diagramContainer.onmousedown=q,this.sidebarContainer.onselectstart=q,this.sidebarContainer.onmousedown=q,this.formatContainer.onselectstart=
q,this.formatContainer.onmousedown=q,this.footerContainer.onselectstart=q,this.footerContainer.onmousedown=q,null!=this.tabContainer&&(this.tabContainer.onselectstart=q));!this.editor.chromeless||this.editor.editable?(c=function(b){if(null!=b){var d=mxEvent.getSource(b);if("A"==d.nodeName)for(;null!=d;){if("geHint"==d.className)return!0;d=d.parentNode}}return q(b)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",
-c):this.diagramContainer.oncontextmenu=c):k.panningHandler.usePopupTrigger=!1;k.init(this.diagramContainer);mxClient.IS_SVG&&null!=k.view.getDrawPane()&&(c=k.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=k.graphHandler){var n=k.graphHandler.start;k.graphHandler.start=function(){null!=K.hoverIcons&&K.hoverIcons.reset();n.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(b){var d=
+c):this.diagramContainer.oncontextmenu=c):k.panningHandler.usePopupTrigger=!1;k.init(this.diagramContainer);mxClient.IS_SVG&&null!=k.view.getDrawPane()&&(c=k.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=k.graphHandler){var n=k.graphHandler.start;k.graphHandler.start=function(){null!=J.hoverIcons&&J.hoverIcons.reset();n.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(b){var d=
mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(b)-d.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(b)-d.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var u=!1,v=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(b,d){return u||v.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(b){32!=b.which||k.isEditing()?mxEvent.isConsumed(b)||
27!=b.keyCode||this.hideDialog(null,!0):(u=!0,this.hoverIcons.reset(),k.container.style.cursor="move",k.isEditing()||mxEvent.getSource(b)!=k.container||mxEvent.consume(b))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(b){k.container.style.cursor="";u=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var y=k.panningHandler.isForcePanningEvent;k.panningHandler.isForcePanningEvent=function(b){return y.apply(this,arguments)||u||mxEvent.isMouseEvent(b.getEvent())&&
-(this.usePopupTrigger||!mxEvent.isPopupTrigger(b.getEvent()))&&(!mxEvent.isControlDown(b.getEvent())&&mxEvent.isRightMouseButton(b.getEvent())||mxEvent.isMiddleMouseButton(b.getEvent()))};var x=k.cellEditor.isStopEditingEvent;k.cellEditor.isStopEditingEvent=function(b){return x.apply(this,arguments)||13==b.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxClient.IS_SF&&mxEvent.isShiftDown(b))};var G=k.isZoomWheelEvent;k.isZoomWheelEvent=function(){return u||
-G.apply(this,arguments)};var C=!1,E=null,J=null,L=null,H=mxUtils.bind(this,function(){if(null!=this.toolbar&&C!=k.cellEditor.isContentEditing()){for(var b=this.toolbar.container.firstChild,d=[];null!=b;){var f=b.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,b)&&(b.parentNode.removeChild(b),d.push(b));b=f}b=this.toolbar.fontMenu;f=this.toolbar.sizeMenu;if(null==L)this.toolbar.createTextToolbar();else{for(var c=0;c<L.length;c++)this.toolbar.container.appendChild(L[c]);this.toolbar.fontMenu=
-E;this.toolbar.sizeMenu=J}C=k.cellEditor.isContentEditing();E=b;J=f;L=d}}),K=this,B=k.cellEditor.startEditing;k.cellEditor.startEditing=function(){B.apply(this,arguments);H();if(k.cellEditor.isContentEditing()){var b=!1,d=function(){b||(b=!0,window.setTimeout(function(){var d=k.getSelectedEditingElement();null!=d&&(d=mxUtils.getCurrentStyle(d),null!=d&&null!=K.toolbar&&(K.toolbar.setFontName(Graph.stripQuotes(d.fontFamily)),K.toolbar.setFontSize(parseInt(d.fontSize))));b=!1},0))};mxEvent.addListener(k.cellEditor.textarea,
-"input",d);mxEvent.addListener(k.cellEditor.textarea,"touchend",d);mxEvent.addListener(k.cellEditor.textarea,"mouseup",d);mxEvent.addListener(k.cellEditor.textarea,"keyup",d);d()}};var M=k.cellEditor.stopEditing;k.cellEditor.stopEditing=function(b,d){try{M.apply(this,arguments),H()}catch(R){K.handleError(R)}};k.container.setAttribute("tabindex","0");k.container.style.cursor="default";if(window.self===window.top&&null!=k.container.parentNode)try{k.container.focus()}catch(T){}var P=k.fireMouseEvent;
+(this.usePopupTrigger||!mxEvent.isPopupTrigger(b.getEvent()))&&(!mxEvent.isControlDown(b.getEvent())&&mxEvent.isRightMouseButton(b.getEvent())||mxEvent.isMiddleMouseButton(b.getEvent()))};var x=k.cellEditor.isStopEditingEvent;k.cellEditor.isStopEditingEvent=function(b){return x.apply(this,arguments)||13==b.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxClient.IS_SF&&mxEvent.isShiftDown(b))};var E=k.isZoomWheelEvent;k.isZoomWheelEvent=function(){return u||
+E.apply(this,arguments)};var C=!1,F=null,I=null,L=null,H=mxUtils.bind(this,function(){if(null!=this.toolbar&&C!=k.cellEditor.isContentEditing()){for(var b=this.toolbar.container.firstChild,d=[];null!=b;){var f=b.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,b)&&(b.parentNode.removeChild(b),d.push(b));b=f}b=this.toolbar.fontMenu;f=this.toolbar.sizeMenu;if(null==L)this.toolbar.createTextToolbar();else{for(var c=0;c<L.length;c++)this.toolbar.container.appendChild(L[c]);this.toolbar.fontMenu=
+F;this.toolbar.sizeMenu=I}C=k.cellEditor.isContentEditing();F=b;I=f;L=d}}),J=this,B=k.cellEditor.startEditing;k.cellEditor.startEditing=function(){B.apply(this,arguments);H();if(k.cellEditor.isContentEditing()){var b=!1,d=function(){b||(b=!0,window.setTimeout(function(){var d=k.getSelectedEditingElement();null!=d&&(d=mxUtils.getCurrentStyle(d),null!=d&&null!=J.toolbar&&(J.toolbar.setFontName(Graph.stripQuotes(d.fontFamily)),J.toolbar.setFontSize(parseInt(d.fontSize))));b=!1},0))};mxEvent.addListener(k.cellEditor.textarea,
+"input",d);mxEvent.addListener(k.cellEditor.textarea,"touchend",d);mxEvent.addListener(k.cellEditor.textarea,"mouseup",d);mxEvent.addListener(k.cellEditor.textarea,"keyup",d);d()}};var M=k.cellEditor.stopEditing;k.cellEditor.stopEditing=function(b,d){try{M.apply(this,arguments),H()}catch(R){J.handleError(R)}};k.container.setAttribute("tabindex","0");k.container.style.cursor="default";if(window.self===window.top&&null!=k.container.parentNode)try{k.container.focus()}catch(T){}var P=k.fireMouseEvent;
k.fireMouseEvent=function(b,d,f){b==mxEvent.MOUSE_DOWN&&this.container.focus();P.apply(this,arguments)};k.popupMenuHandler.autoExpand=!0;null!=this.menus&&(k.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(b,d,f){this.menus.createPopupMenu(b,d,f)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(b){k.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};k.connectionHandler.addListener(mxEvent.CONNECT,function(b,
-d){var f=[d.getProperty("cell")];d.getProperty("terminalInserted")&&(f.push(d.getProperty("terminal")),window.setTimeout(function(){null!=K.hoverIcons&&K.hoverIcons.update(k.view.getState(f[f.length-1]))},0));m(f)});this.addListener("styleChanged",mxUtils.bind(this,function(b,c){var e=c.getProperty("cells"),l=!1,g=!1;if(0<e.length)for(var m=0;m<e.length&&(l=k.getModel().isVertex(e[m])||l,!(g=k.getModel().isEdge(e[m])||g)||!l);m++);else g=l=!0;for(var e=c.getProperty("keys"),q=c.getProperty("values"),
+d){var f=[d.getProperty("cell")];d.getProperty("terminalInserted")&&(f.push(d.getProperty("terminal")),window.setTimeout(function(){null!=J.hoverIcons&&J.hoverIcons.update(k.view.getState(f[f.length-1]))},0));m(f)});this.addListener("styleChanged",mxUtils.bind(this,function(b,c){var e=c.getProperty("cells"),l=!1,g=!1;if(0<e.length)for(var m=0;m<e.length&&(l=k.getModel().isVertex(e[m])||l,!(g=k.getModel().isEdge(e[m])||g)||!l);m++);else g=l=!0;for(var e=c.getProperty("keys"),q=c.getProperty("values"),
m=0;m<e.length;m++){var n=0<=mxUtils.indexOf(d,e[m]);if("strokeColor"!=e[m]||null!=q[m]&&"none"!=q[m])if(0<=mxUtils.indexOf(t,e[m]))g||0<=mxUtils.indexOf(f,e[m])?null==q[m]?delete k.currentEdgeStyle[e[m]]:k.currentEdgeStyle[e[m]]=q[m]:l&&0<=mxUtils.indexOf(p,e[m])&&(null==q[m]?delete k.currentVertexStyle[e[m]]:k.currentVertexStyle[e[m]]=q[m]);else if(0<=mxUtils.indexOf(p,e[m])){if(l||n)null==q[m]?delete k.currentVertexStyle[e[m]]:k.currentVertexStyle[e[m]]=q[m];if(g||n||0<=mxUtils.indexOf(f,e[m]))null==
q[m]?delete k.currentEdgeStyle[e[m]]:k.currentEdgeStyle[e[m]]=q[m]}}null!=this.toolbar&&(this.toolbar.setFontName(k.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(k.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==k.currentEdgeStyle.edgeStyle&&"1"==k.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==k.currentEdgeStyle.edgeStyle||
"none"==k.currentEdgeStyle.edgeStyle||null==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==k.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==k.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),
@@ -2184,9 +2184,9 @@ EditorUi.prototype.initClipboard=function(){var b=this,c=mxClipboard.cut;mxClipb
null;c.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):g=e.apply(this,arguments);b.updatePasteActionStates();return g};var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);b.updatePasteActionStates()};var g=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(c,e){g.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var b=this.graph.getPageLayout(),d=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+b.x*d.width),this.scale*(this.translate.y+b.y*d.height),this.scale*b.width*d.width,
-this.scale*b.height*d.height)};b.getPreferredPageSize=function(b,d,f){b=this.getPageLayout();d=this.getPageSize();return new mxRectangle(0,0,b.width*d.width,b.height*d.height)};var c=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(d,f,c,e){if(null!=b.container&&!b.isViewer()){c=null!=c?c:0;e=null!=e?e:0;var l=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),g=mxUtils.hasScrollbars(b.container),k=b.view.translate,m=b.view.scale,q=mxRectangle.fromRectangle(l);
-q.x=q.x/m-k.x;q.y=q.y/m-k.y;q.width/=m;q.height/=m;var k=b.container.scrollTop,F=b.container.scrollLeft,n=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)n+=3;var D=b.container.offsetWidth-n,n=b.container.offsetHeight-n;d=d?Math.max(.3,Math.min(f||1,D/q.width)):m;f=(D-d*q.width)/2/d;var p=0==this.lightboxVerticalDivider?0:(n-d*q.height)/this.lightboxVerticalDivider/d;g&&(f=Math.max(f,0),p=Math.max(p,0));if(g||l.width<D||l.height<n)b.view.scaleAndTranslate(d,Math.floor(f-
-q.x),Math.floor(p-q.y)),b.container.scrollTop=k*d/m,b.container.scrollLeft=F*d/m;else if(0!=c||0!=e)l=b.view.translate,b.view.setTranslate(Math.floor(l.x+c/m),Math.floor(l.y+e/m))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var k=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",k);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",k)});this.editor.addListener("resetGraphView",mxUtils.bind(this,
+this.scale*b.height*d.height)};b.getPreferredPageSize=function(b,d,f){b=this.getPageLayout();d=this.getPageSize();return new mxRectangle(0,0,b.width*d.width,b.height*d.height)};var c=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(d,f,c,e){if(null!=b.container&&!b.isViewer()){c=null!=c?c:0;e=null!=e?e:0;var l=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),g=mxUtils.hasScrollbars(b.container),m=b.view.translate,k=b.view.scale,q=mxRectangle.fromRectangle(l);
+q.x=q.x/k-m.x;q.y=q.y/k-m.y;q.width/=k;q.height/=k;var m=b.container.scrollTop,G=b.container.scrollLeft,n=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)n+=3;var D=b.container.offsetWidth-n,n=b.container.offsetHeight-n;d=d?Math.max(.3,Math.min(f||1,D/q.width)):k;f=(D-d*q.width)/2/d;var p=0==this.lightboxVerticalDivider?0:(n-d*q.height)/this.lightboxVerticalDivider/d;g&&(f=Math.max(f,0),p=Math.max(p,0));if(g||l.width<D||l.height<n)b.view.scaleAndTranslate(d,Math.floor(f-
+q.x),Math.floor(p-q.y)),b.container.scrollTop=m*d/k,b.container.scrollLeft=G*d/k;else if(0!=c||0!=e)l=b.view.translate,b.view.setTranslate(Math.floor(l.x+c/k),Math.floor(l.y+e/k))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var k=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",k);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",k)});this.editor.addListener("resetGraphView",mxUtils.bind(this,
function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(d){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(d){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var g=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing=
"border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var d=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=d?parseInt(d["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var t=0,p=mxUtils.bind(this,function(b,d,f){t++;var c=document.createElement("span");c.style.paddingLeft="8px";c.style.paddingRight=
@@ -2198,20 +2198,20 @@ p(mxUtils.bind(this,function(d){b.isLightboxView()?(1==b.view.scale?this.lightbo
"none";u=null}),600)}),b||200)}),y=mxUtils.bind(this,function(b){null!=n&&(window.clearTimeout(n),n=null);null!=u&&(window.clearTimeout(u),u=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,b||30)});if("1"==urlParams.layers){this.layersDialog=null;var x=p(mxUtils.bind(this,function(d){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,
"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var f=x.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=f.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));f=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=f.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(d)}),
-Editor.layersImage,mxResources.get("layers")),G=b.getModel();G.addListener(mxEvent.CHANGE,function(){x.style.display=1<G.getChildCount(G.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(d){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,
+Editor.layersImage,mxResources.get("layers")),E=b.getModel();E.addListener(mxEvent.CHANGE,function(){x.style.display=1<E.getChildCount(E.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(d){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,
"editWindow");mxEvent.consume(d)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(q=0;q<this.lightboxToolbarActions.length;q++){var C=this.lightboxToolbarActions[q];C.elem=p(C.fn,C.icon,C.tooltip)}null!=g.refreshBtn&&p(mxUtils.bind(this,function(b){g.refreshBtn.url?window.location.href=g.refreshBtn.url:window.location.reload();mxEvent.consume(b)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=g.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,
function(d){g.fullscreenBtn.url?b.openLink(g.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(d)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(g.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=document.body))&&p(mxUtils.bind(this,function(b){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(b))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display=
"none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||(mxEvent.isShiftDown(b)||y(30),v())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(b){mxEvent.consume(b)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",
-mxUtils.bind(this,function(d){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(d)?v():y(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(b){mxEvent.isShiftDown(b)?v():y(100);mxEvent.consume(b)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||y(30)}));var E=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(d,f){this.startX=
-f.getGraphX();this.startY=f.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(b,d){},mouseUp:function(d,f){mxEvent.isTouchEvent(f.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<E&&Math.abs(this.scrollTop-b.container.scrollTop)<E&&Math.abs(this.startX-f.getGraphX())<E&&Math.abs(this.startY-f.getGraphY())<E&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?v():y(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var J=
-b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var b=this.graph.getPagePadding(),d=this.graph.getPageSize();this.translate.x=b.x-(this.x0||0)*d.width;this.translate.y=b.y-(this.y0||0)*d.height}J.apply(this,arguments)};if(!b.isViewer()){var L=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var d=this.getPageLayout(),f=this.getPagePadding(),c=this.getPageSize(),e=Math.ceil(2*
+mxUtils.bind(this,function(d){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(d)?v():y(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(b){mxEvent.isShiftDown(b)?v():y(100);mxEvent.consume(b)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||y(30)}));var F=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(d,f){this.startX=
+f.getGraphX();this.startY=f.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(b,d){},mouseUp:function(d,f){mxEvent.isTouchEvent(f.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<F&&Math.abs(this.scrollTop-b.container.scrollTop)<F&&Math.abs(this.startX-f.getGraphX())<F&&Math.abs(this.startY-f.getGraphY())<F&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?v():y(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var I=
+b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var b=this.graph.getPagePadding(),d=this.graph.getPageSize();this.translate.x=b.x-(this.x0||0)*d.width;this.translate.y=b.y-(this.y0||0)*d.height}I.apply(this,arguments)};if(!b.isViewer()){var L=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var d=this.getPageLayout(),f=this.getPagePadding(),c=this.getPageSize(),e=Math.ceil(2*
f.x+d.width*c.width),l=Math.ceil(2*f.y+d.height*c.height),g=b.minimumGraphSize;if(null==g||g.width!=e||g.height!=l)b.minimumGraphSize=new mxRectangle(0,0,e,l);e=f.x-d.x*c.width;f=f.y-d.y*c.height;this.autoTranslate||this.view.translate.x==e&&this.view.translate.y==f?L.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=d.x,this.view.y0=d.y,d=b.view.translate.x,c=b.view.translate.y,b.view.setTranslate(e,f),b.container.scrollLeft+=Math.round((e-d)*b.view.scale),b.container.scrollTop+=Math.round((f-
-c)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var H=b.view.getBackgroundPane(),K=b.view.getDrawPane();b.cumulativeZoomFactor=1;var B=null,M=null,P=null,T=null,N=null,R=function(d){null!=B&&window.clearTimeout(B);window.setTimeout(function(){if(!b.isMouseDown||T)B=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,
-"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),K.style.transformOrigin="",H.style.transformOrigin="",mxClient.IS_SF?(K.style.transform="scale(1)",H.style.transform="scale(1)",window.setTimeout(function(){K.style.transform="";H.style.transform=""},0)):(K.style.transform="",H.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var d=new mxPoint(b.container.scrollLeft,b.container.scrollTop),
-f=mxUtils.getOffset(b.container),l=b.view.scale,g=0,k=0;null!=M&&(g=b.container.offsetWidth/2-M.x+f.x,k=b.container.offsetHeight/2-M.y+f.y);b.zoom(b.cumulativeZoomFactor);b.view.scale!=l&&(null!=P&&(g+=d.x-P.x,k+=d.y-P.y),null!=c&&e.chromelessResize(!1,null,g*(b.cumulativeZoomFactor-1),k*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==g&&0==k||(b.container.scrollLeft-=g*(b.cumulativeZoomFactor-1),b.container.scrollTop-=k*(b.cumulativeZoomFactor-1)));null!=N&&K.setAttribute("filter",
-N);b.cumulativeZoomFactor=1;N=T=M=P=B=null}),null!=d?d:b.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay)},0)},F=Date.now();b.lazyZoom=function(d,f,c){(f=f||!b.scrollbars)&&(M=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));if(mxClient.IS_IOS||!(15>Date.now()-F)){F=Date.now();d?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,
+c)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var H=b.view.getBackgroundPane(),J=b.view.getDrawPane();b.cumulativeZoomFactor=1;var B=null,M=null,P=null,T=null,N=null,R=function(d){null!=B&&window.clearTimeout(B);window.setTimeout(function(){if(!b.isMouseDown||T)B=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,
+"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),J.style.transformOrigin="",H.style.transformOrigin="",mxClient.IS_SF?(J.style.transform="scale(1)",H.style.transform="scale(1)",window.setTimeout(function(){J.style.transform="";H.style.transform=""},0)):(J.style.transform="",H.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var d=new mxPoint(b.container.scrollLeft,b.container.scrollTop),
+f=mxUtils.getOffset(b.container),l=b.view.scale,g=0,m=0;null!=M&&(g=b.container.offsetWidth/2-M.x+f.x,m=b.container.offsetHeight/2-M.y+f.y);b.zoom(b.cumulativeZoomFactor);b.view.scale!=l&&(null!=P&&(g+=d.x-P.x,m+=d.y-P.y),null!=c&&e.chromelessResize(!1,null,g*(b.cumulativeZoomFactor-1),m*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==g&&0==m||(b.container.scrollLeft-=g*(b.cumulativeZoomFactor-1),b.container.scrollTop-=m*(b.cumulativeZoomFactor-1)));null!=N&&J.setAttribute("filter",
+N);b.cumulativeZoomFactor=1;N=T=M=P=B=null}),null!=d?d:b.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay)},0)},G=Date.now();b.lazyZoom=function(d,f,c){(f=f||!b.scrollbars)&&(M=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));if(mxClient.IS_IOS||!(15>Date.now()-G)){G=Date.now();d?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,
this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(b.isFastZoomEnabled()){null==
-N&&""!=K.getAttribute("filter")&&(N=K.getAttribute("filter"),K.removeAttribute("filter"));P=new mxPoint(b.container.scrollLeft,b.container.scrollTop);d=f?b.container.scrollLeft+b.container.clientWidth/2:M.x+b.container.scrollLeft-b.container.offsetLeft;var l=f?b.container.scrollTop+b.container.clientHeight/2:M.y+b.container.scrollTop-b.container.offsetTop;K.style.transformOrigin=d+"px "+l+"px";K.style.transform="scale("+this.cumulativeZoomFactor+")";H.style.transformOrigin=d+"px "+l+"px";H.style.transform=
+N&&""!=J.getAttribute("filter")&&(N=J.getAttribute("filter"),J.removeAttribute("filter"));P=new mxPoint(b.container.scrollLeft,b.container.scrollTop);d=f?b.container.scrollLeft+b.container.clientWidth/2:M.x+b.container.scrollLeft-b.container.offsetLeft;var l=f?b.container.scrollTop+b.container.clientHeight/2:M.y+b.container.scrollTop-b.container.offsetTop;J.style.transformOrigin=d+"px "+l+"px";J.style.transform="scale("+this.cumulativeZoomFactor+")";H.style.transformOrigin=d+"px "+l+"px";H.style.transform=
"scale("+this.cumulativeZoomFactor+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(d=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(d.style,"transform-origin",(f?b.container.clientWidth/2+b.container.scrollLeft-d.offsetLeft+"px":M.x+b.container.scrollLeft-d.offsetLeft-b.container.offsetLeft+"px")+" "+(f?b.container.clientHeight/2+b.container.scrollTop-d.offsetTop+"px":M.y+b.container.scrollTop-d.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(d.style,
"transform","scale("+this.cumulativeZoomFactor+")"));b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset()}R(c)}};mxEvent.addGestureListeners(b.container,function(b){null!=B&&window.clearTimeout(B)},null,function(d){1!=b.cumulativeZoomFactor&&R(0)});mxEvent.addListener(b.container,"scroll",function(d){null==B||b.isMouseDown||1==b.cumulativeZoomFactor||R(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(d,f,c,e,l){b.fireEvent(new mxEventObject("wheel"));
if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!c&&b.isScrollWheelEvent(d))c=b.view.getTranslate(),e=40/b.view.scale,mxEvent.isShiftDown(d)?b.view.setTranslate(c.x+(f?-e:e),c.y):b.view.setTranslate(c.x,c.y+(f?e:-e));else if(c||b.isZoomWheelEvent(d))for(var g=mxEvent.getSource(d);null!=g;){if(g==b.container)return b.tooltipHandler.hideTooltip(),M=null!=e&&null!=l?new mxPoint(e,l):new mxPoint(mxEvent.getClientX(d),mxEvent.getClientY(d)),T=c,b.lazyZoom(f),mxEvent.consume(d),!1;g=g.parentNode}}),
@@ -2307,12 +2307,12 @@ mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhC
mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,c,e){return null};
mxImageShape.prototype.getImageDataUri=function(){var b=this.image;if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b),this.clippedImage=b;b=this.clippedSvg}return b};
Graph=function(b,c,e,k,g,p){mxGraph.call(this,b,c,e,k);this.themes=g||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;c=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<c&&(c=b.indexOf("/",c+2),0<c&&(this.domainUrl=b.substring(0,c)),c=b.lastIndexOf("/"),0<c&&(this.domainPathUrl=b.substring(0,c+1)));this.isHtmlLabel=function(b){b=this.getCurrentCellStyle(b);
-return null!=b?"1"==b.html||"wrap"==b[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var t=null,d=null,f=null,l=null,m=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,c){if("mouseDown"==c.getProperty("eventName")&&this.isEnabled()){var e=c.getProperty("event"),g=e.getState();if(!mxEvent.isAltDown(e.getEvent())&&null!=g)if(this.model.isEdge(g.cell))if(t=new mxPoint(e.getGraphX(),e.getGraphY()),m=this.isCellSelected(g.cell),f=g,d=e,null!=g.text&&null!=g.text.boundingBox&&
-mxUtils.contains(g.text.boundingBox,e.getGraphX(),e.getGraphY()))l=mxEvent.LABEL_HANDLE;else{var k=this.selectionCellsHandler.getHandler(g.cell);null!=k&&null!=k.bends&&0<k.bends.length&&(l=k.getHandleForEvent(e))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(e.getEvent())&&(k=this.selectionCellsHandler.getHandler(g.cell),null==k||null==k.getHandleForEvent(e))){var q=new mxRectangle(e.getGraphX()-1,e.getGraphY()-1);q.grow(mxEvent.isTouchEvent(e.getEvent())?mxShape.prototype.svgStrokeTolerance-
-1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(g.cell)&&!this.isCellSelected(g.cell)){var n=this.model.getParent(g.cell),k=this.model.getParent(n);if(!this.isCellSelected(k)&&(mxUtils.intersects(q,new mxRectangle(g.x,g.y-2,g.width,3))&&this.model.getChildAt(k,0)!=n||mxUtils.intersects(q,new mxRectangle(g.x,g.y+g.height-2,g.width,3))||mxUtils.intersects(q,new mxRectangle(g.x-2,g.y,2,g.height))&&this.model.getChildAt(n,0)!=g.cell||mxUtils.intersects(q,new mxRectangle(g.x+g.width-
-2,g.y,2,g.height)))&&(n=this.selectionCellsHandler.isHandled(k),this.selectCellForEvent(k,e.getEvent()),k=this.selectionCellsHandler.getHandler(k),null!=k)){var p=k.getHandleForEvent(e);null!=p&&(k.start(e.getGraphX(),e.getGraphY(),p),k.blockDelayedSelection=!n,e.consume())}}for(;!e.isConsumed()&&null!=g&&(this.isTableCell(g.cell)||this.isTableRow(g.cell)||this.isTable(g.cell));)this.isSwimlane(g.cell)&&(k=this.getActualStartSize(g.cell),n=this.view.scale,(0<k.x||0<k.width)&&mxUtils.intersects(q,
-new mxRectangle(g.x+(k.x-k.width-1)*n+(0==k.x?g.width:0),g.y,1,g.height))||(0<k.y||0<k.height)&&mxUtils.intersects(q,new mxRectangle(g.x,g.y+(k.y-k.height-1)*n+(0==k.y?g.height:0),g.width,1)))&&(this.selectCellForEvent(g.cell,e.getEvent()),k=this.selectionCellsHandler.getHandler(g.cell),null!=k&&(p=mxEvent.CUSTOM_HANDLE-k.customHandles.length+1,k.start(e.getGraphX(),e.getGraphY(),p),e.consume())),g=this.view.getState(this.model.getParent(g.cell))}}}));this.addMouseListener({mouseDown:function(b,d){},
-mouseMove:mxUtils.bind(this,function(b,c){var e=this.selectionCellsHandler.handlers.map,g;for(g in e)if(null!=e[g].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(c.getEvent()))if(g=this.tolerance,null!=t&&null!=f&&null!=d){if(e=f,Math.abs(t.x-c.getGraphX())>g||Math.abs(t.y-c.getGraphY())>g){var k=this.selectionCellsHandler.getHandler(e.cell);null==k&&this.model.isEdge(e.cell)&&(k=this.createHandler(e));if(null!=k&&null!=k.bends&&0<k.bends.length){g=k.getHandleForEvent(d);
+return null!=b?"1"==b.html||"wrap"==b[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var t=null,d=null,f=null,l=null,m=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,c){if("mouseDown"==c.getProperty("eventName")&&this.isEnabled()){var e=c.getProperty("event"),g=e.getState(),k=this.view.scale;if(!mxEvent.isAltDown(e.getEvent())&&null!=g)if(this.model.isEdge(g.cell))if(t=new mxPoint(e.getGraphX(),e.getGraphY()),m=this.isCellSelected(g.cell),f=g,d=e,null!=g.text&&null!=
+g.text.boundingBox&&mxUtils.contains(g.text.boundingBox,e.getGraphX(),e.getGraphY()))l=mxEvent.LABEL_HANDLE;else{var q=this.selectionCellsHandler.getHandler(g.cell);null!=q&&null!=q.bends&&0<q.bends.length&&(l=q.getHandleForEvent(e))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(e.getEvent())&&(q=this.selectionCellsHandler.getHandler(g.cell),null==q||null==q.getHandleForEvent(e))){var n=new mxRectangle(e.getGraphX()-1,e.getGraphY()-1);n.grow(mxEvent.isTouchEvent(e.getEvent())?mxShape.prototype.svgStrokeTolerance-
+1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(g.cell)&&!this.isCellSelected(g.cell)){var p=this.model.getParent(g.cell),q=this.model.getParent(p);if(!this.isCellSelected(q)){var v=this.getCellGeometry(g.cell),v=null!=v.alternateBounds?v.alternateBounds:v;if(mxUtils.intersects(n,new mxRectangle(g.x,g.y-2,v.width*k,3))&&this.model.getChildAt(q,0)!=p||mxUtils.intersects(n,new mxRectangle(g.x,g.y+v.height-2,v.width,3))||mxUtils.intersects(n,new mxRectangle(g.x-2,g.y,2,v.height*k))&&
+this.model.getChildAt(p,0)!=g.cell||mxUtils.intersects(n,new mxRectangle(g.x+v.width*k-2,g.y,2,v.height*k)))p=this.selectionCellsHandler.isHandled(q),this.selectCellForEvent(q,e.getEvent()),q=this.selectionCellsHandler.getHandler(q),null!=q&&(v=q.getHandleForEvent(e),null!=v&&(q.start(e.getGraphX(),e.getGraphY(),v),q.blockDelayedSelection=!p,e.consume()))}}for(;!e.isConsumed()&&null!=g&&(this.isTableCell(g.cell)||this.isTableRow(g.cell)||this.isTable(g.cell));)this.isSwimlane(g.cell)&&(q=this.getActualStartSize(g.cell),
+(0<q.x||0<q.width)&&mxUtils.intersects(n,new mxRectangle(g.x+(q.x-q.width-1)*k+(0==q.x?g.width:0),g.y,1,g.height))||(0<q.y||0<q.height)&&mxUtils.intersects(n,new mxRectangle(g.x,g.y+(q.y-q.height-1)*k+(0==q.y?g.height:0),g.width,1)))&&(this.selectCellForEvent(g.cell,e.getEvent()),q=this.selectionCellsHandler.getHandler(g.cell),null!=q&&(v=mxEvent.CUSTOM_HANDLE-q.customHandles.length+1,q.start(e.getGraphX(),e.getGraphY(),v),e.consume())),g=this.view.getState(this.model.getParent(g.cell))}}}));this.addMouseListener({mouseDown:function(b,
+d){},mouseMove:mxUtils.bind(this,function(b,c){var e=this.selectionCellsHandler.handlers.map,g;for(g in e)if(null!=e[g].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(c.getEvent()))if(g=this.tolerance,null!=t&&null!=f&&null!=d){if(e=f,Math.abs(t.x-c.getGraphX())>g||Math.abs(t.y-c.getGraphY())>g){var k=this.selectionCellsHandler.getHandler(e.cell);null==k&&this.model.isEdge(e.cell)&&(k=this.createHandler(e));if(null!=k&&null!=k.bends&&0<k.bends.length){g=k.getHandleForEvent(d);
var q=this.view.getEdgeStyle(e),n=q==mxEdgeStyle.EntityRelation;m||l!=mxEvent.LABEL_HANDLE||(g=l);if(n&&0!=g&&g!=k.bends.length-1&&g!=mxEvent.LABEL_HANDLE)!n||null==e.visibleSourceState&&null==e.visibleTargetState||(this.graphHandler.reset(),c.consume());else if(g==mxEvent.LABEL_HANDLE||0==g||null!=e.visibleSourceState||g==k.bends.length-1||null!=e.visibleTargetState)n||g==mxEvent.LABEL_HANDLE||(n=e.absolutePoints,null!=n&&(null==q&&null==g||q==mxEdgeStyle.OrthConnector)&&(g=l,null==g&&(g=new mxRectangle(t.x,
t.y),g.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(g,n[0].x,n[0].y)?g=0:mxUtils.contains(g,n[n.length-1].x,n[n.length-1].y)?g=k.bends.length-1:null!=q&&(2==n.length||3==n.length&&(0==Math.round(n[0].x-n[1].x)&&0==Math.round(n[1].x-n[2].x)||0==Math.round(n[0].y-n[1].y)&&0==Math.round(n[1].y-n[2].y)))?g=2:(g=mxUtils.findNearestSegment(e,t.x,t.y),g=null==q?mxEvent.VIRTUAL_HANDLE-g:g+1))),null==g&&(g=mxEvent.VIRTUAL_HANDLE)),k.start(c.getGraphX(),c.getGraphX(),g),c.consume(),this.graphHandler.reset()}null!=
k&&(this.selectionCellsHandler.isHandlerActive(k)?this.isCellSelected(e.cell)||(this.selectionCellsHandler.handlers.put(e.cell,k),this.selectCellForEvent(e.cell,c.getEvent())):this.isCellSelected(e.cell)||k.destroy());m=!1;t=d=f=l=null}}else if(e=c.getState(),null!=e&&this.isCellEditable(e.cell)){k=null;if(this.model.isEdge(e.cell)){if(g=new mxRectangle(c.getGraphX(),c.getGraphY()),g.grow(mxEdgeHandler.prototype.handleImage.width/2),n=e.absolutePoints,null!=n)if(null!=e.text&&null!=e.text.boundingBox&&
@@ -2324,20 +2324,21 @@ this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPa
function(){var b=q.apply(this,arguments);if(this.graph.pageVisible){for(var d=[],f=this.graph.pageFormat,c=this.graph.pageScale,e=f.width*c,f=f.height*c,c=this.graph.view.translate,l=this.graph.view.scale,g=this.graph.getPageLayout(),k=0;k<g.width;k++)d.push(new mxRectangle(((g.x+k)*e+c.x)*l,(g.y*f+c.y)*l,e*l,f*l));for(k=1;k<g.height;k++)d.push(new mxRectangle((g.x*e+c.x)*l,((g.y+k)*f+c.y)*l,e*l,f*l));b=d.concat(b)}return b};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
function(b,d){return null==b.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(b){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var n=this.graphHandler.getCells;this.graphHandler.getCells=function(b){for(var d=n.apply(this,arguments),f=new mxDictionary,c=[],e=0;e<d.length;e++){var l=this.graph.isTableCell(b)&&this.graph.isTableCell(d[e])&&
this.graph.isCellSelected(d[e])?this.graph.model.getParent(d[e]):this.graph.isTableRow(b)&&this.graph.isTableRow(d[e])&&this.graph.isCellSelected(d[e])?d[e]:this.graph.getCompositeParent(d[e]);null==l||f.get(l)||(f.put(l,!0),c.push(l))}return c};var u=this.graphHandler.start;this.graphHandler.start=function(b,d,f,c){var e=!1;this.graph.isTableCell(b)&&(this.graph.isCellSelected(b)?e=!0:b=this.graph.model.getParent(b));e||this.graph.isTableRow(b)&&this.graph.isCellSelected(b)||(b=this.graph.getCompositeParent(b));
-u.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(b,d){d=this.graph.getCompositeParent(d);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var v=new mxRubberband(this);this.getRubberband=function(){return v};var y=(new Date).getTime(),x=0,G=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var b=this.currentState;G.apply(this,arguments);b!=this.currentState?(y=(new Date).getTime(),x=0):x=(new Date).getTime()-y};var C=
-this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(b){return null!=this.currentState&&b.getState()==this.currentState&&2E3<x||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&C.apply(this,arguments)};var E=this.isToggleEvent;this.isToggleEvent=function(b){return E.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b)};var J=v.isForceRubberbandEvent;v.isForceRubberbandEvent=function(b){return J.apply(this,
+u.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(b,d){d=this.graph.getCompositeParent(d);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var v=new mxRubberband(this);this.getRubberband=function(){return v};var y=(new Date).getTime(),x=0,E=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var b=this.currentState;E.apply(this,arguments);b!=this.currentState?(y=(new Date).getTime(),x=0):x=(new Date).getTime()-y};var C=
+this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(b){return null!=this.currentState&&b.getState()==this.currentState&&2E3<x||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&C.apply(this,arguments)};var F=this.isToggleEvent;this.isToggleEvent=function(b){return F.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b)};var I=v.isForceRubberbandEvent;v.isForceRubberbandEvent=function(b){return I.apply(this,
arguments)&&!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isControlDown(b.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==b.getState()&&mxEvent.isTouchEvent(b.getEvent())};var L=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(L=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,
mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=L)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(b){return mxEvent.isMouseEvent(b.getEvent())};var H=this.click;this.click=function(b){var d=null==b.state&&null!=b.sourceState&&this.isCellLocked(b.sourceState.cell);if(this.isEnabled()&&!d||b.isConsumed())return H.apply(this,arguments);var f=d?b.sourceState.cell:b.getCell();null!=f&&(f=this.getClickableLinkForCell(f),null!=f&&(this.isCustomLink(f)?
-this.customLinkClicked(f):this.openLink(f)));this.isEnabled()&&d&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(b){return b.sourceState};var K=this.tooltipHandler.show;this.tooltipHandler.show=function(){K.apply(this,arguments);if(null!=this.div)for(var b=this.div.getElementsByTagName("a"),d=0;d<b.length;d++)null!=b[d].getAttribute("href")&&null==b[d].getAttribute("target")&&b[d].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(b){return b.sourceState};
+this.customLinkClicked(f):this.openLink(f)));this.isEnabled()&&d&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(b){return b.sourceState};var J=this.tooltipHandler.show;this.tooltipHandler.show=function(){J.apply(this,arguments);if(null!=this.div)for(var b=this.div.getElementsByTagName("a"),d=0;d<b.length;d++)null!=b[d].getAttribute("href")&&null==b[d].getAttribute("target")&&b[d].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(b){return b.sourceState};
this.getCursorForMouseEvent=function(b){var d=null==b.state&&null!=b.sourceState&&this.isCellLocked(b.sourceState.cell);return this.getCursorForCell(d?b.sourceState.cell:b.getCell())};var B=this.getCursorForCell;this.getCursorForCell=function(b){if(!this.isEnabled()||this.isCellLocked(b)){if(null!=this.getClickableLinkForCell(b))return"pointer";if(this.isCellLocked(b))return"default"}return B.apply(this,arguments)};this.selectRegion=function(b,d){var f=this.getCells(b.x,b.y,b.width,b.height,null,
null,null,function(b){return"1"==mxUtils.getValue(b.style,"locked","0")},!0);this.selectCellsForEvent(f,d);return f};var M=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(b,d,f){return this.graph.isCellSelected(b)?!1:M.apply(this,arguments)};this.isCellLocked=function(b){for(;null!=b;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(b),"locked","0"))return!0;b=this.model.getParent(b)}return!1};var P=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,
mxUtils.bind(this,function(b,d){if("mouseDown"==d.getProperty("eventName")){var f=d.getProperty("event").getState();P=null==f||this.isSelectionEmpty()||this.isCellSelected(f.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(b,d){if(!mxEvent.isMultiTouchEvent(d)){var f=d.getProperty("event"),c=d.getProperty("cell");null==c?(f=mxUtils.convertPoint(this.container,mxEvent.getClientX(f),mxEvent.getClientY(f)),v.start(f.x,f.y)):null!=P?this.addSelectionCells(P):
1<this.getSelectionCount()&&this.isCellSelected(c)&&this.removeSelectionCell(c);P=null;d.consume()}}));this.connectionHandler.selectCells=function(b,d){this.graph.setSelectionCell(d||b)};this.connectionHandler.constraintHandler.isStateIgnored=function(b,d){var f=b.view.graph;return d&&(f.isCellSelected(b.cell)||f.isTableRow(b.cell)&&f.selectionCellsHandler.isHandled(f.model.getParent(b.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var b=this.connectionHandler.constraintHandler;
null!=b.currentFocus&&b.isStateIgnored(b.currentFocus,!0)&&(b.currentFocus=null,b.constraints=null,b.destroyIcons());b.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var T=this.updateMouseEvent;this.updateMouseEvent=function(b){b=T.apply(this,arguments);null!=b.state&&this.isCellLocked(b.getCell())&&(b.state=null);return b}}this.currentTranslate=new mxPoint(0,0)};
Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;
-Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
+Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.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.createOffscreenGraph=function(b){var c=new Graph(document.createElement("div"));c.stylesheet.styles=mxUtils.clone(b.styles);c.resetViewOnRootChange=!1;c.setConnectable(!1);c.gridEnabled=!1;c.autoScroll=!1;c.setTooltips(!1);c.setEnabled(!1);c.container.style.visibility="hidden";c.container.style.position="absolute";c.container.style.overflow="hidden";c.container.style.height="1px";c.container.style.width="1px";return c};
-Graph.createSvgImage=function(b,c,e,k,g){e=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+c+'px" '+(null!=k&&null!=g?'viewBox="0 0 '+k+" "+g+'" ':"")+'version="1.1">'+e+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0)),b,c)};
+Graph.createSvgImage=function(b,c,e,k,g){e=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+c+'px" '+(null!=k&&null!=g?'viewBox="0 0 '+k+" "+g+'" ':"")+'version="1.1">'+e+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0)),b,c)};
Graph.zapGremlins=function(b){for(var c=0,e=[],k=0;k<b.length;k++){var g=b.charCodeAt(k);(32<=g||9==g||10==g||13==g)&&65535!=g&&65534!=g||(e.push(b.substring(c,k)),c=k+1)}0<c&&c<b.length&&e.push(b.substring(c));return 0==e.length?b:e.join("")};Graph.stringToBytes=function(b){for(var c=Array(b.length),e=0;e<b.length;e++)c[e]=b.charCodeAt(e);return c};Graph.bytesToString=function(b){for(var c=Array(b.length),e=0;e<b.length;e++)c[e]=String.fromCharCode(b[e]);return c.join("")};
Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(b,e){return String.fromCharCode(parseInt(e,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(b){return"%"+("00"+b.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,c){var e=mxUtils.getXml(b);return Graph.compress(c?e:Graph.zapGremlins(e))};
Graph.arrayBufferToString=function(b){var c="";b=new Uint8Array(b);for(var e=b.byteLength,k=0;k<e;k++)c+=String.fromCharCode(b[k]);return c};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(b){return b.charCodeAt(0)})};
@@ -2405,11 +2406,11 @@ null==t&&(t=f.hasAttribute(d)?null!=f.getAttribute(d)?f.getAttribute(d):"":null)
Graph.prototype.selectCellsForConnectVertex=function(b,c,e){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=e&&(mxEvent.isTouchEvent(c)?e.update(e.getState(this.view.getState(b[1]))):e.reset())):this.setSelectionCells(b)};Graph.prototype.isCloneConnectSource=function(b){var c=null;null!=this.layoutManager&&(c=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=c&&c.constructor==mxStackLayout};
Graph.prototype.connectVertex=function(b,c,e,k,g,p,t,d){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var f=this.isCloneConnectSource(b),l=f?b:this.getCompositeParent(b),m=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(l.geometry.x,l.geometry.y);c==mxConstants.DIRECTION_NORTH?(m.x+=l.geometry.width/2,m.y-=e):c==
mxConstants.DIRECTION_SOUTH?(m.x+=l.geometry.width/2,m.y+=l.geometry.height+e):(m.x=c==mxConstants.DIRECTION_WEST?m.x-e:m.x+(l.geometry.width+e),m.y+=l.geometry.height/2);var q=this.view.getState(this.model.getParent(b));e=this.view.scale;var n=this.view.translate,l=n.x*e,n=n.y*e;null!=q&&this.model.isVertex(q.cell)&&(l=q.x,n=q.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(m.x+=b.parent.geometry.x,m.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(l+m.x*e,n+m.y*e)).grow(40*e);p=null!=p?
-this.getCells(0,0,0,0,null,null,p,null,!0):null;var q=this.view.getState(b),u=null,v=null;if(null!=p){p=p.reverse();for(var y=0;y<p.length;y++)if(!this.isCellLocked(p[y])&&!this.model.isEdge(p[y])&&p[y]!=b)if(!this.model.isAncestor(b,p[y])&&this.isContainer(p[y])&&(null==u||p[y]==this.model.getParent(b)))u=p[y];else if(null==v&&this.isCellConnectable(p[y])&&!this.model.isAncestor(p[y],b)&&!this.isSwimlane(p[y])){var x=this.view.getState(p[y]);null==q||null==x||mxUtils.intersects(q,x)||(v=p[y])}}var G=
-!mxEvent.isShiftDown(k)||mxEvent.isControlDown(k)||g;G&&("1"!=urlParams.sketch||g)&&(c==mxConstants.DIRECTION_NORTH?m.y-=b.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?m.y+=b.geometry.height/2:m.x=c==mxConstants.DIRECTION_WEST?m.x-b.geometry.width/2:m.x+b.geometry.width/2);var C=[],E=v,v=u;g=mxUtils.bind(this,function(e){if(null==t||null!=e||null==v&&f){this.model.beginUpdate();try{if(null==E&&G){var g=this.getAbsoluteParent(null!=e?e:b),g=f?b:this.getCompositeParent(g);E=null!=e?e:this.duplicateCells([g],
-!1)[0];null!=e&&this.addCells([E],this.model.getParent(b),null,null,null,!0);var l=this.getCellGeometry(E);null!=l&&(null!=e&&"1"==urlParams.sketch&&(c==mxConstants.DIRECTION_NORTH?m.y-=l.height/2:c==mxConstants.DIRECTION_SOUTH?m.y+=l.height/2:m.x=c==mxConstants.DIRECTION_WEST?m.x-l.width/2:m.x+l.width/2),l.x=m.x-l.width/2,l.y=m.y-l.height/2);null!=u?(this.addCells([E],u,null,null,null,!0),v=null):G&&!f&&this.addCells([E],this.getDefaultParent(),null,null,null,!0)}var q=mxEvent.isControlDown(k)&&
-mxEvent.isShiftDown(k)&&G||null==v&&f?null:this.insertEdge(this.model.getParent(b),null,"",b,E,this.createCurrentEdgeStyle());if(null!=q&&this.connectionHandler.insertBeforeSource){var n=null;for(e=b;null!=e.parent&&null!=e.geometry&&e.geometry.relative&&e.parent!=q.parent;)e=this.model.getParent(e);null!=e&&null!=e.parent&&e.parent==q.parent&&(n=e.parent.getIndex(e),this.model.add(e.parent,q,n))}null==v&&null!=E&&null!=b.parent&&f&&c==mxConstants.DIRECTION_WEST&&(n=b.parent.getIndex(b),this.model.add(b.parent,
-E,n));null!=q&&C.push(q);null==v&&null!=E&&C.push(E);null==E&&null!=q&&q.geometry.setTerminalPoint(m,!1);null!=q&&this.fireEvent(new mxEventObject("cellsInserted","cells",[q]))}finally{this.model.endUpdate()}}if(null!=d)d(C);else return C});if(null==t||null!=E||!G||null==v&&f)return g(E);t(l+m.x*e,n+m.y*e,g)};
+this.getCells(0,0,0,0,null,null,p,null,!0):null;var q=this.view.getState(b),u=null,v=null;if(null!=p){p=p.reverse();for(var y=0;y<p.length;y++)if(!this.isCellLocked(p[y])&&!this.model.isEdge(p[y])&&p[y]!=b)if(!this.model.isAncestor(b,p[y])&&this.isContainer(p[y])&&(null==u||p[y]==this.model.getParent(b)))u=p[y];else if(null==v&&this.isCellConnectable(p[y])&&!this.model.isAncestor(p[y],b)&&!this.isSwimlane(p[y])){var x=this.view.getState(p[y]);null==q||null==x||mxUtils.intersects(q,x)||(v=p[y])}}var E=
+!mxEvent.isShiftDown(k)||mxEvent.isControlDown(k)||g;E&&("1"!=urlParams.sketch||g)&&(c==mxConstants.DIRECTION_NORTH?m.y-=b.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?m.y+=b.geometry.height/2:m.x=c==mxConstants.DIRECTION_WEST?m.x-b.geometry.width/2:m.x+b.geometry.width/2);var C=[],F=v,v=u;g=mxUtils.bind(this,function(e){if(null==t||null!=e||null==v&&f){this.model.beginUpdate();try{if(null==F&&E){var g=this.getAbsoluteParent(null!=e?e:b),g=f?b:this.getCompositeParent(g);F=null!=e?e:this.duplicateCells([g],
+!1)[0];null!=e&&this.addCells([F],this.model.getParent(b),null,null,null,!0);var l=this.getCellGeometry(F);null!=l&&(null!=e&&"1"==urlParams.sketch&&(c==mxConstants.DIRECTION_NORTH?m.y-=l.height/2:c==mxConstants.DIRECTION_SOUTH?m.y+=l.height/2:m.x=c==mxConstants.DIRECTION_WEST?m.x-l.width/2:m.x+l.width/2),l.x=m.x-l.width/2,l.y=m.y-l.height/2);null!=u?(this.addCells([F],u,null,null,null,!0),v=null):E&&!f&&this.addCells([F],this.getDefaultParent(),null,null,null,!0)}var q=mxEvent.isControlDown(k)&&
+mxEvent.isShiftDown(k)&&E||null==v&&f?null:this.insertEdge(this.model.getParent(b),null,"",b,F,this.createCurrentEdgeStyle());if(null!=q&&this.connectionHandler.insertBeforeSource){var n=null;for(e=b;null!=e.parent&&null!=e.geometry&&e.geometry.relative&&e.parent!=q.parent;)e=this.model.getParent(e);null!=e&&null!=e.parent&&e.parent==q.parent&&(n=e.parent.getIndex(e),this.model.add(e.parent,q,n))}null==v&&null!=F&&null!=b.parent&&f&&c==mxConstants.DIRECTION_WEST&&(n=b.parent.getIndex(b),this.model.add(b.parent,
+F,n));null!=q&&C.push(q);null==v&&null!=F&&C.push(F);null==F&&null!=q&&q.geometry.setTerminalPoint(m,!1);null!=q&&this.fireEvent(new mxEventObject("cellsInserted","cells",[q]))}finally{this.model.endUpdate()}}if(null!=d)d(C);else return C});if(null==t||null!=F||!E||null==v&&f)return g(F);t(l+m.x*e,n+m.y*e,g)};
Graph.prototype.getIndexableText=function(){var b=document.createElement("div"),c=[],e,k;for(k in this.model.cells)if(e=this.model.cells[k],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(b.innerHTML=this.sanitizeHtml(this.getLabel(e)),e=mxUtils.extractTextWithWhitespace([b])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&c.push(e);return c.join(" ")};
Graph.prototype.convertValueToString=function(b){var c=this.model.getValue(b);if(null!=c&&"object"==typeof c){var e=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder"))for(var c=b.getAttribute("placeholder"),k=b;null==e&&null!=k;)null!=k.value&&"object"==typeof k.value&&(e=k.hasAttribute(c)?null!=k.getAttribute(c)?k.getAttribute(c):"":null),k=this.model.getParent(k);else e=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(e=c.getAttribute("label_"+Graph.diagramLanguage)),
null==e&&(e=c.getAttribute("label")||"");return e||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),null!=b&&"javascript:"===b.toLowerCase().substring(0,11)&&(b=b.substring(11)),b):null};
@@ -2471,10 +2472,12 @@ g=this.createVertex(null,null,null!=g?g:"",0,0,c*e,b*k,null!=p?p:"shape=table;ch
return 1<b?(t.geometry.y=k+p,this.createParent(g,this.createParent(t,this.createVertex(null,null,"",p,0,e,k,f),c,e,0),b-1,0,k)):g};Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};
Graph.prototype.setTableRowHeight=function(b,c,e){e=null!=e?e:!0;var k=this.getModel();k.beginUpdate();try{var g=this.getCellGeometry(b);if(null!=g){g=g.clone();g.height+=c;k.setGeometry(b,g);var p=k.getParent(b),t=k.getChildCells(p,!0);if(!e){var d=mxUtils.indexOf(t,b);if(d<t.length-1){var f=t[d+1],l=this.getCellGeometry(f);null!=l&&(l=l.clone(),l.y+=c,l.height-=c,k.setGeometry(f,l))}}var m=this.getCellGeometry(p);null!=m&&(e||(e=b==t[t.length-1]),e&&(m=m.clone(),m.height+=c,k.setGeometry(p,m)));
null!=this.layoutManager&&this.layoutManager.executeLayout(p,!0)}}finally{k.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(b,c,e){e=null!=e?e:!1;var k=this.getModel(),g=k.getParent(b),p=k.getParent(g),t=k.getChildCells(g,!0);b=mxUtils.indexOf(t,b);var d=b==t.length-1;k.beginUpdate();try{for(var f=k.getChildCells(p,!0),l=0;l<f.length;l++){var g=f[l],t=k.getChildCells(g,!0),m=t[b],q=this.getCellGeometry(m);null!=q&&(q=q.clone(),q.width+=c,k.setGeometry(m,q));b<t.length-1&&(m=t[b+1],q=this.getCellGeometry(m),null!=q&&(q=q.clone(),q.x+=c,e||(q.width-=c),k.setGeometry(m,q)))}if(d||
-e){var n=this.getCellGeometry(p);null!=n&&(n=n.clone(),n.width+=c,k.setGeometry(p,n))}null!=this.layoutManager&&this.layoutManager.executeLayout(p,!0)}finally{k.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};
-TableLayout.prototype.getSize=function(b,c){for(var e=0,k=0;k<b.length;k++)if(!this.isVertexIgnored(b[k])){var g=this.graph.getCellGeometry(b[k]);null!=g&&(e+=c?g.width:g.height)}return e};TableLayout.prototype.getRowLayout=function(b,c){for(var e=this.graph.model.getChildCells(b,!0),k=this.graph.getActualStartSize(b,!0),g=this.getSize(e,!0),p=c-k.x-k.width,t=[],k=k.x,d=0;d<e.length;d++){var f=this.graph.getCellGeometry(e[d]);null!=f&&(k+=f.width*p/g,t.push(Math.round(k)))}return t};
-TableLayout.prototype.layoutRow=function(b,c,e,k){var g=this.graph.getModel(),p=g.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var t=b.x,d=0;null!=c&&(c=c.slice(),c.splice(0,0,b.x));for(var f=0;f<p.length;f++){var l=this.graph.getCellGeometry(p[f]);null!=l&&(l=l.clone(),l.y=b.y,l.height=e-b.y-b.height,null!=c?(l.x=c[f],l.width=c[f+1]-l.x,f==p.length-1&&f<c.length-2&&(l.width=k-l.x-b.x-b.width)):(l.x=t,t+=l.width,f==p.length-1?l.width=k-b.x-b.width-d:d+=l.width),g.setGeometry(p[f],l))}return d};
+Graph.prototype.setTableColumnWidth=function(b,c,e){e=null!=e?e:!1;var k=this.getModel(),g=k.getParent(b),p=k.getParent(g),t=k.getChildCells(g,!0);b=mxUtils.indexOf(t,b);var d=b==t.length-1;k.beginUpdate();try{for(var f=k.getChildCells(p,!0),l=0;l<f.length;l++){var g=f[l],t=k.getChildCells(g,!0),m=t[b],q=this.getCellGeometry(m);if(null!=q){var q=q.clone(),n=null!=q.alternateBounds?q.alternateBounds:q;n.width+=c;k.setGeometry(m,q)}b<t.length-1&&(m=t[b+1],q=this.getCellGeometry(m),null!=q&&(q=q.clone(),
+n=null!=q.alternateBounds?q.alternateBounds:q,n.x+=c,e||(n.width-=c),k.setGeometry(m,q)))}if(d||e){var u=this.getCellGeometry(p);null!=u&&(u=u.clone(),n=null!=u.alternateBounds?u.alternateBounds:q,n.width+=c,k.setGeometry(p,u))}null!=this.layoutManager&&this.layoutManager.executeLayout(p,!0)}finally{k.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,c){for(var e=0,k=0;k<b.length;k++)if(!this.isVertexIgnored(b[k])){var g=this.graph.getCellGeometry(b[k]);null!=g&&(e+=c?g.width:g.height)}return e};
+TableLayout.prototype.getRowLayout=function(b,c){for(var e=this.graph.model.getChildCells(b,!0),k=this.graph.getActualStartSize(b,!0),g=this.getSize(e,!0),p=c-k.x-k.width,t=[],k=k.x,d=0;d<e.length;d++){var f=this.graph.getCellGeometry(e[d]);null!=f&&(k+=(null!=f.alternateBounds?f.alternateBounds.width:f.width)*p/g,t.push(Math.round(k)))}return t};
+TableLayout.prototype.layoutRow=function(b,c,e,k){var g=this.graph.getModel(),p=g.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var t=null,d=b.x,f=0;null!=c&&(c=c.slice(),c.splice(0,0,b.x));for(var l=0;l<p.length;l++){var m=this.graph.getCellGeometry(p[l]);null!=m&&(m=m.clone(),m.y=b.y,m.height=e-b.y-b.height,null!=c?(m.x=c[l],m.width=c[l+1]-m.x,l==p.length-1&&l<c.length-2&&(m.width=k-m.x-b.x-b.width)):(m.x=d,d+=m.width,l==p.length-1?m.width=k-b.x-b.width-f:f+=m.width),m.alternateBounds=
+new mxRectangle(0,0,m.width,m.height),g.setGeometry(p[l],m));null!=t&&null!=t.geo&&(1<t.colspan?(t.colspan--,t.geo.width+=m.width,g.setVisible(p[l],!1)):g.setVisible(p[l],!0));if(null==t||1>=t.colspan)t=this.graph.getCurrentCellStyle(p[l],!0),t={colspan:null!=t?parseInt(t.colspan||1):1,style:t,cell:p[l],geo:m}}return f};
TableLayout.prototype.execute=function(b){if(null!=b){var c=this.graph.getActualStartSize(b,!0),e=this.graph.getCellGeometry(b),k=this.graph.getCellStyle(b),g="1"==mxUtils.getValue(k,"resizeLastRow","0"),p="1"==mxUtils.getValue(k,"resizeLast","0"),k="1"==mxUtils.getValue(k,"fixedRows","0"),t=this.graph.getModel(),d=0;t.beginUpdate();try{var f=e.height-c.y-c.height,l=e.width-c.x-c.width,m=t.getChildCells(b,!0),q=this.getSize(m,!1);if(0<f&&0<l&&0<m.length&&0<q){if(g){var n=this.graph.getCellGeometry(m[m.length-
1]);null!=n&&(n=n.clone(),n.height=f-q+n.height,t.setGeometry(m[m.length-1],n))}for(var u=p?null:this.getRowLayout(m[0],l),v=c.y,y=0;y<m.length;y++)n=this.graph.getCellGeometry(m[y]),null!=n&&(n=n.clone(),n.x=c.x,n.width=l,n.y=Math.round(v),v=g||k?v+n.height:v+n.height/q*f,n.height=Math.round(v)-n.y,t.setGeometry(m[y],n)),d=Math.max(d,this.layoutRow(m[y],u,n.height,l));k&&f<q&&(e=e.clone(),e.height=v+c.height,t.setGeometry(b,e));p&&l<d+Graph.minTableColumnWidth&&(e=e.clone(),e.width=d+c.width+c.x+
Graph.minTableColumnWidth,t.setGeometry(b,e))}}finally{t.endUpdate()}}};
@@ -2482,12 +2485,12 @@ Graph.minTableColumnWidth,t.setGeometry(b,e))}}finally{t.endUpdate()}}};
arguments);null!=f&&d&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(f);return f};var e=mxShape.prototype.paint;mxShape.prototype.paint=function(){e.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var b=this.node.getElementsByTagName("path");if(1<b.length){"1"!=mxUtils.getValue(this.state.style,
mxConstants.STYLE_DASHED,"0")&&b[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var d=this.state.view.graph.getFlowAnimationStyle();null!=d&&b[1].setAttribute("class",d.getAttribute("id"))}}};var k=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(b,d){return k.apply(this,arguments)||null!=b.routedPoints&&null!=d.routedPoints&&!mxUtils.equalPoints(d.routedPoints,b.routedPoints)};var g=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
function(b){g.apply(this,arguments);this.graph.model.isEdge(b.cell)&&1!=b.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(b)};mxGraphView.prototype.updateLineJumps=function(b){var d=b.absolutePoints;if(Graph.lineJumpsEnabled){var f=null!=b.routedPoints,c=null;if(null!=d&&null!=this.validEdges&&"none"!==mxUtils.getValue(b.style,"jumpStyle","none")){for(var e=function(d,f,e){var l=new mxPoint(f,e);l.type=d;c.push(l);l=null!=b.routedPoints?b.routedPoints[c.length-1]:null;return null==l||l.type!=
-d||l.x!=f||l.y!=e},l=.5*this.scale,f=!1,c=[],g=0;g<d.length-1;g++){for(var k=d[g+1],m=d[g],p=[],t=d[g+2];g<d.length-2&&mxUtils.ptSegDistSq(m.x,m.y,t.x,t.y,k.x,k.y)<1*this.scale*this.scale;)k=t,g++,t=d[g+2];for(var f=e(0,m.x,m.y)||f,L=0;L<this.validEdges.length;L++){var H=this.validEdges[L],K=H.absolutePoints;if(null!=K&&mxUtils.intersects(b,H)&&"1"!=H.style.noJump)for(H=0;H<K.length-1;H++){for(var B=K[H+1],M=K[H],t=K[H+2];H<K.length-2&&mxUtils.ptSegDistSq(M.x,M.y,t.x,t.y,B.x,B.y)<1*this.scale*this.scale;)B=
-t,H++,t=K[H+2];t=mxUtils.intersection(m.x,m.y,k.x,k.y,M.x,M.y,B.x,B.y);if(null!=t&&(Math.abs(t.x-m.x)>l||Math.abs(t.y-m.y)>l)&&(Math.abs(t.x-k.x)>l||Math.abs(t.y-k.y)>l)&&(Math.abs(t.x-M.x)>l||Math.abs(t.y-M.y)>l)&&(Math.abs(t.x-B.x)>l||Math.abs(t.y-B.y)>l)){B=t.x-m.x;M=t.y-m.y;t={distSq:B*B+M*M,x:t.x,y:t.y};for(B=0;B<p.length;B++)if(p[B].distSq>t.distSq){p.splice(B,0,t);t=null;break}null==t||0!=p.length&&p[p.length-1].x===t.x&&p[p.length-1].y===t.y||p.push(t)}}}for(H=0;H<p.length;H++)f=e(1,p[H].x,
+d||l.x!=f||l.y!=e},l=.5*this.scale,f=!1,c=[],g=0;g<d.length-1;g++){for(var k=d[g+1],m=d[g],p=[],t=d[g+2];g<d.length-2&&mxUtils.ptSegDistSq(m.x,m.y,t.x,t.y,k.x,k.y)<1*this.scale*this.scale;)k=t,g++,t=d[g+2];for(var f=e(0,m.x,m.y)||f,L=0;L<this.validEdges.length;L++){var H=this.validEdges[L],J=H.absolutePoints;if(null!=J&&mxUtils.intersects(b,H)&&"1"!=H.style.noJump)for(H=0;H<J.length-1;H++){for(var B=J[H+1],M=J[H],t=J[H+2];H<J.length-2&&mxUtils.ptSegDistSq(M.x,M.y,t.x,t.y,B.x,B.y)<1*this.scale*this.scale;)B=
+t,H++,t=J[H+2];t=mxUtils.intersection(m.x,m.y,k.x,k.y,M.x,M.y,B.x,B.y);if(null!=t&&(Math.abs(t.x-m.x)>l||Math.abs(t.y-m.y)>l)&&(Math.abs(t.x-k.x)>l||Math.abs(t.y-k.y)>l)&&(Math.abs(t.x-M.x)>l||Math.abs(t.y-M.y)>l)&&(Math.abs(t.x-B.x)>l||Math.abs(t.y-B.y)>l)){B=t.x-m.x;M=t.y-m.y;t={distSq:B*B+M*M,x:t.x,y:t.y};for(B=0;B<p.length;B++)if(p[B].distSq>t.distSq){p.splice(B,0,t);t=null;break}null==t||0!=p.length&&p[p.length-1].x===t.x&&p[p.length-1].y===t.y||p.push(t)}}}for(H=0;H<p.length;H++)f=e(1,p[H].x,
p[H].y)||f}t=d[d.length-1];f=e(0,t.x,t.y)||f}b.routedPoints=c;return f}return!1};var p=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(b,d,f){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)p.apply(this,arguments);else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,
-"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,l=mxUtils.getValue(this.style,"jumpStyle","none"),g=!0,k=null,m=null,q=[],n=null;b.begin();for(var t=0;t<this.state.routedPoints.length;t++){var H=this.state.routedPoints[t],K=new mxPoint(H.x/this.scale,H.y/this.scale);0==t?K=d[0]:t==this.state.routedPoints.length-1&&(K=d[d.length-1]);var B=!1;if(null!=k&&1==H.type){var M=this.state.routedPoints[t+1],H=M.x/this.scale-K.x,M=M.y/this.scale-K.y,H=H*H+M*M;null==n&&(n=new mxPoint(K.x-k.x,K.y-k.y),
-m=Math.sqrt(n.x*n.x+n.y*n.y),0<m?(n.x=n.x*e/m,n.y=n.y*e/m):n=null);H>e*e&&0<m&&(H=k.x-K.x,M=k.y-K.y,H=H*H+M*M,H>e*e&&(B=new mxPoint(K.x-n.x,K.y-n.y),H=new mxPoint(K.x+n.x,K.y+n.y),q.push(B),this.addPoints(b,q,f,c,!1,null,g),q=0>Math.round(n.x)||0==Math.round(n.x)&&0>=Math.round(n.y)?1:-1,g=!1,"sharp"==l?(b.lineTo(B.x-n.y*q,B.y+n.x*q),b.lineTo(H.x-n.y*q,H.y+n.x*q),b.lineTo(H.x,H.y)):"line"==l?(b.moveTo(B.x+n.y*q,B.y-n.x*q),b.lineTo(B.x-n.y*q,B.y+n.x*q),b.moveTo(H.x-n.y*q,H.y+n.x*q),b.lineTo(H.x+n.y*
-q,H.y-n.x*q),b.moveTo(H.x,H.y)):"arc"==l?(q*=1.3,b.curveTo(B.x-n.y*q,B.y+n.x*q,H.x-n.y*q,H.y+n.x*q,H.x,H.y)):(b.moveTo(H.x,H.y),g=!0),q=[H],B=!0))}else n=null;B||(q.push(K),k=K)}this.addPoints(b,q,f,c,!1,null,g);b.stroke()}};var t=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(b,d,f,c){return null!=d&&"centerPerimeter"==d.style[mxConstants.STYLE_PERIMETER]?new mxPoint(d.getCenterX(),d.getCenterY()):t.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint;
+"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,l=mxUtils.getValue(this.style,"jumpStyle","none"),g=!0,k=null,m=null,q=[],n=null;b.begin();for(var t=0;t<this.state.routedPoints.length;t++){var H=this.state.routedPoints[t],J=new mxPoint(H.x/this.scale,H.y/this.scale);0==t?J=d[0]:t==this.state.routedPoints.length-1&&(J=d[d.length-1]);var B=!1;if(null!=k&&1==H.type){var M=this.state.routedPoints[t+1],H=M.x/this.scale-J.x,M=M.y/this.scale-J.y,H=H*H+M*M;null==n&&(n=new mxPoint(J.x-k.x,J.y-k.y),
+m=Math.sqrt(n.x*n.x+n.y*n.y),0<m?(n.x=n.x*e/m,n.y=n.y*e/m):n=null);H>e*e&&0<m&&(H=k.x-J.x,M=k.y-J.y,H=H*H+M*M,H>e*e&&(B=new mxPoint(J.x-n.x,J.y-n.y),H=new mxPoint(J.x+n.x,J.y+n.y),q.push(B),this.addPoints(b,q,f,c,!1,null,g),q=0>Math.round(n.x)||0==Math.round(n.x)&&0>=Math.round(n.y)?1:-1,g=!1,"sharp"==l?(b.lineTo(B.x-n.y*q,B.y+n.x*q),b.lineTo(H.x-n.y*q,H.y+n.x*q),b.lineTo(H.x,H.y)):"line"==l?(b.moveTo(B.x+n.y*q,B.y-n.x*q),b.lineTo(B.x-n.y*q,B.y+n.x*q),b.moveTo(H.x-n.y*q,H.y+n.x*q),b.lineTo(H.x+n.y*
+q,H.y-n.x*q),b.moveTo(H.x,H.y)):"arc"==l?(q*=1.3,b.curveTo(B.x-n.y*q,B.y+n.x*q,H.x-n.y*q,H.y+n.x*q,H.x,H.y)):(b.moveTo(H.x,H.y),g=!0),q=[H],B=!0))}else n=null;B||(q.push(J),k=J)}this.addPoints(b,q,f,c,!1,null,g);b.stroke()}};var t=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(b,d,f,c){return null!=d&&"centerPerimeter"==d.style[mxConstants.STYLE_PERIMETER]?new mxPoint(d.getCenterX(),d.getCenterY()):t.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint;
mxGraphView.prototype.updateFloatingTerminalPoint=function(b,f,c,e){if(null==f||null==b||"1"!=f.style.snapToPoint&&"1"!=b.style.snapToPoint)d.apply(this,arguments);else{f=this.getTerminalPort(b,f,e);var l=this.getNextPoint(b,c,e),g=this.graph.isOrthogonal(b),k=mxUtils.toRadians(Number(f.style[mxConstants.STYLE_ROTATION]||"0")),m=new mxPoint(f.getCenterX(),f.getCenterY());if(0!=k)var q=Math.cos(-k),n=Math.sin(-k),l=mxUtils.getRotatedPoint(l,q,n,m);q=parseFloat(b.style[mxConstants.STYLE_PERIMETER_SPACING]||
0);q+=parseFloat(b.style[e?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);l=this.getPerimeterPoint(f,l,0==k&&g,q);0!=k&&(q=Math.cos(k),n=Math.sin(k),l=mxUtils.getRotatedPoint(l,q,n,m));b.setAbsoluteTerminalPoint(this.snapToAnchorPoint(b,f,c,e,l),e)}};mxGraphView.prototype.snapToAnchorPoint=function(b,d,f,c,e){if(null!=d&&null!=b){b=this.graph.getAllConnectionConstraints(d);c=f=null;if(null!=b)for(var l=0;l<b.length;l++){var g=this.graph.getConnectionPoint(d,
b[l]);if(null!=g){var k=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==c||k<c)f=g,c=k}}null!=f&&(e=f)}return e};var f=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(b,d,c){var e=f.apply(this,arguments);"1"==b.getAttribute("placeholders")&&null!=c.state&&(e=c.state.view.graph.replacePlaceholders(c.state.cell,e));return e};var l=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(b){if(null!=b.style&&"undefined"!==typeof pako){var d=
@@ -2514,22 +2517,22 @@ k){var m=this.createCellLookup([l.root]),k=k.slice();this.model.beginUpdate();tr
(d=this.snap(d),f=this.snap(f));var n=this.getBoundingBoxFromGeometry(b,!0);null!=n&&this.moveCells(b,d-n.x,f-n.y)}}finally{this.model.endUpdate()}}return b};Graph.prototype.encodeCells=function(b){for(var d={},f=this.cloneCells(b,null,d),c=new mxDictionary,e=0;e<b.length;e++)c.put(b[e],!0);for(var l=new mxCodec,g=new mxGraphModel,k=g.getChildAt(g.getRoot(),0),e=0;e<f.length;e++){g.add(k,f[e]);var m=this.view.getState(b[e]);if(null!=m){var q=this.getCellGeometry(f[e]);null!=q&&q.relative&&!this.model.isEdge(b[e])&&
null==c.get(this.model.getParent(b[e]))&&(q.offset=null,q.relative=!1,q.x=m.x/m.view.scale-m.view.translate.x,q.y=m.y/m.view.scale-m.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(d,this.createCellLookup(b)),f);return l.encode(g)};Graph.prototype.isSwimlane=function(b,d){if(null!=b&&this.model.getParent(b)!=this.model.getRoot()&&!this.model.isEdge(b)){var f=this.getCurrentCellStyle(b,d)[mxConstants.STYLE_SHAPE];return f==mxConstants.SHAPE_SWIMLANE||"table"==f}return!1};var d=Graph.prototype.isExtendParent;
Graph.prototype.isExtendParent=function(b){var f=this.model.getParent(b);if(null!=f){var c=this.getCurrentCellStyle(f);if(null!=c.expand)return"0"!=c.expand}return d.apply(this,arguments)&&(null==f||!this.isTable(f))};var f=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(b,d,c,e,l,g,k,m){null==m&&(m=this.model.getParent(b),this.isTable(m)||this.isTableRow(m))&&(m=this.getCellAt(g,k,null,!0,!1));c=null;this.model.beginUpdate();try{c=f.apply(this,[b,d,c,e,l,g,k,m]);this.model.setValue(c,
-"");var q=this.getChildCells(c,!0);for(d=0;d<q.length;d++){var n=this.getCellGeometry(q[d]);null!=n&&n.relative&&0<n.x&&this.model.remove(q[d])}var F=this.getChildCells(b,!0);for(d=0;d<F.length;d++)n=this.getCellGeometry(F[d]),null!=n&&n.relative&&0>=n.x&&this.model.remove(F[d]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[c]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[c]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[b]);this.setCellStyles(mxConstants.STYLE_STARTARROW,
+"");var q=this.getChildCells(c,!0);for(d=0;d<q.length;d++){var n=this.getCellGeometry(q[d]);null!=n&&n.relative&&0<n.x&&this.model.remove(q[d])}var G=this.getChildCells(b,!0);for(d=0;d<G.length;d++)n=this.getCellGeometry(G[d]),null!=n&&n.relative&&0>=n.x&&this.model.remove(G[d]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[c]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[c]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[b]);this.setCellStyles(mxConstants.STYLE_STARTARROW,
mxConstants.NONE,[b]);var ca=this.model.getTerminal(c,!1);if(null!=ca){var v=this.getCurrentCellStyle(ca);null!=v&&"1"==v.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[b]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[b]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[c]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[c]))}}finally{this.model.endUpdate()}return c};var l=Graph.prototype.selectCell;Graph.prototype.selectCell=function(b,d,f){if(d||f)l.apply(this,arguments);
else{var c=this.getSelectionCell(),e=null,g=[],k=mxUtils.bind(this,function(d){if(null!=this.view.getState(d)&&(this.model.isVertex(d)||this.model.isEdge(d)))if(g.push(d),d==c)e=g.length-1;else if(b&&null==c&&0<g.length||null!=e&&b&&g.length>e||!b&&0<e)return;for(var f=0;f<this.model.getChildCount(d);f++)k(this.model.getChildAt(d,f))});k(this.model.root);0<g.length&&(e=null!=e?mxUtils.mod(e+(b?1:-1),g.length):0,this.setSelectionCell(g[e]))}};var m=Graph.prototype.moveCells;Graph.prototype.moveCells=
-function(b,d,f,c,e,l,g){g=null!=g?g:{};if(this.isTable(e)){for(var k=[],q=0;q<b.length;q++)this.isTable(b[q])?k=k.concat(this.model.getChildCells(b[q],!0).reverse()):k.push(b[q]);b=k}this.model.beginUpdate();try{k=[];for(q=0;q<b.length;q++)if(null!=e&&this.isTableRow(b[q])){var n=this.model.getParent(b[q]),F=this.getCellGeometry(b[q]);this.isTable(n)&&k.push(n);if(null!=n&&null!=F&&this.isTable(n)&&this.isTable(e)&&(c||n!=e)){if(!c){var ca=this.getCellGeometry(n);null!=ca&&(ca=ca.clone(),ca.height-=
-F.height,this.model.setGeometry(n,ca))}ca=this.getCellGeometry(e);null!=ca&&(ca=ca.clone(),ca.height+=F.height,this.model.setGeometry(e,ca));var v=this.model.getChildCells(e,!0);if(0<v.length){b[q]=c?this.cloneCell(b[q]):b[q];var p=this.model.getChildCells(b[q],!0),u=this.model.getChildCells(v[0],!0),A=u.length-p.length;if(0<A)for(var D=0;D<A;D++){var x=this.cloneCell(p[p.length-1]);null!=x&&(x.value="",this.model.add(b[q],x))}else if(0>A)for(D=0;D>A;D--)this.model.remove(p[p.length+D-1]);p=this.model.getChildCells(b[q],
-!0);for(D=0;D<u.length;D++){var O=this.getCellGeometry(u[D]),I=this.getCellGeometry(p[D]);null!=O&&null!=I&&(I=I.clone(),I.width=O.width,this.model.setGeometry(p[D],I))}}}}for(var t=m.apply(this,arguments),q=0;q<k.length;q++)!c&&this.model.contains(k[q])&&0==this.model.getChildCount(k[q])&&this.model.remove(k[q]);c&&this.updateCustomLinks(this.createCellMapping(g,this.createCellLookup(b)),t)}finally{this.model.endUpdate()}return t};var q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(b,
+function(b,d,f,c,e,l,g){g=null!=g?g:{};if(this.isTable(e)){for(var k=[],q=0;q<b.length;q++)this.isTable(b[q])?k=k.concat(this.model.getChildCells(b[q],!0).reverse()):k.push(b[q]);b=k}this.model.beginUpdate();try{k=[];for(q=0;q<b.length;q++)if(null!=e&&this.isTableRow(b[q])){var n=this.model.getParent(b[q]),G=this.getCellGeometry(b[q]);this.isTable(n)&&k.push(n);if(null!=n&&null!=G&&this.isTable(n)&&this.isTable(e)&&(c||n!=e)){if(!c){var ca=this.getCellGeometry(n);null!=ca&&(ca=ca.clone(),ca.height-=
+G.height,this.model.setGeometry(n,ca))}ca=this.getCellGeometry(e);null!=ca&&(ca=ca.clone(),ca.height+=G.height,this.model.setGeometry(e,ca));var v=this.model.getChildCells(e,!0);if(0<v.length){b[q]=c?this.cloneCell(b[q]):b[q];var p=this.model.getChildCells(b[q],!0),u=this.model.getChildCells(v[0],!0),A=u.length-p.length;if(0<A)for(var D=0;D<A;D++){var O=this.cloneCell(p[p.length-1]);null!=O&&(O.value="",this.model.add(b[q],O))}else if(0>A)for(D=0;D>A;D--)this.model.remove(p[p.length+D-1]);p=this.model.getChildCells(b[q],
+!0);for(D=0;D<u.length;D++){var x=this.getCellGeometry(u[D]),t=this.getCellGeometry(p[D]);null!=x&&null!=t&&(t=t.clone(),t.width=x.width,this.model.setGeometry(p[D],t))}}}}for(var K=m.apply(this,arguments),q=0;q<k.length;q++)!c&&this.model.contains(k[q])&&0==this.model.getChildCount(k[q])&&this.model.remove(k[q]);c&&this.updateCustomLinks(this.createCellMapping(g,this.createCellLookup(b)),K)}finally{this.model.endUpdate()}return K};var q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(b,
d){var f=[];this.model.beginUpdate();try{for(var c=0;c<b.length;c++)if(this.isTableCell(b[c])){var e=this.model.getParent(b[c]),l=this.model.getParent(e);1==this.model.getChildCount(e)&&1==this.model.getChildCount(l)?0>mxUtils.indexOf(b,l)&&0>mxUtils.indexOf(f,l)&&f.push(l):this.labelChanged(b[c],"")}else{if(this.isTableRow(b[c])&&(l=this.model.getParent(b[c]),0>mxUtils.indexOf(b,l)&&0>mxUtils.indexOf(f,l))){for(var g=this.model.getChildCells(l,!0),k=0,m=0;m<g.length;m++)0<=mxUtils.indexOf(b,g[m])&&
k++;k==g.length&&f.push(l)}f.push(b[c])}f=q.apply(this,[f,d])}finally{this.model.endUpdate()}return f};Graph.prototype.updateCustomLinks=function(b,d,f){f=null!=f?f:new Graph;for(var c=0;c<d.length;c++)null!=d[c]&&f.updateCustomLinksForCell(b,d[c],f)};Graph.prototype.updateCustomLinksForCell=function(b,d){this.doUpdateCustomLinksForCell(b,d);for(var f=this.model.getChildCount(d),c=0;c<f;c++)this.updateCustomLinksForCell(b,this.model.getChildAt(d,c))};Graph.prototype.doUpdateCustomLinksForCell=function(b,
-d){};Graph.prototype.getAllConnectionConstraints=function(b,d){if(null!=b){var f=mxUtils.getValue(b.style,"points",null);if(null!=f){var c=[];try{for(var e=JSON.parse(f),f=0;f<e.length;f++){var l=e[f];c.push(new mxConnectionConstraint(new mxPoint(l[0],l[1]),2<l.length?"0"!=l[2]:!0,null,3<l.length?l[3]:0,4<l.length?l[4]:0))}}catch(ya){}return c}if(null!=b.shape&&null!=b.shape.bounds){l=b.shape.direction;e=b.shape.bounds;f=b.shape.scale;c=e.width/f;e=e.height/f;if(l==mxConstants.DIRECTION_NORTH||l==
+d){};Graph.prototype.getAllConnectionConstraints=function(b,d){if(null!=b){var f=mxUtils.getValue(b.style,"points",null);if(null!=f){var c=[];try{for(var e=JSON.parse(f),f=0;f<e.length;f++){var l=e[f];c.push(new mxConnectionConstraint(new mxPoint(l[0],l[1]),2<l.length?"0"!=l[2]:!0,null,3<l.length?l[3]:0,4<l.length?l[4]:0))}}catch(za){}return c}if(null!=b.shape&&null!=b.shape.bounds){l=b.shape.direction;e=b.shape.bounds;f=b.shape.scale;c=e.width/f;e=e.height/f;if(l==mxConstants.DIRECTION_NORTH||l==
mxConstants.DIRECTION_SOUTH)l=c,c=e,e=l;f=b.shape.getConstraints(b.style,c,e);if(null!=f)return f;if(null!=b.shape.stencil&&null!=b.shape.stencil.constraints)return b.shape.stencil.constraints;if(null!=b.shape.constraints)return b.shape.constraints}}return null};Graph.prototype.flipEdge=function(b){if(null!=b){var d=this.getCurrentCellStyle(b),d=mxUtils.getValue(d,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;
this.setCellStyles(mxConstants.STYLE_ELBOW,d,[b])}};Graph.prototype.isValidRoot=function(b){for(var d=this.model.getChildCount(b),f=0,c=0;c<d;c++){var e=this.model.getChildAt(b,c);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||f++)}return 0<f||this.isContainer(b)};Graph.prototype.isValidDropTarget=function(b,d,f){for(var c=this.getCurrentCellStyle(b),e=!0,l=!0,g=0;g<d.length&&l;g++)e=e&&this.isTable(d[g]),l=l&&this.isTableRow(d[g]);return("1"!=mxUtils.getValue(c,"part","0")||
this.isContainer(b))&&"0"!=mxUtils.getValue(c,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(b))&&!this.isTableRow(b)&&(!this.isTable(b)||l||e)};Graph.prototype.createGroupCell=function(){var b=mxGraph.prototype.createGroupCell.apply(this,arguments);b.setStyle("group");return b};Graph.prototype.isExtendParentsOnAdd=function(b){var d=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(d&&null!=b&&null!=this.layoutManager){var f=this.model.getParent(b);
null!=f&&(f=this.layoutManager.getLayout(f),null!=f&&f.constructor==mxStackLayout&&(d=!1))}return d};Graph.prototype.getPreferredSizeForCell=function(b){var d=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=d&&(d.width+=10,d.height+=4,this.gridEnabled&&(d.width=this.snap(d.width),d.height=this.snap(d.height)));return d};Graph.prototype.turnShapes=function(b,d){var f=this.getModel(),c=[];f.beginUpdate();try{for(var e=0;e<b.length;e++){var l=b[e];if(f.isEdge(l)){var g=f.getTerminal(l,
-!0),k=f.getTerminal(l,!1);f.setTerminal(l,k,!0);f.setTerminal(l,g,!1);var m=f.getGeometry(l);if(null!=m){m=m.clone();null!=m.points&&m.points.reverse();var q=m.getTerminalPoint(!0),n=m.getTerminalPoint(!1);m.setTerminalPoint(q,!1);m.setTerminalPoint(n,!0);f.setGeometry(l,m);var F=this.view.getState(l),v=this.view.getState(g),ca=this.view.getState(k);if(null!=F){var p=null!=v?this.getConnectionConstraint(F,v,!0):null,u=null!=ca?this.getConnectionConstraint(F,ca,!1):null;this.setConnectionConstraint(l,
-g,!0,u);this.setConnectionConstraint(l,k,!1,p);var D=mxUtils.getValue(F.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(F.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[l]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,D,[l])}c.push(l)}}else if(f.isVertex(l)&&(m=this.getCellGeometry(l),null!=m)){if(!(this.isTable(l)||this.isTableRow(l)||this.isTableCell(l)||this.isSwimlane(l))){m=m.clone();m.x+=m.width/
-2-m.height/2;m.y+=m.height/2-m.width/2;var A=m.width;m.width=m.height;m.height=A;f.setGeometry(l,m)}var x=this.view.getState(l);if(null!=x){var O=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],I=mxUtils.getValue(x.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,O[mxUtils.mod(mxUtils.indexOf(O,I)+(d?-1:1),O.length)],[l])}c.push(l)}}}finally{f.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=
+!0),k=f.getTerminal(l,!1);f.setTerminal(l,k,!0);f.setTerminal(l,g,!1);var m=f.getGeometry(l);if(null!=m){m=m.clone();null!=m.points&&m.points.reverse();var q=m.getTerminalPoint(!0),n=m.getTerminalPoint(!1);m.setTerminalPoint(q,!1);m.setTerminalPoint(n,!0);f.setGeometry(l,m);var G=this.view.getState(l),v=this.view.getState(g),ca=this.view.getState(k);if(null!=G){var p=null!=v?this.getConnectionConstraint(G,v,!0):null,u=null!=ca?this.getConnectionConstraint(G,ca,!1):null;this.setConnectionConstraint(l,
+g,!0,u);this.setConnectionConstraint(l,k,!1,p);var D=mxUtils.getValue(G.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(G.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[l]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,D,[l])}c.push(l)}}else if(f.isVertex(l)&&(m=this.getCellGeometry(l),null!=m)){if(!(this.isTable(l)||this.isTableRow(l)||this.isTableCell(l)||this.isSwimlane(l))){m=m.clone();m.x+=m.width/
+2-m.height/2;m.y+=m.height/2-m.width/2;var A=m.width;m.width=m.height;m.height=A;f.setGeometry(l,m)}var x=this.view.getState(l);if(null!=x){var O=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],t=mxUtils.getValue(x.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,O[mxUtils.mod(mxUtils.indexOf(O,t)+(d?-1:1),O.length)],[l])}c.push(l)}}}finally{f.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=
function(b){if(null!=b&&null!=b.fgNode)for(b=b.fgNode.firstChild;null!=b;){if("text"==b.nodeName&&"1"==b.getAttribute("placeholders"))return!0;b=b.nextSibling}return!1};var n=Graph.prototype.processChange;Graph.prototype.processChange=function(b){if(b instanceof mxGeometryChange&&(this.isTableCell(b.cell)||this.isTableRow(b.cell))&&(null==b.previous&&null!=b.geometry||null!=b.previous&&!b.previous.equals(b.geometry))){var d=b.cell;this.isTableCell(d)&&(d=this.model.getParent(d));this.isTableRow(d)&&
(d=this.model.getParent(d));var f=this.view.getState(d);null!=f&&null!=f.shape&&(this.view.invalidate(d),f.shape.bounds=null)}n.apply(this,arguments);b instanceof mxValueChange&&null!=b.cell&&null!=b.cell.value&&"object"==typeof b.cell.value&&this.invalidateDescendantsWithPlaceholders(b.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(b){b=this.model.getDescendants(b);if(0<b.length)for(var d=0;d<b.length;d++){var f=this.view.getState(b[d]);null!=f&&null!=f.shape&&null!=f.shape.stencil&&
this.stencilHasPlaceholders(f.shape.stencil)?this.removeStateForCell(b[d]):this.isReplacePlaceholders(b[d])&&this.view.invalidate(b[d],!1,!1)}};Graph.prototype.replaceElement=function(b,d){for(var f=b.ownerDocument.createElement(null!=d?d:"span"),c=Array.prototype.slice.call(b.attributes);attr=c.pop();)f.setAttribute(attr.nodeName,attr.nodeValue);f.innerHTML=b.innerHTML;b.parentNode.replaceChild(f,b)};Graph.prototype.processElements=function(b,d){if(null!=b)for(var f=b.getElementsByTagName("*"),c=
@@ -2553,19 +2556,19 @@ f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null!=f?this.clear():(null!=g.t
g.container.scrollLeft)<l&&Math.abs(this.scrollTop-g.container.scrollTop)<l&&(null==c.sourceState||!c.isSource(c.sourceState.control))&&((mxEvent.isLeftMouseButton(k)||mxEvent.isMiddleMouseButton(k))&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))&&(null!=this.currentLink?(e=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&e||null==d||d(k,this.currentLink),mxEvent.isConsumed(k)||(k=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(k)?"_blank":
e?g.linkTarget:"_top",g.openLink(this.currentLink,k),c.consume())):null!=f&&!c.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<l&&Math.abs(this.scrollTop-g.container.scrollTop)<l&&Math.abs(this.startX-c.getGraphX())<l&&Math.abs(this.startY-c.getGraphY())<l&&f(c.getEvent()));this.clear()},activate:function(b){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(b.cell));null!=this.currentLink&&(this.currentTarget=g.getLinkTargetForCell(b.cell),g.container.style.cursor="pointer",null!=
this.highlight&&this.highlight.highlight(b))},clear:function(){null!=g.container&&(g.container.style.cursor=e);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(b){};g.addMouseListener(k);mxEvent.addListener(document,"mouseleave",function(b){k.clear()})};Graph.prototype.duplicateCells=function(b,d){b=null!=b?b:this.getSelectionCells();d=null!=d?d:!0;for(var f=0;f<b.length;f++)this.isTableCell(b[f])&&
-(b[f]=this.model.getParent(b[f]));b=this.model.getTopmostCells(b);var c=this.getModel(),e=this.gridSize,l=[];c.beginUpdate();try{for(var g={},k=this.createCellLookup(b),m=this.cloneCells(b,!1,g,!0),f=0;f<b.length;f++){var q=c.getParent(b[f]);if(null!=q){var n=this.moveCells([m[f]],e,e,!1)[0];l.push(n);if(d)c.add(q,m[f]);else{var F=q.getIndex(b[f]);c.add(q,m[f],F+1)}if(this.isTable(q)){var v=this.getCellGeometry(m[f]),p=this.getCellGeometry(q);null!=v&&null!=p&&(p=p.clone(),p.height+=v.height,c.setGeometry(q,
+(b[f]=this.model.getParent(b[f]));b=this.model.getTopmostCells(b);var c=this.getModel(),e=this.gridSize,l=[];c.beginUpdate();try{for(var g={},k=this.createCellLookup(b),m=this.cloneCells(b,!1,g,!0),f=0;f<b.length;f++){var q=c.getParent(b[f]);if(null!=q){var n=this.moveCells([m[f]],e,e,!1)[0];l.push(n);if(d)c.add(q,m[f]);else{var G=q.getIndex(b[f]);c.add(q,m[f],G+1)}if(this.isTable(q)){var v=this.getCellGeometry(m[f]),p=this.getCellGeometry(q);null!=v&&null!=p&&(p=p.clone(),p.height+=v.height,c.setGeometry(q,
p))}}else l.push(m[f])}this.updateCustomLinks(this.createCellMapping(g,k),m,this)}finally{c.endUpdate()}return l};Graph.prototype.insertImage=function(b,d,f){if(null!=b&&null!=this.cellEditor.textarea){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),e=[],l=0;l<c.length;l++)e.push(c[l]);document.execCommand("insertimage",!1,b);b=this.cellEditor.textarea.getElementsByTagName("img");if(b.length==e.length+1)for(l=b.length-1;0<=l;l--)if(0==l||b[l]!=e[l-1]){b[l].setAttribute("width",d);b[l].setAttribute("height",
f);break}}};Graph.prototype.insertLink=function(b){if(null!=this.cellEditor.textarea)if(0==b.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var d=this.cellEditor.textarea.getElementsByTagName("a"),f=[],c=0;c<d.length;c++)f.push(d[c]);document.execCommand("createlink",!1,mxUtils.trim(b));d=this.cellEditor.textarea.getElementsByTagName("a");if(d.length==f.length+1)for(c=d.length-1;0<=c;c--)if(d[c]!=f[c-1]){for(d=d[c].getElementsByTagName("a");0<d.length;){for(f=d[0].parentNode;null!=
d[0].firstChild;)f.insertBefore(d[0].firstChild,d[0]);f.removeChild(d[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(b))};Graph.prototype.isCellResizable=function(b){var d=mxGraph.prototype.isCellResizable.apply(this,arguments),f=this.getCurrentCellStyle(b);return!this.isTableCell(b)&&!this.isTableRow(b)&&(d||"0"!=mxUtils.getValue(f,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==f[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(b,d){null==d&&(d=this.getSelectionCells());
if(null!=d&&1<d.length){for(var f=[],c=null,e=null,l=0;l<d.length;l++)if(this.getModel().isVertex(d[l])){var g=this.view.getState(d[l]);if(null!=g){var k=b?g.getCenterX():g.getCenterY(),c=null!=c?Math.max(c,k):k,e=null!=e?Math.min(e,k):k;f.push(g)}}if(2<f.length){f.sort(function(d,f){return b?d.x-f.x:d.y-f.y});g=this.view.translate;k=this.view.scale;e=e/k-(b?g.x:g.y);c=c/k-(b?g.x:g.y);this.getModel().beginUpdate();try{for(var m=(c-e)/(f.length-1),c=e,l=1;l<f.length-1;l++){var q=this.view.getState(this.model.getParent(f[l].cell)),
n=this.getCellGeometry(f[l].cell),c=c+m;null!=n&&null!=q&&(n=n.clone(),b?n.x=Math.round(c-n.width/2)-q.origin.x:n.y=Math.round(c-n.height/2)-q.origin.y,this.getModel().setGeometry(f[l].cell,n))}}finally{this.getModel().endUpdate()}}}return d};Graph.prototype.isCloneEvent=function(b){return mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)};Graph.prototype.createSvgImageExport=function(){var b=new mxImageExport;b.getLinkForCellState=mxUtils.bind(this,function(b,d){return this.getLinkForCell(b.cell)});
-return b};Graph.prototype.parseBackgroundImage=function(b){var d=null;null!=b&&0<b.length&&(b=JSON.parse(b),d=new mxImage(b.src,b.width,b.height));return d};Graph.prototype.getBackgroundImageObject=function(b){return b};Graph.prototype.getSvg=function(b,d,f,c,e,l,g,k,m,q,n,F,v,p){var u=null;if(null!=p)for(u=new mxDictionary,n=0;n<p.length;n++)u.put(p[n],!0);if(p=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{d=null!=d?d:1;f=null!=f?f:0;e=null!=e?e:!0;
+return b};Graph.prototype.parseBackgroundImage=function(b){var d=null;null!=b&&0<b.length&&(b=JSON.parse(b),d=new mxImage(b.src,b.width,b.height));return d};Graph.prototype.getBackgroundImageObject=function(b){return b};Graph.prototype.getSvg=function(b,d,f,c,e,l,g,k,m,q,n,G,v,p){var u=null;if(null!=p)for(u=new mxDictionary,n=0;n<p.length;n++)u.put(p[n],!0);if(p=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{d=null!=d?d:1;f=null!=f?f:0;e=null!=e?e:!0;
l=null!=l?l:!0;g=null!=g?g:!0;var D="page"==v?this.view.getBackgroundPageBounds():l&&null==u||c||"diagram"==v?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),A=this.view.scale;"diagram"==v&&null!=this.backgroundImage&&D.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*A,(this.view.translate.y+this.backgroundImage.y)*A,this.backgroundImage.width*A,this.backgroundImage.height*A));if(null==D)throw Error(mxResources.get("drawingEmpty"));var x=mxUtils.createXmlDocument(),
-I=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"svg"):x.createElement("svg");null!=b&&(null!=I.style?I.style.backgroundColor=b:I.setAttribute("style","background-color:"+b));null==x.createElementNS?(I.setAttribute("xmlns",mxConstants.NS_SVG),I.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):I.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);b=d/A;var t=Math.max(1,Math.ceil(D.width*b)+2*f)+(q?5:0),ca=Math.max(1,Math.ceil(D.height*b)+2*f)+(q?5:0);
-I.setAttribute("version","1.1");I.setAttribute("width",t+"px");I.setAttribute("height",ca+"px");I.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+t+" "+ca);x.appendChild(I);var C=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"g"):x.createElement("g");I.appendChild(C);var y=this.createSvgCanvas(C);y.foOffset=e?-.5:0;y.textOffset=e?-.5:0;y.imageOffset=e?-.5:0;y.translate(Math.floor(f/d-D.x/A),Math.floor(f/d-D.y/A));var da=document.createElement("div"),B=y.getAlternateText;y.getAlternateText=
-function(b,d,f,c,e,l,g,k,m,q,n,z,Ia){if(null!=l&&0<this.state.fontSize)try{mxUtils.isNode(l)?l=l.innerText:(da.innerHTML=l,l=mxUtils.extractTextWithWhitespace(da.childNodes));for(var Wa=Math.ceil(2*c/this.state.fontSize),qa=[],Sa=0,F=0;(0==Wa||Sa<Wa)&&F<l.length;){var Ta=l.charCodeAt(F);if(10==Ta||13==Ta){if(0<Sa)break}else qa.push(l.charAt(F)),255>Ta&&Sa++;F++}qa.length<l.length&&1<l.length-qa.length&&(l=mxUtils.trim(qa.join(""))+"...");return l}catch(gb){return B.apply(this,arguments)}else return B.apply(this,
-arguments)};var O=this.backgroundImage;if(null!=O){d=A/d;var N=this.view.translate,S=new mxRectangle((O.x+N.x)*d,(O.y+N.y)*d,O.width*d,O.height*d);mxUtils.intersects(D,S)&&y.image(O.x+N.x,O.y+N.y,O.width,O.height,O.src,!0)}y.scale(b);y.textEnabled=g;k=null!=k?k:this.createSvgImageExport();var Z=k.drawCellState,E=k.getLinkForCellState;k.getLinkForCellState=function(b,d){var f=E.apply(this,arguments);return null==f||b.view.graph.isCustomLink(f)?null:f};k.getLinkTargetForCellState=function(b,d){return b.view.graph.getLinkTargetForCell(b.cell)};
-k.drawCellState=function(b,d){for(var f=b.view.graph,c=null!=u?u.get(b.cell):f.isCellSelected(b.cell),e=f.model.getParent(b.cell);!(l&&null==u||c)&&null!=e;)c=null!=u?u.get(e):f.isCellSelected(e),e=f.model.getParent(e);(l&&null==u||c)&&Z.apply(this,arguments)};k.drawState(this.getView().getState(this.model.root),y);this.updateSvgLinks(I,m,!0);this.addForeignObjectWarning(y,I);return I}finally{p&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=
+t=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"svg"):x.createElement("svg");null!=b&&(null!=t.style?t.style.backgroundColor=b:t.setAttribute("style","background-color:"+b));null==x.createElementNS?(t.setAttribute("xmlns",mxConstants.NS_SVG),t.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):t.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);b=d/A;var K=Math.max(1,Math.ceil(D.width*b)+2*f)+(q?5:0),ca=Math.max(1,Math.ceil(D.height*b)+2*f)+(q?5:0);
+t.setAttribute("version","1.1");t.setAttribute("width",K+"px");t.setAttribute("height",ca+"px");t.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+K+" "+ca);x.appendChild(t);var C=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"g"):x.createElement("g");t.appendChild(C);var y=this.createSvgCanvas(C);y.foOffset=e?-.5:0;y.textOffset=e?-.5:0;y.imageOffset=e?-.5:0;y.translate(Math.floor(f/d-D.x/A),Math.floor(f/d-D.y/A));var da=document.createElement("div"),B=y.getAlternateText;y.getAlternateText=
+function(b,d,f,c,e,l,g,k,m,q,n,z,oa){if(null!=l&&0<this.state.fontSize)try{mxUtils.isNode(l)?l=l.innerText:(da.innerHTML=l,l=mxUtils.extractTextWithWhitespace(da.childNodes));for(var Wa=Math.ceil(2*c/this.state.fontSize),pa=[],Sa=0,G=0;(0==Wa||Sa<Wa)&&G<l.length;){var Ta=l.charCodeAt(G);if(10==Ta||13==Ta){if(0<Sa)break}else pa.push(l.charAt(G)),255>Ta&&Sa++;G++}pa.length<l.length&&1<l.length-pa.length&&(l=mxUtils.trim(pa.join(""))+"...");return l}catch(gb){return B.apply(this,arguments)}else return B.apply(this,
+arguments)};var O=this.backgroundImage;if(null!=O){d=A/d;var N=this.view.translate,S=new mxRectangle((O.x+N.x)*d,(O.y+N.y)*d,O.width*d,O.height*d);mxUtils.intersects(D,S)&&y.image(O.x+N.x,O.y+N.y,O.width,O.height,O.src,!0)}y.scale(b);y.textEnabled=g;k=null!=k?k:this.createSvgImageExport();var aa=k.drawCellState,F=k.getLinkForCellState;k.getLinkForCellState=function(b,d){var f=F.apply(this,arguments);return null==f||b.view.graph.isCustomLink(f)?null:f};k.getLinkTargetForCellState=function(b,d){return b.view.graph.getLinkTargetForCell(b.cell)};
+k.drawCellState=function(b,d){for(var f=b.view.graph,c=null!=u?u.get(b.cell):f.isCellSelected(b.cell),e=f.model.getParent(b.cell);!(l&&null==u||c)&&null!=e;)c=null!=u?u.get(e):f.isCellSelected(e),e=f.model.getParent(e);(l&&null==u||c)&&aa.apply(this,arguments)};k.drawState(this.getView().getState(this.model.root),y);this.updateSvgLinks(t,m,!0);this.addForeignObjectWarning(y,t);return t}finally{p&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=
function(b,d){if("0"!=urlParams["svg-warning"]&&0<d.getElementsByTagName("foreignObject").length){var f=b.createElement("switch"),c=b.createElement("g");c.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var e=b.createElement("a");e.setAttribute("transform","translate(0,-5)");null==e.setAttributeNS||d.ownerDocument!=document&&null==document.documentMode?(e.setAttribute("xlink:href",Graph.foreignObjectWarningLink),e.setAttribute("target","_blank")):(e.setAttributeNS(mxConstants.NS_XLINK,
"xlink:href",Graph.foreignObjectWarningLink),e.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var l=b.createElement("text");l.setAttribute("text-anchor","middle");l.setAttribute("font-size","10px");l.setAttribute("x","50%");l.setAttribute("y","100%");mxUtils.write(l,Graph.foreignObjectWarningText);f.appendChild(c);e.appendChild(l);f.appendChild(e);d.appendChild(f)}};Graph.prototype.updateSvgLinks=function(b,d,f){b=b.getElementsByTagName("a");for(var c=0;c<b.length;c++)if(null==b[c].getAttribute("target")){var e=
b[c].getAttribute("href");null==e&&(e=b[c].getAttribute("xlink:href"));null!=e&&(null!=d&&/^https?:\/\//.test(e)?b[c].setAttribute("target",d):f&&this.isCustomLink(e)&&b[c].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(b){b=new mxSvgCanvas2D(b);b.pointerEvents=!0;return b};Graph.prototype.getSelectedElement=function(){var b=null;if(window.getSelection){var d=window.getSelection();d.getRangeAt&&d.rangeCount&&(b=d.getRangeAt(0).commonAncestorContainer)}else document.selection&&
@@ -2573,7 +2576,7 @@ b[c].getAttribute("href");null==e&&(e=b[c].getAttribute("xlink:href"));null!=e&&
d;){if(b==f)return null;b=b.parentNode}return b};Graph.prototype.getParentByNames=function(b,d,f){for(;null!=b&&!(0<=mxUtils.indexOf(d,b.nodeName));){if(b==f)return null;b=b.parentNode}return b};Graph.prototype.selectNode=function(b){var d=null;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){var f=document.createRange();f.selectNode(b);d.removeAllRanges();d.addRange(f)}}else(d=document.selection)&&"Control"!=d.type&&(b=d.createRange(),b.collapse(!0),f=d.createRange(),
f.setEndPoint("StartToStart",b),f.select())};Graph.prototype.deleteCells=function(b,d){var f=null;if(null!=b&&0<b.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){var e=this.model.getParent(b[c]);if(this.isTable(e)){var l=this.getCellGeometry(b[c]),g=this.getCellGeometry(e);null!=l&&null!=g&&(g=g.clone(),g.height-=l.height,this.model.setGeometry(e,g))}}var k=this.selectParentAfterDelete?this.model.getParents(b):null;this.removeCells(b,d)}finally{this.model.endUpdate()}if(null!=k)for(f=
[],c=0;c<k.length;c++)this.model.contains(k[c])&&(this.model.isVertex(k[c])||this.model.isEdge(k[c]))&&f.push(k[c])}return f};Graph.prototype.insertTableColumn=function(b,d){var f=this.getModel();f.beginUpdate();try{var c=b,e=0;if(this.isTableCell(b))var l=f.getParent(b),c=f.getParent(l),e=mxUtils.indexOf(f.getChildCells(l,!0),b);else this.isTableRow(b)?c=f.getParent(b):b=f.getChildCells(c,!0)[0],d||(e=f.getChildCells(b,!0).length-1);for(var g=f.getChildCells(c,!0),k=Graph.minTableColumnWidth,l=0;l<
-g.length;l++){var m=f.getChildCells(g[l],!0)[e],q=f.cloneCell(m,!1),n=this.getCellGeometry(q);q.value=null;if(null!=n){var k=n.width,F=this.getCellGeometry(g[l]);null!=F&&(n.height=F.height)}f.add(g[l],q,e+(d?0:1))}var v=this.getCellGeometry(c);null!=v&&(v=v.clone(),v.width+=k,f.setGeometry(c,v))}finally{f.endUpdate()}};Graph.prototype.insertTableRow=function(b,d){var f=this.getModel();f.beginUpdate();try{var c=b,e=b;if(this.isTableCell(b))e=f.getParent(b),c=f.getParent(e);else if(this.isTableRow(b))c=
+g.length;l++){var m=f.getChildCells(g[l],!0)[e],q=f.cloneCell(m,!1),n=this.getCellGeometry(q);q.value=null;if(null!=n){var k=n.width,G=this.getCellGeometry(g[l]);null!=G&&(n.height=G.height)}f.add(g[l],q,e+(d?0:1))}var v=this.getCellGeometry(c);null!=v&&(v=v.clone(),v.width+=k,f.setGeometry(c,v))}finally{f.endUpdate()}};Graph.prototype.insertTableRow=function(b,d){var f=this.getModel();f.beginUpdate();try{var c=b,e=b;if(this.isTableCell(b))e=f.getParent(b),c=f.getParent(e);else if(this.isTableRow(b))c=
f.getParent(b);else var l=f.getChildCells(c,!0),e=l[d?0:l.length-1];var g=f.getChildCells(e,!0),k=c.getIndex(e),e=f.cloneCell(e,!1);e.value=null;var m=this.getCellGeometry(e);if(null!=m){for(l=0;l<g.length;l++){b=f.cloneCell(g[l],!1);e.insert(b);b.value=null;var q=this.getCellGeometry(b);null!=q&&(q.height=m.height)}f.add(c,e,k+(d?0:1));var n=this.getCellGeometry(c);null!=n&&(n=n.clone(),n.height+=m.height,f.setGeometry(c,n))}}finally{f.endUpdate()}};Graph.prototype.deleteTableColumn=function(b){var d=
this.getModel();d.beginUpdate();try{var f=b,c=b;this.isTableCell(b)&&(c=d.getParent(b));this.isTableRow(c)&&(f=d.getParent(c));var e=d.getChildCells(f,!0);if(0==e.length)d.remove(f);else{this.isTableRow(c)||(c=e[0]);var l=d.getChildCells(c,!0);if(1>=l.length)d.remove(f);else{var g=l.length-1;this.isTableCell(b)&&(g=mxUtils.indexOf(l,b));for(c=b=0;c<e.length;c++){var k=d.getChildCells(e[c],!0)[g];d.remove(k);var m=this.getCellGeometry(k);null!=m&&(b=Math.max(b,m.width))}var q=this.getCellGeometry(f);
null!=q&&(q=q.clone(),q.width-=b,d.setGeometry(f,q))}}}finally{d.endUpdate()}};Graph.prototype.deleteTableRow=function(b){var d=this.getModel();d.beginUpdate();try{var f=b,c=b;this.isTableCell(b)&&(b=c=d.getParent(b));this.isTableRow(b)&&(f=d.getParent(c));var e=d.getChildCells(f,!0);if(1>=e.length)d.remove(f);else{this.isTableRow(c)||(c=e[e.length-1]);d.remove(c);b=0;var l=this.getCellGeometry(c);null!=l&&(b=l.height);var g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.height-=b,d.setGeometry(f,
@@ -2589,8 +2592,8 @@ this.textarea.ownerDocument.defaultView.getSelection(),f=d.getRangeAt(0),c="\t";
function(b){f||window.getSelection().containsNode(b,!0)?(b.removeAttribute("align"),b.style.textAlign=null):c=!1});c&&this.graph.cellEditor.setAlign(b)}document.execCommand("justify"+b.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var b=window.getSelection();if(b.getRangeAt&&b.rangeCount){for(var d=[],f=0,c=b.rangeCount;f<c;++f)d.push(b.getRangeAt(f));return d}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();
return null};mxCellEditor.prototype.restoreSelection=function(b){try{if(b)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var d=0,f=b.length;d<f;++d)sel.addRange(b[d])}else document.selection&&b.select&&b.select()}catch(ba){}};var v=mxCellRenderer.prototype.postConfigureShape;mxCellRenderer.prototype.postConfigureShape=function(b){var d=Editor.isDarkMode()?"#ffffff":"#000000",f=b.view.graph.defaultPageBackgroundColor;this.resolveDefaultColor(b,"fill",b.shape,f);this.resolveDefaultColor(b,
"stroke",b.shape,d);this.resolveDefaultColor(b,"laneFill",b.shape,f);this.resolveDefaultColor(b,"imageBackground",b.shape,f);this.resolveDefaultColor(b,"imageBorder",b.shape,d);this.resolveDefaultColor(b,"background",b.text,f);this.resolveDefaultColor(b,"color",b.text,d);v.apply(this,arguments)};mxCellRenderer.prototype.resolveDefaultColor=function(b,d,f,c){null!=f&&"default"==f[d]&&(f[d]=c)};var y=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(b){null!=
-b.text&&(b.text.replaceLinefeeds="0"!=mxUtils.getValue(b.style,"nl2Br","1"));y.apply(this,arguments)};var x=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(b,d){this.isKeepFocusEvent(b)||!mxEvent.isAltDown(b.getEvent())?x.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(b){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var G=mxCellEditor.prototype.startEditing;
-mxCellEditor.prototype.startEditing=function(b,d){b=this.graph.getStartEditingCell(b,d);G.apply(this,arguments);var f=this.graph.view.getState(b);this.textarea.className=null!=f&&1==f.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(b);var f=this.graph.getModel().getParent(b),c=this.graph.getCellGeometry(b);if(this.graph.getModel().isEdge(f)&&null!=c&&c.relative||this.graph.getModel().isEdge(b))this.textarea.style.outline=
+b.text&&(b.text.replaceLinefeeds="0"!=mxUtils.getValue(b.style,"nl2Br","1"));y.apply(this,arguments)};var x=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(b,d){this.isKeepFocusEvent(b)||!mxEvent.isAltDown(b.getEvent())?x.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(b){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var E=mxCellEditor.prototype.startEditing;
+mxCellEditor.prototype.startEditing=function(b,d){b=this.graph.getStartEditingCell(b,d);E.apply(this,arguments);var f=this.graph.view.getState(b);this.textarea.className=null!=f&&1==f.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(b);var f=this.graph.getModel().getParent(b),c=this.graph.getCellGeometry(b);if(this.graph.getModel().isEdge(f)&&null!=c&&c.relative||this.graph.getModel().isEdge(b))this.textarea.style.outline=
mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var C=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(b){function d(b,f){f.originalNode=b;b=b.firstChild;for(var c=f.firstChild;null!=b&&null!=c;)d(b,c),b=b.nextSibling,c=c.nextSibling;return f}function f(b,d){if(null!=b)if(d.originalNode!=b)c(b);else for(b=b.firstChild,d=d.firstChild;null!=b;){var e=b.nextSibling;null==d?c(b):(f(b,d),d=d.nextSibling);b=e}}function c(b){for(var d=
b.firstChild;null!=d;){var f=d.nextSibling;c(d);d=f}1==b.nodeType&&("BR"===b.nodeName||null!=b.firstChild)||3==b.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(b)).length?(3==b.nodeType&&mxUtils.setTextContent(b,mxUtils.getTextContent(b).replace(/\n|\r/g,"")),1==b.nodeType&&(b.removeAttribute("style"),b.removeAttribute("class"),b.removeAttribute("width"),b.removeAttribute("cellpadding"),b.removeAttribute("cellspacing"),b.removeAttribute("border"))):b.parentNode.removeChild(b)}C.apply(this,arguments);
7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(b){var c=d(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?f(this.textarea,c):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var b=this.graph.view.getState(this.editingCell);
@@ -2599,334 +2602,334 @@ mxConstants.DEFAULT_FONTFAMILY),e=mxUtils.getValue(b.style,mxConstants.STYLE_ALI
0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&k.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"px";this.textarea.style.textDecoration=k.join(" ");this.textarea.style.fontWeight=l?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=d;this.textarea.style.textAlign=e;this.textarea.style.padding=
"0px";this.textarea.innerHTML!=m&&(this.textarea.innerHTML=m,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var m=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(m=mxUtils.replaceTrailingNewlines(m,"<div><br></div>"));m=this.graph.sanitizeHtml(d?
m.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):m,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var c=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;
-this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=m&&(this.textarea.innerHTML=m);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=f;this.resize()}};var E=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(b,d){if(null!=this.textarea)if(b=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=
+this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=m&&(this.textarea.innerHTML=m);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=f;this.resize()}};var F=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(b,d){if(null!=this.textarea)if(b=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=
b){var f=b.view.scale;this.bounds=mxRectangle.fromRectangle(b);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*f;this.bounds.height=60*f;var c=null!=b.text?b.text.margin:null;null==c&&(c=mxUtils.getAlignmentAsPoint(mxUtils.getValue(b.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=c.x*this.bounds.width;this.bounds.y+=c.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-
4)/f)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/f)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/f)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*f);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/f)+(this.textarea.offsetWidth-this.textarea.clientWidth)+
-"px",this.bounds.width=parseInt(this.textarea.style.width)*f);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+f+","+f+")")}else this.textarea.style.height="",this.textarea.style.overflow="",E.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(b,d){if("0"==mxUtils.getValue(b.style,"html",
+"px",this.bounds.width=parseInt(this.textarea.style.width)*f);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+f+","+f+")")}else this.textarea.style.height="",this.textarea.style.overflow="",F.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(b,d){if("0"==mxUtils.getValue(b.style,"html",
"0"))return mxCellEditorGetInitialValue.apply(this,arguments);var f=this.graph.getEditingValue(b.cell,d);"1"==mxUtils.getValue(b.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>"));return f=this.graph.sanitizeHtml(f,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(b){if("0"==mxUtils.getValue(b.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var d=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return d=
-"1"==mxUtils.getValue(b.style,"nl2Br","1")?d.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):d.replace(/\r\n/g,"").replace(/\n/g,"")};var J=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(b){this.codeViewMode&&this.toggleViewMode();J.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(ca){}};var L=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(b,d){this.graph.getModel().beginUpdate();
+"1"==mxUtils.getValue(b.style,"nl2Br","1")?d.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):d.replace(/\r\n/g,"").replace(/\n/g,"")};var I=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(b){this.codeViewMode&&this.toggleViewMode();I.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(ca){}};var L=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(b,d){this.graph.getModel().beginUpdate();
try{L.apply(this,arguments),""==d&&this.graph.isCellDeletable(b.cell)&&0==this.graph.model.getChildCount(b.cell)&&this.graph.isTransparentState(b)&&this.graph.removeCells([b.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(b){var d=mxUtils.getValue(b.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=d&&d!=mxConstants.NONE||!(null!=b.cell.geometry&&0<b.cell.geometry.width)||0==mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0)&&0!=
mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,1)||(d=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,null));d==mxConstants.NONE&&(d=null);return d};mxCellEditor.prototype.getMinimumSize=function(b){var d=this.graph.getView().scale;return new mxRectangle(0,0,null==b.text?30:b.text.size*d+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(b,d){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&
!mxEvent.isAltDown(d.getEvent)};mxGraphView.prototype.formatUnitText=function(b){return b?c(b,this.unit):b};mxGraphHandler.prototype.updateHint=function(d){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var f=this.graph.view.translate,e=this.graph.view.scale;d=this.roundLength((this.bounds.x+this.currentDx)/e-f.x);f=this.roundLength((this.bounds.y+this.currentDy)/e-f.y);e=this.graph.view.unit;this.hint.innerHTML=
c(d,e)+", "+c(f,e);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var H=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(b,d){H.apply(this,arguments);var f=this.graph.getCellStyle(b);if(null==
-f.childLayout){var c=this.graph.model.getParent(b),e=null!=c?this.graph.getCellGeometry(c):null;if(null!=e&&(f=this.graph.getCellStyle(c),"stackLayout"==f.childLayout)){var l=parseFloat(mxUtils.getValue(f,"stackBorder",mxStackLayout.prototype.border)),f="1"==mxUtils.getValue(f,"horizontalStack","1"),g=this.graph.getActualStartSize(c),e=e.clone();f?e.height=d.height+g.y+g.height+2*l:e.width=d.width+g.x+g.width+2*l;this.graph.model.setGeometry(c,e)}}};var K=mxSelectionCellsHandler.prototype.getHandledSelectionCells;
-mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function b(b){f.get(b)||(f.put(b,!0),e.push(b))}for(var d=K.apply(this,arguments),f=new mxDictionary,c=this.graph.model,e=[],l=0;l<d.length;l++){var g=d[l];this.graph.isTableCell(g)?b(c.getParent(c.getParent(g))):this.graph.isTableRow(g)&&b(c.getParent(g));b(g)}return e};var B=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(b){var d=B.apply(this,arguments);d.stroke=
+f.childLayout){var c=this.graph.model.getParent(b),e=null!=c?this.graph.getCellGeometry(c):null;if(null!=e&&(f=this.graph.getCellStyle(c),"stackLayout"==f.childLayout)){var l=parseFloat(mxUtils.getValue(f,"stackBorder",mxStackLayout.prototype.border)),f="1"==mxUtils.getValue(f,"horizontalStack","1"),g=this.graph.getActualStartSize(c),e=e.clone();f?e.height=d.height+g.y+g.height+2*l:e.width=d.width+g.x+g.width+2*l;this.graph.model.setGeometry(c,e)}}};var J=mxSelectionCellsHandler.prototype.getHandledSelectionCells;
+mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function b(b){f.get(b)||(f.put(b,!0),e.push(b))}for(var d=J.apply(this,arguments),f=new mxDictionary,c=this.graph.model,e=[],l=0;l<d.length;l++){var g=d[l];this.graph.isTableCell(g)?b(c.getParent(c.getParent(g))):this.graph.isTableRow(g)&&b(c.getParent(g));b(g)}return e};var B=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(b){var d=B.apply(this,arguments);d.stroke=
"#C0C0C0";d.strokewidth=1;return d};var M=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(b){var d=M.apply(this,arguments);d.stroke="#C0C0C0";d.strokewidth=1;return d};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var b=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+b.x/2,this.bounds.y+this.rotationHandleVSpacing-
b.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(b,d){return this.graph.isRecursiveVertexResize(b)&&!mxEvent.isControlDown(d.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(b,d){return!(!this.graph.isSwimlane(b.cell)&&0<this.graph.model.getChildCount(b.cell)&&!this.graph.isCellCollapsed(b.cell)&&"1"==mxUtils.getValue(b.style,"recursiveResize","1")&&null==mxUtils.getValue(b.style,"childLayout",null))&&mxEvent.isControlDown(d.getEvent())||mxEvent.isMetaDown(d.getEvent())};
var P=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return P.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var T=mxVertexHandler.prototype.isParentHighlightVisible;
mxVertexHandler.prototype.isParentHighlightVisible=function(){return T.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var N=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(b){return b.tableHandle||N.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var b=0;this.graph.isTableRow(this.state.cell)?
-b=1:this.graph.isTableCell(this.state.cell)&&(b=2);return b};var R=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return R.apply(this,arguments).grow(-this.getSelectionBorderInset())};var F=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=F.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var d=this.graph,f=d.model,c=this.state,e=this.selectionBorder,l=this;null==
-b&&(b=[]);var g=d.view.getCellStates(f.getChildCells(this.state.cell,!0));if(0<g.length){for(var k=d.view.getCellStates(f.getChildCells(g[0].cell,!0)),f=0;f<k.length;f++)mxUtils.bind(this,function(f){var g=k[f],m=f<k.length-1?k[f+1]:null,q=new mxLine(new mxRectangle,mxConstants.NONE,1,!0);q.isDashed=e.isDashed;q.svgStrokeTolerance++;q=new mxHandle(g,"col-resize",null,q);q.tableHandle=!0;var n=0;q.shape.node.parentNode.insertBefore(q.shape.node,q.shape.node.parentNode.firstChild);q.redraw=function(){if(null!=
-this.shape&&null!=this.state.shape){var b=d.getActualStartSize(c.cell);this.shape.stroke=0==n?mxConstants.NONE:e.stroke;this.shape.bounds.x=this.state.x+this.state.width+n*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=c.y+(f==k.length-1?0:b.y*this.graph.view.scale);this.shape.bounds.height=c.height-(f==k.length-1?0:(b.height+b.y)*this.graph.view.scale);this.shape.redraw()}};var F=!1;q.setPosition=function(b,f,c){n=Math.max(Graph.minTableColumnWidth-b.width,f.x-b.x-b.width);F=
-mxEvent.isShiftDown(c.getEvent());null==m||F||(n=Math.min((m.x+m.width-g.x-g.width)/d.view.scale-Graph.minTableColumnWidth,n))};q.execute=function(b){if(0!=n)d.setTableColumnWidth(this.state.cell,n,F);else if(!l.blockDelayedSelection){var f=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(f,b)}n=0};q.reset=function(){n=0};b.push(q)})(f);for(f=0;f<g.length;f++)mxUtils.bind(this,function(f){f=g[f];var k=new mxLine(new mxRectangle,mxConstants.NONE,1);k.isDashed=e.isDashed;
-k.svgStrokeTolerance++;f=new mxHandle(f,"row-resize",null,k);f.tableHandle=!0;var m=0;f.shape.node.parentNode.insertBefore(f.shape.node,f.shape.node.parentNode.firstChild);f.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.stroke=0==m?mxConstants.NONE:e.stroke,this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+m*this.graph.view.scale,this.shape.bounds.height=1,this.shape.redraw())};f.setPosition=function(b,
-d,f){m=Math.max(Graph.minTableRowHeight-b.height,d.y-b.y-b.height)};f.execute=function(b){if(0!=m)d.setTableRowHeight(this.state.cell,m,!mxEvent.isShiftDown(b.getEvent()));else if(!l.blockDelayedSelection){var f=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(f,b)}m=0};f.reset=function(){m=0};b.push(f)})(f)}}return null!=b?b.reverse():null};var D=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){D.apply(this,arguments);
-if(null!=this.moveHandles)for(var d=0;d<this.moveHandles.length;d++)this.moveHandles[d].style.visibility=b?"":"hidden";if(null!=this.cornerHandles)for(d=0;d<this.cornerHandles.length;d++)this.cornerHandles[d].node.style.visibility=b?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var b=this.graph.model;if(null!=this.moveHandles){for(var d=0;d<this.moveHandles.length;d++)this.moveHandles[d].parentNode.removeChild(this.moveHandles[d]);this.moveHandles=null}this.moveHandles=[];for(d=
-0;d<b.getChildCount(this.state.cell);d++)mxUtils.bind(this,function(d){if(null!=d&&b.isVertex(d.cell)){var f=mxUtils.createImage(Editor.rowMoveImage);f.style.position="absolute";f.style.cursor="pointer";f.style.width="7px";f.style.height="4px";f.style.padding="4px 2px 4px 2px";f.rowState=d;mxEvent.addGestureListeners(f,mxUtils.bind(this,function(b){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(b)&&this.graph.isCellSelected(d.cell)||this.graph.selectCellForEvent(d.cell,
-b);mxEvent.isPopupTrigger(b)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(b),mxEvent.getClientY(b),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0);mxEvent.consume(b)}),null,mxUtils.bind(this,function(b){mxEvent.isPopupTrigger(b)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(b),mxEvent.getClientY(b),d.cell,b),mxEvent.consume(b))}));this.moveHandles.push(f);this.graph.container.appendChild(f)}})(this.graph.view.getState(b.getChildAt(this.state.cell,
-d)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var b=0;b<this.customHandles.length;b++)this.customHandles[b].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var A=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var b=new mxPoint(0,0),d=this.tolerance,f=this.state.style.shape;null==mxCellRenderer.defaultShapes[f]&&mxStencilRegistry.getStencil(f);
-f=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!f&&null!=this.customHandles)for(var c=0;c<this.customHandles.length;c++)if(null!=this.customHandles[c].shape&&null!=this.customHandles[c].shape.bounds){var e=this.customHandles[c].shape.bounds,l=e.getCenterX(),g=e.getCenterY();if(Math.abs(this.state.x-l)<e.width/2||Math.abs(this.state.y-g)<e.height/2||Math.abs(this.state.x+this.state.width-l)<e.width/2||Math.abs(this.state.y+this.state.height-g)<e.height/
-2){f=!0;break}}f&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(d/=2,this.graph.isTable(this.state.cell)&&(d+=7),b.x=this.sizers[0].bounds.width+d,b.y=this.sizers[0].bounds.height+d):b=A.apply(this,arguments);return b};mxVertexHandler.prototype.updateHint=function(d){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{d=
-this.state.view.scale;var f=this.state.view.unit;this.hint.innerHTML=c(this.roundLength(this.bounds.width/d),f)+" x "+c(this.roundLength(this.bounds.height/d),f)}d=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==d&&(d=this.bounds);this.hint.style.left=d.x+Math.round((d.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=d.y+d.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};
-mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var da=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(b,d){da.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var I=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=
-function(b,d){I.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(d,f){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var e=this.graph.view.translate,l=this.graph.view.scale,g=this.roundLength(f.x/l-e.x),e=this.roundLength(f.y/l-e.y),l=this.graph.view.unit;this.hint.innerHTML=c(g,l)+", "+c(e,l);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=
-this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(g=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*g.x)+"%, "+Math.round(100*g.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(d.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(d.getGraphY(),f.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=
-mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=
-mxClient.IS_SVG?Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22" stroke-width="1"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>'):new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>'):new mxImage(IMAGE_PATH+"/handle-terminal.png",
-17,17);HoverIcons.prototype.rotationHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>',
-24,24):new mxImage(IMAGE_PATH+"/handle-rotate.png",16,16);mxClient.IS_SVG&&(mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="'+HoverIcons.prototype.arrowFill+'"/>'));mxVertexHandler.TABLE_HANDLE_COLOR="#fca000";mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxEdgeHandler.prototype.terminalHandleImage=
-HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,
-Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxClient.IS_SVG||((new Image).src=HoverIcons.prototype.mainHandle.src,(new Image).src=HoverIcons.prototype.fixedHandle.src,(new Image).src=HoverIcons.prototype.terminalHandle.src,(new Image).src=HoverIcons.prototype.secondaryHandle.src,(new Image).src=HoverIcons.prototype.rotationHandle.src,(new Image).src=HoverIcons.prototype.triangleUp.src,(new Image).src=HoverIcons.prototype.triangleRight.src,
-(new Image).src=HoverIcons.prototype.triangleDown.src,(new Image).src=HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=
-!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(b){return!mxEvent.isShiftDown(b.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=
-function(b){return!mxEvent.isShiftDown(b.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(b){return mxEvent.isMouseEvent(b.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=
-function(b){var d=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(d)||mxEvent.isPopupTrigger(d)&&(null==b.getState()||mxEvent.isControlDown(d)||mxEvent.isShiftDown(d))};var S=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(b,d){S.apply(this,arguments);mxEvent.isTouchEvent(d.getEvent())&&this.graph.isCellSelected(d.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(b){var d=
-b.getEvent();return mxEvent.isLeftMouseButton(d)&&(this.useLeftButtonForPanning&&null==b.getState()||mxEvent.isControlDown(d)&&!mxEvent.isShiftDown(d))||this.usePopupTrigger&&mxEvent.isPopupTrigger(d)};mxRubberband.prototype.isSpaceEvent=function(b){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(b.getEvent())&&mxEvent.isShiftDown(b.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&
-(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(b,d){if(this.cancelled)this.cancelled=!1,d.consume();else{var f=null!=this.div&&"none"!=this.div.style.display,c=null,e=null,l=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(c=this.first.x,e=this.first.y,l=(this.currentX-c)/this.graph.view.scale,g=(this.currentY-e)/this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(l=this.graph.snap(l),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(l)<
-this.graph.tolerance&&(l=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(f){if(mxEvent.isAltDown(d.getEvent())&&this.graph.isToggleEvent(d.getEvent())){var l=new mxRectangle(this.x,this.y,this.width,this.height),k=this.graph.getCells(l.x,l.y,l.width,l.height);this.graph.removeSelectionCells(k)}else if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(k=this.graph.getCellsBeyond(c,e,this.graph.getDefaultParent(),!0,!0),f=0;f<k.length;f++)if(this.graph.isCellMovable(k[f])){var m=
-this.graph.view.getState(k[f]),q=this.graph.getCellGeometry(k[f]);null!=m&&null!=q&&(q=q.clone(),q.translate(l,g),this.graph.model.setGeometry(k[f],q))}}finally{this.graph.model.endUpdate()}}else l=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(l,d.getEvent());d.consume()}}};mxRubberband.prototype.mouseMove=function(b,d){if(!d.isConsumed()&&null!=this.first){var f=mxUtils.getScrollOrigin(this.graph.container),c=mxUtils.getOffset(this.graph.container);f.x-=c.x;f.y-=c.y;
-var c=d.getX()+f.x,f=d.getY()+f.y,e=this.first.x-c,l=this.first.y-f,g=this.graph.tolerance;if(null!=this.div||Math.abs(e)>g||Math.abs(l)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(c,f),this.isSpaceEvent(d)?(c=this.x+this.width,f=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=
-0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=c-this.width),this.y<this.first.y&&(this.y=f-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=
-this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),
-this.secondDiv=null)),d.consume()}};var Z=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);Z.apply(this,arguments)};var ma=(new Date).getTime(),ga=0,ia=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(b,d,f,c){ia.apply(this,arguments);f!=this.currentTerminalState?(ma=(new Date).getTime(),ga=0):ga=(new Date).getTime()-ma;this.currentTerminalState=
-f};var la=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(b){return null!=this.currentTerminalState&&b.getState()==this.currentTerminalState&&2E3<ga||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&la.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(b,d){var f=null!=b&&0==b,c=this.state.getVisibleTerminalState(f),e=null!=b&&(0==b||b>=this.state.absolutePoints.length-
-1||this.constructor==mxElbowEdgeHandler&&2==b)?this.graph.getConnectionConstraint(this.state,c,f):null,f=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(f),e):null)?this.fixedHandleImage:null!=e&&null!=c?this.terminalHandleImage:this.handleImage;if(null!=f)return f=new mxImageShape(new mxRectangle(0,0,f.width,f.height),f.src),f.preserveImageAspect=!1,f;f=mxConstants.HANDLE_SIZE;this.preferHtml&&--f;return new mxRectangleShape(new mxRectangle(0,0,f,f),mxConstants.HANDLE_FILLCOLOR,
-mxConstants.HANDLE_STROKECOLOR)};var W=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(b,d,f){this.handleImage=d==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:d==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return W.apply(this,arguments)};var fa=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(b){if(null!=b&&1==b.length){var d=this.graph.getModel(),f=d.getParent(b[0]),c=this.graph.getCellGeometry(b[0]);
-if(d.isEdge(f)&&null!=c&&c.relative&&(d=this.graph.view.getState(b[0]),null!=d&&2>d.width&&2>d.height&&null!=d.text&&null!=d.text.boundingBox))return mxRectangle.fromRectangle(d.text.boundingBox)}return fa.apply(this,arguments)};var na=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var b=na.apply(this,arguments),d=[],f=0;f<b.length;f++)"1"!=mxUtils.getValue(b[f].style,"part","0")&&d.push(b[f]);return d};var V=mxVertexHandler.prototype.getSelectionBounds;
-mxVertexHandler.prototype.getSelectionBounds=function(b){var d=this.graph.getModel(),f=d.getParent(b.cell),c=this.graph.getCellGeometry(b.cell);return d.isEdge(f)&&null!=c&&c.relative&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox?(d=b.text.unrotatedBoundingBox||b.text.boundingBox,new mxRectangle(Math.round(d.x),Math.round(d.y),Math.round(d.width),Math.round(d.height))):V.apply(this,arguments)};var Q=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(b,
-d){var f=this.graph.getModel(),c=f.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(d)==mxEvent.ROTATION_HANDLE||!f.isEdge(c)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Q.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var b=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);
-this.state.view.graph.model.isVertex(this.state.cell)&&b==mxConstants.NONE&&d==mxConstants.NONE?(b=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,b,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var pa=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(b,d){pa.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&
-null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var X=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(b,d){X.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display=
-"");this.blockDelayedSelection=null};var ea=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ea.apply(this,arguments);var b=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var d=0;4>d;d++){var f=new mxRectangleShape(new mxRectangle(0,
-0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);f.dialect=mxConstants.DIALECT_SVG;f.init(this.graph.view.getOverlayPane());this.cornerHandles.push(f)}}var c=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(b,d){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));
-c()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(b,d){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);d=this.graph.getLinkForCell(this.state.cell);f=this.graph.getLinksForState(this.state);this.updateLinkHint(d,f);if(null!=d||null!=f&&0<f.length)b=!0;b&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=
-function(d,f){try{if(null==d&&(null==f||0==f.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=d||null!=f&&0<f.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));
-this.linkHint.innerHTML="";if(null!=d&&(this.linkHint.appendChild(this.graph.createLinkForHint(d)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var c=document.createElement("img");c.setAttribute("src",Editor.editImage);c.setAttribute("title",mxResources.get("editLink"));c.setAttribute("width","11");c.setAttribute("height","11");c.style.marginLeft="10px";c.style.marginBottom="-1px";c.style.cursor="pointer";this.linkHint.appendChild(c);mxEvent.addListener(c,"click",mxUtils.bind(this,
-function(b){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(b)}));this.linkHint.appendChildGraph.createRemoveIcon(mxResources.get("removeIt",[mxResources.get("link")]),mxUtils.bind(this,function(b){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(b)}))}if(null!=f)for(c=0;c<f.length;c++){var e=document.createElement("div");e.style.marginTop=null!=d||0<c?"6px":"0px";e.appendChild(this.graph.createLinkForHint(f[c].getAttribute("href"),mxUtils.getTextContent(f[c])));
-this.linkHint.appendChild(e)}}}catch(xa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var ja=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){ja.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var b=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&
-(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(d,f){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));b();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var d=this.graph.getLinkForCell(this.state.cell),
-f=this.graph.getLinksForState(this.state);if(null!=d||null!=f&&0<f.length)this.updateLinkHint(d,f),this.redrawHandles()};var ra=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){ra.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var U=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var b=0;b<this.moveHandles.length;b++)this.moveHandles[b].style.left=
-this.moveHandles[b].rowState.x+this.moveHandles[b].rowState.width-5+"px",this.moveHandles[b].style.top=this.moveHandles[b].rowState.y+this.moveHandles[b].rowState.height/2-6+"px";if(null!=this.cornerHandles){var b=this.getSelectionBorderInset(),d=this.cornerHandles,f=d[0].bounds.height/2;d[0].bounds.x=this.state.x-d[0].bounds.width/2+b;d[0].bounds.y=this.state.y-f+b;d[0].redraw();d[1].bounds.x=d[0].bounds.x+this.state.width-2*b;d[1].bounds.y=d[0].bounds.y;d[1].redraw();d[2].bounds.x=d[0].bounds.x;
-d[2].bounds.y=this.state.y+this.state.height-2*b;d[2].redraw();d[3].bounds.x=d[1].bounds.x;d[3].bounds.y=d[2].bounds.y;d[3].redraw();for(b=0;b<this.cornerHandles.length;b++)this.cornerHandles[b].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");U.apply(this);null!=this.state&&
-null!=this.linkHint&&(b=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),d=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),f=mxUtils.getBoundingBox(d,this.state.style[mxConstants.STYLE_ROTATION]||"0",b),b=null!=f?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,d=null!=this.state.text?this.state.text.boundingBox:null,null==f&&(f=this.state),f=f.y+f.height,null!=d&&(f=Math.max(f,d.y+d.height)),this.linkHint.style.left=
-Math.max(0,Math.round(b.x+(b.width-this.linkHint.clientWidth)/2))+"px",this.linkHint.style.top=Math.round(f+this.verticalOffset/2+Editor.hintOffset)+"px")};var ka=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){ka.apply(this,arguments);if(null!=this.moveHandles){for(var b=0;b<this.moveHandles.length;b++)null!=this.moveHandles[b]&&null!=this.moveHandles[b].parentNode&&this.moveHandles[b].parentNode.removeChild(this.moveHandles[b]);this.moveHandles=null}if(null!=this.cornerHandles){for(b=
-0;b<this.cornerHandles.length;b++)null!=this.cornerHandles[b]&&null!=this.cornerHandles[b].node&&null!=this.cornerHandles[b].node.parentNode&&this.cornerHandles[b].node.parentNode.removeChild(this.cornerHandles[b].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),
-this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var aa=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(aa.apply(this),null!=this.state&&null!=this.linkHint)){var b=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(b=new mxRectangle(b.x,b.y,b.width,b.height),b.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(b.x+(b.width-
-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b.y+b.height+Editor.hintOffset)+"px"}};var oa=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){oa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var sa=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){sa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),
-this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function k(){mxActor.call(this)}function g(){mxCylinder.call(this)}function p(){mxCylinder.call(this)}function t(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxShape.call(this)}function l(){mxShape.call(this)}function m(b,d,f,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=f;this.strokewidth=null!=c?c:1}function q(){mxActor.call(this)}function n(){mxCylinder.call(this)}
-function u(){mxCylinder.call(this)}function v(){mxActor.call(this)}function y(){mxActor.call(this)}function x(){mxActor.call(this)}function G(){mxActor.call(this)}function C(){mxActor.call(this)}function E(){mxActor.call(this)}function J(){mxActor.call(this)}function L(b,d){this.canvas=b;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=d;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,L.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;
-this.canvas.moveTo=mxUtils.bind(this,L.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,L.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,L.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,L.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,L.prototype.arcTo)}function H(){mxRectangleShape.call(this)}function K(){mxRectangleShape.call(this)}
-function B(){mxActor.call(this)}function M(){mxActor.call(this)}function P(){mxActor.call(this)}function T(){mxRectangleShape.call(this)}function N(){mxRectangleShape.call(this)}function R(){mxCylinder.call(this)}function F(){mxShape.call(this)}function D(){mxShape.call(this)}function A(){mxEllipse.call(this)}function da(){mxShape.call(this)}function I(){mxShape.call(this)}function S(){mxRectangleShape.call(this)}function Z(){mxShape.call(this)}function ma(){mxShape.call(this)}function ga(){mxShape.call(this)}
-function ia(){mxShape.call(this)}function la(){mxShape.call(this)}function W(){mxCylinder.call(this)}function fa(){mxCylinder.call(this)}function na(){mxRectangleShape.call(this)}function V(){mxDoubleEllipse.call(this)}function Q(){mxDoubleEllipse.call(this)}function pa(){mxArrowConnector.call(this);this.spacing=0}function X(){mxArrowConnector.call(this);this.spacing=0}function ea(){mxActor.call(this)}function ja(){mxRectangleShape.call(this)}function ra(){mxActor.call(this)}function U(){mxActor.call(this)}
-function ka(){mxActor.call(this)}function aa(){mxActor.call(this)}function oa(){mxActor.call(this)}function sa(){mxActor.call(this)}function ca(){mxActor.call(this)}function O(){mxActor.call(this)}function ta(){mxActor.call(this)}function ba(){mxActor.call(this)}function xa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function ya(){mxEllipse.call(this)}function Ea(){mxRhombus.call(this)}function Ja(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function Ha(){mxEllipse.call(this)}
-function wa(){mxEllipse.call(this)}function za(){mxActor.call(this)}function va(){mxActor.call(this)}function Aa(){mxActor.call(this)}function Y(b,d,f,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=f;this.strokewidth=null!=c?c:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Fa(){mxConnector.call(this)}function Ua(b,d,f,c,e,l,g,k,m,q){g+=m;var z=c.clone();c.x-=e*(2*g+m);c.y-=l*(2*g+m);e*=g+m;l*=g+m;return function(){b.ellipse(z.x-
+b=1:this.graph.isTableCell(this.state.cell)&&(b=2);return b};var R=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return R.apply(this,arguments).grow(-this.getSelectionBorderInset())};var G=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=G.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var d=this.graph,f=d.model,c=this.state,e=this.selectionBorder,l=this;null==
+b&&(b=[]);var g=d.view.getCellStates(f.getChildCells(this.state.cell,!0));if(0<g.length){for(var k=f.getChildCells(g[0].cell,!0),f=0;f<k.length;f++)mxUtils.bind(this,function(f){var g=d.view.getState(k[f]),m=d.getCellGeometry(k[f]),q=null!=m.alternateBounds?m.alternateBounds:m;null==g&&(g=new mxCellState(d.view,k[f],d.getCellStyle(k[f])),g.x=c.x+m.x*d.view.scale,g.y=c.y+m.y*d.view.scale,g.width=q.width*d.view.scale,g.height=q.height*d.view.scale,g.updateCachedBounds());var m=f<k.length-1?k[f+1]:null,
+n=null!=m?d.getCellGeometry(m):null,G=null!=n&&null!=n.alternateBounds?n.alternateBounds:n,m=new mxLine(new mxRectangle,mxConstants.NONE,1,!0);m.isDashed=e.isDashed;m.svgStrokeTolerance++;m=new mxHandle(g,"col-resize",null,m);m.tableHandle=!0;var v=0;m.shape.node.parentNode.insertBefore(m.shape.node,m.shape.node.parentNode.firstChild);m.redraw=function(){if(null!=this.shape){var b=d.getActualStartSize(c.cell);this.shape.stroke=0==v?mxConstants.NONE:e.stroke;this.shape.bounds.x=this.state.x+(q.width+
+v)*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=c.y+(f==k.length-1?0:b.y*this.graph.view.scale);this.shape.bounds.height=c.height-(f==k.length-1?0:(b.height+b.y)*this.graph.view.scale);this.shape.redraw()}};var p=!1;m.setPosition=function(b,f,c){v=Math.max(Graph.minTableColumnWidth-q.width,f.x-b.x-q.width);p=mxEvent.isShiftDown(c.getEvent());null==n||null==G||p||(v=Math.min(g.x/d.view.scale-q.width-Graph.minTableColumnWidth+n.x+d.view.translate.x+G.width,v))};m.execute=function(b){if(0!=
+v)d.setTableColumnWidth(this.state.cell,v,p);else if(!l.blockDelayedSelection){var f=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(f,b)}v=0};m.positionChanged=function(){};m.reset=function(){v=0};b.push(m)})(f);for(f=0;f<g.length;f++)mxUtils.bind(this,function(f){f=g[f];var k=new mxLine(new mxRectangle,mxConstants.NONE,1);k.isDashed=e.isDashed;k.svgStrokeTolerance++;f=new mxHandle(f,"row-resize",null,k);f.tableHandle=!0;var m=0;f.shape.node.parentNode.insertBefore(f.shape.node,
+f.shape.node.parentNode.firstChild);f.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.stroke=0==m?mxConstants.NONE:e.stroke,this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+m*this.graph.view.scale,this.shape.bounds.height=1,this.shape.redraw())};f.setPosition=function(b,d,f){m=Math.max(Graph.minTableRowHeight-b.height,d.y-b.y-b.height)};f.execute=function(b){if(0!=m)d.setTableRowHeight(this.state.cell,
+m,!mxEvent.isShiftDown(b.getEvent()));else if(!l.blockDelayedSelection){var f=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(f,b)}m=0};f.reset=function(){m=0};b.push(f)})(f)}}return null!=b?b.reverse():null};var D=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){D.apply(this,arguments);if(null!=this.moveHandles)for(var d=0;d<this.moveHandles.length;d++)this.moveHandles[d].style.visibility=b?"":"hidden";if(null!=
+this.cornerHandles)for(d=0;d<this.cornerHandles.length;d++)this.cornerHandles[d].node.style.visibility=b?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var b=this.graph.model;if(null!=this.moveHandles){for(var d=0;d<this.moveHandles.length;d++)this.moveHandles[d].parentNode.removeChild(this.moveHandles[d]);this.moveHandles=null}this.moveHandles=[];for(d=0;d<b.getChildCount(this.state.cell);d++)mxUtils.bind(this,function(d){if(null!=d&&b.isVertex(d.cell)){var f=mxUtils.createImage(Editor.rowMoveImage);
+f.style.position="absolute";f.style.cursor="pointer";f.style.width="7px";f.style.height="4px";f.style.padding="4px 2px 4px 2px";f.rowState=d;mxEvent.addGestureListeners(f,mxUtils.bind(this,function(b){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(b)&&this.graph.isCellSelected(d.cell)||this.graph.selectCellForEvent(d.cell,b);mxEvent.isPopupTrigger(b)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(b),mxEvent.getClientY(b),this.graph.getSelectionCells()),
+this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0);mxEvent.consume(b)}),null,mxUtils.bind(this,function(b){mxEvent.isPopupTrigger(b)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(b),mxEvent.getClientY(b),d.cell,b),mxEvent.consume(b))}));this.moveHandles.push(f);this.graph.container.appendChild(f)}})(this.graph.view.getState(b.getChildAt(this.state.cell,d)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var b=
+0;b<this.customHandles.length;b++)this.customHandles[b].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var A=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var b=new mxPoint(0,0),d=this.tolerance,f=this.state.style.shape;null==mxCellRenderer.defaultShapes[f]&&mxStencilRegistry.getStencil(f);f=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;
+if(!f&&null!=this.customHandles)for(var c=0;c<this.customHandles.length;c++)if(null!=this.customHandles[c].shape&&null!=this.customHandles[c].shape.bounds){var e=this.customHandles[c].shape.bounds,l=e.getCenterX(),g=e.getCenterY();if(Math.abs(this.state.x-l)<e.width/2||Math.abs(this.state.y-g)<e.height/2||Math.abs(this.state.x+this.state.width-l)<e.width/2||Math.abs(this.state.y+this.state.height-g)<e.height/2){f=!0;break}}f&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(d/=2,this.graph.isTable(this.state.cell)&&
+(d+=7),b.x=this.sizers[0].bounds.width+d,b.y=this.sizers[0].bounds.height+d):b=A.apply(this,arguments);return b};mxVertexHandler.prototype.updateHint=function(d){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{d=this.state.view.scale;var f=this.state.view.unit;this.hint.innerHTML=c(this.roundLength(this.bounds.width/d),f)+" x "+c(this.roundLength(this.bounds.height/
+d),f)}d=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==d&&(d=this.bounds);this.hint.style.left=d.x+Math.round((d.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=d.y+d.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display=
+"")};var da=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(b,d){da.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var K=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(b,d){K.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=
+function(d,f){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var e=this.graph.view.translate,l=this.graph.view.scale,g=this.roundLength(f.x/l-e.x),e=this.roundLength(f.y/l-e.y),l=this.graph.view.unit;this.hint.innerHTML=c(g,l)+", "+c(e,l);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(g=this.constraintHandler.currentConstraint.point,this.hint.innerHTML=
+"["+Math.round(100*g.x)+"%, "+Math.round(100*g.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(d.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(d.getGraphY(),f.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+
+HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22" stroke-width="1"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>'):
+new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>'):new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+
+'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>',24,24):new mxImage(IMAGE_PATH+"/handle-rotate.png",16,16);mxClient.IS_SVG&&(mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,
+5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="'+HoverIcons.prototype.arrowFill+'"/>'));mxVertexHandler.TABLE_HANDLE_COLOR="#fca000";mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxEdgeHandler.prototype.terminalHandleImage=HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle;
+mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=
+HoverIcons.prototype.roundDrop);mxClient.IS_SVG||((new Image).src=HoverIcons.prototype.mainHandle.src,(new Image).src=HoverIcons.prototype.fixedHandle.src,(new Image).src=HoverIcons.prototype.terminalHandle.src,(new Image).src=HoverIcons.prototype.secondaryHandle.src,(new Image).src=HoverIcons.prototype.rotationHandle.src,(new Image).src=HoverIcons.prototype.triangleUp.src,(new Image).src=HoverIcons.prototype.triangleRight.src,(new Image).src=HoverIcons.prototype.triangleDown.src,(new Image).src=
+HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=
+!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(b){return!mxEvent.isShiftDown(b.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(b){return!mxEvent.isShiftDown(b.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||
+0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(b){return mxEvent.isMouseEvent(b.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(b){var d=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(d)||
+mxEvent.isPopupTrigger(d)&&(null==b.getState()||mxEvent.isControlDown(d)||mxEvent.isShiftDown(d))};var S=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(b,d){S.apply(this,arguments);mxEvent.isTouchEvent(d.getEvent())&&this.graph.isCellSelected(d.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(b){var d=b.getEvent();return mxEvent.isLeftMouseButton(d)&&(this.useLeftButtonForPanning&&null==
+b.getState()||mxEvent.isControlDown(d)&&!mxEvent.isShiftDown(d))||this.usePopupTrigger&&mxEvent.isPopupTrigger(d)};mxRubberband.prototype.isSpaceEvent=function(b){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(b.getEvent())&&mxEvent.isShiftDown(b.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(b,d){if(this.cancelled)this.cancelled=
+!1,d.consume();else{var f=null!=this.div&&"none"!=this.div.style.display,c=null,e=null,l=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(c=this.first.x,e=this.first.y,l=(this.currentX-c)/this.graph.view.scale,g=(this.currentY-e)/this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(l=this.graph.snap(l),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(l)<this.graph.tolerance&&(l=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(f){if(mxEvent.isAltDown(d.getEvent())&&
+this.graph.isToggleEvent(d.getEvent())){var l=new mxRectangle(this.x,this.y,this.width,this.height),k=this.graph.getCells(l.x,l.y,l.width,l.height);this.graph.removeSelectionCells(k)}else if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(k=this.graph.getCellsBeyond(c,e,this.graph.getDefaultParent(),!0,!0),f=0;f<k.length;f++)if(this.graph.isCellMovable(k[f])){var m=this.graph.view.getState(k[f]),q=this.graph.getCellGeometry(k[f]);null!=m&&null!=q&&(q=q.clone(),q.translate(l,g),this.graph.model.setGeometry(k[f],
+q))}}finally{this.graph.model.endUpdate()}}else l=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(l,d.getEvent());d.consume()}}};mxRubberband.prototype.mouseMove=function(b,d){if(!d.isConsumed()&&null!=this.first){var f=mxUtils.getScrollOrigin(this.graph.container),c=mxUtils.getOffset(this.graph.container);f.x-=c.x;f.y-=c.y;var c=d.getX()+f.x,f=d.getY()+f.y,e=this.first.x-c,l=this.first.y-f,g=this.graph.tolerance;if(null!=this.div||Math.abs(e)>g||Math.abs(l)>g)null==
+this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(c,f),this.isSpaceEvent(d)?(c=this.x+this.width,f=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=c-this.width),this.y<this.first.y&&(this.y=f-this.height)),
+this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+
+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),d.consume()}};var aa=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=
+this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);aa.apply(this,arguments)};var ma=(new Date).getTime(),ga=0,ia=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(b,d,f,c){ia.apply(this,arguments);f!=this.currentTerminalState?(ma=(new Date).getTime(),ga=0):ga=(new Date).getTime()-ma;this.currentTerminalState=f};var la=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(b){return null!=
+this.currentTerminalState&&b.getState()==this.currentTerminalState&&2E3<ga||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&la.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(b,d){var f=null!=b&&0==b,c=this.state.getVisibleTerminalState(f),e=null!=b&&(0==b||b>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==b)?this.graph.getConnectionConstraint(this.state,c,f):null,f=null!=(null!=
+e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(f),e):null)?this.fixedHandleImage:null!=e&&null!=c?this.terminalHandleImage:this.handleImage;if(null!=f)return f=new mxImageShape(new mxRectangle(0,0,f.width,f.height),f.src),f.preserveImageAspect=!1,f;f=mxConstants.HANDLE_SIZE;this.preferHtml&&--f;return new mxRectangleShape(new mxRectangle(0,0,f,f),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var W=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=
+function(b,d,f){this.handleImage=d==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:d==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return W.apply(this,arguments)};var fa=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(b){if(null!=b&&1==b.length){var d=this.graph.getModel(),f=d.getParent(b[0]),c=this.graph.getCellGeometry(b[0]);if(d.isEdge(f)&&null!=c&&c.relative&&(d=this.graph.view.getState(b[0]),null!=d&&2>d.width&&2>d.height&&
+null!=d.text&&null!=d.text.boundingBox))return mxRectangle.fromRectangle(d.text.boundingBox)}return fa.apply(this,arguments)};var na=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var b=na.apply(this,arguments),d=[],f=0;f<b.length;f++)"1"!=mxUtils.getValue(b[f].style,"part","0")&&d.push(b[f]);return d};var V=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(b){var d=this.graph.getModel(),f=d.getParent(b.cell),
+c=this.graph.getCellGeometry(b.cell);return d.isEdge(f)&&null!=c&&c.relative&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox?(d=b.text.unrotatedBoundingBox||b.text.boundingBox,new mxRectangle(Math.round(d.x),Math.round(d.y),Math.round(d.width),Math.round(d.height))):V.apply(this,arguments)};var Q=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(b,d){var f=this.graph.getModel(),c=f.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
+(this.getHandleForEvent(d)==mxEvent.ROTATION_HANDLE||!f.isEdge(c)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Q.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var b=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&b==mxConstants.NONE&&d==mxConstants.NONE?(b=mxUtils.mod(mxUtils.getValue(this.state.style,
+mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,b,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var ra=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(b,d){ra.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display=
+"none"))};var X=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(b,d){X.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var ea=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ea.apply(this,arguments);var b=!1;
+null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var d=0;4>d;d++){var f=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);f.dialect=mxConstants.DIALECT_SVG;f.init(this.graph.view.getOverlayPane());
+this.cornerHandles.push(f)}}var c=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(b,d){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));c()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,
+this.changeHandler);this.editingHandler=mxUtils.bind(this,function(b,d){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);d=this.graph.getLinkForCell(this.state.cell);f=this.graph.getLinksForState(this.state);this.updateLinkHint(d,f);if(null!=d||null!=f&&0<f.length)b=!0;b&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(d,f){try{if(null==d&&(null==f||0==f.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),
+this.linkHint=null);else if(null!=d||null!=f&&0<f.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerHTML="";if(null!=d&&(this.linkHint.appendChild(this.graph.createLinkForHint(d)),this.graph.isEnabled()&&"function"===
+typeof this.graph.editLink)){var c=document.createElement("img");c.setAttribute("src",Editor.editImage);c.setAttribute("title",mxResources.get("editLink"));c.setAttribute("width","11");c.setAttribute("height","11");c.style.marginLeft="10px";c.style.marginBottom="-1px";c.style.cursor="pointer";this.linkHint.appendChild(c);mxEvent.addListener(c,"click",mxUtils.bind(this,function(b){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(b)}));this.linkHint.appendChildGraph.createRemoveIcon(mxResources.get("removeIt",
+[mxResources.get("link")]),mxUtils.bind(this,function(b){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(b)}))}if(null!=f)for(c=0;c<f.length;c++){var e=document.createElement("div");e.style.marginTop=null!=d||0<c?"6px":"0px";e.appendChild(this.graph.createLinkForHint(f[c].getAttribute("href"),mxUtils.getTextContent(f[c])));this.linkHint.appendChild(e)}}}catch(ya){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var ja=mxEdgeHandler.prototype.init;
+mxEdgeHandler.prototype.init=function(){ja.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var b=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,
+function(d,f){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));b();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var d=this.graph.getLinkForCell(this.state.cell),f=this.graph.getLinksForState(this.state);if(null!=d||null!=f&&0<f.length)this.updateLinkHint(d,f),this.redrawHandles()};var sa=mxConnectionHandler.prototype.init;
+mxConnectionHandler.prototype.init=function(){sa.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var U=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var b=0;b<this.moveHandles.length;b++)this.moveHandles[b].style.left=this.moveHandles[b].rowState.x+this.moveHandles[b].rowState.width-5+"px",this.moveHandles[b].style.top=this.moveHandles[b].rowState.y+
+this.moveHandles[b].rowState.height/2-6+"px";if(null!=this.cornerHandles){var b=this.getSelectionBorderInset(),d=this.cornerHandles,f=d[0].bounds.height/2;d[0].bounds.x=this.state.x-d[0].bounds.width/2+b;d[0].bounds.y=this.state.y-f+b;d[0].redraw();d[1].bounds.x=d[0].bounds.x+this.state.width-2*b;d[1].bounds.y=d[0].bounds.y;d[1].redraw();d[2].bounds.x=d[0].bounds.x;d[2].bounds.y=this.state.y+this.state.height-2*b;d[2].redraw();d[3].bounds.x=d[1].bounds.x;d[3].bounds.y=d[2].bounds.y;d[3].redraw();
+for(b=0;b<this.cornerHandles.length;b++)this.cornerHandles[b].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");U.apply(this);null!=this.state&&null!=this.linkHint&&(b=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),d=new mxRectangle(this.state.x,this.state.y-
+22,this.state.width+24,this.state.height+22),f=mxUtils.getBoundingBox(d,this.state.style[mxConstants.STYLE_ROTATION]||"0",b),b=null!=f?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,d=null!=this.state.text?this.state.text.boundingBox:null,null==f&&(f=this.state),f=f.y+f.height,null!=d&&(f=Math.max(f,d.y+d.height)),this.linkHint.style.left=Math.max(0,Math.round(b.x+(b.width-this.linkHint.clientWidth)/2))+"px",this.linkHint.style.top=Math.round(f+this.verticalOffset/
+2+Editor.hintOffset)+"px")};var ka=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){ka.apply(this,arguments);if(null!=this.moveHandles){for(var b=0;b<this.moveHandles.length;b++)null!=this.moveHandles[b]&&null!=this.moveHandles[b].parentNode&&this.moveHandles[b].parentNode.removeChild(this.moveHandles[b]);this.moveHandles=null}if(null!=this.cornerHandles){for(b=0;b<this.cornerHandles.length;b++)null!=this.cornerHandles[b]&&null!=this.cornerHandles[b].node&&null!=this.cornerHandles[b].node.parentNode&&
+this.cornerHandles[b].node.parentNode.removeChild(this.cornerHandles[b].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};
+var Z=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Z.apply(this),null!=this.state&&null!=this.linkHint)){var b=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(b=new mxRectangle(b.x,b.y,b.width,b.height),b.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(b.x+(b.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b.y+b.height+Editor.hintOffset)+"px"}};var qa=mxEdgeHandler.prototype.reset;
+mxEdgeHandler.prototype.reset=function(){qa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var ta=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){ta.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function k(){mxActor.call(this)}function g(){mxCylinder.call(this)}function p(){mxCylinder.call(this)}function t(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxShape.call(this)}function l(){mxShape.call(this)}function m(b,d,f,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=f;this.strokewidth=null!=c?c:1}function q(){mxActor.call(this)}function n(){mxCylinder.call(this)}
+function u(){mxCylinder.call(this)}function v(){mxActor.call(this)}function y(){mxActor.call(this)}function x(){mxActor.call(this)}function E(){mxActor.call(this)}function C(){mxActor.call(this)}function F(){mxActor.call(this)}function I(){mxActor.call(this)}function L(b,d){this.canvas=b;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=d;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,L.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;
+this.canvas.moveTo=mxUtils.bind(this,L.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,L.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,L.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,L.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,L.prototype.arcTo)}function H(){mxRectangleShape.call(this)}function J(){mxRectangleShape.call(this)}
+function B(){mxActor.call(this)}function M(){mxActor.call(this)}function P(){mxActor.call(this)}function T(){mxRectangleShape.call(this)}function N(){mxRectangleShape.call(this)}function R(){mxCylinder.call(this)}function G(){mxShape.call(this)}function D(){mxShape.call(this)}function A(){mxEllipse.call(this)}function da(){mxShape.call(this)}function K(){mxShape.call(this)}function S(){mxRectangleShape.call(this)}function aa(){mxShape.call(this)}function ma(){mxShape.call(this)}function ga(){mxShape.call(this)}
+function ia(){mxShape.call(this)}function la(){mxShape.call(this)}function W(){mxCylinder.call(this)}function fa(){mxCylinder.call(this)}function na(){mxRectangleShape.call(this)}function V(){mxDoubleEllipse.call(this)}function Q(){mxDoubleEllipse.call(this)}function ra(){mxArrowConnector.call(this);this.spacing=0}function X(){mxArrowConnector.call(this);this.spacing=0}function ea(){mxActor.call(this)}function ja(){mxRectangleShape.call(this)}function sa(){mxActor.call(this)}function U(){mxActor.call(this)}
+function ka(){mxActor.call(this)}function Z(){mxActor.call(this)}function qa(){mxActor.call(this)}function ta(){mxActor.call(this)}function ca(){mxActor.call(this)}function O(){mxActor.call(this)}function ua(){mxActor.call(this)}function ba(){mxActor.call(this)}function ya(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function Fa(){mxRhombus.call(this)}function Ja(){mxEllipse.call(this)}function Ca(){mxEllipse.call(this)}function Ia(){mxEllipse.call(this)}
+function xa(){mxEllipse.call(this)}function Aa(){mxActor.call(this)}function wa(){mxActor.call(this)}function Ba(){mxActor.call(this)}function Y(b,d,f,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=f;this.strokewidth=null!=c?c:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Ga(){mxConnector.call(this)}function Ua(b,d,f,c,e,l,g,k,m,q){g+=m;var z=c.clone();c.x-=e*(2*g+m);c.y-=l*(2*g+m);e*=g+m;l*=g+m;return function(){b.ellipse(z.x-
e-g,z.y-l-g,2*g,2*g);q?b.fillAndStroke():b.stroke()}}mxUtils.extend(b,mxSwimlane);b.prototype.getLabelBounds=function(b){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};b.prototype.paintVertexShape=function(b,d,f,c,e){0==this.getTitleSize()?mxRectangleShape.prototype.paintBackground.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),b.translate(-d,-f));this.paintForeground(b,
d,f,c,e)};b.prototype.paintForeground=function(b,d,f,c,e){if(null!=this.state){var z=this.flipH,l=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)var g=z,z=l,l=g;b.rotate(-this.getShapeRotation(),z,l,d+c/2,f+e/2);s=this.scale;d=this.bounds.x/s;f=this.bounds.y/s;c=this.bounds.width/s;e=this.bounds.height/s;this.paintTableForeground(b,d,f,c,e)}};b.prototype.paintTableForeground=function(b,d,f,c,e){var z=this.state.view.graph,l=z.getActualStartSize(this.state.cell),
-g=z.model.getChildCells(this.state.cell,!0);if(0<g.length){var k="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),Ia="0"!=mxUtils.getValue(this.state.style,"columnLines","1");if(k)for(k=1;k<g.length;k++){var m=z.getCellGeometry(g[k]);null!=m&&(b.begin(),b.moveTo(d+l.x,f+m.y),b.lineTo(d+c-l.width,f+m.y),b.end(),b.stroke())}if(Ia)for(c=z.model.getChildCells(g[0],!0),k=1;k<c.length;k++)m=z.getCellGeometry(c[k]),null!=m&&(b.begin(),b.moveTo(d+m.x+l.x,f+l.y),b.lineTo(d+m.x+l.x,f+e-l.height),b.end(),
-b.stroke())}};mxCellRenderer.registerShape("table",b);mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.darkOpacity=0;c.prototype.darkOpacity2=0;c.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),l=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));
-b.translate(d,f);b.begin();b.moveTo(0,0);b.lineTo(c-z,0);b.lineTo(c,z);b.lineTo(c,e);b.lineTo(z,e);b.lineTo(0,e-z);b.lineTo(0,0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),0!=l&&(b.setFillAlpha(Math.abs(l)),b.setFillColor(0>l?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(c-z,0),b.lineTo(c,z),b.lineTo(z,z),b.close(),b.fill()),0!=g&&(b.setFillAlpha(Math.abs(g)),b.setFillColor(0>g?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(z,z),b.lineTo(z,e),b.lineTo(0,e-z),
-b.close(),b.fill()),b.begin(),b.moveTo(z,e),b.lineTo(z,z),b.lineTo(0,0),b.moveTo(z,z),b.lineTo(c,z),b.end(),b.stroke())};c.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)?(b=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(b,b,0,0)):null};mxCellRenderer.registerShape("cube",c);var Qa=Math.tan(mxUtils.toRadians(30)),Ga=(.5-Qa)/2;mxCellRenderer.registerShape("isoRectangle",k);mxUtils.extend(e,mxCylinder);e.prototype.size=
-6;e.prototype.paintVertexShape=function(b,d,f,c,e){b.setFillColor(this.stroke);var z=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;b.ellipse(d+.5*(c-z),f+.5*(e-z),z,z);b.fill();b.setFillColor(mxConstants.NONE);b.rect(d,f,c,e);b.fill()};mxCellRenderer.registerShape("waypoint",e);mxUtils.extend(k,mxActor);k.prototype.size=20;k.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/Qa);b.translate((c-d)/2,(e-d)/2+d/4);b.moveTo(0,.25*d);b.lineTo(.5*d,d*Ga);
-b.lineTo(d,.25*d);b.lineTo(.5*d,(.5-Ga)*d);b.lineTo(0,.25*d);b.close();b.end()};mxCellRenderer.registerShape("isoRectangle",k);mxUtils.extend(g,mxCylinder);g.prototype.size=20;g.prototype.redrawPath=function(b,d,f,c,e,l){d=Math.min(c,e/(.5+Qa));l?(b.moveTo(0,.25*d),b.lineTo(.5*d,(.5-Ga)*d),b.lineTo(d,.25*d),b.moveTo(.5*d,(.5-Ga)*d),b.lineTo(.5*d,(1-Ga)*d)):(b.translate((c-d)/2,(e-d)/2),b.moveTo(0,.25*d),b.lineTo(.5*d,d*Ga),b.lineTo(d,.25*d),b.lineTo(d,.75*d),b.lineTo(.5*d,(1-Ga)*d),b.lineTo(0,.75*
-d),b.close());b.end()};mxCellRenderer.registerShape("isoCube",g);mxUtils.extend(p,mxCylinder);p.prototype.redrawPath=function(b,d,f,c,e,l){d=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(l&&null!=this.fill||!l&&null==this.fill)b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),l||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),l||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),l||(b.stroke(),b.begin()),b.translate(0,-d);l||(b.moveTo(0,
-d),b.curveTo(0,-d/3,c,-d/3,c,d),b.lineTo(c,e-d),b.curveTo(c,e+d/3,0,e+d/3,0,e-d),b.close())};p.prototype.getLabelMargins=function(b){return new mxRectangle(0,2.5*Math.min(b.height/2,Math.round(b.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",p);mxUtils.extend(t,mxCylinder);t.prototype.size=30;t.prototype.darkOpacity=0;t.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),l=
-Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));b.translate(d,f);b.begin();b.moveTo(0,0);b.lineTo(c-z,0);b.lineTo(c,z);b.lineTo(c,e);b.lineTo(0,e);b.lineTo(0,0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),0!=l&&(b.setFillAlpha(Math.abs(l)),b.setFillColor(0>l?"#FFFFFF":"#000000"),b.begin(),b.moveTo(c-z,0),b.lineTo(c-z,z),b.lineTo(c,z),b.close(),b.fill()),b.begin(),b.moveTo(c-z,0),b.lineTo(c-z,z),b.lineTo(c,z),b.end(),b.stroke())};
-mxCellRenderer.registerShape("note",t);mxUtils.extend(d,t);mxCellRenderer.registerShape("note2",d);d.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(b.height*this.scale,d*this.scale),0,0)}return null};mxUtils.extend(f,mxShape);f.prototype.isoAngle=15;f.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*
-Math.PI/200,z=Math.min(c*Math.tan(z),.5*e);b.translate(d,f);b.begin();b.moveTo(.5*c,0);b.lineTo(c,z);b.lineTo(c,e-z);b.lineTo(.5*c,e);b.lineTo(0,e-z);b.lineTo(0,z);b.close();b.fillAndStroke();b.setShadow(!1);b.begin();b.moveTo(0,z);b.lineTo(.5*c,2*z);b.lineTo(c,z);b.moveTo(.5*c,2*z);b.lineTo(.5*c,e);b.stroke()};mxCellRenderer.registerShape("isoCube2",f);mxUtils.extend(l,mxShape);l.prototype.size=15;l.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));b.translate(d,f);0==z?(b.rect(0,0,c,e),b.fillAndStroke()):(b.begin(),b.moveTo(0,z),b.arcTo(.5*c,z,0,0,1,.5*c,0),b.arcTo(.5*c,z,0,0,1,c,z),b.lineTo(c,e-z),b.arcTo(.5*c,z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),b.begin(),b.moveTo(c,z),b.arcTo(.5*c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke())};mxCellRenderer.registerShape("cylinder2",l);mxUtils.extend(m,mxCylinder);m.prototype.size=15;m.prototype.paintVertexShape=function(b,
-d,f,c,e){var z=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),l=mxUtils.getValue(this.style,"lid",!0);b.translate(d,f);0==z?(b.rect(0,0,c,e),b.fillAndStroke()):(b.begin(),l?(b.moveTo(0,z),b.arcTo(.5*c,z,0,0,1,.5*c,0),b.arcTo(.5*c,z,0,0,1,c,z)):(b.moveTo(0,0),b.arcTo(.5*c,z,0,0,0,.5*c,z),b.arcTo(.5*c,z,0,0,0,c,0)),b.lineTo(c,e-z),b.arcTo(.5*c,z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),l&&(b.begin(),b.moveTo(c,z),b.arcTo(.5*
-c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke()))};mxCellRenderer.registerShape("cylinder3",m);mxUtils.extend(q,mxActor);q.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c/2,.5*e,c,0);b.quadTo(.5*c,e/2,c,e);b.quadTo(c/2,.5*e,0,e);b.quadTo(.5*c,e/2,0,0);b.end()};mxCellRenderer.registerShape("switch",q);mxUtils.extend(n,mxCylinder);n.prototype.tabWidth=60;n.prototype.tabHeight=20;n.prototype.tabPosition="right";n.prototype.arcSize=.1;n.prototype.paintVertexShape=function(b,
-d,f,c,e){b.translate(d,f);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var z=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),l=mxUtils.getValue(this.style,"rounded",!1),g=mxUtils.getValue(this.style,"absoluteArcSize",!1),k=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));g||(k*=Math.min(c,e));k=Math.min(k,.5*c,.5*(e-f));d=Math.max(d,
-k);d=Math.min(c-k,d);l||(k=0);b.begin();"left"==z?(b.moveTo(Math.max(k,0),f),b.lineTo(Math.max(k,0),0),b.lineTo(d,0),b.lineTo(d,f)):(b.moveTo(c-d,f),b.lineTo(c-d,0),b.lineTo(c-Math.max(k,0),0),b.lineTo(c-Math.max(k,0),f));l?(b.moveTo(0,k+f),b.arcTo(k,k,0,0,1,k,f),b.lineTo(c-k,f),b.arcTo(k,k,0,0,1,c,k+f),b.lineTo(c,e-k),b.arcTo(k,k,0,0,1,c-k,e),b.lineTo(k,e),b.arcTo(k,k,0,0,1,0,e-k)):(b.moveTo(0,f),b.lineTo(c,f),b.lineTo(c,e),b.lineTo(0,e));b.close();b.fillAndStroke();b.setShadow(!1);"triangle"==mxUtils.getValue(this.style,
-"folderSymbol",null)&&(b.begin(),b.moveTo(c-30,f+20),b.lineTo(c-20,f+10),b.lineTo(c-10,f+20),b.close(),b.stroke())};mxCellRenderer.registerShape("folder",n);n.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var f=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,c=mxUtils.getValue(this.style,
-"rounded",!1),e=mxUtils.getValue(this.style,"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(z*=Math.min(b.width,b.height));z=Math.min(z,.5*b.width,.5*(b.height-d));c||(z=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(b.width,b.width-f),Math.min(b.height,b.height-d)):new mxRectangle(Math.min(b.width,b.width-f),0,z,Math.min(b.height,b.height-d))}return new mxRectangle(0,Math.min(b.height,d),0,0)}return null};
-mxUtils.extend(u,mxCylinder);u.prototype.arcSize=.1;u.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);var z=mxUtils.getValue(this.style,"rounded",!1),l=mxUtils.getValue(this.style,"absoluteArcSize",!1);d=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));f=mxUtils.getValue(this.style,"umlStateConnection",null);l||(d*=Math.min(c,e));d=Math.min(d,.5*c,.5*e);z||(d=0);z=0;null!=f&&(z=10);b.begin();b.moveTo(z,d);b.arcTo(d,d,0,0,1,z+d,0);b.lineTo(c-d,0);b.arcTo(d,d,0,0,1,c,
-d);b.lineTo(c,e-d);b.arcTo(d,d,0,0,1,c-d,e);b.lineTo(z+d,e);b.arcTo(d,d,0,0,1,z,e-d);b.close();b.fillAndStroke();b.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(b.roundrect(c-40,e-20,10,10,3,3),b.stroke(),b.roundrect(c-20,e-20,10,10,3,3),b.stroke(),b.begin(),b.moveTo(c-30,e-15),b.lineTo(c-20,e-15),b.stroke());"connPointRefEntry"==f?(b.ellipse(0,.5*e-10,20,20),b.fillAndStroke()):"connPointRefExit"==f&&(b.ellipse(0,.5*e-10,20,20),b.fillAndStroke(),b.begin(),b.moveTo(5,
-.5*e-5),b.lineTo(15,.5*e+5),b.moveTo(15,.5*e-5),b.lineTo(5,.5*e+5),b.stroke())};u.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",u);mxUtils.extend(v,mxActor);v.prototype.size=30;v.prototype.isRoundable=function(){return!0};v.prototype.redrawPath=function(b,d,f,c,e){d=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c,e),new mxPoint(0,e),new mxPoint(0,d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("card",v);mxUtils.extend(y,mxActor);y.prototype.size=.4;y.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(0,d/2);b.quadTo(c/4,1.4*d,c/2,d/2);b.quadTo(3*
-c/4,d*(1-1.4),c,d/2);b.lineTo(c,e-d/2);b.quadTo(3*c/4,e-1.4*d,c/2,e-d/2);b.quadTo(c/4,e-d*(1-1.4),0,e-d/2);b.lineTo(0,d/2);b.close();b.end()};y.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",this.size),f=b.width,c=b.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return d*=c,new mxRectangle(b.x,b.y+d,f,c-2*d);d*=f;return new mxRectangle(b.x+d,b.y,f-
-2*d,c)}return b};mxCellRenderer.registerShape("tape",y);mxUtils.extend(x,mxActor);x.prototype.size=.3;x.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*b.height):null};x.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(0,0);b.lineTo(c,0);b.lineTo(c,e-d/2);b.quadTo(3*c/4,e-1.4*d,c/2,e-d/2);b.quadTo(c/
-4,e-d*(1-1.4),0,e-d/2);b.lineTo(0,d/2);b.close();b.end()};mxCellRenderer.registerShape("document",x);var $a=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(b,d,f,c){var e=mxUtils.getValue(this.style,"size");return null!=e?c*Math.max(0,Math.min(1,e)):$a.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*
-this.scale,b.height*d),0,0)}return null};m.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(d/=2);return new mxRectangle(0,Math.min(b.height*this.scale,2*d*this.scale),0,Math.max(0,.3*d*this.scale))}return null};n.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,
-"labelInHeader",!1)){var f=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,c=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(z*=Math.min(b.width,b.height));z=Math.min(z,.5*b.width,.5*(b.height-d));c||(z=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(b.width,b.width-
-f),Math.min(b.height,b.height-d)):new mxRectangle(Math.min(b.width,b.width-f),0,z,Math.min(b.height,b.height-d))}return new mxRectangle(0,Math.min(b.height,d),0,0)}return null};u.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};d.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",
-15);return new mxRectangle(0,Math.min(b.height*this.scale,d*this.scale),0,Math.max(0,d*this.scale))}return null};mxUtils.extend(G,mxActor);G.prototype.size=.2;G.prototype.fixedSize=20;G.prototype.isRoundable=function(){return!0};G.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c-d,e)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("parallelogram",G);mxUtils.extend(C,mxActor);C.prototype.size=.2;C.prototype.fixedSize=20;C.prototype.isRoundable=function(){return!0};C.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*c,parseFloat(mxUtils.getValue(this.style,"size",
-this.fixedSize)))):c*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,e)],this.isRounded,f,!0)};mxCellRenderer.registerShape("trapezoid",C);mxUtils.extend(E,mxActor);E.prototype.size=.5;E.prototype.redrawPath=function(b,d,f,c,e){b.setFillColor(null);d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,e/2),new mxPoint(0,e/2),new mxPoint(d,e/2),new mxPoint(d,e),new mxPoint(c,e)],this.isRounded,f,!1);b.end()};mxCellRenderer.registerShape("curlyBracket",E);mxUtils.extend(J,mxActor);J.prototype.redrawPath=function(b,d,f,c,e){b.setStrokeWidth(1);b.setFillColor(this.stroke);d=c/5;b.rect(0,0,d,e);b.fillAndStroke();b.rect(2*d,0,d,e);
-b.fillAndStroke();b.rect(4*d,0,d,e);b.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",J);L.prototype.moveTo=function(b,d){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d;this.firstX=b;this.firstY=d};L.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};L.prototype.quadTo=function(b,d,f,c){this.originalQuadTo.apply(this.canvas,
-arguments);this.lastX=f;this.lastY=c};L.prototype.curveTo=function(b,d,f,c,e,l){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=l};L.prototype.arcTo=function(b,d,f,c,e,l,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=l;this.lastY=g};L.prototype.lineTo=function(b,d){if(null!=this.lastX&&null!=this.lastY){var f=function(b){return"number"===typeof b?b?0>b?-1:1:b===b?0:NaN:NaN},c=Math.abs(b-this.lastX),e=Math.abs(d-this.lastY),z=Math.sqrt(c*c+e*e);if(2>z){this.originalLineTo.apply(this.canvas,
-arguments);this.lastX=b;this.lastY=d;return}var l=Math.round(z/10),g=this.defaultVariation;5>l&&(l=5,g/=3);for(var k=f(b-this.lastX)*c/l,f=f(d-this.lastY)*e/l,c=c/z,e=e/z,z=0;z<l;z++){var m=(Math.random()-.5)*g;this.originalLineTo.call(this.canvas,k*z+this.lastX-m*e,f*z+this.lastY-m*c)}this.originalLineTo.call(this.canvas,b,d)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d};L.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;
-this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var ab=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(b){ab.apply(this,arguments);null==b.handJiggle&&(b.handJiggle=this.createHandJiggle(b))};var bb=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(b){bb.apply(this,arguments);null!=b.handJiggle&&(b.handJiggle.destroy(),
-delete b.handJiggle)};mxShape.prototype.createComicCanvas=function(b){return new L(b,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(b){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(b)};mxRhombus.prototype.defaultJiggle=2;var cb=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,
-"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&cb.apply(this,arguments)};var db=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(b,d,f,c,e){if(null==b.handJiggle||b.handJiggle.constructor!=L)db.apply(this,arguments);else{var z=!0;null!=this.style&&(z="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(z||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)z||
-null!=this.fill&&this.fill!=mxConstants.NONE||(b.pointerEvents=!1),b.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?z=Math.min(c/2,Math.min(e/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,z=Math.min(c*z,e*z)),b.moveTo(d+z,f),b.lineTo(d+c-z,f),b.quadTo(d+c,f,d+c,f+z),b.lineTo(d+c,f+e-z),b.quadTo(d+c,f+e,d+c-z,
-f+e),b.lineTo(d+z,f+e),b.quadTo(d,f+e,d,f+e-z),b.lineTo(d,f+z),b.quadTo(d,f,d+z,f)):(b.moveTo(d,f),b.lineTo(d+c,f),b.lineTo(d+c,f+e),b.lineTo(d,f+e),b.lineTo(d,f)),b.close(),b.end(),b.fillAndStroke()}};mxUtils.extend(H,mxRectangleShape);H.prototype.size=.1;H.prototype.fixedSize=!1;H.prototype.isHtmlAllowed=function(){return!1};H.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||
-this.direction==mxConstants.DIRECTION_WEST)){var d=b.width,f=b.height;b=new mxRectangle(b.x,b.y,d,f);var c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,c=Math.max(c,Math.min(d*e,f*e));b.x+=Math.round(c);b.width-=Math.round(2*c)}return b};H.prototype.paintForeground=function(b,d,f,c,e){var z=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),
-l=parseFloat(mxUtils.getValue(this.style,"size",this.size)),l=z?Math.max(0,Math.min(c,l)):c*Math.max(0,Math.min(1,l));this.isRounded&&(z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,l=Math.max(l,Math.min(c*z,e*z)));l=Math.round(l);b.begin();b.moveTo(d+l,f);b.lineTo(d+l,f+e);b.moveTo(d+c-l,f);b.lineTo(d+c-l,f+e);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",H);mxCellRenderer.registerShape("process2",
-H);mxUtils.extend(K,mxRectangleShape);K.prototype.paintBackground=function(b,d,f,c,e){b.setFillColor(mxConstants.NONE);b.rect(d,f,c,e);b.fill()};K.prototype.paintForeground=function(b,d,f,c,e){};mxCellRenderer.registerShape("transparent",K);mxUtils.extend(B,mxHexagon);B.prototype.size=30;B.prototype.position=.5;B.prototype.position2=.5;B.prototype.base=20;B.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};B.prototype.isRoundable=
-function(){return!0};B.prototype.redrawPath=function(b,d,f,c,e){d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var z=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),l=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),g=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"base",this.base))));
-this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,e-f),new mxPoint(Math.min(c,z+g),e-f),new mxPoint(l,e),new mxPoint(Math.max(0,z),e-f),new mxPoint(0,e-f)],this.isRounded,d,!0,[4])};mxCellRenderer.registerShape("callout",B);mxUtils.extend(M,mxActor);M.prototype.size=.2;M.prototype.fixedSize=20;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,
-"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c-d,0),new mxPoint(c,e/2),new mxPoint(c-d,e),new mxPoint(0,e),new mxPoint(d,e/2)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("step",M);mxUtils.extend(P,mxHexagon);P.prototype.size=.25;P.prototype.fixedSize=20;P.prototype.isRoundable=function(){return!0};
-P.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.5*e),new mxPoint(c-d,e),new mxPoint(d,e),new mxPoint(0,.5*e)],this.isRounded,f,
-!0)};mxCellRenderer.registerShape("hexagon",P);mxUtils.extend(T,mxRectangleShape);T.prototype.isHtmlAllowed=function(){return!1};T.prototype.paintForeground=function(b,d,f,c,e){var z=Math.min(c/5,e/5)+1;b.begin();b.moveTo(d+c/2,f+z);b.lineTo(d+c/2,f+e-z);b.moveTo(d+z,f+e/2);b.lineTo(d+c-z,f+e/2);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",T);var Xa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(b){if(1==
-this.style["double"]){var d=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+d,b.y+d,b.width-2*d,b.height-2*d)}return b};mxRhombus.prototype.paintVertexShape=function(b,d,f,c,e){Xa.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var z=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=z;f+=z;c-=2*z;e-=2*z;0<c&&0<e&&(b.setShadow(!1),Xa.apply(this,[b,d,f,c,e]))}};mxUtils.extend(N,
-mxRectangleShape);N.prototype.isHtmlAllowed=function(){return!1};N.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var d=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+d,b.y+d,b.width-2*d,b.height-2*d)}return b};N.prototype.paintForeground=function(b,d,f,c,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var z=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);d+=z;f+=z;c-=2*z;e-=2*z;0<c&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}b.setDashed(!1);var z=0,l;do{l=mxCellRenderer.defaultShapes[this.style["symbol"+z]];if(null!=l){var g=this.style["symbol"+z+"Align"],k=this.style["symbol"+z+"VerticalAlign"],m=this.style["symbol"+z+"Width"],q=this.style["symbol"+z+"Height"],n=this.style["symbol"+z+"Spacing"]||0,Ia=this.style["symbol"+z+"VSpacing"]||n,qa=this.style["symbol"+z+"ArcSpacing"];null!=qa&&(qa*=this.getArcSize(c+this.strokewidth,
-e+this.strokewidth),n+=qa,Ia+=qa);var qa=d,F=f,qa=g==mxConstants.ALIGN_CENTER?qa+(c-m)/2:g==mxConstants.ALIGN_RIGHT?qa+(c-m-n):qa+n,F=k==mxConstants.ALIGN_MIDDLE?F+(e-q)/2:k==mxConstants.ALIGN_BOTTOM?F+(e-q-Ia):F+Ia;b.save();g=new l;g.style=this.style;l.prototype.paintVertexShape.call(g,b,qa,F,m,q);b.restore()}z++}while(null!=l)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",N);mxUtils.extend(R,mxCylinder);R.prototype.redrawPath=function(b,d,f,
-c,e,l){l?(b.moveTo(0,0),b.lineTo(c/2,e/2),b.lineTo(c,0),b.end()):(b.moveTo(0,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(0,e),b.close())};mxCellRenderer.registerShape("message",R);mxUtils.extend(F,mxShape);F.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.ellipse(c/4,0,c/2,e/4);b.fillAndStroke();b.begin();b.moveTo(c/2,e/4);b.lineTo(c/2,2*e/3);b.moveTo(c/2,e/3);b.lineTo(0,e/3);b.moveTo(c/2,e/3);b.lineTo(c,e/3);b.moveTo(c/2,2*e/3);b.lineTo(0,e);b.moveTo(c/2,2*e/3);b.lineTo(c,e);b.end();
-b.stroke()};mxCellRenderer.registerShape("umlActor",F);mxUtils.extend(D,mxShape);D.prototype.getLabelMargins=function(b){return new mxRectangle(b.width/6,0,0,0)};D.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(0,e/4);b.lineTo(0,3*e/4);b.end();b.stroke();b.begin();b.moveTo(0,e/2);b.lineTo(c/6,e/2);b.end();b.stroke();b.ellipse(c/6,0,5*c/6,e);b.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",D);mxUtils.extend(A,mxEllipse);A.prototype.paintVertexShape=function(b,
-d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(d+c/8,f+e);b.lineTo(d+7*c/8,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("umlEntity",A);mxUtils.extend(da,mxShape);da.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(c,0);b.lineTo(0,e);b.moveTo(0,0);b.lineTo(c,e);b.end();b.stroke()};mxCellRenderer.registerShape("umlDestroy",da);mxUtils.extend(I,mxShape);I.prototype.getLabelBounds=function(b){return new mxRectangle(b.x,
-b.y+b.height/8,b.width,7*b.height/8)};I.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(3*c/8,e/8*1.1);b.lineTo(5*c/8,0);b.end();b.stroke();b.ellipse(0,e/8,c,7*e/8);b.fillAndStroke()};I.prototype.paintForeground=function(b,d,f,c,e){b.begin();b.moveTo(3*c/8,e/8*1.1);b.lineTo(5*c/8,e/4);b.end();b.stroke()};mxCellRenderer.registerShape("umlControl",I);mxUtils.extend(S,mxRectangleShape);S.prototype.size=40;S.prototype.isHtmlAllowed=function(){return!1};S.prototype.getLabelBounds=
-function(b){var d=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(b.x,b.y,b.width,d)};S.prototype.paintBackground=function(b,d,f,c,e){var l=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),z=mxUtils.getValue(this.style,"participant");null==z||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,b,d,f,c,l):(z=this.state.view.graph.cellRenderer.getShape(z),null!=z&&z!=S&&(z=new z,
-z.apply(this.state),b.save(),z.paintVertexShape(b,d,f,c,l),b.restore()));l<e&&(b.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),b.begin(),b.moveTo(d+c/2,f+l),b.lineTo(d+c/2,f+e),b.end(),b.stroke())};S.prototype.paintForeground=function(b,d,f,c,e){var l=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,b,d,f,c,Math.min(e,l))};mxCellRenderer.registerShape("umlLifeline",S);mxUtils.extend(Z,mxShape);
-Z.prototype.width=60;Z.prototype.height=30;Z.prototype.corner=10;Z.prototype.getLabelMargins=function(b){return new mxRectangle(0,0,b.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),b.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};Z.prototype.paintBackground=function(b,d,f,c,e){var l=this.corner,z=Math.min(c,Math.max(l,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),g=Math.min(e,Math.max(1.5*l,parseFloat(mxUtils.getValue(this.style,
-"height",this.height)))),k=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);k!=mxConstants.NONE&&(b.setFillColor(k),b.rect(d,f,c,e),b.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(b,d,f,c,e),b.setGradient(this.fill,this.gradient,d,f,c,e,this.gradientDirection)):b.setFillColor(this.fill);b.begin();b.moveTo(d,f);b.lineTo(d+z,f);b.lineTo(d+z,f+Math.max(0,g-1.5*l));b.lineTo(d+Math.max(0,z-
-l),f+g);b.lineTo(d,f+g);b.close();b.fillAndStroke();b.begin();b.moveTo(d+z,f);b.lineTo(d+c,f);b.lineTo(d+c,f+e);b.lineTo(d,f+e);b.lineTo(d,f+g);b.stroke()};mxCellRenderer.registerShape("umlFrame",Z);mxPerimeter.CenterPerimeter=function(b,d,f,c){return new mxPoint(b.getCenterX(),b.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(b,d,f,c){c=S.prototype.size;null!=d&&(c=mxUtils.getValue(d.style,"size",c)*d.view.scale);d=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||
-1)*d.view.scale/2-1;f.x<b.getCenterX()&&(d=-1*(d+1));return new mxPoint(b.getCenterX()+d,Math.min(b.y+b.height,Math.max(b.y+c,f.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(b,d,f,c){c=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(b,d,f,c){c=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||
-1)*d.view.scale/2-1;null!=d.style.backboneSize&&(c+=parseFloat(d.style.backboneSize)*d.view.scale/2-1);if("south"==d.style[mxConstants.STYLE_DIRECTION]||"north"==d.style[mxConstants.STYLE_DIRECTION])return f.x<b.getCenterX()&&(c=-1*(c+1)),new mxPoint(b.getCenterX()+c,Math.min(b.y+b.height,Math.max(b.y,f.y)));f.y<b.getCenterY()&&(c=-1*(c+1));return new mxPoint(Math.min(b.x+b.width,Math.max(b.x,f.x)),b.getCenterY()+c)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=
-function(b,d,f,c){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(b,new mxRectangle(0,0,0,Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(d.style,"size",B.prototype.size))*d.view.scale))),d.style),d,f,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),l=e?G.prototype.fixedSize:G.prototype.size;null!=d&&(l=mxUtils.getValue(d.style,"size",l));
-e&&(l*=d.view.scale);var g=b.x,z=b.y,k=b.width,m=b.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(m,l)):m*Math.max(0,Math.min(1,l)),z=[new mxPoint(g,z),new mxPoint(g+k,z+e),new mxPoint(g+k,z+m),new mxPoint(g,z+m-e),new mxPoint(g,z)]):(e=e?Math.max(0,Math.min(.5*k,l)):k*Math.max(0,Math.min(1,l)),z=[new mxPoint(g+e,z),new mxPoint(g+k,z),
-new mxPoint(g+k-e,z+m),new mxPoint(g,z+m),new mxPoint(g+e,z)]);m=b.getCenterX();b=b.getCenterY();b=new mxPoint(m,b);c&&(f.x<g||f.x>g+k?b.y=f.y:b.x=f.x);return mxUtils.getPerimeterPoint(z,b,f)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),l=e?C.prototype.fixedSize:C.prototype.size;null!=d&&(l=mxUtils.getValue(d.style,"size",l));e&&(l*=d.view.scale);var g=b.x,
-z=b.y,k=b.width,m=b.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(.5*k,l)):k*Math.max(0,Math.min(1,l)),z=[new mxPoint(g+e,z),new mxPoint(g+k-e,z),new mxPoint(g+k,z+m),new mxPoint(g,z+m),new mxPoint(g+e,z)]):d==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,l)):k*Math.max(0,Math.min(1,l)),z=[new mxPoint(g,z),new mxPoint(g+k,z),new mxPoint(g+k-e,z+m),new mxPoint(g+
-e,z+m),new mxPoint(g,z)]):d==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(m,l)):m*Math.max(0,Math.min(1,l)),z=[new mxPoint(g,z+e),new mxPoint(g+k,z),new mxPoint(g+k,z+m),new mxPoint(g,z+m-e),new mxPoint(g,z+e)]):(e=e?Math.max(0,Math.min(m,l)):m*Math.max(0,Math.min(1,l)),z=[new mxPoint(g,z),new mxPoint(g+k,z+e),new mxPoint(g+k,z+m-e),new mxPoint(g,z+m),new mxPoint(g,z)]);m=b.getCenterX();b=b.getCenterY();b=new mxPoint(m,b);c&&(f.x<g||f.x>g+k?b.y=f.y:b.x=f.x);return mxUtils.getPerimeterPoint(z,
-b,f)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),l=e?M.prototype.fixedSize:M.prototype.size;null!=d&&(l=mxUtils.getValue(d.style,"size",l));e&&(l*=d.view.scale);var g=b.x,z=b.y,k=b.width,m=b.height,q=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?
-(e=e?Math.max(0,Math.min(k,l)):k*Math.max(0,Math.min(1,l)),z=[new mxPoint(g,z),new mxPoint(g+k-e,z),new mxPoint(g+k,b),new mxPoint(g+k-e,z+m),new mxPoint(g,z+m),new mxPoint(g+e,b),new mxPoint(g,z)]):d==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,l)):k*Math.max(0,Math.min(1,l)),z=[new mxPoint(g+e,z),new mxPoint(g+k,z),new mxPoint(g+k-e,b),new mxPoint(g+k,z+m),new mxPoint(g+e,z+m),new mxPoint(g,b),new mxPoint(g+e,z)]):d==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(m,l)):m*Math.max(0,
-Math.min(1,l)),z=[new mxPoint(g,z+e),new mxPoint(q,z),new mxPoint(g+k,z+e),new mxPoint(g+k,z+m),new mxPoint(q,z+m-e),new mxPoint(g,z+m),new mxPoint(g,z+e)]):(e=e?Math.max(0,Math.min(m,l)):m*Math.max(0,Math.min(1,l)),z=[new mxPoint(g,z),new mxPoint(q,z+e),new mxPoint(g+k,z),new mxPoint(g+k,z+m-e),new mxPoint(q,z+m),new mxPoint(g,z+m-e),new mxPoint(g,z)]);q=new mxPoint(q,b);c&&(f.x<g||f.x>g+k?q.y=f.y:q.x=f.x);return mxUtils.getPerimeterPoint(z,q,f)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);
-mxPerimeter.HexagonPerimeter2=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),l=e?P.prototype.fixedSize:P.prototype.size;null!=d&&(l=mxUtils.getValue(d.style,"size",l));e&&(l*=d.view.scale);var g=b.x,z=b.y,k=b.width,m=b.height,q=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(m,l)):m*Math.max(0,
-Math.min(1,l)),z=[new mxPoint(q,z),new mxPoint(g+k,z+e),new mxPoint(g+k,z+m-e),new mxPoint(q,z+m),new mxPoint(g,z+m-e),new mxPoint(g,z+e),new mxPoint(q,z)]):(e=e?Math.max(0,Math.min(k,l)):k*Math.max(0,Math.min(1,l)),z=[new mxPoint(g+e,z),new mxPoint(g+k-e,z),new mxPoint(g+k,b),new mxPoint(g+k-e,z+m),new mxPoint(g+e,z+m),new mxPoint(g,b),new mxPoint(g+e,z)]);q=new mxPoint(q,b);c&&(f.x<g||f.x>g+k?q.y=f.y:q.x=f.x);return mxUtils.getPerimeterPoint(z,q,f)};mxStyleRegistry.putValue("hexagonPerimeter2",
-mxPerimeter.HexagonPerimeter2);mxUtils.extend(ma,mxShape);ma.prototype.size=10;ma.prototype.paintBackground=function(b,d,f,c,e){var l=parseFloat(mxUtils.getValue(this.style,"size",this.size));b.translate(d,f);b.ellipse((c-l)/2,0,l,l);b.fillAndStroke();b.begin();b.moveTo(c/2,l);b.lineTo(c/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("lollipop",ma);mxUtils.extend(ga,mxShape);ga.prototype.size=10;ga.prototype.inset=2;ga.prototype.paintBackground=function(b,d,f,c,e){var l=parseFloat(mxUtils.getValue(this.style,
-"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(d,f);b.begin();b.moveTo(c/2,l+g);b.lineTo(c/2,e);b.end();b.stroke();b.begin();b.moveTo((c-l)/2-g,l/2);b.quadTo((c-l)/2-g,l+g,c/2,l+g);b.quadTo((c+l)/2+g,l+g,(c+l)/2+g,l/2);b.end();b.stroke()};mxCellRenderer.registerShape("requires",ga);mxUtils.extend(ia,mxShape);ia.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);
-b.end();b.stroke()};mxCellRenderer.registerShape("requiredInterface",ia);mxUtils.extend(la,mxShape);la.prototype.inset=2;la.prototype.paintBackground=function(b,d,f,c,e){var l=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(d,f);b.ellipse(0,l,c-2*l,e-2*l);b.fillAndStroke();b.begin();b.moveTo(c/2,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,c/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",la);mxUtils.extend(W,mxCylinder);W.prototype.jettyWidth=
-20;W.prototype.jettyHeight=10;W.prototype.redrawPath=function(b,d,f,c,e,l){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));f=g/2;var g=f+g/2,z=Math.min(d,e-d),k=Math.min(z+2*d,e-d);l?(b.moveTo(f,z),b.lineTo(g,z),b.lineTo(g,z+d),b.lineTo(f,z+d),b.moveTo(f,k),b.lineTo(g,k),b.lineTo(g,k+d),b.lineTo(f,k+d)):(b.moveTo(f,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(f,e),b.lineTo(f,k+d),b.lineTo(0,k+d),b.lineTo(0,
-k),b.lineTo(f,k),b.lineTo(f,z+d),b.lineTo(0,z+d),b.lineTo(0,z),b.lineTo(f,z),b.close());b.end()};mxCellRenderer.registerShape("module",W);mxUtils.extend(fa,mxCylinder);fa.prototype.jettyWidth=32;fa.prototype.jettyHeight=12;fa.prototype.redrawPath=function(b,d,f,c,e,l){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));f=g/2;var g=f+g/2,z=.3*e-d/2,k=.7*e-d/2;l?(b.moveTo(f,z),b.lineTo(g,z),b.lineTo(g,
-z+d),b.lineTo(f,z+d),b.moveTo(f,k),b.lineTo(g,k),b.lineTo(g,k+d),b.lineTo(f,k+d)):(b.moveTo(f,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(f,e),b.lineTo(f,k+d),b.lineTo(0,k+d),b.lineTo(0,k),b.lineTo(f,k),b.lineTo(f,z+d),b.lineTo(0,z+d),b.lineTo(0,z),b.lineTo(f,z),b.close());b.end()};mxCellRenderer.registerShape("component",fa);mxUtils.extend(na,mxRectangleShape);na.prototype.paintForeground=function(b,d,f,c,e){var l=c/2,g=e/2,z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;b.begin();this.addPoints(b,[new mxPoint(d+l,f),new mxPoint(d+c,f+g),new mxPoint(d+l,f+e),new mxPoint(d,f+g)],this.isRounded,z,!0);b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",na);mxUtils.extend(V,mxDoubleEllipse);V.prototype.outerStroke=!0;V.prototype.paintVertexShape=function(b,d,f,c,e){var l=Math.min(4,Math.min(c/5,e/5));0<c&&0<e&&(b.ellipse(d+l,f+l,c-2*l,e-2*l),b.fillAndStroke());b.setShadow(!1);this.outerStroke&&
-(b.ellipse(d,f,c,e),b.stroke())};mxCellRenderer.registerShape("endState",V);mxUtils.extend(Q,V);Q.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Q);mxUtils.extend(pa,mxArrowConnector);pa.prototype.defaultWidth=4;pa.prototype.isOpenEnded=function(){return!0};pa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};pa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",
-pa);mxUtils.extend(X,mxArrowConnector);X.prototype.defaultWidth=10;X.prototype.defaultArrowWidth=20;X.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};X.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};X.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",
-X);mxUtils.extend(ea,mxActor);ea.prototype.size=30;ea.prototype.isRoundable=function(){return!0};ea.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(0,d),new mxPoint(c,0),new mxPoint(c,e)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("manualInput",ea);mxUtils.extend(ja,mxRectangleShape);ja.prototype.dx=
-20;ja.prototype.dy=20;ja.prototype.isHtmlAllowed=function(){return!1};ja.prototype.paintForeground=function(b,d,f,c,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var l=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,l=Math.max(l,Math.min(c*g,e*g));g=Math.max(l,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));l=Math.max(l,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));
-b.begin();b.moveTo(d,f+l);b.lineTo(d+c,f+l);b.end();b.stroke();b.begin();b.moveTo(d+g,f);b.lineTo(d+g,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("internalStorage",ja);mxUtils.extend(ra,mxActor);ra.prototype.dx=20;ra.prototype.dy=20;ra.prototype.redrawPath=function(b,d,f,c,e){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));
-var l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f),new mxPoint(d,f),new mxPoint(d,e),new mxPoint(0,e)],this.isRounded,l,!0);b.end()};mxCellRenderer.registerShape("corner",ra);mxUtils.extend(U,mxActor);U.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.lineTo(0,e);b.end();b.moveTo(c,0);b.lineTo(c,e);b.end();b.moveTo(0,e/2);b.lineTo(c,e/2);b.end()};mxCellRenderer.registerShape("crossbar",
-U);mxUtils.extend(ka,mxActor);ka.prototype.dx=20;ka.prototype.dy=20;ka.prototype.redrawPath=function(b,d,f,c,e){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f),new mxPoint((c+
-d)/2,f),new mxPoint((c+d)/2,e),new mxPoint((c-d)/2,e),new mxPoint((c-d)/2,f),new mxPoint(0,f)],this.isRounded,l,!0);b.end()};mxCellRenderer.registerShape("tee",ka);mxUtils.extend(aa,mxActor);aa.prototype.arrowWidth=.3;aa.prototype.arrowSize=.2;aa.prototype.redrawPath=function(b,d,f,c,e){var l=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));f=(e-l)/2;var l=
-f+l,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,f),new mxPoint(c-d,f),new mxPoint(c-d,0),new mxPoint(c,e/2),new mxPoint(c-d,e),new mxPoint(c-d,l),new mxPoint(0,l)],this.isRounded,g,!0);b.end()};mxCellRenderer.registerShape("singleArrow",aa);mxUtils.extend(oa,mxActor);oa.prototype.redrawPath=function(b,d,f,c,e){var l=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",aa.prototype.arrowWidth))));d=c*Math.max(0,
-Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",aa.prototype.arrowSize))));f=(e-l)/2;var l=f+l,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e/2),new mxPoint(d,0),new mxPoint(d,f),new mxPoint(c-d,f),new mxPoint(c-d,0),new mxPoint(c,e/2),new mxPoint(c-d,e),new mxPoint(c-d,l),new mxPoint(d,l),new mxPoint(d,e)],this.isRounded,g,!0);b.end()};mxCellRenderer.registerShape("doubleArrow",oa);mxUtils.extend(sa,mxActor);sa.prototype.size=
-.1;sa.prototype.fixedSize=20;sa.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(d,0);b.lineTo(c,0);b.quadTo(c-2*d,e/2,c,e);b.lineTo(d,e);b.quadTo(d-2*d,e/2,d,0);b.close();b.end()};mxCellRenderer.registerShape("dataStorage",sa);mxUtils.extend(ca,mxActor);ca.prototype.redrawPath=
-function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.close();b.end()};mxCellRenderer.registerShape("or",ca);mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.quadTo(c/2,e/2,0,0);b.close();b.end()};mxCellRenderer.registerShape("xor",O);mxUtils.extend(ta,mxActor);ta.prototype.size=20;ta.prototype.isRoundable=function(){return!0};ta.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.8*d),new mxPoint(c,e),new mxPoint(0,e),new mxPoint(0,.8*d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("loopLimit",ta);mxUtils.extend(ba,mxActor);ba.prototype.size=.375;ba.prototype.isRoundable=function(){return!0};ba.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,e-d),new mxPoint(c/2,e),new mxPoint(0,e-d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("offPageConnector",ba);mxUtils.extend(xa,mxEllipse);xa.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(d+c/2,f+e);b.lineTo(d+c,f+e);b.end();b.stroke()};
-mxCellRenderer.registerShape("tapeData",xa);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(d,f+e/2);b.lineTo(d+c,f+e/2);b.end();b.stroke();b.begin();b.moveTo(d+c/2,f);b.lineTo(d+c/2,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("orEllipse",ua);mxUtils.extend(ya,mxEllipse);ya.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);b.setShadow(!1);b.begin();b.moveTo(d+.145*c,f+.145*e);b.lineTo(d+.855*c,f+.855*e);b.end();b.stroke();b.begin();b.moveTo(d+.855*c,f+.145*e);b.lineTo(d+.145*c,f+.855*e);b.end();b.stroke()};mxCellRenderer.registerShape("sumEllipse",ya);mxUtils.extend(Ea,mxRhombus);Ea.prototype.paintVertexShape=function(b,d,f,c,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(d,f+e/2);b.lineTo(d+c,f+e/2);b.end();b.stroke()};mxCellRenderer.registerShape("sortShape",
-Ea);mxUtils.extend(Ja,mxEllipse);Ja.prototype.paintVertexShape=function(b,d,f,c,e){b.begin();b.moveTo(d,f);b.lineTo(d+c,f);b.lineTo(d+c/2,f+e/2);b.close();b.fillAndStroke();b.begin();b.moveTo(d,f+e);b.lineTo(d+c,f+e);b.lineTo(d+c/2,f+e/2);b.close();b.fillAndStroke()};mxCellRenderer.registerShape("collate",Ja);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=function(b,d,f,c,e){var l=f+e-5;b.begin();b.moveTo(d,f);b.lineTo(d,f+e);b.moveTo(d,l);b.lineTo(d+10,l-5);b.moveTo(d,l);b.lineTo(d+10,
-l+5);b.moveTo(d,l);b.lineTo(d+c,l);b.moveTo(d+c,f);b.lineTo(d+c,f+e);b.moveTo(d+c,l);b.lineTo(d+c-10,l-5);b.moveTo(d+c,l);b.lineTo(d+c-10,l+5);b.end();b.stroke()};mxCellRenderer.registerShape("dimension",Ba);mxUtils.extend(Ha,mxEllipse);Ha.prototype.paintVertexShape=function(b,d,f,c,e){this.outline||b.setStrokeColor(null);if(null!=this.style){var l=b.pointerEvents;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||null!=this.fill&&this.fill!=mxConstants.NONE||(b.pointerEvents=
-!1);b.rect(d,f,c,e);b.fill();b.pointerEvents=l;b.setStrokeColor(this.stroke);b.begin();b.moveTo(d,f);this.outline||"1"==mxUtils.getValue(this.style,"top","1")?b.lineTo(d+c,f):b.moveTo(d+c,f);this.outline||"1"==mxUtils.getValue(this.style,"right","1")?b.lineTo(d+c,f+e):b.moveTo(d+c,f+e);this.outline||"1"==mxUtils.getValue(this.style,"bottom","1")?b.lineTo(d,f+e):b.moveTo(d,f+e);(this.outline||"1"==mxUtils.getValue(this.style,"left","1"))&&b.lineTo(d,f);b.end();b.stroke()}};mxCellRenderer.registerShape("partialRectangle",
-Ha);mxUtils.extend(wa,mxEllipse);wa.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();"vertical"==mxUtils.getValue(this.style,"line")?(b.moveTo(d+c/2,f),b.lineTo(d+c/2,f+e)):(b.moveTo(d,f+e/2),b.lineTo(d+c,f+e/2));b.end();b.stroke()};mxCellRenderer.registerShape("lineEllipse",wa);mxUtils.extend(za,mxActor);za.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/2);b.moveTo(0,0);b.lineTo(c-d,0);b.quadTo(c,0,c,e/2);
-b.quadTo(c,e,c-d,e);b.lineTo(0,e);b.close();b.end()};mxCellRenderer.registerShape("delay",za);mxUtils.extend(va,mxActor);va.prototype.size=.2;va.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(e,c);var l=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=(e-l)/2;f=d+l;var g=(c-l)/2,l=g+l;b.moveTo(0,d);b.lineTo(g,d);b.lineTo(g,0);b.lineTo(l,0);b.lineTo(l,d);b.lineTo(c,d);b.lineTo(c,f);b.lineTo(l,f);b.lineTo(l,e);b.lineTo(g,e);b.lineTo(g,f);b.lineTo(0,f);b.close();
-b.end()};mxCellRenderer.registerShape("cross",va);mxUtils.extend(Aa,mxActor);Aa.prototype.size=.25;Aa.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/2);f=Math.min(c-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);b.moveTo(0,e/2);b.lineTo(f,0);b.lineTo(c-d,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,c-d,e);b.lineTo(f,e);b.close();b.end()};mxCellRenderer.registerShape("display",Aa);mxUtils.extend(Y,mxActor);Y.prototype.cst={RECT2:"mxgraph.basic.rect"};Y.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"}]}];Y.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);this.strictDrawShape(b,0,0,c,e)};Y.prototype.strictDrawShape=function(b,d,f,c,e,l){var g=l&&l.rectStyle?l.rectStyle:
-mxUtils.getValue(this.style,"rectStyle",this.rectStyle),k=l&&l.absoluteCornerSize?l.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),m=l&&l.size?l.size:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),q=l&&l.rectOutline?l.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),n=l&&l.indent?l.indent:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),z=l&&l.dashed?l.dashed:
-mxUtils.getValue(this.style,"dashed",!1),F=l&&l.dashPattern?l.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),v=l&&l.relIndent?l.relIndent:Math.max(0,Math.min(50,n)),p=l&&l.top?l.top:mxUtils.getValue(this.style,"top",!0),u=l&&l.right?l.right:mxUtils.getValue(this.style,"right",!0),D=l&&l.bottom?l.bottom:mxUtils.getValue(this.style,"bottom",!0),A=l&&l.left?l.left:mxUtils.getValue(this.style,"left",!0),x=l&&l.topLeftStyle?l.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),
-I=l&&l.topRightStyle?l.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),t=l&&l.bottomRightStyle?l.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),y=l&&l.bottomLeftStyle?l.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),C=l&&l.fillColor?l.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");l&&l.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var da=l&&l.strokeWidth?l.strokeWidth:mxUtils.getValue(this.style,
-"strokeWidth","1"),B=l&&l.fillColor2?l.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),N=l&&l.gradientColor2?l.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),qa=l&&l.gradientDirection2?l.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),S=l&&l.opacity?l.opacity:mxUtils.getValue(this.style,"opacity","100"),Z=Math.max(0,Math.min(50,m));l=Y.prototype;b.setDashed(z);F&&""!=F&&b.setDashPattern(F);b.setStrokeWidth(da);m=Math.min(.5*e,.5*c,m);k||
-(m=Z*Math.min(c,e)/100);m=Math.min(m,.5*Math.min(c,e));k||(n=Math.min(v*Math.min(c,e)/100));n=Math.min(n,.5*Math.min(c,e)-m);(p||u||D||A)&&"frame"!=q&&(b.begin(),p?l.moveNW(b,d,f,c,e,g,x,m,A):b.moveTo(0,0),p&&l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),u&&l.paintNE(b,d,f,c,e,g,I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),D&&l.paintSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),A&&l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),b.close(),b.fill(),b.setShadow(!1),b.setFillColor(B),
-z=k=S,"none"==B&&(k=0),"none"==N&&(z=0),b.setGradient(B,N,0,0,c,e,qa,k,z),b.begin(),p?l.moveNWInner(b,d,f,c,e,g,x,m,n,p,A):b.moveTo(n,0),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),A&&D&&l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D),D&&u&&l.paintSEInner(b,d,f,c,e,g,t,m,n),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u),u&&p&&l.paintNEInner(b,d,f,c,e,g,I,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),p&&A&&l.paintNWInner(b,d,f,c,e,g,x,m,n),b.fill(),"none"==C&&(b.begin(),l.paintFolds(b,
-d,f,c,e,g,x,I,t,y,m,p,u,D,A),b.stroke()));p||u||D||!A?p||u||!D||A?!p&&!u&&D&&A?"frame"!=q?(b.begin(),l.moveSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),"double"==q&&(l.moveNWInner(b,d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D)),b.stroke()):(b.begin(),l.moveSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,
-D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.lineNWInner(b,d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D),b.close(),b.fillAndStroke()):p||!u||D||A?!p&&u&&!D&&A?"frame"!=q?(b.begin(),l.moveSW(b,d,f,c,e,g,x,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),"double"==q&&(l.moveNWInner(b,d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A)),b.stroke(),b.begin(),l.moveNE(b,d,f,c,e,g,I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),"double"==
-q&&(l.moveSEInner(b,d,f,c,e,g,t,m,n,D),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u)),b.stroke()):(b.begin(),l.moveSW(b,d,f,c,e,g,x,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.lineNWInner(b,d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),b.close(),b.fillAndStroke(),b.begin(),l.moveNE(b,d,f,c,e,g,I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),l.lineSEInner(b,d,f,c,e,g,t,m,n,D),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u),b.close(),b.fillAndStroke()):!p&&u&&D&&!A?"frame"!=q?(b.begin(),l.moveNE(b,d,f,c,e,g,I,
-m,p),l.paintRight(b,d,f,c,e,g,t,m,D),l.paintSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),"double"==q&&(l.moveSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D),l.paintSEInner(b,d,f,c,e,g,t,m,n),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u)),b.stroke()):(b.begin(),l.moveNE(b,d,f,c,e,g,I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),l.paintSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.lineSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D),l.paintSEInner(b,
-d,f,c,e,g,t,m,n),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u),b.close(),b.fillAndStroke()):!p&&u&&D&&A?"frame"!=q?(b.begin(),l.moveNE(b,d,f,c,e,g,I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),l.paintSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),"double"==q&&(l.moveNWInner(b,d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D),l.paintSEInner(b,d,f,c,e,g,t,
-m,n),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u)),b.stroke()):(b.begin(),l.moveNE(b,d,f,c,e,g,I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),l.paintSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.lineNWInner(b,d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D),l.paintSEInner(b,d,f,c,e,g,t,m,n),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u),b.close(),b.fillAndStroke()):
-!p||u||D||A?p&&!u&&!D&&A?"frame"!=q?(b.begin(),l.moveSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),"double"==q&&(l.moveNEInner(b,d,f,c,e,g,I,m,n,u),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A)),b.stroke()):(b.begin(),l.moveSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),l.lineNEInner(b,d,f,c,e,g,I,m,n,
-u),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),b.close(),b.fillAndStroke()):p&&!u&&D&&!A?"frame"!=q?(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),"double"==q&&(l.moveNEInner(b,d,f,c,e,g,I,m,n,u),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p)),b.stroke(),b.begin(),l.moveSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),"double"==q&&(l.moveSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D)),
-b.stroke()):(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),l.lineNEInner(b,d,f,c,e,g,I,m,n,u),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),b.close(),b.fillAndStroke(),b.begin(),l.moveSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.lineSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D),b.close(),b.fillAndStroke()):p&&!u&&D&&A?"frame"!=q?(b.begin(),l.moveSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,
-c,e,g,x,m,p),l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),"double"==q&&(l.moveNEInner(b,d,f,c,e,g,I,m,n,u),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D)),b.stroke()):(b.begin(),l.moveSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,
-f,c,e,g,I,m,u),l.lineNEInner(b,d,f,c,e,g,I,m,n,u),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D),b.close(),b.fillAndStroke()):p&&u&&!D&&!A?"frame"!=q?(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),l.paintNE(b,d,f,c,e,g,I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),"double"==q&&(l.moveSEInner(b,d,f,c,e,g,t,m,n,D),l.paintRightInner(b,d,f,c,e,
-g,I,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,I,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p)),b.stroke()):(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),l.paintNE(b,d,f,c,e,g,I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),l.lineSEInner(b,d,f,c,e,g,t,m,n,D),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,I,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),b.close(),b.fillAndStroke()):p&&u&&!D&&A?"frame"!=q?(b.begin(),l.moveSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.paintNW(b,
-d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),l.paintNE(b,d,f,c,e,g,I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),"double"==q&&(l.moveSEInner(b,d,f,c,e,g,t,m,n,D),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,I,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A)),b.stroke()):(b.begin(),l.moveSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),l.paintNE(b,d,
-f,c,e,g,I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),l.lineSEInner(b,d,f,c,e,g,t,m,n,D),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,I,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),b.close(),b.fillAndStroke()):p&&u&&D&&!A?"frame"!=q?(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),l.paintNE(b,d,f,c,e,g,I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),l.paintSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,
-c,e,g,y,m,A),"double"==q&&(l.moveSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D),l.paintSEInner(b,d,f,c,e,g,t,m,n),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,I,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p)),b.stroke()):(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),l.paintNE(b,d,f,c,e,g,I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),l.paintSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.lineSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,
-d,f,c,e,g,t,m,n,u,D),l.paintSEInner(b,d,f,c,e,g,t,m,n),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,I,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),b.close(),b.fillAndStroke()):p&&u&&D&&A&&("frame"!=q?(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),l.paintNE(b,d,f,c,e,g,I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),l.paintSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),
-b.close(),"double"==q&&(l.moveSWInner(b,d,f,c,e,g,y,m,n,A),l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D),l.paintSEInner(b,d,f,c,e,g,t,m,n),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,I,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),b.close()),b.stroke()):(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),l.paintNE(b,d,f,c,e,g,
-I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),l.paintSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),b.close(),l.moveSWInner(b,d,f,c,e,g,y,m,n,A),l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D),l.paintSEInner(b,d,f,c,e,g,t,m,n),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,I,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,e,g,y,m,n,
-D,A),b.close(),b.fillAndStroke())):"frame"!=q?(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),"double"==q&&(l.moveNEInner(b,d,f,c,e,g,I,m,n,u),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p)),b.stroke()):(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),l.lineNEInner(b,d,f,c,e,g,I,m,n,u),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),l.moveNE(b,d,f,c,e,g,I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),"double"==q&&(l.moveSEInner(b,d,
-f,c,e,g,t,m,n,D),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u)),b.stroke()):(b.begin(),l.moveNE(b,d,f,c,e,g,I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),l.lineSEInner(b,d,f,c,e,g,t,m,n,D),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),l.moveSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),"double"==q&&(l.moveSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D)),b.stroke()):(b.begin(),l.moveSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,
-m,A),l.lineSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),l.moveSW(b,d,f,c,e,g,x,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),"double"==q&&(l.moveNWInner(b,d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A)),b.stroke()):(b.begin(),l.moveSW(b,d,f,c,e,g,x,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.lineNWInner(b,d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),b.close(),b.fillAndStroke());b.begin();l.paintFolds(b,d,f,
-c,e,g,x,I,t,y,m,p,u,D,A);b.stroke()};Y.prototype.moveNW=function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==g&&"square"==l||!k?b.moveTo(0,0):b.moveTo(0,m)};Y.prototype.moveNE=function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==g&&"square"==l||!k?b.moveTo(c,0):b.moveTo(c-m,0)};Y.prototype.moveSE=function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==g&&"square"==l||!k?b.moveTo(c,e):b.moveTo(c,e-m)};Y.prototype.moveSW=function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==g&&"square"==l||!k?b.moveTo(0,e):
-b.moveTo(m,e)};Y.prototype.paintNW=function(b,d,f,c,e,l,g,m,k){if(k)if("rounded"==g||"default"==g&&"rounded"==l||"invRound"==g||"default"==g&&"invRound"==l){d=0;if("rounded"==g||"default"==g&&"rounded"==l)d=1;b.arcTo(m,m,0,0,d,m,0)}else("snip"==g||"default"==g&&"snip"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(m,0);else b.lineTo(0,0)};Y.prototype.paintTop=function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==g&&"square"==l||!k?b.lineTo(c,0):b.lineTo(c-m,0)};Y.prototype.paintNE=function(b,d,f,
-c,e,l,g,m,k){if(k)if("rounded"==g||"default"==g&&"rounded"==l||"invRound"==g||"default"==g&&"invRound"==l){d=0;if("rounded"==g||"default"==g&&"rounded"==l)d=1;b.arcTo(m,m,0,0,d,c,m)}else("snip"==g||"default"==g&&"snip"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(c,m);else b.lineTo(c,0)};Y.prototype.paintRight=function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==g&&"square"==l||!k?b.lineTo(c,e):b.lineTo(c,e-m)};Y.prototype.paintLeft=function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==g&&"square"==
-l||!k?b.lineTo(0,0):b.lineTo(0,m)};Y.prototype.paintSE=function(b,d,f,c,e,l,g,m,k){if(k)if("rounded"==g||"default"==g&&"rounded"==l||"invRound"==g||"default"==g&&"invRound"==l){d=0;if("rounded"==g||"default"==g&&"rounded"==l)d=1;b.arcTo(m,m,0,0,d,c-m,e)}else("snip"==g||"default"==g&&"snip"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(c-m,e);else b.lineTo(c,e)};Y.prototype.paintBottom=function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==g&&"square"==l||!k?b.lineTo(0,e):b.lineTo(m,e)};Y.prototype.paintSW=
-function(b,d,f,c,e,l,g,m,k){if(k)if("rounded"==g||"default"==g&&"rounded"==l||"invRound"==g||"default"==g&&"invRound"==l){d=0;if("rounded"==g||"default"==g&&"rounded"==l)d=1;b.arcTo(m,m,0,0,d,0,e-m)}else("snip"==g||"default"==g&&"snip"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(0,e-m);else b.lineTo(0,e)};Y.prototype.paintNWInner=function(b,d,f,c,e,l,g,m,k){if("rounded"==g||"default"==g&&"rounded"==l)b.arcTo(m-.5*k,m-.5*k,0,0,0,k,.5*k+m);else if("invRound"==g||"default"==g&&"invRound"==l)b.arcTo(m+
-k,m+k,0,0,1,k,k+m);else if("snip"==g||"default"==g&&"snip"==l)b.lineTo(k,.5*k+m);else if("fold"==g||"default"==g&&"fold"==l)b.lineTo(k+m,k+m),b.lineTo(k,k+m)};Y.prototype.paintTopInner=function(b,d,f,c,e,l,g,m,k,n,q){n||q?!n&&q?b.lineTo(0,k):n&&!q?b.lineTo(k,0):n?"square"==g||"default"==g&&"square"==l?b.lineTo(k,k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.lineTo(m+.5*k,k):b.lineTo(m+k,k):b.lineTo(0,k):b.lineTo(0,0)};Y.prototype.paintNEInner=function(b,d,f,c,e,
-l,g,m,k){if("rounded"==g||"default"==g&&"rounded"==l)b.arcTo(m-.5*k,m-.5*k,0,0,0,c-m-.5*k,k);else if("invRound"==g||"default"==g&&"invRound"==l)b.arcTo(m+k,m+k,0,0,1,c-m-k,k);else if("snip"==g||"default"==g&&"snip"==l)b.lineTo(c-m-.5*k,k);else if("fold"==g||"default"==g&&"fold"==l)b.lineTo(c-m-k,m+k),b.lineTo(c-m-k,k)};Y.prototype.paintRightInner=function(b,d,f,c,e,l,g,m,k,n,q){n||q?!n&&q?b.lineTo(c-k,0):n&&!q?b.lineTo(c,k):n?"square"==g||"default"==g&&"square"==l?b.lineTo(c-k,k):"rounded"==g||"default"==
-g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.lineTo(c-k,m+.5*k):b.lineTo(c-k,m+k):b.lineTo(c-k,0):b.lineTo(c,0)};Y.prototype.paintLeftInner=function(b,d,f,c,e,l,g,m,k,n,q){n||q?!n&&q?b.lineTo(k,e):n&&!q?b.lineTo(0,e-k):n?"square"==g||"default"==g&&"square"==l?b.lineTo(k,e-k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.lineTo(k,e-m-.5*k):b.lineTo(k,e-m-k):b.lineTo(k,e):b.lineTo(0,e)};Y.prototype.paintSEInner=function(b,d,f,c,e,l,g,m,k){if("rounded"==g||"default"==
-g&&"rounded"==l)b.arcTo(m-.5*k,m-.5*k,0,0,0,c-k,e-m-.5*k);else if("invRound"==g||"default"==g&&"invRound"==l)b.arcTo(m+k,m+k,0,0,1,c-k,e-m-k);else if("snip"==g||"default"==g&&"snip"==l)b.lineTo(c-k,e-m-.5*k);else if("fold"==g||"default"==g&&"fold"==l)b.lineTo(c-m-k,e-m-k),b.lineTo(c-k,e-m-k)};Y.prototype.paintBottomInner=function(b,d,f,c,e,l,g,m,k,n,q){n||q?!n&&q?b.lineTo(c,e-k):n&&!q?b.lineTo(c-k,e):"square"==g||"default"==g&&"square"==l||!n?b.lineTo(c-k,e-k):"rounded"==g||"default"==g&&"rounded"==
-l||"snip"==g||"default"==g&&"snip"==l?b.lineTo(c-m-.5*k,e-k):b.lineTo(c-m-k,e-k):b.lineTo(c,e)};Y.prototype.paintSWInner=function(b,d,f,c,e,l,g,m,k,n){if(!n)b.lineTo(k,e);else if("square"==g||"default"==g&&"square"==l)b.lineTo(k,e-k);else if("rounded"==g||"default"==g&&"rounded"==l)b.arcTo(m-.5*k,m-.5*k,0,0,0,m+.5*k,e-k);else if("invRound"==g||"default"==g&&"invRound"==l)b.arcTo(m+k,m+k,0,0,1,m+k,e-k);else if("snip"==g||"default"==g&&"snip"==l)b.lineTo(m+.5*k,e-k);else if("fold"==g||"default"==g&&
-"fold"==l)b.lineTo(k+m,e-m-k),b.lineTo(k+m,e-k)};Y.prototype.moveSWInner=function(b,d,f,c,e,l,g,m,k,n){n?"square"==g||"default"==g&&"square"==l?b.moveTo(k,e-k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.moveTo(k,e-m-.5*k):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.moveTo(k,e-m-k):b.moveTo(0,e-k)};Y.prototype.lineSWInner=function(b,d,f,c,e,l,g,m,k,n){n?"square"==g||"default"==g&&"square"==l?b.lineTo(k,e-k):"rounded"==g||"default"==
-g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.lineTo(k,e-m-.5*k):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(k,e-m-k):b.lineTo(0,e-k)};Y.prototype.moveSEInner=function(b,d,f,c,e,l,g,m,k,n){n?"square"==g||"default"==g&&"square"==l?b.moveTo(c-k,e-k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.moveTo(c-k,e-m-.5*k):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.moveTo(c-k,e-m-
-k):b.moveTo(c-k,e)};Y.prototype.lineSEInner=function(b,d,f,c,e,l,g,m,k,n){n?"square"==g||"default"==g&&"square"==l?b.lineTo(c-k,e-k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.lineTo(c-k,e-m-.5*k):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(c-k,e-m-k):b.lineTo(c-k,e)};Y.prototype.moveNEInner=function(b,d,f,c,e,l,g,m,k,n){n?"square"==g||"default"==g&&"square"==l||n?b.moveTo(c-k,k):"rounded"==g||"default"==g&&"rounded"==
-l||"snip"==g||"default"==g&&"snip"==l?b.moveTo(c-k,m+.5*k):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.moveTo(c-k,m+k):b.moveTo(c,k)};Y.prototype.lineNEInner=function(b,d,f,c,e,l,g,m,k,n){n?"square"==g||"default"==g&&"square"==l||n?b.lineTo(c-k,k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.lineTo(c-k,m+.5*k):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(c-k,m+k):b.lineTo(c,k)};
-Y.prototype.moveNWInner=function(b,d,f,c,e,l,g,m,k,n,q){n||q?!n&&q?b.moveTo(k,0):n&&!q?b.moveTo(0,k):"square"==g||"default"==g&&"square"==l?b.moveTo(k,k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.moveTo(k,m+.5*k):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.moveTo(k,m+k):b.moveTo(0,0)};Y.prototype.lineNWInner=function(b,d,f,c,e,l,g,k,m,n,q){n||q?!n&&q?b.lineTo(m,0):n&&!q?b.lineTo(0,m):"square"==g||"default"==g&&"square"==
-l?b.lineTo(m,m):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.lineTo(m,k+.5*m):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(m,k+m):b.lineTo(0,0)};Y.prototype.paintFolds=function(b,d,f,c,e,l,g,m,k,n,q,F,p,A,u){if("fold"==l||"fold"==g||"fold"==m||"fold"==k||"fold"==n)("fold"==g||"default"==g&&"fold"==l)&&F&&u&&(b.moveTo(0,q),b.lineTo(q,q),b.lineTo(q,0)),("fold"==m||"default"==m&&"fold"==l)&&F&&p&&(b.moveTo(c-q,0),b.lineTo(c-
-q,q),b.lineTo(c,q)),("fold"==k||"default"==k&&"fold"==l)&&A&&p&&(b.moveTo(c-q,e),b.lineTo(c-q,e-q),b.lineTo(c,e-q)),("fold"==n||"default"==n&&"fold"==l)&&A&&u&&(b.moveTo(0,e-q),b.lineTo(q,e-q),b.lineTo(q,e))};mxCellRenderer.registerShape(Y.prototype.cst.RECT2,Y);Y.prototype.constraints=null;mxUtils.extend(Fa,mxConnector);Fa.prototype.origPaintEdgeShape=Fa.prototype.paintEdgeShape;Fa.prototype.paintEdgeShape=function(b,d,f){for(var c=[],e=0;e<d.length;e++)c.push(mxUtils.clone(d[e]));var e=b.state.dashed,
-l=b.state.fixDash;Fa.prototype.origPaintEdgeShape.apply(this,[b,c,f]);3<=b.state.strokeWidth&&(c=mxUtils.getValue(this.style,"fillColor",null),null!=c&&(b.setStrokeColor(c),b.setStrokeWidth(b.state.strokeWidth-2),b.setDashed(e,l),Fa.prototype.origPaintEdgeShape.apply(this,[b,d,f])))};mxCellRenderer.registerShape("filledEdge",Fa);"undefined"!==typeof StyleFormatPanel&&function(){var b=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var d=this.format.getSelectionState(),
-f=b.apply(this,arguments);"umlFrame"==d.style.shape&&f.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return f}}();mxMarker.addMarker("dash",function(b,d,f,c,e,l,g,m,k,n){var q=e*(g+k+1),F=l*(g+k+1);return function(){b.begin();b.moveTo(c.x-q/2-F/2,c.y-F/2+q/2);b.lineTo(c.x+F/2-3*q/2,c.y-3*F/2-q/2);b.stroke()}});mxMarker.addMarker("box",function(b,d,f,c,e,l,g,m,k,n){var q=e*(g+k+1),F=l*(g+k+1),p=c.x+q/2,z=c.y+F/2;c.x-=q;c.y-=F;return function(){b.begin();
-b.moveTo(p-q/2-F/2,z-F/2+q/2);b.lineTo(p-q/2+F/2,z-F/2-q/2);b.lineTo(p+F/2-3*q/2,z-3*F/2-q/2);b.lineTo(p-F/2-3*q/2,z-3*F/2+q/2);b.close();n?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("cross",function(b,d,f,c,e,l,g,m,k,n){var q=e*(g+k+1),F=l*(g+k+1);return function(){b.begin();b.moveTo(c.x-q/2-F/2,c.y-F/2+q/2);b.lineTo(c.x+F/2-3*q/2,c.y-3*F/2-q/2);b.moveTo(c.x-q/2+F/2,c.y-F/2-q/2);b.lineTo(c.x-F/2-3*q/2,c.y-3*F/2+q/2);b.stroke()}});mxMarker.addMarker("circle",Ua);mxMarker.addMarker("circlePlus",
-function(b,d,f,c,e,l,g,k,m,n){var q=c.clone(),F=Ua.apply(this,arguments),p=e*(g+2*m),z=l*(g+2*m);return function(){F.apply(this,arguments);b.begin();b.moveTo(q.x-e*m,q.y-l*m);b.lineTo(q.x-2*p+e*m,q.y-2*z+l*m);b.moveTo(q.x-p-z+l*m,q.y-z+p-e*m);b.lineTo(q.x+z-p-l*m,q.y-z-p+e*m);b.stroke()}});mxMarker.addMarker("halfCircle",function(b,d,f,c,e,l,g,m,k,n){var q=e*(g+k+1),F=l*(g+k+1),p=c.clone();c.x-=q;c.y-=F;return function(){b.begin();b.moveTo(p.x-F,p.y+q);b.quadTo(c.x-F,c.y+q,c.x,c.y);b.quadTo(c.x+F,
-c.y-q,p.x+F,p.y-q);b.stroke()}});mxMarker.addMarker("async",function(b,d,f,c,e,l,g,m,k,n){d=e*k*1.118;f=l*k*1.118;e*=g+k;l*=g+k;var q=c.clone();q.x-=d;q.y-=f;c.x+=1*-e-d;c.y+=1*-l-f;return function(){b.begin();b.moveTo(q.x,q.y);m?b.lineTo(q.x-e-l/2,q.y-l+e/2):b.lineTo(q.x+l/2-e,q.y-l-e/2);b.lineTo(q.x-e,q.y-l);b.close();n?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("openAsync",function(b){b=null!=b?b:2;return function(d,f,c,e,l,g,m,k,n,q){l*=m+n;g*=m+n;var F=e.clone();return function(){d.begin();
-d.moveTo(F.x,F.y);k?d.lineTo(F.x-l-g/b,F.y-g+l/b):d.lineTo(F.x+g/b-l,F.y-g-l/b);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ya=function(b,d,f){return La(b,["width"],d,function(d,c,e,l,g){g=b.shape.getEdgeWidth()*b.view.scale+f;return new mxPoint(l.x+c*d/4+e*g/2,l.y+e*d/4-c*g/2)},function(d,c,e,l,g,m){d=Math.sqrt(mxUtils.ptSegDistSq(l.x,l.y,g.x,g.y,m.x,m.y));b.style.width=Math.round(2*d)/b.view.scale-f})},La=function(b,d,f,c,e){return ha(b,d,function(d){var e=b.absolutePoints,l=
-e.length-1;d=b.view.translate;var g=b.view.scale,m=f?e[0]:e[l],e=f?e[1]:e[l-1],l=e.x-m.x,k=e.y-m.y,n=Math.sqrt(l*l+k*k),m=c.call(this,n,l/n,k/n,m,e);return new mxPoint(m.x/g-d.x,m.y/g-d.y)},function(d,c,l){var g=b.absolutePoints,m=g.length-1;d=b.view.translate;var k=b.view.scale,n=f?g[0]:g[m],g=f?g[1]:g[m-1],m=g.x-n.x,q=g.y-n.y,F=Math.sqrt(m*m+q*q);c.x=(c.x+d.x)*k;c.y=(c.y+d.y)*k;e.call(this,F,m/F,q/F,n,g,c,l)})},Da=function(b){return function(d){return[ha(d,["arrowWidth","arrowSize"],function(d){var f=
-Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",aa.prototype.arrowWidth))),c=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",aa.prototype.arrowSize)));return new mxPoint(d.x+(1-c)*d.width,d.y+(1-f)*d.height/2)},function(d,f){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(d.y+d.height/2-f.y)/d.height*2));this.state.style.arrowSize=Math.max(0,Math.min(b,(d.x+d.width-f.x)/d.width))})]}},Za=function(b){return function(d){return[ha(d,["size"],function(d){var f=
-Math.max(0,Math.min(.5*d.height,parseFloat(mxUtils.getValue(this.state.style,"size",b))));return new mxPoint(d.x,d.y+f)},function(b,d){this.state.style.size=Math.max(0,d.y-b.y)},!0)]}},Ra=function(b,d,f){return function(c){var e=[ha(c,["size"],function(f){var c=Math.max(0,Math.min(f.width,Math.min(f.height,parseFloat(mxUtils.getValue(this.state.style,"size",d)))))*b;return new mxPoint(f.x+c,f.y+c)},function(d,f){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(d.width,f.x-d.x),Math.min(d.height,
-f.y-d.y)))/b)},!1)];f&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(Ca(c));return e}},Ma=function(b,d,f,c,e){f=null!=f?f:.5;return function(l){var g=[ha(l,["size"],function(d){var f=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,c=parseFloat(mxUtils.getValue(this.state.style,"size",f?e:b));return new mxPoint(d.x+Math.max(0,Math.min(.5*d.width,c*(f?1:d.width))),d.getCenterY())},function(b,d,c){b=null!=e&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?
-d.x-b.x:Math.max(0,Math.min(f,(d.x-b.x)/b.width));this.state.style.size=b},!1,c)];d&&mxUtils.getValue(l.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(Ca(l));return g}},Va=function(b,d,f){b=null!=b?b:.5;return function(c){var e=[ha(c,["size"],function(c){var e=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,l=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",e?f:d)));return new mxPoint(c.x+Math.min(.75*c.width*b,l*(e?.75:.75*c.width)),c.y+c.height/4)},function(d,c){var e=
-null!=f&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?c.x-d.x:Math.max(0,Math.min(b,(c.x-d.x)/d.width*.75));this.state.style.size=e},!1,!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(Ca(c));return e}},Ka=function(){return function(b){var d=[];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ca(b));return d}},Ca=function(b,d){return ha(b,[mxConstants.STYLE_ARCSIZE],function(f){var c=null!=d?d:f.height/8;if("1"==mxUtils.getValue(b.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,
-0)){var e=mxUtils.getValue(b.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(f.x+f.width-Math.min(f.width/2,e),f.y+c)}e=Math.max(0,parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(f.x+f.width-Math.min(Math.max(f.width/2,f.height/2),Math.min(f.width,f.height)*e),f.y+c)},function(d,f,c){"1"==mxUtils.getValue(b.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=
-Math.round(Math.max(0,Math.min(d.width,2*(d.x+d.width-f.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(d.width-f.x+d.x)/Math.min(d.width,d.height))))})},ha=function(b,d,f,c,e,l,g){var m=new mxHandle(b,null,mxVertexHandler.prototype.secondaryHandleImage);m.execute=function(b){for(var f=0;f<d.length;f++)this.copyStyle(d[f]);g&&g(b)};m.getPosition=f;m.setPosition=c;m.ignoreGrid=null!=e?e:!0;if(l){var k=m.positionChanged;m.positionChanged=function(){k.apply(this,
-arguments);b.view.invalidate(this.state.cell);b.view.validate()}}return m},Na={link:function(b){return[Ya(b,!0,10),Ya(b,!1,10)]},flexArrow:function(b){var d=b.view.graph.gridSize/b.view.scale,f=[];mxUtils.getValue(b.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(f.push(La(b,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,f,c,e,l){d=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;l=3*mxUtils.getNumber(b.style,mxConstants.STYLE_STARTSIZE,
-mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+f*(l+b.shape.strokewidth*b.view.scale)+c*d/2,e.y+c*(l+b.shape.strokewidth*b.view.scale)-f*d/2)},function(f,c,e,l,g,m,k){f=Math.sqrt(mxUtils.ptSegDistSq(l.x,l.y,g.x,g.y,m.x,m.y));c=mxUtils.ptLineDist(l.x,l.y,l.x+e,l.y-c,m.x,m.y);b.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-b.shape.strokewidth)/3)/100/b.view.scale;b.style.width=Math.round(2*f)/b.view.scale;mxEvent.isControlDown(k.getEvent())&&(b.style[mxConstants.STYLE_ENDSIZE]=
-b.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(b.style[mxConstants.STYLE_STARTSIZE])-parseFloat(b.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE])})),f.push(La(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,f,c,e,l){d=(b.shape.getStartArrowWidth()-b.shape.strokewidth)*b.view.scale;l=3*mxUtils.getNumber(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
-5)*b.view.scale;return new mxPoint(e.x+f*(l+b.shape.strokewidth*b.view.scale)+c*d/2,e.y+c*(l+b.shape.strokewidth*b.view.scale)-f*d/2)},function(f,c,e,l,g,m,k){f=Math.sqrt(mxUtils.ptSegDistSq(l.x,l.y,g.x,g.y,m.x,m.y));c=mxUtils.ptLineDist(l.x,l.y,l.x+e,l.y-c,m.x,m.y);b.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-b.shape.strokewidth)/3)/100/b.view.scale;b.style.startWidth=Math.max(0,Math.round(2*f)-b.shape.getEdgeWidth())/b.view.scale;mxEvent.isControlDown(k.getEvent())&&(b.style[mxConstants.STYLE_ENDSIZE]=
-b.style[mxConstants.STYLE_STARTSIZE],b.style.endWidth=b.style.startWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(b.style[mxConstants.STYLE_STARTSIZE])-parseFloat(b.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(b.style.startWidth)-parseFloat(b.style.endWidth))<d&&(b.style.startWidth=b.style.endWidth))})));mxUtils.getValue(b.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(f.push(La(b,
-["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(d,f,c,e,l){d=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;l=3*mxUtils.getNumber(b.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+f*(l+b.shape.strokewidth*b.view.scale)-c*d/2,e.y+c*(l+b.shape.strokewidth*b.view.scale)+f*d/2)},function(f,c,e,l,g,m,k){f=Math.sqrt(mxUtils.ptSegDistSq(l.x,l.y,g.x,g.y,m.x,m.y));c=mxUtils.ptLineDist(l.x,l.y,l.x+e,l.y-c,m.x,m.y);b.style[mxConstants.STYLE_ENDSIZE]=
-Math.round(100*(c-b.shape.strokewidth)/3)/100/b.view.scale;b.style.width=Math.round(2*f)/b.view.scale;mxEvent.isControlDown(k.getEvent())&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(b.style[mxConstants.STYLE_ENDSIZE])-parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<d/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE])})),f.push(La(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
-!1,function(d,f,c,e,l){d=(b.shape.getEndArrowWidth()-b.shape.strokewidth)*b.view.scale;l=3*mxUtils.getNumber(b.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+f*(l+b.shape.strokewidth*b.view.scale)-c*d/2,e.y+c*(l+b.shape.strokewidth*b.view.scale)+f*d/2)},function(f,c,e,l,g,m,k){f=Math.sqrt(mxUtils.ptSegDistSq(l.x,l.y,g.x,g.y,m.x,m.y));c=mxUtils.ptLineDist(l.x,l.y,l.x+e,l.y-c,m.x,m.y);b.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-b.shape.strokewidth)/
-3)/100/b.view.scale;b.style.endWidth=Math.max(0,Math.round(2*f)-b.shape.getEdgeWidth())/b.view.scale;mxEvent.isControlDown(k.getEvent())&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE],b.style.startWidth=b.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(b.style[mxConstants.STYLE_ENDSIZE])-parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<d/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(b.style.endWidth)-
-parseFloat(b.style.startWidth))<d&&(b.style.endWidth=b.style.startWidth))})));return f},swimlane:function(b){var d=[];if(mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED)){var f=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));d.push(Ca(b,f/2))}d.push(ha(b,[mxConstants.STYLE_STARTSIZE],function(d){var f=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,
-1)?new mxPoint(d.getCenterX(),d.y+Math.max(0,Math.min(d.height,f))):new mxPoint(d.x+Math.max(0,Math.min(d.width,f)),d.getCenterY())},function(d,f){b.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(d.height,f.y-d.y))):Math.round(Math.max(0,Math.min(d.width,f.x-d.x)))},!1,null,function(d){if(mxEvent.isControlDown(d.getEvent())&&(d=b.view.graph,d.isTableRow(b.cell)||d.isTableCell(b.cell))){for(var f=d.getSwimlaneDirection(b.style),
-c=d.model.getParent(b.cell),c=d.model.getChildCells(c,!0),e=[],l=0;l<c.length;l++)c[l]!=b.cell&&d.isSwimlane(c[l])&&d.getSwimlaneDirection(d.getCurrentCellStyle(c[l]))==f&&e.push(c[l]);d.setCellStyles(mxConstants.STYLE_STARTSIZE,b.style[mxConstants.STYLE_STARTSIZE],e)}}));return d},label:Ka(),ext:Ka(),rectangle:Ka(),triangle:Ka(),rhombus:Ka(),umlLifeline:function(b){return[ha(b,["size"],function(b){var d=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",S.prototype.size))));
-return new mxPoint(b.getCenterX(),b.y+d)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},umlFrame:function(b){return[ha(b,["width","height"],function(b){var d=Math.max(Z.prototype.corner,Math.min(b.width,mxUtils.getValue(this.state.style,"width",Z.prototype.width))),f=Math.max(1.5*Z.prototype.corner,Math.min(b.height,mxUtils.getValue(this.state.style,"height",Z.prototype.height)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.width=
-Math.round(Math.max(Z.prototype.corner,Math.min(b.width,d.x-b.x)));this.state.style.height=Math.round(Math.max(1.5*Z.prototype.corner,Math.min(b.height,d.y-b.y)))},!1)]},process:function(b){var d=[ha(b,["size"],function(b){var d="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),f=parseFloat(mxUtils.getValue(this.state.style,"size",H.prototype.size));return d?new mxPoint(b.x+f,b.y+b.height/4):new mxPoint(b.x+b.width*f,b.y+b.height/4)},function(b,d){var f="0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0")?Math.max(0,Math.min(.5*b.width,d.x-b.x)):Math.max(0,Math.min(.5,(d.x-b.x)/b.width));this.state.style.size=f},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ca(b));return d},cross:function(b){return[ha(b,["size"],function(b){var d=Math.min(b.width,b.height),d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",va.prototype.size)))*d/2;return new mxPoint(b.getCenterX()-d,b.getCenterY()-d)},function(b,d){var f=Math.min(b.width,b.height);this.state.style.size=
-Math.max(0,Math.min(1,Math.min(Math.max(0,b.getCenterY()-d.y)/f*2,Math.max(0,b.getCenterX()-d.x)/f*2)))})]},note:function(b){return[ha(b,["size"],function(b){var d=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size)))));return new mxPoint(b.x+b.width-d,b.y+d)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,b.x+b.width-d.x),Math.min(b.height,d.y-b.y))))})]},note2:function(b){return[ha(b,["size"],function(b){var f=
-Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size)))));return new mxPoint(b.x+b.width-f,b.y+f)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,b.x+b.width-d.x),Math.min(b.height,d.y-b.y))))})]},manualInput:function(b){var d=[ha(b,["size"],function(b){var d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",ea.prototype.size)));return new mxPoint(b.x+b.width/4,b.y+3*d/4)},function(b,
-d){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,4*(d.y-b.y)/3)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ca(b));return d},dataStorage:function(b){return[ha(b,["size"],function(b){var d="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),f=parseFloat(mxUtils.getValue(this.state.style,"size",d?sa.prototype.fixedSize:sa.prototype.size));return new mxPoint(b.x+b.width-f*(d?1:b.width),b.getCenterY())},function(b,d){var f="0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0")?Math.max(0,Math.min(b.width,b.x+b.width-d.x)):Math.max(0,Math.min(1,(b.x+b.width-d.x)/b.width));this.state.style.size=f},!1)]},callout:function(b){var d=[ha(b,["size","position"],function(b){var d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",B.prototype.size))),f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",B.prototype.position)));mxUtils.getValue(this.state.style,"base",B.prototype.base);return new mxPoint(b.x+f*b.width,b.y+b.height-
-d)},function(b,d){mxUtils.getValue(this.state.style,"base",B.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(b.height,b.y+b.height-d.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(d.x-b.x)/b.width)))/100},!1),ha(b,["position2"],function(b){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",B.prototype.position2)));return new mxPoint(b.x+d*b.width,b.y+b.height)},function(b,d){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
-(d.x-b.x)/b.width)))/100},!1),ha(b,["base"],function(b){var d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",B.prototype.size))),f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",B.prototype.position))),c=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"base",B.prototype.base)));return new mxPoint(b.x+Math.min(b.width,f*b.width+c),b.y+b.height-d)},function(b,d){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",B.prototype.position)));
-this.state.style.base=Math.round(Math.max(0,Math.min(b.width,d.x-b.x-f*b.width)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ca(b));return d},internalStorage:function(b){var d=[ha(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",ja.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",ja.prototype.dy)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.dx=Math.round(Math.max(0,
-Math.min(b.width,d.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ca(b));return d},module:function(b){return[ha(b,["jettyWidth","jettyHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"jettyWidth",W.prototype.jettyWidth))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"jettyHeight",W.prototype.jettyHeight)));return new mxPoint(b.x+d/2,b.y+
-2*f)},function(b,d){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(b.width,d.x-b.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(b.height,d.y-b.y))/2)})]},corner:function(b){return[ha(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",ra.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",ra.prototype.dy)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.dx=Math.round(Math.max(0,
-Math.min(b.width,d.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},tee:function(b){return[ha(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",ka.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",ka.prototype.dy)));return new mxPoint(b.x+(b.width+d)/2,b.y+f)},function(b,d){this.state.style.dx=Math.round(Math.max(0,2*Math.min(b.width/2,d.x-b.x-b.width/2)));this.state.style.dy=
-Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},singleArrow:Da(1),doubleArrow:Da(.5),folder:function(b){return[ha(b,["tabWidth","tabHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"tabWidth",n.prototype.tabWidth))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"tabHeight",n.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",n.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(d=b.width-d);return new mxPoint(b.x+
-d,b.y+f)},function(b,d){var f=Math.max(0,Math.min(b.width,d.x-b.x));mxUtils.getValue(this.state.style,"tabPosition",n.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(f=b.width-f);this.state.style.tabWidth=Math.round(f);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},document:function(b){return[ha(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",x.prototype.size))));return new mxPoint(b.x+3*b.width/4,b.y+(1-
-d)*b.height)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(b.y+b.height-d.y)/b.height))},!1)]},tape:function(b){return[ha(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",y.prototype.size))));return new mxPoint(b.getCenterX(),b.y+d*b.height/2)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(d.y-b.y)/b.height*2))},!1)]},isoCube2:function(b){return[ha(b,["isoAngle"],function(b){var d=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,
-"isoAngle",f.isoAngle))))*Math.PI/200;return new mxPoint(b.x,b.y+Math.min(b.width*Math.tan(d),.5*b.height))},function(b,d){this.state.style.isoAngle=Math.max(0,50*(d.y-b.y)/b.height)},!0)]},cylinder2:Za(l.prototype.size),cylinder3:Za(m.prototype.size),offPageConnector:function(b){return[ha(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ba.prototype.size))));return new mxPoint(b.getCenterX(),b.y+(1-d)*b.height)},function(b,d){this.state.style.size=
-Math.max(0,Math.min(1,(b.y+b.height-d.y)/b.height))},!1)]},"mxgraph.basic.rect":function(b){var d=[Graph.createHandle(b,["size"],function(b){var d=Math.max(0,Math.min(b.width/2,b.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(b.x+d,b.y+d)},function(b,d){this.state.style.size=Math.round(100*Math.max(0,Math.min(b.height/2,b.width/2,d.x-b.x)))/100})];b=Graph.createHandle(b,["indent"],function(b){var d=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,
-"indent",this.dx2))));return new mxPoint(b.x+.75*b.width,b.y+d*b.height/200)},function(b,d){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(d.y-b.y)/b.height)))/100});d.push(b);return d},step:Ma(M.prototype.size,!0,null,!0,M.prototype.fixedSize),hexagon:Ma(P.prototype.size,!0,.5,!0,P.prototype.fixedSize),curlyBracket:Ma(E.prototype.size,!1),display:Ma(Aa.prototype.size,!1),cube:Ra(1,c.prototype.size,!1),card:Ra(.5,v.prototype.size,!0),loopLimit:Ra(.5,ta.prototype.size,!0),trapezoid:Va(.5,
-C.prototype.size,C.prototype.fixedSize),parallelogram:Va(1,G.prototype.size,G.prototype.fixedSize)};Graph.createHandle=ha;Graph.handleFactory=Na;var eb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=eb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&null==mxStencilRegistry.getStencil(d)?d=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&
-(d=mxConstants.SHAPE_SWIMLANE);d=Na[d];null==d&&null!=this.state.shape&&this.state.shape.isRoundable()&&(d=Na[mxConstants.SHAPE_RECTANGLE]);null!=d&&(d=d(this.state),null!=d&&(b=null==b?d:b.concat(d)))}return b};mxEdgeHandler.prototype.createCustomHandles=function(){var b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)&&(b=mxConstants.SHAPE_CONNECTOR);b=Na[b];return null!=b?b(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory=
-{};var Oa=new mxPoint(1,0),Pa=new mxPoint(1,0),Da=mxUtils.toRadians(-30),Oa=mxUtils.getRotatedPoint(Oa,Math.cos(Da),Math.sin(Da)),Da=mxUtils.toRadians(-150),Pa=mxUtils.getRotatedPoint(Pa,Math.cos(Da),Math.sin(Da));mxEdgeStyle.IsometricConnector=function(b,d,f,c,e){var l=b.view;c=null!=c&&0<c.length?c[0]:null;var g=b.absolutePoints,m=g[0],g=g[g.length-1];null!=c&&(c=l.transformControlPoint(b,c));null==m&&null!=d&&(m=new mxPoint(d.getCenterX(),d.getCenterY()));null==g&&null!=f&&(g=new mxPoint(f.getCenterX(),
-f.getCenterY()));var k=Oa.x,n=Oa.y,q=Pa.x,F=Pa.y,p="horizontal"==mxUtils.getValue(b.style,"elbow","horizontal");if(null!=g&&null!=m){b=function(b,d,f){b-=A.x;var c=d-A.y;d=(F*b-q*c)/(k*F-n*q);b=(n*b-k*c)/(n*q-k*F);p?(f&&(A=new mxPoint(A.x+k*d,A.y+n*d),e.push(A)),A=new mxPoint(A.x+q*b,A.y+F*b)):(f&&(A=new mxPoint(A.x+q*b,A.y+F*b),e.push(A)),A=new mxPoint(A.x+k*d,A.y+n*d));e.push(A)};var A=m;null==c&&(c=new mxPoint(m.x+(g.x-m.x)/2,m.y+(g.y-m.y)/2));b(c.x,c.y,!0);b(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",
-mxEdgeStyle.IsometricConnector);var fb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(b,d){if(d==mxEdgeStyle.IsometricConnector){var f=new mxElbowEdgeHandler(b);f.snapToTerminals=!1;return f}return fb.apply(this,arguments)};k.prototype.constraints=[];g.prototype.getConstraints=function(b,d,f){b=[];var c=Math.tan(mxUtils.toRadians(30)),e=(.5-c)/2,c=Math.min(d,f/(.5+c));d=(d-c)/2;f=(f-c)/2;b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f+.25*c));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,d+.5*c,f+c*e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,f+.25*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,f+.75*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+.5*c,f+(1-e)*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f+.75*c));return b};f.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,c=Math.min(d*
-Math.tan(c),.5*f);b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f-c));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
-0,c));return b};B.prototype.getConstraints=function(b,d,f){b=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1));b.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f-c)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,
-f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-c)));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
-.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
-0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Ha.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=
-mxRectangleShape.prototype.constraints;T.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;t.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
-null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f+c)));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,
-0),!1));return b};v.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.5*(f+c)));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};c.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f+c)));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),f));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,c,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-c)));return b};m.prototype.getConstraints=function(b,d,f){b=[];d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,
-1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,d));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-d));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-d));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d+.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,d+.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1,null,0,f-d-.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-d-.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-d));b.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-d));return b};n.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,
-"tabWidth",this.tabWidth)))),e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(b.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
-.5*(d+c),e))):(b.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.25*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,d,.5*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.75*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,f));b.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return b};ja.prototype.constraints=mxRectangleShape.prototype.constraints;sa.prototype.constraints=mxRectangleShape.prototype.constraints;xa.prototype.constraints=mxEllipse.prototype.constraints;ua.prototype.constraints=mxEllipse.prototype.constraints;ya.prototype.constraints=mxEllipse.prototype.constraints;wa.prototype.constraints=
-mxEllipse.prototype.constraints;ea.prototype.constraints=mxRectangleShape.prototype.constraints;za.prototype.constraints=mxRectangleShape.prototype.constraints;Aa.prototype.getConstraints=function(b,d,f){b=[];var c=Math.min(d,f/2),e=Math.min(d-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
-.5*(e+d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+d-c),f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));return b};W.prototype.getConstraints=function(b,d,f){d=parseFloat(mxUtils.getValue(b,"jettyWidth",W.prototype.jettyWidth))/2;b=parseFloat(mxUtils.getValue(b,
-"jettyHeight",W.prototype.jettyHeight));var c=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,d),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,d),
-new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(f-.5*b,1.5*b)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(f-.5*b,3.5*b))];f>5*b&&c.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,d));f>8*b&&c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,d));f>15*
-b&&c.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,d));return c};ta.prototype.constraints=mxRectangleShape.prototype.constraints;ba.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
-.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];F.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,
-1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];fa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,
-.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,
-.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,
-.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,
-1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
-.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ma.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,
-1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=
-[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),
-new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
-.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];G.prototype.constraints=mxRectangleShape.prototype.constraints;C.prototype.constraints=mxRectangleShape.prototype.constraints;x.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+g=z.model.getChildCells(this.state.cell,!0);if(0<g.length){var k="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),m="0"!=mxUtils.getValue(this.state.style,"columnLines","1"),oa=z.getCellGeometry(g[0]),pa=[{y:null!=oa?oa.y+oa.height:0,cells:z.model.getChildCells(g[0],!0)}];if(k)for(k=1;k<g.length;k++){var oa=z.getCellGeometry(g[k]),q={y:0,cells:z.model.getChildCells(g[k],!0)};pa.push(q);null!=oa&&(q.y=oa.y+oa.height,b.begin(),b.moveTo(d+l.x,f+oa.y),b.lineTo(d+c-l.width,f+oa.y),b.end(),b.stroke())}if(m)for(c=
+z.model.getChildCells(g[0],!0),k=1;k<c.length;k++)if(oa=z.getCellGeometry(c[k]),null!=oa){b.begin();b.moveTo(d+oa.x+l.x,f+l.y);for(m=g=0;m<pa.length;m++)q=pa[m],null!=q&&(z.model.isVisible(q.cells[k])?g=q.y:(0<g&&b.lineTo(d+oa.x+l.x,f+g-l.height),b.moveTo(d+oa.x+l.x,f+q.y),g=0));b.lineTo(d+oa.x+l.x,f+e-l.height);b.end();b.stroke()}}};mxCellRenderer.registerShape("table",b);mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.darkOpacity=0;c.prototype.darkOpacity2=0;c.prototype.paintVertexShape=
+function(b,d,f,c,e){var z=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),l=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));b.translate(d,f);b.begin();b.moveTo(0,0);b.lineTo(c-z,0);b.lineTo(c,z);b.lineTo(c,e);b.lineTo(z,e);b.lineTo(0,e-z);b.lineTo(0,0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),
+0!=l&&(b.setFillAlpha(Math.abs(l)),b.setFillColor(0>l?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(c-z,0),b.lineTo(c,z),b.lineTo(z,z),b.close(),b.fill()),0!=g&&(b.setFillAlpha(Math.abs(g)),b.setFillColor(0>g?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(z,z),b.lineTo(z,e),b.lineTo(0,e-z),b.close(),b.fill()),b.begin(),b.moveTo(z,e),b.lineTo(z,z),b.lineTo(0,0),b.moveTo(z,z),b.lineTo(c,z),b.end(),b.stroke())};c.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,
+"boundedLbl",!1)?(b=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(b,b,0,0)):null};mxCellRenderer.registerShape("cube",c);var Qa=Math.tan(mxUtils.toRadians(30)),Ha=(.5-Qa)/2;mxCellRenderer.registerShape("isoRectangle",k);mxUtils.extend(e,mxCylinder);e.prototype.size=6;e.prototype.paintVertexShape=function(b,d,f,c,e){b.setFillColor(this.stroke);var z=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;b.ellipse(d+.5*(c-z),
+f+.5*(e-z),z,z);b.fill();b.setFillColor(mxConstants.NONE);b.rect(d,f,c,e);b.fill()};mxCellRenderer.registerShape("waypoint",e);mxUtils.extend(k,mxActor);k.prototype.size=20;k.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/Qa);b.translate((c-d)/2,(e-d)/2+d/4);b.moveTo(0,.25*d);b.lineTo(.5*d,d*Ha);b.lineTo(d,.25*d);b.lineTo(.5*d,(.5-Ha)*d);b.lineTo(0,.25*d);b.close();b.end()};mxCellRenderer.registerShape("isoRectangle",k);mxUtils.extend(g,mxCylinder);g.prototype.size=20;g.prototype.redrawPath=
+function(b,d,f,c,e,l){d=Math.min(c,e/(.5+Qa));l?(b.moveTo(0,.25*d),b.lineTo(.5*d,(.5-Ha)*d),b.lineTo(d,.25*d),b.moveTo(.5*d,(.5-Ha)*d),b.lineTo(.5*d,(1-Ha)*d)):(b.translate((c-d)/2,(e-d)/2),b.moveTo(0,.25*d),b.lineTo(.5*d,d*Ha),b.lineTo(d,.25*d),b.lineTo(d,.75*d),b.lineTo(.5*d,(1-Ha)*d),b.lineTo(0,.75*d),b.close());b.end()};mxCellRenderer.registerShape("isoCube",g);mxUtils.extend(p,mxCylinder);p.prototype.redrawPath=function(b,d,f,c,e,l){d=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(l&&null!=
+this.fill||!l&&null==this.fill)b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),l||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),l||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),l||(b.stroke(),b.begin()),b.translate(0,-d);l||(b.moveTo(0,d),b.curveTo(0,-d/3,c,-d/3,c,d),b.lineTo(c,e-d),b.curveTo(c,e+d/3,0,e+d/3,0,e-d),b.close())};p.prototype.getLabelMargins=function(b){return new mxRectangle(0,2.5*Math.min(b.height/2,Math.round(b.height/
+8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",p);mxUtils.extend(t,mxCylinder);t.prototype.size=30;t.prototype.darkOpacity=0;t.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),l=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));b.translate(d,f);b.begin();b.moveTo(0,0);b.lineTo(c-z,0);b.lineTo(c,z);b.lineTo(c,e);b.lineTo(0,e);b.lineTo(0,
+0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),0!=l&&(b.setFillAlpha(Math.abs(l)),b.setFillColor(0>l?"#FFFFFF":"#000000"),b.begin(),b.moveTo(c-z,0),b.lineTo(c-z,z),b.lineTo(c,z),b.close(),b.fill()),b.begin(),b.moveTo(c-z,0),b.lineTo(c-z,z),b.lineTo(c,z),b.end(),b.stroke())};mxCellRenderer.registerShape("note",t);mxUtils.extend(d,t);mxCellRenderer.registerShape("note2",d);d.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,
+"size",15);return new mxRectangle(0,Math.min(b.height*this.scale,d*this.scale),0,0)}return null};mxUtils.extend(f,mxShape);f.prototype.isoAngle=15;f.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,z=Math.min(c*Math.tan(z),.5*e);b.translate(d,f);b.begin();b.moveTo(.5*c,0);b.lineTo(c,z);b.lineTo(c,e-z);b.lineTo(.5*c,e);b.lineTo(0,e-z);b.lineTo(0,z);b.close();b.fillAndStroke();b.setShadow(!1);
+b.begin();b.moveTo(0,z);b.lineTo(.5*c,2*z);b.lineTo(c,z);b.moveTo(.5*c,2*z);b.lineTo(.5*c,e);b.stroke()};mxCellRenderer.registerShape("isoCube2",f);mxUtils.extend(l,mxShape);l.prototype.size=15;l.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.translate(d,f);0==z?(b.rect(0,0,c,e),b.fillAndStroke()):(b.begin(),b.moveTo(0,z),b.arcTo(.5*c,z,0,0,1,.5*c,0),b.arcTo(.5*c,z,0,0,1,c,z),b.lineTo(c,e-z),b.arcTo(.5*c,
+z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),b.begin(),b.moveTo(c,z),b.arcTo(.5*c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke())};mxCellRenderer.registerShape("cylinder2",l);mxUtils.extend(m,mxCylinder);m.prototype.size=15;m.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),l=mxUtils.getValue(this.style,"lid",!0);b.translate(d,f);0==z?(b.rect(0,0,c,e),b.fillAndStroke()):
+(b.begin(),l?(b.moveTo(0,z),b.arcTo(.5*c,z,0,0,1,.5*c,0),b.arcTo(.5*c,z,0,0,1,c,z)):(b.moveTo(0,0),b.arcTo(.5*c,z,0,0,0,.5*c,z),b.arcTo(.5*c,z,0,0,0,c,0)),b.lineTo(c,e-z),b.arcTo(.5*c,z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),l&&(b.begin(),b.moveTo(c,z),b.arcTo(.5*c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke()))};mxCellRenderer.registerShape("cylinder3",m);mxUtils.extend(q,mxActor);q.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c/
+2,.5*e,c,0);b.quadTo(.5*c,e/2,c,e);b.quadTo(c/2,.5*e,0,e);b.quadTo(.5*c,e/2,0,0);b.end()};mxCellRenderer.registerShape("switch",q);mxUtils.extend(n,mxCylinder);n.prototype.tabWidth=60;n.prototype.tabHeight=20;n.prototype.tabPosition="right";n.prototype.arcSize=.1;n.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));
+var z=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),l=mxUtils.getValue(this.style,"rounded",!1),g=mxUtils.getValue(this.style,"absoluteArcSize",!1),k=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));g||(k*=Math.min(c,e));k=Math.min(k,.5*c,.5*(e-f));d=Math.max(d,k);d=Math.min(c-k,d);l||(k=0);b.begin();"left"==z?(b.moveTo(Math.max(k,0),f),b.lineTo(Math.max(k,0),0),b.lineTo(d,0),b.lineTo(d,f)):(b.moveTo(c-d,f),b.lineTo(c-d,0),b.lineTo(c-Math.max(k,0),0),b.lineTo(c-Math.max(k,
+0),f));l?(b.moveTo(0,k+f),b.arcTo(k,k,0,0,1,k,f),b.lineTo(c-k,f),b.arcTo(k,k,0,0,1,c,k+f),b.lineTo(c,e-k),b.arcTo(k,k,0,0,1,c-k,e),b.lineTo(k,e),b.arcTo(k,k,0,0,1,0,e-k)):(b.moveTo(0,f),b.lineTo(c,f),b.lineTo(c,e),b.lineTo(0,e));b.close();b.fillAndStroke();b.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(b.begin(),b.moveTo(c-30,f+20),b.lineTo(c-20,f+10),b.lineTo(c-10,f+20),b.close(),b.stroke())};mxCellRenderer.registerShape("folder",n);n.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,
+"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var f=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,c=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(z*=Math.min(b.width,b.height));z=Math.min(z,.5*b.width,.5*(b.height-d));c||(z=0);return"left"==
+mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(b.width,b.width-f),Math.min(b.height,b.height-d)):new mxRectangle(Math.min(b.width,b.width-f),0,z,Math.min(b.height,b.height-d))}return new mxRectangle(0,Math.min(b.height,d),0,0)}return null};mxUtils.extend(u,mxCylinder);u.prototype.arcSize=.1;u.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);var z=mxUtils.getValue(this.style,"rounded",!1),l=mxUtils.getValue(this.style,"absoluteArcSize",!1);d=
+parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));f=mxUtils.getValue(this.style,"umlStateConnection",null);l||(d*=Math.min(c,e));d=Math.min(d,.5*c,.5*e);z||(d=0);z=0;null!=f&&(z=10);b.begin();b.moveTo(z,d);b.arcTo(d,d,0,0,1,z+d,0);b.lineTo(c-d,0);b.arcTo(d,d,0,0,1,c,d);b.lineTo(c,e-d);b.arcTo(d,d,0,0,1,c-d,e);b.lineTo(z+d,e);b.arcTo(d,d,0,0,1,z,e-d);b.close();b.fillAndStroke();b.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(b.roundrect(c-40,e-20,
+10,10,3,3),b.stroke(),b.roundrect(c-20,e-20,10,10,3,3),b.stroke(),b.begin(),b.moveTo(c-30,e-15),b.lineTo(c-20,e-15),b.stroke());"connPointRefEntry"==f?(b.ellipse(0,.5*e-10,20,20),b.fillAndStroke()):"connPointRefExit"==f&&(b.ellipse(0,.5*e-10,20,20),b.fillAndStroke(),b.begin(),b.moveTo(5,.5*e-5),b.lineTo(15,.5*e+5),b.moveTo(15,.5*e-5),b.lineTo(5,.5*e+5),b.stroke())};u.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",
+null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",u);mxUtils.extend(v,mxActor);v.prototype.size=30;v.prototype.isRoundable=function(){return!0};v.prototype.redrawPath=function(b,d,f,c,e){d=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c,e),new mxPoint(0,e),new mxPoint(0,
+d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("card",v);mxUtils.extend(y,mxActor);y.prototype.size=.4;y.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(0,d/2);b.quadTo(c/4,1.4*d,c/2,d/2);b.quadTo(3*c/4,d*(1-1.4),c,d/2);b.lineTo(c,e-d/2);b.quadTo(3*c/4,e-1.4*d,c/2,e-d/2);b.quadTo(c/4,e-d*(1-1.4),0,e-d/2);b.lineTo(0,d/2);b.close();b.end()};y.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.style,
+"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",this.size),f=b.width,c=b.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return d*=c,new mxRectangle(b.x,b.y+d,f,c-2*d);d*=f;return new mxRectangle(b.x+d,b.y,f-2*d,c)}return b};mxCellRenderer.registerShape("tape",y);mxUtils.extend(x,mxActor);x.prototype.size=.3;x.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,
+0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*b.height):null};x.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(0,0);b.lineTo(c,0);b.lineTo(c,e-d/2);b.quadTo(3*c/4,e-1.4*d,c/2,e-d/2);b.quadTo(c/4,e-d*(1-1.4),0,e-d/2);b.lineTo(0,d/2);b.close();b.end()};mxCellRenderer.registerShape("document",x);var $a=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(b,d,f,c){var e=
+mxUtils.getValue(this.style,"size");return null!=e?c*Math.max(0,Math.min(1,e)):$a.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,b.height*d),0,0)}return null};m.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,
+"lid",!0)||(d/=2);return new mxRectangle(0,Math.min(b.height*this.scale,2*d*this.scale),0,Math.max(0,.3*d*this.scale))}return null};n.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var f=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,c=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,
+"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(z*=Math.min(b.width,b.height));z=Math.min(z,.5*b.width,.5*(b.height-d));c||(z=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(b.width,b.width-f),Math.min(b.height,b.height-d)):new mxRectangle(Math.min(b.width,b.width-f),0,z,Math.min(b.height,b.height-d))}return new mxRectangle(0,Math.min(b.height,d),0,0)}return null};u.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,
+"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};d.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(b.height*this.scale,d*this.scale),0,Math.max(0,d*this.scale))}return null};mxUtils.extend(E,mxActor);E.prototype.size=.2;E.prototype.fixedSize=20;E.prototype.isRoundable=function(){return!0};E.prototype.redrawPath=
+function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c-d,e)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("parallelogram",E);mxUtils.extend(C,
+mxActor);C.prototype.size=.2;C.prototype.fixedSize=20;C.prototype.isRoundable=function(){return!0};C.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(d,
+0),new mxPoint(c-d,0),new mxPoint(c,e)],this.isRounded,f,!0)};mxCellRenderer.registerShape("trapezoid",C);mxUtils.extend(F,mxActor);F.prototype.size=.5;F.prototype.redrawPath=function(b,d,f,c,e){b.setFillColor(null);d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,e/2),new mxPoint(0,e/2),new mxPoint(d,e/2),new mxPoint(d,
+e),new mxPoint(c,e)],this.isRounded,f,!1);b.end()};mxCellRenderer.registerShape("curlyBracket",F);mxUtils.extend(I,mxActor);I.prototype.redrawPath=function(b,d,f,c,e){b.setStrokeWidth(1);b.setFillColor(this.stroke);d=c/5;b.rect(0,0,d,e);b.fillAndStroke();b.rect(2*d,0,d,e);b.fillAndStroke();b.rect(4*d,0,d,e);b.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",I);L.prototype.moveTo=function(b,d){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d;this.firstX=b;this.firstY=
+d};L.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};L.prototype.quadTo=function(b,d,f,c){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=c};L.prototype.curveTo=function(b,d,f,c,e,l){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=l};L.prototype.arcTo=function(b,d,f,c,e,l,g){this.originalArcTo.apply(this.canvas,
+arguments);this.lastX=l;this.lastY=g};L.prototype.lineTo=function(b,d){if(null!=this.lastX&&null!=this.lastY){var f=function(b){return"number"===typeof b?b?0>b?-1:1:b===b?0:NaN:NaN},c=Math.abs(b-this.lastX),e=Math.abs(d-this.lastY),z=Math.sqrt(c*c+e*e);if(2>z){this.originalLineTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d;return}var l=Math.round(z/10),g=this.defaultVariation;5>l&&(l=5,g/=3);for(var k=f(b-this.lastX)*c/l,f=f(d-this.lastY)*e/l,c=c/z,e=e/z,z=0;z<l;z++){var m=(Math.random()-
+.5)*g;this.originalLineTo.call(this.canvas,k*z+this.lastX-m*e,f*z+this.lastY-m*c)}this.originalLineTo.call(this.canvas,b,d)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d};L.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=
+1.5;var ab=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(b){ab.apply(this,arguments);null==b.handJiggle&&(b.handJiggle=this.createHandJiggle(b))};var bb=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(b){bb.apply(this,arguments);null!=b.handJiggle&&(b.handJiggle.destroy(),delete b.handJiggle)};mxShape.prototype.createComicCanvas=function(b){return new L(b,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(b){return this.outline||
+null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(b)};mxRhombus.prototype.defaultJiggle=2;var cb=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&cb.apply(this,arguments)};var db=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=
+function(b,d,f,c,e){if(null==b.handJiggle||b.handJiggle.constructor!=L)db.apply(this,arguments);else{var z=!0;null!=this.style&&(z="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(z||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)z||null!=this.fill&&this.fill!=mxConstants.NONE||(b.pointerEvents=!1),b.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?z=Math.min(c/2,Math.min(e/2,mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,z=Math.min(c*z,e*z)),b.moveTo(d+z,f),b.lineTo(d+c-z,f),b.quadTo(d+c,f,d+c,f+z),b.lineTo(d+c,f+e-z),b.quadTo(d+c,f+e,d+c-z,f+e),b.lineTo(d+z,f+e),b.quadTo(d,f+e,d,f+e-z),b.lineTo(d,f+z),b.quadTo(d,f,d+z,f)):(b.moveTo(d,f),b.lineTo(d+c,f),b.lineTo(d+c,f+e),b.lineTo(d,f+e),b.lineTo(d,f)),b.close(),b.end(),b.fillAndStroke()}};mxUtils.extend(H,
+mxRectangleShape);H.prototype.size=.1;H.prototype.fixedSize=!1;H.prototype.isHtmlAllowed=function(){return!1};H.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var d=b.width,f=b.height;b=new mxRectangle(b.x,b.y,d,f);var c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=
+mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,c=Math.max(c,Math.min(d*e,f*e));b.x+=Math.round(c);b.width-=Math.round(2*c)}return b};H.prototype.paintForeground=function(b,d,f,c,e){var z=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),l=parseFloat(mxUtils.getValue(this.style,"size",this.size)),l=z?Math.max(0,Math.min(c,l)):c*Math.max(0,Math.min(1,l));this.isRounded&&(z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/
+100,l=Math.max(l,Math.min(c*z,e*z)));l=Math.round(l);b.begin();b.moveTo(d+l,f);b.lineTo(d+l,f+e);b.moveTo(d+c-l,f);b.lineTo(d+c-l,f+e);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",H);mxCellRenderer.registerShape("process2",H);mxUtils.extend(J,mxRectangleShape);J.prototype.paintBackground=function(b,d,f,c,e){b.setFillColor(mxConstants.NONE);b.rect(d,f,c,e);b.fill()};J.prototype.paintForeground=function(b,d,f,c,e){};mxCellRenderer.registerShape("transparent",
+J);mxUtils.extend(B,mxHexagon);B.prototype.size=30;B.prototype.position=.5;B.prototype.position2=.5;B.prototype.base=20;B.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};B.prototype.isRoundable=function(){return!0};B.prototype.redrawPath=function(b,d,f,c,e){d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",
+this.size))));var z=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),l=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),g=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,e-f),new mxPoint(Math.min(c,z+g),e-f),new mxPoint(l,e),new mxPoint(Math.max(0,z),e-f),new mxPoint(0,e-f)],this.isRounded,d,!0,[4])};mxCellRenderer.registerShape("callout",
+B);mxUtils.extend(M,mxActor);M.prototype.size=.2;M.prototype.fixedSize=20;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,
+0),new mxPoint(c-d,0),new mxPoint(c,e/2),new mxPoint(c-d,e),new mxPoint(0,e),new mxPoint(d,e/2)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("step",M);mxUtils.extend(P,mxHexagon);P.prototype.size=.25;P.prototype.fixedSize=20;P.prototype.isRoundable=function(){return!0};P.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.5*e),new mxPoint(c-d,e),new mxPoint(d,e),new mxPoint(0,.5*e)],this.isRounded,f,!0)};mxCellRenderer.registerShape("hexagon",P);mxUtils.extend(T,mxRectangleShape);T.prototype.isHtmlAllowed=function(){return!1};T.prototype.paintForeground=function(b,d,f,c,e){var z=Math.min(c/5,e/5)+1;b.begin();b.moveTo(d+c/2,f+z);b.lineTo(d+c/2,
+f+e-z);b.moveTo(d+z,f+e/2);b.lineTo(d+c-z,f+e/2);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",T);var Xa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var d=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+d,b.y+d,b.width-2*d,b.height-2*d)}return b};mxRhombus.prototype.paintVertexShape=
+function(b,d,f,c,e){Xa.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var z=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=z;f+=z;c-=2*z;e-=2*z;0<c&&0<e&&(b.setShadow(!1),Xa.apply(this,[b,d,f,c,e]))}};mxUtils.extend(N,mxRectangleShape);N.prototype.isHtmlAllowed=function(){return!1};N.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var d=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;
+return new mxRectangle(b.x+d,b.y+d,b.width-2*d,b.height-2*d)}return b};N.prototype.paintForeground=function(b,d,f,c,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var z=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=z;f+=z;c-=2*z;e-=2*z;0<c&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}b.setDashed(!1);var z=0,l;do{l=mxCellRenderer.defaultShapes[this.style["symbol"+z]];if(null!=l){var g=this.style["symbol"+z+"Align"],
+k=this.style["symbol"+z+"VerticalAlign"],m=this.style["symbol"+z+"Width"],q=this.style["symbol"+z+"Height"],n=this.style["symbol"+z+"Spacing"]||0,oa=this.style["symbol"+z+"VSpacing"]||n,pa=this.style["symbol"+z+"ArcSpacing"];null!=pa&&(pa*=this.getArcSize(c+this.strokewidth,e+this.strokewidth),n+=pa,oa+=pa);var pa=d,G=f,pa=g==mxConstants.ALIGN_CENTER?pa+(c-m)/2:g==mxConstants.ALIGN_RIGHT?pa+(c-m-n):pa+n,G=k==mxConstants.ALIGN_MIDDLE?G+(e-q)/2:k==mxConstants.ALIGN_BOTTOM?G+(e-q-oa):G+oa;b.save();g=
+new l;g.style=this.style;l.prototype.paintVertexShape.call(g,b,pa,G,m,q);b.restore()}z++}while(null!=l)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",N);mxUtils.extend(R,mxCylinder);R.prototype.redrawPath=function(b,d,f,c,e,l){l?(b.moveTo(0,0),b.lineTo(c/2,e/2),b.lineTo(c,0),b.end()):(b.moveTo(0,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(0,e),b.close())};mxCellRenderer.registerShape("message",R);mxUtils.extend(G,mxShape);G.prototype.paintBackground=
+function(b,d,f,c,e){b.translate(d,f);b.ellipse(c/4,0,c/2,e/4);b.fillAndStroke();b.begin();b.moveTo(c/2,e/4);b.lineTo(c/2,2*e/3);b.moveTo(c/2,e/3);b.lineTo(0,e/3);b.moveTo(c/2,e/3);b.lineTo(c,e/3);b.moveTo(c/2,2*e/3);b.lineTo(0,e);b.moveTo(c/2,2*e/3);b.lineTo(c,e);b.end();b.stroke()};mxCellRenderer.registerShape("umlActor",G);mxUtils.extend(D,mxShape);D.prototype.getLabelMargins=function(b){return new mxRectangle(b.width/6,0,0,0)};D.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();
+b.moveTo(0,e/4);b.lineTo(0,3*e/4);b.end();b.stroke();b.begin();b.moveTo(0,e/2);b.lineTo(c/6,e/2);b.end();b.stroke();b.ellipse(c/6,0,5*c/6,e);b.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",D);mxUtils.extend(A,mxEllipse);A.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(d+c/8,f+e);b.lineTo(d+7*c/8,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("umlEntity",A);mxUtils.extend(da,mxShape);da.prototype.paintVertexShape=
+function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(c,0);b.lineTo(0,e);b.moveTo(0,0);b.lineTo(c,e);b.end();b.stroke()};mxCellRenderer.registerShape("umlDestroy",da);mxUtils.extend(K,mxShape);K.prototype.getLabelBounds=function(b){return new mxRectangle(b.x,b.y+b.height/8,b.width,7*b.height/8)};K.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(3*c/8,e/8*1.1);b.lineTo(5*c/8,0);b.end();b.stroke();b.ellipse(0,e/8,c,7*e/8);b.fillAndStroke()};K.prototype.paintForeground=
+function(b,d,f,c,e){b.begin();b.moveTo(3*c/8,e/8*1.1);b.lineTo(5*c/8,e/4);b.end();b.stroke()};mxCellRenderer.registerShape("umlControl",K);mxUtils.extend(S,mxRectangleShape);S.prototype.size=40;S.prototype.isHtmlAllowed=function(){return!1};S.prototype.getLabelBounds=function(b){var d=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(b.x,b.y,b.width,d)};S.prototype.paintBackground=function(b,d,f,c,e){var l=Math.max(0,Math.min(e,
+parseFloat(mxUtils.getValue(this.style,"size",this.size)))),z=mxUtils.getValue(this.style,"participant");null==z||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,b,d,f,c,l):(z=this.state.view.graph.cellRenderer.getShape(z),null!=z&&z!=S&&(z=new z,z.apply(this.state),b.save(),z.paintVertexShape(b,d,f,c,l),b.restore()));l<e&&(b.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),b.begin(),b.moveTo(d+c/2,f+l),b.lineTo(d+c/2,f+e),b.end(),b.stroke())};S.prototype.paintForeground=
+function(b,d,f,c,e){var l=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,b,d,f,c,Math.min(e,l))};mxCellRenderer.registerShape("umlLifeline",S);mxUtils.extend(aa,mxShape);aa.prototype.width=60;aa.prototype.height=30;aa.prototype.corner=10;aa.prototype.getLabelMargins=function(b){return new mxRectangle(0,0,b.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),b.height-parseFloat(mxUtils.getValue(this.style,
+"height",this.height)*this.scale))};aa.prototype.paintBackground=function(b,d,f,c,e){var l=this.corner,z=Math.min(c,Math.max(l,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),g=Math.min(e,Math.max(1.5*l,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),k=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);k!=mxConstants.NONE&&(b.setFillColor(k),b.rect(d,f,c,e),b.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=
+mxConstants.NONE?(this.getGradientBounds(b,d,f,c,e),b.setGradient(this.fill,this.gradient,d,f,c,e,this.gradientDirection)):b.setFillColor(this.fill);b.begin();b.moveTo(d,f);b.lineTo(d+z,f);b.lineTo(d+z,f+Math.max(0,g-1.5*l));b.lineTo(d+Math.max(0,z-l),f+g);b.lineTo(d,f+g);b.close();b.fillAndStroke();b.begin();b.moveTo(d+z,f);b.lineTo(d+c,f);b.lineTo(d+c,f+e);b.lineTo(d,f+e);b.lineTo(d,f+g);b.stroke()};mxCellRenderer.registerShape("umlFrame",aa);mxPerimeter.CenterPerimeter=function(b,d,f,c){return new mxPoint(b.getCenterX(),
+b.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(b,d,f,c){c=S.prototype.size;null!=d&&(c=mxUtils.getValue(d.style,"size",c)*d.view.scale);d=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||1)*d.view.scale/2-1;f.x<b.getCenterX()&&(d=-1*(d+1));return new mxPoint(b.getCenterX()+d,Math.min(b.y+b.height,Math.max(b.y+c,f.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=
+function(b,d,f,c){c=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(b,d,f,c){c=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||1)*d.view.scale/2-1;null!=d.style.backboneSize&&(c+=parseFloat(d.style.backboneSize)*d.view.scale/2-1);if("south"==d.style[mxConstants.STYLE_DIRECTION]||"north"==d.style[mxConstants.STYLE_DIRECTION])return f.x<b.getCenterX()&&(c=-1*(c+1)),
+new mxPoint(b.getCenterX()+c,Math.min(b.y+b.height,Math.max(b.y,f.y)));f.y<b.getCenterY()&&(c=-1*(c+1));return new mxPoint(Math.min(b.x+b.width,Math.max(b.x,f.x)),b.getCenterY()+c)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(b,d,f,c){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(b,new mxRectangle(0,0,0,Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(d.style,"size",B.prototype.size))*d.view.scale))),d.style),
+d,f,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),l=e?E.prototype.fixedSize:E.prototype.size;null!=d&&(l=mxUtils.getValue(d.style,"size",l));e&&(l*=d.view.scale);var g=b.x,z=b.y,k=b.width,m=b.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?
+(e=e?Math.max(0,Math.min(m,l)):m*Math.max(0,Math.min(1,l)),z=[new mxPoint(g,z),new mxPoint(g+k,z+e),new mxPoint(g+k,z+m),new mxPoint(g,z+m-e),new mxPoint(g,z)]):(e=e?Math.max(0,Math.min(.5*k,l)):k*Math.max(0,Math.min(1,l)),z=[new mxPoint(g+e,z),new mxPoint(g+k,z),new mxPoint(g+k-e,z+m),new mxPoint(g,z+m),new mxPoint(g+e,z)]);m=b.getCenterX();b=b.getCenterY();b=new mxPoint(m,b);c&&(f.x<g||f.x>g+k?b.y=f.y:b.x=f.x);return mxUtils.getPerimeterPoint(z,b,f)};mxStyleRegistry.putValue("parallelogramPerimeter",
+mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),l=e?C.prototype.fixedSize:C.prototype.size;null!=d&&(l=mxUtils.getValue(d.style,"size",l));e&&(l*=d.view.scale);var g=b.x,z=b.y,k=b.width,m=b.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(.5*k,l)):k*Math.max(0,Math.min(1,l)),z=[new mxPoint(g+
+e,z),new mxPoint(g+k-e,z),new mxPoint(g+k,z+m),new mxPoint(g,z+m),new mxPoint(g+e,z)]):d==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,l)):k*Math.max(0,Math.min(1,l)),z=[new mxPoint(g,z),new mxPoint(g+k,z),new mxPoint(g+k-e,z+m),new mxPoint(g+e,z+m),new mxPoint(g,z)]):d==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(m,l)):m*Math.max(0,Math.min(1,l)),z=[new mxPoint(g,z+e),new mxPoint(g+k,z),new mxPoint(g+k,z+m),new mxPoint(g,z+m-e),new mxPoint(g,z+e)]):(e=e?Math.max(0,Math.min(m,l)):
+m*Math.max(0,Math.min(1,l)),z=[new mxPoint(g,z),new mxPoint(g+k,z+e),new mxPoint(g+k,z+m-e),new mxPoint(g,z+m),new mxPoint(g,z)]);m=b.getCenterX();b=b.getCenterY();b=new mxPoint(m,b);c&&(f.x<g||f.x>g+k?b.y=f.y:b.x=f.x);return mxUtils.getPerimeterPoint(z,b,f)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),l=e?M.prototype.fixedSize:M.prototype.size;null!=d&&(l=mxUtils.getValue(d.style,
+"size",l));e&&(l*=d.view.scale);var g=b.x,z=b.y,k=b.width,m=b.height,q=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(k,l)):k*Math.max(0,Math.min(1,l)),z=[new mxPoint(g,z),new mxPoint(g+k-e,z),new mxPoint(g+k,b),new mxPoint(g+k-e,z+m),new mxPoint(g,z+m),new mxPoint(g+e,b),new mxPoint(g,z)]):d==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,
+l)):k*Math.max(0,Math.min(1,l)),z=[new mxPoint(g+e,z),new mxPoint(g+k,z),new mxPoint(g+k-e,b),new mxPoint(g+k,z+m),new mxPoint(g+e,z+m),new mxPoint(g,b),new mxPoint(g+e,z)]):d==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(m,l)):m*Math.max(0,Math.min(1,l)),z=[new mxPoint(g,z+e),new mxPoint(q,z),new mxPoint(g+k,z+e),new mxPoint(g+k,z+m),new mxPoint(q,z+m-e),new mxPoint(g,z+m),new mxPoint(g,z+e)]):(e=e?Math.max(0,Math.min(m,l)):m*Math.max(0,Math.min(1,l)),z=[new mxPoint(g,z),new mxPoint(q,z+
+e),new mxPoint(g+k,z),new mxPoint(g+k,z+m-e),new mxPoint(q,z+m),new mxPoint(g,z+m-e),new mxPoint(g,z)]);q=new mxPoint(q,b);c&&(f.x<g||f.x>g+k?q.y=f.y:q.x=f.x);return mxUtils.getPerimeterPoint(z,q,f)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),l=e?P.prototype.fixedSize:P.prototype.size;null!=d&&(l=mxUtils.getValue(d.style,"size",l));e&&(l*=d.view.scale);var g=b.x,z=b.y,k=b.width,
+m=b.height,q=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(m,l)):m*Math.max(0,Math.min(1,l)),z=[new mxPoint(q,z),new mxPoint(g+k,z+e),new mxPoint(g+k,z+m-e),new mxPoint(q,z+m),new mxPoint(g,z+m-e),new mxPoint(g,z+e),new mxPoint(q,z)]):(e=e?Math.max(0,Math.min(k,l)):k*Math.max(0,Math.min(1,l)),z=[new mxPoint(g+
+e,z),new mxPoint(g+k-e,z),new mxPoint(g+k,b),new mxPoint(g+k-e,z+m),new mxPoint(g+e,z+m),new mxPoint(g,b),new mxPoint(g+e,z)]);q=new mxPoint(q,b);c&&(f.x<g||f.x>g+k?q.y=f.y:q.x=f.x);return mxUtils.getPerimeterPoint(z,q,f)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ma,mxShape);ma.prototype.size=10;ma.prototype.paintBackground=function(b,d,f,c,e){var l=parseFloat(mxUtils.getValue(this.style,"size",this.size));b.translate(d,f);b.ellipse((c-l)/2,0,l,l);
+b.fillAndStroke();b.begin();b.moveTo(c/2,l);b.lineTo(c/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("lollipop",ma);mxUtils.extend(ga,mxShape);ga.prototype.size=10;ga.prototype.inset=2;ga.prototype.paintBackground=function(b,d,f,c,e){var l=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(d,f);b.begin();b.moveTo(c/2,l+g);b.lineTo(c/2,e);b.end();b.stroke();b.begin();b.moveTo((c-l)/2-g,l/2);b.quadTo((c-
+l)/2-g,l+g,c/2,l+g);b.quadTo((c+l)/2+g,l+g,(c+l)/2+g,l/2);b.end();b.stroke()};mxCellRenderer.registerShape("requires",ga);mxUtils.extend(ia,mxShape);ia.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.end();b.stroke()};mxCellRenderer.registerShape("requiredInterface",ia);mxUtils.extend(la,mxShape);la.prototype.inset=2;la.prototype.paintBackground=function(b,d,f,c,e){var l=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+
+this.strokewidth;b.translate(d,f);b.ellipse(0,l,c-2*l,e-2*l);b.fillAndStroke();b.begin();b.moveTo(c/2,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,c/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",la);mxUtils.extend(W,mxCylinder);W.prototype.jettyWidth=20;W.prototype.jettyHeight=10;W.prototype.redrawPath=function(b,d,f,c,e,l){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));
+f=g/2;var g=f+g/2,z=Math.min(d,e-d),k=Math.min(z+2*d,e-d);l?(b.moveTo(f,z),b.lineTo(g,z),b.lineTo(g,z+d),b.lineTo(f,z+d),b.moveTo(f,k),b.lineTo(g,k),b.lineTo(g,k+d),b.lineTo(f,k+d)):(b.moveTo(f,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(f,e),b.lineTo(f,k+d),b.lineTo(0,k+d),b.lineTo(0,k),b.lineTo(f,k),b.lineTo(f,z+d),b.lineTo(0,z+d),b.lineTo(0,z),b.lineTo(f,z),b.close());b.end()};mxCellRenderer.registerShape("module",W);mxUtils.extend(fa,mxCylinder);fa.prototype.jettyWidth=32;fa.prototype.jettyHeight=
+12;fa.prototype.redrawPath=function(b,d,f,c,e,l){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));f=g/2;var g=f+g/2,z=.3*e-d/2,k=.7*e-d/2;l?(b.moveTo(f,z),b.lineTo(g,z),b.lineTo(g,z+d),b.lineTo(f,z+d),b.moveTo(f,k),b.lineTo(g,k),b.lineTo(g,k+d),b.lineTo(f,k+d)):(b.moveTo(f,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(f,e),b.lineTo(f,k+d),b.lineTo(0,k+d),b.lineTo(0,k),b.lineTo(f,k),b.lineTo(f,z+d),b.lineTo(0,
+z+d),b.lineTo(0,z),b.lineTo(f,z),b.close());b.end()};mxCellRenderer.registerShape("component",fa);mxUtils.extend(na,mxRectangleShape);na.prototype.paintForeground=function(b,d,f,c,e){var l=c/2,g=e/2,z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b.begin();this.addPoints(b,[new mxPoint(d+l,f),new mxPoint(d+c,f+g),new mxPoint(d+l,f+e),new mxPoint(d,f+g)],this.isRounded,z,!0);b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",
+na);mxUtils.extend(V,mxDoubleEllipse);V.prototype.outerStroke=!0;V.prototype.paintVertexShape=function(b,d,f,c,e){var l=Math.min(4,Math.min(c/5,e/5));0<c&&0<e&&(b.ellipse(d+l,f+l,c-2*l,e-2*l),b.fillAndStroke());b.setShadow(!1);this.outerStroke&&(b.ellipse(d,f,c,e),b.stroke())};mxCellRenderer.registerShape("endState",V);mxUtils.extend(Q,V);Q.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Q);mxUtils.extend(ra,mxArrowConnector);ra.prototype.defaultWidth=4;ra.prototype.isOpenEnded=
+function(){return!0};ra.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ra.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",ra);mxUtils.extend(X,mxArrowConnector);X.prototype.defaultWidth=10;X.prototype.defaultArrowWidth=20;X.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};X.prototype.getEndArrowWidth=
+function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};X.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",X);mxUtils.extend(ea,mxActor);ea.prototype.size=30;ea.prototype.isRoundable=function(){return!0};ea.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));f=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(0,d),new mxPoint(c,0),new mxPoint(c,e)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("manualInput",ea);mxUtils.extend(ja,mxRectangleShape);ja.prototype.dx=20;ja.prototype.dy=20;ja.prototype.isHtmlAllowed=function(){return!1};ja.prototype.paintForeground=function(b,d,f,c,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var l=0;if(this.isRounded)var g=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,l=Math.max(l,Math.min(c*g,e*g));g=Math.max(l,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));l=Math.max(l,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.begin();b.moveTo(d,f+l);b.lineTo(d+c,f+l);b.end();b.stroke();b.begin();b.moveTo(d+g,f);b.lineTo(d+g,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("internalStorage",ja);mxUtils.extend(sa,mxActor);sa.prototype.dx=20;sa.prototype.dy=
+20;sa.prototype.redrawPath=function(b,d,f,c,e){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f),new mxPoint(d,f),new mxPoint(d,e),new mxPoint(0,e)],this.isRounded,l,!0);b.end()};
+mxCellRenderer.registerShape("corner",sa);mxUtils.extend(U,mxActor);U.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.lineTo(0,e);b.end();b.moveTo(c,0);b.lineTo(c,e);b.end();b.moveTo(0,e/2);b.lineTo(c,e/2);b.end()};mxCellRenderer.registerShape("crossbar",U);mxUtils.extend(ka,mxActor);ka.prototype.dx=20;ka.prototype.dy=20;ka.prototype.redrawPath=function(b,d,f,c,e){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,
+"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f),new mxPoint((c+d)/2,f),new mxPoint((c+d)/2,e),new mxPoint((c-d)/2,e),new mxPoint((c-d)/2,f),new mxPoint(0,f)],this.isRounded,l,!0);b.end()};mxCellRenderer.registerShape("tee",ka);mxUtils.extend(Z,mxActor);Z.prototype.arrowWidth=.3;Z.prototype.arrowSize=.2;Z.prototype.redrawPath=
+function(b,d,f,c,e){var l=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));f=(e-l)/2;var l=f+l,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,f),new mxPoint(c-d,f),new mxPoint(c-d,0),new mxPoint(c,e/2),new mxPoint(c-d,e),new mxPoint(c-d,l),new mxPoint(0,l)],this.isRounded,g,!0);b.end()};mxCellRenderer.registerShape("singleArrow",
+Z);mxUtils.extend(qa,mxActor);qa.prototype.redrawPath=function(b,d,f,c,e){var l=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Z.prototype.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Z.prototype.arrowSize))));f=(e-l)/2;var l=f+l,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e/2),new mxPoint(d,0),new mxPoint(d,f),new mxPoint(c-d,f),new mxPoint(c-d,0),new mxPoint(c,
+e/2),new mxPoint(c-d,e),new mxPoint(c-d,l),new mxPoint(d,l),new mxPoint(d,e)],this.isRounded,g,!0);b.end()};mxCellRenderer.registerShape("doubleArrow",qa);mxUtils.extend(ta,mxActor);ta.prototype.size=.1;ta.prototype.fixedSize=20;ta.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(d,
+0);b.lineTo(c,0);b.quadTo(c-2*d,e/2,c,e);b.lineTo(d,e);b.quadTo(d-2*d,e/2,d,0);b.close();b.end()};mxCellRenderer.registerShape("dataStorage",ta);mxUtils.extend(ca,mxActor);ca.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.close();b.end()};mxCellRenderer.registerShape("or",ca);mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.quadTo(c/2,e/2,0,0);b.close();b.end()};mxCellRenderer.registerShape("xor",
+O);mxUtils.extend(ua,mxActor);ua.prototype.size=20;ua.prototype.isRoundable=function(){return!0};ua.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.8*d),new mxPoint(c,e),new mxPoint(0,e),new mxPoint(0,.8*d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("loopLimit",
+ua);mxUtils.extend(ba,mxActor);ba.prototype.size=.375;ba.prototype.isRoundable=function(){return!0};ba.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,e-d),new mxPoint(c/2,e),new mxPoint(0,e-d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("offPageConnector",
+ba);mxUtils.extend(ya,mxEllipse);ya.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(d+c/2,f+e);b.lineTo(d+c,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("tapeData",ya);mxUtils.extend(va,mxEllipse);va.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(d,f+e/2);b.lineTo(d+c,f+e/2);b.end();b.stroke();b.begin();b.moveTo(d+c/2,f);
+b.lineTo(d+c/2,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("orEllipse",va);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(d+.145*c,f+.145*e);b.lineTo(d+.855*c,f+.855*e);b.end();b.stroke();b.begin();b.moveTo(d+.855*c,f+.145*e);b.lineTo(d+.145*c,f+.855*e);b.end();b.stroke()};mxCellRenderer.registerShape("sumEllipse",za);mxUtils.extend(Fa,mxRhombus);Fa.prototype.paintVertexShape=
+function(b,d,f,c,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(d,f+e/2);b.lineTo(d+c,f+e/2);b.end();b.stroke()};mxCellRenderer.registerShape("sortShape",Fa);mxUtils.extend(Ja,mxEllipse);Ja.prototype.paintVertexShape=function(b,d,f,c,e){b.begin();b.moveTo(d,f);b.lineTo(d+c,f);b.lineTo(d+c/2,f+e/2);b.close();b.fillAndStroke();b.begin();b.moveTo(d,f+e);b.lineTo(d+c,f+e);b.lineTo(d+c/2,f+e/2);b.close();b.fillAndStroke()};mxCellRenderer.registerShape("collate",
+Ja);mxUtils.extend(Ca,mxEllipse);Ca.prototype.paintVertexShape=function(b,d,f,c,e){var l=f+e-5;b.begin();b.moveTo(d,f);b.lineTo(d,f+e);b.moveTo(d,l);b.lineTo(d+10,l-5);b.moveTo(d,l);b.lineTo(d+10,l+5);b.moveTo(d,l);b.lineTo(d+c,l);b.moveTo(d+c,f);b.lineTo(d+c,f+e);b.moveTo(d+c,l);b.lineTo(d+c-10,l-5);b.moveTo(d+c,l);b.lineTo(d+c-10,l+5);b.end();b.stroke()};mxCellRenderer.registerShape("dimension",Ca);mxUtils.extend(Ia,mxEllipse);Ia.prototype.paintVertexShape=function(b,d,f,c,e){this.outline||b.setStrokeColor(null);
+if(null!=this.style){var l=b.pointerEvents;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||null!=this.fill&&this.fill!=mxConstants.NONE||(b.pointerEvents=!1);b.rect(d,f,c,e);b.fill();b.pointerEvents=l;b.setStrokeColor(this.stroke);b.begin();b.moveTo(d,f);this.outline||"1"==mxUtils.getValue(this.style,"top","1")?b.lineTo(d+c,f):b.moveTo(d+c,f);this.outline||"1"==mxUtils.getValue(this.style,"right","1")?b.lineTo(d+c,f+e):b.moveTo(d+c,f+e);this.outline||"1"==mxUtils.getValue(this.style,
+"bottom","1")?b.lineTo(d,f+e):b.moveTo(d,f+e);(this.outline||"1"==mxUtils.getValue(this.style,"left","1"))&&b.lineTo(d,f);b.end();b.stroke()}};mxCellRenderer.registerShape("partialRectangle",Ia);mxUtils.extend(xa,mxEllipse);xa.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();"vertical"==mxUtils.getValue(this.style,"line")?(b.moveTo(d+c/2,f),b.lineTo(d+c/2,f+e)):(b.moveTo(d,f+e/2),b.lineTo(d+c,f+e/2));b.end();b.stroke()};
+mxCellRenderer.registerShape("lineEllipse",xa);mxUtils.extend(Aa,mxActor);Aa.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/2);b.moveTo(0,0);b.lineTo(c-d,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,c-d,e);b.lineTo(0,e);b.close();b.end()};mxCellRenderer.registerShape("delay",Aa);mxUtils.extend(wa,mxActor);wa.prototype.size=.2;wa.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(e,c);var l=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=(e-l)/2;f=d+l;var g=(c-
+l)/2,l=g+l;b.moveTo(0,d);b.lineTo(g,d);b.lineTo(g,0);b.lineTo(l,0);b.lineTo(l,d);b.lineTo(c,d);b.lineTo(c,f);b.lineTo(l,f);b.lineTo(l,e);b.lineTo(g,e);b.lineTo(g,f);b.lineTo(0,f);b.close();b.end()};mxCellRenderer.registerShape("cross",wa);mxUtils.extend(Ba,mxActor);Ba.prototype.size=.25;Ba.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/2);f=Math.min(c-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);b.moveTo(0,e/2);b.lineTo(f,0);b.lineTo(c-d,0);b.quadTo(c,0,c,e/
+2);b.quadTo(c,e,c-d,e);b.lineTo(f,e);b.close();b.end()};mxCellRenderer.registerShape("display",Ba);mxUtils.extend(Y,mxActor);Y.prototype.cst={RECT2:"mxgraph.basic.rect"};Y.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"}]}];Y.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);this.strictDrawShape(b,0,0,c,e)};Y.prototype.strictDrawShape=function(b,d,f,c,e,l){var g=l&&l.rectStyle?l.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),k=l&&l.absoluteCornerSize?l.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),m=l&&l.size?l.size:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),q=l&&l.rectOutline?l.rectOutline:
+mxUtils.getValue(this.style,"rectOutline",this.rectOutline),n=l&&l.indent?l.indent:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),z=l&&l.dashed?l.dashed:mxUtils.getValue(this.style,"dashed",!1),G=l&&l.dashPattern?l.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),v=l&&l.relIndent?l.relIndent:Math.max(0,Math.min(50,n)),p=l&&l.top?l.top:mxUtils.getValue(this.style,"top",!0),u=l&&l.right?l.right:mxUtils.getValue(this.style,"right",!0),D=l&&l.bottom?l.bottom:
+mxUtils.getValue(this.style,"bottom",!0),A=l&&l.left?l.left:mxUtils.getValue(this.style,"left",!0),x=l&&l.topLeftStyle?l.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),t=l&&l.topRightStyle?l.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),K=l&&l.bottomRightStyle?l.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),y=l&&l.bottomLeftStyle?l.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),C=l&&l.fillColor?l.fillColor:
+mxUtils.getValue(this.style,"fillColor","#ffffff");l&&l.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var da=l&&l.strokeWidth?l.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),B=l&&l.fillColor2?l.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),N=l&&l.gradientColor2?l.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),pa=l&&l.gradientDirection2?l.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),S=l&&l.opacity?l.opacity:
+mxUtils.getValue(this.style,"opacity","100"),oa=Math.max(0,Math.min(50,m));l=Y.prototype;b.setDashed(z);G&&""!=G&&b.setDashPattern(G);b.setStrokeWidth(da);m=Math.min(.5*e,.5*c,m);k||(m=oa*Math.min(c,e)/100);m=Math.min(m,.5*Math.min(c,e));k||(n=Math.min(v*Math.min(c,e)/100));n=Math.min(n,.5*Math.min(c,e)-m);(p||u||D||A)&&"frame"!=q&&(b.begin(),p?l.moveNW(b,d,f,c,e,g,x,m,A):b.moveTo(0,0),p&&l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,u),u&&l.paintNE(b,d,f,c,e,g,t,m,p),l.paintRight(b,d,f,
+c,e,g,K,m,D),D&&l.paintSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),A&&l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),b.close(),b.fill(),b.setShadow(!1),b.setFillColor(B),z=k=S,"none"==B&&(k=0),"none"==N&&(z=0),b.setGradient(B,N,0,0,c,e,pa,k,z),b.begin(),p?l.moveNWInner(b,d,f,c,e,g,x,m,n,p,A):b.moveTo(n,0),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),A&&D&&l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D),D&&u&&l.paintSEInner(b,d,f,c,e,g,K,m,n),l.paintRightInner(b,
+d,f,c,e,g,t,m,n,p,u),u&&p&&l.paintNEInner(b,d,f,c,e,g,t,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),p&&A&&l.paintNWInner(b,d,f,c,e,g,x,m,n),b.fill(),"none"==C&&(b.begin(),l.paintFolds(b,d,f,c,e,g,x,t,K,y,m,p,u,D,A),b.stroke()));p||u||D||!A?p||u||!D||A?!p&&!u&&D&&A?"frame"!=q?(b.begin(),l.moveSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),"double"==q&&(l.moveNWInner(b,d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),l.paintSWInner(b,
+d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D)),b.stroke()):(b.begin(),l.moveSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.lineNWInner(b,d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D),b.close(),b.fillAndStroke()):p||!u||D||A?!p&&u&&!D&&A?"frame"!=q?(b.begin(),l.moveSW(b,d,f,c,e,g,x,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),"double"==
+q&&(l.moveNWInner(b,d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A)),b.stroke(),b.begin(),l.moveNE(b,d,f,c,e,g,t,m,p),l.paintRight(b,d,f,c,e,g,K,m,D),"double"==q&&(l.moveSEInner(b,d,f,c,e,g,K,m,n,D),l.paintRightInner(b,d,f,c,e,g,t,m,n,p,u)),b.stroke()):(b.begin(),l.moveSW(b,d,f,c,e,g,x,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.lineNWInner(b,d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),b.close(),b.fillAndStroke(),b.begin(),l.moveNE(b,d,f,c,e,g,t,m,p),l.paintRight(b,d,f,c,e,
+g,K,m,D),l.lineSEInner(b,d,f,c,e,g,K,m,n,D),l.paintRightInner(b,d,f,c,e,g,t,m,n,p,u),b.close(),b.fillAndStroke()):!p&&u&&D&&!A?"frame"!=q?(b.begin(),l.moveNE(b,d,f,c,e,g,t,m,p),l.paintRight(b,d,f,c,e,g,K,m,D),l.paintSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),"double"==q&&(l.moveSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D),l.paintSEInner(b,d,f,c,e,g,K,m,n),l.paintRightInner(b,d,f,c,e,g,t,m,n,p,u)),b.stroke()):(b.begin(),l.moveNE(b,d,f,c,e,g,t,m,p),l.paintRight(b,
+d,f,c,e,g,K,m,D),l.paintSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.lineSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D),l.paintSEInner(b,d,f,c,e,g,K,m,n),l.paintRightInner(b,d,f,c,e,g,t,m,n,p,u),b.close(),b.fillAndStroke()):!p&&u&&D&&A?"frame"!=q?(b.begin(),l.moveNE(b,d,f,c,e,g,t,m,p),l.paintRight(b,d,f,c,e,g,K,m,D),l.paintSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),"double"==q&&(l.moveNWInner(b,
+d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D),l.paintSEInner(b,d,f,c,e,g,K,m,n),l.paintRightInner(b,d,f,c,e,g,t,m,n,p,u)),b.stroke()):(b.begin(),l.moveNE(b,d,f,c,e,g,t,m,p),l.paintRight(b,d,f,c,e,g,K,m,D),l.paintSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.lineNWInner(b,d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),l.paintSWInner(b,
+d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D),l.paintSEInner(b,d,f,c,e,g,K,m,n),l.paintRightInner(b,d,f,c,e,g,t,m,n,p,u),b.close(),b.fillAndStroke()):!p||u||D||A?p&&!u&&!D&&A?"frame"!=q?(b.begin(),l.moveSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,u),"double"==q&&(l.moveNEInner(b,d,f,c,e,g,t,m,n,u),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A)),b.stroke()):
+(b.begin(),l.moveSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,u),l.lineNEInner(b,d,f,c,e,g,t,m,n,u),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),b.close(),b.fillAndStroke()):p&&!u&&D&&!A?"frame"!=q?(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,u),"double"==q&&(l.moveNEInner(b,d,f,c,e,g,t,m,n,u),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p)),b.stroke(),b.begin(),
+l.moveSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),"double"==q&&(l.moveSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D)),b.stroke()):(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,u),l.lineNEInner(b,d,f,c,e,g,t,m,n,u),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),b.close(),b.fillAndStroke(),b.begin(),l.moveSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.lineSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D),b.close(),b.fillAndStroke()):
+p&&!u&&D&&A?"frame"!=q?(b.begin(),l.moveSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,u),"double"==q&&(l.moveNEInner(b,d,f,c,e,g,t,m,n,u),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D)),b.stroke()):(b.begin(),l.moveSE(b,d,f,c,e,g,K,
+m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,u),l.lineNEInner(b,d,f,c,e,g,t,m,n,u),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D),b.close(),b.fillAndStroke()):p&&u&&!D&&!A?"frame"!=q?(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,
+u),l.paintNE(b,d,f,c,e,g,t,m,p),l.paintRight(b,d,f,c,e,g,K,m,D),"double"==q&&(l.moveSEInner(b,d,f,c,e,g,K,m,n,D),l.paintRightInner(b,d,f,c,e,g,t,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,t,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p)),b.stroke()):(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,u),l.paintNE(b,d,f,c,e,g,t,m,p),l.paintRight(b,d,f,c,e,g,K,m,D),l.lineSEInner(b,d,f,c,e,g,K,m,n,D),l.paintRightInner(b,d,f,c,e,g,t,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,t,m,n),l.paintTopInner(b,d,f,
+c,e,g,x,m,n,A,p),b.close(),b.fillAndStroke()):p&&u&&!D&&A?"frame"!=q?(b.begin(),l.moveSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,u),l.paintNE(b,d,f,c,e,g,t,m,p),l.paintRight(b,d,f,c,e,g,K,m,D),"double"==q&&(l.moveSEInner(b,d,f,c,e,g,K,m,n,D),l.paintRightInner(b,d,f,c,e,g,t,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,t,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A)),b.stroke()):
+(b.begin(),l.moveSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,u),l.paintNE(b,d,f,c,e,g,t,m,p),l.paintRight(b,d,f,c,e,g,K,m,D),l.lineSEInner(b,d,f,c,e,g,K,m,n,D),l.paintRightInner(b,d,f,c,e,g,t,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,t,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),b.close(),b.fillAndStroke()):p&&u&&D&&!A?"frame"!=q?(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,
+A),l.paintTop(b,d,f,c,e,g,t,m,u),l.paintNE(b,d,f,c,e,g,t,m,p),l.paintRight(b,d,f,c,e,g,K,m,D),l.paintSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),"double"==q&&(l.moveSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D),l.paintSEInner(b,d,f,c,e,g,K,m,n),l.paintRightInner(b,d,f,c,e,g,t,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,t,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p)),b.stroke()):(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,u),l.paintNE(b,d,f,c,e,g,t,
+m,p),l.paintRight(b,d,f,c,e,g,K,m,D),l.paintSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.lineSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D),l.paintSEInner(b,d,f,c,e,g,K,m,n),l.paintRightInner(b,d,f,c,e,g,t,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,t,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),b.close(),b.fillAndStroke()):p&&u&&D&&A&&("frame"!=q?(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,u),l.paintNE(b,d,f,c,e,g,t,m,
+p),l.paintRight(b,d,f,c,e,g,K,m,D),l.paintSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),b.close(),"double"==q&&(l.moveSWInner(b,d,f,c,e,g,y,m,n,A),l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D),l.paintSEInner(b,d,f,c,e,g,K,m,n),l.paintRightInner(b,d,f,c,e,g,t,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,t,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,
+e,g,y,m,n,D,A),b.close()),b.stroke()):(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,u),l.paintNE(b,d,f,c,e,g,t,m,p),l.paintRight(b,d,f,c,e,g,K,m,D),l.paintSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),b.close(),l.moveSWInner(b,d,f,c,e,g,y,m,n,A),l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D),l.paintSEInner(b,d,f,c,e,g,K,m,n),l.paintRightInner(b,d,f,c,
+e,g,t,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,t,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),b.close(),b.fillAndStroke())):"frame"!=q?(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,u),"double"==q&&(l.moveNEInner(b,d,f,c,e,g,t,m,n,u),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p)),b.stroke()):(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,u),l.lineNEInner(b,d,f,c,e,g,t,m,n,u),l.paintTopInner(b,d,f,c,
+e,g,x,m,n,A,p),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),l.moveNE(b,d,f,c,e,g,t,m,p),l.paintRight(b,d,f,c,e,g,K,m,D),"double"==q&&(l.moveSEInner(b,d,f,c,e,g,K,m,n,D),l.paintRightInner(b,d,f,c,e,g,t,m,n,p,u)),b.stroke()):(b.begin(),l.moveNE(b,d,f,c,e,g,t,m,p),l.paintRight(b,d,f,c,e,g,K,m,D),l.lineSEInner(b,d,f,c,e,g,K,m,n,D),l.paintRightInner(b,d,f,c,e,g,t,m,n,p,u),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),l.moveSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),"double"==q&&
+(l.moveSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D)),b.stroke()):(b.begin(),l.moveSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.lineSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),l.moveSW(b,d,f,c,e,g,x,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),"double"==q&&(l.moveNWInner(b,d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A)),b.stroke()):(b.begin(),l.moveSW(b,d,f,c,e,g,x,m,D),l.paintLeft(b,
+d,f,c,e,g,x,m,p),l.lineNWInner(b,d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),b.close(),b.fillAndStroke());b.begin();l.paintFolds(b,d,f,c,e,g,x,t,K,y,m,p,u,D,A);b.stroke()};Y.prototype.moveNW=function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==g&&"square"==l||!k?b.moveTo(0,0):b.moveTo(0,m)};Y.prototype.moveNE=function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==g&&"square"==l||!k?b.moveTo(c,0):b.moveTo(c-m,0)};Y.prototype.moveSE=function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==g&&
+"square"==l||!k?b.moveTo(c,e):b.moveTo(c,e-m)};Y.prototype.moveSW=function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==g&&"square"==l||!k?b.moveTo(0,e):b.moveTo(m,e)};Y.prototype.paintNW=function(b,d,f,c,e,l,g,m,k){if(k)if("rounded"==g||"default"==g&&"rounded"==l||"invRound"==g||"default"==g&&"invRound"==l){d=0;if("rounded"==g||"default"==g&&"rounded"==l)d=1;b.arcTo(m,m,0,0,d,m,0)}else("snip"==g||"default"==g&&"snip"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(m,0);else b.lineTo(0,0)};Y.prototype.paintTop=
+function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==g&&"square"==l||!k?b.lineTo(c,0):b.lineTo(c-m,0)};Y.prototype.paintNE=function(b,d,f,c,e,l,g,m,k){if(k)if("rounded"==g||"default"==g&&"rounded"==l||"invRound"==g||"default"==g&&"invRound"==l){d=0;if("rounded"==g||"default"==g&&"rounded"==l)d=1;b.arcTo(m,m,0,0,d,c,m)}else("snip"==g||"default"==g&&"snip"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(c,m);else b.lineTo(c,0)};Y.prototype.paintRight=function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==
+g&&"square"==l||!k?b.lineTo(c,e):b.lineTo(c,e-m)};Y.prototype.paintLeft=function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==g&&"square"==l||!k?b.lineTo(0,0):b.lineTo(0,m)};Y.prototype.paintSE=function(b,d,f,c,e,l,g,m,k){if(k)if("rounded"==g||"default"==g&&"rounded"==l||"invRound"==g||"default"==g&&"invRound"==l){d=0;if("rounded"==g||"default"==g&&"rounded"==l)d=1;b.arcTo(m,m,0,0,d,c-m,e)}else("snip"==g||"default"==g&&"snip"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(c-m,e);else b.lineTo(c,
+e)};Y.prototype.paintBottom=function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==g&&"square"==l||!k?b.lineTo(0,e):b.lineTo(m,e)};Y.prototype.paintSW=function(b,d,f,c,e,l,g,m,k){if(k)if("rounded"==g||"default"==g&&"rounded"==l||"invRound"==g||"default"==g&&"invRound"==l){d=0;if("rounded"==g||"default"==g&&"rounded"==l)d=1;b.arcTo(m,m,0,0,d,0,e-m)}else("snip"==g||"default"==g&&"snip"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(0,e-m);else b.lineTo(0,e)};Y.prototype.paintNWInner=function(b,d,f,
+c,e,l,g,m,k){if("rounded"==g||"default"==g&&"rounded"==l)b.arcTo(m-.5*k,m-.5*k,0,0,0,k,.5*k+m);else if("invRound"==g||"default"==g&&"invRound"==l)b.arcTo(m+k,m+k,0,0,1,k,k+m);else if("snip"==g||"default"==g&&"snip"==l)b.lineTo(k,.5*k+m);else if("fold"==g||"default"==g&&"fold"==l)b.lineTo(k+m,k+m),b.lineTo(k,k+m)};Y.prototype.paintTopInner=function(b,d,f,c,e,l,g,m,k,n,q){n||q?!n&&q?b.lineTo(0,k):n&&!q?b.lineTo(k,0):n?"square"==g||"default"==g&&"square"==l?b.lineTo(k,k):"rounded"==g||"default"==g&&
+"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.lineTo(m+.5*k,k):b.lineTo(m+k,k):b.lineTo(0,k):b.lineTo(0,0)};Y.prototype.paintNEInner=function(b,d,f,c,e,l,g,m,k){if("rounded"==g||"default"==g&&"rounded"==l)b.arcTo(m-.5*k,m-.5*k,0,0,0,c-m-.5*k,k);else if("invRound"==g||"default"==g&&"invRound"==l)b.arcTo(m+k,m+k,0,0,1,c-m-k,k);else if("snip"==g||"default"==g&&"snip"==l)b.lineTo(c-m-.5*k,k);else if("fold"==g||"default"==g&&"fold"==l)b.lineTo(c-m-k,m+k),b.lineTo(c-m-k,k)};Y.prototype.paintRightInner=
+function(b,d,f,c,e,l,g,m,k,n,q){n||q?!n&&q?b.lineTo(c-k,0):n&&!q?b.lineTo(c,k):n?"square"==g||"default"==g&&"square"==l?b.lineTo(c-k,k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.lineTo(c-k,m+.5*k):b.lineTo(c-k,m+k):b.lineTo(c-k,0):b.lineTo(c,0)};Y.prototype.paintLeftInner=function(b,d,f,c,e,l,g,m,k,n,q){n||q?!n&&q?b.lineTo(k,e):n&&!q?b.lineTo(0,e-k):n?"square"==g||"default"==g&&"square"==l?b.lineTo(k,e-k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==
+g&&"snip"==l?b.lineTo(k,e-m-.5*k):b.lineTo(k,e-m-k):b.lineTo(k,e):b.lineTo(0,e)};Y.prototype.paintSEInner=function(b,d,f,c,e,l,g,m,k){if("rounded"==g||"default"==g&&"rounded"==l)b.arcTo(m-.5*k,m-.5*k,0,0,0,c-k,e-m-.5*k);else if("invRound"==g||"default"==g&&"invRound"==l)b.arcTo(m+k,m+k,0,0,1,c-k,e-m-k);else if("snip"==g||"default"==g&&"snip"==l)b.lineTo(c-k,e-m-.5*k);else if("fold"==g||"default"==g&&"fold"==l)b.lineTo(c-m-k,e-m-k),b.lineTo(c-k,e-m-k)};Y.prototype.paintBottomInner=function(b,d,f,c,
+e,l,g,m,k,n,q){n||q?!n&&q?b.lineTo(c,e-k):n&&!q?b.lineTo(c-k,e):"square"==g||"default"==g&&"square"==l||!n?b.lineTo(c-k,e-k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.lineTo(c-m-.5*k,e-k):b.lineTo(c-m-k,e-k):b.lineTo(c,e)};Y.prototype.paintSWInner=function(b,d,f,c,e,l,g,m,k,n){if(!n)b.lineTo(k,e);else if("square"==g||"default"==g&&"square"==l)b.lineTo(k,e-k);else if("rounded"==g||"default"==g&&"rounded"==l)b.arcTo(m-.5*k,m-.5*k,0,0,0,m+.5*k,e-k);else if("invRound"==
+g||"default"==g&&"invRound"==l)b.arcTo(m+k,m+k,0,0,1,m+k,e-k);else if("snip"==g||"default"==g&&"snip"==l)b.lineTo(m+.5*k,e-k);else if("fold"==g||"default"==g&&"fold"==l)b.lineTo(k+m,e-m-k),b.lineTo(k+m,e-k)};Y.prototype.moveSWInner=function(b,d,f,c,e,l,g,m,k,n){n?"square"==g||"default"==g&&"square"==l?b.moveTo(k,e-k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.moveTo(k,e-m-.5*k):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.moveTo(k,
+e-m-k):b.moveTo(0,e-k)};Y.prototype.lineSWInner=function(b,d,f,c,e,l,g,m,k,n){n?"square"==g||"default"==g&&"square"==l?b.lineTo(k,e-k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.lineTo(k,e-m-.5*k):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(k,e-m-k):b.lineTo(0,e-k)};Y.prototype.moveSEInner=function(b,d,f,c,e,l,g,m,k,n){n?"square"==g||"default"==g&&"square"==l?b.moveTo(c-k,e-k):"rounded"==g||"default"==g&&"rounded"==
+l||"snip"==g||"default"==g&&"snip"==l?b.moveTo(c-k,e-m-.5*k):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.moveTo(c-k,e-m-k):b.moveTo(c-k,e)};Y.prototype.lineSEInner=function(b,d,f,c,e,l,g,m,k,n){n?"square"==g||"default"==g&&"square"==l?b.lineTo(c-k,e-k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.lineTo(c-k,e-m-.5*k):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(c-k,e-m-k):b.lineTo(c-
+k,e)};Y.prototype.moveNEInner=function(b,d,f,c,e,l,g,m,k,n){n?"square"==g||"default"==g&&"square"==l||n?b.moveTo(c-k,k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.moveTo(c-k,m+.5*k):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.moveTo(c-k,m+k):b.moveTo(c,k)};Y.prototype.lineNEInner=function(b,d,f,c,e,l,g,m,k,n){n?"square"==g||"default"==g&&"square"==l||n?b.lineTo(c-k,k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==
+g&&"snip"==l?b.lineTo(c-k,m+.5*k):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(c-k,m+k):b.lineTo(c,k)};Y.prototype.moveNWInner=function(b,d,f,c,e,l,g,m,k,n,q){n||q?!n&&q?b.moveTo(k,0):n&&!q?b.moveTo(0,k):"square"==g||"default"==g&&"square"==l?b.moveTo(k,k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.moveTo(k,m+.5*k):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.moveTo(k,m+k):b.moveTo(0,
+0)};Y.prototype.lineNWInner=function(b,d,f,c,e,l,g,m,k,n,q){n||q?!n&&q?b.lineTo(k,0):n&&!q?b.lineTo(0,k):"square"==g||"default"==g&&"square"==l?b.lineTo(k,k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.lineTo(k,m+.5*k):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(k,m+k):b.lineTo(0,0)};Y.prototype.paintFolds=function(b,d,f,c,e,l,g,m,k,n,q,G,p,u,v){if("fold"==l||"fold"==g||"fold"==m||"fold"==k||"fold"==n)("fold"==g||"default"==
+g&&"fold"==l)&&G&&v&&(b.moveTo(0,q),b.lineTo(q,q),b.lineTo(q,0)),("fold"==m||"default"==m&&"fold"==l)&&G&&p&&(b.moveTo(c-q,0),b.lineTo(c-q,q),b.lineTo(c,q)),("fold"==k||"default"==k&&"fold"==l)&&u&&p&&(b.moveTo(c-q,e),b.lineTo(c-q,e-q),b.lineTo(c,e-q)),("fold"==n||"default"==n&&"fold"==l)&&u&&v&&(b.moveTo(0,e-q),b.lineTo(q,e-q),b.lineTo(q,e))};mxCellRenderer.registerShape(Y.prototype.cst.RECT2,Y);Y.prototype.constraints=null;mxUtils.extend(Ga,mxConnector);Ga.prototype.origPaintEdgeShape=Ga.prototype.paintEdgeShape;
+Ga.prototype.paintEdgeShape=function(b,d,f){for(var c=[],e=0;e<d.length;e++)c.push(mxUtils.clone(d[e]));var e=b.state.dashed,l=b.state.fixDash;Ga.prototype.origPaintEdgeShape.apply(this,[b,c,f]);3<=b.state.strokeWidth&&(c=mxUtils.getValue(this.style,"fillColor",null),null!=c&&(b.setStrokeColor(c),b.setStrokeWidth(b.state.strokeWidth-2),b.setDashed(e,l),Ga.prototype.origPaintEdgeShape.apply(this,[b,d,f])))};mxCellRenderer.registerShape("filledEdge",Ga);"undefined"!==typeof StyleFormatPanel&&function(){var b=
+StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var d=this.format.getSelectionState(),f=b.apply(this,arguments);"umlFrame"==d.style.shape&&f.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return f}}();mxMarker.addMarker("dash",function(b,d,f,c,e,l,g,m,k,n){var q=e*(g+k+1),G=l*(g+k+1);return function(){b.begin();b.moveTo(c.x-q/2-G/2,c.y-G/2+q/2);b.lineTo(c.x+G/2-3*q/2,c.y-3*G/2-q/2);b.stroke()}});mxMarker.addMarker("box",
+function(b,d,f,c,e,l,g,m,k,n){var q=e*(g+k+1),G=l*(g+k+1),p=c.x+q/2,z=c.y+G/2;c.x-=q;c.y-=G;return function(){b.begin();b.moveTo(p-q/2-G/2,z-G/2+q/2);b.lineTo(p-q/2+G/2,z-G/2-q/2);b.lineTo(p+G/2-3*q/2,z-3*G/2-q/2);b.lineTo(p-G/2-3*q/2,z-3*G/2+q/2);b.close();n?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("cross",function(b,d,f,c,e,l,g,m,k,n){var q=e*(g+k+1),G=l*(g+k+1);return function(){b.begin();b.moveTo(c.x-q/2-G/2,c.y-G/2+q/2);b.lineTo(c.x+G/2-3*q/2,c.y-3*G/2-q/2);b.moveTo(c.x-q/2+G/2,c.y-
+G/2-q/2);b.lineTo(c.x-G/2-3*q/2,c.y-3*G/2+q/2);b.stroke()}});mxMarker.addMarker("circle",Ua);mxMarker.addMarker("circlePlus",function(b,d,f,c,e,l,g,m,k,n){var q=c.clone(),G=Ua.apply(this,arguments),p=e*(g+2*k),z=l*(g+2*k);return function(){G.apply(this,arguments);b.begin();b.moveTo(q.x-e*k,q.y-l*k);b.lineTo(q.x-2*p+e*k,q.y-2*z+l*k);b.moveTo(q.x-p-z+l*k,q.y-z+p-e*k);b.lineTo(q.x+z-p-l*k,q.y-z-p+e*k);b.stroke()}});mxMarker.addMarker("halfCircle",function(b,d,f,c,e,l,g,m,k,q){var n=e*(g+k+1),G=l*(g+
+k+1),p=c.clone();c.x-=n;c.y-=G;return function(){b.begin();b.moveTo(p.x-G,p.y+n);b.quadTo(c.x-G,c.y+n,c.x,c.y);b.quadTo(c.x+G,c.y-n,p.x+G,p.y-n);b.stroke()}});mxMarker.addMarker("async",function(b,d,f,c,e,l,g,m,k,q){d=e*k*1.118;f=l*k*1.118;e*=g+k;l*=g+k;var n=c.clone();n.x-=d;n.y-=f;c.x+=1*-e-d;c.y+=1*-l-f;return function(){b.begin();b.moveTo(n.x,n.y);m?b.lineTo(n.x-e-l/2,n.y-l+e/2):b.lineTo(n.x+l/2-e,n.y-l-e/2);b.lineTo(n.x-e,n.y-l);b.close();q?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("openAsync",
+function(b){b=null!=b?b:2;return function(d,f,c,e,l,g,m,k,n,q){l*=m+n;g*=m+n;var G=e.clone();return function(){d.begin();d.moveTo(G.x,G.y);k?d.lineTo(G.x-l-g/b,G.y-g+l/b):d.lineTo(G.x+g/b-l,G.y-g-l/b);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ya=function(b,d,f){return La(b,["width"],d,function(d,c,e,l,g){g=b.shape.getEdgeWidth()*b.view.scale+f;return new mxPoint(l.x+c*d/4+e*g/2,l.y+e*d/4-c*g/2)},function(d,c,e,l,g,m){d=Math.sqrt(mxUtils.ptSegDistSq(l.x,l.y,g.x,g.y,m.x,m.y));b.style.width=
+Math.round(2*d)/b.view.scale-f})},La=function(b,d,f,c,e){return ha(b,d,function(d){var e=b.absolutePoints,l=e.length-1;d=b.view.translate;var g=b.view.scale,m=f?e[0]:e[l],e=f?e[1]:e[l-1],l=e.x-m.x,k=e.y-m.y,n=Math.sqrt(l*l+k*k),m=c.call(this,n,l/n,k/n,m,e);return new mxPoint(m.x/g-d.x,m.y/g-d.y)},function(d,c,l){var g=b.absolutePoints,m=g.length-1;d=b.view.translate;var k=b.view.scale,n=f?g[0]:g[m],g=f?g[1]:g[m-1],m=g.x-n.x,q=g.y-n.y,G=Math.sqrt(m*m+q*q);c.x=(c.x+d.x)*k;c.y=(c.y+d.y)*k;e.call(this,
+G,m/G,q/G,n,g,c,l)})},Ea=function(b){return function(d){return[ha(d,["arrowWidth","arrowSize"],function(d){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Z.prototype.arrowWidth))),c=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",Z.prototype.arrowSize)));return new mxPoint(d.x+(1-c)*d.width,d.y+(1-f)*d.height/2)},function(d,f){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(d.y+d.height/2-f.y)/d.height*2));this.state.style.arrowSize=Math.max(0,
+Math.min(b,(d.x+d.width-f.x)/d.width))})]}},Za=function(b){return function(d){return[ha(d,["size"],function(d){var f=Math.max(0,Math.min(.5*d.height,parseFloat(mxUtils.getValue(this.state.style,"size",b))));return new mxPoint(d.x,d.y+f)},function(b,d){this.state.style.size=Math.max(0,d.y-b.y)},!0)]}},Ra=function(b,d,f){return function(c){var e=[ha(c,["size"],function(f){var c=Math.max(0,Math.min(f.width,Math.min(f.height,parseFloat(mxUtils.getValue(this.state.style,"size",d)))))*b;return new mxPoint(f.x+
+c,f.y+c)},function(d,f){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(d.width,f.x-d.x),Math.min(d.height,f.y-d.y)))/b)},!1)];f&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(Da(c));return e}},Ma=function(b,d,f,c,e){f=null!=f?f:.5;return function(l){var g=[ha(l,["size"],function(d){var f=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,c=parseFloat(mxUtils.getValue(this.state.style,"size",f?e:b));return new mxPoint(d.x+Math.max(0,Math.min(.5*d.width,
+c*(f?1:d.width))),d.getCenterY())},function(b,d,c){b=null!=e&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?d.x-b.x:Math.max(0,Math.min(f,(d.x-b.x)/b.width));this.state.style.size=b},!1,c)];d&&mxUtils.getValue(l.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(Da(l));return g}},Va=function(b,d,f){b=null!=b?b:.5;return function(c){var e=[ha(c,["size"],function(c){var e=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,l=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,
+"size",e?f:d)));return new mxPoint(c.x+Math.min(.75*c.width*b,l*(e?.75:.75*c.width)),c.y+c.height/4)},function(d,c){var e=null!=f&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?c.x-d.x:Math.max(0,Math.min(b,(c.x-d.x)/d.width*.75));this.state.style.size=e},!1,!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(Da(c));return e}},Ka=function(){return function(b){var d=[];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Da(b));return d}},Da=function(b,d){return ha(b,
+[mxConstants.STYLE_ARCSIZE],function(f){var c=null!=d?d:f.height/8;if("1"==mxUtils.getValue(b.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(b.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(f.x+f.width-Math.min(f.width/2,e),f.y+c)}e=Math.max(0,parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(f.x+f.width-Math.min(Math.max(f.width/2,f.height/2),Math.min(f.width,f.height)*
+e),f.y+c)},function(d,f,c){"1"==mxUtils.getValue(b.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(d.width,2*(d.x+d.width-f.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(d.width-f.x+d.x)/Math.min(d.width,d.height))))})},ha=function(b,d,f,c,e,l,g){var m=new mxHandle(b,null,mxVertexHandler.prototype.secondaryHandleImage);m.execute=function(b){for(var f=0;f<d.length;f++)this.copyStyle(d[f]);
+g&&g(b)};m.getPosition=f;m.setPosition=c;m.ignoreGrid=null!=e?e:!0;if(l){var k=m.positionChanged;m.positionChanged=function(){k.apply(this,arguments);b.view.invalidate(this.state.cell);b.view.validate()}}return m},Na={link:function(b){return[Ya(b,!0,10),Ya(b,!1,10)]},flexArrow:function(b){var d=b.view.graph.gridSize/b.view.scale,f=[];mxUtils.getValue(b.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(f.push(La(b,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+!0,function(d,f,c,e,l){d=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;l=3*mxUtils.getNumber(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+f*(l+b.shape.strokewidth*b.view.scale)+c*d/2,e.y+c*(l+b.shape.strokewidth*b.view.scale)-f*d/2)},function(f,c,e,l,g,m,k){f=Math.sqrt(mxUtils.ptSegDistSq(l.x,l.y,g.x,g.y,m.x,m.y));c=mxUtils.ptLineDist(l.x,l.y,l.x+e,l.y-c,m.x,m.y);b.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-b.shape.strokewidth)/
+3)/100/b.view.scale;b.style.width=Math.round(2*f)/b.view.scale;mxEvent.isControlDown(k.getEvent())&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(b.style[mxConstants.STYLE_STARTSIZE])-parseFloat(b.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE])})),f.push(La(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,
+f,c,e,l){d=(b.shape.getStartArrowWidth()-b.shape.strokewidth)*b.view.scale;l=3*mxUtils.getNumber(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+f*(l+b.shape.strokewidth*b.view.scale)+c*d/2,e.y+c*(l+b.shape.strokewidth*b.view.scale)-f*d/2)},function(f,c,e,l,g,m,k){f=Math.sqrt(mxUtils.ptSegDistSq(l.x,l.y,g.x,g.y,m.x,m.y));c=mxUtils.ptLineDist(l.x,l.y,l.x+e,l.y-c,m.x,m.y);b.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-b.shape.strokewidth)/3)/
+100/b.view.scale;b.style.startWidth=Math.max(0,Math.round(2*f)-b.shape.getEdgeWidth())/b.view.scale;mxEvent.isControlDown(k.getEvent())&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE],b.style.endWidth=b.style.startWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(b.style[mxConstants.STYLE_STARTSIZE])-parseFloat(b.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(b.style.startWidth)-
+parseFloat(b.style.endWidth))<d&&(b.style.startWidth=b.style.endWidth))})));mxUtils.getValue(b.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(f.push(La(b,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(d,f,c,e,l){d=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;l=3*mxUtils.getNumber(b.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+f*(l+b.shape.strokewidth*b.view.scale)-c*d/2,e.y+c*(l+b.shape.strokewidth*
+b.view.scale)+f*d/2)},function(f,c,e,l,g,m,k){f=Math.sqrt(mxUtils.ptSegDistSq(l.x,l.y,g.x,g.y,m.x,m.y));c=mxUtils.ptLineDist(l.x,l.y,l.x+e,l.y-c,m.x,m.y);b.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-b.shape.strokewidth)/3)/100/b.view.scale;b.style.width=Math.round(2*f)/b.view.scale;mxEvent.isControlDown(k.getEvent())&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(b.style[mxConstants.STYLE_ENDSIZE])-parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<
+d/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE])})),f.push(La(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(d,f,c,e,l){d=(b.shape.getEndArrowWidth()-b.shape.strokewidth)*b.view.scale;l=3*mxUtils.getNumber(b.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+f*(l+b.shape.strokewidth*b.view.scale)-c*d/2,e.y+c*(l+b.shape.strokewidth*b.view.scale)+f*d/2)},function(f,c,e,l,g,m,k){f=
+Math.sqrt(mxUtils.ptSegDistSq(l.x,l.y,g.x,g.y,m.x,m.y));c=mxUtils.ptLineDist(l.x,l.y,l.x+e,l.y-c,m.x,m.y);b.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-b.shape.strokewidth)/3)/100/b.view.scale;b.style.endWidth=Math.max(0,Math.round(2*f)-b.shape.getEdgeWidth())/b.view.scale;mxEvent.isControlDown(k.getEvent())&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE],b.style.startWidth=b.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(b.style[mxConstants.STYLE_ENDSIZE])-
+parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<d/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(b.style.endWidth)-parseFloat(b.style.startWidth))<d&&(b.style.endWidth=b.style.startWidth))})));return f},swimlane:function(b){var d=[];if(mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED)){var f=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));d.push(Da(b,f/2))}d.push(ha(b,[mxConstants.STYLE_STARTSIZE],
+function(d){var f=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(d.getCenterX(),d.y+Math.max(0,Math.min(d.height,f))):new mxPoint(d.x+Math.max(0,Math.min(d.width,f)),d.getCenterY())},function(d,f){b.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(d.height,f.y-d.y))):Math.round(Math.max(0,
+Math.min(d.width,f.x-d.x)))},!1,null,function(d){if(mxEvent.isControlDown(d.getEvent())&&(d=b.view.graph,d.isTableRow(b.cell)||d.isTableCell(b.cell))){for(var f=d.getSwimlaneDirection(b.style),c=d.model.getParent(b.cell),c=d.model.getChildCells(c,!0),e=[],l=0;l<c.length;l++)c[l]!=b.cell&&d.isSwimlane(c[l])&&d.getSwimlaneDirection(d.getCurrentCellStyle(c[l]))==f&&e.push(c[l]);d.setCellStyles(mxConstants.STYLE_STARTSIZE,b.style[mxConstants.STYLE_STARTSIZE],e)}}));return d},label:Ka(),ext:Ka(),rectangle:Ka(),
+triangle:Ka(),rhombus:Ka(),umlLifeline:function(b){return[ha(b,["size"],function(b){var d=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",S.prototype.size))));return new mxPoint(b.getCenterX(),b.y+d)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},umlFrame:function(b){return[ha(b,["width","height"],function(b){var d=Math.max(aa.prototype.corner,Math.min(b.width,mxUtils.getValue(this.state.style,"width",aa.prototype.width))),
+f=Math.max(1.5*aa.prototype.corner,Math.min(b.height,mxUtils.getValue(this.state.style,"height",aa.prototype.height)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.width=Math.round(Math.max(aa.prototype.corner,Math.min(b.width,d.x-b.x)));this.state.style.height=Math.round(Math.max(1.5*aa.prototype.corner,Math.min(b.height,d.y-b.y)))},!1)]},process:function(b){var d=[ha(b,["size"],function(b){var d="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),f=parseFloat(mxUtils.getValue(this.state.style,
+"size",H.prototype.size));return d?new mxPoint(b.x+f,b.y+b.height/4):new mxPoint(b.x+b.width*f,b.y+b.height/4)},function(b,d){var f="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*b.width,d.x-b.x)):Math.max(0,Math.min(.5,(d.x-b.x)/b.width));this.state.style.size=f},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Da(b));return d},cross:function(b){return[ha(b,["size"],function(b){var d=Math.min(b.width,b.height),d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"size",wa.prototype.size)))*d/2;return new mxPoint(b.getCenterX()-d,b.getCenterY()-d)},function(b,d){var f=Math.min(b.width,b.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,b.getCenterY()-d.y)/f*2,Math.max(0,b.getCenterX()-d.x)/f*2)))})]},note:function(b){return[ha(b,["size"],function(b){var d=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size)))));return new mxPoint(b.x+b.width-d,b.y+d)},function(b,d){this.state.style.size=
+Math.round(Math.max(0,Math.min(Math.min(b.width,b.x+b.width-d.x),Math.min(b.height,d.y-b.y))))})]},note2:function(b){return[ha(b,["size"],function(b){var f=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size)))));return new mxPoint(b.x+b.width-f,b.y+f)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,b.x+b.width-d.x),Math.min(b.height,d.y-b.y))))})]},manualInput:function(b){var d=[ha(b,["size"],function(b){var d=
+Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",ea.prototype.size)));return new mxPoint(b.x+b.width/4,b.y+3*d/4)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,4*(d.y-b.y)/3)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Da(b));return d},dataStorage:function(b){return[ha(b,["size"],function(b){var d="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),f=parseFloat(mxUtils.getValue(this.state.style,"size",d?ta.prototype.fixedSize:
+ta.prototype.size));return new mxPoint(b.x+b.width-f*(d?1:b.width),b.getCenterY())},function(b,d){var f="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(b.width,b.x+b.width-d.x)):Math.max(0,Math.min(1,(b.x+b.width-d.x)/b.width));this.state.style.size=f},!1)]},callout:function(b){var d=[ha(b,["size","position"],function(b){var d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",B.prototype.size))),f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"position",B.prototype.position)));mxUtils.getValue(this.state.style,"base",B.prototype.base);return new mxPoint(b.x+f*b.width,b.y+b.height-d)},function(b,d){mxUtils.getValue(this.state.style,"base",B.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(b.height,b.y+b.height-d.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(d.x-b.x)/b.width)))/100},!1),ha(b,["position2"],function(b){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",B.prototype.position2)));
+return new mxPoint(b.x+d*b.width,b.y+b.height)},function(b,d){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(d.x-b.x)/b.width)))/100},!1),ha(b,["base"],function(b){var d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",B.prototype.size))),f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",B.prototype.position))),c=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"base",B.prototype.base)));return new mxPoint(b.x+Math.min(b.width,
+f*b.width+c),b.y+b.height-d)},function(b,d){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",B.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(b.width,d.x-b.x-f*b.width)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Da(b));return d},internalStorage:function(b){var d=[ha(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",ja.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,
+"dy",ja.prototype.dy)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.dx=Math.round(Math.max(0,Math.min(b.width,d.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Da(b));return d},module:function(b){return[ha(b,["jettyWidth","jettyHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"jettyWidth",W.prototype.jettyWidth))),f=Math.max(0,Math.min(b.height,
+mxUtils.getValue(this.state.style,"jettyHeight",W.prototype.jettyHeight)));return new mxPoint(b.x+d/2,b.y+2*f)},function(b,d){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(b.width,d.x-b.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(b.height,d.y-b.y))/2)})]},corner:function(b){return[ha(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",sa.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,
+"dy",sa.prototype.dy)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.dx=Math.round(Math.max(0,Math.min(b.width,d.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},tee:function(b){return[ha(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",ka.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",ka.prototype.dy)));return new mxPoint(b.x+(b.width+d)/2,b.y+f)},function(b,
+d){this.state.style.dx=Math.round(Math.max(0,2*Math.min(b.width/2,d.x-b.x-b.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},singleArrow:Ea(1),doubleArrow:Ea(.5),folder:function(b){return[ha(b,["tabWidth","tabHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"tabWidth",n.prototype.tabWidth))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"tabHeight",n.prototype.tabHeight)));mxUtils.getValue(this.state.style,
+"tabPosition",n.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(d=b.width-d);return new mxPoint(b.x+d,b.y+f)},function(b,d){var f=Math.max(0,Math.min(b.width,d.x-b.x));mxUtils.getValue(this.state.style,"tabPosition",n.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(f=b.width-f);this.state.style.tabWidth=Math.round(f);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},document:function(b){return[ha(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
+"size",x.prototype.size))));return new mxPoint(b.x+3*b.width/4,b.y+(1-d)*b.height)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(b.y+b.height-d.y)/b.height))},!1)]},tape:function(b){return[ha(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",y.prototype.size))));return new mxPoint(b.getCenterX(),b.y+d*b.height/2)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(d.y-b.y)/b.height*2))},!1)]},isoCube2:function(b){return[ha(b,
+["isoAngle"],function(b){var d=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",f.isoAngle))))*Math.PI/200;return new mxPoint(b.x,b.y+Math.min(b.width*Math.tan(d),.5*b.height))},function(b,d){this.state.style.isoAngle=Math.max(0,50*(d.y-b.y)/b.height)},!0)]},cylinder2:Za(l.prototype.size),cylinder3:Za(m.prototype.size),offPageConnector:function(b){return[ha(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ba.prototype.size))));
+return new mxPoint(b.getCenterX(),b.y+(1-d)*b.height)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(b.y+b.height-d.y)/b.height))},!1)]},"mxgraph.basic.rect":function(b){var d=[Graph.createHandle(b,["size"],function(b){var d=Math.max(0,Math.min(b.width/2,b.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(b.x+d,b.y+d)},function(b,d){this.state.style.size=Math.round(100*Math.max(0,Math.min(b.height/2,b.width/2,d.x-b.x)))/100})];b=Graph.createHandle(b,
+["indent"],function(b){var d=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(b.x+.75*b.width,b.y+d*b.height/200)},function(b,d){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(d.y-b.y)/b.height)))/100});d.push(b);return d},step:Ma(M.prototype.size,!0,null,!0,M.prototype.fixedSize),hexagon:Ma(P.prototype.size,!0,.5,!0,P.prototype.fixedSize),curlyBracket:Ma(F.prototype.size,!1),display:Ma(Ba.prototype.size,!1),cube:Ra(1,
+c.prototype.size,!1),card:Ra(.5,v.prototype.size,!0),loopLimit:Ra(.5,ua.prototype.size,!0),trapezoid:Va(.5,C.prototype.size,C.prototype.fixedSize),parallelogram:Va(1,E.prototype.size,E.prototype.fixedSize)};Graph.createHandle=ha;Graph.handleFactory=Na;var eb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=eb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&
+null==mxStencilRegistry.getStencil(d)?d=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(d=mxConstants.SHAPE_SWIMLANE);d=Na[d];null==d&&null!=this.state.shape&&this.state.shape.isRoundable()&&(d=Na[mxConstants.SHAPE_RECTANGLE]);null!=d&&(d=d(this.state),null!=d&&(b=null==b?d:b.concat(d)))}return b};mxEdgeHandler.prototype.createCustomHandles=function(){var b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)&&(b=mxConstants.SHAPE_CONNECTOR);
+b=Na[b];return null!=b?b(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Oa=new mxPoint(1,0),Pa=new mxPoint(1,0),Ea=mxUtils.toRadians(-30),Oa=mxUtils.getRotatedPoint(Oa,Math.cos(Ea),Math.sin(Ea)),Ea=mxUtils.toRadians(-150),Pa=mxUtils.getRotatedPoint(Pa,Math.cos(Ea),Math.sin(Ea));mxEdgeStyle.IsometricConnector=function(b,d,f,c,e){var l=b.view;c=null!=c&&0<c.length?c[0]:null;var g=b.absolutePoints,m=g[0],g=g[g.length-1];null!=c&&(c=l.transformControlPoint(b,c));null==
+m&&null!=d&&(m=new mxPoint(d.getCenterX(),d.getCenterY()));null==g&&null!=f&&(g=new mxPoint(f.getCenterX(),f.getCenterY()));var k=Oa.x,n=Oa.y,q=Pa.x,G=Pa.y,p="horizontal"==mxUtils.getValue(b.style,"elbow","horizontal");if(null!=g&&null!=m){b=function(b,d,f){b-=u.x;var c=d-u.y;d=(G*b-q*c)/(k*G-n*q);b=(n*b-k*c)/(n*q-k*G);p?(f&&(u=new mxPoint(u.x+k*d,u.y+n*d),e.push(u)),u=new mxPoint(u.x+q*b,u.y+G*b)):(f&&(u=new mxPoint(u.x+q*b,u.y+G*b),e.push(u)),u=new mxPoint(u.x+k*d,u.y+n*d));e.push(u)};var u=m;null==
+c&&(c=new mxPoint(m.x+(g.x-m.x)/2,m.y+(g.y-m.y)/2));b(c.x,c.y,!0);b(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var fb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(b,d){if(d==mxEdgeStyle.IsometricConnector){var f=new mxElbowEdgeHandler(b);f.snapToTerminals=!1;return f}return fb.apply(this,arguments)};k.prototype.constraints=[];g.prototype.getConstraints=function(b,d,f){b=[];var c=Math.tan(mxUtils.toRadians(30)),e=(.5-
+c)/2,c=Math.min(d,f/(.5+c));d=(d-c)/2;f=(f-c)/2;b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f+.25*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+.5*c,f+c*e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,f+.25*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,f+.75*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+.5*c,f+(1-e)*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f+.75*c));return b};f.prototype.getConstraints=
+function(b,d,f){b=[];var c=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,c=Math.min(d*Math.tan(c),.5*f);b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f-c));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));return b};B.prototype.getConstraints=function(b,d,f){b=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f-c)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
+d,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-c)));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,
+1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Ia.prototype.constraints=mxRectangleShape.prototype.constraints;
+mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;T.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;t.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f+c)));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};v.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f+c)));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};c.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f+c)));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(d+c),f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-c)));return b};m.prototype.getConstraints=function(b,d,f){b=[];d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,d));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-d));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-d));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d+.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1,null,0,d+.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,f-d-.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-d-.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-d));b.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-d));return b};n.prototype.getConstraints=
+function(b,d,f){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(b.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,c,e)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),e))):(b.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,d,.25*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.75*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.75*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));b.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return b};ja.prototype.constraints=mxRectangleShape.prototype.constraints;ta.prototype.constraints=mxRectangleShape.prototype.constraints;ya.prototype.constraints=mxEllipse.prototype.constraints;va.prototype.constraints=mxEllipse.prototype.constraints;
+za.prototype.constraints=mxEllipse.prototype.constraints;xa.prototype.constraints=mxEllipse.prototype.constraints;ea.prototype.constraints=mxRectangleShape.prototype.constraints;Aa.prototype.constraints=mxRectangleShape.prototype.constraints;Ba.prototype.getConstraints=function(b,d,f){b=[];var c=Math.min(d,f/2),e=Math.min(d-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+d-c),f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));return b};W.prototype.getConstraints=function(b,d,f){d=parseFloat(mxUtils.getValue(b,
+"jettyWidth",W.prototype.jettyWidth))/2;b=parseFloat(mxUtils.getValue(b,"jettyHeight",W.prototype.jettyHeight));var c=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,d),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
+.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,d),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(f-.5*b,1.5*b)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(f-.5*b,3.5*b))];f>5*b&&c.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,d));f>8*b&&c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1,null,d));f>15*b&&c.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,d));return c};ua.prototype.constraints=mxRectangleShape.prototype.constraints;ba.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];G.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
+.1),!1),new mxConnectionConstraint(new mxPoint(0,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)];fa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,
+.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
+.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ma.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
+0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,
+.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,
+1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
+.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];E.prototype.constraints=mxRectangleShape.prototype.constraints;C.prototype.constraints=mxRectangleShape.prototype.constraints;x.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;ka.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,
"dy",this.dy))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*d+.25*c,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),e));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(d+c),.5*(f+e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),f));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),.5*(f+e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*d-.25*c,e));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*e));return b};ra.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*e));return b};sa.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d,.5*e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(f+e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
-1),!1));return b};U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];aa.prototype.getConstraints=
+1),!1));return b};U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];Z.prototype.getConstraints=
function(b,d,f){b=[];var c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),c=(f-c)/2;b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-e),c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,0));b.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-e),f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-c));return b};oa.prototype.getConstraints=function(b,d,f){b=[];var c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",aa.prototype.arrowWidth)))),e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",aa.prototype.arrowSize)))),c=(f-c)/2;b.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));return b};va.prototype.getConstraints=
+.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-e),f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-c));return b};qa.prototype.getConstraints=function(b,d,f){b=[];var c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Z.prototype.arrowWidth)))),e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Z.prototype.arrowSize)))),c=(f-c)/2;b.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));return b};wa.prototype.getConstraints=
function(b,d,f){b=[];var c=Math.min(f,d),e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),c=(f-e)/2,l=c+e,g=(d-e)/2,e=g+e;b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,0));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,e,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,f-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,f));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+e),c));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+e),l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
@@ -3001,8 +3004,8 @@ DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:
DrawioFile.prototype.updateFile=function(b,c,e,k){null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():this.getLatestVersion(mxUtils.bind(this,function(g){try{null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():null!=g?this.mergeFile(g,b,c,k):this.reloadFile(b,c))}catch(p){null!=c&&c(p)}}),c))};
DrawioFile.prototype.mergeFile=function(b,c,e,k){var g=!0;try{this.stats.fileMerged++;var p=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),t=this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement);if(null!=t&&0<t.length){this.shadowPages=t;this.backupPatch=this.isModified()?this.ui.diffPages(p,this.ui.pages):null;var d=[this.ui.diffPages(null!=k?k:p,this.shadowPages)];if(!this.ignorePatches(d)){var f=this.ui.patchPages(p,
d[0]);k={};var l=this.ui.getHashValueForPages(f,k),p={},m=this.ui.getHashValueForPages(this.shadowPages,p);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",d,"checksum",m==l,l);if(null!=l&&l!=m){var q=this.compressReportData(this.getAnonymizedXmlForPages(t)),n=this.compressReportData(this.getAnonymizedXmlForPages(f)),u=this.ui.hashValue(b.getCurrentEtag()),v=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,d,"Shadow Details: "+JSON.stringify(k)+
-"\nChecksum: "+l+"\nCurrent: "+m+"\nCurrent Details: "+JSON.stringify(p)+"\nFrom: "+u+"\nTo: "+v+"\n\nFile Data:\n"+q+"\nPatched Shadow:\n"+n,null,"mergeFile");return}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(G){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
-null!=e&&e(G);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,G);else{var y=this.getCurrentUser(),x=null!=y?y.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,G)}}catch(C){}}};
+"\nChecksum: "+l+"\nCurrent: "+m+"\nCurrent Details: "+JSON.stringify(p)+"\nFrom: "+u+"\nTo: "+v+"\n\nFile Data:\n"+q+"\nPatched Shadow:\n"+n,null,"mergeFile");return}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(E){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+null!=e&&e(E);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,E);else{var y=this.getCurrentUser(),x=null!=y?y.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,E)}}catch(C){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var c=new mxCodec(mxUtils.createXmlDocument()),e=c.document.createElement("mxfile");if(null!=b)for(var k=0;k<b.length;k++){var g=c.encode(new mxGraphModel(b[k].root));"1"!=urlParams.dev&&(g=this.ui.anonymizeNode(g,!0));g.setAttribute("id",b[k].getId());b[k].viewState&&this.ui.editor.graph.saveViewState(b[k].viewState,g,!0);e.appendChild(g)}return mxUtils.getPrettyXml(e)};
DrawioFile.prototype.compressReportData=function(b,c,e){c=null!=c?c:1E4;null!=e&&null!=b&&b.length>e?b=b.substring(0,e)+"[...]":null!=b&&b.length>c&&(b=Graph.compress(b)+"\n");return b};
DrawioFile.prototype.checksumError=function(b,c,e,k,g){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=c)for(b=0;b<c.length;b++)this.ui.anonymizePatch(c[b]);var p=mxUtils.bind(this,function(b){var d=this.compressReportData(JSON.stringify(c,null,2));b=null!=b?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement)),
@@ -3084,33 +3087,35 @@ Editor.syncImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5v
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTAgNi4zNVY0LjI2Yy0uOC4yMS0xLjU1LjU0LTIuMjMuOTZsMS40NiAxLjQ2Yy4yNS0uMTIuNS0uMjQuNzctLjMzem0tNy4xNC0uOTRsMi4zNiAyLjM2QzQuNDUgOC45OSA0IDEwLjQ0IDQgMTJjMCAyLjIxLjkxIDQuMiAyLjM2IDUuNjRMNCAyMGg2di02bC0yLjI0IDIuMjRDNi42OCAxNS4xNSA2IDEzLjY2IDYgMTJjMC0xIC4yNS0xLjk0LjY4LTIuNzdsOC4wOCA4LjA4Yy0uMjUuMTMtLjUuMjUtLjc3LjM0djIuMDljLjgtLjIxIDEuNTUtLjU0IDIuMjMtLjk2bDIuMzYgMi4zNiAxLjI3LTEuMjdMNC4xNCA0LjE0IDIuODYgNS40MXpNMjAgNGgtNnY2bDIuMjQtMi4yNEMxNy4zMiA4Ljg1IDE4IDEwLjM0IDE4IDEyYzAgMS0uMjUgMS45NC0uNjggMi43N2wxLjQ2IDEuNDZDMTkuNTUgMTUuMDEgMjAgMTMuNTYgMjAgMTJjMC0yLjIxLS45MS00LjItMi4zNi01LjY0TDIwIDR6Ii8+PC9zdmc+";
Editor.syncProblemImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyAxMmMwIDIuMjEuOTEgNC4yIDIuMzYgNS42NEwzIDIwaDZ2LTZsLTIuMjQgMi4yNEM1LjY4IDE1LjE1IDUgMTMuNjYgNSAxMmMwLTIuNjEgMS42Ny00LjgzIDQtNS42NVY0LjI2QzUuNTUgNS4xNSAzIDguMjcgMyAxMnptOCA1aDJ2LTJoLTJ2MnpNMjEgNGgtNnY2bDIuMjQtMi4yNEMxOC4zMiA4Ljg1IDE5IDEwLjM0IDE5IDEyYzAgMi42MS0xLjY3IDQuODMtNCA1LjY1djIuMDljMy40NS0uODkgNi00LjAxIDYtNy43NCAwLTIuMjEtLjkxLTQuMi0yLjM2LTUuNjRMMjEgNHptLTEwIDloMlY3aC0ydjZ6Ii8+PC9zdmc+";
Editor.drawLogoImage="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJFYmVuZV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMjUwIDI1MCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjUwIDI1MDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MntmaWxsOiMwMDA7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QyIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLDE1KSIgZD0iTTE5Ny4xLDEzOC4zaC0yMy43bC0yNS00Mi43YzUuNy0xLjIsOS44LTYuMiw5LjctMTJWNTEuNWMwLTYuOC01LjQtMTIuMy0xMi4yLTEyLjNjMCwwLTAuMSwwLTAuMSwwaC00MS43CgljLTYuOCwwLTEyLjMsNS40LTEyLjMsMTIuMmMwLDAsMCwwLjEsMCwwLjF2MzIuMWMwLDUuOCw0LDEwLjgsOS43LDEybC0yNSw0Mi43SDUyLjljLTYuOCwwLTEyLjMsNS40LTEyLjMsMTIuMmMwLDAsMCwwLjEsMCwwLjEKCXYzMi4xYzAsNi44LDUuNCwxMi4zLDEyLjIsMTIuM2MwLDAsMC4xLDAsMC4xLDBoNDEuN2M2LjgsMCwxMi4zLTUuNCwxMi4zLTEyLjJjMCwwLDAtMC4xLDAtMC4xdi0zMi4xYzAtNi44LTUuNC0xMi4zLTEyLjItMTIuMwoJYzAsMC0wLjEsMC0wLjEsMGgtNGwyNC44LTQyLjRoMTkuM2wyNC45LDQyLjRoLTQuMWMtNi44LDAtMTIuMyw1LjQtMTIuMywxMi4yYzAsMCwwLDAuMSwwLDAuMXYzMi4xYzAsNi44LDUuNCwxMi4zLDEyLjIsMTIuMwoJYzAsMCwwLjEsMCwwLjEsMGg0MS43YzYuOCwwLDEyLjMtNS40LDEyLjMtMTIuMmMwLDAsMC0wLjEsMC0wLjF2LTMyLjFjMC02LjgtNS40LTEyLjMtMTIuMi0xMi4zCglDMTk3LjIsMTM4LjMsMTk3LjIsMTM4LjMsMTk3LjEsMTM4LjN6Ii8+Cjwvc3ZnPgo=";
+Editor.tailSpin="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9Ii0yIC0yIDQ0IDQ0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogICAgPGRlZnM+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IHgxPSI4LjA0MiUiIHkxPSIwJSIgeDI9IjY1LjY4MiUiIHkyPSIyMy44NjUlIiBpZD0iYSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiM4MDgwODAiIHN0b3Atb3BhY2l0eT0iMCIgb2Zmc2V0PSIwJSIvPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjODA4MDgwIiBzdG9wLW9wYWNpdHk9Ii42MzEiIG9mZnNldD0iNjMuMTQ2JSIvPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjODA4MDgwIiBvZmZzZXQ9IjEwMCUiLz4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPC9kZWZzPgogICAgPGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxIDEpIj4KICAgICAgICAgICAgPHBhdGggZD0iTTM2IDE4YzAtOS45NC04LjA2LTE4LTE4LTE4IiBzdHJva2U9InVybCgjYSkiIHN0cm9rZS13aWR0aD0iNiI+CiAgICAgICAgICAgICAgICA8YW5pbWF0ZVRyYW5zZm9ybQogICAgICAgICAgICAgICAgICAgIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIKICAgICAgICAgICAgICAgICAgICB0eXBlPSJyb3RhdGUiCiAgICAgICAgICAgICAgICAgICAgZnJvbT0iMCAxOCAxOCIKICAgICAgICAgICAgICAgICAgICB0bz0iMzYwIDE4IDE4IgogICAgICAgICAgICAgICAgICAgIGR1cj0iMC45cyIKICAgICAgICAgICAgICAgICAgICByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgLz4KICAgICAgICAgICAgPC9wYXRoPgogICAgICAgICAgICA8Y2lyY2xlIGZpbGw9IiM4MDgwODAiIGN4PSIzNiIgY3k9IjE4IiByPSIxIj4KICAgICAgICAgICAgICAgIDxhbmltYXRlVHJhbnNmb3JtCiAgICAgICAgICAgICAgICAgICAgYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIgogICAgICAgICAgICAgICAgICAgIHR5cGU9InJvdGF0ZSIKICAgICAgICAgICAgICAgICAgICBmcm9tPSIwIDE4IDE4IgogICAgICAgICAgICAgICAgICAgIHRvPSIzNjAgMTggMTgiCiAgICAgICAgICAgICAgICAgICAgZHVyPSIwLjlzIgogICAgICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPgogICAgICAgICAgICA8L2NpcmNsZT4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPgo=";
Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";Editor.hiResImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAh1BMVEUAAABMTExERERBQUFBQUFFRUVAQEBCQkJAQEA6OjpDQ0NKSkpBQUFBQUFERERERERBQUFCQkJCQkJCQkJJSUlBQUFCQkJDQ0NDQ0NCQkJDQ0NBQUFBQUFCQkJBQUFCQkJCQkJDQ0NCQkJHR0dBQUFCQkJCQkJAQEBCQkJDQ0NAQEBERERCQkIk1hS2AAAAKnRSTlMAAjj96BL7PgQFRwfu3TYazKuVjRXl1V1DPCn1uLGjnWNVIgy9hU40eGqPkM38AAACG0lEQVRYw+2X63KbMBCFzwZblgGDceN74muatpLe//m6MHV3gHGFAv2RjM94MAbxzdnVsQbBDKwH8AH8MDAyafzjqYeyOG04XE7RS8nIRDXg6BlT+rA0nmtAPh+NQRDxIASIMG44rAMrGunBgHwy3uUldxggIStGKp2f+DQc2O4h4eQsX3O2IFB/oEbsjOKbStnjAEA+zJ0ylZTbgvoDn8xNyn6Dbj5Kd4GsNpABa6duQPfSdEj88TgMAhKuCWjAkgmFXPLnsD0pWd3OFGdrMugQII/eOMPEiGOzqPMIeWrcSoMCg71W1pXBPvCP+gS/OdXqQ3uW23+93XGWLl/OaBb805bNcBPoEIcVJsnHzcxpZH86u5KZ9gDby5dQCcnKqdbke4ItI4Tzd7IW9hZQt4EO6GG9b9sYuuK9Wwn8TIr2xKbF2+3Nhr+qxChJ/AI6pIfCu4z4Zowp4ZUNihz79vewzctnHDwTvQO/hCdFBzrUGDOPn2Y/F8YKT4oOATLvlhOznzmBSdFBJWtc58y7r+UVFOCQczy3wpN6pegDqHtsCPTGvH9JuTO0Dyg8icldYPk+RB6g8Aofj4m2EKBvtTmUPD9xDd1pPcSReV2U5iD/ik2yrngtvvqBfPzOvKiDTKTsCdoHZJ7pLLffgTwlJ5vJdtJV2/jiAYaLvLGhMAEDO5QcDg2M/jOw/8Zn+K3ZwJvHT7ZffgC/NvA3zcybTeIfE4EAAAAASUVORK5CYII=":
IMAGE_PATH+"/img-hi-res.png";Editor.loResImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==":
IMAGE_PATH+"/img-lo-res.png";Editor.cameraImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE0LjEyIDRsMS44MyAySDIwdjEySDRWNmg0LjA1bDEuODMtMmg0LjI0TTE1IDJIOUw3LjE3IDRINGMtMS4xIDAtMiAuOS0yIDJ2MTJjMCAxLjEuOSAyIDIgMmgxNmMxLjEgMCAyLS45IDItMlY2YzAtMS4xLS45LTItMi0yaC0zLjE3TDE1IDJ6bS0zIDdjMS42NSAwIDMgMS4zNSAzIDNzLTEuMzUgMy0zIDMtMy0xLjM1LTMtMyAxLjM1LTMgMy0zbTAtMmMtMi43NiAwLTUgMi4yNC01IDVzMi4yNCA1IDUgNSA1LTIuMjQgNS01LTIuMjQtNS01LTV6Ii8+PC9zdmc+";
Editor.tagsImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjE4cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjE4cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMjEuNDEsMTEuNDFsLTguODMtOC44M0MxMi4yMSwyLjIxLDExLjcsMiwxMS4xNywySDRDMi45LDIsMiwyLjksMiw0djcuMTdjMCwwLjUzLDAuMjEsMS4wNCwwLjU5LDEuNDFsOC44Myw4LjgzIGMwLjc4LDAuNzgsMi4wNSwwLjc4LDIuODMsMGw3LjE3LTcuMTdDMjIuMiwxMy40NiwyMi4yLDEyLjIsMjEuNDEsMTEuNDF6IE0xMi44MywyMEw0LDExLjE3VjRoNy4xN0wyMCwxMi44M0wxMi44MywyMHoiLz48Y2lyY2xlIGN4PSI2LjUiIGN5PSI2LjUiIHI9IjEuNSIvPjwvZz48L2c+PC9zdmc+";
Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.errorImage="data:image/gif;base64,R0lGODlhEAAQAPcAAADGAIQAAISEhP8AAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAAALAAAAAAQABAAAAhoAAEIFBigYMGBCAkGGMCQ4cGECxtKHBAAYUQCEzFSHLiQgMeGHjEGEAAg4oCQJz86LCkxpEqHAkwyRClxpEyXGmGaREmTIsmOL1GO/DkzI0yOE2sKIMlRJsWhCQHENDiUaVSpS5cmDAgAOw==";
-Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.compressXml=!0;Editor.globalVars=null;Editor.shadowOptionEnabled=!mxClient.IS_SF;Editor.config=
-null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(b,d){return"1"!=mxUtils.getValue(b.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"comic","0")||"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(b,d){return"1"==
-mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(b,d){return"1"==
-mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",
-defVal:!1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(b,
-d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"comic","0")||"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==
-urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",
-dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(b){return"orthogonalEdgeStyle"==mxUtils.getValue(b.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",
-dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",
-defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",
-type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(b,d){var c=d.editorUi.editor.graph.getCellStyle(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null);return"1"==mxUtils.getValue(c,"resizeLastRow","0")},isVisible:function(b,
-d){var c=d.editorUi.editor.graph;return 1==b.vertices.length&&0==b.edges.length&&c.isTable(b.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(b,d){var c=d.editorUi.editor.graph.getCellStyle(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null);return"1"==mxUtils.getValue(c,"resizeLast","0")},isVisible:function(b,d){var c=d.editorUi.editor.graph;return 1==b.vertices.length&&0==b.edges.length&&c.isTable(b.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",
-type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",
-dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",
-dispName:"Connectable",type:"bool",getDefaultValue:function(b,d){return d.editorUi.editor.graph.isCellConnectable(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null)},isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",
-dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",
-dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(b,d){var c=1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null,f=d.editorUi.editor.graph;return null!=
-c&&(f.isSwimlane(c)||0<f.model.getChildCount(c))},isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(b,d){var c=1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null,f=d.editorUi.editor.graph;return null!=c&&(f.isContainer(c)&&"0"!=b.style.collapsible||!f.isContainer(c)&&"1"==b.style.collapsible)},isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"recursiveResize",
-dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length&&!d.editorUi.editor.graph.isSwimlane(b.vertices[0])&&null==mxUtils.getValue(b.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(b,d){var c=d.editorUi.editor.graph.model;return 0<b.vertices.length?c.isVertex(c.getParent(b.vertices[0])):!1}},{name:"editable",dispName:"Editable",
-type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(b,d){var c=0<b.vertices.length?d.editorUi.editor.graph.getCellGeometry(b.vertices[0]):null;return null!=c&&!c.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",
-dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,
-isVisible:function(b,d){var c=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,null);return d.editorUi.editor.graph.isSwimlane(b.vertices[0])||null==c||c==mxConstants.NONE||null!=b.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(b,d){return 0<b.vertices.length&&d.editorUi.editor.graph.isContainer(b.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
+Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;
+Editor.compressXml=!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(b,d){return"1"!=mxUtils.getValue(b.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"comic","0")||"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",
+type:"int",defVal:-1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"curveFitting",dispName:"Curve Fitting",
+type:"float",defVal:.95,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",
+dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"zigzagOffset",
+dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"comic","0")||"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(b,
+d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",
+type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(b){return"orthogonalEdgeStyle"==mxUtils.getValue(b.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",
+type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},
+{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",
+defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(b,d){var c=d.editorUi.editor.graph;return"1"==urlParams.test&&1==b.vertices.length&&0==b.edges.length&&c.isTableCell(b.vertices[0])}},{type:"separator"},
+{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(b,d){var c=d.editorUi.editor.graph.getCellStyle(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null);return"1"==mxUtils.getValue(c,"resizeLastRow","0")},isVisible:function(b,d){var c=d.editorUi.editor.graph;return 1==b.vertices.length&&0==b.edges.length&&c.isTable(b.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(b,d){var c=d.editorUi.editor.graph.getCellStyle(1==
+b.vertices.length&&0==b.edges.length?b.vertices[0]:null);return"1"==mxUtils.getValue(c,"resizeLast","0")},isVisible:function(b,d){var c=d.editorUi.editor.graph;return 1==b.vertices.length&&0==b.edges.length&&c.isTable(b.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},
+{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",
+defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(b,d){return d.editorUi.editor.graph.isCellConnectable(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null)},isVisible:function(b,d){return 1==b.vertices.length&&
+0==b.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",
+dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",
+type:"bool",defVal:!1,isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(b,d){var c=1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null,f=d.editorUi.editor.graph;return null!=c&&(f.isSwimlane(c)||0<f.model.getChildCount(c))},isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(b,d){var c=1==b.vertices.length&&
+0==b.edges.length?b.vertices[0]:null,f=d.editorUi.editor.graph;return null!=c&&(f.isContainer(c)&&"0"!=b.style.collapsible||!f.isContainer(c)&&"1"==b.style.collapsible)},isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length&&!d.editorUi.editor.graph.isSwimlane(b.vertices[0])&&null==mxUtils.getValue(b.style,"childLayout",null)}},{name:"expand",
+dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(b,d){var c=d.editorUi.editor.graph.model;return 0<b.vertices.length?c.isVertex(c.getParent(b.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",
+dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(b,d){var c=0<b.vertices.length?d.editorUi.editor.graph.getCellGeometry(b.vertices[0]):null;return null!=c&&!c.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},
+{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(b,d){var c=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,null);return d.editorUi.editor.graph.isSwimlane(b.vertices[0])||null==c||c==mxConstants.NONE||null!=b.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",
+type:"bool",defVal:!1,isVisible:function(b,d){return 0<b.vertices.length&&d.editorUi.editor.graph.isContainer(b.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
Editor.createRoughCanvas=function(b){var d=rough.canvas({getContext:function(){return b}});d.draw=function(d){var c=d.sets||[];d=d.options||this.getDefaultOptions();for(var f=0;f<c.length;f++){var e=c[f];switch(e.type){case "path":null!=d.stroke&&this._drawToContext(b,e,d);break;case "fillPath":this._drawToContext(b,e,d);break;case "fillSketch":this.fillSketch(b,e,d)}}};d.fillSketch=function(d,c,f){var e=b.state.strokeColor,g=b.state.strokeWidth,l=b.state.strokeAlpha,k=b.state.dashed,m=f.fillWeight;
0>m&&(m=f.strokeWidth/2);b.setStrokeAlpha(b.state.fillAlpha);b.setStrokeColor(f.fill||"");b.setStrokeWidth(m);b.setDashed(!1);this._drawToContext(d,c,f);b.setDashed(k);b.setStrokeWidth(g);b.setStrokeColor(e);b.setStrokeAlpha(l)};d._drawToContext=function(b,d,c){b.begin();for(var f=0;f<d.ops.length;f++){var e=d.ops[f],g=e.data;switch(e.op){case "move":b.moveTo(g[0],g[1]);break;case "bcurveTo":b.curveTo(g[0],g[1],g[2],g[3],g[4],g[5]);break;case "lineTo":b.lineTo(g[0],g[1])}}b.end();"fillPath"===d.type&&
c.filled?b.fill():b.stroke()};return d};(function(){function b(d,c,f){this.canvas=d;this.rc=c;this.shape=f;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,b.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,b.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,b.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
@@ -3124,7 +3129,7 @@ this.originalEnd.apply(this.canvas,arguments)};b.prototype.addOp=function(){if(n
function(b,d){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,b,d),this.lastX=b,this.lastY=d,this.firstX=b,this.firstY=d)};b.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};b.prototype.quadTo=function(b,d,c,f){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,b,d,c,f),this.lastX=c,this.lastY=f)};b.prototype.curveTo=function(b,d,c,f,e,g){this.passThrough?
this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,b,d,c,f,e,g),this.lastX=e,this.lastY=g)};b.prototype.arcTo=function(b,d,c,f,e,g,l){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var k=mxUtils.arcToCurves(this.lastX,this.lastY,b,d,c,f,e,g,l);if(null!=k)for(var m=0;m<k.length;m+=6)this.curveTo(k[m],k[m+1],k[m+2],k[m+3],k[m+4],k[m+5]);this.lastX=g;this.lastY=l}};b.prototype.rect=function(b,d,c,f){this.passThrough?this.originalRect.apply(this.canvas,
arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(b,d,c,f,this.getStyle(!0,!0)))};b.prototype.ellipse=function(b,d,c,f){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(b+c/2,d+f/2,c,f,this.getStyle(!0,!0)))};b.prototype.roundrect=function(b,d,c,f,e,g){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(b+e,d),this.lineTo(b+c-e,d),this.quadTo(b+c,d,b+c,d+g),this.lineTo(b+
-c,d+f-g),this.quadTo(b+c,d+f,b+c-e,d+f),this.lineTo(b+e,d+f),this.quadTo(b,d+f,b,d+f-g),this.lineTo(b,d+g),this.quadTo(b,d,b+e,d))};b.prototype.drawPath=function(b){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),b)}catch(Z){}this.passThrough=!1}else if(null!=this.nextShape){for(var d in b)this.nextShape.options[d]=b[d];null==b.stroke&&delete this.nextShape.options.stroke;b.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);
+c,d+f-g),this.quadTo(b+c,d+f,b+c-e,d+f),this.lineTo(b+e,d+f),this.quadTo(b,d+f,b,d+f-g),this.lineTo(b,d+g),this.quadTo(b,d,b+e,d))};b.prototype.drawPath=function(b){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),b)}catch(aa){}this.passThrough=!1}else if(null!=this.nextShape){for(var d in b)this.nextShape.options[d]=b[d];null==b.stroke&&delete this.nextShape.options.stroke;b.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);
this.passThrough=!1}};b.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};b.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};b.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};b.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;
this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;
this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(d){return new b(d,Editor.createRoughCanvas(d),this)};var d=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(b){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0")?d.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(b):this.createRoughCanvas(b)};var c=mxShape.prototype.paint;
@@ -3137,7 +3142,7 @@ f=null;0<c.length?(c=Graph.decompress(c,null,d),null!=c&&0<c.length&&(f=mxUtils.
!mxClient.IS_SF?atob(b):Base64.decode(b,!0);if("%PDF-1.7"==b.substring(0,8)){var d=b.indexOf("EmbeddedFile");if(-1<d){var c=b.indexOf("stream",d)+9;if(0<b.substring(d,c).indexOf("application#2Fvnd.jgraph.mxfile"))return d=b.indexOf("endstream",c-1),pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(c,d)),{to:"string"})}return null}for(var c=null,d="",f=0,e=0,g=[],l=null;e<b.length;){var k=b.charCodeAt(e),e=e+1;10!=k&&(d+=String.fromCharCode(k));k=="/Subject (%3Cmxfile".charCodeAt(f)?f++:f=0;if(19==
f){var m=b.indexOf("%3C%2Fmxfile%3E)",e)+15,e=e-9;if(m>e){c=b.substring(e,m);break}}10==k&&("endobj"==d?l=null:"obj"==d.substring(d.length-3,d.length)||"xref"==d||"trailer"==d?(l=[],g[d.split(" ")[0]]=l):null!=l&&l.push(d),d="")}null==c&&(c=Editor.extractGraphModelFromXref(g));null!=c&&(c=decodeURIComponent(c.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return c};Editor.extractGraphModelFromXref=function(b){var d=b.trailer,c=null;null!=d&&(d=/.* \/Info (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<
d.length&&(d=b[d[1]],null!=d&&(d=/.* \/Subject (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<d.length&&(b=b[d[1]],null!=b&&(b=b.join("\n"),c=b.substring(1,b.length-1))))));return c};Editor.extractGraphModelFromPng=function(b){var d=null;try{var c=b.substring(b.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(f,mxUtils.bind(this,function(b,c,e){b=f.substring(b+8,b+8+e);"zTXt"==c?(e=b.indexOf(String.fromCharCode(0)),"mxGraphModel"==b.substring(0,e)&&(b=pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(e+
-2)),{to:"string"}).replace(/\+/g," "),null!=b&&0<b.length&&(d=b))):"tEXt"==c&&(b=b.split(String.fromCharCode(0)),1<b.length&&("mxGraphModel"==b[0]||"mxfile"==b[0])&&(d=b[1]));if(null!=d||"IDAT"==c)return!0}))}catch(I){}null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));return d};Editor.extractParserError=function(b,d){var c=null,f=null!=b?b.getElementsByTagName("parsererror"):null;null!=f&&0<f.length&&(c=d||mxResources.get("invalidChars"),f=f[0].getElementsByTagName("div"),
+2)),{to:"string"}).replace(/\+/g," "),null!=b&&0<b.length&&(d=b))):"tEXt"==c&&(b=b.split(String.fromCharCode(0)),1<b.length&&("mxGraphModel"==b[0]||"mxfile"==b[0])&&(d=b[1]));if(null!=d||"IDAT"==c)return!0}))}catch(K){}null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));return d};Editor.extractParserError=function(b,d){var c=null,f=null!=b?b.getElementsByTagName("parsererror"):null;null!=f&&0<f.length&&(c=d||mxResources.get("invalidChars"),f=f[0].getElementsByTagName("div"),
0<f.length&&(c=mxUtils.getTextContent(f[0])));return null!=c?mxUtils.trim(c):c};Editor.addRetryToError=function(b,d){if(null!=b){var c=null!=b.error?b.error:b;null==c.retry&&(c.retry=d)}};Editor.configure=function(b,d){if(null!=b){Editor.config=b;Editor.configVersion=b.version;Menus.prototype.defaultFonts=b.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=b.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=b.defaultColors||ColorDialog.prototype.defaultColors;
ColorDialog.prototype.colorNames=b.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=b.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=b.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=b.autosaveDelay||DrawioFile.prototype.autosaveDelay;null!=b.templateFile&&(EditorUi.templateFile=b.templateFile);null!=b.styles&&(Editor.styles=b.styles);null!=b.globalVars&&(Editor.globalVars=
b.globalVars);null!=b.compressXml&&(Editor.compressXml=b.compressXml);null!=b.includeDiagram&&(Editor.defaultIncludeDiagram=b.includeDiagram);null!=b.simpleLabels&&(Editor.simpleLabels=b.simpleLabels);b.customFonts&&(Menus.prototype.defaultFonts=b.customFonts.concat(Menus.prototype.defaultFonts));b.customPresetColors&&(ColorDialog.prototype.presetColors=b.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=b.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=b.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));
@@ -3150,7 +3155,7 @@ b){Editor.prototype.fontCss=b;var d=document.getElementsByTagName("script")[0];i
Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!0;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(d){d=null!=d&&"mxlibrary"!=d.nodeName?this.extractGraphModel(d):null;if(null!=d){var c=d.getElementsByTagName("parsererror");if(null!=c&&0<c.length){var c=c[0],f=c.getElementsByTagName("div");null!=f&&0<f.length&&
(c=f[0]);throw{message:mxUtils.getTextContent(c)};}if("mxGraphModel"==d.nodeName){c=d.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=c&&""!=c)c!=this.graph.currentStyle&&(f=null!=this.graph.themes?this.graph.themes[c]:mxUtils.load(STYLE_PATH+"/"+c+".xml").getDocumentElement(),null!=f&&(e=new mxCodec(f.ownerDocument),e.decode(f,this.graph.getStylesheet())));else if(f=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),
null!=f){var e=new mxCodec(f.ownerDocument);e.decode(f,this.graph.getStylesheet())}this.graph.currentStyle=c;this.graph.mathEnabled="1"==urlParams.math||"1"==d.getAttribute("math");c=d.getAttribute("backgroundImage");null!=c?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(c)):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();
-this.graph.updateCssTransform();this.graph.setShadowVisible("1"==d.getAttribute("shadow"),!1);if(c=d.getAttribute("extFonts"))try{for(c=c.split("|").map(function(b){b=b.split("^");return{name:b[0],url:b[1]}}),f=0;f<c.length;f++)this.graph.addExtFont(c[f].name,c[f].url)}catch(I){console.log("ExtFonts format error: "+I.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",
+this.graph.updateCssTransform();this.graph.setShadowVisible("1"==d.getAttribute("shadow"),!1);if(c=d.getAttribute("extFonts"))try{for(c=c.split("|").map(function(b){b=b.split("^");return{name:b[0],url:b[1]}}),f=0;f<c.length;f++)this.graph.addExtFont(c[f].name,c[f].url)}catch(K){console.log("ExtFonts format error: "+K.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",
toString:function(){return this.message}};};var c=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(b,d){b=null!=b?b:!0;var f=c.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&f.setAttribute("style",this.graph.currentStyle);var e=this.graph.getBackgroundImageObject(this.graph.backgroundImage,d);null!=e&&f.setAttribute("backgroundImage",JSON.stringify(e));f.setAttribute("math",this.graph.mathEnabled?"1":"0");f.setAttribute("shadow",this.graph.shadowVisible?
"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(e=this.graph.extFonts.map(function(b){return b.name+"^"+b.url}),f.setAttribute("extFonts",e.join("|")));return f};Editor.prototype.isDataSvg=function(b){try{var d=mxUtils.parseXml(b).documentElement.getAttribute("content");if(null!=d&&(null!=d&&"<"!=d.charAt(0)&&"%"!=d.charAt(0)&&(d=unescape(window.atob?atob(d):Base64.decode(cont,d))),null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d)),null!=d&&0<d.length)){var c=mxUtils.parseXml(d).documentElement;
return"mxfile"==c.nodeName||"mxGraphModel"==c.nodeName}}catch(da){}return!1};Editor.prototype.extractGraphModel=function(b,d,c){return Editor.extractGraphModel.apply(this,arguments)};var e=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&
@@ -3158,7 +3163,7 @@ this.graph.isCssTransformsSupported();this.graph.updateCssTransform();e.apply(th
"div.MathJax_SVG_Display { position: static; }\nspan.MathJax_SVG { position: static !important; }";Editor.initMath=function(b,d){if("undefined"===typeof window.MathJax){b=(null!=b?b:DRAW_MATH_URL+"/MathJax.js")+"?config=TeX-MML-AM_"+("html"==urlParams["math-output"]?"HTMLorMML":"SVG")+"-full";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(b){window.setTimeout(function(){"hidden"!=b.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,b])},0)};var c=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):
"TeX";d=null!=d?d:{"HTML-CSS":{availableFonts:[c],imageFont:null},SVG:{font:c,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(d);MathJax.Hub.Register.StartupHook("Begin",function(){for(var b=0;b<Editor.mathJaxQueue.length;b++)Editor.doMathJaxRender(Editor.mathJaxQueue[b])})}};Editor.MathJaxRender=function(b){"undefined"!==typeof MathJax&&
"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(b):Editor.mathJaxQueue.push(b)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var f=Editor.prototype.init;Editor.prototype.init=function(){f.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,d){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};c=document.getElementsByTagName("script");if(null!=c&&0<c.length){var e=document.createElement("script");
-e.setAttribute("type","text/javascript");e.setAttribute("src",b);c[0].parentNode.appendChild(e)}try{if(mxClient.IS_GC||mxClient.IS_SF){var g=document.createElement("style");g.type="text/css";g.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(g)}}catch(Z){}}};Editor.prototype.csvToArray=function(b){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(b))return null;
+e.setAttribute("type","text/javascript");e.setAttribute("src",b);c[0].parentNode.appendChild(e)}try{if(mxClient.IS_GC||mxClient.IS_SF){var g=document.createElement("style");g.type="text/css";g.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(g)}}catch(aa){}}};Editor.prototype.csvToArray=function(b){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(b))return null;
var d=[];b.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(b,c,f,e){void 0!==c?d.push(c.replace(/\\'/g,"'")):void 0!==f?d.push(f.replace(/\\"/g,'"')):void 0!==e&&d.push(e);return""});/,\s*$/.test(b)&&d.push("");return d};Editor.prototype.isCorsEnabledForUrl=function(b){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||b.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&
null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(b)||"https://raw.githubusercontent.com/"===b.substring(0,34)};Editor.prototype.createImageUrlConverter=function(){var b=new mxUrlConverter;b.updateBaseUrl();var d=b.convert,c=this;b.convert=function(f){if(null!=f){var e="http://"==f.substring(0,7)||"https://"==f.substring(0,8);e&&!navigator.onLine?f=Editor.svgBrokenImage.src:!e||f.substring(0,b.baseUrl.length)==
b.baseUrl||c.crossOriginImages&&c.isCorsEnabledForUrl(f)?"chrome-extension://"==f.substring(0,19)||mxClient.IS_CHROMEAPP||(f=d.apply(this,arguments)):f=PROXY_URL+"?url="+encodeURIComponent(f)}return f};return b};Editor.createSvgDataUri=function(b){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(b)))};Editor.prototype.convertImageToDataUri=function(b,d){try{var c=!0,f=window.setTimeout(mxUtils.bind(this,function(){c=!1;d(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(b))mxUtils.get(b,
@@ -3175,17 +3180,17 @@ k||/(\.woff)($|\?)/i.test(b))d="application/font-woff";else if("woff2"==k||/(\.w
null,"data:"+d+";charset=utf-8;base64,")}})(Editor.trimCssUrl(c[g].substring(0,l)),k)}e()}else d(b)};Editor.prototype.loadFonts=function(b){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(d){this.resolvedFontCss=d;b()})):b()};Editor.prototype.embedExtFonts=function(b){var d=this.graph.getCustomFonts();if(0<d.length){var c="",f=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var e=mxUtils.bind(this,function(){0==f&&this.embedCssFonts(c,
b)}),g=0;g<d.length;g++)mxUtils.bind(this,function(b,d){Graph.isCssFontUrl(d)?null==this.cachedGoogleFonts[d]?(f++,this.loadUrl(d,mxUtils.bind(this,function(b){this.cachedGoogleFonts[d]=b;c+=b;f--;e()}),mxUtils.bind(this,function(b){f--;c+="@import url("+d+");";e()}))):c+=this.cachedGoogleFonts[d]:c+='@font-face {font-family: "'+b+'";src: url("'+d+'")}'})(d[g].name,d[g].url);e()}else b()};Editor.prototype.addMathCss=function(b){b=b.getElementsByTagName("defs");if(null!=b&&0<b.length)for(var d=document.getElementsByTagName("style"),
c=0;c<d.length;c++)0<mxUtils.getTextContent(d[c]).indexOf("MathJax")&&b[0].appendChild(d[c].cloneNode(!0))};Editor.prototype.addFontCss=function(b,d){d=null!=d?d:this.absoluteCssFonts(this.fontCss);if(null!=d){var c=b.getElementsByTagName("defs"),f=b.ownerDocument;0==c.length?(c=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),null!=b.firstChild?b.insertBefore(c,b.firstChild):b.appendChild(c)):c=c[0];f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,
-"style"):f.createElement("style");f.setAttribute("type","text/css");mxUtils.setTextContent(f,d);c.appendChild(f)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(b,d,c){var f=mxClient.IS_FF?8192:16384;return Math.min(c,Math.min(f/b,f/d))};Editor.prototype.exportToCanvas=function(b,d,c,f,e,g,l,k,m,n,q,p,u,v,x,t,y,C){try{g=null!=g?g:!0;l=null!=l?l:!0;p=null!=p?p:this.graph;u=null!=u?u:0;var A=m?null:p.background;
-A==mxConstants.NONE&&(A=null);null==A&&(A=f);null==A&&0==m&&(A=t?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(p.getSvg(null,null,u,v,null,l,null,null,null,n,null,t,y,C),mxUtils.bind(this,function(c){try{var f=new Image;f.onload=mxUtils.bind(this,function(){try{var l=function(){mxClient.IS_SF?window.setTimeout(function(){v.drawImage(f,0,0);b(m,c)},0):(v.drawImage(f,0,0),b(m,c))},m=document.createElement("canvas"),n=parseInt(c.getAttribute("width")),q=parseInt(c.getAttribute("height"));
-k=null!=k?k:1;null!=d&&(k=g?Math.min(1,Math.min(3*d/(4*q),d/n)):d/n);k=this.getMaxCanvasScale(n,q,k);n=Math.ceil(k*n);q=Math.ceil(k*q);m.setAttribute("width",n);m.setAttribute("height",q);var v=m.getContext("2d");null!=A&&(v.beginPath(),v.rect(0,0,n,q),v.fillStyle=A,v.fill());1!=k&&v.scale(k,k);if(x){var t=p.view,y=t.scale;t.scale=1;var F=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor))));t.scale=y;var F="data:image/svg+xml;base64,"+F,D=p.gridSize*t.gridSteps*k,C=p.getGraphBounds(),
-B=t.translate.x*y,I=t.translate.y*y,N=B+(C.x-B)/y-u,E=I+(C.y-I)/y-u,G=new Image;G.onload=function(){try{for(var b=-Math.round(D-mxUtils.mod((B-N)*k,D)),d=-Math.round(D-mxUtils.mod((I-E)*k,D));b<n;b+=D)for(var c=d;c<q;c+=D)v.drawImage(G,b/k,c/k);l()}catch(Aa){null!=e&&e(Aa)}};G.onerror=function(b){null!=e&&e(b)};G.src=F}else l()}catch(wa){null!=e&&e(wa)}});f.onerror=function(b){null!=e&&e(b)};n&&this.graph.addSvgShadow(c);this.graph.mathEnabled&&this.addMathCss(c);var l=mxUtils.bind(this,function(){try{null!=
-this.resolvedFontCss&&this.addFontCss(c,this.resolvedFontCss),f.src=Editor.createSvgDataUri(mxUtils.getXml(c))}catch(ka){null!=e&&e(ka)}});this.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.addFontCss(c,b),this.loadFonts(l)}catch(aa){null!=e&&e(aa)}}))}catch(ka){null!=e&&e(ka)}}),c,q)}catch(ja){null!=e&&e(ja)}};Editor.crcTable=[];for(var g=0;256>g;g++)for(var p=g,t=0;8>t;t++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[g]=p;Editor.updateCRC=function(b,d,c,f){for(var e=0;e<f;e++)b=
+"style"):f.createElement("style");f.setAttribute("type","text/css");mxUtils.setTextContent(f,d);c.appendChild(f)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(b,d,c){var f=mxClient.IS_FF?8192:16384;return Math.min(c,Math.min(f/b,f/d))};Editor.prototype.exportToCanvas=function(b,d,c,f,e,g,l,k,m,n,q,p,u,v,x,t,y,C){try{g=null!=g?g:!0;l=null!=l?l:!0;p=null!=p?p:this.graph;u=null!=u?u:0;var G=m?null:p.background;
+G==mxConstants.NONE&&(G=null);null==G&&(G=f);null==G&&0==m&&(G=t?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(p.getSvg(null,null,u,v,null,l,null,null,null,n,null,t,y,C),mxUtils.bind(this,function(c){try{var f=new Image;f.onload=mxUtils.bind(this,function(){try{var l=function(){mxClient.IS_SF?window.setTimeout(function(){v.drawImage(f,0,0);b(m,c)},0):(v.drawImage(f,0,0),b(m,c))},m=document.createElement("canvas"),n=parseInt(c.getAttribute("width")),q=parseInt(c.getAttribute("height"));
+k=null!=k?k:1;null!=d&&(k=g?Math.min(1,Math.min(3*d/(4*q),d/n)):d/n);k=this.getMaxCanvasScale(n,q,k);n=Math.ceil(k*n);q=Math.ceil(k*q);m.setAttribute("width",n);m.setAttribute("height",q);var v=m.getContext("2d");null!=G&&(v.beginPath(),v.rect(0,0,n,q),v.fillStyle=G,v.fill());1!=k&&v.scale(k,k);if(x){var t=p.view,y=t.scale;t.scale=1;var D=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor))));t.scale=y;var D="data:image/svg+xml;base64,"+D,A=p.gridSize*t.gridSteps*k,C=p.getGraphBounds(),
+B=t.translate.x*y,N=t.translate.y*y,K=B+(C.x-B)/y-u,F=N+(C.y-N)/y-u,E=new Image;E.onload=function(){try{for(var b=-Math.round(A-mxUtils.mod((B-K)*k,A)),d=-Math.round(A-mxUtils.mod((N-F)*k,A));b<n;b+=A)for(var c=d;c<q;c+=A)v.drawImage(E,b/k,c/k);l()}catch(Ba){null!=e&&e(Ba)}};E.onerror=function(b){null!=e&&e(b)};E.src=D}else l()}catch(xa){null!=e&&e(xa)}});f.onerror=function(b){null!=e&&e(b)};n&&this.graph.addSvgShadow(c);this.graph.mathEnabled&&this.addMathCss(c);var l=mxUtils.bind(this,function(){try{null!=
+this.resolvedFontCss&&this.addFontCss(c,this.resolvedFontCss),f.src=Editor.createSvgDataUri(mxUtils.getXml(c))}catch(ka){null!=e&&e(ka)}});this.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.addFontCss(c,b),this.loadFonts(l)}catch(Z){null!=e&&e(Z)}}))}catch(ka){null!=e&&e(ka)}}),c,q)}catch(ja){null!=e&&e(ja)}};Editor.crcTable=[];for(var g=0;256>g;g++)for(var p=g,t=0;8>t;t++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[g]=p;Editor.updateCRC=function(b,d,c,f){for(var e=0;e<f;e++)b=
Editor.crcTable[(b^d.charCodeAt(c+e))&255]^b>>>8;return b};Editor.crc32=function(b){for(var d=-1,c=0;c<b.length;c++)d=d>>>8^Editor.crcTable[(d^b.charCodeAt(c))&255];return(d^-1)>>>0};Editor.writeGraphModelToPng=function(b,d,c,f,e){function g(b,d){var c=m;m+=d;return b.substring(c,m)}function l(b){b=g(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}function k(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}b=b.substring(b.indexOf(",")+
1);b=window.atob?atob(b):Base64.decode(b,!0);var m=0;if(g(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(g(b,4),"IHDR"!=g(b,4))null!=e&&e();else{g(b,17);e=b.substring(0,m);do{var n=l(b);if("IDAT"==g(b,4)){e=b.substring(0,m-8);"pHYs"==d&&"dpi"==c?(c=Math.round(f/.0254),c=k(c)+k(c)+String.fromCharCode(1)):c=c+String.fromCharCode(0)+("zTXt"==d?String.fromCharCode(0):"")+f;f=4294967295;f=Editor.updateCRC(f,d,0,4);f=Editor.updateCRC(f,c,0,c.length);e+=k(c.length)+
d+c+k(f^4294967295);e+=b.substring(m-8,b.length);break}e+=b.substring(m-8,m-4+n);g(b,n);g(b,4)}while(n);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(b,c){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var f=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=
function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(b,d){var c=null;null!=b.editor.graph.getModel().getParent(d)?c=d.getId():null!=b.currentPage&&(c=b.currentPage.getId());return c});if(null!=window.StyleFormatPanel){var l=Format.prototype.init;Format.prototype.init=function(){l.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var m=Format.prototype.refresh;
Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?m.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var b=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=b&&b.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(b){return!1};var q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(b){b=q.apply(this,arguments);
-this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var d=this.editorUi,c=d.editor.graph,f=this.createOption(mxResources.get("shadow"),function(){return c.shadowVisible},function(b){var f=new ChangePageSetup(d);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=b;c.model.execute(f)},{install:function(b){this.listener=function(){b(c.shadowVisible)};d.addListener("shadowVisibleChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});Editor.shadowOptionEnabled||
+this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var d=this.editorUi,c=d.editor.graph,f=this.createOption(mxResources.get("shadow"),function(){return c.shadowVisible},function(b){var f=new ChangePageSetup(d);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=b;c.model.execute(f)},{install:function(b){this.listener=function(){b(c.shadowVisible)};d.addListener("shadowVisibleChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});Editor.enableShadowOption||
(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));b.appendChild(f)}return b};var n=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(b){b=n.apply(this,arguments);var d=this.editorUi,c=d.editor.graph;if(c.isEnabled()){var f=d.getCurrentFile();if(null!=f&&f.isAutosaveOptional()){var e=this.createOption(mxResources.get("autosave"),function(){return d.editor.autosave},function(b){d.editor.setAutosave(b);d.editor.autosave&&
f.isModified()&&f.fileChanged()},{install:function(b){this.listener=function(){b(d.editor.autosave)};d.editor.addListener("autosaveChanged",this.listener)},destroy:function(){d.editor.removeListener(this.listener)}});b.appendChild(e)}}if(this.isMathOptionVisible()&&c.isEnabled()&&"undefined"!==typeof MathJax){e=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return c.mathEnabled},function(b){d.actions.get("mathematicalTypesetting").funct()},{install:function(b){this.listener=
function(){b(c.mathEnabled)};d.addListener("mathEnabledChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});e.style.paddingTop="5px";b.appendChild(e);var g=d.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");g.style.position="relative";g.style.marginLeft="6px";g.style.top="2px";e.appendChild(g)}return b};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
@@ -3226,10 +3231,10 @@ C[l],m=document.createElement("option");m.value=mxUtils.htmlEntities(k.val);m.in
t,u)):"readOnly"==x?(u=document.createElement("input"),u.setAttribute("readonly",""),u.value=c,u.style.width="96px",u.style.borderWidth="0px",y.appendChild(u)):(y.innerHTML=c,mxEvent.addListener(y,"click",mxUtils.bind(q,function(){function g(){var b=l.value,b=0==b.length&&"string"!=x?0:b;n.allowAuto&&(null!=b.trim&&"auto"==b.trim().toLowerCase()?(b="auto",x="string"):(b=parseFloat(b),b=isNaN(b)?0:b));null!=n.min&&b<n.min?b=n.min:null!=n.max&&b>n.max&&(b=n.max);b=mxUtils.htmlEntities(("int"==x?parseInt(b):
b)+"");f(d,b,n)}var l=document.createElement("input");e(y,l,!0);l.value=c;l.className="gePropEditor";"int"!=x&&"float"!=x||n.allowAuto||(l.type="number",l.step="int"==x?"1":"any",null!=n.min&&(l.min=parseFloat(n.min)),null!=n.max&&(l.max=parseFloat(n.max)));b.appendChild(l);mxEvent.addListener(l,"keypress",function(b){13==b.keyCode&&g()});l.focus();mxEvent.addListener(l,"blur",function(){g()})})));n.isDeletable&&(u=mxUtils.button("-",mxUtils.bind(q,function(b){f(d,"",n,n.index);mxEvent.consume(b)})),
u.style.height="16px",u.style.width="25px",u.style["float"]="right",u.className="geColorBtn",y.appendChild(u));t.appendChild(y);return t}var q=this,p=this.editorUi.editor.graph,u=[];b.style.position="relative";b.style.padding="0";var v=document.createElement("table");v.className="geProperties";v.style.whiteSpace="nowrap";v.style.width="100%";var x=document.createElement("tr");x.className="gePropHeader";var t=document.createElement("th");t.className="gePropHeaderCell";var y=document.createElement("img");
-y.src=Sidebar.prototype.expandedImage;t.appendChild(y);mxUtils.write(t,mxResources.get("property"));x.style.cursor="pointer";var C=function(){var d=v.querySelectorAll(".gePropNonHeaderRow"),c;if(q.editorUi.propertiesCollapsed){y.src=Sidebar.prototype.collapsedImage;c="none";for(var f=b.childNodes.length-1;0<=f;f--)try{var e=b.childNodes[f],g=e.nodeName.toUpperCase();"INPUT"!=g&&"SELECT"!=g||b.removeChild(e)}catch(ua){}}else y.src=Sidebar.prototype.expandedImage,c="";for(f=0;f<d.length;f++)d[f].style.display=
-c};mxEvent.addListener(x,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;C()});x.appendChild(t);t=document.createElement("th");t.className="gePropHeaderCell";t.innerHTML=mxResources.get("value");x.appendChild(t);v.appendChild(x);var A=!1,D=!1,x=null;1==c.vertices.length&&0==c.edges.length?x=c.vertices[0].id:0==c.vertices.length&&1==c.edges.length&&(x=c.edges[0].id);null!=x&&v.appendChild(n("id",mxUtils.htmlEntities(x),{dispName:"ID",type:"readOnly"},!0,!1));for(var F in d)if(x=
-d[F],"function"!=typeof x.isVisible||x.isVisible(c,this)){var B=null!=c.style[F]?mxUtils.htmlEntities(c.style[F]+""):null!=x.getDefaultValue?x.getDefaultValue(c,this):x.defVal;if("separator"==x.type)D=!D;else{if("staticArr"==x.type)x.size=parseInt(c.style[x.sizeProperty]||d[x.sizeProperty].defVal)||0;else if(null!=x.dependentProps){for(var N=x.dependentProps,E=[],G=[],t=0;t<N.length;t++){var P=c.style[N[t]];G.push(d[N[t]].subDefVal);E.push(null!=P?P.split(","):[])}x.dependentPropsDefVal=G;x.dependentPropsVals=
-E}v.appendChild(n(F,B,x,A,D));A=!A}}for(t=0;t<u.length;t++)for(x=u[t],d=x.parentRow,c=0;c<x.values.length;c++)F=n(x.name,x.values[c],{type:x.type,parentRow:x.parentRow,isDeletable:x.isDeletable,index:c,defVal:x.defVal,countProperty:x.countProperty,size:x.size},0==c%2,x.flipBkg),d.parentNode.insertBefore(F,d.nextSibling),d=F;b.appendChild(v);C();return b};StyleFormatPanel.prototype.addStyles=function(b){function d(b){mxEvent.addListener(b,"mouseenter",function(){b.style.opacity="1"});mxEvent.addListener(b,
+y.src=Sidebar.prototype.expandedImage;t.appendChild(y);mxUtils.write(t,mxResources.get("property"));x.style.cursor="pointer";var C=function(){var d=v.querySelectorAll(".gePropNonHeaderRow"),c;if(q.editorUi.propertiesCollapsed){y.src=Sidebar.prototype.collapsedImage;c="none";for(var f=b.childNodes.length-1;0<=f;f--)try{var e=b.childNodes[f],g=e.nodeName.toUpperCase();"INPUT"!=g&&"SELECT"!=g||b.removeChild(e)}catch(va){}}else y.src=Sidebar.prototype.expandedImage,c="";for(f=0;f<d.length;f++)d[f].style.display=
+c};mxEvent.addListener(x,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;C()});x.appendChild(t);t=document.createElement("th");t.className="gePropHeaderCell";t.innerHTML=mxResources.get("value");x.appendChild(t);v.appendChild(x);var G=!1,D=!1,x=null;1==c.vertices.length&&0==c.edges.length?x=c.vertices[0].id:0==c.vertices.length&&1==c.edges.length&&(x=c.edges[0].id);null!=x&&v.appendChild(n("id",mxUtils.htmlEntities(x),{dispName:"ID",type:"readOnly"},!0,!1));for(var A in d)if(x=
+d[A],"function"!=typeof x.isVisible||x.isVisible(c,this)){var B=null!=c.style[A]?mxUtils.htmlEntities(c.style[A]+""):null!=x.getDefaultValue?x.getDefaultValue(c,this):x.defVal;if("separator"==x.type)D=!D;else{if("staticArr"==x.type)x.size=parseInt(c.style[x.sizeProperty]||d[x.sizeProperty].defVal)||0;else if(null!=x.dependentProps){for(var N=x.dependentProps,F=[],E=[],t=0;t<N.length;t++){var P=c.style[N[t]];E.push(d[N[t]].subDefVal);F.push(null!=P?P.split(","):[])}x.dependentPropsDefVal=E;x.dependentPropsVals=
+F}v.appendChild(n(A,B,x,G,D));G=!G}}for(t=0;t<u.length;t++)for(x=u[t],d=x.parentRow,c=0;c<x.values.length;c++)A=n(x.name,x.values[c],{type:x.type,parentRow:x.parentRow,isDeletable:x.isDeletable,index:c,defVal:x.defVal,countProperty:x.countProperty,size:x.size},0==c%2,x.flipBkg),d.parentNode.insertBefore(A,d.nextSibling),d=A;b.appendChild(v);C();return b};StyleFormatPanel.prototype.addStyles=function(b){function d(b){mxEvent.addListener(b,"mouseenter",function(){b.style.opacity="1"});mxEvent.addListener(b,
"mouseleave",function(){b.style.opacity="0.5"})}var c=this.editorUi,f=c.editor.graph,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.paddingLeft="24px";e.style.paddingRight="20px";b.style.paddingLeft="16px";b.style.paddingBottom="6px";b.style.position="relative";b.appendChild(e);var g="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),l=document.createElement("div");
l.style.whiteSpace="nowrap";l.style.position="relative";l.style.textAlign="center";for(var k=[],m=0;m<this.defaultColorSchemes.length;m++){var n=document.createElement("div");n.style.display="inline-block";n.style.width="6px";n.style.height="6px";n.style.marginLeft="4px";n.style.marginRight="3px";n.style.borderRadius="3px";n.style.cursor="pointer";n.style.background="transparent";n.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(b){mxEvent.addListener(n,"click",mxUtils.bind(this,function(){q(b)}))})(m);
k.push(n);l.appendChild(n)}var q=mxUtils.bind(this,function(b){null!=this.format.currentScheme&&(k[this.format.currentScheme].style.background="transparent");this.format.currentScheme=b;p(this.defaultColorSchemes[this.format.currentScheme]);k[this.format.currentScheme].style.background="#84d7ff"}),p=mxUtils.bind(this,function(b){var d=mxUtils.bind(this,function(b){var d=mxUtils.button("",mxUtils.bind(this,function(d){f.getModel().beginUpdate();try{for(var e=this.format.getSelectionState().cells,l=
@@ -3252,7 +3257,7 @@ b[d].getAttribute("face"):b[d].style.fontFamily;null!=f&&Graph.addFont(f,c)}}};G
"mouseenter",b);mxEvent.addListener(this.container,"mousemove",b);mxEvent.addListener(this.container,"mouseleave",function(b){d=null});this.isMouseInsertPoint=function(){return null!=d};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=d?this.getPointForEvent(d):c.apply(this,arguments)};var f=this.layoutManager.getLayout;this.layoutManager.getLayout=function(b){var d=this.graph.getCellStyle(b);if(null!=d){if("rack"==d.childLayout){var c=new mxStackLayout(this.graph,!1);c.gridSize=
null!=d.rackUnitSize?parseFloat(d.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;c.marginLeft=d.marginLeft||0;c.marginRight=d.marginRight||0;c.marginTop=d.marginTop||0;c.marginBottom=d.marginBottom||0;c.allowGaps=d.allowGaps||0;c.horizontal="1"==mxUtils.getValue(d,"horizontalRack","0");c.resizeParent=!1;c.fill=!0;return c}if("undefined"!==typeof mxTableLayout&&"tableLayout"==d.childLayout)return c=new mxTableLayout(this.graph),c.rows=d.tableRows||2,c.columns=d.tableColumns||
2,c.colPercentages=d.colPercentages,c.rowPercentages=d.rowPercentages,c.equalColumns="1"==mxUtils.getValue(d,"equalColumns",c.colPercentages?"0":"1"),c.equalRows="1"==mxUtils.getValue(d,"equalRows",c.rowPercentages?"0":"1"),c.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1"),c.border=d.tableBorder||c.border,c.marginLeft=d.marginLeft||0,c.marginRight=d.marginRight||0,c.marginTop=d.marginTop||0,c.marginBottom=d.marginBottom||0,c.autoAddCol="1"==mxUtils.getValue(d,"autoAddCol","0"),c.autoAddRow=
-"1"==mxUtils.getValue(d,"autoAddRow",c.autoAddCol?"0":"1"),c.colWidths=d.colWidths||"100",c.rowHeights=d.rowHeights||"50",c}return f.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(b){return Graph.processFontStyle(x.apply(this,arguments))};var G=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(b,d,c,f,e,g,l,k,m,n,q){G.apply(this,arguments);Graph.processFontAttributes(q)};
+"1"==mxUtils.getValue(d,"autoAddRow",c.autoAddCol?"0":"1"),c.colWidths=d.colWidths||"100",c.rowHeights=d.rowHeights||"50",c}return f.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(b){return Graph.processFontStyle(x.apply(this,arguments))};var E=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(b,d,c,f,e,g,l,k,m,n,q){E.apply(this,arguments);Graph.processFontAttributes(q)};
var C=mxText.prototype.redraw;mxText.prototype.redraw=function(){C.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(b,d,c){function f(){for(var b=l.getSelectionCells(),d=[],c=0;c<b.length;c++)l.isCellVisible(b[c])&&d.push(b[c]);l.setSelectionCells(d)}function e(b){l.hiddenTags=b?[]:k.slice();f();l.refresh()}function g(b,c){n.innerHTML="";if(0<b.length){var g=document.createElement("table");g.setAttribute("cellpadding",
"2");g.style.boxSizing="border-box";g.style.tableLayout="fixed";g.style.width="100%";var m=document.createElement("tbody");if(null!=b&&0<b.length)for(var q=0;q<b.length;q++)(function(b){var g=0>mxUtils.indexOf(l.hiddenTags,b),n=document.createElement("tr"),q=document.createElement("td");q.style.align="center";q.style.width="16px";var p=document.createElement("img");p.setAttribute("src",g?Editor.visibleImage:Editor.hiddenImage);p.setAttribute("title",mxResources.get(g?"hideIt":"show",[b]));mxUtils.setOpacity(p,
g?75:25);p.style.verticalAlign="middle";p.style.cursor="pointer";p.style.width="16px";if(d||Editor.isDarkMode())p.style.filter="invert(100%)";q.appendChild(p);mxEvent.addListener(p,"click",function(d){var c=mxUtils.indexOf(l.hiddenTags,b);mxEvent.isShiftDown(d)?e(0<=mxUtils.indexOf(l.hiddenTags,b)):(0>c?l.hiddenTags.push(b):0<=c&&l.hiddenTags.splice(c,1),f(),l.refresh());mxEvent.consume(d)});n.appendChild(q);q=document.createElement("td");q.style.overflow="hidden";q.style.whiteSpace="nowrap";q.style.textOverflow=
@@ -3263,13 +3268,13 @@ if(d||Editor.isDarkMode())p.style.filter="invert(100%)";mxEvent.addListener(p,"c
"border-box";n.style.borderRadius="4px";n.style.userSelect="none";n.style.overflow="auto";n.style.position="absolute";n.style.left="10px";n.style.right="10px";n.style.top="10px";n.style.border=l.isEnabled()?"1px solid #808080":"none";n.style.bottom=l.isEnabled()?"48px":"10px";m.appendChild(n);var q=mxUtils.button(mxResources.get("reset"),function(b){l.hiddenTags=[];mxEvent.isShiftDown(b)||(k=l.hiddenTags.slice());f();l.refresh()});q.setAttribute("title",mxResources.get("reset"));q.className="geBtn";
q.style.margin="0 4px 0 0";var p=mxUtils.button(mxResources.get("add"),function(){null!=c&&c(k,function(b){k=b;u()})});p.setAttribute("title",mxResources.get("add"));p.className="geBtn";p.style.margin="0";l.addListener(mxEvent.ROOT,function(){k=l.hiddenTags.slice()});var u=mxUtils.bind(this,function(d,c){if(b()){for(var f=l.getAllTags(),e=0;e<f.length;e++)0>mxUtils.indexOf(k,f[e])&&k.push(f[e]);k.sort();l.isSelectionEmpty()?g(k):g(k,l.getCommonTagsForCells(l.getSelectionCells()))}});l.selectionModel.addListener(mxEvent.CHANGE,
u);l.model.addListener(mxEvent.CHANGE,u);l.addListener(mxEvent.REFRESH,u);var v=document.createElement("div");v.style.boxSizing="border-box";v.style.whiteSpace="nowrap";v.style.position="absolute";v.style.overflow="hidden";v.style.bottom="0px";v.style.height="42px";v.style.right="10px";v.style.left="10px";l.isEnabled()&&(v.appendChild(q),v.appendChild(p),m.appendChild(v));return{div:m,refresh:u}};Graph.prototype.getCustomFonts=function(){var b=this.extFonts,b=null!=b?b.slice():[],d;for(d in Graph.customFontElements){var c=
-Graph.customFontElements[d];b.push({name:c.name,url:c.url})}return b};Graph.prototype.setFont=function(b,d){Graph.addFont(b,d);document.execCommand("fontname",!1,b);if(null!=d){var c=this.cellEditor.textarea.getElementsByTagName("font");d=Graph.getFontUrl(b,d);for(var f=0;f<c.length;f++)c[f].getAttribute("face")==b&&c[f].getAttribute("data-font-src")!=d&&c[f].setAttribute("data-font-src",d)}};var E=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return E.apply(this,
+Graph.customFontElements[d];b.push({name:c.name,url:c.url})}return b};Graph.prototype.setFont=function(b,d){Graph.addFont(b,d);document.execCommand("fontname",!1,b);if(null!=d){var c=this.cellEditor.textarea.getElementsByTagName("font");d=Graph.getFontUrl(b,d);for(var f=0;f<c.length;f++)c[f].getAttribute("face")==b&&c[f].getAttribute("data-font-src")!=d&&c[f].setAttribute("data-font-src",d)}};var F=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return F.apply(this,
arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var b=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=b)for(var d in b)this.globalVars[d]=b[d]}catch(A){null!=window.console&&console.log("Error in vars URL parameter: "+A)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):
-{}};var J=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(b){var d=J.apply(this,arguments);null==d&&null!=this.globalVars&&(d=this.globalVars[b]);return d};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var b=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(b.ownerDocument)).decode(b)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var L=Graph.prototype.getSvg;Graph.prototype.getSvg=
-function(b,d,c,f,e,g,l,k,m,n,q,p,u,v){var x=null,t=null;p||null==this.themes||"darkTheme"!=this.defaultThemeName||(x=this.stylesheet,t=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":"#2a2a2a",this.stylesheet=this.getDefaultStylesheet(),this.refresh());var y=L.apply(this,arguments),C=this.getCustomFonts();if(q&&0<C.length){var B=y.ownerDocument,A=null!=B.createElementNS?B.createElementNS(mxConstants.NS_SVG,"style"):B.createElement("style");
-null!=B.setAttributeNS?A.setAttributeNS("type","text/css"):A.setAttribute("type","text/css");for(var F="",N="",D=0;D<C.length;D++){var E=C[D].name,I=C[D].url;Graph.isCssFontUrl(I)?F+="@import url("+I+");\n":N+='@font-face {\nfont-family: "'+E+'";\nsrc: url("'+I+'");\n}\n'}A.appendChild(B.createTextNode(F+N));y.getElementsByTagName("defs")[0].appendChild(A)}null!=x&&(this.defaultPageBackgroundColor=t,this.stylesheet=x,this.refresh());return y};var H=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=
+{}};var I=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(b){var d=I.apply(this,arguments);null==d&&null!=this.globalVars&&(d=this.globalVars[b]);return d};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var b=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(b.ownerDocument)).decode(b)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var L=Graph.prototype.getSvg;Graph.prototype.getSvg=
+function(b,d,c,f,e,g,l,k,m,n,q,p,u,v){var x=null,t=null;p||null==this.themes||"darkTheme"!=this.defaultThemeName||(x=this.stylesheet,t=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":"#2a2a2a",this.stylesheet=this.getDefaultStylesheet(),this.refresh());var y=L.apply(this,arguments),C=this.getCustomFonts();if(q&&0<C.length){var B=y.ownerDocument,N=null!=B.createElementNS?B.createElementNS(mxConstants.NS_SVG,"style"):B.createElement("style");
+null!=B.setAttributeNS?N.setAttributeNS("type","text/css"):N.setAttribute("type","text/css");for(var G="",A="",D=0;D<C.length;D++){var F=C[D].name,E=C[D].url;Graph.isCssFontUrl(E)?G+="@import url("+E+");\n":A+='@font-face {\nfont-family: "'+F+'";\nsrc: url("'+E+'");\n}\n'}N.appendChild(B.createTextNode(G+A));y.getElementsByTagName("defs")[0].appendChild(N)}null!=x&&(this.defaultPageBackgroundColor=t,this.stylesheet=x,this.refresh());return y};var H=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=
function(){var b=H.apply(this,arguments);if(this.mathEnabled){var d=b.drawText;b.drawText=function(b,c){if(null!=b.text&&null!=b.text.value&&b.text.checkBounds()&&(mxUtils.isNode(b.text.value)||b.text.dialect==mxConstants.DIALECT_STRICTHTML)){var f=b.text.getContentNode();if(null!=f){f=f.cloneNode(!0);if(f.getElementsByTagNameNS)for(var e=f.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<e.length;)e[0].parentNode.removeChild(e[0]);null!=f.innerHTML&&(e=b.text.value,b.text.value=
-f.innerHTML,d.apply(this,arguments),b.text.value=e)}}else d.apply(this,arguments)}}return b};var K=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){K.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var b=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||
+f.innerHTML,d.apply(this,arguments),b.text.value=e)}}else d.apply(this,arguments)}}return b};var J=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){J.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var b=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||
this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",b.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,b.ownerSVGElement))}};
Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&this.setBackgroundImage(this.backgroundImage)};var B=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){B.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(b){"data:action/json,"==b.substring(0,17)&&(b=JSON.parse(b.substring(17)),null!=b.actions&&this.executeCustomActions(b.actions))};Graph.prototype.executeCustomActions=
function(b,d){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var c=!1,f=0,e=0,g=mxUtils.bind(this,function(){c||(c=!0,this.model.beginUpdate())}),l=mxUtils.bind(this,function(){c&&(c=!1,this.model.endUpdate())}),k=mxUtils.bind(this,function(){0<
@@ -3305,30 +3310,30 @@ mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupN
[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=
[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=
[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(b){var d=null;null!=b&&0<b.length&&("ER"==b.substring(0,2)?d="mxgraph.er":"sysML"==b.substring(0,5)&&(d="mxgraph.sysml"));return d};var P=mxMarker.createMarker;mxMarker.createMarker=function(b,d,c,f,e,g,l,k,m,n){if(null!=c&&null==mxMarker.markers[c]){var q=this.getPackageForType(c);null!=q&&mxStencilRegistry.getStencil(q)}return P.apply(this,arguments)};PrintDialog.prototype.create=function(b,d){function c(){v.value=Math.max(1,
-Math.min(k,Math.max(parseInt(v.value),parseInt(u.value))));u.value=Math.max(1,Math.min(k,Math.min(parseInt(v.value),parseInt(u.value))))}function f(d){function c(d,c,l){var g=d.useCssTransforms,k=d.currentTranslate,m=d.currentScale,n=d.view.translate,q=d.view.scale;d.useCssTransforms&&(d.useCssTransforms=!1,d.currentTranslate=new mxPoint(0,0),d.currentScale=1,d.view.translate=new mxPoint(0,0),d.view.scale=1);var p=d.getGraphBounds(),u=0,v=0,x=K.get(),t=1/d.pageScale,B=C.checked;if(B)var t=parseInt(M.value),
+Math.min(k,Math.max(parseInt(v.value),parseInt(u.value))));u.value=Math.max(1,Math.min(k,Math.min(parseInt(v.value),parseInt(u.value))))}function f(d){function c(d,c,g){var l=d.useCssTransforms,k=d.currentTranslate,m=d.currentScale,n=d.view.translate,q=d.view.scale;d.useCssTransforms&&(d.useCssTransforms=!1,d.currentTranslate=new mxPoint(0,0),d.currentScale=1,d.view.translate=new mxPoint(0,0),d.view.scale=1);var p=d.getGraphBounds(),u=0,v=0,x=J.get(),t=1/d.pageScale,B=C.checked;if(B)var t=parseInt(M.value),
N=parseInt(R.value),t=Math.min(x.height*N/(p.height/d.view.scale),x.width*t/(p.width/d.view.scale));else t=parseInt(y.value)/(100*d.pageScale),isNaN(t)&&(f=1/d.pageScale,y.value="100 %");x=mxRectangle.fromRectangle(x);x.width=Math.ceil(x.width*f);x.height=Math.ceil(x.height*f);t*=f;!B&&d.pageVisible?(p=d.getPageLayout(),u-=p.x*x.width,v-=p.y*x.height):B=!0;if(null==c){c=PrintDialog.createPrintPreview(d,t,x,0,u,v,B);c.pageSelector=!1;c.mathEnabled=!1;u=b.getCurrentFile();null!=u&&(c.title=u.getTitle());
-var E=c.writeHead;c.writeHead=function(c){E.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)c.writeln('<style type="text/css">'),c.writeln(Editor.mathJaxWebkitCss),c.writeln("</style>");mxClient.IS_GC&&(c.writeln('<style type="text/css">'),c.writeln("@media print {"),c.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),c.writeln("}"),c.writeln("</style>"));null!=b.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(b.editor.fontCss),c.writeln("</style>"));for(var f=
-d.getCustomFonts(),e=0;e<f.length;e++){var l=f[e].name,g=f[e].url;Graph.isCssFontUrl(g)?c.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(g)+'" charset="UTF-8" type="text/css">'):(c.writeln('<style type="text/css">'),c.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(l)+'";\nsrc: url("'+mxUtils.htmlEntities(g)+'");\n}'),c.writeln("</style>"))}};if("undefined"!==typeof MathJax){var A=c.renderPage;c.renderPage=function(d,c,f,e,l,g){var k=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&
-!b.editor.useForeignObjectForMath?!0:b.editor.originalNoForeignObject;var m=A.apply(this,arguments);mxClient.NO_FO=k;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:m.className="geDisableMathJax";return m}}u=null;v=e.enableFlowAnimation;e.enableFlowAnimation=!1;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(u=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());c.open(null,null,l,!0);e.enableFlowAnimation=v;null!=u&&(e.stylesheet=u,e.refresh())}else{x=d.background;if(null==
-x||""==x||x==mxConstants.NONE)x="#ffffff";c.backgroundColor=x;c.autoOrigin=B;c.appendGraph(d,t,u,v,l,!0);l=d.getCustomFonts();if(null!=c.wnd)for(u=0;u<l.length;u++)v=l[u].name,B=l[u].url,Graph.isCssFontUrl(B)?c.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(B)+'" charset="UTF-8" type="text/css">'):(c.wnd.document.writeln('<style type="text/css">'),c.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(v)+'";\nsrc: url("'+mxUtils.htmlEntities(B)+'");\n}'),
-c.wnd.document.writeln("</style>"))}g&&(d.useCssTransforms=g,d.currentTranslate=k,d.currentScale=m,d.view.translate=n,d.view.scale=q);return c}var f=parseInt(H.value)/100;isNaN(f)&&(f=1,H.value="100 %");var f=.75*f,g=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(g=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());var l=u.value,k=v.value,n=!q.checked,p=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(b,q.checked,l,k,C.checked,M.value,R.value,parseInt(y.value)/100,parseInt(H.value)/
-100,K.get());else{n&&(n=l==m&&k==m);if(!n&&null!=b.pages&&b.pages.length){var x=0,n=b.pages.length-1;q.checked||(x=parseInt(l)-1,n=parseInt(k)-1);for(var t=x;t<=n;t++){var B=b.pages[t],l=B==b.currentPage?e:null;if(null==l){var l=b.createTemporaryGraph(e.stylesheet),k=!0,x=!1,N=null,E=null;null==B.viewState&&null==B.root&&b.updatePageRoot(B);null!=B.viewState&&(k=B.viewState.pageVisible,x=B.viewState.mathEnabled,N=B.viewState.background,E=B.viewState.backgroundImage,l.extFonts=B.viewState.extFonts);
-l.background=N;l.backgroundImage=null!=E?new mxImage(E.src,E.width,E.height):null;l.pageVisible=k;l.mathEnabled=x;var A=l.getGlobalVariable;l.getGlobalVariable=function(d){return"page"==d?B.getName():"pagenumber"==d?t+1:"pagecount"==d?null!=b.pages?b.pages.length:1:A.apply(this,arguments)};document.body.appendChild(l.container);b.updatePageRoot(B);l.model.setRoot(B.root)}p=c(l,p,t!=n);l!=e&&l.container.parentNode.removeChild(l.container)}}else p=c(e);null==p?b.handleError({message:mxResources.get("errorUpdatingPreview")}):
+var F=c.writeHead;c.writeHead=function(c){F.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)c.writeln('<style type="text/css">'),c.writeln(Editor.mathJaxWebkitCss),c.writeln("</style>");mxClient.IS_GC&&(c.writeln('<style type="text/css">'),c.writeln("@media print {"),c.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),c.writeln("}"),c.writeln("</style>"));null!=b.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(b.editor.fontCss),c.writeln("</style>"));for(var f=
+d.getCustomFonts(),e=0;e<f.length;e++){var g=f[e].name,l=f[e].url;Graph.isCssFontUrl(l)?c.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(l)+'" charset="UTF-8" type="text/css">'):(c.writeln('<style type="text/css">'),c.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(g)+'";\nsrc: url("'+mxUtils.htmlEntities(l)+'");\n}'),c.writeln("</style>"))}};if("undefined"!==typeof MathJax){var E=c.renderPage;c.renderPage=function(d,c,f,e,g,l){var k=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&
+!b.editor.useForeignObjectForMath?!0:b.editor.originalNoForeignObject;var m=E.apply(this,arguments);mxClient.NO_FO=k;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:m.className="geDisableMathJax";return m}}u=null;v=e.enableFlowAnimation;e.enableFlowAnimation=!1;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(u=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());c.open(null,null,g,!0);e.enableFlowAnimation=v;null!=u&&(e.stylesheet=u,e.refresh())}else{x=d.background;if(null==
+x||""==x||x==mxConstants.NONE)x="#ffffff";c.backgroundColor=x;c.autoOrigin=B;c.appendGraph(d,t,u,v,g,!0);g=d.getCustomFonts();if(null!=c.wnd)for(u=0;u<g.length;u++)v=g[u].name,B=g[u].url,Graph.isCssFontUrl(B)?c.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(B)+'" charset="UTF-8" type="text/css">'):(c.wnd.document.writeln('<style type="text/css">'),c.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(v)+'";\nsrc: url("'+mxUtils.htmlEntities(B)+'");\n}'),
+c.wnd.document.writeln("</style>"))}l&&(d.useCssTransforms=l,d.currentTranslate=k,d.currentScale=m,d.view.translate=n,d.view.scale=q);return c}var f=parseInt(H.value)/100;isNaN(f)&&(f=1,H.value="100 %");var f=.75*f,g=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(g=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());var l=u.value,k=v.value,n=!q.checked,p=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(b,q.checked,l,k,C.checked,M.value,R.value,parseInt(y.value)/100,parseInt(H.value)/
+100,J.get());else{n&&(n=l==m&&k==m);if(!n&&null!=b.pages&&b.pages.length){var x=0,n=b.pages.length-1;q.checked||(x=parseInt(l)-1,n=parseInt(k)-1);for(var t=x;t<=n;t++){var B=b.pages[t],l=B==b.currentPage?e:null;if(null==l){var l=b.createTemporaryGraph(e.stylesheet),k=!0,x=!1,N=null,F=null;null==B.viewState&&null==B.root&&b.updatePageRoot(B);null!=B.viewState&&(k=B.viewState.pageVisible,x=B.viewState.mathEnabled,N=B.viewState.background,F=B.viewState.backgroundImage,l.extFonts=B.viewState.extFonts);
+l.background=N;l.backgroundImage=null!=F?new mxImage(F.src,F.width,F.height):null;l.pageVisible=k;l.mathEnabled=x;var E=l.getGlobalVariable;l.getGlobalVariable=function(d){return"page"==d?B.getName():"pagenumber"==d?t+1:"pagecount"==d?null!=b.pages?b.pages.length:1:E.apply(this,arguments)};document.body.appendChild(l.container);b.updatePageRoot(B);l.model.setRoot(B.root)}p=c(l,p,t!=n);l!=e&&l.container.parentNode.removeChild(l.container)}}else p=c(e);null==p?b.handleError({message:mxResources.get("errorUpdatingPreview")}):
(p.mathEnabled&&(n=p.wnd.document,d&&(p.wnd.IMMEDIATE_PRINT=!0),n.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),p.closeDocument(),!p.mathEnabled&&d&&PrintDialog.printPreview(p));null!=g&&(e.stylesheet=g,e.refresh())}}var e=b.editor.graph,g=document.createElement("div"),l=document.createElement("h3");l.style.width="100%";l.style.textAlign="center";l.style.marginTop="0px";mxUtils.write(l,d||mxResources.get("print"));g.appendChild(l);var k=1,m=1,n=
document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");n.appendChild(q);l=document.createElement("span");mxUtils.write(l,mxResources.get("printAllPages"));n.appendChild(l);mxUtils.br(n);var p=q.cloneNode(!0);q.setAttribute("checked","checked");
p.setAttribute("value","range");n.appendChild(p);l=document.createElement("span");mxUtils.write(l,mxResources.get("pages")+":");n.appendChild(l);var u=document.createElement("input");u.style.cssText="margin:0 8px 0 8px;";u.setAttribute("value","1");u.setAttribute("type","number");u.setAttribute("min","1");u.style.width="50px";n.appendChild(u);l=document.createElement("span");mxUtils.write(l,mxResources.get("to"));n.appendChild(l);var v=u.cloneNode(!0);n.appendChild(v);mxEvent.addListener(u,"focus",
function(){p.checked=!0});mxEvent.addListener(v,"focus",function(){p.checked=!0});mxEvent.addListener(u,"change",c);mxEvent.addListener(v,"change",c);if(null!=b.pages&&(k=b.pages.length,null!=b.currentPage))for(l=0;l<b.pages.length;l++)if(b.currentPage==b.pages[l]){m=l+1;u.value=m;v.value=m;break}u.setAttribute("max",k);v.setAttribute("max",k);b.isPagesEnabled()?1<k&&(g.appendChild(n),p.checked=!0):p.checked=!0;var x=document.createElement("div");x.style.marginBottom="10px";var t=document.createElement("input");
t.style.marginRight="8px";t.setAttribute("value","adjust");t.setAttribute("type","radio");t.setAttribute("name","printZoom");x.appendChild(t);l=document.createElement("span");mxUtils.write(l,mxResources.get("adjustTo"));x.appendChild(l);var y=document.createElement("input");y.style.cssText="margin:0 8px 0 8px;";y.setAttribute("value","100 %");y.style.width="50px";x.appendChild(y);mxEvent.addListener(y,"focus",function(){t.checked=!0});g.appendChild(x);var n=n.cloneNode(!1),C=t.cloneNode(!0);C.setAttribute("value",
-"fit");t.setAttribute("checked","checked");l=document.createElement("div");l.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";l.appendChild(C);n.appendChild(l);x=document.createElement("table");x.style.display="inline-block";var B=document.createElement("tbody"),N=document.createElement("tr"),E=N.cloneNode(!0),G=document.createElement("td"),P=G.cloneNode(!0),D=G.cloneNode(!0),J=G.cloneNode(!0),F=G.cloneNode(!0),T=G.cloneNode(!0);G.style.textAlign="right";J.style.textAlign=
-"right";mxUtils.write(G,mxResources.get("fitTo"));var M=document.createElement("input");M.style.cssText="margin:0 8px 0 8px;";M.setAttribute("value","1");M.setAttribute("min","1");M.setAttribute("type","number");M.style.width="40px";P.appendChild(M);l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsAcross"));D.appendChild(l);mxUtils.write(J,mxResources.get("fitToBy"));var R=M.cloneNode(!0);F.appendChild(R);mxEvent.addListener(M,"focus",function(){C.checked=!0});mxEvent.addListener(R,
-"focus",function(){C.checked=!0});l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsDown"));T.appendChild(l);N.appendChild(G);N.appendChild(P);N.appendChild(D);E.appendChild(J);E.appendChild(F);E.appendChild(T);B.appendChild(N);B.appendChild(E);x.appendChild(B);n.appendChild(x);g.appendChild(n);n=document.createElement("div");l=document.createElement("div");l.style.fontWeight="bold";l.style.marginBottom="12px";mxUtils.write(l,mxResources.get("paperSize"));n.appendChild(l);
-l=document.createElement("div");l.style.marginBottom="12px";var K=PageSetupDialog.addPageFormatPanel(l,"printdialog",b.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);n.appendChild(l);l=document.createElement("span");mxUtils.write(l,mxResources.get("pageScale"));n.appendChild(l);var H=document.createElement("input");H.style.cssText="margin:0 8px 0 8px;";H.setAttribute("value","100 %");H.style.width="60px";n.appendChild(H);g.appendChild(n);l=document.createElement("div");l.style.cssText=
+"fit");t.setAttribute("checked","checked");l=document.createElement("div");l.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";l.appendChild(C);n.appendChild(l);x=document.createElement("table");x.style.display="inline-block";var B=document.createElement("tbody"),N=document.createElement("tr"),F=N.cloneNode(!0),E=document.createElement("td"),P=E.cloneNode(!0),D=E.cloneNode(!0),I=E.cloneNode(!0),G=E.cloneNode(!0),T=E.cloneNode(!0);E.style.textAlign="right";I.style.textAlign=
+"right";mxUtils.write(E,mxResources.get("fitTo"));var M=document.createElement("input");M.style.cssText="margin:0 8px 0 8px;";M.setAttribute("value","1");M.setAttribute("min","1");M.setAttribute("type","number");M.style.width="40px";P.appendChild(M);l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsAcross"));D.appendChild(l);mxUtils.write(I,mxResources.get("fitToBy"));var R=M.cloneNode(!0);G.appendChild(R);mxEvent.addListener(M,"focus",function(){C.checked=!0});mxEvent.addListener(R,
+"focus",function(){C.checked=!0});l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsDown"));T.appendChild(l);N.appendChild(E);N.appendChild(P);N.appendChild(D);F.appendChild(I);F.appendChild(G);F.appendChild(T);B.appendChild(N);B.appendChild(F);x.appendChild(B);n.appendChild(x);g.appendChild(n);n=document.createElement("div");l=document.createElement("div");l.style.fontWeight="bold";l.style.marginBottom="12px";mxUtils.write(l,mxResources.get("paperSize"));n.appendChild(l);
+l=document.createElement("div");l.style.marginBottom="12px";var J=PageSetupDialog.addPageFormatPanel(l,"printdialog",b.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);n.appendChild(l);l=document.createElement("span");mxUtils.write(l,mxResources.get("pageScale"));n.appendChild(l);var H=document.createElement("input");H.style.cssText="margin:0 8px 0 8px;";H.setAttribute("value","100 %");H.style.width="60px";n.appendChild(H);g.appendChild(n);l=document.createElement("div");l.style.cssText=
"text-align:right;margin:48px 0 0 0;";n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";b.editor.cancelFirst&&l.appendChild(n);b.isOffline()||(x=mxUtils.button(mxResources.get("help"),function(){e.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),x.className="geBtn",l.appendChild(x));PrintDialog.previewEnabled&&(x=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();f(!1)}),x.className="geBtn",l.appendChild(x));x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?
"print":"ok"),function(){b.hideDialog();f(!0)});x.className="geBtn gePrimaryBtn";l.appendChild(x);b.editor.cancelFirst||l.appendChild(n);g.appendChild(l);this.container=g};var T=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var b=this.image;null!=b&&null!=b.src&&Graph.isPageLink(b.src)&&
(b={originalSrc:b.src});this.page.viewState.backgroundImage=b}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else T.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=
-this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var N=document.createElement("canvas"),R=new Image;R.onload=function(){try{N.getContext("2d").drawImage(R,0,0);var b=N.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=b&&6<b.length}catch(D){}};R.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(F){}})();
+this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var N=document.createElement("canvas"),R=new Image;R.onload=function(){try{N.getContext("2d").drawImage(R,0,0);var b=N.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=b&&6<b.length}catch(D){}};R.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(G){}})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};b.afterDecode=function(b,e,k){k.previousColor=k.color;k.previousImage=k.image;k.previousFormat=k.format;null!=k.foldingEnabled&&(k.foldingEnabled=!k.foldingEnabled);null!=k.mathEnabled&&(k.mathEnabled=!k.mathEnabled);null!=k.shadowVisible&&(k.shadowVisible=!k.shadowVisible);return k};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="15.2.7";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="15.2.9";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=
!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,
noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(b,c,e,g,k,n,p){n=null!=n?n:0<=b.indexOf("NetworkError")||0<=b.indexOf("SecurityError")||0<=b.indexOf("NS_ERROR_FAILURE")||0<=b.indexOf("out of memory")?"CONFIG":
@@ -3352,11 +3357,11 @@ d&&k.selectPage(k.pages[0])};if(39==b.keyCode)return function(){d<k.pages.length
15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var k=mxUtils.parseXml(b),n=this.editor.extractGraphModel(k.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),d=null!=n?mxUtils.getXml(n):""}catch(u){}return d};EditorUi.prototype.validateFileData=function(b){if(null!=b&&0<b.length){var d=b.indexOf('<meta charset="utf-8">');0<=d&&(b=b.slice(0,d)+'<meta charset="utf-8"/>'+b.slice(d+23-1,b.length));b=Graph.zapGremlins(b)}return b};
EditorUi.prototype.replaceFileData=function(b){b=this.validateFileData(b);b=null!=b&&0<b.length?mxUtils.parseXml(b).documentElement:null;var d=null!=b?this.editor.extractGraphModel(b,!0):null;null!=d&&(b=d);if(null!=b){d=this.editor.graph;d.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,e=b.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<e.length||1==e.length&&e[0].hasAttribute("name")){this.fileNode=b;this.pages=null!=this.pages?this.pages:[];for(var g=e.length-
1;0<=g;g--){var k=this.updatePageRoot(new DiagramPage(e[g]));null==k.getName()&&k.setName(mxResources.get("pageWithNumber",[g+1]));d.model.execute(new ChangePage(this,k,0==g?k:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),d.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),
-this.editor.setGraphXml(b),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(g=0;g<c.length;g++)d.model.execute(new ChangePage(this,c[g],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(b,c,e,g,k,n,p,v,t,x,G){c=null!=c?c:this.editor.graph;k=null!=k?k:!1;t=null!=t?t:!0;var d,f=null;null==e||e.getMode()==App.MODE_DEVICE||e.getMode()==App.MODE_BROWSER?d="_blank":f=d=g;if(null==b)return"";var l=b;if("mxfile"!=l.nodeName.toLowerCase()){if(G){var m=
+this.editor.setGraphXml(b),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(g=0;g<c.length;g++)d.model.execute(new ChangePage(this,c[g],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(b,c,e,g,k,n,p,v,t,x,E){c=null!=c?c:this.editor.graph;k=null!=k?k:!1;t=null!=t?t:!0;var d,f=null;null==e||e.getMode()==App.MODE_DEVICE||e.getMode()==App.MODE_BROWSER?d="_blank":f=d=g;if(null==b)return"";var l=b;if("mxfile"!=l.nodeName.toLowerCase()){if(E){var m=
b.ownerDocument.createElement("diagram");m.setAttribute("id",Editor.guid());m.appendChild(b)}else{m=Graph.zapGremlins(mxUtils.getXml(b));l=Graph.compress(m);if(Graph.decompress(l)!=m)return m;m=b.ownerDocument.createElement("diagram");m.setAttribute("id",Editor.guid());mxUtils.setTextContent(m,l)}l=b.ownerDocument.createElement("mxfile");l.appendChild(m)}x?(l=l.cloneNode(!0),l.removeAttribute("modified"),l.removeAttribute("host"),l.removeAttribute("agent"),l.removeAttribute("etag"),l.removeAttribute("userAgent"),
l.removeAttribute("version"),l.removeAttribute("editor"),l.removeAttribute("type")):(l.removeAttribute("userAgent"),l.removeAttribute("version"),l.removeAttribute("editor"),l.removeAttribute("pages"),l.removeAttribute("type"),mxClient.IS_CHROMEAPP?l.setAttribute("host","Chrome"):EditorUi.isElectronApp?l.setAttribute("host","Electron"):l.setAttribute("host",window.location.hostname),l.setAttribute("modified",(new Date).toISOString()),l.setAttribute("agent",navigator.appVersion),l.setAttribute("version",
-EditorUi.VERSION),l.setAttribute("etag",Editor.guid()),b=null!=e?e.getMode():this.mode,null!=b&&l.setAttribute("type",b),1<l.getElementsByTagName("diagram").length&&null!=this.pages&&l.setAttribute("pages",this.pages.length));G=G?mxUtils.getPrettyXml(l):mxUtils.getXml(l);if(!n&&!k&&(p||null!=e&&/(\.html)$/i.test(e.getTitle())))G=this.getHtml2(mxUtils.getXml(l),c,null!=e?e.getTitle():null,d,f);else if(n||!k&&null!=e&&/(\.svg)$/i.test(e.getTitle()))null==e||e.getMode()!=App.MODE_DEVICE&&e.getMode()!=
-App.MODE_BROWSER||(g=null),G=this.getEmbeddedSvg(G,c,g,null,v,t,f);return G};EditorUi.prototype.getXmlFileData=function(b,c,e,g){b=null!=b?b:!0;c=null!=c?c:!1;e=null!=e?e:!Editor.compressXml;var d=this.editor.getGraphXml(b,g);if(b&&null!=this.fileNode&&null!=this.currentPage)if(b=function(b){var c=b.getElementsByTagName("mxGraphModel"),c=0<c.length?c[0]:null;null==c&&e?(c=mxUtils.trim(mxUtils.getTextContent(b)),b=b.cloneNode(!1),0<c.length&&(c=Graph.decompress(c),null!=c&&0<c.length&&b.appendChild(mxUtils.parseXml(c).documentElement))):
+EditorUi.VERSION),l.setAttribute("etag",Editor.guid()),b=null!=e?e.getMode():this.mode,null!=b&&l.setAttribute("type",b),1<l.getElementsByTagName("diagram").length&&null!=this.pages&&l.setAttribute("pages",this.pages.length));E=E?mxUtils.getPrettyXml(l):mxUtils.getXml(l);if(!n&&!k&&(p||null!=e&&/(\.html)$/i.test(e.getTitle())))E=this.getHtml2(mxUtils.getXml(l),c,null!=e?e.getTitle():null,d,f);else if(n||!k&&null!=e&&/(\.svg)$/i.test(e.getTitle()))null==e||e.getMode()!=App.MODE_DEVICE&&e.getMode()!=
+App.MODE_BROWSER||(g=null),E=this.getEmbeddedSvg(E,c,g,null,v,t,f);return E};EditorUi.prototype.getXmlFileData=function(b,c,e,g){b=null!=b?b:!0;c=null!=c?c:!1;e=null!=e?e:!Editor.compressXml;var d=this.editor.getGraphXml(b,g);if(b&&null!=this.fileNode&&null!=this.currentPage)if(b=function(b){var c=b.getElementsByTagName("mxGraphModel"),c=0<c.length?c[0]:null;null==c&&e?(c=mxUtils.trim(mxUtils.getTextContent(b)),b=b.cloneNode(!1),0<c.length&&(c=Graph.decompress(c),null!=c&&0<c.length&&b.appendChild(mxUtils.parseXml(c).documentElement))):
null==c||e?b=b.cloneNode(!0):(b=b.cloneNode(!1),mxUtils.setTextContent(b,Graph.compressNode(c)));d.appendChild(b)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(d)),d=this.fileNode.cloneNode(!1),c)b(this.currentPage.node);else for(c=0;c<this.pages.length;c++){var f=this.pages[c],l=f.node;if(f!=this.currentPage)if(f.needsUpdate){var k=new mxCodec(mxUtils.createXmlDocument()),k=k.encode(new mxGraphModel(f.root));this.editor.graph.saveViewState(f.viewState,
k,null,g);EditorUi.removeChildNodes(l);mxUtils.setTextContent(l,Graph.compressNode(k));delete f.needsUpdate}else g&&(this.updatePageRoot(f),null!=f.viewState.backgroundImage&&(null!=f.viewState.backgroundImage.originalSrc?f.viewState.backgroundImage=this.createImageForPageLink(f.viewState.backgroundImage.originalSrc,f):Graph.isPageLink(f.viewState.backgroundImage.src)&&(f.viewState.backgroundImage=this.createImageForPageLink(f.viewState.backgroundImage.src,f))),null!=f.viewState.backgroundImage&&
null!=f.viewState.backgroundImage.originalSrc&&(k=new mxCodec(mxUtils.createXmlDocument()),k=k.encode(new mxGraphModel(f.root)),this.editor.graph.saveViewState(f.viewState,k,null,g),l=l.cloneNode(!1),mxUtils.setTextContent(l,Graph.compressNode(k))));b(l)}return d};EditorUi.prototype.anonymizeString=function(b,c){for(var d=[],f=0;f<b.length;f++){var e=b.charAt(f);0<=EditorUi.ignoredAnonymizedChars.indexOf(e)?d.push(e):isNaN(parseInt(e))?e.toLowerCase()!=e?d.push(String.fromCharCode(65+Math.round(25*
@@ -3366,8 +3371,8 @@ b[EditorUi.DIFF_INSERT][d].data=mxUtils.getXml(c)}catch(n){b[EditorUi.DIFF_INSER
b.setAttribute(b.attributes[d].name,this.anonymizeString(b.attributes[d].value,c));if(null!=b.childNodes)for(d=0;d<b.childNodes.length;d++)this.anonymizeAttributes(b.childNodes[d],c)};EditorUi.prototype.anonymizeNode=function(b,c){for(var d=b.getElementsByTagName("mxCell"),f=0;f<d.length;f++)null!=d[f].getAttribute("value")&&d[f].setAttribute("value","["+d[f].getAttribute("value").length+"]"),null!=d[f].getAttribute("xmlValue")&&d[f].setAttribute("xmlValue","["+d[f].getAttribute("xmlValue").length+
"]"),null!=d[f].getAttribute("style")&&d[f].setAttribute("style","["+d[f].getAttribute("style").length+"]"),null!=d[f].parentNode&&"root"!=d[f].parentNode.nodeName&&null!=d[f].parentNode.parentNode&&(d[f].setAttribute("id",d[f].parentNode.getAttribute("id")),d[f].parentNode.parentNode.replaceChild(d[f],d[f].parentNode));return b};EditorUi.prototype.synchronizeCurrentFile=function(b){var d=this.getCurrentFile();null!=d&&(d.savingFile?this.handleError({message:mxResources.get("busy")}):!b&&d.invalidChecksum?
d.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(d.clearAutosave(),this.editor.setStatus(""),b?d.reloadFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){d.handleFileError(b,!0)})):d.synchronizeFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){d.handleFileError(b,!0)}))))};EditorUi.prototype.getFileData=function(b,c,e,g,k,n,p,
-v,t,x,G){k=null!=k?k:!0;n=null!=n?n:!1;var d=this.editor.graph;if(c||!b&&null!=t&&/(\.svg)$/i.test(t.getTitle())){var f=null!=d.themes&&"darkTheme"==d.defaultThemeName;x=!1;if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var l=d.getGlobalVariable,d=this.createTemporaryGraph(d.getStylesheet()),m=this.pages[0];d.getGlobalVariable=function(b){return"page"==b?m.getName():"pagenumber"==b?1:l.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(m.root)}}p=null!=p?p:this.getXmlFileData(k,
-n,x,G);t=null!=t?t:this.getCurrentFile();b=this.createFileData(p,d,t,window.location.href,b,c,e,g,k,v,x);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);return b};EditorUi.prototype.getHtml=function(b,c,e,g,k,n){n=null!=n?n:!0;var d=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=c){var d=n?c.getGraphBounds():c.getBoundingBox(c.getSelectionCells()),l=c.view.scale;n=Math.floor(d.x/l-c.view.translate.x);l=Math.floor(d.y/l-c.view.translate.y);d=c.background;null==k&&
+v,t,x,E){k=null!=k?k:!0;n=null!=n?n:!1;var d=this.editor.graph;if(c||!b&&null!=t&&/(\.svg)$/i.test(t.getTitle())){var f=null!=d.themes&&"darkTheme"==d.defaultThemeName;x=!1;if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var l=d.getGlobalVariable,d=this.createTemporaryGraph(d.getStylesheet()),m=this.pages[0];d.getGlobalVariable=function(b){return"page"==b?m.getName():"pagenumber"==b?1:l.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(m.root)}}p=null!=p?p:this.getXmlFileData(k,
+n,x,E);t=null!=t?t:this.getCurrentFile();b=this.createFileData(p,d,t,window.location.href,b,c,e,g,k,v,x);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);return b};EditorUi.prototype.getHtml=function(b,c,e,g,k,n){n=null!=n?n:!0;var d=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=c){var d=n?c.getGraphBounds():c.getBoundingBox(c.getSelectionCells()),l=c.view.scale;n=Math.floor(d.x/l-c.view.translate.x);l=Math.floor(d.y/l-c.view.translate.y);d=c.background;null==k&&
(c=this.getBasenames().join(";"),0<c.length&&(f=EditorUi.drawHost+"/embed.js?s="+c));b.setAttribute("x0",n);b.setAttribute("y0",l)}null!=b&&(b.setAttribute("pan","1"),b.setAttribute("zoom","1"),b.setAttribute("resize","0"),b.setAttribute("fit","0"),b.setAttribute("border","20"),b.setAttribute("links","1"),null!=g&&b.setAttribute("edit",g));null!=k&&(k=k.replace(/&/g,"&amp;"));b=null!=b?Graph.zapGremlins(mxUtils.getXml(b)):"";g=Graph.compress(b);Graph.decompress(g)!=b&&(g=encodeURIComponent(b));return(null==
k?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=k?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==k?null!=e?"<title>"+mxUtils.htmlEntities(e)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=k?'<meta http-equiv="refresh" content="0;URL=\''+k+"'\"/>\n":"")+"</head>\n<body"+(null==k&&null!=d&&d!=mxConstants.NONE?' style="background-color:'+d+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+
g+"</div>\n</div>\n"+(null==k?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+k+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(b,c,e,g,k){c=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=k&&(k=k.replace(/&/g,"&amp;"));b={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,
@@ -3377,134 +3382,133 @@ function(b){b=this.validateFileData(b);this.pages=this.fileNode=this.currentPage
null;this.fileNode=b;this.pages=[];for(var e=0;e<d.length;e++)null==d[e].getAttribute("id")&&d[e].setAttribute("id",e),b=new DiagramPage(d[e]),null==b.getName()&&b.setName(mxResources.get("pageWithNumber",[e+1])),this.pages.push(b),null!=urlParams["page-id"]&&b.getId()==urlParams["page-id"]&&(c=b);this.currentPage=null!=c?c:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];b=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=b&&(this.fileNode=b.ownerDocument.createElement("mxfile"),
this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var g=urlParams["layer-ids"].split(" ");b={};for(e=0;e<g.length;e++)b[g[e]]=!0;for(var k=this.editor.graph.getModel(),p=k.getChildren(k.root),e=0;e<p.length;e++){var v=p[e];k.setVisible(v,b[v.id]||
!1)}}catch(y){}};EditorUi.prototype.getBaseFilename=function(b){var d=this.getCurrentFile(),d=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(d)||/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||/(\.png)$/i.test(d))d=d.substring(0,d.lastIndexOf("."));/(\.drawio)$/i.test(d)&&(d=d.substring(0,d.lastIndexOf(".")));!b&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(d=d+"-"+
-this.currentPage.getName());return d};EditorUi.prototype.downloadFile=function(b,c,e,g,k,n,p,v,t,x,G,C){try{g=null!=g?g:this.editor.graph.isSelectionEmpty();var d=this.getBaseFilename(!k),f=d+("xml"==b||"pdf"==b&&G?".drawio":"")+"."+b;if("xml"==b){var l='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,g,k,null,null,null,c);this.saveData(f,b,l,"text/xml")}else if("html"==b)l=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(f,b,l,"text/html");else if("svg"!=
-b&&"xmlsvg"!=b||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==b?f=d+".png":"jpeg"==b&&(f=d+".jpg"),this.saveRequest(f,b,mxUtils.bind(this,function(d,c){try{var f=this.editor.graph.pageVisible;null!=n&&(this.editor.graph.pageVisible=n);var e=this.createDownloadRequest(d,b,g,c,p,k,v,t,x,G,C);this.editor.graph.pageVisible=f;return e}catch(F){this.handleError(F)}}));else{var m=null,q=mxUtils.bind(this,function(b){b.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",b,"image/svg+xml"):
-this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(m)}))});if("svg"==b){var u=this.editor.graph.background;if(p||u==mxConstants.NONE)u=null;var y=this.editor.graph.getSvg(u,null,null,null,null,g);e&&this.editor.graph.addSvgShadow(y);this.editor.convertImages(y,mxUtils.bind(this,mxUtils.bind(this,function(b){this.spinner.stop();q('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
-mxUtils.getXml(b))})))}else f=d+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(b){this.spinner.stop();q(b)}),g)}}catch(P){this.handleError(P)}};EditorUi.prototype.createDownloadRequest=function(b,c,e,g,k,n,p,v,t,x,G){var d=this.editor.graph,f=d.getGraphBounds();e=this.getFileData(!0,null,null,null,e,0==n?!1:"xmlpng"!=c,null,null,null,!1,"pdf"==c);var l="",m="";if(f.width*f.height>MAX_AREA||e.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};x=x?"1":"0";"pdf"==
-c&&(null!=G?m="&from="+G.from+"&to="+G.to:0==n&&(m="&allPages=1"));if("xmlpng"==c&&(x="1",c="png",null!=this.pages&&null!=this.currentPage))for(n=0;n<this.pages.length;n++)if(this.pages[n]==this.currentPage){l="&from="+n;break}n=d.background;"png"!=c&&"pdf"!=c||!k?k||null!=n&&n!=mxConstants.NONE||(n="#ffffff"):n=mxConstants.NONE;k={globalVars:d.getExportVariables()};t&&(k.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});Graph.translateDiagram&&(k.diagramLanguage=Graph.diagramLanguage);
-return new mxXmlRequest(EXPORT_URL,"format="+c+l+m+"&bg="+(null!=n?n:mxConstants.NONE)+"&base64="+g+"&embedXml="+x+"&xml="+encodeURIComponent(e)+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(k))+(null!=p?"&scale="+p:"")+(null!=v?"&border="+v:""))};EditorUi.prototype.setMode=function(b,c){this.mode=b};EditorUi.prototype.loadDescriptor=function(b,c,e){var d=window.location.hash,f=mxUtils.bind(this,function(f){var e=null!=b.data?b.data:"";null!=f&&0<f.length&&
-(0<e.length&&(e+="\n"),e+=f);f=new LocalFile(this,"csv"!=b.format&&0<e.length?e:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);f.getHash=function(){return d};this.fileLoaded(f);"csv"==b.format&&this.importCsv(e,mxUtils.bind(this,function(b){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=b.update){var g=null!=b.interval?parseInt(b.interval):6E4,l=null,k=mxUtils.bind(this,function(){var d=this.currentPage;
-mxUtils.post(b.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(b){d===this.currentPage&&(200<=b.getStatus()&&300>=b.getStatus()?(this.updateDiagram(b.getText()),m()):this.handleError({message:mxResources.get("error")+" "+b.getStatus()}))}),mxUtils.bind(this,function(b){this.handleError(b)}))}),m=mxUtils.bind(this,function(){window.clearTimeout(l);l=window.setTimeout(k,g)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){m();
-k()}));m();k()}null!=c&&c()});null!=b.url&&0<b.url.length?this.editor.loadUrl(b.url,mxUtils.bind(this,function(b){f(b)}),mxUtils.bind(this,function(b){null!=e&&e(b)})):f("")};EditorUi.prototype.updateDiagram=function(b){function d(b){var d=new mxCellOverlay(b.image||g.warningImage,b.tooltip,b.align,b.valign,b.offset);d.addListener(mxEvent.CLICK,function(d,c){e.alert(b.tooltip)});return d}var c=null,e=this;if(null!=b&&0<b.length&&(c=mxUtils.parseXml(b),b=null!=c?c.documentElement:null,null!=b&&"updates"==
-b.nodeName)){var g=this.editor.graph,k=g.getModel();k.beginUpdate();var p=null;try{for(b=b.firstChild;null!=b;){if("update"==b.nodeName){var v=k.getCell(b.getAttribute("id"));if(null!=v){try{var t=b.getAttribute("value");if(null!=t){var x=mxUtils.parseXml(t).documentElement;if(null!=x)if("1"==x.getAttribute("replace-value"))k.setValue(v,x);else for(var G=x.attributes,C=0;C<G.length;C++)g.setAttributeForCell(v,G[C].nodeName,0<G[C].nodeValue.length?G[C].nodeValue:null)}}catch(P){null!=window.console&&
-console.log("Error in value for "+v.id+": "+P)}try{var E=b.getAttribute("style");null!=E&&g.model.setStyle(v,E)}catch(P){null!=window.console&&console.log("Error in style for "+v.id+": "+P)}try{var J=b.getAttribute("icon");if(null!=J){var L=0<J.length?JSON.parse(J):null;null!=L&&L.append||g.removeCellOverlays(v);null!=L&&g.addCellOverlay(v,d(L))}}catch(P){null!=window.console&&console.log("Error in icon for "+v.id+": "+P)}try{var H=b.getAttribute("geometry");if(null!=H){var H=JSON.parse(H),K=g.getCellGeometry(v);
-if(null!=K){K=K.clone();for(key in H){var B=parseFloat(H[key]);"dx"==key?K.x+=B:"dy"==key?K.y+=B:"dw"==key?K.width+=B:"dh"==key?K.height+=B:K[key]=parseFloat(H[key])}g.model.setGeometry(v,K)}}}catch(P){null!=window.console&&console.log("Error in icon for "+v.id+": "+P)}}}else if("model"==b.nodeName){for(var M=b.firstChild;null!=M&&M.nodeType!=mxConstants.NODETYPE_ELEMENT;)M=M.nextSibling;null!=M&&(new mxCodec(b.firstChild)).decode(M,k)}else if("view"==b.nodeName){if(b.hasAttribute("scale")&&(g.view.scale=
-parseFloat(b.getAttribute("scale"))),b.hasAttribute("dx")||b.hasAttribute("dy"))g.view.translate=new mxPoint(parseFloat(b.getAttribute("dx")||0),parseFloat(b.getAttribute("dy")||0))}else"fit"==b.nodeName&&(p=b.hasAttribute("max-scale")?parseFloat(b.getAttribute("max-scale")):1);b=b.nextSibling}}finally{k.endUpdate()}null!=p&&this.chromelessResize&&this.chromelessResize(!0,p)}return c};EditorUi.prototype.getCopyFilename=function(b,c){var d=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename,
-f="",e=d.lastIndexOf(".");0<=e&&(f=d.substring(e),d=d.substring(0,e));if(c)var g=new Date,e=g.getFullYear(),k=g.getMonth()+1,p=g.getDate(),t=g.getHours(),x=g.getMinutes(),g=g.getSeconds(),d=d+(" "+(e+"-"+k+"-"+p+"-"+t+"-"+x+"-"+g));return d=mxResources.get("copyOf",[d])+f};EditorUi.prototype.fileLoaded=function(b,c){var d=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var f=!1;this.hideDialog();null!=d&&(EditorUi.debug("File.closed",[d]),d.removeListener(this.descriptorChangedListener),
-d.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var e=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=d&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!c&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));
-this.editor.setStatus("");this.updateUi();c||this.showSplash()});if(null!=b)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(b);b.addListener("descriptorChanged",this.descriptorChangedListener);b.addListener("contentChanged",this.descriptorChangedListener);b.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(b.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();
-this.updateUi();b.isEditable()?b.isModified()?(b.addUnsavedStatus(),null!=b.backupPatch&&b.patch([b.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&
-this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));f=!0;this.isOffline()||null==b.getMode()||EditorUi.logEvent({category:b.getMode().toUpperCase()+"-OPEN-FILE-"+b.getHash(),action:"size_"+b.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[b]);if(this.editor.editable&&this.mode==b.getMode()&&b.getMode()!=App.MODE_DEVICE&&null!=b.getMode())try{this.addRecent({id:b.getHash(),title:b.getTitle(),mode:b.getMode()})}catch(u){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+
-1),mxSettings.save()}catch(u){}}catch(u){this.fileLoadedError=u;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=b?b.getHash():"none"),action:"message_"+u.message,label:"stack_"+u.stack})}catch(v){}var g=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=d?this.fileLoaded(d):e()});c?g():this.handleError(u,mxResources.get("errorLoadingFile"),
-g,!0,null,null,!0)}else e();return f};EditorUi.prototype.getHashValueForPages=function(b,c){var d=0,e=new mxGraphModel,f=new mxCodec;null!=c&&(c.byteCount=0,c.attrCount=0,c.eltCount=0,c.nodeCount=0);for(var g=0;g<b.length;g++){this.updatePageRoot(b[g]);var k=b[g].node.cloneNode(!1);k.removeAttribute("name");e.root=b[g].root;var p=f.encode(e);this.editor.graph.saveViewState(b[g].viewState,p,!0);p.removeAttribute("pageWidth");p.removeAttribute("pageHeight");k.appendChild(p);null!=c&&(c.eltCount+=k.getElementsByTagName("*").length,
-c.nodeCount+=k.getElementsByTagName("mxCell").length);d=(d<<5)-d+this.hashValue(k,function(b,d,c,e){return!e||"mxGeometry"!=b.nodeName&&"mxPoint"!=b.nodeName||"x"!=d&&"y"!=d&&"width"!=d&&"height"!=d?e&&"mxCell"==b.nodeName&&"previous"==d?null:c:Math.round(c)},c)<<0}return d};EditorUi.prototype.hashValue=function(b,c,e){var d=0;if(null!=b&&"object"===typeof b&&"number"===typeof b.nodeType&&"string"===typeof b.nodeName&&"function"===typeof b.getAttribute){null!=b.nodeName&&(d^=this.hashValue(b.nodeName,
-c,e));if(null!=b.attributes){null!=e&&(e.attrCount+=b.attributes.length);for(var f=0;f<b.attributes.length;f++){var g=b.attributes[f].name,l=null!=c?c(b,g,b.attributes[f].value,!0):b.attributes[f].value;null!=l&&(d^=this.hashValue(g,c,e)+this.hashValue(l,c,e))}}if(null!=b.childNodes)for(f=0;f<b.childNodes.length;f++)d=(d<<5)-d+this.hashValue(b.childNodes[f],c,e)<<0}else if(null!=b&&"function"!==typeof b){b=String(b);c=0;null!=e&&(e.byteCount+=b.length);for(f=0;f<b.length;f++)c=(c<<5)-c+b.charCodeAt(f)<<
-0;d^=c}return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(b,c,e,g,k,n,p){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(b){null==b&&(b=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,
-b,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(b){var d=mxUtils.createXmlDocument(),c=d.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(b));d.appendChild(c);return mxUtils.getXml(d)};EditorUi.prototype.closeLibrary=function(b){null!=b&&(this.removeLibrarySidebar(b.getHash()),b.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(b.getHash()),".scratchpad"==b.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=
-function(b){var d=this.sidebar.palettes[b];if(null!=d){for(var c=0;c<d.length;c++)d[c].parentNode.removeChild(d[c]);delete this.sidebar.palettes[b]}};EditorUi.prototype.repositionLibrary=function(b){var d=this.sidebar.container;if(null==b){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(b=c[c.length-1].nextSibling)}b=null!=b?b:d.firstChild.nextSibling.nextSibling;var c=d.lastChild,e=c.previousSibling;d.insertBefore(c,b);d.insertBefore(e,c)};EditorUi.prototype.loadLibrary=
-function(b,c){var d=mxUtils.parseXml(b.getData());if("mxlibrary"==d.documentElement.nodeName){var e=JSON.parse(mxUtils.getTextContent(d.documentElement));this.libraryLoaded(b,e,d.documentElement.getAttribute("title"),c)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(b){return""};EditorUi.prototype.libraryLoaded=function(b,c,e,g){if(null!=this.sidebar){b.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(b.getHash());".scratchpad"==b.title&&
-(this.scratchpad=b);var d=this.sidebar.palettes[b.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(b.getHash());var f=null,l=mxUtils.bind(this,function(d,c){0==d.length&&b.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f)):this.addLibraryEntries(d,c)});null!=this.sidebar&&null!=c&&this.sidebar.addEntries(c);e=null!=e&&0<e.length?e:b.getTitle();var k=this.sidebar.addPalette(b.getHash(),
-e,null!=g?g:!0,mxUtils.bind(this,function(b){l(c,b)}));this.repositionLibrary(d);var m=k.parentNode.previousSibling;g=m.getAttribute("title");null!=g&&0<g.length&&".scratchpad"!=b.title&&m.setAttribute("title",this.getLibraryStorageHint(b)+"\n"+g);var p=document.createElement("div");p.style.position="absolute";p.style.right="0px";p.style.top="0px";p.style.padding="8px";p.style.backgroundColor="inherit";m.style.position="relative";var t=document.createElement("img");t.setAttribute("src",Editor.crossImage);
-t.setAttribute("title",mxResources.get("close"));t.setAttribute("valign","absmiddle");t.setAttribute("border","0");t.style.position="relative";t.style.top="2px";t.style.width="14px";t.style.cursor="pointer";t.style.margin="0 3px";Editor.isDarkMode()&&(t.style.filter="invert(100%)");var C=null;if(".scratchpad"!=b.title||this.closableScratchpad)p.appendChild(t),mxEvent.addListener(t,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var c=mxUtils.bind(this,function(){this.closeLibrary(b)});
-null!=C?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(d)}}));if(b.isEditable()){var E=this.editor.graph,J=null,L=mxUtils.bind(this,function(d){this.showLibraryDialog(b.getTitle(),k,c,b,b.getMode());mxEvent.consume(d)}),H=mxUtils.bind(this,function(d){b.setModified(!0);b.isAutosave()?(null!=J&&null!=J.parentNode&&J.parentNode.removeChild(J),J=t.cloneNode(!1),J.setAttribute("src",Editor.spinImage),J.setAttribute("title",
-mxResources.get("saving")),J.style.cursor="default",J.style.marginRight="2px",J.style.marginTop="-2px",p.insertBefore(J,p.firstChild),m.style.paddingRight=18*p.childNodes.length+"px",this.saveLibrary(b.getTitle(),c,b,b.getMode(),!0,!0,function(){null!=J&&null!=J.parentNode&&(J.parentNode.removeChild(J),m.style.paddingRight=18*p.childNodes.length+"px")})):null==C&&(C=t.cloneNode(!1),C.setAttribute("src",Editor.saveImage),C.setAttribute("title",mxResources.get("save")),p.insertBefore(C,p.firstChild),
-mxEvent.addListener(C,"click",mxUtils.bind(this,function(d){this.saveLibrary(b.getTitle(),c,b,b.getMode(),b.constructor==LocalLibrary,!0,function(){null==C||b.isModified()||(m.style.paddingRight=18*p.childNodes.length+"px",C.parentNode.removeChild(C),C=null)});mxEvent.consume(d)})),m.style.paddingRight=18*p.childNodes.length+"px")}),K=mxUtils.bind(this,function(b,d,e,g){b=E.cloneCells(mxUtils.sortCells(E.model.getTopmostCells(b)));for(var l=0;l<b.length;l++){var m=E.getCellGeometry(b[l]);null!=m&&
-m.translate(-d.x,-d.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(b,d.width,d.height,g||"",!0,!1,!1));b={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(b))),w:d.width,h:d.height};null!=g&&(b.title=g);c.push(b);H(e);null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null)}),B=mxUtils.bind(this,function(b){if(E.isSelectionEmpty())E.getRubberband().isActive()?(E.getRubberband().execute(b),E.getRubberband().reset()):this.showError(mxResources.get("error"),
-mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=E.getSelectionCells(),c=E.view.getBounds(d),e=E.view.scale;c.x/=e;c.y/=e;c.width/=e;c.height/=e;c.x-=E.view.translate.x;c.y-=E.view.translate.y;K(d,c)}mxEvent.consume(b)});mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(b){E.isMouseDown&&null!=E.panningManager&&null!=E.graphHandler.first&&(E.graphHandler.suspend(),null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility="hidden"),k.style.backgroundColor=
-"#f1f3f4",k.style.cursor="copy",E.panningManager.stop(),E.autoScroll=!1,mxEvent.consume(b))}),mxUtils.bind(this,function(b){E.isMouseDown&&null!=E.panningManager&&null!=E.graphHandler&&(k.style.backgroundColor="",k.style.cursor="default",this.sidebar.showTooltips=!0,E.panningManager.stop(),E.graphHandler.reset(),E.isMouseDown=!1,E.autoScroll=!0,B(b),mxEvent.consume(b))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(b){E.isMouseDown&&null!=E.graphHandler.first&&(E.graphHandler.resume(),
-null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility="visible"),k.style.backgroundColor="",k.style.cursor="",E.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(b){k.style.backgroundColor="#f1f3f4";b.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(b){k.style.cursor="";k.style.backgroundColor="";0<b.dataTransfer.files.length&&
-this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,e,g,m,n,q,p,u,v){if(null!=d&&"image/"==e.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,n,q),d)],d[0].vertex=!0,K(d,new mxRectangle(0,0,n,q),b,mxEvent.isAltDown(b)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),
-f=null);else{var t=!1,x=mxUtils.bind(this,function(d,e){if(null!=d&&"application/pdf"==e){var g=Editor.extractGraphModelFromPdf(d);null!=g&&0<g.length&&(d=g)}if(null!=d)if(g=mxUtils.parseXml(d),"mxlibrary"==g.documentElement.nodeName)try{var m=JSON.parse(mxUtils.getTextContent(g.documentElement));l(m,k);c=c.concat(m);H(b);this.spinner.stop();t=!0}catch(V){}else if("mxfile"==g.documentElement.nodeName)try{for(var n=g.documentElement.getElementsByTagName("diagram"),m=0;m<n.length;m++){var q=this.stringToCells(Editor.getDiagramNodeXml(n[m])),
-p=this.editor.graph.getBoundingBoxFromGeometry(q);K(q,new mxRectangle(0,0,p.width,p.height),b)}t=!0}catch(V){null!=window.console&&console.log("error in drop handler:",V)}t||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null)});null!=v&&null!=p&&(/(\.v(dx|sdx?))($|\?)/i.test(p)||/(\.vs(x|sx?))($|\?)/i.test(p))?this.importVisio(v,function(b){x(b,"text/xml")},null,p):!this.isOffline()&&(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(d,p)&&null!=v?this.parseFile(v,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?x(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):x(d,e)}}));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"dragleave",function(b){k.style.cursor="";k.style.backgroundColor="";b.stopPropagation();b.preventDefault()}));
-t=t.cloneNode(!1);t.setAttribute("src",Editor.editImage);t.setAttribute("title",mxResources.get("edit"));p.insertBefore(t,p.firstChild);mxEvent.addListener(t,"click",L);mxEvent.addListener(k,"dblclick",function(b){mxEvent.getSource(b)==k&&L(b)});g=t.cloneNode(!1);g.setAttribute("src",Editor.plusImage);g.setAttribute("title",mxResources.get("add"));p.insertBefore(g,p.firstChild);mxEvent.addListener(g,"click",B);this.isOffline()||".scratchpad"!=b.title||null==EditorUi.scratchpadHelpLink||(g=document.createElement("span"),
-g.setAttribute("title",mxResources.get("help")),g.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(g,"?"),mxEvent.addGestureListeners(g,mxUtils.bind(this,function(b){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(b)})),p.insertBefore(g,p.firstChild))}m.appendChild(p);m.style.paddingRight=18*p.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(b,c){for(var d=0;d<b.length;d++){var e=b[d],f=e.data;if(null!=f){var f=this.convertDataUri(f),
-g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+f,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(f=this.stringToCells(Graph.decompress(e.xml)),0<f.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(f,e.w,e.h,e.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(b){return null!=b?b[mxLanguage]||b.main:null};EditorUi.prototype.footerHeight=
-0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):
-Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily=
-"Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";"1"==urlParams.sketch&&(Graph.zoomWheel=!0,Graph.prototype.defaultVertexStyle={pointerEvents:"0",hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},"0"!=urlParams.rough&&(Graph.prototype.defaultVertexStyle.fontFamily=
-Editor.sketchFontFamily,Graph.prototype.defaultVertexStyle.fontSource=Editor.sketchFontSource,Graph.prototype.defaultVertexStyle.fontSize="20",Graph.prototype.defaultVertexStyle.sketch="1",Graph.prototype.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,Graph.prototype.defaultEdgeStyle.fontSource=Editor.sketchFontSource,Graph.prototype.defaultEdgeStyle.fontSize="20",Graph.prototype.defaultEdgeStyle.sketch="1",Menus.prototype.defaultFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)},
-{fontFamily:"Rock Salt",fontUrl:"https://fonts.googleapis.com/css?family=Rock+Salt"},{fontFamily:"Permanent Marker",fontUrl:"https://fonts.googleapis.com/css?family=Permanent+Marker"}].concat(Menus.prototype.defaultFonts)),Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled=!1,Graph.prototype.defaultPageVisible=!1,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=
-function(b,c,e,g,k){b=new ImageDialog(this,b,c,e,g,k);this.showDialog(b.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);b.init()};EditorUi.prototype.showBackgroundImageDialog=function(b,c){b=null!=b?b:mxUtils.bind(this,function(b,d){if(!d){var c=new ChangePageSetup(this,null,b);c.ignoreColor=!0;this.editor.graph.model.execute(c)}});var d=new BackgroundImageDialog(this,b,c);this.showDialog(d.container,360,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(b,c,e,
-g,k){b=new LibraryDialog(this,b,c,e,g,k);this.showDialog(b.container,640,440,!0,!1,mxUtils.bind(this,function(b){b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));b.init()};var e=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(b){var d=e.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(b){this.editor.graph.isSelectionEmpty()&&d.refresh()}));return d};EditorUi.prototype.createSidebarFooterContainer=function(){var b=
-this.createDiv("geSidebarContainer geSidebarFooter");b.style.position="absolute";b.style.overflow="hidden";var c=document.createElement("a");c.className="geTitle";c.style.color="#DF6C0C";c.style.fontWeight="bold";c.style.height="100%";c.style.paddingTop="9px";c.innerHTML="<span>+</span>";var e=c.getElementsByTagName("span")[0];e.style.fontSize="18px";e.style.marginRight="5px";mxUtils.write(c,mxResources.get("moreShapes")+"...");mxEvent.addListener(c,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,
-function(b){b.preventDefault()}));mxEvent.addListener(c,"click",mxUtils.bind(this,function(b){this.actions.get("shapes").funct();mxEvent.consume(b)}));b.appendChild(c);return b};EditorUi.prototype.handleError=function(b,c,e,g,k,n,p){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=b&&null!=b.error?b.error:b;if(null!=b&&null!=b.stack&&null!=b.message)try{p?null!=window.console&&console.error("EditorUi.handleError:",b):EditorUi.logError("Caught: "+(""==b.message&&
-null!=b.name)?b.name:b.message,b.filename,b.lineNumber,b.columnNumber,b,"INFO")}catch(J){}if(null!=f||null!=c){p=mxUtils.htmlEntities(mxResources.get("unknownError"));var l=mxResources.get("ok"),m=null;c=null!=c?c:mxResources.get("error");if(null!=f){null!=f.retry&&(l=mxResources.get("cancel"),m=function(){d();f.retry()});if(404==f.code||404==f.status||403==f.code){p=403==f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=k?k:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+
-(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var q=null!=k?null:null!=n?n:window.location.hash;if(null!=q&&("#G"==q.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==q.substring(0,45))&&(null!=b&&null!=b.error&&(null!=b.error.errors&&0<b.error.errors.length&&"fileAccess"==b.error.errors[0].reason||null!=b.error.data&&0<b.error.data.length&&"fileAccess"==b.error.data[0].reason)||404==f.code||404==f.status)){q="#U"==q.substring(0,
-2)?q.substring(45,q.lastIndexOf("%26ex")):q.substring(2);this.showError(c,p,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+q);this.handleError(b,c,e,g,k)}),m,mxResources.get("changeUser"),mxUtils.bind(this,function(){function b(){f.innerHTML="";for(var b=0;b<d.length;b++){var c=document.createElement("option");mxUtils.write(c,d[b].displayName);c.value=b;f.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";
-mxUtils.write(c,"<"+d[b].email+">");c.setAttribute("disabled","disabled");f.appendChild(c)}c=document.createElement("option");mxUtils.write(c,mxResources.get("addAccount"));c.value=d.length;f.appendChild(c)}var d=this.drive.getUsersList(),c=document.createElement("div"),e=document.createElement("span");e.style.marginTop="6px";mxUtils.write(e,mxResources.get("changeUser")+": ");c.appendChild(e);var f=document.createElement("select");f.style.width="200px";b();mxEvent.addListener(f,"change",mxUtils.bind(this,
-function(){var c=f.value,e=d.length!=c;e&&this.drive.setUser(d[c]);this.drive.authorize(e,mxUtils.bind(this,function(){e||(d=this.drive.getUsersList(),b())}),mxUtils.bind(this,function(b){this.handleError(b)}),!0)}));c.appendChild(f);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(c.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=e&&e()}),480,150);return}}null!=f.message?
-p=""==f.message&&null!=f.name?mxUtils.htmlEntities(f.name):mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?p=mxUtils.htmlEntities(f.response.error):"undefined"!==typeof window.App&&(f.code==App.ERROR_TIMEOUT?p=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?p=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof f&&0<f.length&&(p=mxUtils.htmlEntities(f)))}var u=n=null;null!=f&&null!=f.helpLink&&(n=mxResources.get("help"),u=mxUtils.bind(this,
-function(){return this.editor.graph.openLink(f.helpLink)}));this.showError(c,p,l,e,m,null,null,n,u,null,null,null,g?e:null)}else null!=e&&e()};EditorUi.prototype.alert=function(b,c,e){b=new ErrorDialog(this,null,b,mxResources.get("ok"),c);this.showDialog(b.container,e||340,100,!0,!1);b.init()};EditorUi.prototype.confirm=function(b,c,e,g,k,n){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=Math.min(200,28*Math.ceil(b.length/50));b=new ConfirmDialog(this,b,function(){d();
-null!=c&&c()},function(){d();null!=e&&e()},g,k,null,null,null,null,f);this.showDialog(b.container,340,46+f,!0,n);b.init()};EditorUi.prototype.showBanner=function(b,c,e,g){var d=!1;if(!(this.bannerShowing||this["hideBanner"+b]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+b])){var f=document.createElement("div");f.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+
-mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(f.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(f.style,"transition","all 1s ease");f.className="geBtn gePrimaryBtn";d=document.createElement("img");d.setAttribute("src",IMAGE_PATH+"/logo.png");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";f.appendChild(d);
-d=document.createElement("img");d.setAttribute("src",Dialog.prototype.closeImage);d.setAttribute("title",mxResources.get(g?"doNotShowAgain":"close"));d.setAttribute("border","0");d.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";f.appendChild(d);mxUtils.write(f,c);document.body.appendChild(f);this.bannerShowing=!0;c=document.createElement("div");c.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var l=document.createElement("input");
-l.setAttribute("type","checkbox");l.setAttribute("id","geDoNotShowAgainCheckbox");l.style.marginRight="6px";if(!g){c.appendChild(l);var k=document.createElement("label");k.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(k,mxResources.get("doNotShowAgain"));c.appendChild(k);f.style.paddingBottom="30px";f.appendChild(c)}var m=mxUtils.bind(this,function(){null!=f.parentNode&&(f.parentNode.removeChild(f),this.bannerShowing=!1,l.checked||g)&&(this["hideBanner"+b]=!0,isLocalStorage&&null!=
-mxSettings.settings&&(mxSettings.settings["close"+b]=Date.now(),mxSettings.save()))});mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);m()}));var p=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){m()}),1E3)});mxEvent.addListener(f,"click",mxUtils.bind(this,function(b){var d=mxEvent.getSource(b);d!=l&&d!=k?(null!=e&&e(),m(),mxEvent.consume(b)):p()}));window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(p,3E4);d=!0}return d};EditorUi.prototype.setCurrentFile=function(b){null!=b&&(b.opened=new Date);this.currentFile=b};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(b,c,e,g){b=b.toDataURL("image/"+e);if(null!=b&&6<b.length)null!=c&&(b=Editor.writeGraphModelToPng(b,
-"tEXt","mxfile",encodeURIComponent(c))),0<g&&(b=Editor.writeGraphModelToPng(b,"pHYs","dpi",g));else throw{message:mxResources.get("unknownError")};return b};EditorUi.prototype.saveCanvas=function(b,c,e,g,k){var d="jpeg"==e?"jpg":e;g=this.getBaseFilename(g)+(null!=c?".drawio":"")+"."+d;b=this.createImageDataUri(b,c,e,k);this.saveData(g,d,b.substring(b.lastIndexOf(",")+1),"image/"+e,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&
-"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(b,c){var d=new TextareaDialog(this,b,c,null,null,mxResources.get("close"));d.textarea.style.width="600px";d.textarea.style.height="380px";this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(b,c,e,g,
-k,n){"text/xml"!=e||/(\.drawio)$/i.test(c)||/(\.xml)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.html)$/i.test(c)||(c=c+"."+(null!=n?n:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)b=g?this.base64ToBlob(b,e):new Blob([b],{type:e}),navigator.msSaveOrOpenBlob(b,c);else if(mxClient.IS_IE)e=window.open("about:blank","_blank"),null==e?mxUtils.popup(b,!0):(e.document.write(b),e.document.close(),e.document.execCommand("SaveAs",!0,c),e.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||
-null==e||"image/"!=e.substring(0,6)?this.showTextDialog(c+":",b):this.openInNewWindow(b,e,g);else{var d=document.createElement("a");n=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof d.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var f=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);n=65==(f?parseInt(f[2],10):!1)?!1:n}if(n||this.isOffline()){d.href=URL.createObjectURL(g?this.base64ToBlob(b,e):new Blob([b],{type:e}));n?d.download=c:d.setAttribute("target",
-"_blank");document.body.appendChild(d);try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},2E4),d.click(),d.parentNode.removeChild(d)}catch(y){}}else this.createEchoRequest(b,c,e,g,k).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(b,c,e,g,k,n){b="xml="+encodeURIComponent(b);return new mxXmlRequest(SAVE_URL,b+(null!=e?"&mime="+e:"")+(null!=k?"&format="+k:"")+(null!=n?"&base64="+n:"")+(null!=c?"&filename="+encodeURIComponent(c):"")+(g?"&binary=1":""))};EditorUi.prototype.base64ToBlob=
-function(b,c){c=c||"";for(var d=atob(b),e=d.length,f=Math.ceil(e/1024),g=Array(f),k=0;k<f;++k){for(var p=1024*k,t=Math.min(p+1024,e),x=Array(t-p),G=0;p<t;++G,++p)x[G]=d[p].charCodeAt(0);g[k]=new Uint8Array(x)}return new Blob(g,{type:c})};EditorUi.prototype.saveLocalFile=function(b,c,e,g,k,n,p,t){n=null!=n?n:!1;p=null!=p?p:"vsdx"!=k&&(!mxClient.IS_IOS||!navigator.standalone);k=this.getServiceCount(n);isLocalStorage&&k++;var d=4>=k?2:6<k?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(d,c){try{if("_blank"==
-c)if(null!=e&&"image/"==e.substring(0,6))this.openInNewWindow(b,e,g);else if(null!=e&&"text/html"==e.substring(0,9)){var f=new EmbedDialog(this,b);this.showDialog(f.container,440,240,!0,!0);f.init()}else{var l=window.open("about:blank");null==l?mxUtils.popup(b,!0):(l.document.write("<pre>"+mxUtils.htmlEntities(b,!1)+"</pre>"),l.document.close())}else c==App.MODE_DEVICE||"download"==c?this.doSaveLocalFile(b,d,e,g,null,t):null!=d&&0<d.length&&this.pickFolder(c,mxUtils.bind(this,function(f){try{this.exportFile(b,
-d,e,g,c,f)}catch(L){this.handleError(L)}}))}catch(J){this.handleError(J)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,n,p,null,1<k,d,b,e,g);n=this.isServices(k)?k>d?390:270:160;this.showDialog(c.container,400,n,!0,!0);c.init()};EditorUi.prototype.openInNewWindow=function(b,c,e){var d=window.open("about:blank");null==d||null==d.document?mxUtils.popup(b,!0):("image/svg+xml"!=c||mxClient.IS_SVG?"image/svg+xml"==c?d.document.write("<html>"+
-b+"</html>"):(b=e?b:btoa(unescape(encodeURIComponent(b))),d.document.write('<html><img style="max-width:100%;" src="data:'+c+";base64,"+b+'"/></html>')):d.document.write("<html><pre>"+mxUtils.htmlEntities(b,!1)+"</pre></html>"),d.document.close())};var k=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};
-EditorUi.prototype.addChromelessToolbarItems=function(b){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var d=b(mxUtils.bind(this,function(b){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",
-this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,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 c=d.getBoundingClientRect();
-this.tagsDialog.style.left=c.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=c.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(b)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,
-mxUtils.bind(this,function(){var b=this.editor.graph.getAllTags();d.style.display=0<b.length?"":"none"}));k.apply(this,arguments)}this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",
-mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),
-this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var c=b(mxUtils.bind(this,function(b){var d=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",d);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)d.apply(this);else{this.exportDialog=document.createElement("div");var e=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,
-"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=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=e.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
-this.chromelessToolbar.offsetHeight+4+"px";e=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=e.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(b){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(b,
-null,"png");b=document.createElement("img");b.style.maxWidth="140px";b.style.maxHeight="140px";b.style.cursor="pointer";b.style.backgroundColor="white";b.setAttribute("title",mxResources.get("openInNewWindow"));b.setAttribute("border","0");b.setAttribute("src",c);this.exportDialog.appendChild(b);mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);d.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,
-function(b){this.spinner.stop();this.handleError(b)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",d);document.body.appendChild(this.exportDialog)}mxEvent.consume(b)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(b,c,e,g,k){this.isLocalFileSave()?this.saveLocalFile(e,b,g,k,c):this.saveRequest(b,c,mxUtils.bind(this,function(b,d){return this.createEchoRequest(e,b,g,k,c,d)}),e,k,g)};EditorUi.prototype.saveRequest=
-function(b,c,e,g,k,n,p){p=null!=p?p:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);isLocalStorage&&d++;var f=4>=d?2:6<d?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,d){if("_blank"==d||null!=b&&0<b.length){var f=e("_blank"==d?null:b,d==App.MODE_DEVICE||"download"==d||null==d||"_blank"==d?"0":"1");null!=f&&(d==App.MODE_DEVICE||"download"==d||"_blank"==d?f.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(e){n=null!=n?n:"pdf"==c?"application/pdf":
-"image/"+c;if(null!=g)try{this.exportFile(g,b,n,!0,d,e)}catch(J){this.handleError(J)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),b,n,!0,d,e)}catch(J){this.handleError(J)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(b){this.spinner.stop();this.handleError(b)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),
-mxResources.get("saveAs"),mxResources.get("download"),!1,!1,p,null,1<d,f,g,n,k);d=this.isServices(d)?4<d?390:270:160;this.showDialog(b.container,380,d,!0,!0);b.init()};EditorUi.prototype.isServices=function(b){return 1!=b};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(b,c,e,g,k,n){};EditorUi.prototype.pickFolder=function(b,c,e){c(null)};EditorUi.prototype.exportSvg=function(b,c,e,g,k,n,p,t,y,x,G,C){if(this.spinner.spin(document.body,
-mxResources.get("export")))try{var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;var f=c?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==c&&(f=G?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var l=this.editor.graph.getSvg(f,b,p,t,null,e,null,null,"blank"==x?"_blank":"self"==x?"_top":null,null,!0,G,C);g&&this.editor.graph.addSvgShadow(l);var m=this.getBaseFilename()+(k?".drawio":"")+".svg",q=mxUtils.bind(this,function(b){this.spinner.stop();k&&b.setAttribute("content",
-this.getFileData(!0,null,null,null,e,y,null,null,null,!1));var d='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(b);this.isLocalFileSave()||d.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",d,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.editor.addFontCss(l);this.editor.graph.mathEnabled&&
-this.editor.addMathCss(l);n?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(l,q,this.thumbImageCache)):q(l)}catch(B){this.handleError(B)}};EditorUi.prototype.addRadiobox=function(b,c,e,g,k,n,p){return this.addCheckbox(b,e,g,k,n,p,!0,c)};EditorUi.prototype.addCheckbox=function(b,c,e,g,k,n,p,t){n=null!=n?n:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type",p?"radio":"checkbox");p="geCheckbox-"+Editor.guid();
-d.id=p;null!=t&&d.setAttribute("name",t);e&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);g&&d.setAttribute("disabled","disabled");n&&(b.appendChild(d),e=document.createElement("label"),mxUtils.write(e,c),e.setAttribute("for",p),b.appendChild(e),k||mxUtils.br(b));return d};EditorUi.prototype.addEditButton=function(b,c){var d=this.addCheckbox(b,mxResources.get("edit")+":",!0,null,!0);d.style.marginLeft="24px";var e=this.getCurrentFile(),f="";null!=e&&e.getMode()!=App.MODE_DEVICE&&e.getMode()!=
-App.MODE_BROWSER&&(f=window.location.href);var g=document.createElement("select");g.style.width="120px";g.style.marginLeft="8px";g.style.marginRight="10px";g.className="geBtn";e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("makeCopy"));g.appendChild(e);e=document.createElement("option");e.setAttribute("value","custom");mxUtils.write(e,mxResources.get("custom")+"...");g.appendChild(e);b.appendChild(g);mxEvent.addListener(g,"change",mxUtils.bind(this,
-function(){if("custom"==g.value){var b=new FilenameDialog(this,f,mxResources.get("ok"),function(b){null!=b?f=b:g.value="blank"},mxResources.get("url"),null,null,null,null,function(){g.value="blank"});this.showDialog(b.container,300,80,!0,!1);b.init()}}));mxEvent.addListener(d,"change",mxUtils.bind(this,function(){d.checked&&(null==c||c.checked)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")}));mxUtils.br(b);return{getLink:function(){return d.checked?"blank"===g.value?"_blank":
-f:null},getEditInput:function(){return d},getEditSelect:function(){return g}}};EditorUi.prototype.addLinkSection=function(b,c){function d(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=g&&g!=mxConstants.NONE?"border:1px solid black;background-color:"+g:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(b,mxResources.get("links")+":");var e=document.createElement("select");
+this.currentPage.getName());return d};EditorUi.prototype.downloadFile=function(b,c,e,g,k,n,p,v,t,x,E,C){try{g=null!=g?g:this.editor.graph.isSelectionEmpty();var d=this.getBaseFilename(!k),f=d+("xml"==b||"pdf"==b&&E?".drawio":"")+"."+b;if("xml"==b){var l=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,g,k,null,null,null,c);this.saveData(f,b,l,"text/xml")}else if("html"==b)l=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(f,b,l,"text/html");else if("svg"!=b&&"xmlsvg"!=
+b||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==b?f=d+".png":"jpeg"==b&&(f=d+".jpg"),this.saveRequest(f,b,mxUtils.bind(this,function(d,c){try{var f=this.editor.graph.pageVisible;null!=n&&(this.editor.graph.pageVisible=n);var e=this.createDownloadRequest(d,b,g,c,p,k,v,t,x,E,C);this.editor.graph.pageVisible=f;return e}catch(G){this.handleError(G)}}));else{var m=null,q=mxUtils.bind(this,function(b){b.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
+mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(m)}))});if("svg"==b){var u=this.editor.graph.background;if(p||u==mxConstants.NONE)u=null;var y=this.editor.graph.getSvg(u,null,null,null,null,g);e&&this.editor.graph.addSvgShadow(y);this.editor.convertImages(y,mxUtils.bind(this,mxUtils.bind(this,function(b){this.spinner.stop();q(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(b))})))}else f=d+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(b){this.spinner.stop();
+q(b)}),g)}}catch(P){this.handleError(P)}};EditorUi.prototype.createDownloadRequest=function(b,c,e,g,k,n,p,v,t,x,E){var d=this.editor.graph,f=d.getGraphBounds();e=this.getFileData(!0,null,null,null,e,0==n?!1:"xmlpng"!=c,null,null,null,!1,"pdf"==c);var l="",m="";if(f.width*f.height>MAX_AREA||e.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};x=x?"1":"0";"pdf"==c&&(null!=E?m="&from="+E.from+"&to="+E.to:0==n&&(m="&allPages=1"));if("xmlpng"==c&&(x="1",c="png",null!=this.pages&&
+null!=this.currentPage))for(n=0;n<this.pages.length;n++)if(this.pages[n]==this.currentPage){l="&from="+n;break}n=d.background;"png"!=c&&"pdf"!=c||!k?k||null!=n&&n!=mxConstants.NONE||(n="#ffffff"):n=mxConstants.NONE;k={globalVars:d.getExportVariables()};t&&(k.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});Graph.translateDiagram&&(k.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+c+l+m+"&bg="+(null!=n?n:mxConstants.NONE)+"&base64="+g+"&embedXml="+
+x+"&xml="+encodeURIComponent(e)+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(k))+(null!=p?"&scale="+p:"")+(null!=v?"&border="+v:""))};EditorUi.prototype.setMode=function(b,c){this.mode=b};EditorUi.prototype.loadDescriptor=function(b,c,e){var d=window.location.hash,f=mxUtils.bind(this,function(f){var e=null!=b.data?b.data:"";null!=f&&0<f.length&&(0<e.length&&(e+="\n"),e+=f);f=new LocalFile(this,"csv"!=b.format&&0<e.length?e:this.emptyDiagramXml,null!=
+urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);f.getHash=function(){return d};this.fileLoaded(f);"csv"==b.format&&this.importCsv(e,mxUtils.bind(this,function(b){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=b.update){var g=null!=b.interval?parseInt(b.interval):6E4,l=null,k=mxUtils.bind(this,function(){var d=this.currentPage;mxUtils.post(b.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,
+function(b){d===this.currentPage&&(200<=b.getStatus()&&300>=b.getStatus()?(this.updateDiagram(b.getText()),m()):this.handleError({message:mxResources.get("error")+" "+b.getStatus()}))}),mxUtils.bind(this,function(b){this.handleError(b)}))}),m=mxUtils.bind(this,function(){window.clearTimeout(l);l=window.setTimeout(k,g)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){m();k()}));m();k()}null!=c&&c()});null!=b.url&&0<b.url.length?this.editor.loadUrl(b.url,mxUtils.bind(this,function(b){f(b)}),
+mxUtils.bind(this,function(b){null!=e&&e(b)})):f("")};EditorUi.prototype.updateDiagram=function(b){function d(b){var d=new mxCellOverlay(b.image||g.warningImage,b.tooltip,b.align,b.valign,b.offset);d.addListener(mxEvent.CLICK,function(d,c){e.alert(b.tooltip)});return d}var c=null,e=this;if(null!=b&&0<b.length&&(c=mxUtils.parseXml(b),b=null!=c?c.documentElement:null,null!=b&&"updates"==b.nodeName)){var g=this.editor.graph,k=g.getModel();k.beginUpdate();var p=null;try{for(b=b.firstChild;null!=b;){if("update"==
+b.nodeName){var v=k.getCell(b.getAttribute("id"));if(null!=v){try{var t=b.getAttribute("value");if(null!=t){var x=mxUtils.parseXml(t).documentElement;if(null!=x)if("1"==x.getAttribute("replace-value"))k.setValue(v,x);else for(var E=x.attributes,C=0;C<E.length;C++)g.setAttributeForCell(v,E[C].nodeName,0<E[C].nodeValue.length?E[C].nodeValue:null)}}catch(P){null!=window.console&&console.log("Error in value for "+v.id+": "+P)}try{var F=b.getAttribute("style");null!=F&&g.model.setStyle(v,F)}catch(P){null!=
+window.console&&console.log("Error in style for "+v.id+": "+P)}try{var I=b.getAttribute("icon");if(null!=I){var L=0<I.length?JSON.parse(I):null;null!=L&&L.append||g.removeCellOverlays(v);null!=L&&g.addCellOverlay(v,d(L))}}catch(P){null!=window.console&&console.log("Error in icon for "+v.id+": "+P)}try{var H=b.getAttribute("geometry");if(null!=H){var H=JSON.parse(H),J=g.getCellGeometry(v);if(null!=J){J=J.clone();for(key in H){var B=parseFloat(H[key]);"dx"==key?J.x+=B:"dy"==key?J.y+=B:"dw"==key?J.width+=
+B:"dh"==key?J.height+=B:J[key]=parseFloat(H[key])}g.model.setGeometry(v,J)}}}catch(P){null!=window.console&&console.log("Error in icon for "+v.id+": "+P)}}}else if("model"==b.nodeName){for(var M=b.firstChild;null!=M&&M.nodeType!=mxConstants.NODETYPE_ELEMENT;)M=M.nextSibling;null!=M&&(new mxCodec(b.firstChild)).decode(M,k)}else if("view"==b.nodeName){if(b.hasAttribute("scale")&&(g.view.scale=parseFloat(b.getAttribute("scale"))),b.hasAttribute("dx")||b.hasAttribute("dy"))g.view.translate=new mxPoint(parseFloat(b.getAttribute("dx")||
+0),parseFloat(b.getAttribute("dy")||0))}else"fit"==b.nodeName&&(p=b.hasAttribute("max-scale")?parseFloat(b.getAttribute("max-scale")):1);b=b.nextSibling}}finally{k.endUpdate()}null!=p&&this.chromelessResize&&this.chromelessResize(!0,p)}return c};EditorUi.prototype.getCopyFilename=function(b,c){var d=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename,f="",e=d.lastIndexOf(".");0<=e&&(f=d.substring(e),d=d.substring(0,e));if(c)var g=new Date,e=g.getFullYear(),k=g.getMonth()+1,p=g.getDate(),
+t=g.getHours(),x=g.getMinutes(),g=g.getSeconds(),d=d+(" "+(e+"-"+k+"-"+p+"-"+t+"-"+x+"-"+g));return d=mxResources.get("copyOf",[d])+f};EditorUi.prototype.fileLoaded=function(b,c){var d=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var f=!1;this.hideDialog();null!=d&&(EditorUi.debug("File.closed",[d]),d.removeListener(this.descriptorChangedListener),d.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var e=mxUtils.bind(this,function(){this.setGraphEnabled(!1);
+this.setCurrentFile(null);null!=d&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!c&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();c||this.showSplash()});if(null!=b)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility=
+"");this.openingFile=!0;this.setCurrentFile(b);b.addListener("descriptorChanged",this.descriptorChangedListener);b.addListener("contentChanged",this.descriptorChangedListener);b.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(b.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();b.isEditable()?b.isModified()?(b.addUnsavedStatus(),null!=b.backupPatch&&b.patch([b.backupPatch])):this.editor.setStatus(""):
+this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));f=!0;this.isOffline()||null==b.getMode()||EditorUi.logEvent({category:b.getMode().toUpperCase()+
+"-OPEN-FILE-"+b.getHash(),action:"size_"+b.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[b]);if(this.editor.editable&&this.mode==b.getMode()&&b.getMode()!=App.MODE_DEVICE&&null!=b.getMode())try{this.addRecent({id:b.getHash(),title:b.getTitle(),mode:b.getMode()})}catch(u){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(u){}}catch(u){this.fileLoadedError=u;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+
+(null!=b?b.getHash():"none"),action:"message_"+u.message,label:"stack_"+u.stack})}catch(v){}var g=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=d?this.fileLoaded(d):e()});c?g():this.handleError(u,mxResources.get("errorLoadingFile"),g,!0,null,null,!0)}else e();return f};EditorUi.prototype.getHashValueForPages=function(b,c){var d=0,e=new mxGraphModel,f=new mxCodec;null!=c&&(c.byteCount=
+0,c.attrCount=0,c.eltCount=0,c.nodeCount=0);for(var g=0;g<b.length;g++){this.updatePageRoot(b[g]);var k=b[g].node.cloneNode(!1);k.removeAttribute("name");e.root=b[g].root;var p=f.encode(e);this.editor.graph.saveViewState(b[g].viewState,p,!0);p.removeAttribute("pageWidth");p.removeAttribute("pageHeight");k.appendChild(p);null!=c&&(c.eltCount+=k.getElementsByTagName("*").length,c.nodeCount+=k.getElementsByTagName("mxCell").length);d=(d<<5)-d+this.hashValue(k,function(b,d,c,e){return!e||"mxGeometry"!=
+b.nodeName&&"mxPoint"!=b.nodeName||"x"!=d&&"y"!=d&&"width"!=d&&"height"!=d?e&&"mxCell"==b.nodeName&&"previous"==d?null:c:Math.round(c)},c)<<0}return d};EditorUi.prototype.hashValue=function(b,c,e){var d=0;if(null!=b&&"object"===typeof b&&"number"===typeof b.nodeType&&"string"===typeof b.nodeName&&"function"===typeof b.getAttribute){null!=b.nodeName&&(d^=this.hashValue(b.nodeName,c,e));if(null!=b.attributes){null!=e&&(e.attrCount+=b.attributes.length);for(var f=0;f<b.attributes.length;f++){var g=b.attributes[f].name,
+l=null!=c?c(b,g,b.attributes[f].value,!0):b.attributes[f].value;null!=l&&(d^=this.hashValue(g,c,e)+this.hashValue(l,c,e))}}if(null!=b.childNodes)for(f=0;f<b.childNodes.length;f++)d=(d<<5)-d+this.hashValue(b.childNodes[f],c,e)<<0}else if(null!=b&&"function"!==typeof b){b=String(b);c=0;null!=e&&(e.byteCount+=b.length);for(f=0;f<b.length;f++)c=(c<<5)-c+b.charCodeAt(f)<<0;d^=c}return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=
+function(b,c,e,g,k,n,p){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(b){null==b&&(b=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,b,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(b){var d=mxUtils.createXmlDocument(),
+c=d.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(b));d.appendChild(c);return mxUtils.getXml(d)};EditorUi.prototype.closeLibrary=function(b){null!=b&&(this.removeLibrarySidebar(b.getHash()),b.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(b.getHash()),".scratchpad"==b.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(b){var d=this.sidebar.palettes[b];if(null!=d){for(var c=0;c<d.length;c++)d[c].parentNode.removeChild(d[c]);delete this.sidebar.palettes[b]}};
+EditorUi.prototype.repositionLibrary=function(b){var d=this.sidebar.container;if(null==b){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(b=c[c.length-1].nextSibling)}b=null!=b?b:d.firstChild.nextSibling.nextSibling;var c=d.lastChild,e=c.previousSibling;d.insertBefore(c,b);d.insertBefore(e,c)};EditorUi.prototype.loadLibrary=function(b,c){var d=mxUtils.parseXml(b.getData());if("mxlibrary"==d.documentElement.nodeName){var e=JSON.parse(mxUtils.getTextContent(d.documentElement));
+this.libraryLoaded(b,e,d.documentElement.getAttribute("title"),c)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(b){return""};EditorUi.prototype.libraryLoaded=function(b,c,e,g){if(null!=this.sidebar){b.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(b.getHash());".scratchpad"==b.title&&(this.scratchpad=b);var d=this.sidebar.palettes[b.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(b.getHash());var f=
+null,l=mxUtils.bind(this,function(d,c){0==d.length&&b.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f)):this.addLibraryEntries(d,c)});null!=this.sidebar&&null!=c&&this.sidebar.addEntries(c);e=null!=e&&0<e.length?e:b.getTitle();var k=this.sidebar.addPalette(b.getHash(),e,null!=g?g:!0,mxUtils.bind(this,function(b){l(c,b)}));this.repositionLibrary(d);var m=k.parentNode.previousSibling;g=m.getAttribute("title");
+null!=g&&0<g.length&&".scratchpad"!=b.title&&m.setAttribute("title",this.getLibraryStorageHint(b)+"\n"+g);var p=document.createElement("div");p.style.position="absolute";p.style.right="0px";p.style.top="0px";p.style.padding="8px";p.style.backgroundColor="inherit";m.style.position="relative";var t=document.createElement("img");t.setAttribute("src",Editor.crossImage);t.setAttribute("title",mxResources.get("close"));t.setAttribute("valign","absmiddle");t.setAttribute("border","0");t.style.position="relative";
+t.style.top="2px";t.style.width="14px";t.style.cursor="pointer";t.style.margin="0 3px";Editor.isDarkMode()&&(t.style.filter="invert(100%)");var C=null;if(".scratchpad"!=b.title||this.closableScratchpad)p.appendChild(t),mxEvent.addListener(t,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var c=mxUtils.bind(this,function(){this.closeLibrary(b)});null!=C?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(d)}}));
+if(b.isEditable()){var F=this.editor.graph,I=null,L=mxUtils.bind(this,function(d){this.showLibraryDialog(b.getTitle(),k,c,b,b.getMode());mxEvent.consume(d)}),H=mxUtils.bind(this,function(d){b.setModified(!0);b.isAutosave()?(null!=I&&null!=I.parentNode&&I.parentNode.removeChild(I),I=t.cloneNode(!1),I.setAttribute("src",Editor.spinImage),I.setAttribute("title",mxResources.get("saving")),I.style.cursor="default",I.style.marginRight="2px",I.style.marginTop="-2px",p.insertBefore(I,p.firstChild),m.style.paddingRight=
+18*p.childNodes.length+"px",this.saveLibrary(b.getTitle(),c,b,b.getMode(),!0,!0,function(){null!=I&&null!=I.parentNode&&(I.parentNode.removeChild(I),m.style.paddingRight=18*p.childNodes.length+"px")})):null==C&&(C=t.cloneNode(!1),C.setAttribute("src",Editor.saveImage),C.setAttribute("title",mxResources.get("save")),p.insertBefore(C,p.firstChild),mxEvent.addListener(C,"click",mxUtils.bind(this,function(d){this.saveLibrary(b.getTitle(),c,b,b.getMode(),b.constructor==LocalLibrary,!0,function(){null==
+C||b.isModified()||(m.style.paddingRight=18*p.childNodes.length+"px",C.parentNode.removeChild(C),C=null)});mxEvent.consume(d)})),m.style.paddingRight=18*p.childNodes.length+"px")}),J=mxUtils.bind(this,function(b,d,e,g){b=F.cloneCells(mxUtils.sortCells(F.model.getTopmostCells(b)));for(var l=0;l<b.length;l++){var m=F.getCellGeometry(b[l]);null!=m&&m.translate(-d.x,-d.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(b,d.width,d.height,g||"",!0,!1,!1));b={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(b))),
+w:d.width,h:d.height};null!=g&&(b.title=g);c.push(b);H(e);null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null)}),B=mxUtils.bind(this,function(b){if(F.isSelectionEmpty())F.getRubberband().isActive()?(F.getRubberband().execute(b),F.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=F.getSelectionCells(),c=F.view.getBounds(d),e=F.view.scale;c.x/=e;c.y/=e;c.width/=e;c.height/=e;c.x-=F.view.translate.x;
+c.y-=F.view.translate.y;J(d,c)}mxEvent.consume(b)});mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(b){F.isMouseDown&&null!=F.panningManager&&null!=F.graphHandler.first&&(F.graphHandler.suspend(),null!=F.graphHandler.hint&&(F.graphHandler.hint.style.visibility="hidden"),k.style.backgroundColor="#f1f3f4",k.style.cursor="copy",F.panningManager.stop(),F.autoScroll=!1,mxEvent.consume(b))}),mxUtils.bind(this,function(b){F.isMouseDown&&null!=F.panningManager&&null!=F.graphHandler&&
+(k.style.backgroundColor="",k.style.cursor="default",this.sidebar.showTooltips=!0,F.panningManager.stop(),F.graphHandler.reset(),F.isMouseDown=!1,F.autoScroll=!0,B(b),mxEvent.consume(b))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(b){F.isMouseDown&&null!=F.graphHandler.first&&(F.graphHandler.resume(),null!=F.graphHandler.hint&&(F.graphHandler.hint.style.visibility="visible"),k.style.backgroundColor="",k.style.cursor="",F.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(k,
+"dragover",mxUtils.bind(this,function(b){k.style.backgroundColor="#f1f3f4";b.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(b){k.style.cursor="";k.style.backgroundColor="";0<b.dataTransfer.files.length&&this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,e,g,m,n,q,p,u,v){if(null!=d&&"image/"==e.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
+this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,n,q),d)],d[0].vertex=!0,J(d,new mxRectangle(0,0,n,q),b,mxEvent.isAltDown(b)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null);else{var t=!1,x=mxUtils.bind(this,function(d,e){if(null!=d&&"application/pdf"==e){var g=Editor.extractGraphModelFromPdf(d);null!=g&&0<g.length&&(d=g)}if(null!=d)if(g=mxUtils.parseXml(d),"mxlibrary"==g.documentElement.nodeName)try{var m=
+JSON.parse(mxUtils.getTextContent(g.documentElement));l(m,k);c=c.concat(m);H(b);this.spinner.stop();t=!0}catch(V){}else if("mxfile"==g.documentElement.nodeName)try{for(var n=g.documentElement.getElementsByTagName("diagram"),m=0;m<n.length;m++){var q=this.stringToCells(Editor.getDiagramNodeXml(n[m])),p=this.editor.graph.getBoundingBoxFromGeometry(q);J(q,new mxRectangle(0,0,p.width,p.height),b)}t=!0}catch(V){null!=window.console&&console.log("error in drop handler:",V)}t||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
+null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null)});null!=v&&null!=p&&(/(\.v(dx|sdx?))($|\?)/i.test(p)||/(\.vs(x|sx?))($|\?)/i.test(p))?this.importVisio(v,function(b){x(b,"text/xml")},null,p):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,p)&&null!=v?this.parseFile(v,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?x(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?
+"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):x(d,e)}}));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"dragleave",function(b){k.style.cursor="";k.style.backgroundColor="";b.stopPropagation();b.preventDefault()}));t=t.cloneNode(!1);t.setAttribute("src",Editor.editImage);t.setAttribute("title",mxResources.get("edit"));p.insertBefore(t,p.firstChild);mxEvent.addListener(t,"click",L);mxEvent.addListener(k,"dblclick",function(b){mxEvent.getSource(b)==
+k&&L(b)});g=t.cloneNode(!1);g.setAttribute("src",Editor.plusImage);g.setAttribute("title",mxResources.get("add"));p.insertBefore(g,p.firstChild);mxEvent.addListener(g,"click",B);this.isOffline()||".scratchpad"!=b.title||null==EditorUi.scratchpadHelpLink||(g=document.createElement("span"),g.setAttribute("title",mxResources.get("help")),g.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(g,"?"),mxEvent.addGestureListeners(g,mxUtils.bind(this,function(b){this.openLink(EditorUi.scratchpadHelpLink);
+mxEvent.consume(b)})),p.insertBefore(g,p.firstChild))}m.appendChild(p);m.style.paddingRight=18*p.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(b,c){for(var d=0;d<b.length;d++){var e=b[d],f=e.data;if(null!=f){var f=this.convertDataUri(f),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+f,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(f=this.stringToCells(Graph.decompress(e.xml)),
+0<f.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(f,e.w,e.h,e.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(b){return null!=b?b[mxLanguage]||b.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",
+Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=
+"#2a2a2a",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";"1"==urlParams.sketch&&(Graph.zoomWheel=!0,Graph.prototype.defaultVertexStyle={pointerEvents:"0",hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",
+orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},"0"!=urlParams.rough&&(Graph.prototype.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,Graph.prototype.defaultVertexStyle.fontSource=Editor.sketchFontSource,Graph.prototype.defaultVertexStyle.fontSize="20",Graph.prototype.defaultVertexStyle.sketch="1",Graph.prototype.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,Graph.prototype.defaultEdgeStyle.fontSource=Editor.sketchFontSource,
+Graph.prototype.defaultEdgeStyle.fontSize="20",Graph.prototype.defaultEdgeStyle.sketch="1",Menus.prototype.defaultFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)},{fontFamily:"Rock Salt",fontUrl:"https://fonts.googleapis.com/css?family=Rock+Salt"},{fontFamily:"Permanent Marker",fontUrl:"https://fonts.googleapis.com/css?family=Permanent+Marker"}].concat(Menus.prototype.defaultFonts)),Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",
+Graph.prototype.defaultGridEnabled=!1,Graph.prototype.defaultPageVisible=!1,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(b,c,e,g,k){b=new ImageDialog(this,b,c,e,g,k);this.showDialog(b.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);b.init()};EditorUi.prototype.showBackgroundImageDialog=function(b,c){b=null!=b?b:mxUtils.bind(this,function(b,d){if(!d){var c=new ChangePageSetup(this,
+null,b);c.ignoreColor=!0;this.editor.graph.model.execute(c)}});var d=new BackgroundImageDialog(this,b,c);this.showDialog(d.container,360,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(b,c,e,g,k){b=new LibraryDialog(this,b,c,e,g,k);this.showDialog(b.container,640,440,!0,!1,mxUtils.bind(this,function(b){b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));b.init()};var e=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(b){var d=e.apply(this,
+arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(b){this.editor.graph.isSelectionEmpty()&&d.refresh()}));return d};EditorUi.prototype.createSidebarFooterContainer=function(){var b=this.createDiv("geSidebarContainer geSidebarFooter");b.style.position="absolute";b.style.overflow="hidden";var c=document.createElement("a");c.className="geTitle";c.style.color="#DF6C0C";c.style.fontWeight="bold";c.style.height="100%";c.style.paddingTop="9px";c.innerHTML="<span>+</span>";
+var e=c.getElementsByTagName("span")[0];e.style.fontSize="18px";e.style.marginRight="5px";mxUtils.write(c,mxResources.get("moreShapes")+"...");mxEvent.addListener(c,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}));mxEvent.addListener(c,"click",mxUtils.bind(this,function(b){this.actions.get("shapes").funct();mxEvent.consume(b)}));b.appendChild(c);return b};EditorUi.prototype.handleError=function(b,c,e,g,k,n,p){var d=null!=this.spinner&&null!=this.spinner.pause?
+this.spinner.pause():function(){},f=null!=b&&null!=b.error?b.error:b;if(null!=b&&null!=b.stack&&null!=b.message)try{p?null!=window.console&&console.error("EditorUi.handleError:",b):EditorUi.logError("Caught: "+(""==b.message&&null!=b.name)?b.name:b.message,b.filename,b.lineNumber,b.columnNumber,b,"INFO")}catch(I){}if(null!=f||null!=c){p=mxUtils.htmlEntities(mxResources.get("unknownError"));var l=mxResources.get("ok"),m=null;c=null!=c?c:mxResources.get("error");if(null!=f){null!=f.retry&&(l=mxResources.get("cancel"),
+m=function(){d();f.retry()});if(404==f.code||404==f.status||403==f.code){p=403==f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=k?k:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var q=null!=k?null:null!=n?n:window.location.hash;if(null!=q&&("#G"==q.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==
+q.substring(0,45))&&(null!=b&&null!=b.error&&(null!=b.error.errors&&0<b.error.errors.length&&"fileAccess"==b.error.errors[0].reason||null!=b.error.data&&0<b.error.data.length&&"fileAccess"==b.error.data[0].reason)||404==f.code||404==f.status)){q="#U"==q.substring(0,2)?q.substring(45,q.lastIndexOf("%26ex")):q.substring(2);this.showError(c,p,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+q);this.handleError(b,c,e,g,k)}),
+m,mxResources.get("changeUser"),mxUtils.bind(this,function(){function b(){f.innerHTML="";for(var b=0;b<d.length;b++){var c=document.createElement("option");mxUtils.write(c,d[b].displayName);c.value=b;f.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(c,"<"+d[b].email+">");c.setAttribute("disabled","disabled");f.appendChild(c)}c=document.createElement("option");mxUtils.write(c,mxResources.get("addAccount"));c.value=d.length;f.appendChild(c)}var d=this.drive.getUsersList(),
+c=document.createElement("div"),e=document.createElement("span");e.style.marginTop="6px";mxUtils.write(e,mxResources.get("changeUser")+": ");c.appendChild(e);var f=document.createElement("select");f.style.width="200px";b();mxEvent.addListener(f,"change",mxUtils.bind(this,function(){var c=f.value,e=d.length!=c;e&&this.drive.setUser(d[c]);this.drive.authorize(e,mxUtils.bind(this,function(){e||(d=this.drive.getUsersList(),b())}),mxUtils.bind(this,function(b){this.handleError(b)}),!0)}));c.appendChild(f);
+c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(c.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=e&&e()}),480,150);return}}null!=f.message?p=""==f.message&&null!=f.name?mxUtils.htmlEntities(f.name):mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?p=mxUtils.htmlEntities(f.response.error):"undefined"!==typeof window.App&&(f.code==App.ERROR_TIMEOUT?
+p=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?p=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof f&&0<f.length&&(p=mxUtils.htmlEntities(f)))}var u=n=null;null!=f&&null!=f.helpLink&&(n=mxResources.get("help"),u=mxUtils.bind(this,function(){return this.editor.graph.openLink(f.helpLink)}));this.showError(c,p,l,e,m,null,null,n,u,null,null,null,g?e:null)}else null!=e&&e()};EditorUi.prototype.alert=function(b,c,e){b=new ErrorDialog(this,null,b,mxResources.get("ok"),
+c);this.showDialog(b.container,e||340,100,!0,!1);b.init()};EditorUi.prototype.confirm=function(b,c,e,g,k,n){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=Math.min(200,28*Math.ceil(b.length/50));b=new ConfirmDialog(this,b,function(){d();null!=c&&c()},function(){d();null!=e&&e()},g,k,null,null,null,null,f);this.showDialog(b.container,340,46+f,!0,n);b.init()};EditorUi.prototype.showBanner=function(b,c,e,g){var d=!1;if(!(this.bannerShowing||this["hideBanner"+b]||
+isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+b])){var f=document.createElement("div");f.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(f.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(f.style,"transition",
+"all 1s ease");f.className="geBtn gePrimaryBtn";d=document.createElement("img");d.setAttribute("src",IMAGE_PATH+"/logo.png");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";f.appendChild(d);d=document.createElement("img");d.setAttribute("src",Dialog.prototype.closeImage);d.setAttribute("title",mxResources.get(g?"doNotShowAgain":"close"));d.setAttribute("border","0");d.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
+f.appendChild(d);mxUtils.write(f,c);document.body.appendChild(f);this.bannerShowing=!0;c=document.createElement("div");c.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var l=document.createElement("input");l.setAttribute("type","checkbox");l.setAttribute("id","geDoNotShowAgainCheckbox");l.style.marginRight="6px";if(!g){c.appendChild(l);var k=document.createElement("label");k.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(k,mxResources.get("doNotShowAgain"));c.appendChild(k);
+f.style.paddingBottom="30px";f.appendChild(c)}var m=mxUtils.bind(this,function(){null!=f.parentNode&&(f.parentNode.removeChild(f),this.bannerShowing=!1,l.checked||g)&&(this["hideBanner"+b]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+b]=Date.now(),mxSettings.save()))});mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);m()}));var p=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
+function(){m()}),1E3)});mxEvent.addListener(f,"click",mxUtils.bind(this,function(b){var d=mxEvent.getSource(b);d!=l&&d!=k?(null!=e&&e(),m(),mxEvent.consume(b)):p()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(p,3E4);d=!0}return d};EditorUi.prototype.setCurrentFile=function(b){null!=b&&(b.opened=new Date);this.currentFile=b};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
+function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(b,c,e,g){b=b.toDataURL("image/"+e);if(null!=b&&6<b.length)null!=c&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(c))),0<g&&(b=Editor.writeGraphModelToPng(b,"pHYs","dpi",g));else throw{message:mxResources.get("unknownError")};return b};EditorUi.prototype.saveCanvas=function(b,c,e,g,k){var d="jpeg"==e?"jpg":e;g=this.getBaseFilename(g)+(null!=c?".drawio":"")+"."+d;b=this.createImageDataUri(b,
+c,e,k);this.saveData(g,d,b.substring(b.lastIndexOf(",")+1),"image/"+e,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(b,c){var d=new TextareaDialog(this,b,c,null,null,mxResources.get("close"));d.textarea.style.width="600px";
+d.textarea.style.height="380px";this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(b,c,e,g,k,n){"text/xml"!=e||/(\.drawio)$/i.test(c)||/(\.xml)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.html)$/i.test(c)||(c=c+"."+(null!=n?n:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)b=g?this.base64ToBlob(b,e):new Blob([b],{type:e}),navigator.msSaveOrOpenBlob(b,c);else if(mxClient.IS_IE)e=window.open("about:blank",
+"_blank"),null==e?mxUtils.popup(b,!0):(e.document.write(b),e.document.close(),e.document.execCommand("SaveAs",!0,c),e.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==e||"image/"!=e.substring(0,6)?this.showTextDialog(c+":",b):this.openInNewWindow(b,e,g);else{var d=document.createElement("a");n=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof d.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var f=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
+n=65==(f?parseInt(f[2],10):!1)?!1:n}if(n||this.isOffline()){d.href=URL.createObjectURL(g?this.base64ToBlob(b,e):new Blob([b],{type:e}));n?d.download=c:d.setAttribute("target","_blank");document.body.appendChild(d);try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},2E4),d.click(),d.parentNode.removeChild(d)}catch(y){}}else this.createEchoRequest(b,c,e,g,k).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(b,c,e,g,k,n){b="xml="+encodeURIComponent(b);return new mxXmlRequest(SAVE_URL,
+b+(null!=e?"&mime="+e:"")+(null!=k?"&format="+k:"")+(null!=n?"&base64="+n:"")+(null!=c?"&filename="+encodeURIComponent(c):"")+(g?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(b,c){c=c||"";for(var d=atob(b),e=d.length,f=Math.ceil(e/1024),g=Array(f),k=0;k<f;++k){for(var p=1024*k,t=Math.min(p+1024,e),x=Array(t-p),E=0;p<t;++E,++p)x[E]=d[p].charCodeAt(0);g[k]=new Uint8Array(x)}return new Blob(g,{type:c})};EditorUi.prototype.saveLocalFile=function(b,c,e,g,k,n,p,t){n=null!=n?n:!1;p=null!=p?
+p:"vsdx"!=k&&(!mxClient.IS_IOS||!navigator.standalone);k=this.getServiceCount(n);isLocalStorage&&k++;var d=4>=k?2:6<k?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(d,c){try{if("_blank"==c)if(null!=e&&"image/"==e.substring(0,6))this.openInNewWindow(b,e,g);else if(null!=e&&"text/html"==e.substring(0,9)){var f=new EmbedDialog(this,b);this.showDialog(f.container,440,240,!0,!0);f.init()}else{var l=window.open("about:blank");null==l?mxUtils.popup(b,!0):(l.document.write("<pre>"+mxUtils.htmlEntities(b,
+!1)+"</pre>"),l.document.close())}else c==App.MODE_DEVICE||"download"==c?this.doSaveLocalFile(b,d,e,g,null,t):null!=d&&0<d.length&&this.pickFolder(c,mxUtils.bind(this,function(f){try{this.exportFile(b,d,e,g,c,f)}catch(L){this.handleError(L)}}))}catch(I){this.handleError(I)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,n,p,null,1<k,d,b,e,g);n=this.isServices(k)?k>d?390:270:160;this.showDialog(c.container,400,n,!0,!0);c.init()};EditorUi.prototype.openInNewWindow=
+function(b,c,e){var d=window.open("about:blank");null==d||null==d.document?mxUtils.popup(b,!0):("image/svg+xml"!=c||mxClient.IS_SVG?"image/svg+xml"==c?d.document.write("<html>"+b+"</html>"):(b=e?b:btoa(unescape(encodeURIComponent(b))),d.document.write('<html><img style="max-width:100%;" src="data:'+c+";base64,"+b+'"/></html>')):d.document.write("<html><pre>"+mxUtils.htmlEntities(b,!1)+"</pre></html>"),d.document.close())};var k=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=
+function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(b){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var d=b(mxUtils.bind(this,function(b){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position=
+"",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,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 c=d.getBoundingClientRect();this.tagsDialog.style.left=c.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=c.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(b)}),
+Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var b=this.editor.graph.getAllTags();d.style.display=0<b.length?"":"none"}));k.apply(this,arguments)}this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&
+(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),
+this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var c=b(mxUtils.bind(this,function(b){var d=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",d);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)d.apply(this);
+else{this.exportDialog=document.createElement("div");var e=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=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=e.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";e=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=e.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,
+function(b){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(b,null,"png");b=document.createElement("img");b.style.maxWidth="140px";b.style.maxHeight="140px";b.style.cursor="pointer";b.style.backgroundColor="white";b.setAttribute("title",mxResources.get("openInNewWindow"));b.setAttribute("border","0");b.setAttribute("src",c);this.exportDialog.appendChild(b);mxEvent.addListener(b,"click",mxUtils.bind(this,
+function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);d.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",d);document.body.appendChild(this.exportDialog)}mxEvent.consume(b)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(b,c,e,g,k){this.isLocalFileSave()?
+this.saveLocalFile(e,b,g,k,c):this.saveRequest(b,c,mxUtils.bind(this,function(b,d){return this.createEchoRequest(e,b,g,k,c,d)}),e,k,g)};EditorUi.prototype.saveRequest=function(b,c,e,g,k,n,p){p=null!=p?p:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);isLocalStorage&&d++;var f=4>=d?2:6<d?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,d){if("_blank"==d||null!=b&&0<b.length){var f=e("_blank"==d?null:b,d==App.MODE_DEVICE||"download"==d||null==d||"_blank"==d?"0":"1");
+null!=f&&(d==App.MODE_DEVICE||"download"==d||"_blank"==d?f.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(e){n=null!=n?n:"pdf"==c?"application/pdf":"image/"+c;if(null!=g)try{this.exportFile(g,b,n,!0,d,e)}catch(I){this.handleError(I)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),b,n,!0,d,e)}catch(I){this.handleError(I)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
+function(b){this.spinner.stop();this.handleError(b)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,p,null,1<d,f,g,n,k);d=this.isServices(d)?4<d?390:270:160;this.showDialog(b.container,380,d,!0,!0);b.init()};EditorUi.prototype.isServices=function(b){return 1!=b};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(b,c,e,g,k,n){};EditorUi.prototype.pickFolder=function(b,
+c,e){c(null)};EditorUi.prototype.exportSvg=function(b,c,e,g,k,n,p,t,y,x,E,C){if(this.spinner.spin(document.body,mxResources.get("export")))try{var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;var f=c?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==c&&(f=E?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var l=this.editor.graph.getSvg(f,b,p,t,null,e,null,null,"blank"==x?"_blank":"self"==x?"_top":null,null,!0,E,C);g&&this.editor.graph.addSvgShadow(l);var m=
+this.getBaseFilename()+(k?".drawio":"")+".svg",q=mxUtils.bind(this,function(b){this.spinner.stop();k&&b.setAttribute("content",this.getFileData(!0,null,null,null,e,y,null,null,null,!1));var d=Graph.xmlDeclaration+"\n"+(k?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(b);this.isLocalFileSave()||d.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",d,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}))});
+this.editor.addFontCss(l);this.editor.graph.mathEnabled&&this.editor.addMathCss(l);n?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(l,q,this.thumbImageCache)):q(l)}catch(B){this.handleError(B)}};EditorUi.prototype.addRadiobox=function(b,c,e,g,k,n,p){return this.addCheckbox(b,e,g,k,n,p,!0,c)};EditorUi.prototype.addCheckbox=function(b,c,e,g,k,n,p,t){n=null!=n?n:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type",
+p?"radio":"checkbox");p="geCheckbox-"+Editor.guid();d.id=p;null!=t&&d.setAttribute("name",t);e&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);g&&d.setAttribute("disabled","disabled");n&&(b.appendChild(d),e=document.createElement("label"),mxUtils.write(e,c),e.setAttribute("for",p),b.appendChild(e),k||mxUtils.br(b));return d};EditorUi.prototype.addEditButton=function(b,c){var d=this.addCheckbox(b,mxResources.get("edit")+":",!0,null,!0);d.style.marginLeft="24px";var e=this.getCurrentFile(),
+f="";null!=e&&e.getMode()!=App.MODE_DEVICE&&e.getMode()!=App.MODE_BROWSER&&(f=window.location.href);var g=document.createElement("select");g.style.width="120px";g.style.marginLeft="8px";g.style.marginRight="10px";g.className="geBtn";e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("makeCopy"));g.appendChild(e);e=document.createElement("option");e.setAttribute("value","custom");mxUtils.write(e,mxResources.get("custom")+"...");g.appendChild(e);b.appendChild(g);
+mxEvent.addListener(g,"change",mxUtils.bind(this,function(){if("custom"==g.value){var b=new FilenameDialog(this,f,mxResources.get("ok"),function(b){null!=b?f=b:g.value="blank"},mxResources.get("url"),null,null,null,null,function(){g.value="blank"});this.showDialog(b.container,300,80,!0,!1);b.init()}}));mxEvent.addListener(d,"change",mxUtils.bind(this,function(){d.checked&&(null==c||c.checked)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")}));mxUtils.br(b);return{getLink:function(){return d.checked?
+"blank"===g.value?"_blank":f:null},getEditInput:function(){return d},getEditSelect:function(){return g}}};EditorUi.prototype.addLinkSection=function(b,c){function d(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=g&&g!=mxConstants.NONE?"border:1px solid black;background-color:"+g:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(b,mxResources.get("links")+":");var e=document.createElement("select");
e.style.width="100px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));e.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));e.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));e.appendChild(f);c&&
(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),e.appendChild(f));b.appendChild(e);mxUtils.write(b,mxResources.get("borderColor")+":");var g="#0000ff",k=null,k=mxUtils.button("",mxUtils.bind(this,function(b){this.pickColor(g||"none",function(b){g=b;d()});mxEvent.consume(b)}));d();k.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width=
"22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";b.appendChild(k);mxUtils.br(b);return{getColor:function(){return g},getTarget:function(){return e.value},focus:function(){e.focus()}}};EditorUi.prototype.createUrlParameters=function(b,c,e,g,k,n,p){p=null!=p?p:[];g&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||p.push("lightbox=1"),"auto"!=b&&p.push("target="+b),null!=c&&c!=mxConstants.NONE&&
p.push("highlight="+("#"==c.charAt(0)?c.substring(1):c)),null!=k&&0<k.length&&p.push("edit="+encodeURIComponent(k)),n&&p.push("layers=1"),this.editor.graph.foldingEnabled&&p.push("nav=1"));e&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&p.push("page-id="+this.currentPage.getId());return p};EditorUi.prototype.createLink=function(b,c,e,g,k,n,p,t,y,x){y=this.createUrlParameters(b,c,e,g,k,n,y);b=this.getCurrentFile();c=!0;null!=p?e="#U"+encodeURIComponent(p):(b=this.getCurrentFile(),
t||null==b||b.constructor!=window.DriveFile?e="#R"+encodeURIComponent(e?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(e="#"+b.getHash(),c=!1));c&&null!=b&&null!=b.getTitle()&&b.getTitle()!=this.defaultFilename&&y.push("title="+encodeURIComponent(b.getTitle()));x&&1<e.length&&(y.push("open="+e.substring(1)),e="");return(g&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
-EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<y.length?"?"+y.join("&"):"")+e};EditorUi.prototype.createHtml=function(b,c,e,g,k,n,p,t,y,x,G,C){this.getBasenames();var d={};""!=k&&k!=mxConstants.NONE&&(d.highlight=k);"auto"!==g&&(d.target=g);x||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;e=parseInt(e);isNaN(e)||100==e||(d.zoom=e/100);e=[];p&&(e.push("pages"),d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));c&&(e.push("zoom"),
-d.resize=!0);t&&e.push("layers");y&&e.push("tags");0<e.length&&(x&&e.push("lightbox"),d.toolbar=e.join(" "));null!=G&&0<G.length&&(d.edit=G);null!=b?d.url=b:d.xml=this.getFileData(!0,null,null,null,null,!p);c='<div class="mxgraph" style="'+(n?"max-width:100%;":"")+(""!=e?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';b=null!=b?"&fetch="+encodeURIComponent(b):"";C(c,'<script type="text/javascript" src="'+(0<b.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":
+EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<y.length?"?"+y.join("&"):"")+e};EditorUi.prototype.createHtml=function(b,c,e,g,k,n,p,t,y,x,E,C){this.getBasenames();var d={};""!=k&&k!=mxConstants.NONE&&(d.highlight=k);"auto"!==g&&(d.target=g);x||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;e=parseInt(e);isNaN(e)||100==e||(d.zoom=e/100);e=[];p&&(e.push("pages"),d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));c&&(e.push("zoom"),
+d.resize=!0);t&&e.push("layers");y&&e.push("tags");0<e.length&&(x&&e.push("lightbox"),d.toolbar=e.join(" "));null!=E&&0<E.length&&(d.edit=E);null!=b?d.url=b:d.xml=this.getFileData(!0,null,null,null,null,!p);c='<div class="mxgraph" style="'+(n?"max-width:100%;":"")+(""!=e?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';b=null!=b?"&fetch="+encodeURIComponent(b):"";C(c,'<script type="text/javascript" src="'+(0<b.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":
EditorUi.lightboxHost+"/embed2.js?")+b:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(b,c,e,g){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var l=
document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");l.appendChild(f);var m=document.createElement("span");mxUtils.write(m,mxResources.get("includeCopyOfMyDiagram"));l.appendChild(m);
mxUtils.br(l);l.appendChild(k);m=document.createElement("span");mxUtils.write(m,mxResources.get("publicDiagramUrl"));l.appendChild(m);var p=this.getCurrentFile();null==e&&null!=p&&p.constructor==window.DriveFile&&(m=document.createElement("a"),m.style.paddingLeft="12px",m.style.color="gray",m.style.cursor="pointer",mxUtils.write(m,mxResources.get("share")),l.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(p.getId())})));f.setAttribute("checked",
-"checked");null==e&&k.setAttribute("disabled","disabled");d.appendChild(l);var t=this.addLinkSection(d),C=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var E=document.createElement("input");E.setAttribute("type","text");E.style.marginRight="16px";E.style.width="60px";E.style.marginLeft="4px";E.style.marginRight="12px";E.value="100%";d.appendChild(E);var J=this.addCheckbox(d,mxResources.get("fit"),!0),l=null!=this.pages&&1<this.pages.length,L=L=this.addCheckbox(d,mxResources.get("allPages"),
-l,!l),H=this.addCheckbox(d,mxResources.get("layers"),!0),K=this.addCheckbox(d,mxResources.get("tags"),!0),B=this.addCheckbox(d,mxResources.get("lightbox"),!0),M=this.addEditButton(d,B),P=M.getEditInput();P.style.marginBottom="16px";mxEvent.addListener(B,"change",function(){B.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled");P.checked&&B.checked?M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,
-mxUtils.bind(this,function(){g(k.checked?e:null,C.checked,E.value,t.getTarget(),t.getColor(),J.checked,L.checked,H.checked,K.checked,B.checked,M.getLink())}),null,b,c);this.showDialog(b.container,340,430,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(b,c,e,g,k,n){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,b||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
+"checked");null==e&&k.setAttribute("disabled","disabled");d.appendChild(l);var t=this.addLinkSection(d),C=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var F=document.createElement("input");F.setAttribute("type","text");F.style.marginRight="16px";F.style.width="60px";F.style.marginLeft="4px";F.style.marginRight="12px";F.value="100%";d.appendChild(F);var I=this.addCheckbox(d,mxResources.get("fit"),!0),l=null!=this.pages&&1<this.pages.length,L=L=this.addCheckbox(d,mxResources.get("allPages"),
+l,!l),H=this.addCheckbox(d,mxResources.get("layers"),!0),J=this.addCheckbox(d,mxResources.get("tags"),!0),B=this.addCheckbox(d,mxResources.get("lightbox"),!0),M=this.addEditButton(d,B),P=M.getEditInput();P.style.marginBottom="16px";mxEvent.addListener(B,"change",function(){B.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled");P.checked&&B.checked?M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,
+mxUtils.bind(this,function(){g(k.checked?e:null,C.checked,F.value,t.getTarget(),t.getColor(),I.checked,L.checked,H.checked,J.checked,B.checked,M.getLink())}),null,b,c);this.showDialog(b.container,340,430,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(b,c,e,g,k,n){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,b||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
d.appendChild(f);var l=this.getCurrentFile(),f="https://www.diagrams.net/doc/faq/publish-diagram-as-link";b=0;if(null!=l&&l.constructor==window.DriveFile&&!c){b=80;var f="https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram",m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var p=document.createElement("div");p.style.whiteSpace="normal";mxUtils.write(p,mxResources.get("linkAccountRequired"));
m.appendChild(p);p=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));p.style.marginTop="12px";p.className="geBtn";m.appendChild(p);d.appendChild(m);p=document.createElement("a");p.style.paddingLeft="12px";p.style.color="gray";p.style.fontSize="11px";p.style.cursor="pointer";mxUtils.write(p,mxResources.get("check"));m.appendChild(p);mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&
this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(b){this.spinner.stop();b=new ErrorDialog(this,null,mxResources.get(null!=b?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(b.container,300,80,!0,!1);b.init()}))}))}var q=null,t=null;if(null!=e||null!=g)b+=30,mxUtils.write(d,mxResources.get("width")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.marginRight="16px",q.style.width="50px",q.style.marginLeft="6px",q.style.marginRight=
-"16px",q.style.marginBottom="10px",q.value="100%",d.appendChild(q),mxUtils.write(d,mxResources.get("height")+":"),t=document.createElement("input"),t.setAttribute("type","text"),t.style.width="50px",t.style.marginLeft="6px",t.style.marginBottom="10px",t.value=g+"px",d.appendChild(t),mxUtils.br(d);var J=this.addLinkSection(d,n);e=null!=this.pages&&1<this.pages.length;var L=null;if(null==l||l.constructor!=window.DriveFile||c)L=this.addCheckbox(d,mxResources.get("allPages"),e,!e);var H=this.addCheckbox(d,
-mxResources.get("lightbox"),!0,null,null,!n),K=this.addEditButton(d,H),B=K.getEditInput();n&&(B.style.marginLeft=H.style.marginLeft,H.style.display="none",b-=20);var M=this.addCheckbox(d,mxResources.get("layers"),!0);M.style.marginLeft=B.style.marginLeft;M.style.marginTop="8px";var P=this.addCheckbox(d,mxResources.get("tags"),!0);P.style.marginLeft=B.style.marginLeft;P.style.marginBottom="16px";P.style.marginTop="16px";mxEvent.addListener(H,"change",function(){H.checked?(M.removeAttribute("disabled"),
-B.removeAttribute("disabled")):(M.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"));B.checked&&H.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){k(J.getTarget(),J.getColor(),null==L?!0:L.checked,H.checked,K.getLink(),M.checked,null!=q?q.value:null,null!=t?t.value:null,P.checked)}),null,mxResources.get("create"),f);this.showDialog(c.container,340,300+b,!0,!0);
-null!=q?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)):J.focus()};EditorUi.prototype.showRemoteExportDialog=function(b,c,e,g,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(k?"10":"4")+"px";d.appendChild(f);if(k){mxUtils.write(d,mxResources.get("zoom")+
+"16px",q.style.marginBottom="10px",q.value="100%",d.appendChild(q),mxUtils.write(d,mxResources.get("height")+":"),t=document.createElement("input"),t.setAttribute("type","text"),t.style.width="50px",t.style.marginLeft="6px",t.style.marginBottom="10px",t.value=g+"px",d.appendChild(t),mxUtils.br(d);var I=this.addLinkSection(d,n);e=null!=this.pages&&1<this.pages.length;var L=null;if(null==l||l.constructor!=window.DriveFile||c)L=this.addCheckbox(d,mxResources.get("allPages"),e,!e);var H=this.addCheckbox(d,
+mxResources.get("lightbox"),!0,null,null,!n),J=this.addEditButton(d,H),B=J.getEditInput();n&&(B.style.marginLeft=H.style.marginLeft,H.style.display="none",b-=20);var M=this.addCheckbox(d,mxResources.get("layers"),!0);M.style.marginLeft=B.style.marginLeft;M.style.marginTop="8px";var P=this.addCheckbox(d,mxResources.get("tags"),!0);P.style.marginLeft=B.style.marginLeft;P.style.marginBottom="16px";P.style.marginTop="16px";mxEvent.addListener(H,"change",function(){H.checked?(M.removeAttribute("disabled"),
+B.removeAttribute("disabled")):(M.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"));B.checked&&H.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){k(I.getTarget(),I.getColor(),null==L?!0:L.checked,H.checked,J.getLink(),M.checked,null!=q?q.value:null,null!=t?t.value:null,P.checked)}),null,mxResources.get("create"),f);this.showDialog(c.container,340,300+b,!0,!0);
+null!=q?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)):I.focus()};EditorUi.prototype.showRemoteExportDialog=function(b,c,e,g,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(k?"10":"4")+"px";d.appendChild(f);if(k){mxUtils.write(d,mxResources.get("zoom")+
":");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginRight="16px";l.style.width="60px";l.style.marginLeft="4px";l.style.marginRight="12px";l.value=this.lastExportZoom||"100%";d.appendChild(l);mxUtils.write(d,mxResources.get("borderWidth")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.value=this.lastExportBorder||"0";d.appendChild(m);mxUtils.br(d)}var p=this.addCheckbox(d,
mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),q=g?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),f=this.editor.graph,t=g?null:this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=t&&(t.style.marginBottom="16px");b=new CustomDialog(this,d,mxUtils.bind(this,function(){var b=parseInt(l.value)/100||1,d=parseInt(m.value)||0;e(!p.checked,null!=q?q.checked:!1,null!=
t?t.checked:!1,b,d)}),null,b,c);this.showDialog(b.container,300,(k?25:0)+(g?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(b,c,e,g,k,n,p,t,y){p=null!=p?p:Editor.defaultIncludeDiagram;var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph,l="jpeg"==t?220:300,m=document.createElement("h3");mxUtils.write(m,b);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";d.appendChild(m);mxUtils.write(d,mxResources.get("zoom")+":");var q=
document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value=this.lastExportZoom||"100%";d.appendChild(q);mxUtils.write(d,mxResources.get("borderWidth")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.value=this.lastExportBorder||"0";d.appendChild(v);mxUtils.br(d);var u=this.addCheckbox(d,mxResources.get("selectionOnly"),
-!1,f.isSelectionEmpty()),K=document.createElement("input");K.style.marginTop="16px";K.style.marginRight="8px";K.style.marginLeft="24px";K.setAttribute("disabled","disabled");K.setAttribute("type","checkbox");var B=document.createElement("select");B.style.marginTop="16px";B.style.marginLeft="8px";b=["selectionOnly","diagram","page"];for(m=0;m<b.length;m++)if(!f.isSelectionEmpty()||"selectionOnly"!=b[m]){var M=document.createElement("option");mxUtils.write(M,mxResources.get(b[m]));M.setAttribute("value",
-b[m]);B.appendChild(M)}y?(mxUtils.write(d,mxResources.get("size")+":"),d.appendChild(B),mxUtils.br(d),l+=26,mxEvent.addListener(B,"change",function(){"selectionOnly"==B.value&&(u.checked=!0)})):n&&(d.appendChild(K),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),l+=30,mxEvent.addListener(u,"change",function(){u.checked?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled")}));f.isSelectionEmpty()?y&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display=
-"none",l-=30):(B.value="diagram",K.setAttribute("checked","checked"),K.defaultChecked=!0,mxEvent.addListener(u,"change",function(){B.value=u.checked?"selectionOnly":"diagram"}));var P=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=t),T=null;Editor.isDarkMode()&&(T=this.addCheckbox(d,mxResources.get("dark"),!0),l+=26);var N=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible),R=document.createElement("input");R.style.marginTop="16px";R.style.marginRight="8px";
-R.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||R.setAttribute("disabled","disabled");c&&(d.appendChild(R),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),l+=30);var F=null;if("png"==t||"jpeg"==t)F=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),l+=30;var D=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),p,null,null,"jpeg"!=t);D.style.marginBottom="16px";var A=document.createElement("select");A.style.maxWidth=
+!1,f.isSelectionEmpty()),J=document.createElement("input");J.style.marginTop="16px";J.style.marginRight="8px";J.style.marginLeft="24px";J.setAttribute("disabled","disabled");J.setAttribute("type","checkbox");var B=document.createElement("select");B.style.marginTop="16px";B.style.marginLeft="8px";b=["selectionOnly","diagram","page"];for(m=0;m<b.length;m++)if(!f.isSelectionEmpty()||"selectionOnly"!=b[m]){var M=document.createElement("option");mxUtils.write(M,mxResources.get(b[m]));M.setAttribute("value",
+b[m]);B.appendChild(M)}y?(mxUtils.write(d,mxResources.get("size")+":"),d.appendChild(B),mxUtils.br(d),l+=26,mxEvent.addListener(B,"change",function(){"selectionOnly"==B.value&&(u.checked=!0)})):n&&(d.appendChild(J),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),l+=30,mxEvent.addListener(u,"change",function(){u.checked?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")}));f.isSelectionEmpty()?y&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display=
+"none",l-=30):(B.value="diagram",J.setAttribute("checked","checked"),J.defaultChecked=!0,mxEvent.addListener(u,"change",function(){B.value=u.checked?"selectionOnly":"diagram"}));var P=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=t),T=null;Editor.isDarkMode()&&(T=this.addCheckbox(d,mxResources.get("dark"),!0),l+=26);var N=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible),R=document.createElement("input");R.style.marginTop="16px";R.style.marginRight="8px";
+R.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||R.setAttribute("disabled","disabled");c&&(d.appendChild(R),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),l+=30);var G=null;if("png"==t||"jpeg"==t)G=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),l+=30;var D=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),p,null,null,"jpeg"!=t);D.style.marginBottom="16px";var A=document.createElement("select");A.style.maxWidth=
"260px";A.style.marginLeft="8px";A.style.marginRight="10px";A.className="geBtn";c=document.createElement("option");c.setAttribute("value","auto");mxUtils.write(c,mxResources.get("automatic"));A.appendChild(c);c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("openInNewWindow"));A.appendChild(c);c=document.createElement("option");c.setAttribute("value","self");mxUtils.write(c,mxResources.get("openInThisWindow"));A.appendChild(c);"svg"==t&&(mxUtils.write(d,
-mxResources.get("links")+":"),d.appendChild(A),mxUtils.br(d),mxUtils.br(d),l+=50);e=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=v.value;this.lastExportZoom=q.value;k(q.value,P.checked,!u.checked,N.checked,D.checked,R.checked,v.value,K.checked,!1,A.value,null!=F?F.checked:null,null!=T?T.checked:null,B.value)}),null,e,g);this.showDialog(e.container,340,l,!0,!0,null,null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",
+mxResources.get("links")+":"),d.appendChild(A),mxUtils.br(d),mxUtils.br(d),l+=50);e=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=v.value;this.lastExportZoom=q.value;k(q.value,P.checked,!u.checked,N.checked,D.checked,R.checked,v.value,J.checked,!1,A.value,null!=G?G.checked:null,null!=T?T.checked:null,B.value)}),null,e,g);this.showDialog(e.container,340,l,!0,!0,null,null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",
!1,null)};EditorUi.prototype.showEmbedImageDialog=function(b,c,e,g,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=c){var l=document.createElement("h3");mxUtils.write(l,c);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(l)}var m=this.addCheckbox(d,mxResources.get("fit"),!0),p=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible&&g,!g),q=this.addCheckbox(d,e),t=this.addCheckbox(d,mxResources.get("lightbox"),
-!0),E=this.addEditButton(d,t),J=E.getEditInput(),L=1<f.model.getChildCount(f.model.getRoot()),H=this.addCheckbox(d,mxResources.get("layers"),L,!L);H.style.marginLeft=J.style.marginLeft;H.style.marginBottom="12px";H.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(L&&H.removeAttribute("disabled"),J.removeAttribute("disabled")):(H.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"));J.checked&&t.checked?E.getEditSelect().removeAttribute("disabled"):E.getEditSelect().setAttribute("disabled",
-"disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){b(m.checked,p.checked,q.checked,t.checked,E.getLink(),H.checked)}),null,mxResources.get("embed"),k);this.showDialog(c.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(b,c,e,g,k,n,p,t){function d(d){var c=" ",m="";g&&(c=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+!0),F=this.addEditButton(d,t),I=F.getEditInput(),L=1<f.model.getChildCount(f.model.getRoot()),H=this.addCheckbox(d,mxResources.get("layers"),L,!L);H.style.marginLeft=I.style.marginLeft;H.style.marginBottom="12px";H.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(L&&H.removeAttribute("disabled"),I.removeAttribute("disabled")):(H.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"));I.checked&&t.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled",
+"disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){b(m.checked,p.checked,q.checked,t.checked,F.getLink(),H.checked)}),null,mxResources.get("embed"),k);this.showDialog(c.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(b,c,e,g,k,n,p,t){function d(d){var c=" ",m="";g&&(c=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
EditorUi.lightboxHost+"/?client=1"+(null!=l?"&page="+l:"")+(k?"&edit=_blank":"")+(n?"&layers=1":"")+"');}})(this);\"",m+="cursor:pointer;");b&&(m+="max-width:100%;");var q="";e&&(q=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');p('<img src="'+d+'"'+q+(""!=m?' style="'+m+'"':"")+c+"/>")}var f=this.editor.graph.getGraphBounds(),l=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(b){var c=g?this.getFileData(!0):null;b=
this.createImageDataUri(b,c,"png");d(b)}),null,null,null,mxUtils.bind(this,function(b){t({message:mxResources.get("unknownError")})}),null,!0,e?2:1,null,c,null,null,Editor.defaultBorder);else if(c=this.getFileData(!0),f.width*f.height<=MAX_AREA&&c.length<=MAX_REQUEST_SIZE){var m="";e&&(m="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(g?"1":"0")+m+"&xml="+encodeURIComponent(c));q.send(mxUtils.bind(this,function(){200<=q.getStatus()&&
299>=q.getStatus()?d("data:image/png;base64,"+q.getText()):t({message:mxResources.get("unknownError")})}))}else t({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(b,c,e,g,k,n,p){var d=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!e),f=d.getElementsByTagName("a");if(null!=f)for(var l=0;l<f.length;l++){var m=f[l].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==f[l].getAttribute("target")&&f[l].removeAttribute("target")}g&&
@@ -3515,228 +3519,228 @@ Math.floor((new Date-b)/1E3);var d=Math.floor(b/31536E3);if(1<d)return d+" "+mxR
b;else if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram");if(0<e.length){var d=e[0],f=c.getGlobalVariable;c.getGlobalVariable=function(b){return"page"==b?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==b?1:f.apply(this,arguments)}}}null!=d&&(b=Editor.parseDiagramNode(d))}e=this.editor.graph;try{this.editor.graph=c,this.editor.setGraphXml(b)}catch(n){}finally{this.editor.graph=e}return b};EditorUi.prototype.getPngFileProperties=function(b){var d=1,c=0;if(null!=
b){if(b.hasAttribute("scale")){var e=parseFloat(b.getAttribute("scale"));!isNaN(e)&&0<e&&(d=e)}b.hasAttribute("border")&&(e=parseInt(b.getAttribute("border")),!isNaN(e)&&0<e&&(c=e))}return{scale:d,border:c}};EditorUi.prototype.getEmbeddedPng=function(b,c,e,g,k){try{var d=this.editor.graph,f=null!=d.themes&&"darkTheme"==d.defaultThemeName,l=null;if(null!=e&&0<e.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(e).documentElement,
!0),d),l=e;else if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),m=d.getGlobalVariable,p=this.pages[0];d.getGlobalVariable=function(b){return"page"==b?p.getName():"pagenumber"==b?1:m.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(p.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(e){try{null==l&&(l=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=e.toDataURL("image/png"),f=Editor.writeGraphModelToPng(f,
-"tEXt","mxfile",encodeURIComponent(l));b(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(E){null!=c&&c(E)}}),null,null,null,mxUtils.bind(this,function(b){null!=c&&c(b)}),null,null,g,null,d.shadowVisible,null,d,k)}catch(G){null!=c&&c(G)}};EditorUi.prototype.getEmbeddedSvg=function(b,c,e,g,k,n,p,t,y,x,G,C,E){t=null!=t?t:!0;p=null!=y?y:c.background;p==mxConstants.NONE&&(p=null);n=c.getSvg(p,x,G,null,null,n,null,null,null,c.shadowVisible||
-C,null,E);(c.shadowVisible||C)&&c.addSvgShadow(n);null!=b&&n.setAttribute("content",b);null!=e&&n.setAttribute("resource",e);if(null!=k)this.embedFonts(n,mxUtils.bind(this,function(b){t?this.editor.convertImages(b,mxUtils.bind(this,function(b){k((g?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(b))})):k((g?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
-mxUtils.getXml(b))}));else return(g?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(n)};EditorUi.prototype.embedFonts=function(b,c){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(b,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(d){try{null!=d&&this.editor.addFontCss(b,d),c(b)}catch(m){c(b)}}))}catch(l){c(b)}}))};
-EditorUi.prototype.exportImage=function(b,c,e,g,k,n,p,t,y,x,G,C,E){y=null!=y?y:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(b){this.spinner.stop();try{this.saveCanvas(b,k?this.getFileData(!0,null,null,null,e,t):null,y,null==this.pages||0==this.pages.length,G)}catch(H){this.handleError(H)}}),null,this.thumbImageCache,
-null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,e,b||1,c,g,null,null,n,p,x,C,E)}catch(L){this.spinner.stop(),this.handleError(L)}}};EditorUi.prototype.isCorsEnabledForUrl=function(b){return this.editor.isCorsEnabledForUrl(b)};EditorUi.prototype.importXml=function(b,c,e,g,k,n,p){c=null!=c?c:0;e=null!=e?e:0;var d=[];try{var f=this.editor.graph;if(null!=b&&0<b.length){f.model.beginUpdate();try{var l=mxUtils.parseXml(b);b={};var m=this.editor.extractGraphModel(l.documentElement,
-null!=this.pages);if(null!=m&&"mxfile"==m.nodeName&&null!=this.pages){var q=m.getElementsByTagName("diagram");if(1==q.length&&!n){if(m=Editor.parseDiagramNode(q[0]),null!=this.currentPage&&(b[q[0].getAttribute("id")]=this.currentPage.getId(),null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1]))){var t=q[0].getAttribute("name");null!=t&&""!=t&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,t))}}else if(0<
-q.length){n=[];var u=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(b[q[0].getAttribute("id")]=this.pages[0].getId(),m=Editor.parseDiagramNode(q[0]),g=!1,u=1);for(;u<q.length;u++){var L=q[u].getAttribute("id");q[u].removeAttribute("id");var H=this.updatePageRoot(new DiagramPage(q[u]));b[L]=q[u].getAttribute("id");var K=this.pages.length;null==H.getName()&&H.setName(mxResources.get("pageWithNumber",[K+1]));f.model.execute(new ChangePage(this,H,H,K,!0));n.push(H)}this.updatePageLinks(b,
-n)}}if(null!=m&&"mxGraphModel"===m.nodeName&&(d=f.importGraphModel(m,c,e,g),null!=d))for(u=0;u<d.length;u++)this.updatePageLinksForCell(b,d[u]);p&&this.insertHandler(d,null,null,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,!0,!0)}finally{f.model.endUpdate()}}}catch(B){if(k)throw B;this.handleError(B)}return d};EditorUi.prototype.updatePageLinks=function(b,c){for(var d=0;d<c.length;d++)this.updatePageLinksForCell(b,c[d].root)};EditorUi.prototype.updatePageLinksForCell=function(b,
-c){var d=document.createElement("div"),e=this.editor.graph,f=e.getLinkForCell(c);null!=f&&e.setLinkForCell(c,this.updatePageLink(b,f));if(e.isHtmlLabel(c)){d.innerHTML=e.sanitizeHtml(e.getLabel(c));for(var g=d.getElementsByTagName("a"),k=!1,p=0;p<g.length;p++)f=g[p].getAttribute("href"),null!=f&&(g[p].setAttribute("href",this.updatePageLink(b,f)),k=!0);k&&e.labelChanged(c,d.innerHTML)}for(p=0;p<e.model.getChildCount(c);p++)this.updatePageLinksForCell(b,e.model.getChildAt(c,p))};EditorUi.prototype.updatePageLink=
-function(b,c){if(Graph.isPageLink(c)){var d=b[c.substring(c.indexOf(",")+1)];c=null!=d?"data:page/id,"+d:null}else if("data:action/json,"==c.substring(0,17))try{var e=JSON.parse(c.substring(17));if(null!=e.actions){for(var f=0;f<e.actions.length;f++){var g=e.actions[f];if(null!=g.open&&Graph.isPageLink(g.open)){var k=g.open.substring(g.open.indexOf(",")+1),d=b[k];null!=d?g.open="data:page/id,"+d:null==this.getPageById(k)&&delete g.open}}c="data:action/json,"+JSON.stringify(e)}}catch(v){}return c};
-EditorUi.prototype.isRemoteVisioFormat=function(b){return/(\.v(sd|dx))($|\?)/i.test(b)||/(\.vs(s|x))($|\?)/i.test(b)};EditorUi.prototype.importVisio=function(b,c,e,g,k){g=null!=g?g:b.name;e=null!=e?e:mxUtils.bind(this,function(b){this.handleError(b)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var d=this.isRemoteVisioFormat(g);try{var f="UNKNOWN-VISIO",l=g.lastIndexOf(".");if(0<=l&&l<g.length)f=g.substring(l+1).toUpperCase();else{var m=g.lastIndexOf("/");0<=
-m&&m<g.length&&(g=g.substring(m+1))}EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+g,label:d?"remote":"local"})}catch(C){}if(d)if(null==VSD_CONVERT_URL||this.isOffline())e({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{d=new FormData;d.append("file1",b,g);var n=new XMLHttpRequest;n.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(g)?"?stencil=1":""));n.responseType="blob";this.addRemoteServiceSecurityCheck(n);
-null!=k&&n.setRequestHeader("x-convert-custom",k);n.onreadystatechange=mxUtils.bind(this,function(){if(4==n.readyState)if(200<=n.status&&299>=n.status)try{var b=n.response;if("text/xml"==b.type){var d=new FileReader;d.onload=mxUtils.bind(this,function(b){try{c(b.target.result)}catch(L){e({message:mxResources.get("errorLoadingFile")})}});d.readAsText(b)}else this.doImportVisio(b,c,e,g)}catch(J){e(J)}else try{""==n.responseType||"text"==n.responseType?e({message:n.responseText}):(d=new FileReader,d.onload=
-function(){e({message:JSON.parse(d.result).Message})},d.readAsText(n.response))}catch(J){e({})}});n.send(d)}else try{this.doImportVisio(b,c,e,g)}catch(C){e(C)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.importGraphML=function(b,c,e){e=null!=e?e:mxUtils.bind(this,function(b){this.handleError(b)});
-var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(b,c,e)}catch(q){e(q)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(b){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(b)||
-this.handleError({message:mxResources.get("unknownError")})}catch(l){this.handleError(l)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.convertLucidChart=function(b,c,e){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",
-action:"size_"+b.length}),EditorUi.debug("convertLucidChart",b)}catch(q){}try{c(LucidImporter.importState(JSON.parse(b)))}catch(q){null!=window.console&&console.error(q),e(q)}}else e({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",
-function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",d)})})})}):mxscript("js/extensions.min.js",d))};EditorUi.prototype.generateMermaidImage=function(b,c,e,g){var d=this,f=function(){try{this.loadingMermaid=!1,c=null!=c?c:EditorUi.defaultMermaidConfig,c.securityLevel="strict",c.startOnLoad=!1,mermaid.mermaidAPI.initialize(c),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),b,function(b){try{if(mxClient.IS_IE||mxClient.IS_IE11)b=
-b.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var c=mxUtils.parseXml(b).getElementsByTagName("svg");if(0<c.length){var f=parseFloat(c[0].getAttribute("width")),l=parseFloat(c[0].getAttribute("height"));if(isNaN(f)||isNaN(l))try{var k=c[0].getAttribute("viewBox").split(/\s+/),f=parseFloat(k[2]),l=parseFloat(k[3])}catch(C){f=f||100,l=l||100}e(d.convertDataUri(Editor.createSvgDataUri(b)),f,l)}else g({message:mxResources.get("invalidInput")})}catch(C){g(C)}})}catch(u){g(u)}};
-"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=function(b,c,e,g){function d(b,d,c){c1=b>>2;c2=(b&3)<<4|d>>4;c3=(d&15)<<2|c>>6;c4=c&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(b){if(10>b)return String.fromCharCode(48+b);b-=10;if(26>b)return String.fromCharCode(65+b);b-=26;if(26>b)return String.fromCharCode(97+
-b);b-=26;return 0==b?"-":1==b?"_":"?"}var l=new XMLHttpRequest;l.open("GET",("txt"==c?PLANT_URL+"/txt/":"png"==c?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(b){r="";for(i=0;i<b.length;i+=3)r=i+2==b.length?r+d(b.charCodeAt(i),b.charCodeAt(i+1),0):i+1==b.length?r+d(b.charCodeAt(i),0,0):r+d(b.charCodeAt(i),b.charCodeAt(i+1),b.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(b))),!0);"txt"!=c&&(l.responseType="blob");l.onload=function(b){if(200<=this.status&&300>this.status)if("txt"==
-c)e(this.response);else{var d=new FileReader;d.readAsDataURL(this.response);d.onloadend=function(b){var c=new Image;c.onload=function(){try{var b=c.width,f=c.height;if(0==b&&0==f){var l=d.result,k=l.indexOf(","),m=decodeURIComponent(escape(atob(l.substring(k+1)))),n=mxUtils.parseXml(m).getElementsByTagName("svg");0<n.length&&(b=parseFloat(n[0].getAttribute("width")),f=parseFloat(n[0].getAttribute("height")))}e(d.result,b,f)}catch(B){g(B)}};c.src=d.result};d.onerror=function(b){g(b)}}else g(b)};l.onerror=
-function(b){g(b)};l.send()};EditorUi.prototype.insertAsPreText=function(b,c,e){var d=this.editor.graph,f=null;d.getModel().beginUpdate();try{f=d.insertVertex(null,null,"<pre>"+b+"</pre>",c,e,1,1,"text;html=1;align=left;verticalAlign=top;"),d.updateCellSize(f,!0)}finally{d.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=function(b,c,e,g,k,n,p,t){n=null!=n?n:!0;p=null!=p?p:!0;if(null!=b)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b))this.parseFile(new Blob([b.replace(/\s+/g,
-" ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&this.editor.graph.setSelectionCells(this.insertTextAt(b.responseText,c,e,!0))}));else if("data:"==b.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b))){var d=this.editor.graph;if("data:application/pdf;base64,"==b.substring(0,28)){var f=Editor.extractGraphModelFromPdf(b);if(null!=f&&0<f.length)return this.importXml(f,c,e,n,!0,t)}if("data:image/png;base64,"==
-b.substring(0,22)&&(f=this.extractGraphModelFromPng(b),null!=f&&0<f.length))return this.importXml(f,c,e,n,!0,t);if("data:image/svg+xml;"==b.substring(0,19))try{f=null;"data:image/svg+xml;base64,"==b.substring(0,26)?(f=b.substring(b.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(b.substring(b.indexOf(",")+1));var l=this.importXml(f,c,e,n,!0,t);if(0<l.length)return l}catch(E){}this.loadImage(b,mxUtils.bind(this,function(f){if("data:"==b.substring(0,
-5))this.resizeImage(f,b,mxUtils.bind(this,function(b,f,g){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(c),d.snap(e),f,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(b)+";"))}),p,this.maxImageSize);else{var g=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)),l=Math.round(f.width*g);f=Math.round(f.height*g);d.setSelectionCell(d.insertVertex(null,null,"",d.snap(c),d.snap(e),
-l,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";"))}}),mxUtils.bind(this,function(){var f=null;d.getModel().beginUpdate();try{f=d.insertVertex(d.getDefaultParent(),null,b,d.snap(c),d.snap(e),1,1,"text;"+(g?"html=1;":"")),d.updateCellSize(f),d.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{d.getModel().endUpdate()}d.setSelectionCell(f)}))}else{b=Graph.zapGremlins(mxUtils.trim(b));if(this.isCompatibleString(b))return this.importXml(b,
-c,e,n,null,t);if(0<b.length)if(this.isLucidChartData(b))this.convertLucidChart(b,mxUtils.bind(this,function(b){this.editor.graph.setSelectionCells(this.importXml(b,c,e,n,null,t))}),mxUtils.bind(this,function(b){this.handleError(b)}));else{d=this.editor.graph;k=null;d.getModel().beginUpdate();try{k=d.insertVertex(d.getDefaultParent(),null,"",d.snap(c),d.snap(e),1,1,"text;whiteSpace=wrap;"+(g?"html=1;":""));d.fireEvent(new mxEventObject("textInserted","cells",[k]));"<"==b.charAt(0)&&b.indexOf(">")==
-b.length-1&&(b=mxUtils.htmlEntities(b));b.length>this.maxTextBytes&&(b=b.substring(0,this.maxTextBytes)+"...");k.value=b;d.updateCellSize(k);if(0<this.maxTextWidth&&k.geometry.width>this.maxTextWidth){var m=d.getPreferredSizeForCell(k,this.maxTextWidth);k.geometry.width=m.width;k.geometry.height=m.height}Graph.isLink(k.value)&&d.setLinkForCell(k,k.value);k.geometry.width+=d.gridSize;k.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[k]}}return[]};EditorUi.prototype.formatFileSize=
-function(b){var d=-1;do b/=1024,d++;while(1024<b);return Math.max(b,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[d]};EditorUi.prototype.convertDataUri=function(b){if("data:"==b.substring(0,5)){var d=b.indexOf(";");0<d&&(b=b.substring(0,d)+b.substring(b.indexOf(",",d+1)))}return b};EditorUi.prototype.isRemoteFileFormat=function(b,c){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(b)};EditorUi.prototype.isLucidChartData=function(b){return null!=b&&('{"state":"{\\"Properties\\":'==
-b.substring(0,26)||'{"Properties":'==b.substring(0,14))};EditorUi.prototype.importLocalFile=function(b,c){if(b&&Graph.fileSupport){if(null==this.importFileInputElt){var d=document.createElement("input");d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){null!=d.files&&(this.importFiles(d.files,null,null,this.maxImageSize),d.type="",d.type="file",d.value="")}));d.style.display="none";document.body.appendChild(d);this.importFileInputElt=d}this.importFileInputElt.click()}else{window.openNew=
-!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(b,d){StorageFile.listFiles(this,"F",b,d)});window.openBrowserFile=mxUtils.bind(this,function(b,d,c){StorageFile.getFileContent(this,b,d,c)});window.deleteBrowserFile=mxUtils.bind(this,function(b,d,c){StorageFile.deleteFile(this,b,d,c)});if(!c){var e=Editor.useLocalStorage;Editor.useLocalStorage=!b}window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));window.openFile.setConsumer(mxUtils.bind(this,
-function(b,d){if(null!=d&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(d)){var c=new Blob([b],{type:"application/octet-stream"});this.importVisio(c,mxUtils.bind(this,function(b){this.importXml(b,0,0,!0)}),null,d)}else this.editor.graph.setSelectionCells(this.importXml(b,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!c){var f=this.dialog,g=f.close;this.dialog.close=mxUtils.bind(this,
-function(b){Editor.useLocalStorage=e;g.apply(f,arguments);b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(b,c,e){var d=this,f=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(b).then(function(f){if(0==Object.keys(f.files).length)e();else{var g=0,l,k=!1;f.forEach(function(b,d){var f=d.name.toLowerCase();"diagram/diagram.xml"==f?(k=!0,d.async("string").then(function(b){0==b.indexOf("<mxfile ")?
-c(b):e()})):0==f.indexOf("versions/")&&(f=parseInt(f.substr(9)),f>g&&(g=f,l=d))});0<g?l.async("string").then(function(f){!d.isOffline()&&(new XMLHttpRequest).upload&&d.isRemoteFileFormat(f,b.name)?d.parseFile(new Blob([f],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?c(b.responseText):e())}),b.name):e()}):k||e()}},function(b){e(b)}):e()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=
-!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importFile=function(b,c,e,g,k,n,p,t,y,x,G,C){x=null!=x?x:!0;var d=!1,f=null,l=mxUtils.bind(this,function(b){var d=null;null!=b&&"<mxlibrary"==b.substring(0,10)?this.loadLibrary(new LocalLibrary(this,b,p)):d=this.importXml(b,e,g,x,null,null!=C?mxEvent.isControlDown(C):null);null!=t&&t(d)});"image"==c.substring(0,5)?(y=!1,"image/png"==c.substring(0,9)&&(c=G?null:this.extractGraphModelFromPng(b),null!=c&&0<c.length&&(f=this.importXml(c,e,g,x,
-null,null!=C?mxEvent.isControlDown(C):null),y=!0)),y||(c=this.editor.graph,G=b.indexOf(";"),0<G&&(b=b.substring(0,G)+b.substring(b.indexOf(",",G+1))),x&&c.isGridEnabled()&&(e=c.snap(e),g=c.snap(g)),f=[c.insertVertex(null,null,"",e,g,k,n,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";")])):/(\.*<graphml )/.test(b)?(d=!0,this.importGraphML(b,l)):null!=y&&null!=p&&(/(\.v(dx|sdx?))($|\?)/i.test(p)||/(\.vs(x|sx?))($|\?)/i.test(p))?
-(d=!0,this.importVisio(y,l)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,p)?(d=!0,this.parseFile(null!=y?y:new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?l(b.responseText):null!=t&&t(null))}),p)):0==b.indexOf("PK")&&null!=y?(d=!0,this.importZipFile(y,l,mxUtils.bind(this,function(){f=this.insertTextAt(this.validateFileData(b),e,g,!0,null,x);t(f)}))):/(\.v(sd|dx))($|\?)/i.test(p)||/(\.vs(s|x))($|\?)/i.test(p)||
-(f=this.insertTextAt(this.validateFileData(b),e,g,!0,null,x,null,null!=C?mxEvent.isControlDown(C):null));d||null==t||t(f);return f};EditorUi.prototype.importFiles=function(b,c,e,g,k,n,p,t,y,x,G,C,E){g=null!=g?g:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var d=null!=c&&null!=e,f=!0;c=null!=c?c:0;e=null!=e?e:0;var l=!1;if(!mxClient.IS_CHROMEAPP&&null!=b)for(var m=G||this.resampleThreshold,q=0;q<b.length;q++)if("image/"==b[q].type.substring(0,6)&&b[q].size>m){l=!0;break}var u=mxUtils.bind(this,
-function(){var l=this.editor.graph,m=l.gridSize;k=null!=k?k:mxUtils.bind(this,function(b,c,e,f,g,l,k,m,n){try{return null!=b&&"<mxlibrary"==b.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,b,k)),null):this.importFile(b,c,e,f,g,l,k,m,n,d,C,E)}catch(fa){return this.handleError(fa),null}});n=null!=n?n:mxUtils.bind(this,function(b){l.setSelectionCells(b)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=b.length,u=q,v=[],B=mxUtils.bind(this,function(b,
-d){v[b]=d;if(0==--u){this.spinner.stop();if(null!=t)t(v);else{var c=[];l.getModel().beginUpdate();try{for(var e=0;e<v.length;e++){var f=v[e]();null!=f&&(c=c.concat(f))}}finally{l.getModel().endUpdate()}}n(c)}}),y=0;y<q;y++)mxUtils.bind(this,function(d){var n=b[d];if(null!=n){var q=new FileReader;q.onload=mxUtils.bind(this,function(b){if(null==p||p(n))if("image/"==n.type.substring(0,6))if("image/svg"==n.type.substring(0,9)){var q=Graph.clipSvgDataUri(b.target.result),t=q.indexOf(","),u=decodeURIComponent(escape(atob(q.substring(t+
-1)))),v=mxUtils.parseXml(u),u=v.getElementsByTagName("svg");if(0<u.length){var u=u[0],N=C?null:u.getAttribute("content");null!=N&&"<"!=N.charAt(0)&&"%"!=N.charAt(0)&&(N=unescape(window.atob?atob(N):Base64.decode(N,!0)));null!=N&&"%"==N.charAt(0)&&(N=decodeURIComponent(N));null==N||"<mxfile "!==N.substring(0,8)&&"<mxGraphModel "!==N.substring(0,14)?B(d,mxUtils.bind(this,function(){try{if(q.substring(0,t+1),null!=v){var b=v.getElementsByTagName("svg");if(0<b.length){var f=b[0],p=f.getAttribute("width"),
-x=f.getAttribute("height"),p=null!=p&&"%"!=p.charAt(p.length-1)?parseFloat(p):NaN,x=null!=x&&"%"!=x.charAt(x.length-1)?parseFloat(x):NaN,u=f.getAttribute("viewBox");if(null==u||0==u.length)f.setAttribute("viewBox","0 0 "+p+" "+x);else if(isNaN(p)||isNaN(x)){var B=u.split(" ");3<B.length&&(p=parseFloat(B[2]),x=parseFloat(B[3]))}q=Editor.createSvgDataUri(mxUtils.getXml(f));var N=Math.min(1,Math.min(g/Math.max(1,p)),g/Math.max(1,x)),C=k(q,n.type,c+d*m,e+d*m,Math.max(1,Math.round(p*N)),Math.max(1,Math.round(x*
-N)),n.name);if(isNaN(p)||isNaN(x)){var y=new Image;y.onload=mxUtils.bind(this,function(){p=Math.max(1,y.width);x=Math.max(1,y.height);C[0].geometry.width=p;C[0].geometry.height=x;f.setAttribute("viewBox","0 0 "+p+" "+x);q=Editor.createSvgDataUri(mxUtils.getXml(f));var b=q.indexOf(";");0<b&&(q=q.substring(0,b)+q.substring(q.indexOf(",",b+1)));l.setCellStyles("image",q,[C[0]])});y.src=Editor.createSvgDataUri(mxUtils.getXml(f))}return C}}}catch(aa){}return null})):B(d,mxUtils.bind(this,function(){return k(N,
-"text/xml",c+d*m,e+d*m,0,0,n.name)}))}else B(d,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==n.type){var y=C?null:this.extractGraphModelFromPng(b.target.result);if(null!=y&&0<y.length){var A=new Image;A.src=b.target.result;B(d,mxUtils.bind(this,function(){return k(y,"text/xml",c+d*m,e+d*m,A.width,A.height,n.name)}));u=!0}}u||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
-mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(b.target.result,mxUtils.bind(this,function(l){this.resizeImage(l,b.target.result,mxUtils.bind(this,function(b,l,p){B(d,mxUtils.bind(this,function(){if(null!=b&&b.length<x){var q=f&&this.isResampleImageSize(n.size,G)?Math.min(1,Math.min(g/l,g/p)):1;return k(b,n.type,c+d*m,e+d*m,Math.round(l*q),Math.round(p*q),n.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),f,g,G,n.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else q=b.target.result,k(q,n.type,c+d*m,e+d*m,240,160,n.name,function(b){B(d,function(){return b})},n)});/(\.v(dx|sdx?))($|\?)/i.test(n.name)||/(\.vs(x|sx?))($|\?)/i.test(n.name)?k(null,n.type,c+d*m,e+d*m,240,160,n.name,function(b){B(d,function(){return b})},n):"image"==n.type.substring(0,5)||"application/pdf"==n.type?q.readAsDataURL(n):q.readAsText(n)}})(y)});if(l){l=
-[];for(q=0;q<b.length;q++)l.push(b[q]);b=l;this.confirmImageResize(function(b){f=b;u()},y)}else u()};EditorUi.prototype.confirmImageResize=function(b,c){c=null!=c?c:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(e,f){if(e||c)mxSettings.setResizeImages(e?f:null),mxSettings.save();d();b(f)};null==e||c?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
-function(b){f(b,!0)},function(b){f(b,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):f(!1,e)};EditorUi.prototype.parseFile=function(b,c,e){e=null!=e?e:b.name;var d=new FormData;d.append("format","xml");d.append("upfile",b,e);var f=new XMLHttpRequest;f.open("POST",
-OPEN_URL);f.onreadystatechange=function(){c(f)};f.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+b.size})}catch(n){}};EditorUi.prototype.isResampleImageSize=function(b,c){c=null!=c?c:this.resampleThreshold;return b>c};EditorUi.prototype.resizeImage=function(b,c,e,g,k,n,p){k=null!=k?k:this.maxImageSize;var d=Math.max(1,b.width),f=Math.max(1,b.height);if(g&&this.isResampleImageSize(null!=p?p:c.length,n))try{var l=Math.max(d/k,f/k);if(1<l){var m=Math.round(d/l),q=Math.round(f/
-l),t=document.createElement("canvas");t.width=m;t.height=q;t.getContext("2d").drawImage(b,0,0,m,q);var u=t.toDataURL();if(u.length<c.length){var L=document.createElement("canvas");L.width=m;L.height=q;var H=L.toDataURL();u!==H&&(c=u,d=m,f=q)}}}catch(K){}e(c,d,f)};EditorUi.prototype.extractGraphModelFromPng=function(b){return Editor.extractGraphModelFromPng(b)};EditorUi.prototype.loadImage=function(b,c,e){try{var d=new Image;d.onload=function(){d.width=0<d.width?d.width:120;d.height=0<d.height?d.height:
-120;c(d)};null!=e&&(d.onerror=e);d.src=b}catch(q){if(null!=e)e(q);else throw q;}};var g=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;Editor.isDarkMode()&&(c.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);c.cellEditor.editPlantUmlData=function(d,e,f){var g=JSON.parse(f);e=
-new TextareaDialog(b,mxResources.get("plantUml")+":",g.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generatePlantUmlImage(e,g.format,function(f,l,k){b.spinner.stop();c.getModel().beginUpdate();try{if("txt"==g.format)c.labelChanged(d,"<pre>"+f+"</pre>"),c.updateCellSize(d,!0);else{c.setCellStyles("image",b.convertDataUri(f),[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=l,m.height=k,c.cellsResized([d],[m],!1))}c.setAttributeForCell(d,"plantUmlData",
-JSON.stringify({data:e,format:g.format}))}finally{c.getModel().endUpdate()}},function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};c.cellEditor.editMermaidData=function(d,e,f){var g=JSON.parse(f);e=new TextareaDialog(b,mxResources.get("mermaid")+":",g.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generateMermaidImage(e,g.config,function(f,l,k){b.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",
-f,[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=Math.max(m.width,l),m.height=Math.max(m.height,k),c.cellsResized([d],[m],!1));c.setAttributeForCell(d,"mermaidData",JSON.stringify({data:e,config:g.config},null,2))}finally{c.getModel().endUpdate()}},function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};var e=c.cellEditor.startEditing;c.cellEditor.startEditing=function(d,f){try{var g=this.graph.getAttributeForCell(d,"plantUmlData");if(null!=
-g)this.editPlantUmlData(d,f,g);else if(g=this.graph.getAttributeForCell(d,"mermaidData"),null!=g)this.editMermaidData(d,f,g);else{var l=c.getCellStyle(d);"1"==mxUtils.getValue(l,"metaEdit","0")?b.showDataDialog(d):e.apply(this,arguments)}}catch(T){b.handleError(T)}};c.getLinkTitle=function(d){return b.getLinkTitle(d)};c.customLinkClicked=function(d){var c=!1;try{b.handleCustomLink(d),c=!0}catch(M){b.handleError(M)}return c};var k=c.parseBackgroundImage;c.parseBackgroundImage=function(b){var d=k.apply(this,
-arguments);null!=d&&null!=d.src&&Graph.isPageLink(d.src)&&(d={originalSrc:d.src});return d};var p=c.setBackgroundImage;c.setBackgroundImage=function(d){null!=d&&null!=d.originalSrc&&(d=b.createImageForPageLink(d.originalSrc,b.currentPage));p.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,
-function(b,d){var e=null!=c.backgroundImage?c.backgroundImage.originalSrc:null;if(null!=e){var f=e.indexOf(",");if(0<f)for(var e=e.substring(f+1),f=d.getProperty("patches"),g=0;g<f.length;g++)if(null!=f[g][EditorUi.DIFF_UPDATE]&&null!=f[g][EditorUi.DIFF_UPDATE][e]){c.refreshBackgroundImage();c.view.validateBackgroundImage();break}}}));var n=c.getBackgroundImageObject;c.getBackgroundImageObject=function(b,d){var c=n.apply(this,arguments);null==c||null==c.originalSrc||d||(c={src:c.originalSrc});return c};
-var t=this.clearDefaultStyle;this.clearDefaultStyle=function(){t.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var v=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";"1"==
-urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1");return v.apply(this,arguments)};var y=c.addClickHandler;c.addClickHandler=function(b,d,e){var f=d;d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null!=d&&c.isCustomLink(d)&&(mxEvent.isTouchEvent(b)||!mxEvent.isPopupTrigger(b))&&c.customLinkClicked(d)&&mxEvent.consume(b);null!=f&&f(b,d)};y.call(this,b,d,e)};g.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,
-null,!0);if(null!=this.menus){var x=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(d,c,e){b.editor.graph.isSelectionEmpty()?x.apply(this,arguments):b.menus.addMenuItems(d,"delete - cut copy copyAsImage - duplicate".split(" "),null,e)}}b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var G=c.getExportVariables;c.getExportVariables=
-function(){var d=G.apply(this,arguments),c=b.getCurrentFile();null!=c&&(d.filename=c.getTitle());d.pagecount=null!=b.pages?b.pages.length:1;d.page=null!=b.currentPage?b.currentPage.getName():"";d.pagenumber=null!=b.pages&&null!=b.currentPage?mxUtils.indexOf(b.pages,b.currentPage)+1:1;return d};var C=c.getGlobalVariable;c.getGlobalVariable=function(d){var c=b.getCurrentFile();return"filename"==d&&null!=c?c.getTitle():"page"==d&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==d?null!=b.currentPage&&
-null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:"pagecount"==d?null!=b.pages?b.pages.length:1:C.apply(this,arguments)};var E=c.labelLinkClicked;c.labelLinkClicked=function(b,d,e){var f=d.getAttribute("href");if(null==f||!c.isCustomLink(f)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))E.apply(this,arguments);else{if(!c.isEnabled()||null!=b&&c.isCellLocked(b.cell))c.customLinkClicked(f),c.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=function(){var d=b.defaultFilename,
-c=b.getCurrentFile();null!=c&&(d=null!=c.getTitle()?c.getTitle():d);return d};var J=this.actions.get("print");J.setEnabled(!mxClient.IS_IOS||!navigator.standalone);J.visible=J.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,
-!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&c.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(b){var d=c.cellEditor.text2,e=null;null!=d&&(mxEvent.addListener(d,"dragleave",function(b){null!=e&&(e.parentNode.removeChild(e),e=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(d,
-"dragover",mxUtils.bind(this,function(b){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=this.highlightElement(d));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(b){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,function(b,d,e,f,g,l){c.insertImage(b,g,l)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()},
-mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)?this.loadImage(decodeURIComponent(d),mxUtils.bind(this,function(b){var e=Math.max(1,b.width);b=Math.max(1,b.height);var f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,e)),f/Math.max(1,b));c.insertImage(decodeURIComponent(d),e*f,b*f)})):document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"))}else 0<=
-mxUtils.indexOf(b.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"));b.stopPropagation();b.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(J=this.editor.graph.view,J.setUnit(mxSettings.getUnit()),J.addListener("unitChanged",function(b,d){mxSettings.setUnit(d.getProperty("unit"));mxSettings.save()}),
-this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,J.unit),this.refresh());if("1"==urlParams.styledev){J=document.getElementById("geFooter");null!=J&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width=
-"98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),J.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(b,d){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);
-this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var L=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==this.styleInput?!0:L.apply(this,arguments)}}J=document.getElementById("geInfo");null!=J&&J.parentNode.removeChild(J);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var H=null;mxEvent.addListener(c.container,"dragleave",function(b){c.isEnabled()&&(null!=H&&(H.parentNode.removeChild(H),
-H=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(b){null==H&&(!mxClient.IS_IE||10<document.documentMode)&&(H=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(b){null!=H&&(H.parentNode.removeChild(H),H=null);if(c.isEnabled()){var d=mxUtils.convertPoint(c.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),
-e=c.view.translate,f=c.view.scale,g=d.x/f-e.x,l=d.y/f-e.y;if(0<b.dataTransfer.files.length)mxEvent.isShiftDown(b)?this.openFiles(b.dataTransfer.files,!0):(mxEvent.isAltDown(b)&&(l=g=null),this.importFiles(b.dataTransfer.files,g,l,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b),b));else{mxEvent.isAltDown(b)&&(l=g=0);var k=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):null,d=this.extractGraphModelFromEvent(b,
-null!=this.pages);if(null!=d)c.setSelectionCells(this.importXml(d,g,l,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){var m=b.dataTransfer.getData("text/html"),d=document.createElement("div");d.innerHTML=c.sanitizeHtml(m);var n=null,e=d.getElementsByTagName("img");null!=e&&1==e.length?(m=e[0].getAttribute("src"),null==m&&(m=e[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||(n=!0)):(e=d.getElementsByTagName("a"),null!=e&&1==e.length?m=e[0].getAttribute("href"):
-(d=d.getElementsByTagName("pre"),null!=d&&1==d.length&&(m=mxUtils.getTextContent(d[0]))));var p=!0,q=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(m,g,l,!0,n,null,p,mxEvent.isControlDown(b)))});n&&null!=m&&m.length>this.resampleThreshold?this.confirmImageResize(function(b){p=b;q()},mxEvent.isControlDown(b)):q()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(b){var d=Math.max(1,b.width);b=Math.max(1,b.height);
-var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,b));c.setSelectionCell(c.insertVertex(null,null,"",g,l,d*e,b*e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(b){c.setSelectionCells(this.insertTextAt(k,g,l,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),g,l,!0))}}b.stopPropagation();
-b.preventDefault()}),!1)}c.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var b=this.editor.graph;b.container.addEventListener("paste",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d))try{for(var c=d.clipboardData||d.originalEvent.clipboardData,e=!1,f=0;f<c.types.length;f++)if("text/"===c.types[f].substring(0,5)){e=!0;break}if(!e){var g=c.items;for(index in g){var k=
-g[index];if("file"===k.kind){if(b.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(d,c,e,f,g,l){b.insertImage(d,g,l)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()});else{var p=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],p.x,p.y,this.maxImageSize);mxEvent.consume(d)}break}}}}catch(y){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function b(){window.setTimeout(function(){e.innerHTML=
-"&nbsp;";e.focus();document.execCommand("selectAll",!1,null)},0)}var c=this.editor.graph,e=document.createElement("div");e.setAttribute("autocomplete","off");e.setAttribute("autocorrect","off");e.setAttribute("autocapitalize","off");e.setAttribute("spellcheck","false");e.style.textRendering="optimizeSpeed";e.style.fontFamily="monospace";e.style.wordBreak="break-all";e.style.background="transparent";e.style.color="transparent";e.style.position="absolute";e.style.whiteSpace="nowrap";e.style.overflow=
-"hidden";e.style.display="block";e.style.fontSize="1";e.style.zIndex="-1";e.style.resize="none";e.style.outline="none";e.style.width="1px";e.style.height="1px";mxUtils.setOpacity(e,0);e.contentEditable=!0;e.innerHTML="&nbsp;";var g=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var d=mxEvent.getSource(b);null==c.container||!c.isEnabled()||c.isMouseDown||
-c.isEditing()||null!=this.dialog||"INPUT"==d.nodeName||"TEXTAREA"==d.nodeName||224!=b.keyCode&&(mxClient.IS_MAC||17!=b.keyCode)&&(!mxClient.IS_MAC||91!=b.keyCode&&93!=b.keyCode)||g||(e.style.left=c.container.scrollLeft+10+"px",e.style.top=c.container.scrollTop+10+"px",c.container.appendChild(e),g=!0,e.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var d=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){!g||224!=d&&17!=
-d&&91!=d&&93!=d||(g=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),e.parentNode.removeChild(e),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(e,"copy",mxUtils.bind(this,function(d){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(e),b()}catch(u){this.handleError(u)}}));mxEvent.addListener(e,"cut",mxUtils.bind(this,function(d){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(e,!0),b()}catch(u){this.handleError(u)}}));mxEvent.addListener(e,
-"paste",mxUtils.bind(this,function(b){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(e.innerHTML="&nbsp;",e.focus(),null!=b.clipboardData&&this.pasteCells(b,e,!0,!0),mxEvent.isConsumed(b)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,e,!1,!0)}),0))}),!0);var k=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==e?!0:k.apply(this,arguments)}};EditorUi.prototype.getLinkTitle=function(b){var d=Graph.prototype.getLinkTitle.apply(this,arguments);
-if(Graph.isPageLink(b)){var c=b.indexOf(",");0<c&&(d=this.getPageById(b.substring(c+1)),d=null!=d?d.getName():mxResources.get("pageNotFound"))}else"data:"==b.substring(0,5)&&(d=mxResources.get("action"));return d};EditorUi.prototype.handleCustomLink=function(b){if(Graph.isPageLink(b)){var d=b.indexOf(",");if(b=this.getPageById(b.substring(d+1)))this.selectPage(b);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(b)};EditorUi.prototype.isSettingsEnabled=
-function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(b){b.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged",
-"keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(b,c){if("1"!=urlParams["ext-fonts"])mxSettings.setCustomFonts(this.menus.customFonts);else{var d=c.getProperty("customFonts");this.menus.customFonts=d;mxSettings.setCustomFonts(d)}mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",
-mxUtils.bind(this,function(b,c){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(b,c){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.addListener("gridColorChanged",
-mxUtils.bind(this,function(b,c){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(b,c){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
-this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(b,c,e){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
-this.editor.exportToCanvas(mxUtils.bind(this,function(b,d){try{this.spinner.stop();var e=this.createImageDataUri(b,c,"png"),f=parseInt(d.getAttribute("width")),g=parseInt(d.getAttribute("height"));this.writeImageToClipboard(e,f,g,mxUtils.bind(this,function(b){this.handleError(b)}))}catch(y){this.handleError(y)}}),null,null,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,null,null!=e?e:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
-null,null,null,10,null,null,!0,null,0<b.length?b:null)}catch(m){this.handleError(m)}};EditorUi.prototype.writeImageToClipboard=function(b,c,e,g){var d=this.base64ToBlob(b.substring(b.indexOf(",")+1),"image/png");b=new ClipboardItem({"image/png":d,"text/html":new Blob(['<img src="'+b+'" width="'+c+'" height="'+e+'">'],{type:"text/html"})});navigator.clipboard.write([b])["catch"](g)};EditorUi.prototype.copyCells=function(b,c){var d=this.editor.graph;if(d.isSelectionEmpty())b.innerHTML="";else{var e=
-mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),f=mxUtils.getXml(d.encodeCells(e));mxUtils.setTextContent(b,encodeURIComponent(f));c?(d.removeCells(e,!1),d.lastPasteXml=null):(d.lastPasteXml=f,d.pasteCounter=0);b.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var b=null;if(Editor.enableNativeCipboard){var c=this.editor.graph;c.isSelectionEmpty()||(b=mxUtils.sortCells(c.getExportableCells(c.model.getTopmostCells(c.getSelectionCells()))),
-c=mxUtils.getXml(c.encodeCells(b)),navigator.clipboard.writeText(c))}return b};EditorUi.prototype.pasteXml=function(b,c,e,g){var d=this.editor.graph,f=null;d.lastPasteXml==b?d.pasteCounter++:(d.lastPasteXml=b,d.pasteCounter=0);var l=d.pasteCounter*d.gridSize;if(e||this.isCompatibleString(b))f=this.importXml(b,l,l),d.setSelectionCells(f);else if(c&&1==d.getSelectionCount()){l=d.getStartEditingCell(d.getSelectionCell(),g);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)&&"image"==d.getCurrentCellStyle(l)[mxConstants.STYLE_SHAPE])d.setCellStyles(mxConstants.STYLE_IMAGE,
-b,[l]);else{d.model.beginUpdate();try{d.labelChanged(l,b),Graph.isLink(b)&&d.setLinkForCell(l,b)}finally{d.model.endUpdate()}}d.setSelectionCell(l)}else f=d.getInsertPoint(),d.isMouseInsertPoint()&&(l=0,d.lastPasteXml==b&&0<d.pasteCounter&&d.pasteCounter--),f=this.insertTextAt(b,f.x+l,f.y+l,!0),d.setSelectionCells(f);d.isSelectionEmpty()||(d.scrollCellToVisible(d.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell())));return f};EditorUi.prototype.pasteCells=
-function(b,c,e,g){if(!mxEvent.isConsumed(b)){var d=c,f=!1;if(e&&null!=b.clipboardData&&b.clipboardData.getData){var l=b.clipboardData.getData("text/plain"),k=!1;if(null!=l&&0<l.length&&"%3CmxGraphModel%3E"==l.substring(0,18)){var m=decodeURIComponent(l);this.isCompatibleString(m)&&(k=!0,l=m)}k=k?null:b.clipboardData.getData("text/html");null!=k&&0<k.length?(d=this.parseHtmlData(k),f="text/plain"!=d.getAttribute("data-type")):null!=l&&0<l.length&&(d=document.createElement("div"),mxUtils.setTextContent(d,
-k))}l=d.getElementsByTagName("span");if(null!=l&&0<l.length&&"application/vnd.lucid.chart.objects"===l[0].getAttribute("data-lucid-type"))e=l[0].getAttribute("data-lucid-content"),null!=e&&0<e.length&&(this.convertLucidChart(e,mxUtils.bind(this,function(b){var d=this.editor.graph;d.lastPasteXml==b?d.pasteCounter++:(d.lastPasteXml=b,d.pasteCounter=0);var c=d.pasteCounter*d.gridSize;d.setSelectionCells(this.importXml(b,c,c));d.scrollCellToVisible(d.getSelectionCell())}),mxUtils.bind(this,function(b){this.handleError(b)})),
-mxEvent.consume(b));else{f=f?d.innerHTML:mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText);k=!1;try{var p=f.lastIndexOf("%3E");0<=p&&p<f.length-3&&(f=f.substring(0,p+3))}catch(C){}try{l=d.getElementsByTagName("span"),m=null!=l&&0<l.length?mxUtils.trim(decodeURIComponent(l[0].textContent)):decodeURIComponent(f),this.isCompatibleString(m)&&(k=!0,f=m)}catch(C){}try{if(null!=f&&0<f.length){this.pasteXml(f,g,k,b);try{mxEvent.consume(b)}catch(C){}}else if(!e){var t=this.editor.graph;
-t.lastPasteXml=null;t.pasteCounter=0}}catch(C){this.handleError(C)}}}c.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(b){if(Graph.fileSupport)for(var d=null,c=0;c<b.length;c++)mxEvent.addListener(b[c],"dragleave",function(b){null!=d&&(d.parentNode.removeChild(d),d=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(b[c],"dragover",mxUtils.bind(this,function(b){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==d&&(!mxClient.IS_IE||10<document.documentMode&&
-12>document.documentMode)&&(d=this.highlightElement());b.stopPropagation();b.preventDefault()})),mxEvent.addListener(b[c],"drop",mxUtils.bind(this,function(b){null!=d&&(d.parentNode.removeChild(d),d=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<b.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b)):this.openFiles(b.dataTransfer.files,!0);
-else{var c=this.extractGraphModelFromEvent(b);if(null==c){var e=null!=b.dataTransfer?b.dataTransfer:b.clipboardData;null!=e&&(10==document.documentMode||11==document.documentMode?c=e.getData("Text"):(c=null,c=0<=mxUtils.indexOf(e.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(e.types,"text/html")?e.getData("text/html"):null,null!=c&&0<c.length?(e=document.createElement("div"),e.innerHTML=this.editor.graph.sanitizeHtml(c),e=e.getElementsByTagName("img"),0<e.length&&
-(c=e[0].getAttribute("src"))):0<=mxUtils.indexOf(e.types,"text/plain")&&(c=e.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&this.openLocalFile(b.getText(),null,!0)})):/^https?:\/\//.test(c)&&
-(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}b.stopPropagation();b.preventDefault()}))};EditorUi.prototype.highlightElement=function(b){var d=0,c=0,e,g;if(null==b){g=document.body;var k=document.documentElement;e=(g.clientWidth||k.clientWidth)-3;g=Math.max(g.clientHeight||0,k.clientHeight)-
-3}else d=b.offsetTop,c=b.offsetLeft,e=b.clientWidth,g=b.clientHeight;k=document.createElement("div");k.style.zIndex=mxPopupMenu.prototype.zIndex+2;k.style.border="3px dotted rgb(254, 137, 12)";k.style.pointerEvents="none";k.style.position="absolute";k.style.top=d+"px";k.style.left=c+"px";k.style.width=Math.max(0,e-3)+"px";k.style.height=Math.max(0,g-3)+"px";null!=b&&b.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(k):document.body.appendChild(k);return k};EditorUi.prototype.stringToCells=
-function(b){b=mxUtils.parseXml(b);var d=this.editor.extractGraphModel(b.documentElement);b=[];if(null!=d){var c=new mxCodec(d.ownerDocument),e=new mxGraphModel;c.decode(d,e);d=e.getChildAt(e.getRoot(),0);for(c=0;c<e.getChildCount(d);c++)b.push(e.getChildAt(d,c))}return b};EditorUi.prototype.openFileHandle=function(b,c,e,g,k){if(null!=c&&0<c.length){!this.useCanvasForExport&&/(\.png)$/i.test(c)?c=c.substring(0,c.length-4)+".drawio":/(\.pdf)$/i.test(c)&&(c=c.substring(0,c.length-4)+".drawio");var d=
-mxUtils.bind(this,function(b){c=0<=c.lastIndexOf(".")?c.substring(0,c.lastIndexOf("."))+".drawio":c+".drawio";if("<mxlibrary"==b.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,g);try{this.loadLibrary(new LocalLibrary(this,b,c))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(b,c,g)});if(/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c))this.importVisio(e,mxUtils.bind(this,
-function(b){this.spinner.stop();d(b)}));else if(/(\.*<graphml )/.test(b))this.importGraphML(b,mxUtils.bind(this,function(b){this.spinner.stop();d(b)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,c))this.parseFile(e,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?d(b.responseText):this.handleError({message:mxResources.get(413==b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));
-else if(this.isLucidChartData(b))/(\.json)$/i.test(c)&&(c=c.substring(0,c.length-5)+".drawio"),this.convertLucidChart(b,mxUtils.bind(this,function(b){this.spinner.stop();this.openLocalFile(b,c,g)}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}));else if("<mxlibrary"==b.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,g);try{this.loadLibrary(new LocalLibrary(this,b,e.name))}catch(v){this.handleError(v,
-mxResources.get("errorLoadingFile"))}}else if(0==b.indexOf("PK"))this.importZipFile(e,mxUtils.bind(this,function(b){this.spinner.stop();d(b)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(b,c,g)}));else{if("image/png"==e.type.substring(0,9))b=this.extractGraphModelFromPng(b);else if("application/pdf"==e.type){var f=Editor.extractGraphModelFromPdf(b);null!=f&&(k=null,g=!0,b=f)}this.spinner.stop();this.openLocalFile(b,c,g,k,null!=k?e:null)}}};EditorUi.prototype.openFiles=function(b,
-c){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=0;d<b.length;d++)mxUtils.bind(this,function(b){var d=new FileReader;d.onload=mxUtils.bind(this,function(d){try{this.openFileHandle(d.target.result,b.name,b,c)}catch(u){this.handleError(u)}});d.onerror=mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b);window.openFile=null});"image"!==b.type.substring(0,5)&&"application/pdf"!==b.type||"image/svg"===b.type.substring(0,9)?d.readAsText(b):d.readAsDataURL(b)})(b[d])};
-EditorUi.prototype.openLocalFile=function(b,c,e,g,k){var d=this.getCurrentFile(),f=mxUtils.bind(this,function(){window.openFile=null;if(null==c&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(b);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,b,c||this.defaultFilename,e,g,k))});if(null!=b&&0<b.length)null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=g)?f():(mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp||null!=g)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b,c),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):f()})));else throw Error(mxResources.get("notADiagramFile"));
-};EditorUi.prototype.getBasenames=function(){var b={};if(null!=this.pages)for(var c=0;c<this.pages.length;c++)this.updatePageRoot(this.pages[c]),this.addBasenamesForCell(this.pages[c].root,b);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),b);var c=[],e;for(e in b)c.push(e);return c};EditorUi.prototype.addBasenamesForCell=function(b,c){function d(b){if(null!=b){var d=b.lastIndexOf(".");0<d&&(b=b.substring(d+1,b.length));null==c[b]&&(c[b]=!0)}}var e=this.editor.graph,f=e.getCellStyle(b);
-d(mxStencilRegistry.getBasenameForStencil(f[mxConstants.STYLE_SHAPE]));e.model.isEdge(b)&&(d(mxMarker.getPackageForType(f[mxConstants.STYLE_STARTARROW])),d(mxMarker.getPackageForType(f[mxConstants.STYLE_ENDARROW])));for(var f=e.model.getChildCount(b),g=0;g<f;g++)this.addBasenamesForCell(e.model.getChildAt(b,g),c)};EditorUi.prototype.setGraphEnabled=function(b){this.diagramContainer.style.visibility=b?"":"hidden";this.formatContainer.style.visibility=b?"":"hidden";this.sidebarFooterContainer.style.display=
-b?"":"none";this.sidebarContainer.style.display=b?"":"none";this.hsplit.style.display=b?"":"none";this.editor.graph.setEnabled(b);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=b?"":"hidden",this.ruler.vRuler.container.style.visibility=b?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=b?"":"hidden");b||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),
-null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(b,c,e,g){this.spinner.stop();
-this.addEmbedButtons();this.setGraphEnabled(!0);if(null==b||0==b.length)b=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,b,{}));this.mode=App.MODE_EMBED;this.setFileData(b);if(g)try{var d=this.editor.graph;d.setGridEnabled(!1);d.pageVisible=!1;var f=d.model.cells,k;for(k in f){var l=f[k];null!=l&&null!=l.style&&(l.style+=";sketch=1;"+(-1==l.style.indexOf("fontFamily=")||-1<l.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
-""))}}catch(y){console.log(y)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=e?e:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
-this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(b,c){null!=b?b.getPublicUrl(c):c(null)};EditorUi.prototype.createLoadMessage=function(b){var d=this.editor.graph;return{event:b,pageVisible:d.pageVisible,translate:d.view.translate,bounds:d.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:d.view.scale,page:d.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(b){var d=null,c=!1,
-e=!1,g=null,k=mxUtils.bind(this,function(b,d){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,k);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var k=f.data,l=mxUtils.bind(this,function(b){if(null!=b&&"function"===typeof b.charAt&&"<"!=b.charAt(0))try{"data:image/png;base64,"==
-b.substring(0,22)?b=this.extractGraphModelFromPng(b):"data:image/svg+xml;base64,"==b.substring(0,26)?b=atob(b.substring(26)):"data:image/svg+xml;utf8,"==b.substring(0,24)&&(b=b.substring(24)),null!=b&&("%"==b.charAt(0)?b=decodeURIComponent(b):"<"!=b.charAt(0)&&(b=Graph.decompress(b)))}catch(pa){}return b});if("json"==urlParams.proto){var m=!1;try{k=JSON.parse(k)}catch(Q){k=null}try{if(null==k)return;if("dialog"==k.action){this.showError(null!=k.titleKey?mxResources.get(k.titleKey):k.title,null!=k.messageKey?
-mxResources.get(k.messageKey):k.message,null!=k.buttonKey?mxResources.get(k.buttonKey):k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("layout"==k.action){this.executeLayoutList(k.layouts);return}if("prompt"==k.action){this.spinner.stop();var n=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?mxResources.get(k.okKey):k.ok,function(b){null!=b?p.postMessage(JSON.stringify({event:"prompt",value:b,message:k}),"*"):p.postMessage(JSON.stringify({event:"prompt-cancel",message:k}),
-"*")},null!=k.titleKey?mxResources.get(k.titleKey):k.title);this.showDialog(n.container,300,80,!0,!1);n.init();return}if("draft"==k.action){var q=l(k.xml);this.spinner.stop();n=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();p.postMessage(JSON.stringify({event:"draft",result:"edit",message:k}),"*")}),mxUtils.bind(this,function(){this.hideDialog();p.postMessage(JSON.stringify({event:"draft",result:"discard",message:k}),
-"*")}),k.editKey?mxResources.get(k.editKey):null,k.discardKey?mxResources.get(k.discardKey):null,k.ignore?mxUtils.bind(this,function(){this.hideDialog();p.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),"*")}):null);this.showDialog(n.container,640,480,!0,!1,mxUtils.bind(this,function(b){b&&this.actions.get("exit").funct()}));try{n.init()}catch(Q){p.postMessage(JSON.stringify({event:"draft",error:Q.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();
-var t=1==k.enableRecent,u=1==k.enableSearch,v=1==k.enableCustomTemp;if("1"==urlParams.newTempDlg&&!k.templatesOnly&&null!=k.callback){var B=this.getCurrentUser(),y=new TemplatesDialog(this,function(b,d,c){b=b||this.emptyDiagramXml;p.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d,tempUrl:c.url,libs:c.libs,builtIn:null!=c.info&&null!=c.info.custContentId,message:k}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=B?B.id:
-null,t?mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getRecentDiagrams",[c],null,b,d)}):null,u?mxUtils.bind(this,function(b,d,c,e){this.remoteInvoke("searchDiagrams",[b,e],null,d,c)}):null,mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getFileContent",[b.url],null,d,c)}),null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,!1,!1,!0,!0);this.showDialog(y.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}n=
-new NewDialog(this,!1,k.templatesOnly?!1:null!=k.callback,mxUtils.bind(this,function(d,c,e,g){d=d||this.emptyDiagramXml;null!=k.callback?p.postMessage(JSON.stringify({event:"template",xml:d,blank:d==this.emptyDiagramXml,name:c,tempUrl:e,libs:g,builtIn:!0,message:k}),"*"):(b(d,f,d!=this.emptyDiagramXml,k.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,t?mxUtils.bind(this,function(b){this.remoteInvoke("getRecentDiagrams",[null],null,b,function(){b(null,
-"Network Error!")})}):null,u?mxUtils.bind(this,function(b,d){this.remoteInvoke("searchDiagrams",[b,null],null,d,function(){d(null,"Network Error!")})}):null,mxUtils.bind(this,function(b,d,c){p.postMessage(JSON.stringify({event:"template",docUrl:b,info:d,name:c}),"*")}),null,null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,1==k.withoutType);this.showDialog(n.container,620,460,!0,!1,mxUtils.bind(this,function(b){this.sidebar.hideTooltip();
-b&&this.actions.get("exit").funct()}));n.init();return}if("textContent"==k.action){var P=this.getDiagramTextContent();p.postMessage(JSON.stringify({event:"textContent",data:P,message:k}),"*");return}if("status"==k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var T=null!=k.messageKey?mxResources.get(k.messageKey):
-k.message;null==k.show||k.show?this.spinner.spin(document.body,T):this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var N=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var R=this.editor.graph,F=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();var d=this.createLoadMessage("export");d.format=
-k.format;d.message=k;d.data=b;d.xml=N;p.postMessage(JSON.stringify(d),"*")}),D=mxUtils.bind(this,function(b){null==b&&(b=Editor.blankImage);"xmlpng"==k.format&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(N)));R!=this.editor.graph&&R.container.parentNode.removeChild(R.container);F(b)}),A=k.pageId||(null!=this.pages?k.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){null!=k.xml&&0<k.xml.length&&(c=!0,this.setFileData(N),c=!1);if(null!=
-this.pages&&this.currentPage.getId()!=A){for(var da=R.getGlobalVariable,R=this.createTemporaryGraph(R.getStylesheet()),I,S=0;S<this.pages.length;S++)if(this.pages[S].getId()==A){I=this.updatePageRoot(this.pages[S]);break}null==I&&(I=this.currentPage);R.getGlobalVariable=function(b){return"page"==b?I.getName():"pagenumber"==b?1:da.apply(this,arguments)};document.body.appendChild(R.container);R.model.setRoot(I.root)}if(null!=k.layerIds){for(var Z=R.model,ma=Z.getChildCells(Z.getRoot()),n={},S=0;S<k.layerIds.length;S++)n[k.layerIds[S]]=
-!0;for(S=0;S<ma.length;S++)Z.setVisible(ma[S],n[ma[S].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(b){D(b.toDataURL("image/png"))}),k.width,null,k.background,mxUtils.bind(this,function(){D(null)}),null,null,k.scale,k.transparent,k.shadow,null,R,k.border,null,k.grid,k.keepTheme)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=A?"&pageId="+A:"")+(null!=k.layerIds&&0<k.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):
-"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(N))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?F("data:image/png;base64,"+b.getText()):D(null)}),mxUtils.bind(this,function(){D(null)}))}}else{null!=k.xml&&0<k.xml.length&&(c=!0,this.setFileData(k.xml),c=!1);T=this.createLoadMessage("export");T.message=k;if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ga=this.getXmlFileData();T.xml=
-mxUtils.getXml(ga);T.data=this.getFileData(null,null,!0,null,null,null,ga);T.format=k.format}else if("html"==k.format)N=this.editor.getGraphXml(),T.data=this.getHtml(N,this.editor.graph),T.xml=mxUtils.getXml(N),T.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;var ia=null!=k.background?k.background:this.editor.graph.background;ia==mxConstants.NONE&&(ia=null);T.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);T.format="svg";var la=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);
-this.spinner.stop();T.data=Editor.createSvgDataUri(b);p.postMessage(JSON.stringify(T),"*")});if("xmlsvg"==k.format)(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))&&this.getEmbeddedSvg(T.xml,this.editor.graph,null,!0,la,null,null,k.embedImages,ia,k.scale,k.border,k.shadow,k.keepTheme);else if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){this.editor.graph.setEnabled(!1);
-var W=this.editor.graph.getSvg(ia,k.scale,k.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||k.shadow,null,k.keepTheme);(this.editor.graph.shadowVisible||k.shadow)&&this.editor.graph.addSvgShadow(W);this.embedFonts(W,mxUtils.bind(this,function(b){k.embedImages||null==k.embedImages?this.editor.convertImages(b,mxUtils.bind(this,function(b){la(mxUtils.getXml(b))})):la(mxUtils.getXml(b))}))}return}p.postMessage(JSON.stringify(T),"*")}return}if("load"==k.action){m=k.toSketch;e=1==
-k.autosave;this.hideDialog();null!=k.modified&&null==urlParams.modified&&(urlParams.modified=k.modified);null!=k.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=k.saveAndExit);null!=k.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=k.noSaveBtn);null!=k.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=k.noExitBtn);null!=k.title&&null!=this.buttonContainer&&(q=document.createElement("span"),mxUtils.write(q,k.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight=
-"12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="1"==urlParams.noLangIcon?"0":"25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(q),this.embedFilenameSpan=q);try{k.libs&&this.sidebar.showEntries(k.libs)}catch(Q){}k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):
-null!=k.descriptor?k.descriptor:k.xml}else{if("merge"==k.action){var fa=this.getCurrentFile();null!=fa&&(q=l(k.xml),null!=q&&""!=q&&fa.mergeFile(new LocalFile(this,q),function(){p.postMessage(JSON.stringify({event:"merge",message:k}),"*")},function(b){p.postMessage(JSON.stringify({event:"merge",message:k,error:b}),"*")}))}else"remoteInvokeReady"==k.action?this.handleRemoteInvokeReady(p):"remoteInvoke"==k.action?this.handleRemoteInvoke(k,f.origin):"remoteInvokeResponse"==k.action?this.handleRemoteInvokeResponse(k):
-p.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}catch(Q){this.handleError(Q)}}var na=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),V=mxUtils.bind(this,function(f,k){c=!0;try{b(f,k,null,m)}catch(ea){this.handleError(ea)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");g=na();e&&null==d&&(d=mxUtils.bind(this,function(b,d){var e=na();if(e!=
-g&&!c){var f=this.createLoadMessage("autosave");f.xml=e;(window.opener||window.parent).postMessage(JSON.stringify(f),"*")}g=e}),this.editor.graph.model.addListener(mxEvent.CHANGE,d),this.editor.graph.addListener("gridSizeChanged",d),this.editor.graph.addListener("shadowVisibleChanged",d),this.addListener("pageFormatChanged",d),this.addListener("pageScaleChanged",d),this.addListener("backgroundColorChanged",d),this.addListener("backgroundImageChanged",d),this.addListener("foldingEnabledChanged",d),
-this.addListener("mathEnabledChanged",d),this.addListener("gridEnabledChanged",d),this.addListener("guidesEnabledChanged",d),this.addListener("pageViewChanged",d));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var l=this.createLoadMessage("load");l.xml=f;p.postMessage(JSON.stringify(l),"*")}});null!=k&&"function"===typeof k.substring&&"data:application/vnd.visio;base64,"==k.substring(0,34)?(l="0M8R4KGxGuE"==k.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(k.substring(k.indexOf(",")+
-1)),function(b){V(b,f)},mxUtils.bind(this,function(b){this.handleError(b)}),l)):null!=k&&"function"===typeof k.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(k,"")?this.parseFile(new Blob([k],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&"<mxGraphModel"==b.responseText.substring(0,13)&&V(b.responseText,f)}),""):null!=k&&"function"===typeof k.substring&&this.isLucidChartData(k)?this.convertLucidChart(k,
-mxUtils.bind(this,function(b){V(b)}),mxUtils.bind(this,function(b){this.handleError(b)})):null==k||"object"!==typeof k||null==k.format||null==k.data&&null==k.url?(k=l(k),V(k,f)):this.loadDescriptor(k,mxUtils.bind(this,function(b){V(na(),f)}),mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"))}))}}));var p=window.opener||window.parent,k="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";p.postMessage(k,"*");if("json"==urlParams.proto){var t=
-this.editor.graph.openLink;this.editor.graph.openLink=function(b,d,c){t.apply(this,arguments);p.postMessage(JSON.stringify({event:"openLink",href:b,target:d,allowOpener:c}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var b=document.createElement("div");b.style.display="inline-block";b.style.position="absolute";b.style.paddingTop="atlas"==uiTheme?"2px":"0px";b.style.paddingLeft="8px";b.style.paddingBottom="2px";var c=document.createElement("button");c.className="geBigButton";
-var e=c;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var g="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,g);c.setAttribute("title",g);mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));b.appendChild(c)}}else mxUtils.write(c,mxResources.get("save")),c.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),
-b.appendChild(c),"1"==urlParams.saveAndExit&&(c=document.createElement("a"),mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),b.appendChild(c),e=c);"1"!=urlParams.noExitBtn&&(c=document.createElement("a"),e="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),
-mxUtils.write(c,e),c.setAttribute("title",e),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),b.appendChild(c),e=c);e.style.marginRight="20px";this.toolbar.container.appendChild(b);this.toolbar.staticElements.push(b);b.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,
-mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(b){this.importCsv(b)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(b,c){for(var d=this.editor.graph,e=d.getSelectionCells(),f=0;f<b.length;f++){var g=new window[b[f].layout](d);
-if(null!=b[f].config)for(var k in b[f].config)g[k]=b[f].config[k];this.executeLayout(function(){g.execute(d.getDefaultParent(),0==e.length?null:e)},f==b.length-1,c)}};EditorUi.prototype.importCsv=function(b,c){try{var d=b.split("\n"),e=[],f=[],g={};if(0<d.length){var k={},p=null,t=null,x=null,G=null,C=null,E=null,J=null,L=null,H=null,K="",B="auto",M="auto",P=null,T=null,N=40,R=40,F=100,D=0,A=this.editor.graph;A.getGraphBounds();for(var da=function(){null!=c?c(ba):(A.setSelectionCells(ba),A.scrollCellToVisible(A.getSelectionCell()))},
-I=A.getFreeInsertPoint(),S=I.x,Z=I.y,I=Z,ma=null,ga="auto",H=null,ia=[],la=null,W=null,fa=0;fa<d.length&&"#"==d[fa].charAt(0);){b=d[fa];for(fa++;fa<d.length&&"\\"==b.charAt(b.length-1)&&"#"==d[fa].charAt(0);)b=b.substring(0,b.length-1)+mxUtils.trim(d[fa].substring(1)),fa++;if("#"!=b.charAt(1)){var na=b.indexOf(":");if(0<na){var V=mxUtils.trim(b.substring(1,na)),Q=mxUtils.trim(b.substring(na+1));"label"==V?ma=A.sanitizeHtml(Q):"labelname"==V&&0<Q.length&&"-"!=Q?C=Q:"labels"==V&&0<Q.length&&"-"!=Q?
-E=JSON.parse(Q):"style"==V?t=Q:"parentstyle"==V?J=Q:"stylename"==V&&0<Q.length&&"-"!=Q?G=Q:"styles"==V&&0<Q.length&&"-"!=Q?x=JSON.parse(Q):"vars"==V&&0<Q.length&&"-"!=Q?p=JSON.parse(Q):"identity"==V&&0<Q.length&&"-"!=Q?L=Q:"parent"==V&&0<Q.length&&"-"!=Q?H=Q:"namespace"==V&&0<Q.length&&"-"!=Q?K=Q:"width"==V?B=Q:"height"==V?M=Q:"left"==V&&0<Q.length?P=Q:"top"==V&&0<Q.length?T=Q:"ignore"==V?W=Q.split(","):"connect"==V?ia.push(JSON.parse(Q)):"link"==V?la=Q:"padding"==V?D=parseFloat(Q):"edgespacing"==
-V?N=parseFloat(Q):"nodespacing"==V?R=parseFloat(Q):"levelspacing"==V?F=parseFloat(Q):"layout"==V&&(ga=Q)}}}if(null==d[fa])throw Error(mxResources.get("invalidOrMissingFile"));for(var pa=this.editor.csvToArray(d[fa]),V=na=null,Q=[],X=0;X<pa.length;X++)L==pa[X]&&(na=X),H==pa[X]&&(V=X),Q.push(mxUtils.trim(pa[X]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ma&&(ma="%"+Q[0]+"%");if(null!=ia)for(var ea=0;ea<ia.length;ea++)null==k[ia[ea].to]&&(k[ia[ea].to]={});L=[];for(X=fa+1;X<
-d.length;X++){var ja=this.editor.csvToArray(d[X]);if(null==ja){var ra=40<d[X].length?d[X].substring(0,40)+"...":d[X];throw Error(ra+" ("+X+"):\n"+mxResources.get("containsValidationErrors"));}0<ja.length&&L.push(ja)}A.model.beginUpdate();try{for(X=0;X<L.length;X++){var ja=L[X],U=null,ka=null!=na?K+ja[na]:null;null!=ka&&(U=A.model.getCell(ka));var d=null!=U,aa=new mxCell(ma,new mxGeometry(S,I,0,0),t||"whiteSpace=wrap;html=1;");aa.vertex=!0;aa.id=ka;for(var oa=0;oa<ja.length;oa++)A.setAttributeForCell(aa,
-Q[oa],ja[oa]);if(null!=C&&null!=E){var sa=E[aa.getAttribute(C)];null!=sa&&A.labelChanged(aa,sa)}if(null!=G&&null!=x){var ca=x[aa.getAttribute(G)];null!=ca&&(aa.style=ca)}A.setAttributeForCell(aa,"placeholders","1");aa.style=A.replacePlaceholders(aa,aa.style,p);d&&(A.model.setGeometry(U,aa.geometry),A.model.setStyle(U,aa.style),0>mxUtils.indexOf(f,U)&&f.push(U));U=aa;if(!d)for(ea=0;ea<ia.length;ea++)k[ia[ea].to][U.getAttribute(ia[ea].to)]=U;null!=la&&"link"!=la&&(A.setLinkForCell(U,U.getAttribute(la)),
-A.setAttributeForCell(U,la,null));A.fireEvent(new mxEventObject("cellsInserted","cells",[U]));var O=this.editor.graph.getPreferredSizeForCell(U);U.vertex&&(null!=P&&null!=U.getAttribute(P)&&(U.geometry.x=S+parseFloat(U.getAttribute(P))),null!=T&&null!=U.getAttribute(T)&&(U.geometry.y=Z+parseFloat(U.getAttribute(T))),"@"==B.charAt(0)&&null!=U.getAttribute(B.substring(1))?U.geometry.width=parseFloat(U.getAttribute(B.substring(1))):U.geometry.width="auto"==B?O.width+D:parseFloat(B),"@"==M.charAt(0)&&
-null!=U.getAttribute(M.substring(1))?U.geometry.height=parseFloat(U.getAttribute(M.substring(1))):U.geometry.height="auto"==M?O.height+D:parseFloat(M),I+=U.geometry.height+R);d?(null==g[ka]&&(g[ka]=[]),g[ka].push(U)):(H=null!=V?A.model.getCell(K+ja[V]):null,e.push(U),null!=H?(H.style=A.replacePlaceholders(H,J,p),A.addCell(U,H)):f.push(A.addCell(U)))}for(var ta=f.slice(),ba=f.slice(),ea=0;ea<ia.length;ea++)for(var xa=ia[ea],X=0;X<e.length;X++){var U=e[X],ua=mxUtils.bind(this,function(b,d,c){var e=
-d.getAttribute(c.from);if(null!=e&&(A.setAttributeForCell(d,c.from,null),""!=e))for(var e=e.split(","),f=0;f<e.length;f++){var g=k[c.to][e[f]];if(null!=g){var l=c.label;null!=c.fromlabel&&(l=(d.getAttribute(c.fromlabel)||"")+(l||""));null!=c.sourcelabel&&(l=A.replacePlaceholders(d,c.sourcelabel,p)+(l||""));null!=c.tolabel&&(l=(l||"")+(g.getAttribute(c.tolabel)||""));null!=c.targetlabel&&(l=(l||"")+A.replacePlaceholders(g,c.targetlabel,p));var m="target"==c.placeholders==!c.invert?g:b,m=null!=c.style?
-A.replacePlaceholders(m,c.style,p):A.createCurrentEdgeStyle(),l=A.insertEdge(null,null,l||"",c.invert?g:b,c.invert?b:g,m);if(null!=c.labels)for(m=0;m<c.labels.length;m++){var n=c.labels[m],q=new mxCell(n.label||m,new mxGeometry(null!=n.x?n.x:0,null!=n.y?n.y:0,0,0),"resizable=0;html=1;");q.vertex=!0;q.connectable=!1;q.geometry.relative=!0;null!=n.placeholders&&(q.value=A.replacePlaceholders("target"==n.placeholders==!c.invert?g:b,q.value,p));if(null!=n.dx||null!=n.dy)q.geometry.offset=new mxPoint(null!=
-n.dx?n.dx:0,null!=n.dy?n.dy:0);l.insert(q)}ba.push(l);mxUtils.remove(c.invert?b:g,ta)}}});ua(U,U,xa);if(null!=g[U.id])for(oa=0;oa<g[U.id].length;oa++)ua(U,g[U.id][oa],xa)}if(null!=W)for(X=0;X<e.length;X++)for(U=e[X],oa=0;oa<W.length;oa++)A.setAttributeForCell(U,mxUtils.trim(W[oa]),null);if(0<f.length){var ya=new mxParallelEdgeLayout(A);ya.spacing=N;ya.checkOverlap=!0;var Ea=function(){0<ya.spacing&&ya.execute(A.getDefaultParent());for(var b=0;b<f.length;b++){var d=A.getCellGeometry(f[b]);d.x=Math.round(A.snap(d.x));
-d.y=Math.round(A.snap(d.y));"auto"==B&&(d.width=Math.round(A.snap(d.width)));"auto"==M&&(d.height=Math.round(A.snap(d.height)))}};if("["==ga.charAt(0)){var Ja=da;A.view.validate();this.executeLayoutList(JSON.parse(ga),function(){Ea();Ja()});da=null}else if("circle"==ga){var Ba=new mxCircleLayout(A);Ba.disableEdgeStyle=!1;Ba.resetEdges=!1;var Ha=Ba.isVertexIgnored;Ba.isVertexIgnored=function(b){return Ha.apply(this,arguments)||0>mxUtils.indexOf(f,b)};this.executeLayout(function(){Ba.execute(A.getDefaultParent());
-Ea()},!0,da);da=null}else if("horizontaltree"==ga||"verticaltree"==ga||"auto"==ga&&ba.length==2*f.length-1&&1==ta.length){A.view.validate();var wa=new mxCompactTreeLayout(A,"horizontaltree"==ga);wa.levelDistance=R;wa.edgeRouting=!1;wa.resetEdges=!1;this.executeLayout(function(){wa.execute(A.getDefaultParent(),0<ta.length?ta[0]:null)},!0,da);da=null}else if("horizontalflow"==ga||"verticalflow"==ga||"auto"==ga&&1==ta.length){A.view.validate();var za=new mxHierarchicalLayout(A,"horizontalflow"==ga?mxConstants.DIRECTION_WEST:
-mxConstants.DIRECTION_NORTH);za.intraCellSpacing=R;za.parallelEdgeSpacing=N;za.interRankCellSpacing=F;za.disableEdgeStyle=!1;this.executeLayout(function(){za.execute(A.getDefaultParent(),ba);A.moveCells(ba,S,Z)},!0,da);da=null}else if("organic"==ga||"auto"==ga&&ba.length>f.length){A.view.validate();var va=new mxFastOrganicLayout(A);va.forceConstant=3*R;va.disableEdgeStyle=!1;va.resetEdges=!1;var Aa=va.isVertexIgnored;va.isVertexIgnored=function(b){return Aa.apply(this,arguments)||0>mxUtils.indexOf(f,
-b)};this.executeLayout(function(){va.execute(A.getDefaultParent());Ea()},!0,da);da=null}}this.hideDialog()}finally{A.model.endUpdate()}null!=da&&da()}}catch(Y){this.handleError(Y)}};EditorUi.prototype.getSearch=function(b){var d="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=b&&0<window.location.search.length){var c="?",e;for(e in urlParams)0>mxUtils.indexOf(b,e)&&null!=urlParams[e]&&(d+=c+e+"="+urlParams[e],c="&")}else d=window.location.search;return d};EditorUi.prototype.getUrl=function(b){b=
-null!=b?b:window.location.pathname;var d=0<b.indexOf("?")?1:0;if("1"==urlParams.offline)b+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),e;for(e in urlParams)0>mxUtils.indexOf(c,e)&&(b=0==d?b+"?":b+"&",null!=urlParams[e]&&(b+=e+"="+urlParams[e],d++))}return b};EditorUi.prototype.showLinkDialog=function(b,c,e,g,k){b=new LinkDialog(this,b,c,e,!0,g,k);this.showDialog(b.container,560,130,!0,!0);b.init()};EditorUi.prototype.getServiceCount=
-function(b){var d=1;null==this.drive&&"function"!==typeof window.DriveClient||d++;null==this.dropbox&&"function"!==typeof window.DropboxClient||d++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||d++;null!=this.gitHub&&d++;null!=this.gitLab&&d++;null!=this.notion&&d++;b&&isLocalStorage&&"1"==urlParams.browser&&d++;return d};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var b=this.getCurrentFile(),c=null!=b||"1"==urlParams.embed&&this.editor.graph.isEnabled();
-this.menus.get("viewPanels").setEnabled(c);this.menus.get("viewZoom").setEnabled(c);var e=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==b||b.isRestricted());this.actions.get("makeCopy").setEnabled(!e);this.actions.get("print").setEnabled(!e);this.menus.get("exportAs").setEnabled(!e);this.menus.get("embed").setEnabled(!e);e="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(e);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(e),
-this.menus.get("newLibrary").setEnabled(e));b="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=b&&b.isEditable();this.actions.get("image").setEnabled(c);this.actions.get("zoomIn").setEnabled(c);this.actions.get("zoomOut").setEnabled(c);this.actions.get("resetView").setEnabled(c);this.actions.get("undo").setEnabled(this.canUndo()&&b);this.actions.get("redo").setEnabled(this.canRedo()&&b);this.menus.get("edit").setEnabled(c);this.menus.get("view").setEnabled(c);this.menus.get("importFrom").setEnabled(b);
-this.menus.get("arrange").setEnabled(b);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(b),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(b));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var b=this.getCurrentFile();
-return null!=b&&b.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);var b=this.editor.graph,c=this.getCurrentFile(),e=this.isDiagramActive(),g=b.getEditableCells(b.getSelectionCells());this.actions.get("pageSetup").setEnabled(e);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(e);this.actions.get("editData").setEnabled(0<
-g.length||b.isSelectionEmpty());this.actions.get("shadowVisible").setEnabled(e);this.actions.get("connectionArrows").setEnabled(e);this.actions.get("connectionPoints").setEnabled(e);this.actions.get("copyStyle").setEnabled(e&&!b.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(e&&0<g.length);this.actions.get("editGeometry").setEnabled(0<g.length&&b.getModel().isVertex(g[0]));this.actions.get("createShape").setEnabled(e);this.actions.get("createRevision").setEnabled(e);this.actions.get("moveToFolder").setEnabled(null!=
-c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(e&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=
-c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());c=this.actions.get("findReplace");c.setEnabled("hidden"!=this.diagramContainer.style.visibility);c.label=mxResources.get("find")+(b.isEnabled()?"/"+mxResources.get("replace"):"")+"...";b=b.view.getState(b.getSelectionCell());this.actions.get("editShape").setEnabled(e&&null!=b&&null!=b.shape&&null!=b.shape.stencil)};var t=EditorUi.prototype.destroy;
-EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);t.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(b,c,e,g,k,p,t,v){var d=b.editor.graph;if("xml"==e)b.hideDialog(),b.saveData(c,"xml",mxUtils.getXml(b.editor.getGraphXml()),"text/xml");else if("svg"==e)b.hideDialog(),b.saveData(c,"svg",mxUtils.getXml(d.getSvg(g,
-k,p)),"image/svg+xml");else{var f=b.getFileData(!0,null,null,null,null,!0),l=d.getGraphBounds(),m=Math.floor(l.width*k/d.view.scale),n=Math.floor(l.height*k/d.view.scale);if(f.length<=MAX_REQUEST_SIZE&&m*n<MAX_AREA)if(b.hideDialog(),"png"!=e&&"jpg"!=e&&"jpeg"!=e||!b.isExportToCanvas()){var q={globalVars:d.getExportVariables()};v&&(q.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});b.saveRequest(c,e,function(b,d){return new mxXmlRequest(EXPORT_URL,"format="+e+"&base64="+(d||"0")+
-(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<t?"&dpi="+t:"")+"&bg="+(null!=g?g:"none")+"&w="+m+"&h="+n+"&border="+p+"&xml="+encodeURIComponent(f))})}else"png"==e?b.exportImage(k,null==g||"none"==g,!0,!1,!1,p,!0,!1,null,v,t):b.exportImage(k,!1,!0,!1,!1,p,!0,!1,"jpeg",v);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var b=this.editor.graph,c="";if(null!=
-this.pages)for(var e=0;e<this.pages.length;e++){var g=b;this.currentPage!=this.pages[e]&&(g=this.createTemporaryGraph(b.getStylesheet()),this.updatePageRoot(this.pages[e]),g.model.setRoot(this.pages[e].root));c+=this.pages[e].getName()+" "+g.getIndexableText()+" "}else c=b.getIndexableText();this.editor.graph.setEnabled(!0);return c};EditorUi.prototype.showRemotelyStoredLibrary=function(b){var d={},c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,
-mxUtils.htmlEntities(b));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var g=document.createElement("div");g.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";g.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var k={};try{var p=mxSettings.getCustomLibraries();for(b=0;b<p.length;b++){var t=p[b];if("R"==t.substring(0,1)){var y=JSON.parse(decodeURIComponent(t.substring(1)));k[y[0]]=
-{id:y[0],title:y[1],downloadUrl:y[2]}}}}catch(x){}this.remoteInvoke("getCustomLibraries",null,null,function(b){g.innerHTML="";if(0==b.length)g.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<b.length;c++){var e=b[c];k[e.id]&&(d[e.id]=e);var f=this.addCheckbox(g,e.title,k[e.id]);(function(b,c){mxEvent.addListener(c,"change",function(){this.checked?d[b.id]=b:delete d[b.id]})})(e,f)}},mxUtils.bind(this,
-function(b){g.innerHTML="";var c=document.createElement("div");c.style.padding="8px";c.style.textAlign="center";mxUtils.write(c,mxResources.get("error")+": ");mxUtils.write(c,null!=b&&null!=b.message?b.message:mxResources.get("unknownError"));g.appendChild(c)}));c.appendChild(g);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var b=0,c;for(c in d)null==k[c]&&(b++,mxUtils.bind(this,function(c){this.remoteInvoke("getFileContent",[c.downloadUrl],
-null,mxUtils.bind(this,function(d){b--;0==b&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,d,c))}catch(J){this.handleError(J,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){b--;0==b&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(d[c]));for(c in k)d[c]||this.closeLibrary(new RemoteLibrary(this,null,k[c]));0==b&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(c.container,
-340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(b){this.remoteWin=b;for(var c=0;c<this.remoteInvokeQueue.length;c++)b.postMessage(this.remoteInvokeQueue[c],
-"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(b){var c=b.msgMarkers,d=this.remoteInvokeCallbacks[c.callbackId];if(null==d)throw Error("No callback for "+(null!=c?c.callbackId:"null"));b.error?d.error&&d.error(b.error.errResp):d.callback&&d.callback.apply(this,b.resp);this.remoteInvokeCallbacks[c.callbackId]=null};EditorUi.prototype.remoteInvoke=function(b,c,e,g,k){var d=!0,f=window.setTimeout(mxUtils.bind(this,function(){d=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),
-this.timeout),l=mxUtils.bind(this,function(){window.clearTimeout(f);d&&g.apply(this,arguments)}),m=mxUtils.bind(this,function(){window.clearTimeout(f);d&&k.apply(this,arguments)});e=e||{};e.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:l,error:m});b=JSON.stringify({event:"remoteInvoke",funtionName:b,functionArgs:c,msgMarkers:e});null!=this.remoteWin?this.remoteWin.postMessage(b,"*"):this.remoteInvokeQueue.push(b)};EditorUi.prototype.handleRemoteInvoke=function(b,
-c){var d=mxUtils.bind(this,function(c,d){var e={event:"remoteInvokeResponse",msgMarkers:b.msgMarkers};null!=d?e.error={errResp:d}:null!=c&&(e.resp=c);this.remoteWin.postMessage(JSON.stringify(e),"*")});try{var e=b.funtionName,f=this.remoteInvokableFns[e];if(null!=f&&"function"===typeof this[e]){if(f.allowedDomains){for(var g=!1,k=0;k<f.allowedDomains.length;k++)if(c=="https://"+f.allowedDomains[k]){g=!0;break}if(!g){d(null,"Invalid Call: "+e+" is not allowed.");return}}var p=b.functionArgs;Array.isArray(p)||
-(p=[]);if(f.isAsync)p.push(function(){d(Array.prototype.slice.apply(arguments))}),p.push(function(b){d(null,b||"Unkown Error")}),this[e].apply(this,p);else{var t=this[e].apply(this,p);d([t])}}else d(null,"Invalid Call: "+e+" is not found.")}catch(x){d(null,"Invalid Call: An error occurred, "+x.message)}};EditorUi.prototype.openDatabase=function(b,c){if(null==this.database){var d=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=d)try{var e=d.open("database",2);e.onupgradeneeded=
-function(b){try{var d=e.result;1>b.oldVersion&&d.createObjectStore("objects",{keyPath:"key"});2>b.oldVersion&&(d.createObjectStore("files",{keyPath:"title"}),d.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(u){null!=c&&c(u)}};e.onsuccess=mxUtils.bind(this,function(c){var d=e.result;this.database=d;EditorUi.migrateStorageFiles&&(StorageFile.migrate(d),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||
-(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(b){if(!b||"1"==urlParams.forceMigration){var c=document.createElement("iframe");c.style.display="none";c.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(c);var d=!0,e=!1,f,g=0,k=mxUtils.bind(this,function(){e=!0;this.setDatabaseItem(".drawioMigrated3",!0);c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"setMigratedFlag"}),"*")}),l=mxUtils.bind(this,function(){g++;m()}),m=mxUtils.bind(this,function(){try{if(g>=f.length)k();else{var b=f[g];StorageFile.getFileContent(this,b,mxUtils.bind(this,function(d){null==d||".scratchpad"==b&&d==this.emptyLibraryXml?c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[b]}),"*"):l()}),l)}}catch(B){console.log(B)}}),p=mxUtils.bind(this,function(b){try{this.setDatabaseItem(null,[{title:b.title,
-size:b.data.length,lastModified:Date.now(),type:b.isLib?"L":"F"},{title:b.title,data:b.data}],l,l,["filesInfo","files"])}catch(B){console.log(B)}});b=mxUtils.bind(this,function(b){try{if(b.source==c.contentWindow){var g={};try{g=JSON.parse(b.data)}catch(M){}"init"==g.event?(c.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=g.event||e||
-(d?null!=g.resp&&0<g.resp.length&&null!=g.resp[0]?(f=g.resp[0],d=!1,m()):k():null!=g.resp&&0<g.resp.length&&null!=g.resp[0]?p(g.resp[0]):l())}}catch(M){console.log(M)}});window.addEventListener("message",b)}})));b(d);d.onversionchange=function(){d.close()}});e.onerror=c;e.onblocked=function(){}}catch(q){null!=c&&c(q)}else null!=c&&c()}else b(this.database)};EditorUi.prototype.setDatabaseItem=function(b,c,e,g,k){this.openDatabase(mxUtils.bind(this,function(d){try{k=k||"objects";Array.isArray(k)||(k=
-[k],b=[b],c=[c]);var f=d.transaction(k,"readwrite");f.oncomplete=e;f.onerror=g;for(d=0;d<k.length;d++)f.objectStore(k[d]).put(null!=b&&null!=b[d]?{key:b[d],data:c[d]}:c[d])}catch(v){null!=g&&g(v)}}),g)};EditorUi.prototype.removeDatabaseItem=function(b,c,e,g){this.openDatabase(mxUtils.bind(this,function(d){g=g||"objects";Array.isArray(g)||(g=[g],b=[b]);d=d.transaction(g,"readwrite");d.oncomplete=c;d.onerror=e;for(var f=0;f<g.length;f++)d.objectStore(g[f])["delete"](b[f])}),e)};EditorUi.prototype.getDatabaseItem=
-function(b,c,e,g){this.openDatabase(mxUtils.bind(this,function(d){try{g=g||"objects";var f=d.transaction([g],"readonly").objectStore(g).get(b);f.onsuccess=function(){c(f.result)};f.onerror=e}catch(u){null!=e&&e(u)}}),e)};EditorUi.prototype.getDatabaseItems=function(b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],"readonly").objectStore(e).openCursor(IDBKeyRange.lowerBound(0)),g=[];f.onsuccess=function(c){null==c.target.result?b(g):(g.push(c.target.result.value),
-c.target.result["continue"]())};f.onerror=c}catch(u){null!=c&&c(u)}}),c)};EditorUi.prototype.getDatabaseItemKeys=function(b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],"readonly").objectStore(e).getAllKeys();f.onsuccess=function(){b(f.result)};f.onerror=c}catch(n){null!=c&&c(n)}}),c)};EditorUi.prototype.commentsSupported=function(){var b=this.getCurrentFile();return null!=b?b.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var b=
-this.getCurrentFile();return null!=b?b.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var b=this.getCurrentFile();return null!=b?b.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(b,c){var d=this.getCurrentFile();null!=d?d.getComments(b,c):b([])};EditorUi.prototype.addComment=function(b,c,e){var d=this.getCurrentFile();null!=d?d.addComment(b,c,e):c(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var b=this.getCurrentFile();return null!=b?
-b.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var b=this.getCurrentFile();return null!=b?b.canComment():!0};EditorUi.prototype.newComment=function(b,c){var d=this.getCurrentFile();return null!=d?d.newComment(b,c):new DrawioComment(this,null,b,Date.now(),Date.now(),!1,c)};EditorUi.prototype.isRevisionHistorySupported=function(){var b=this.getCurrentFile();return null!=b&&b.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(b,c){var d=this.getCurrentFile();null!=
-d&&d.getRevisions?d.getRevisions(b,c):c({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var b=this.getCurrentFile();return null!=b&&(b.constructor==DriveFile&&b.isEditable()||b.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(b){b.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(b,c,e,g,k,p,t,v){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
-return this.editor.loadUrl(b,c,e,g,k,p,t,v)};EditorUi.prototype.loadFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(b)};EditorUi.prototype.createSvgDataUri=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(b)};EditorUi.prototype.embedCssFonts=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(b,c)};EditorUi.prototype.embedExtFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
-return this.editor.embedExtFonts(b)};EditorUi.prototype.exportToCanvas=function(b,c,e,g,k,p,t,v,y,x,G,C,E,J,L,H){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(b,c,e,g,k,p,t,v,y,x,G,C,E,J,L,H)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(b,c,e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
-return this.editor.convertImages(b,c,e,g)};EditorUi.prototype.convertImageToDataUri=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(b,c)};EditorUi.prototype.base64Encode=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(b)};EditorUi.prototype.updateCRC=function(b,c,e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(b,c,e,g)};EditorUi.prototype.crc32=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
-return Editor.crc32(b)};EditorUi.prototype.writeGraphModelToPng=function(b,c,e,g,k){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(b,c,e,g,k)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var b=[],c=0;c<localStorage.length;c++){var e=localStorage.key(c),g=localStorage.getItem(e);if(0<e.length&&(".scratchpad"==e||"."!=e.charAt(0))&&0<g.length){var k=
-"<mxfile "===g.substring(0,8)||"<?xml"===g.substring(0,5)||"\x3c!--[if IE]>"===g.substring(0,12),g="<mxlibrary>"===g.substring(0,11);(k||g)&&b.push(e)}}return b};EditorUi.prototype.getLocalStorageFile=function(b){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var c=localStorage.getItem(b);return{title:b,data:c,isLib:"<mxlibrary>"===c.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,c,e,k,g,p){function t(){for(var b=C.getElementsByTagName("div"),c=0,d=0;d<b.length;d++)"none"!=b[d].style.display&&b[d].parentNode==C&&c++;E.style.display=0==c?"block":"none"}function d(b,c,d,e){function f(){c.removeChild(l);c.removeChild(m);k.style.display="block";g.style.display="block"}y={div:c,comment:b,saveCallback:d,deleteOnCancel:e};var g=c.querySelector(".geCommentTxt"),k=c.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
+"tEXt","mxfile",encodeURIComponent(l));b(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(F){null!=c&&c(F)}}),null,null,null,mxUtils.bind(this,function(b){null!=c&&c(b)}),null,null,g,null,d.shadowVisible,null,d,k)}catch(E){null!=c&&c(E)}};EditorUi.prototype.getEmbeddedSvg=function(b,c,e,g,k,n,p,t,y,x,E,C,F){t=null!=t?t:!0;p=null!=y?y:c.background;p==mxConstants.NONE&&(p=null);n=c.getSvg(p,x,E,null,null,n,null,null,null,c.shadowVisible||
+C,null,F);(c.shadowVisible||C)&&c.addSvgShadow(n);null!=b&&n.setAttribute("content",b);null!=e&&n.setAttribute("resource",e);var d=(g?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(n);if(null!=k)this.embedFonts(n,mxUtils.bind(this,function(b){t?this.editor.convertImages(b,mxUtils.bind(this,function(b){k(d)})):k(d)}));else return d};EditorUi.prototype.embedFonts=function(b,c){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&
+this.editor.addFontCss(b,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(d){try{null!=d&&this.editor.addFontCss(b,d),c(b)}catch(m){c(b)}}))}catch(l){c(b)}}))};EditorUi.prototype.exportImage=function(b,c,e,g,k,n,p,t,y,x,E,C,F){y=null!=y?y:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,
+function(b){this.spinner.stop();try{this.saveCanvas(b,k?this.getFileData(!0,null,null,null,e,t):null,y,null==this.pages||0==this.pages.length,E)}catch(H){this.handleError(H)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,e,b||1,c,g,null,null,n,p,x,C,F)}catch(L){this.spinner.stop(),this.handleError(L)}}};EditorUi.prototype.isCorsEnabledForUrl=function(b){return this.editor.isCorsEnabledForUrl(b)};EditorUi.prototype.importXml=function(b,
+c,e,g,k,n,p){c=null!=c?c:0;e=null!=e?e:0;var d=[];try{var f=this.editor.graph;if(null!=b&&0<b.length){f.model.beginUpdate();try{var l=mxUtils.parseXml(b);b={};var m=this.editor.extractGraphModel(l.documentElement,null!=this.pages);if(null!=m&&"mxfile"==m.nodeName&&null!=this.pages){var q=m.getElementsByTagName("diagram");if(1==q.length&&!n){if(m=Editor.parseDiagramNode(q[0]),null!=this.currentPage&&(b[q[0].getAttribute("id")]=this.currentPage.getId(),null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&
+this.currentPage.getName()==mxResources.get("pageWithNumber",[1]))){var t=q[0].getAttribute("name");null!=t&&""!=t&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,t))}}else if(0<q.length){n=[];var u=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(b[q[0].getAttribute("id")]=this.pages[0].getId(),m=Editor.parseDiagramNode(q[0]),g=!1,u=1);for(;u<q.length;u++){var L=q[u].getAttribute("id");q[u].removeAttribute("id");var H=this.updatePageRoot(new DiagramPage(q[u]));
+b[L]=q[u].getAttribute("id");var J=this.pages.length;null==H.getName()&&H.setName(mxResources.get("pageWithNumber",[J+1]));f.model.execute(new ChangePage(this,H,H,J,!0));n.push(H)}this.updatePageLinks(b,n)}}if(null!=m&&"mxGraphModel"===m.nodeName&&(d=f.importGraphModel(m,c,e,g),null!=d))for(u=0;u<d.length;u++)this.updatePageLinksForCell(b,d[u]);p&&this.insertHandler(d,null,null,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,!0,!0)}finally{f.model.endUpdate()}}}catch(B){if(k)throw B;
+this.handleError(B)}return d};EditorUi.prototype.updatePageLinks=function(b,c){for(var d=0;d<c.length;d++)this.updatePageLinksForCell(b,c[d].root)};EditorUi.prototype.updatePageLinksForCell=function(b,c){var d=document.createElement("div"),e=this.editor.graph,f=e.getLinkForCell(c);null!=f&&e.setLinkForCell(c,this.updatePageLink(b,f));if(e.isHtmlLabel(c)){d.innerHTML=e.sanitizeHtml(e.getLabel(c));for(var g=d.getElementsByTagName("a"),k=!1,p=0;p<g.length;p++)f=g[p].getAttribute("href"),null!=f&&(g[p].setAttribute("href",
+this.updatePageLink(b,f)),k=!0);k&&e.labelChanged(c,d.innerHTML)}for(p=0;p<e.model.getChildCount(c);p++)this.updatePageLinksForCell(b,e.model.getChildAt(c,p))};EditorUi.prototype.updatePageLink=function(b,c){if(Graph.isPageLink(c)){var d=b[c.substring(c.indexOf(",")+1)];c=null!=d?"data:page/id,"+d:null}else if("data:action/json,"==c.substring(0,17))try{var e=JSON.parse(c.substring(17));if(null!=e.actions){for(var f=0;f<e.actions.length;f++){var g=e.actions[f];if(null!=g.open&&Graph.isPageLink(g.open)){var k=
+g.open.substring(g.open.indexOf(",")+1),d=b[k];null!=d?g.open="data:page/id,"+d:null==this.getPageById(k)&&delete g.open}}c="data:action/json,"+JSON.stringify(e)}}catch(v){}return c};EditorUi.prototype.isRemoteVisioFormat=function(b){return/(\.v(sd|dx))($|\?)/i.test(b)||/(\.vs(s|x))($|\?)/i.test(b)};EditorUi.prototype.importVisio=function(b,c,e,g,k){g=null!=g?g:b.name;e=null!=e?e:mxUtils.bind(this,function(b){this.handleError(b)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var d=
+this.isRemoteVisioFormat(g);try{var f="UNKNOWN-VISIO",l=g.lastIndexOf(".");if(0<=l&&l<g.length)f=g.substring(l+1).toUpperCase();else{var m=g.lastIndexOf("/");0<=m&&m<g.length&&(g=g.substring(m+1))}EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+g,label:d?"remote":"local"})}catch(C){}if(d)if(null==VSD_CONVERT_URL||this.isOffline())e({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{d=new FormData;d.append("file1",
+b,g);var n=new XMLHttpRequest;n.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(g)?"?stencil=1":""));n.responseType="blob";this.addRemoteServiceSecurityCheck(n);null!=k&&n.setRequestHeader("x-convert-custom",k);n.onreadystatechange=mxUtils.bind(this,function(){if(4==n.readyState)if(200<=n.status&&299>=n.status)try{var b=n.response;if("text/xml"==b.type){var d=new FileReader;d.onload=mxUtils.bind(this,function(b){try{c(b.target.result)}catch(L){e({message:mxResources.get("errorLoadingFile")})}});
+d.readAsText(b)}else this.doImportVisio(b,c,e,g)}catch(I){e(I)}else try{""==n.responseType||"text"==n.responseType?e({message:n.responseText}):(d=new FileReader,d.onload=function(){e({message:JSON.parse(d.result).Message})},d.readAsText(n.response))}catch(I){e({})}});n.send(d)}else try{this.doImportVisio(b,c,e,g)}catch(C){e(C)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=
+!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.importGraphML=function(b,c,e){e=null!=e?e:mxUtils.bind(this,function(b){this.handleError(b)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(b,c,e)}catch(q){e(q)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",
+d))};EditorUi.prototype.exportVisio=function(b){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(b)||this.handleError({message:mxResources.get("unknownError")})}catch(l){this.handleError(l)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",
+d))};EditorUi.prototype.convertLucidChart=function(b,c,e){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+b.length}),EditorUi.debug("convertLucidChart",b)}catch(q){}try{c(LucidImporter.importState(JSON.parse(b)))}catch(q){null!=window.console&&console.error(q),e(q)}}else e({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||
+this.loadingExtensions||this.isOffline(!0)?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",d)})})})}):mxscript("js/extensions.min.js",d))};EditorUi.prototype.generateMermaidImage=function(b,c,e,g){var d=this,f=function(){try{this.loadingMermaid=
+!1,c=null!=c?c:EditorUi.defaultMermaidConfig,c.securityLevel="strict",c.startOnLoad=!1,mermaid.mermaidAPI.initialize(c),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),b,function(b){try{if(mxClient.IS_IE||mxClient.IS_IE11)b=b.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var c=mxUtils.parseXml(b).getElementsByTagName("svg");if(0<c.length){var f=parseFloat(c[0].getAttribute("width")),l=parseFloat(c[0].getAttribute("height"));
+if(isNaN(f)||isNaN(l))try{var k=c[0].getAttribute("viewBox").split(/\s+/),f=parseFloat(k[2]),l=parseFloat(k[3])}catch(C){f=f||100,l=l||100}e(d.convertDataUri(Editor.createSvgDataUri(b)),f,l)}else g({message:mxResources.get("invalidInput")})}catch(C){g(C)}})}catch(u){g(u)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=
+function(b,c,e,g){function d(b,d,c){c1=b>>2;c2=(b&3)<<4|d>>4;c3=(d&15)<<2|c>>6;c4=c&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(b){if(10>b)return String.fromCharCode(48+b);b-=10;if(26>b)return String.fromCharCode(65+b);b-=26;if(26>b)return String.fromCharCode(97+b);b-=26;return 0==b?"-":1==b?"_":"?"}var l=new XMLHttpRequest;l.open("GET",("txt"==c?PLANT_URL+"/txt/":"png"==c?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(b){r="";for(i=0;i<b.length;i+=3)r=i+2==b.length?r+
+d(b.charCodeAt(i),b.charCodeAt(i+1),0):i+1==b.length?r+d(b.charCodeAt(i),0,0):r+d(b.charCodeAt(i),b.charCodeAt(i+1),b.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(b))),!0);"txt"!=c&&(l.responseType="blob");l.onload=function(b){if(200<=this.status&&300>this.status)if("txt"==c)e(this.response);else{var d=new FileReader;d.readAsDataURL(this.response);d.onloadend=function(b){var c=new Image;c.onload=function(){try{var b=c.width,f=c.height;if(0==b&&0==f){var l=d.result,k=l.indexOf(","),
+m=decodeURIComponent(escape(atob(l.substring(k+1)))),n=mxUtils.parseXml(m).getElementsByTagName("svg");0<n.length&&(b=parseFloat(n[0].getAttribute("width")),f=parseFloat(n[0].getAttribute("height")))}e(d.result,b,f)}catch(B){g(B)}};c.src=d.result};d.onerror=function(b){g(b)}}else g(b)};l.onerror=function(b){g(b)};l.send()};EditorUi.prototype.insertAsPreText=function(b,c,e){var d=this.editor.graph,f=null;d.getModel().beginUpdate();try{f=d.insertVertex(null,null,"<pre>"+b+"</pre>",c,e,1,1,"text;html=1;align=left;verticalAlign=top;"),
+d.updateCellSize(f,!0)}finally{d.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=function(b,c,e,g,k,n,p,t){n=null!=n?n:!0;p=null!=p?p:!0;if(null!=b)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b))this.parseFile(new Blob([b.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&this.editor.graph.setSelectionCells(this.insertTextAt(b.responseText,c,e,!0))}));
+else if("data:"==b.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b))){var d=this.editor.graph;if("data:application/pdf;base64,"==b.substring(0,28)){var f=Editor.extractGraphModelFromPdf(b);if(null!=f&&0<f.length)return this.importXml(f,c,e,n,!0,t)}if("data:image/png;base64,"==b.substring(0,22)&&(f=this.extractGraphModelFromPng(b),null!=f&&0<f.length))return this.importXml(f,c,e,n,!0,t);if("data:image/svg+xml;"==b.substring(0,19))try{f=null;"data:image/svg+xml;base64,"==
+b.substring(0,26)?(f=b.substring(b.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(b.substring(b.indexOf(",")+1));var l=this.importXml(f,c,e,n,!0,t);if(0<l.length)return l}catch(F){}this.loadImage(b,mxUtils.bind(this,function(f){if("data:"==b.substring(0,5))this.resizeImage(f,b,mxUtils.bind(this,function(b,f,g){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(c),d.snap(e),f,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+this.convertDataUri(b)+";"))}),p,this.maxImageSize);else{var g=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)),l=Math.round(f.width*g);f=Math.round(f.height*g);d.setSelectionCell(d.insertVertex(null,null,"",d.snap(c),d.snap(e),l,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";"))}}),mxUtils.bind(this,function(){var f=null;d.getModel().beginUpdate();try{f=d.insertVertex(d.getDefaultParent(),
+null,b,d.snap(c),d.snap(e),1,1,"text;"+(g?"html=1;":"")),d.updateCellSize(f),d.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{d.getModel().endUpdate()}d.setSelectionCell(f)}))}else{b=Graph.zapGremlins(mxUtils.trim(b));if(this.isCompatibleString(b))return this.importXml(b,c,e,n,null,t);if(0<b.length)if(this.isLucidChartData(b))this.convertLucidChart(b,mxUtils.bind(this,function(b){this.editor.graph.setSelectionCells(this.importXml(b,c,e,n,null,t))}),mxUtils.bind(this,function(b){this.handleError(b)}));
+else{d=this.editor.graph;k=null;d.getModel().beginUpdate();try{k=d.insertVertex(d.getDefaultParent(),null,"",d.snap(c),d.snap(e),1,1,"text;whiteSpace=wrap;"+(g?"html=1;":""));d.fireEvent(new mxEventObject("textInserted","cells",[k]));"<"==b.charAt(0)&&b.indexOf(">")==b.length-1&&(b=mxUtils.htmlEntities(b));b.length>this.maxTextBytes&&(b=b.substring(0,this.maxTextBytes)+"...");k.value=b;d.updateCellSize(k);if(0<this.maxTextWidth&&k.geometry.width>this.maxTextWidth){var m=d.getPreferredSizeForCell(k,
+this.maxTextWidth);k.geometry.width=m.width;k.geometry.height=m.height}Graph.isLink(k.value)&&d.setLinkForCell(k,k.value);k.geometry.width+=d.gridSize;k.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[k]}}return[]};EditorUi.prototype.formatFileSize=function(b){var d=-1;do b/=1024,d++;while(1024<b);return Math.max(b,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[d]};EditorUi.prototype.convertDataUri=function(b){if("data:"==b.substring(0,5)){var d=b.indexOf(";");0<d&&(b=
+b.substring(0,d)+b.substring(b.indexOf(",",d+1)))}return b};EditorUi.prototype.isRemoteFileFormat=function(b,c){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(b)};EditorUi.prototype.isLucidChartData=function(b){return null!=b&&('{"state":"{\\"Properties\\":'==b.substring(0,26)||'{"Properties":'==b.substring(0,14))};EditorUi.prototype.importLocalFile=function(b,c){if(b&&Graph.fileSupport){if(null==this.importFileInputElt){var d=document.createElement("input");d.setAttribute("type",
+"file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){null!=d.files&&(this.importFiles(d.files,null,null,this.maxImageSize),d.type="",d.type="file",d.value="")}));d.style.display="none";document.body.appendChild(d);this.importFileInputElt=d}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(b,d){StorageFile.listFiles(this,"F",b,d)});window.openBrowserFile=mxUtils.bind(this,function(b,d,c){StorageFile.getFileContent(this,
+b,d,c)});window.deleteBrowserFile=mxUtils.bind(this,function(b,d,c){StorageFile.deleteFile(this,b,d,c)});if(!c){var e=Editor.useLocalStorage;Editor.useLocalStorage=!b}window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));window.openFile.setConsumer(mxUtils.bind(this,function(b,d){if(null!=d&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(d)){var c=new Blob([b],{type:"application/octet-stream"});this.importVisio(c,mxUtils.bind(this,function(b){this.importXml(b,0,0,!0)}),
+null,d)}else this.editor.graph.setSelectionCells(this.importXml(b,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!c){var f=this.dialog,g=f.close;this.dialog.close=mxUtils.bind(this,function(b){Editor.useLocalStorage=e;g.apply(f,arguments);b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(b,c,e){var d=this,f=mxUtils.bind(this,
+function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(b).then(function(f){if(0==Object.keys(f.files).length)e();else{var g=0,l,k=!1;f.forEach(function(b,d){var f=d.name.toLowerCase();"diagram/diagram.xml"==f?(k=!0,d.async("string").then(function(b){0==b.indexOf("<mxfile ")?c(b):e()})):0==f.indexOf("versions/")&&(f=parseInt(f.substr(9)),f>g&&(g=f,l=d))});0<g?l.async("string").then(function(f){!d.isOffline()&&(new XMLHttpRequest).upload&&d.isRemoteFileFormat(f,b.name)?d.parseFile(new Blob([f],
+{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?c(b.responseText):e())}),b.name):e()}):k||e()}},function(b){e(b)}):e()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importFile=function(b,c,e,g,k,n,p,t,y,x,E,C){x=null!=x?x:!0;var d=!1,f=null,l=mxUtils.bind(this,function(b){var d=null;null!=b&&"<mxlibrary"==b.substring(0,10)?
+this.loadLibrary(new LocalLibrary(this,b,p)):d=this.importXml(b,e,g,x,null,null!=C?mxEvent.isControlDown(C):null);null!=t&&t(d)});"image"==c.substring(0,5)?(y=!1,"image/png"==c.substring(0,9)&&(c=E?null:this.extractGraphModelFromPng(b),null!=c&&0<c.length&&(f=this.importXml(c,e,g,x,null,null!=C?mxEvent.isControlDown(C):null),y=!0)),y||(c=this.editor.graph,E=b.indexOf(";"),0<E&&(b=b.substring(0,E)+b.substring(b.indexOf(",",E+1))),x&&c.isGridEnabled()&&(e=c.snap(e),g=c.snap(g)),f=[c.insertVertex(null,
+null,"",e,g,k,n,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";")])):/(\.*<graphml )/.test(b)?(d=!0,this.importGraphML(b,l)):null!=y&&null!=p&&(/(\.v(dx|sdx?))($|\?)/i.test(p)||/(\.vs(x|sx?))($|\?)/i.test(p))?(d=!0,this.importVisio(y,l)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,p)?(d=!0,this.parseFile(null!=y?y:new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==
+b.readyState&&(200<=b.status&&299>=b.status?l(b.responseText):null!=t&&t(null))}),p)):0==b.indexOf("PK")&&null!=y?(d=!0,this.importZipFile(y,l,mxUtils.bind(this,function(){f=this.insertTextAt(this.validateFileData(b),e,g,!0,null,x);t(f)}))):/(\.v(sd|dx))($|\?)/i.test(p)||/(\.vs(s|x))($|\?)/i.test(p)||(f=this.insertTextAt(this.validateFileData(b),e,g,!0,null,x,null,null!=C?mxEvent.isControlDown(C):null));d||null==t||t(f);return f};EditorUi.prototype.importFiles=function(b,c,e,g,k,n,p,t,y,x,E,C,F){g=
+null!=g?g:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var d=null!=c&&null!=e,f=!0;c=null!=c?c:0;e=null!=e?e:0;var l=!1;if(!mxClient.IS_CHROMEAPP&&null!=b)for(var m=E||this.resampleThreshold,q=0;q<b.length;q++)if("image/"==b[q].type.substring(0,6)&&b[q].size>m){l=!0;break}var u=mxUtils.bind(this,function(){var l=this.editor.graph,m=l.gridSize;k=null!=k?k:mxUtils.bind(this,function(b,c,e,f,g,l,k,m,n){try{return null!=b&&"<mxlibrary"==b.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,
+b,k)),null):this.importFile(b,c,e,f,g,l,k,m,n,d,C,F)}catch(fa){return this.handleError(fa),null}});n=null!=n?n:mxUtils.bind(this,function(b){l.setSelectionCells(b)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=b.length,u=q,v=[],B=mxUtils.bind(this,function(b,d){v[b]=d;if(0==--u){this.spinner.stop();if(null!=t)t(v);else{var c=[];l.getModel().beginUpdate();try{for(var e=0;e<v.length;e++){var f=v[e]();null!=f&&(c=c.concat(f))}}finally{l.getModel().endUpdate()}}n(c)}}),y=
+0;y<q;y++)mxUtils.bind(this,function(d){var n=b[d];if(null!=n){var q=new FileReader;q.onload=mxUtils.bind(this,function(b){if(null==p||p(n))if("image/"==n.type.substring(0,6))if("image/svg"==n.type.substring(0,9)){var q=Graph.clipSvgDataUri(b.target.result),t=q.indexOf(","),u=decodeURIComponent(escape(atob(q.substring(t+1)))),v=mxUtils.parseXml(u),u=v.getElementsByTagName("svg");if(0<u.length){var u=u[0],N=C?null:u.getAttribute("content");null!=N&&"<"!=N.charAt(0)&&"%"!=N.charAt(0)&&(N=unescape(window.atob?
+atob(N):Base64.decode(N,!0)));null!=N&&"%"==N.charAt(0)&&(N=decodeURIComponent(N));null==N||"<mxfile "!==N.substring(0,8)&&"<mxGraphModel "!==N.substring(0,14)?B(d,mxUtils.bind(this,function(){try{if(q.substring(0,t+1),null!=v){var b=v.getElementsByTagName("svg");if(0<b.length){var f=b[0],p=f.getAttribute("width"),x=f.getAttribute("height"),p=null!=p&&"%"!=p.charAt(p.length-1)?parseFloat(p):NaN,x=null!=x&&"%"!=x.charAt(x.length-1)?parseFloat(x):NaN,u=f.getAttribute("viewBox");if(null==u||0==u.length)f.setAttribute("viewBox",
+"0 0 "+p+" "+x);else if(isNaN(p)||isNaN(x)){var B=u.split(" ");3<B.length&&(p=parseFloat(B[2]),x=parseFloat(B[3]))}q=Editor.createSvgDataUri(mxUtils.getXml(f));var N=Math.min(1,Math.min(g/Math.max(1,p)),g/Math.max(1,x)),C=k(q,n.type,c+d*m,e+d*m,Math.max(1,Math.round(p*N)),Math.max(1,Math.round(x*N)),n.name);if(isNaN(p)||isNaN(x)){var y=new Image;y.onload=mxUtils.bind(this,function(){p=Math.max(1,y.width);x=Math.max(1,y.height);C[0].geometry.width=p;C[0].geometry.height=x;f.setAttribute("viewBox",
+"0 0 "+p+" "+x);q=Editor.createSvgDataUri(mxUtils.getXml(f));var b=q.indexOf(";");0<b&&(q=q.substring(0,b)+q.substring(q.indexOf(",",b+1)));l.setCellStyles("image",q,[C[0]])});y.src=Editor.createSvgDataUri(mxUtils.getXml(f))}return C}}}catch(Z){}return null})):B(d,mxUtils.bind(this,function(){return k(N,"text/xml",c+d*m,e+d*m,0,0,n.name)}))}else B(d,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==n.type){var y=C?null:this.extractGraphModelFromPng(b.target.result);if(null!=y&&
+0<y.length){var A=new Image;A.src=b.target.result;B(d,mxUtils.bind(this,function(){return k(y,"text/xml",c+d*m,e+d*m,A.width,A.height,n.name)}));u=!0}}u||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(b.target.result,mxUtils.bind(this,function(l){this.resizeImage(l,
+b.target.result,mxUtils.bind(this,function(b,l,p){B(d,mxUtils.bind(this,function(){if(null!=b&&b.length<x){var q=f&&this.isResampleImageSize(n.size,E)?Math.min(1,Math.min(g/l,g/p)):1;return k(b,n.type,c+d*m,e+d*m,Math.round(l*q),Math.round(p*q),n.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,g,E,n.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else q=b.target.result,k(q,n.type,c+d*m,e+d*m,240,160,n.name,
+function(b){B(d,function(){return b})},n)});/(\.v(dx|sdx?))($|\?)/i.test(n.name)||/(\.vs(x|sx?))($|\?)/i.test(n.name)?k(null,n.type,c+d*m,e+d*m,240,160,n.name,function(b){B(d,function(){return b})},n):"image"==n.type.substring(0,5)||"application/pdf"==n.type?q.readAsDataURL(n):q.readAsText(n)}})(y)});if(l){l=[];for(q=0;q<b.length;q++)l.push(b[q]);b=l;this.confirmImageResize(function(b){f=b;u()},y)}else u()};EditorUi.prototype.confirmImageResize=function(b,c){c=null!=c?c:!1;var d=null!=this.spinner&&
+null!=this.spinner.pause?this.spinner.pause():function(){},e=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(e,f){if(e||c)mxSettings.setResizeImages(e?f:null),mxSettings.save();d();b(f)};null==e||c?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(b){f(b,!0)},function(b){f(b,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+
+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):f(!1,e)};EditorUi.prototype.parseFile=function(b,c,e){e=null!=e?e:b.name;var d=new FormData;d.append("format","xml");d.append("upfile",b,e);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){c(f)};f.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+b.size})}catch(n){}};EditorUi.prototype.isResampleImageSize=function(b,
+c){c=null!=c?c:this.resampleThreshold;return b>c};EditorUi.prototype.resizeImage=function(b,c,e,g,k,n,p){k=null!=k?k:this.maxImageSize;var d=Math.max(1,b.width),f=Math.max(1,b.height);if(g&&this.isResampleImageSize(null!=p?p:c.length,n))try{var l=Math.max(d/k,f/k);if(1<l){var m=Math.round(d/l),q=Math.round(f/l),t=document.createElement("canvas");t.width=m;t.height=q;t.getContext("2d").drawImage(b,0,0,m,q);var u=t.toDataURL();if(u.length<c.length){var L=document.createElement("canvas");L.width=m;L.height=
+q;var H=L.toDataURL();u!==H&&(c=u,d=m,f=q)}}}catch(J){}e(c,d,f)};EditorUi.prototype.extractGraphModelFromPng=function(b){return Editor.extractGraphModelFromPng(b)};EditorUi.prototype.loadImage=function(b,c,e){try{var d=new Image;d.onload=function(){d.width=0<d.width?d.width:120;d.height=0<d.height?d.height:120;c(d)};null!=e&&(d.onerror=e);d.src=b}catch(q){if(null!=e)e(q);else throw q;}};var g=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&
+!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;Editor.isDarkMode()&&(c.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);c.cellEditor.editPlantUmlData=function(d,e,f){var g=JSON.parse(f);e=new TextareaDialog(b,mxResources.get("plantUml")+":",g.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generatePlantUmlImage(e,g.format,function(f,l,k){b.spinner.stop();
+c.getModel().beginUpdate();try{if("txt"==g.format)c.labelChanged(d,"<pre>"+f+"</pre>"),c.updateCellSize(d,!0);else{c.setCellStyles("image",b.convertDataUri(f),[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=l,m.height=k,c.cellsResized([d],[m],!1))}c.setAttributeForCell(d,"plantUmlData",JSON.stringify({data:e,format:g.format}))}finally{c.getModel().endUpdate()}},function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};c.cellEditor.editMermaidData=
+function(d,e,f){var g=JSON.parse(f);e=new TextareaDialog(b,mxResources.get("mermaid")+":",g.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generateMermaidImage(e,g.config,function(f,l,k){b.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",f,[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=Math.max(m.width,l),m.height=Math.max(m.height,k),c.cellsResized([d],[m],!1));c.setAttributeForCell(d,"mermaidData",JSON.stringify({data:e,
+config:g.config},null,2))}finally{c.getModel().endUpdate()}},function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};var e=c.cellEditor.startEditing;c.cellEditor.startEditing=function(d,f){try{var g=this.graph.getAttributeForCell(d,"plantUmlData");if(null!=g)this.editPlantUmlData(d,f,g);else if(g=this.graph.getAttributeForCell(d,"mermaidData"),null!=g)this.editMermaidData(d,f,g);else{var l=c.getCellStyle(d);"1"==mxUtils.getValue(l,"metaEdit","0")?b.showDataDialog(d):
+e.apply(this,arguments)}}catch(T){b.handleError(T)}};c.getLinkTitle=function(d){return b.getLinkTitle(d)};c.customLinkClicked=function(d){var c=!1;try{b.handleCustomLink(d),c=!0}catch(M){b.handleError(M)}return c};var k=c.parseBackgroundImage;c.parseBackgroundImage=function(b){var d=k.apply(this,arguments);null!=d&&null!=d.src&&Graph.isPageLink(d.src)&&(d={originalSrc:d.src});return d};var p=c.setBackgroundImage;c.setBackgroundImage=function(d){null!=d&&null!=d.originalSrc&&(d=b.createImageForPageLink(d.originalSrc,
+b.currentPage));p.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(b,d){var e=null!=c.backgroundImage?c.backgroundImage.originalSrc:null;if(null!=e){var f=e.indexOf(",");if(0<f)for(var e=e.substring(f+1),f=d.getProperty("patches"),g=0;g<f.length;g++)if(null!=f[g][EditorUi.DIFF_UPDATE]&&
+null!=f[g][EditorUi.DIFF_UPDATE][e]){c.refreshBackgroundImage();c.view.validateBackgroundImage();break}}}));var n=c.getBackgroundImageObject;c.getBackgroundImageObject=function(b,d){var c=n.apply(this,arguments);null==c||null==c.originalSrc||d||(c={src:c.originalSrc});return c};var t=this.clearDefaultStyle;this.clearDefaultStyle=function(){t.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");
+if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var v=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1");return v.apply(this,arguments)};var y=c.addClickHandler;c.addClickHandler=function(b,d,e){var f=d;d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null!=
+d&&c.isCustomLink(d)&&(mxEvent.isTouchEvent(b)||!mxEvent.isPopupTrigger(b))&&c.customLinkClicked(d)&&mxEvent.consume(b);null!=f&&f(b,d)};y.call(this,b,d,e)};g.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var x=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(d,c,e){b.editor.graph.isSelectionEmpty()?x.apply(this,arguments):b.menus.addMenuItems(d,"delete - cut copy copyAsImage - duplicate".split(" "),
+null,e)}}b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var E=c.getExportVariables;c.getExportVariables=function(){var d=E.apply(this,arguments),c=b.getCurrentFile();null!=c&&(d.filename=c.getTitle());d.pagecount=null!=b.pages?b.pages.length:1;d.page=null!=b.currentPage?b.currentPage.getName():"";d.pagenumber=null!=b.pages&&null!=b.currentPage?mxUtils.indexOf(b.pages,
+b.currentPage)+1:1;return d};var C=c.getGlobalVariable;c.getGlobalVariable=function(d){var c=b.getCurrentFile();return"filename"==d&&null!=c?c.getTitle():"page"==d&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==d?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:"pagecount"==d?null!=b.pages?b.pages.length:1:C.apply(this,arguments)};var F=c.labelLinkClicked;c.labelLinkClicked=function(b,d,e){var f=d.getAttribute("href");if(null==f||!c.isCustomLink(f)||!mxEvent.isTouchEvent(e)&&
+mxEvent.isPopupTrigger(e))F.apply(this,arguments);else{if(!c.isEnabled()||null!=b&&c.isCellLocked(b.cell))c.customLinkClicked(f),c.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=function(){var d=b.defaultFilename,c=b.getCurrentFile();null!=c&&(d=null!=c.getTitle()?c.getTitle():d);return d};var I=this.actions.get("print");I.setEnabled(!mxClient.IS_IOS||!navigator.standalone);I.visible=I.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,
+!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&c.addListener(mxEvent.EDITING_STARTED,
+mxUtils.bind(this,function(b){var d=c.cellEditor.text2,e=null;null!=d&&(mxEvent.addListener(d,"dragleave",function(b){null!=e&&(e.parentNode.removeChild(e),e=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(b){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=this.highlightElement(d));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(b){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<
+b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,function(b,d,e,f,g,l){c.insertImage(b,g,l)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()},mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)?this.loadImage(decodeURIComponent(d),mxUtils.bind(this,function(b){var e=Math.max(1,
+b.width);b=Math.max(1,b.height);var f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,e)),f/Math.max(1,b));c.insertImage(decodeURIComponent(d),e*f,b*f)})):document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"));b.stopPropagation();
+b.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(I=this.editor.graph.view,I.setUnit(mxSettings.getUnit()),I.addListener("unitChanged",function(b,d){mxSettings.setUnit(d.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,I.unit),this.refresh());if("1"==urlParams.styledev){I=document.getElementById("geFooter");
+null!=I&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),I.appendChild(this.styleInput),
+this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(b,d){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var L=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==this.styleInput?!0:L.apply(this,arguments)}}I=document.getElementById("geInfo");
+null!=I&&I.parentNode.removeChild(I);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var H=null;mxEvent.addListener(c.container,"dragleave",function(b){c.isEnabled()&&(null!=H&&(H.parentNode.removeChild(H),H=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(b){null==H&&(!mxClient.IS_IE||10<document.documentMode)&&(H=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();
+b.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(b){null!=H&&(H.parentNode.removeChild(H),H=null);if(c.isEnabled()){var d=mxUtils.convertPoint(c.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),e=c.view.translate,f=c.view.scale,g=d.x/f-e.x,l=d.y/f-e.y;if(0<b.dataTransfer.files.length)mxEvent.isShiftDown(b)?this.openFiles(b.dataTransfer.files,!0):(mxEvent.isAltDown(b)&&(l=g=null),this.importFiles(b.dataTransfer.files,g,l,this.maxImageSize,null,null,null,
+null,mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b),b));else{mxEvent.isAltDown(b)&&(l=g=0);var k=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):null,d=this.extractGraphModelFromEvent(b,null!=this.pages);if(null!=d)c.setSelectionCells(this.importXml(d,g,l,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){var m=b.dataTransfer.getData("text/html"),d=document.createElement("div");d.innerHTML=c.sanitizeHtml(m);var n=null,e=d.getElementsByTagName("img");
+null!=e&&1==e.length?(m=e[0].getAttribute("src"),null==m&&(m=e[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||(n=!0)):(e=d.getElementsByTagName("a"),null!=e&&1==e.length?m=e[0].getAttribute("href"):(d=d.getElementsByTagName("pre"),null!=d&&1==d.length&&(m=mxUtils.getTextContent(d[0]))));var p=!0,q=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(m,g,l,!0,n,null,p,mxEvent.isControlDown(b)))});n&&null!=m&&m.length>this.resampleThreshold?this.confirmImageResize(function(b){p=
+b;q()},mxEvent.isControlDown(b)):q()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(b){var d=Math.max(1,b.width);b=Math.max(1,b.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,b));c.setSelectionCell(c.insertVertex(null,null,"",g,l,d*e,b*e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(b){c.setSelectionCells(this.insertTextAt(k,
+g,l,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),g,l,!0))}}b.stopPropagation();b.preventDefault()}),!1)}c.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var b=this.editor.graph;b.container.addEventListener("paste",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d))try{for(var c=
+d.clipboardData||d.originalEvent.clipboardData,e=!1,f=0;f<c.types.length;f++)if("text/"===c.types[f].substring(0,5)){e=!0;break}if(!e){var g=c.items;for(index in g){var k=g[index];if("file"===k.kind){if(b.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(d,c,e,f,g,l){b.insertImage(d,g,l)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()});else{var p=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],
+p.x,p.y,this.maxImageSize);mxEvent.consume(d)}break}}}}catch(y){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function b(){window.setTimeout(function(){e.innerHTML="&nbsp;";e.focus();document.execCommand("selectAll",!1,null)},0)}var c=this.editor.graph,e=document.createElement("div");e.setAttribute("autocomplete","off");e.setAttribute("autocorrect","off");e.setAttribute("autocapitalize","off");e.setAttribute("spellcheck","false");e.style.textRendering="optimizeSpeed";e.style.fontFamily=
+"monospace";e.style.wordBreak="break-all";e.style.background="transparent";e.style.color="transparent";e.style.position="absolute";e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.display="block";e.style.fontSize="1";e.style.zIndex="-1";e.style.resize="none";e.style.outline="none";e.style.width="1px";e.style.height="1px";mxUtils.setOpacity(e,0);e.contentEditable=!0;e.innerHTML="&nbsp;";var g=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,
+null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var d=mxEvent.getSource(b);null==c.container||!c.isEnabled()||c.isMouseDown||c.isEditing()||null!=this.dialog||"INPUT"==d.nodeName||"TEXTAREA"==d.nodeName||224!=b.keyCode&&(mxClient.IS_MAC||17!=b.keyCode)&&(!mxClient.IS_MAC||91!=b.keyCode&&93!=b.keyCode)||g||(e.style.left=c.container.scrollLeft+10+"px",e.style.top=c.container.scrollTop+10+"px",c.container.appendChild(e),g=!0,e.focus(),document.execCommand("selectAll",!1,null))}));
+mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var d=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){!g||224!=d&&17!=d&&91!=d&&93!=d||(g=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),e.parentNode.removeChild(e),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(e,"copy",mxUtils.bind(this,function(d){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(e),b()}catch(u){this.handleError(u)}}));mxEvent.addListener(e,"cut",
+mxUtils.bind(this,function(d){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(e,!0),b()}catch(u){this.handleError(u)}}));mxEvent.addListener(e,"paste",mxUtils.bind(this,function(b){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(e.innerHTML="&nbsp;",e.focus(),null!=b.clipboardData&&this.pasteCells(b,e,!0,!0),mxEvent.isConsumed(b)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,e,!1,!0)}),0))}),!0);var k=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==
+e?!0:k.apply(this,arguments)}};EditorUi.prototype.getLinkTitle=function(b){var d=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(b)){var c=b.indexOf(",");0<c&&(d=this.getPageById(b.substring(c+1)),d=null!=d?d.getName():mxResources.get("pageNotFound"))}else"data:"==b.substring(0,5)&&(d=mxResources.get("action"));return d};EditorUi.prototype.handleCustomLink=function(b){if(Graph.isPageLink(b)){var d=b.indexOf(",");if(b=this.getPageById(b.substring(d+1)))this.selectPage(b);else throw Error(mxResources.get("pageNotFound")||
+"Page not found");}else this.editor.graph.handleCustomLink(b)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(b){b.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),
+this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(b,c){if("1"!=urlParams["ext-fonts"])mxSettings.setCustomFonts(this.menus.customFonts);else{var d=c.getProperty("customFonts");this.menus.customFonts=d;mxSettings.setCustomFonts(d)}mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());
+this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(b,c){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(b,c){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));
+this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.addListener("gridColorChanged",mxUtils.bind(this,function(b,c){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(b,c){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=
+urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};
+EditorUi.prototype.copyImage=function(b,c,e){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(b,d){try{this.spinner.stop();var e=this.createImageDataUri(b,c,"png"),f=parseInt(d.getAttribute("width")),g=parseInt(d.getAttribute("height"));this.writeImageToClipboard(e,f,g,mxUtils.bind(this,function(b){this.handleError(b)}))}catch(y){this.handleError(y)}}),null,null,null,mxUtils.bind(this,function(b){this.spinner.stop();
+this.handleError(b)}),null,null,null!=e?e:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!0,null,0<b.length?b:null)}catch(m){this.handleError(m)}};EditorUi.prototype.writeImageToClipboard=function(b,c,e,g){var d=this.base64ToBlob(b.substring(b.indexOf(",")+1),"image/png");b=new ClipboardItem({"image/png":d,"text/html":new Blob(['<img src="'+b+'" width="'+c+'" height="'+e+'">'],{type:"text/html"})});navigator.clipboard.write([b])["catch"](g)};
+EditorUi.prototype.copyCells=function(b,c){var d=this.editor.graph;if(d.isSelectionEmpty())b.innerHTML="";else{var e=mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),f=mxUtils.getXml(d.encodeCells(e));mxUtils.setTextContent(b,encodeURIComponent(f));c?(d.removeCells(e,!1),d.lastPasteXml=null):(d.lastPasteXml=f,d.pasteCounter=0);b.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var b=null;if(Editor.enableNativeCipboard){var c=this.editor.graph;
+c.isSelectionEmpty()||(b=mxUtils.sortCells(c.getExportableCells(c.model.getTopmostCells(c.getSelectionCells()))),c=mxUtils.getXml(c.encodeCells(b)),navigator.clipboard.writeText(c))}return b};EditorUi.prototype.pasteXml=function(b,c,e,g){var d=this.editor.graph,f=null;d.lastPasteXml==b?d.pasteCounter++:(d.lastPasteXml=b,d.pasteCounter=0);var l=d.pasteCounter*d.gridSize;if(e||this.isCompatibleString(b))f=this.importXml(b,l,l),d.setSelectionCells(f);else if(c&&1==d.getSelectionCount()){l=d.getStartEditingCell(d.getSelectionCell(),
+g);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)&&"image"==d.getCurrentCellStyle(l)[mxConstants.STYLE_SHAPE])d.setCellStyles(mxConstants.STYLE_IMAGE,b,[l]);else{d.model.beginUpdate();try{d.labelChanged(l,b),Graph.isLink(b)&&d.setLinkForCell(l,b)}finally{d.model.endUpdate()}}d.setSelectionCell(l)}else f=d.getInsertPoint(),d.isMouseInsertPoint()&&(l=0,d.lastPasteXml==b&&0<d.pasteCounter&&d.pasteCounter--),f=this.insertTextAt(b,f.x+l,f.y+l,!0),d.setSelectionCells(f);d.isSelectionEmpty()||(d.scrollCellToVisible(d.getSelectionCell()),
+null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell())));return f};EditorUi.prototype.pasteCells=function(b,c,e,g){if(!mxEvent.isConsumed(b)){var d=c,f=!1;if(e&&null!=b.clipboardData&&b.clipboardData.getData){var l=b.clipboardData.getData("text/plain"),k=!1;if(null!=l&&0<l.length&&"%3CmxGraphModel%3E"==l.substring(0,18)){var m=decodeURIComponent(l);this.isCompatibleString(m)&&(k=!0,l=m)}k=k?null:b.clipboardData.getData("text/html");null!=k&&0<k.length?(d=this.parseHtmlData(k),
+f="text/plain"!=d.getAttribute("data-type")):null!=l&&0<l.length&&(d=document.createElement("div"),mxUtils.setTextContent(d,k))}l=d.getElementsByTagName("span");if(null!=l&&0<l.length&&"application/vnd.lucid.chart.objects"===l[0].getAttribute("data-lucid-type"))e=l[0].getAttribute("data-lucid-content"),null!=e&&0<e.length&&(this.convertLucidChart(e,mxUtils.bind(this,function(b){var d=this.editor.graph;d.lastPasteXml==b?d.pasteCounter++:(d.lastPasteXml=b,d.pasteCounter=0);var c=d.pasteCounter*d.gridSize;
+d.setSelectionCells(this.importXml(b,c,c));d.scrollCellToVisible(d.getSelectionCell())}),mxUtils.bind(this,function(b){this.handleError(b)})),mxEvent.consume(b));else{f=f?d.innerHTML:mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText);k=!1;try{var p=f.lastIndexOf("%3E");0<=p&&p<f.length-3&&(f=f.substring(0,p+3))}catch(C){}try{l=d.getElementsByTagName("span"),m=null!=l&&0<l.length?mxUtils.trim(decodeURIComponent(l[0].textContent)):decodeURIComponent(f),this.isCompatibleString(m)&&
+(k=!0,f=m)}catch(C){}try{if(null!=f&&0<f.length){this.pasteXml(f,g,k,b);try{mxEvent.consume(b)}catch(C){}}else if(!e){var t=this.editor.graph;t.lastPasteXml=null;t.pasteCounter=0}}catch(C){this.handleError(C)}}}c.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(b){if(Graph.fileSupport)for(var d=null,c=0;c<b.length;c++)mxEvent.addListener(b[c],"dragleave",function(b){null!=d&&(d.parentNode.removeChild(d),d=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(b[c],"dragover",
+mxUtils.bind(this,function(b){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==d&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(d=this.highlightElement());b.stopPropagation();b.preventDefault()})),mxEvent.addListener(b[c],"drop",mxUtils.bind(this,function(b){null!=d&&(d.parentNode.removeChild(d),d=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<b.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(b.dataTransfer.files,
+0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b)):this.openFiles(b.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(b);if(null==c){var e=null!=b.dataTransfer?b.dataTransfer:b.clipboardData;null!=e&&(10==document.documentMode||11==document.documentMode?c=e.getData("Text"):(c=null,c=0<=mxUtils.indexOf(e.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(e.types,"text/html")?e.getData("text/html"):null,null!=
+c&&0<c.length?(e=document.createElement("div"),e.innerHTML=this.editor.graph.sanitizeHtml(c),e=e.getElementsByTagName("img"),0<e.length&&(c=e[0].getAttribute("src"))):0<=mxUtils.indexOf(e.types,"text/plain")&&(c=e.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,
+function(b){200<=b.getStatus()&&299>=b.getStatus()&&this.openLocalFile(b.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}b.stopPropagation();b.preventDefault()}))};EditorUi.prototype.highlightElement=function(b){var d=0,c=0,e,g;if(null==b){g=document.body;
+var k=document.documentElement;e=(g.clientWidth||k.clientWidth)-3;g=Math.max(g.clientHeight||0,k.clientHeight)-3}else d=b.offsetTop,c=b.offsetLeft,e=b.clientWidth,g=b.clientHeight;k=document.createElement("div");k.style.zIndex=mxPopupMenu.prototype.zIndex+2;k.style.border="3px dotted rgb(254, 137, 12)";k.style.pointerEvents="none";k.style.position="absolute";k.style.top=d+"px";k.style.left=c+"px";k.style.width=Math.max(0,e-3)+"px";k.style.height=Math.max(0,g-3)+"px";null!=b&&b.parentNode==this.editor.graph.container?
+this.editor.graph.container.appendChild(k):document.body.appendChild(k);return k};EditorUi.prototype.stringToCells=function(b){b=mxUtils.parseXml(b);var d=this.editor.extractGraphModel(b.documentElement);b=[];if(null!=d){var c=new mxCodec(d.ownerDocument),e=new mxGraphModel;c.decode(d,e);d=e.getChildAt(e.getRoot(),0);for(c=0;c<e.getChildCount(d);c++)b.push(e.getChildAt(d,c))}return b};EditorUi.prototype.openFileHandle=function(b,c,e,g,k){if(null!=c&&0<c.length){!this.useCanvasForExport&&/(\.png)$/i.test(c)?
+c=c.substring(0,c.length-4)+".drawio":/(\.pdf)$/i.test(c)&&(c=c.substring(0,c.length-4)+".drawio");var d=mxUtils.bind(this,function(b){c=0<=c.lastIndexOf(".")?c.substring(0,c.lastIndexOf("."))+".drawio":c+".drawio";if("<mxlibrary"==b.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,g);try{this.loadLibrary(new LocalLibrary(this,b,c))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(b,
+c,g)});if(/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c))this.importVisio(e,mxUtils.bind(this,function(b){this.spinner.stop();d(b)}));else if(/(\.*<graphml )/.test(b))this.importGraphML(b,mxUtils.bind(this,function(b){this.spinner.stop();d(b)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,c))this.parseFile(e,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?d(b.responseText):this.handleError({message:mxResources.get(413==
+b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(b))/(\.json)$/i.test(c)&&(c=c.substring(0,c.length-5)+".drawio"),this.convertLucidChart(b,mxUtils.bind(this,function(b){this.spinner.stop();this.openLocalFile(b,c,g)}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}));else if("<mxlibrary"==b.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,
+this.defaultFilename,g);try{this.loadLibrary(new LocalLibrary(this,b,e.name))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else if(0==b.indexOf("PK"))this.importZipFile(e,mxUtils.bind(this,function(b){this.spinner.stop();d(b)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(b,c,g)}));else{if("image/png"==e.type.substring(0,9))b=this.extractGraphModelFromPng(b);else if("application/pdf"==e.type){var f=Editor.extractGraphModelFromPdf(b);null!=f&&(k=null,g=!0,
+b=f)}this.spinner.stop();this.openLocalFile(b,c,g,k,null!=k?e:null)}}};EditorUi.prototype.openFiles=function(b,c){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=0;d<b.length;d++)mxUtils.bind(this,function(b){var d=new FileReader;d.onload=mxUtils.bind(this,function(d){try{this.openFileHandle(d.target.result,b.name,b,c)}catch(u){this.handleError(u)}});d.onerror=mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b);window.openFile=null});"image"!==b.type.substring(0,
+5)&&"application/pdf"!==b.type||"image/svg"===b.type.substring(0,9)?d.readAsText(b):d.readAsDataURL(b)})(b[d])};EditorUi.prototype.openLocalFile=function(b,c,e,g,k){var d=this.getCurrentFile(),f=mxUtils.bind(this,function(){window.openFile=null;if(null==c&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(b);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,b,c||this.defaultFilename,e,g,k))});if(null!=
+b&&0<b.length)null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=g)?f():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=g)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b,c),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),
+null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):f()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var b={};if(null!=this.pages)for(var c=0;c<this.pages.length;c++)this.updatePageRoot(this.pages[c]),this.addBasenamesForCell(this.pages[c].root,b);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),b);var c=[],e;for(e in b)c.push(e);return c};EditorUi.prototype.addBasenamesForCell=function(b,c){function d(b){if(null!=
+b){var d=b.lastIndexOf(".");0<d&&(b=b.substring(d+1,b.length));null==c[b]&&(c[b]=!0)}}var e=this.editor.graph,f=e.getCellStyle(b);d(mxStencilRegistry.getBasenameForStencil(f[mxConstants.STYLE_SHAPE]));e.model.isEdge(b)&&(d(mxMarker.getPackageForType(f[mxConstants.STYLE_STARTARROW])),d(mxMarker.getPackageForType(f[mxConstants.STYLE_ENDARROW])));for(var f=e.model.getChildCount(b),g=0;g<f;g++)this.addBasenamesForCell(e.model.getChildAt(b,g),c)};EditorUi.prototype.setGraphEnabled=function(b){this.diagramContainer.style.visibility=
+b?"":"hidden";this.formatContainer.style.visibility=b?"":"hidden";this.sidebarFooterContainer.style.display=b?"":"none";this.sidebarContainer.style.display=b?"":"none";this.hsplit.style.display=b?"":"none";this.editor.graph.setEnabled(b);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=b?"":"hidden",this.ruler.vRuler.container.style.visibility=b?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=b?"":"hidden");b||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),
+null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&
+this.installMessageHandler(mxUtils.bind(this,function(b,c,e,g){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);if(null==b||0==b.length)b=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,b,{}));this.mode=App.MODE_EMBED;this.setFileData(b);if(g)try{var d=this.editor.graph;d.setGridEnabled(!1);d.pageVisible=!1;var f=d.model.cells,k;for(k in f){var l=f[k];null!=l&&null!=l.style&&(l.style+=";sketch=1;"+(-1==l.style.indexOf("fontFamily=")||-1<l.style.indexOf("fontFamily=Helvetica;")?
+"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(y){console.log(y)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=e?e:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=
+function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(b,c){null!=b?b.getPublicUrl(c):c(null)};EditorUi.prototype.createLoadMessage=function(b){var d=this.editor.graph;return{event:b,pageVisible:d.pageVisible,translate:d.view.translate,bounds:d.getGraphBounds(),currentPage:this.getSelectedPageIndex(),
+scale:d.view.scale,page:d.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(b){var d=null,c=!1,e=!1,g=null,k=mxUtils.bind(this,function(b,d){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,k);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||
+window.parent)){var k=f.data,l=mxUtils.bind(this,function(b){if(null!=b&&"function"===typeof b.charAt&&"<"!=b.charAt(0))try{"data:image/png;base64,"==b.substring(0,22)?b=this.extractGraphModelFromPng(b):"data:image/svg+xml;base64,"==b.substring(0,26)?b=atob(b.substring(26)):"data:image/svg+xml;utf8,"==b.substring(0,24)&&(b=b.substring(24)),null!=b&&("%"==b.charAt(0)?b=decodeURIComponent(b):"<"!=b.charAt(0)&&(b=Graph.decompress(b)))}catch(ra){}return b});if("json"==urlParams.proto){var m=!1;try{k=
+JSON.parse(k)}catch(Q){k=null}try{if(null==k)return;if("dialog"==k.action){this.showError(null!=k.titleKey?mxResources.get(k.titleKey):k.title,null!=k.messageKey?mxResources.get(k.messageKey):k.message,null!=k.buttonKey?mxResources.get(k.buttonKey):k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("layout"==k.action){this.executeLayoutList(k.layouts);return}if("prompt"==k.action){this.spinner.stop();var n=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?mxResources.get(k.okKey):
+k.ok,function(b){null!=b?p.postMessage(JSON.stringify({event:"prompt",value:b,message:k}),"*"):p.postMessage(JSON.stringify({event:"prompt-cancel",message:k}),"*")},null!=k.titleKey?mxResources.get(k.titleKey):k.title);this.showDialog(n.container,300,80,!0,!1);n.init();return}if("draft"==k.action){var q=l(k.xml);this.spinner.stop();n=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();p.postMessage(JSON.stringify({event:"draft",
+result:"edit",message:k}),"*")}),mxUtils.bind(this,function(){this.hideDialog();p.postMessage(JSON.stringify({event:"draft",result:"discard",message:k}),"*")}),k.editKey?mxResources.get(k.editKey):null,k.discardKey?mxResources.get(k.discardKey):null,k.ignore?mxUtils.bind(this,function(){this.hideDialog();p.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),"*")}):null);this.showDialog(n.container,640,480,!0,!1,mxUtils.bind(this,function(b){b&&this.actions.get("exit").funct()}));
+try{n.init()}catch(Q){p.postMessage(JSON.stringify({event:"draft",error:Q.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();var t=1==k.enableRecent,u=1==k.enableSearch,v=1==k.enableCustomTemp;if("1"==urlParams.newTempDlg&&!k.templatesOnly&&null!=k.callback){var B=this.getCurrentUser(),y=new TemplatesDialog(this,function(b,d,c){b=b||this.emptyDiagramXml;p.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d,tempUrl:c.url,libs:c.libs,
+builtIn:null!=c.info&&null!=c.info.custContentId,message:k}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=B?B.id:null,t?mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getRecentDiagrams",[c],null,b,d)}):null,u?mxUtils.bind(this,function(b,d,c,e){this.remoteInvoke("searchDiagrams",[b,e],null,d,c)}):null,mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getFileContent",[b.url],null,d,c)}),null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",
+null,null,b,function(){b({},0)})}):null,!1,!1,!0,!0);this.showDialog(y.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}n=new NewDialog(this,!1,k.templatesOnly?!1:null!=k.callback,mxUtils.bind(this,function(d,c,e,g){d=d||this.emptyDiagramXml;null!=k.callback?p.postMessage(JSON.stringify({event:"template",xml:d,blank:d==this.emptyDiagramXml,name:c,tempUrl:e,libs:g,builtIn:!0,message:k}),"*"):(b(d,f,d!=this.emptyDiagramXml,k.toSketch),this.editor.modified||this.editor.setStatus(""))}),
+null,null,null,null,null,null,null,t?mxUtils.bind(this,function(b){this.remoteInvoke("getRecentDiagrams",[null],null,b,function(){b(null,"Network Error!")})}):null,u?mxUtils.bind(this,function(b,d){this.remoteInvoke("searchDiagrams",[b,null],null,d,function(){d(null,"Network Error!")})}):null,mxUtils.bind(this,function(b,d,c){p.postMessage(JSON.stringify({event:"template",docUrl:b,info:d,name:c}),"*")}),null,null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},
+0)})}):null,1==k.withoutType);this.showDialog(n.container,620,460,!0,!1,mxUtils.bind(this,function(b){this.sidebar.hideTooltip();b&&this.actions.get("exit").funct()}));n.init();return}if("textContent"==k.action){var P=this.getDiagramTextContent();p.postMessage(JSON.stringify({event:"textContent",data:P,message:k}),"*");return}if("status"==k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));
+null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var T=null!=k.messageKey?mxResources.get(k.messageKey):k.message;null==k.show||k.show?this.spinner.spin(document.body,T):this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var N=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var R=this.editor.graph,
+G=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();var d=this.createLoadMessage("export");d.format=k.format;d.message=k;d.data=b;d.xml=N;p.postMessage(JSON.stringify(d),"*")}),D=mxUtils.bind(this,function(b){null==b&&(b=Editor.blankImage);"xmlpng"==k.format&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(N)));R!=this.editor.graph&&R.container.parentNode.removeChild(R.container);G(b)}),A=k.pageId||(null!=this.pages?k.currentPage?this.currentPage.getId():
+this.pages[0].getId():null);if(this.isExportToCanvas()){null!=k.xml&&0<k.xml.length&&(c=!0,this.setFileData(N),c=!1);if(null!=this.pages&&this.currentPage.getId()!=A){for(var da=R.getGlobalVariable,R=this.createTemporaryGraph(R.getStylesheet()),K,S=0;S<this.pages.length;S++)if(this.pages[S].getId()==A){K=this.updatePageRoot(this.pages[S]);break}null==K&&(K=this.currentPage);R.getGlobalVariable=function(b){return"page"==b?K.getName():"pagenumber"==b?1:da.apply(this,arguments)};document.body.appendChild(R.container);
+R.model.setRoot(K.root)}if(null!=k.layerIds){for(var aa=R.model,ma=aa.getChildCells(aa.getRoot()),n={},S=0;S<k.layerIds.length;S++)n[k.layerIds[S]]=!0;for(S=0;S<ma.length;S++)aa.setVisible(ma[S],n[ma[S].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(b){D(b.toDataURL("image/png"))}),k.width,null,k.background,mxUtils.bind(this,function(){D(null)}),null,null,k.scale,k.transparent,k.shadow,null,R,k.border,null,k.grid,k.keepTheme)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+
+("xmlpng"==k.format?"1":"0")+(null!=A?"&pageId="+A:"")+(null!=k.layerIds&&0<k.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(N))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?G("data:image/png;base64,"+b.getText()):D(null)}),mxUtils.bind(this,function(){D(null)}))}}else{null!=k.xml&&0<k.xml.length&&(c=!0,this.setFileData(k.xml),c=!1);T=this.createLoadMessage("export");
+T.message=k;if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ga=this.getXmlFileData();T.xml=mxUtils.getXml(ga);T.data=this.getFileData(null,null,!0,null,null,null,ga);T.format=k.format}else if("html"==k.format)N=this.editor.getGraphXml(),T.data=this.getHtml(N,this.editor.graph),T.xml=mxUtils.getXml(N),T.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;var ia=null!=k.background?k.background:this.editor.graph.background;ia==mxConstants.NONE&&
+(ia=null);T.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);T.format="svg";var la=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();T.data=Editor.createSvgDataUri(b);p.postMessage(JSON.stringify(T),"*")});if("xmlsvg"==k.format)(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))&&this.getEmbeddedSvg(T.xml,this.editor.graph,null,!0,la,null,null,k.embedImages,ia,k.scale,k.border,k.shadow,
+k.keepTheme);else if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){this.editor.graph.setEnabled(!1);var W=this.editor.graph.getSvg(ia,k.scale,k.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||k.shadow,null,k.keepTheme);(this.editor.graph.shadowVisible||k.shadow)&&this.editor.graph.addSvgShadow(W);this.embedFonts(W,mxUtils.bind(this,function(b){k.embedImages||null==k.embedImages?this.editor.convertImages(b,mxUtils.bind(this,
+function(b){la(mxUtils.getXml(b))})):la(mxUtils.getXml(b))}))}return}p.postMessage(JSON.stringify(T),"*")}return}if("load"==k.action){m=k.toSketch;e=1==k.autosave;this.hideDialog();null!=k.modified&&null==urlParams.modified&&(urlParams.modified=k.modified);null!=k.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=k.saveAndExit);null!=k.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=k.noSaveBtn);null!=k.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=k.noExitBtn);
+null!=k.title&&null!=this.buttonContainer&&(q=document.createElement("span"),mxUtils.write(q,k.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="1"==urlParams.noLangIcon?"0":"25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(q),
+this.embedFilenameSpan=q);try{k.libs&&this.sidebar.showEntries(k.libs)}catch(Q){}k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):null!=k.descriptor?k.descriptor:k.xml}else{if("merge"==k.action){var fa=this.getCurrentFile();null!=fa&&(q=l(k.xml),null!=q&&""!=q&&fa.mergeFile(new LocalFile(this,q),function(){p.postMessage(JSON.stringify({event:"merge",message:k}),"*")},function(b){p.postMessage(JSON.stringify({event:"merge",message:k,error:b}),"*")}))}else"remoteInvokeReady"==k.action?this.handleRemoteInvokeReady(p):
+"remoteInvoke"==k.action?this.handleRemoteInvoke(k,f.origin):"remoteInvokeResponse"==k.action?this.handleRemoteInvokeResponse(k):p.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}catch(Q){this.handleError(Q)}}var na=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),V=mxUtils.bind(this,function(f,k){c=!0;try{b(f,k,null,m)}catch(ea){this.handleError(ea)}c=
+!1;null!=urlParams.modified&&this.editor.setStatus("");g=na();e&&null==d&&(d=mxUtils.bind(this,function(b,d){var e=na();if(e!=g&&!c){var f=this.createLoadMessage("autosave");f.xml=e;(window.opener||window.parent).postMessage(JSON.stringify(f),"*")}g=e}),this.editor.graph.model.addListener(mxEvent.CHANGE,d),this.editor.graph.addListener("gridSizeChanged",d),this.editor.graph.addListener("shadowVisibleChanged",d),this.addListener("pageFormatChanged",d),this.addListener("pageScaleChanged",d),this.addListener("backgroundColorChanged",
+d),this.addListener("backgroundImageChanged",d),this.addListener("foldingEnabledChanged",d),this.addListener("mathEnabledChanged",d),this.addListener("gridEnabledChanged",d),this.addListener("guidesEnabledChanged",d),this.addListener("pageViewChanged",d));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var l=this.createLoadMessage("load");l.xml=f;p.postMessage(JSON.stringify(l),"*")}});null!=k&&"function"===typeof k.substring&&"data:application/vnd.visio;base64,"==k.substring(0,34)?(l="0M8R4KGxGuE"==
+k.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(k.substring(k.indexOf(",")+1)),function(b){V(b,f)},mxUtils.bind(this,function(b){this.handleError(b)}),l)):null!=k&&"function"===typeof k.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(k,"")?this.parseFile(new Blob([k],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&"<mxGraphModel"==b.responseText.substring(0,13)&&V(b.responseText,
+f)}),""):null!=k&&"function"===typeof k.substring&&this.isLucidChartData(k)?this.convertLucidChart(k,mxUtils.bind(this,function(b){V(b)}),mxUtils.bind(this,function(b){this.handleError(b)})):null==k||"object"!==typeof k||null==k.format||null==k.data&&null==k.url?(k=l(k),V(k,f)):this.loadDescriptor(k,mxUtils.bind(this,function(b){V(na(),f)}),mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"))}))}}));var p=window.opener||window.parent,k="json"==urlParams.proto?JSON.stringify({event:"init"}):
+urlParams.ready||"ready";p.postMessage(k,"*");if("json"==urlParams.proto){var t=this.editor.graph.openLink;this.editor.graph.openLink=function(b,d,c){t.apply(this,arguments);p.postMessage(JSON.stringify({event:"openLink",href:b,target:d,allowOpener:c}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var b=document.createElement("div");b.style.display="inline-block";b.style.position="absolute";b.style.paddingTop="atlas"==uiTheme?"2px":"0px";b.style.paddingLeft="8px";b.style.paddingBottom=
+"2px";var c=document.createElement("button");c.className="geBigButton";var e=c;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var g="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,g);c.setAttribute("title",g);mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));b.appendChild(c)}}else mxUtils.write(c,mxResources.get("save")),c.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+
+"+S)"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),b.appendChild(c),"1"==urlParams.saveAndExit&&(c=document.createElement("a"),mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),b.appendChild(c),e=c);"1"!=urlParams.noExitBtn&&
+(c=document.createElement("a"),e="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(c,e),c.setAttribute("title",e),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),b.appendChild(c),e=c);e.style.marginRight="20px";this.toolbar.container.appendChild(b);this.toolbar.staticElements.push(b);b.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=
+function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(b){this.importCsv(b)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(b,c){for(var d=this.editor.graph,
+e=d.getSelectionCells(),f=0;f<b.length;f++){var g=new window[b[f].layout](d);if(null!=b[f].config)for(var k in b[f].config)g[k]=b[f].config[k];this.executeLayout(function(){g.execute(d.getDefaultParent(),0==e.length?null:e)},f==b.length-1,c)}};EditorUi.prototype.importCsv=function(b,c){try{var d=b.split("\n"),e=[],f=[],g={};if(0<d.length){var k={},p=null,t=null,x=null,E=null,C=null,F=null,I=null,L=null,H=null,J="",B="auto",M="auto",P=null,T=null,N=40,R=40,G=100,D=0,A=this.editor.graph;A.getGraphBounds();
+for(var da=function(){null!=c?c(ba):(A.setSelectionCells(ba),A.scrollCellToVisible(A.getSelectionCell()))},K=A.getFreeInsertPoint(),S=K.x,aa=K.y,K=aa,ma=null,ga="auto",H=null,ia=[],la=null,W=null,fa=0;fa<d.length&&"#"==d[fa].charAt(0);){b=d[fa];for(fa++;fa<d.length&&"\\"==b.charAt(b.length-1)&&"#"==d[fa].charAt(0);)b=b.substring(0,b.length-1)+mxUtils.trim(d[fa].substring(1)),fa++;if("#"!=b.charAt(1)){var na=b.indexOf(":");if(0<na){var V=mxUtils.trim(b.substring(1,na)),Q=mxUtils.trim(b.substring(na+
+1));"label"==V?ma=A.sanitizeHtml(Q):"labelname"==V&&0<Q.length&&"-"!=Q?C=Q:"labels"==V&&0<Q.length&&"-"!=Q?F=JSON.parse(Q):"style"==V?t=Q:"parentstyle"==V?I=Q:"stylename"==V&&0<Q.length&&"-"!=Q?E=Q:"styles"==V&&0<Q.length&&"-"!=Q?x=JSON.parse(Q):"vars"==V&&0<Q.length&&"-"!=Q?p=JSON.parse(Q):"identity"==V&&0<Q.length&&"-"!=Q?L=Q:"parent"==V&&0<Q.length&&"-"!=Q?H=Q:"namespace"==V&&0<Q.length&&"-"!=Q?J=Q:"width"==V?B=Q:"height"==V?M=Q:"left"==V&&0<Q.length?P=Q:"top"==V&&0<Q.length?T=Q:"ignore"==V?W=
+Q.split(","):"connect"==V?ia.push(JSON.parse(Q)):"link"==V?la=Q:"padding"==V?D=parseFloat(Q):"edgespacing"==V?N=parseFloat(Q):"nodespacing"==V?R=parseFloat(Q):"levelspacing"==V?G=parseFloat(Q):"layout"==V&&(ga=Q)}}}if(null==d[fa])throw Error(mxResources.get("invalidOrMissingFile"));for(var ra=this.editor.csvToArray(d[fa]),V=na=null,Q=[],X=0;X<ra.length;X++)L==ra[X]&&(na=X),H==ra[X]&&(V=X),Q.push(mxUtils.trim(ra[X]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ma&&(ma="%"+
+Q[0]+"%");if(null!=ia)for(var ea=0;ea<ia.length;ea++)null==k[ia[ea].to]&&(k[ia[ea].to]={});L=[];for(X=fa+1;X<d.length;X++){var ja=this.editor.csvToArray(d[X]);if(null==ja){var sa=40<d[X].length?d[X].substring(0,40)+"...":d[X];throw Error(sa+" ("+X+"):\n"+mxResources.get("containsValidationErrors"));}0<ja.length&&L.push(ja)}A.model.beginUpdate();try{for(X=0;X<L.length;X++){var ja=L[X],U=null,ka=null!=na?J+ja[na]:null;null!=ka&&(U=A.model.getCell(ka));var d=null!=U,Z=new mxCell(ma,new mxGeometry(S,
+K,0,0),t||"whiteSpace=wrap;html=1;");Z.vertex=!0;Z.id=ka;for(var qa=0;qa<ja.length;qa++)A.setAttributeForCell(Z,Q[qa],ja[qa]);if(null!=C&&null!=F){var ta=F[Z.getAttribute(C)];null!=ta&&A.labelChanged(Z,ta)}if(null!=E&&null!=x){var ca=x[Z.getAttribute(E)];null!=ca&&(Z.style=ca)}A.setAttributeForCell(Z,"placeholders","1");Z.style=A.replacePlaceholders(Z,Z.style,p);d&&(A.model.setGeometry(U,Z.geometry),A.model.setStyle(U,Z.style),0>mxUtils.indexOf(f,U)&&f.push(U));U=Z;if(!d)for(ea=0;ea<ia.length;ea++)k[ia[ea].to][U.getAttribute(ia[ea].to)]=
+U;null!=la&&"link"!=la&&(A.setLinkForCell(U,U.getAttribute(la)),A.setAttributeForCell(U,la,null));A.fireEvent(new mxEventObject("cellsInserted","cells",[U]));var O=this.editor.graph.getPreferredSizeForCell(U);U.vertex&&(null!=P&&null!=U.getAttribute(P)&&(U.geometry.x=S+parseFloat(U.getAttribute(P))),null!=T&&null!=U.getAttribute(T)&&(U.geometry.y=aa+parseFloat(U.getAttribute(T))),"@"==B.charAt(0)&&null!=U.getAttribute(B.substring(1))?U.geometry.width=parseFloat(U.getAttribute(B.substring(1))):U.geometry.width=
+"auto"==B?O.width+D:parseFloat(B),"@"==M.charAt(0)&&null!=U.getAttribute(M.substring(1))?U.geometry.height=parseFloat(U.getAttribute(M.substring(1))):U.geometry.height="auto"==M?O.height+D:parseFloat(M),K+=U.geometry.height+R);d?(null==g[ka]&&(g[ka]=[]),g[ka].push(U)):(H=null!=V?A.model.getCell(J+ja[V]):null,e.push(U),null!=H?(H.style=A.replacePlaceholders(H,I,p),A.addCell(U,H)):f.push(A.addCell(U)))}for(var ua=f.slice(),ba=f.slice(),ea=0;ea<ia.length;ea++)for(var ya=ia[ea],X=0;X<e.length;X++){var U=
+e[X],va=mxUtils.bind(this,function(b,d,c){var e=d.getAttribute(c.from);if(null!=e&&(A.setAttributeForCell(d,c.from,null),""!=e))for(var e=e.split(","),f=0;f<e.length;f++){var g=k[c.to][e[f]];if(null!=g){var l=c.label;null!=c.fromlabel&&(l=(d.getAttribute(c.fromlabel)||"")+(l||""));null!=c.sourcelabel&&(l=A.replacePlaceholders(d,c.sourcelabel,p)+(l||""));null!=c.tolabel&&(l=(l||"")+(g.getAttribute(c.tolabel)||""));null!=c.targetlabel&&(l=(l||"")+A.replacePlaceholders(g,c.targetlabel,p));var m="target"==
+c.placeholders==!c.invert?g:b,m=null!=c.style?A.replacePlaceholders(m,c.style,p):A.createCurrentEdgeStyle(),l=A.insertEdge(null,null,l||"",c.invert?g:b,c.invert?b:g,m);if(null!=c.labels)for(m=0;m<c.labels.length;m++){var n=c.labels[m],q=new mxCell(n.label||m,new mxGeometry(null!=n.x?n.x:0,null!=n.y?n.y:0,0,0),"resizable=0;html=1;");q.vertex=!0;q.connectable=!1;q.geometry.relative=!0;null!=n.placeholders&&(q.value=A.replacePlaceholders("target"==n.placeholders==!c.invert?g:b,q.value,p));if(null!=n.dx||
+null!=n.dy)q.geometry.offset=new mxPoint(null!=n.dx?n.dx:0,null!=n.dy?n.dy:0);l.insert(q)}ba.push(l);mxUtils.remove(c.invert?b:g,ua)}}});va(U,U,ya);if(null!=g[U.id])for(qa=0;qa<g[U.id].length;qa++)va(U,g[U.id][qa],ya)}if(null!=W)for(X=0;X<e.length;X++)for(U=e[X],qa=0;qa<W.length;qa++)A.setAttributeForCell(U,mxUtils.trim(W[qa]),null);if(0<f.length){var za=new mxParallelEdgeLayout(A);za.spacing=N;za.checkOverlap=!0;var Fa=function(){0<za.spacing&&za.execute(A.getDefaultParent());for(var b=0;b<f.length;b++){var d=
+A.getCellGeometry(f[b]);d.x=Math.round(A.snap(d.x));d.y=Math.round(A.snap(d.y));"auto"==B&&(d.width=Math.round(A.snap(d.width)));"auto"==M&&(d.height=Math.round(A.snap(d.height)))}};if("["==ga.charAt(0)){var Ja=da;A.view.validate();this.executeLayoutList(JSON.parse(ga),function(){Fa();Ja()});da=null}else if("circle"==ga){var Ca=new mxCircleLayout(A);Ca.disableEdgeStyle=!1;Ca.resetEdges=!1;var Ia=Ca.isVertexIgnored;Ca.isVertexIgnored=function(b){return Ia.apply(this,arguments)||0>mxUtils.indexOf(f,
+b)};this.executeLayout(function(){Ca.execute(A.getDefaultParent());Fa()},!0,da);da=null}else if("horizontaltree"==ga||"verticaltree"==ga||"auto"==ga&&ba.length==2*f.length-1&&1==ua.length){A.view.validate();var xa=new mxCompactTreeLayout(A,"horizontaltree"==ga);xa.levelDistance=R;xa.edgeRouting=!1;xa.resetEdges=!1;this.executeLayout(function(){xa.execute(A.getDefaultParent(),0<ua.length?ua[0]:null)},!0,da);da=null}else if("horizontalflow"==ga||"verticalflow"==ga||"auto"==ga&&1==ua.length){A.view.validate();
+var Aa=new mxHierarchicalLayout(A,"horizontalflow"==ga?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Aa.intraCellSpacing=R;Aa.parallelEdgeSpacing=N;Aa.interRankCellSpacing=G;Aa.disableEdgeStyle=!1;this.executeLayout(function(){Aa.execute(A.getDefaultParent(),ba);A.moveCells(ba,S,aa)},!0,da);da=null}else if("organic"==ga||"auto"==ga&&ba.length>f.length){A.view.validate();var wa=new mxFastOrganicLayout(A);wa.forceConstant=3*R;wa.disableEdgeStyle=!1;wa.resetEdges=!1;var Ba=wa.isVertexIgnored;
+wa.isVertexIgnored=function(b){return Ba.apply(this,arguments)||0>mxUtils.indexOf(f,b)};this.executeLayout(function(){wa.execute(A.getDefaultParent());Fa()},!0,da);da=null}}this.hideDialog()}finally{A.model.endUpdate()}null!=da&&da()}}catch(Y){this.handleError(Y)}};EditorUi.prototype.getSearch=function(b){var d="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=b&&0<window.location.search.length){var c="?",e;for(e in urlParams)0>mxUtils.indexOf(b,e)&&null!=urlParams[e]&&(d+=c+e+"="+urlParams[e],
+c="&")}else d=window.location.search;return d};EditorUi.prototype.getUrl=function(b){b=null!=b?b:window.location.pathname;var d=0<b.indexOf("?")?1:0;if("1"==urlParams.offline)b+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),e;for(e in urlParams)0>mxUtils.indexOf(c,e)&&(b=0==d?b+"?":b+"&",null!=urlParams[e]&&(b+=e+"="+urlParams[e],d++))}return b};EditorUi.prototype.showLinkDialog=function(b,c,e,g,k){b=new LinkDialog(this,
+b,c,e,!0,g,k);this.showDialog(b.container,560,130,!0,!0);b.init()};EditorUi.prototype.getServiceCount=function(b){var d=1;null==this.drive&&"function"!==typeof window.DriveClient||d++;null==this.dropbox&&"function"!==typeof window.DropboxClient||d++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||d++;null!=this.gitHub&&d++;null!=this.gitLab&&d++;null!=this.notion&&d++;b&&isLocalStorage&&"1"==urlParams.browser&&d++;return d};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();
+this.updateActionStates();var b=this.getCurrentFile(),c=null!=b||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(c);this.menus.get("viewZoom").setEnabled(c);var e=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==b||b.isRestricted());this.actions.get("makeCopy").setEnabled(!e);this.actions.get("print").setEnabled(!e);this.menus.get("exportAs").setEnabled(!e);this.menus.get("embed").setEnabled(!e);e="1"!=urlParams.embed||this.editor.graph.isEnabled();
+this.menus.get("extras").setEnabled(e);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(e),this.menus.get("newLibrary").setEnabled(e));b="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=b&&b.isEditable();this.actions.get("image").setEnabled(c);this.actions.get("zoomIn").setEnabled(c);this.actions.get("zoomOut").setEnabled(c);this.actions.get("resetView").setEnabled(c);this.actions.get("undo").setEnabled(this.canUndo()&&b);this.actions.get("redo").setEnabled(this.canRedo()&&
+b);this.menus.get("edit").setEnabled(c);this.menus.get("view").setEnabled(c);this.menus.get("importFrom").setEnabled(b);this.menus.get("arrange").setEnabled(b);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(b),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(b));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=
+function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var b=this.getCurrentFile();return null!=b&&b.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);var b=this.editor.graph,c=this.getCurrentFile(),e=this.isDiagramActive(),g=b.getEditableCells(b.getSelectionCells());this.actions.get("pageSetup").setEnabled(e);this.actions.get("autosave").setEnabled(null!=
+c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(e);this.actions.get("editData").setEnabled(0<g.length||b.isSelectionEmpty());this.actions.get("shadowVisible").setEnabled(e);this.actions.get("connectionArrows").setEnabled(e);this.actions.get("connectionPoints").setEnabled(e);this.actions.get("copyStyle").setEnabled(e&&!b.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(e&&0<g.length);this.actions.get("editGeometry").setEnabled(0<g.length&&b.getModel().isVertex(g[0]));
+this.actions.get("createShape").setEnabled(e);this.actions.get("createRevision").setEnabled(e);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(e&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);
+this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());c=this.actions.get("findReplace");c.setEnabled("hidden"!=this.diagramContainer.style.visibility);c.label=mxResources.get("find")+(b.isEnabled()?"/"+mxResources.get("replace"):"")+"...";b=b.view.getState(b.getSelectionCell());
+this.actions.get("editShape").setEnabled(e&&null!=b&&null!=b.shape&&null!=b.shape.stencil)};var t=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);t.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(b,c,e,g,k,p,t,v){var d=b.editor.graph;if("xml"==e)b.hideDialog(),b.saveData(c,"xml",
+mxUtils.getXml(b.editor.getGraphXml()),"text/xml");else if("svg"==e)b.hideDialog(),b.saveData(c,"svg",mxUtils.getXml(d.getSvg(g,k,p)),"image/svg+xml");else{var f=b.getFileData(!0,null,null,null,null,!0),l=d.getGraphBounds(),m=Math.floor(l.width*k/d.view.scale),n=Math.floor(l.height*k/d.view.scale);if(f.length<=MAX_REQUEST_SIZE&&m*n<MAX_AREA)if(b.hideDialog(),"png"!=e&&"jpg"!=e&&"jpeg"!=e||!b.isExportToCanvas()){var q={globalVars:d.getExportVariables()};v&&(q.grid={size:d.gridSize,steps:d.view.gridSteps,
+color:d.view.gridColor});b.saveRequest(c,e,function(b,d){return new mxXmlRequest(EXPORT_URL,"format="+e+"&base64="+(d||"0")+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<t?"&dpi="+t:"")+"&bg="+(null!=g?g:"none")+"&w="+m+"&h="+n+"&border="+p+"&xml="+encodeURIComponent(f))})}else"png"==e?b.exportImage(k,null==g||"none"==g,!0,!1,!1,p,!0,!1,null,v,t):b.exportImage(k,!1,!0,!1,!1,p,!0,!1,"jpeg",v);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});
+EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var b=this.editor.graph,c="";if(null!=this.pages)for(var e=0;e<this.pages.length;e++){var g=b;this.currentPage!=this.pages[e]&&(g=this.createTemporaryGraph(b.getStylesheet()),this.updatePageRoot(this.pages[e]),g.model.setRoot(this.pages[e].root));c+=this.pages[e].getName()+" "+g.getIndexableText()+" "}else c=b.getIndexableText();this.editor.graph.setEnabled(!0);return c};EditorUi.prototype.showRemotelyStoredLibrary=
+function(b){var d={},c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxUtils.htmlEntities(b));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var g=document.createElement("div");g.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";g.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var k={};try{var p=mxSettings.getCustomLibraries();
+for(b=0;b<p.length;b++){var t=p[b];if("R"==t.substring(0,1)){var y=JSON.parse(decodeURIComponent(t.substring(1)));k[y[0]]={id:y[0],title:y[1],downloadUrl:y[2]}}}}catch(x){}this.remoteInvoke("getCustomLibraries",null,null,function(b){g.innerHTML="";if(0==b.length)g.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<b.length;c++){var e=b[c];k[e.id]&&(d[e.id]=e);var f=this.addCheckbox(g,e.title,k[e.id]);
+(function(b,c){mxEvent.addListener(c,"change",function(){this.checked?d[b.id]=b:delete d[b.id]})})(e,f)}},mxUtils.bind(this,function(b){g.innerHTML="";var d=document.createElement("div");d.style.padding="8px";d.style.textAlign="center";mxUtils.write(d,mxResources.get("error")+": ");mxUtils.write(d,null!=b&&null!=b.message?b.message:mxResources.get("unknownError"));g.appendChild(d)}));c.appendChild(g);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));
+var b=0,c;for(c in d)null==k[c]&&(b++,mxUtils.bind(this,function(d){this.remoteInvoke("getFileContent",[d.downloadUrl],null,mxUtils.bind(this,function(c){b--;0==b&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,d))}catch(I){this.handleError(I,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){b--;0==b&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(d[c]));for(c in k)d[c]||this.closeLibrary(new RemoteLibrary(this,null,k[c]));
+0==b&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(c.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];
+EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(b){this.remoteWin=b;for(var d=0;d<this.remoteInvokeQueue.length;d++)b.postMessage(this.remoteInvokeQueue[d],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(b){var d=b.msgMarkers,c=this.remoteInvokeCallbacks[d.callbackId];if(null==c)throw Error("No callback for "+(null!=d?d.callbackId:"null"));b.error?c.error&&c.error(b.error.errResp):c.callback&&c.callback.apply(this,
+b.resp);this.remoteInvokeCallbacks[d.callbackId]=null};EditorUi.prototype.remoteInvoke=function(b,c,e,g,k){var d=!0,f=window.setTimeout(mxUtils.bind(this,function(){d=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),l=mxUtils.bind(this,function(){window.clearTimeout(f);d&&g.apply(this,arguments)}),m=mxUtils.bind(this,function(){window.clearTimeout(f);d&&k.apply(this,arguments)});e=e||{};e.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:l,
+error:m});b=JSON.stringify({event:"remoteInvoke",funtionName:b,functionArgs:c,msgMarkers:e});null!=this.remoteWin?this.remoteWin.postMessage(b,"*"):this.remoteInvokeQueue.push(b)};EditorUi.prototype.handleRemoteInvoke=function(b,c){var d=mxUtils.bind(this,function(d,c){var e={event:"remoteInvokeResponse",msgMarkers:b.msgMarkers};null!=c?e.error={errResp:c}:null!=d&&(e.resp=d);this.remoteWin.postMessage(JSON.stringify(e),"*")});try{var e=b.funtionName,f=this.remoteInvokableFns[e];if(null!=f&&"function"===
+typeof this[e]){if(f.allowedDomains){for(var g=!1,k=0;k<f.allowedDomains.length;k++)if(c=="https://"+f.allowedDomains[k]){g=!0;break}if(!g){d(null,"Invalid Call: "+e+" is not allowed.");return}}var p=b.functionArgs;Array.isArray(p)||(p=[]);if(f.isAsync)p.push(function(){d(Array.prototype.slice.apply(arguments))}),p.push(function(b){d(null,b||"Unkown Error")}),this[e].apply(this,p);else{var t=this[e].apply(this,p);d([t])}}else d(null,"Invalid Call: "+e+" is not found.")}catch(x){d(null,"Invalid Call: An error occurred, "+
+x.message)}};EditorUi.prototype.openDatabase=function(b,c){if(null==this.database){var d=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=d)try{var e=d.open("database",2);e.onupgradeneeded=function(b){try{var d=e.result;1>b.oldVersion&&d.createObjectStore("objects",{keyPath:"key"});2>b.oldVersion&&(d.createObjectStore("files",{keyPath:"title"}),d.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(u){null!=c&&c(u)}};e.onsuccess=
+mxUtils.bind(this,function(d){var c=e.result;this.database=c;EditorUi.migrateStorageFiles&&(StorageFile.migrate(c),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(b){if(!b||"1"==urlParams.forceMigration){var c=document.createElement("iframe");c.style.display="none";c.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);
+document.body.appendChild(c);var d=!0,e=!1,f,g=0,k=mxUtils.bind(this,function(){e=!0;this.setDatabaseItem(".drawioMigrated3",!0);c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),l=mxUtils.bind(this,function(){g++;m()}),m=mxUtils.bind(this,function(){try{if(g>=f.length)k();else{var b=f[g];StorageFile.getFileContent(this,b,mxUtils.bind(this,function(d){null==d||".scratchpad"==b&&d==this.emptyLibraryXml?c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
+funtionName:"getLocalStorageFile",functionArgs:[b]}),"*"):l()}),l)}}catch(B){console.log(B)}}),p=mxUtils.bind(this,function(b){try{this.setDatabaseItem(null,[{title:b.title,size:b.data.length,lastModified:Date.now(),type:b.isLib?"L":"F"},{title:b.title,data:b.data}],l,l,["filesInfo","files"])}catch(B){console.log(B)}});b=mxUtils.bind(this,function(b){try{if(b.source==c.contentWindow){var g={};try{g=JSON.parse(b.data)}catch(M){}"init"==g.event?(c.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
+"*"),c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=g.event||e||(d?null!=g.resp&&0<g.resp.length&&null!=g.resp[0]?(f=g.resp[0],d=!1,m()):k():null!=g.resp&&0<g.resp.length&&null!=g.resp[0]?p(g.resp[0]):l())}}catch(M){console.log(M)}});window.addEventListener("message",b)}})));b(c);c.onversionchange=function(){c.close()}});e.onerror=c;e.onblocked=function(){}}catch(q){null!=c&&c(q)}else null!=c&&c()}else b(this.database)};
+EditorUi.prototype.setDatabaseItem=function(b,c,e,g,k){this.openDatabase(mxUtils.bind(this,function(d){try{k=k||"objects";Array.isArray(k)||(k=[k],b=[b],c=[c]);var f=d.transaction(k,"readwrite");f.oncomplete=e;f.onerror=g;for(d=0;d<k.length;d++)f.objectStore(k[d]).put(null!=b&&null!=b[d]?{key:b[d],data:c[d]}:c[d])}catch(v){null!=g&&g(v)}}),g)};EditorUi.prototype.removeDatabaseItem=function(b,c,e,g){this.openDatabase(mxUtils.bind(this,function(d){g=g||"objects";Array.isArray(g)||(g=[g],b=[b]);d=d.transaction(g,
+"readwrite");d.oncomplete=c;d.onerror=e;for(var f=0;f<g.length;f++)d.objectStore(g[f])["delete"](b[f])}),e)};EditorUi.prototype.getDatabaseItem=function(b,c,e,g){this.openDatabase(mxUtils.bind(this,function(d){try{g=g||"objects";var f=d.transaction([g],"readonly").objectStore(g).get(b);f.onsuccess=function(){c(f.result)};f.onerror=e}catch(u){null!=e&&e(u)}}),e)};EditorUi.prototype.getDatabaseItems=function(b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],
+"readonly").objectStore(e).openCursor(IDBKeyRange.lowerBound(0)),g=[];f.onsuccess=function(c){null==c.target.result?b(g):(g.push(c.target.result.value),c.target.result["continue"]())};f.onerror=c}catch(u){null!=c&&c(u)}}),c)};EditorUi.prototype.getDatabaseItemKeys=function(b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],"readonly").objectStore(e).getAllKeys();f.onsuccess=function(){b(f.result)};f.onerror=c}catch(n){null!=c&&c(n)}}),c)};EditorUi.prototype.commentsSupported=
+function(){var b=this.getCurrentFile();return null!=b?b.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var b=this.getCurrentFile();return null!=b?b.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var b=this.getCurrentFile();return null!=b?b.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(b,c){var d=this.getCurrentFile();null!=d?d.getComments(b,c):b([])};EditorUi.prototype.addComment=function(b,c,e){var d=this.getCurrentFile();
+null!=d?d.addComment(b,c,e):c(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var b=this.getCurrentFile();return null!=b?b.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var b=this.getCurrentFile();return null!=b?b.canComment():!0};EditorUi.prototype.newComment=function(b,c){var d=this.getCurrentFile();return null!=d?d.newComment(b,c):new DrawioComment(this,null,b,Date.now(),Date.now(),!1,c)};EditorUi.prototype.isRevisionHistorySupported=function(){var b=this.getCurrentFile();
+return null!=b&&b.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(b,c){var d=this.getCurrentFile();null!=d&&d.getRevisions?d.getRevisions(b,c):c({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var b=this.getCurrentFile();return null!=b&&(b.constructor==DriveFile&&b.isEditable()||b.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(b){b.setRequestHeader("Content-Language",
+"da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(b,c,e,g,k,p,t,v){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(b,c,e,g,k,p,t,v)};EditorUi.prototype.loadFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(b)};EditorUi.prototype.createSvgDataUri=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(b)};EditorUi.prototype.embedCssFonts=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");
+return this.editor.embedCssFonts(b,c)};EditorUi.prototype.embedExtFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(b)};EditorUi.prototype.exportToCanvas=function(b,c,e,g,k,p,t,v,y,x,E,C,F,I,L,H){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(b,c,e,g,k,p,t,v,y,x,E,C,F,I,L,H)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");
+return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(b,c,e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(b,c,e,g)};EditorUi.prototype.convertImageToDataUri=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(b,c)};EditorUi.prototype.base64Encode=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(b)};EditorUi.prototype.updateCRC=
+function(b,c,e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(b,c,e,g)};EditorUi.prototype.crc32=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(b)};EditorUi.prototype.writeGraphModelToPng=function(b,c,e,g,k){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(b,c,e,g,k)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=
+urlParams.forceMigration)return null;for(var b=[],c=0;c<localStorage.length;c++){var e=localStorage.key(c),g=localStorage.getItem(e);if(0<e.length&&(".scratchpad"==e||"."!=e.charAt(0))&&0<g.length){var k="<mxfile "===g.substring(0,8)||"<?xml"===g.substring(0,5)||"\x3c!--[if IE]>"===g.substring(0,12),g="<mxlibrary>"===g.substring(0,11);(k||g)&&b.push(e)}}return b};EditorUi.prototype.getLocalStorageFile=function(b){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;
+var c=localStorage.getItem(b);return{title:b,data:c,isLib:"<mxlibrary>"===c.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(b,c,e,k,g,p){function t(){for(var b=C.getElementsByTagName("div"),c=0,d=0;d<b.length;d++)"none"!=b[d].style.display&&b[d].parentNode==C&&c++;F.style.display=0==c?"block":"none"}function d(b,c,d,e){function f(){c.removeChild(l);c.removeChild(m);k.style.display="block";g.style.display="block"}y={div:c,comment:b,saveCallback:d,deleteOnCancel:e};var g=c.querySelector(".geCommentTxt"),k=c.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
"geCommentEditTxtArea";l.style.minHeight=g.offsetHeight+"px";l.value=b.content;c.insertBefore(l,g);var m=document.createElement("div");m.className="geCommentEditBtns";var p=mxUtils.button(mxResources.get("cancel"),function(){e?(c.parentNode.removeChild(c),t()):f();y=null});p.className="geCommentEditBtn";m.appendChild(p);var n=mxUtils.button(mxResources.get("save"),function(){g.innerHTML="";b.content=l.value;mxUtils.write(g,b.content);f();d(b);y=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this,
function(b){mxEvent.isConsumed(b)||((mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b))&&13==b.keyCode?(n.click(),mxEvent.consume(b)):27==b.keyCode&&(p.click(),mxEvent.consume(b)))}));n.focus();n.className="geCommentEditBtn gePrimaryBtn";m.appendChild(n);c.insertBefore(m,g);k.style.display="none";g.style.display="none";l.focus()}function f(c,d){d.innerHTML="";var e=new Date(c.modifiedDate),f=b.timeSince(e);null==f&&(f=mxResources.get("lessThanAMinute"));mxUtils.write(d,mxResources.get("timeAgo",
[f],"{1} ago"));d.setAttribute("title",e.toLocaleDateString()+" "+e.toLocaleTimeString())}function l(b){var c=document.createElement("img");c.className="geCommentBusyImg";c.src=IMAGE_PATH+"/spin.gif";b.appendChild(c);b.busyImg=c}function m(b){b.style.border="1px solid red";b.removeChild(b.busyImg)}function q(b){b.style.border="";b.removeChild(b.busyImg)}function n(c,e,g,k,p){function B(b,d,e){var f=document.createElement("li");f.className="geCommentAction";var g=document.createElement("a");g.className=
-"geCommentActionLnk";mxUtils.write(g,b);f.appendChild(g);mxEvent.addListener(g,"click",function(b){d(b,c);b.preventDefault();mxEvent.consume(b)});G.appendChild(f);e&&(f.style.display="none")}function N(){function b(c){d.push(e);if(null!=c.replies)for(var f=0;f<c.replies.length;f++)e=e.nextSibling,b(c.replies[f])}var d=[],e=F;b(c);return{pdiv:e,replies:d}}function x(e,f,g,p,t){function v(){l(C);c.addReply(x,function(b){x.id=b;c.replies.push(x);q(C);g&&g()},function(c){u();m(C);b.handleError(c,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},p,t)}function u(){d(x,C,function(b){v()},!0)}var B=N().pdiv,x=b.newComment(e,b.getCurrentUser());x.pCommentId=c.id;null==c.replies&&(c.replies=[]);var C=n(x,c.replies,B,k+1);f?u():v()}if(p||!c.isResolved){E.style.display="none";var F=document.createElement("div");F.className="geCommentContainer";F.setAttribute("data-commentId",c.id);F.style.marginLeft=20*k+5+"px";c.isResolved&&!Editor.isDarkMode()&&(F.style.backgroundColor="ghostWhite");
-var R=document.createElement("div");R.className="geCommentHeader";var T=document.createElement("img");T.className="geCommentUserImg";T.src=c.user.pictureUrl||Editor.userImage;R.appendChild(T);T=document.createElement("div");T.className="geCommentHeaderTxt";R.appendChild(T);var J=document.createElement("div");J.className="geCommentUsername";mxUtils.write(J,c.user.displayName||"");T.appendChild(J);J=document.createElement("div");J.className="geCommentDate";J.setAttribute("data-commentId",c.id);f(c,
-J);T.appendChild(J);F.appendChild(R);R=document.createElement("div");R.className="geCommentTxt";mxUtils.write(R,c.content||"");F.appendChild(R);c.isLocked&&(F.style.opacity="0.5");R=document.createElement("div");R.className="geCommentActions";var G=document.createElement("ul");G.className="geCommentActionsList";R.appendChild(G);u||c.isLocked||0!=k&&!v||B(mxResources.get("reply"),function(){x("",!0)},c.isResolved);T=b.getCurrentUser();null==T||T.id!=c.user.id||u||c.isLocked||(B(mxResources.get("edit"),
-function(){function e(){d(c,F,function(){l(F);c.editComment(c.content,function(){q(F)},function(c){m(F);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}e()},c.isResolved),B(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){l(F);c.deleteComment(function(b){if(!0===b){b=F.querySelector(".geCommentTxt");b.innerHTML="";mxUtils.write(b,mxResources.get("msgDeleted"));var d=F.querySelectorAll(".geCommentAction");for(b=
-0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);q(F);F.style.opacity="0.5"}else{d=N(c).replies;for(b=0;b<d.length;b++)C.removeChild(d[b]);for(b=0;b<e.length;b++)if(e[b]==c){e.splice(b,1);break}E.style.display=0==C.getElementsByTagName("div").length?"block":"none"}},function(c){m(F);b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));u||c.isLocked||0!=k||B(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(b){function d(){var d=
+"geCommentActionLnk";mxUtils.write(g,b);f.appendChild(g);mxEvent.addListener(g,"click",function(b){d(b,c);b.preventDefault();mxEvent.consume(b)});I.appendChild(f);e&&(f.style.display="none")}function N(){function b(c){d.push(e);if(null!=c.replies)for(var f=0;f<c.replies.length;f++)e=e.nextSibling,b(c.replies[f])}var d=[],e=G;b(c);return{pdiv:e,replies:d}}function x(e,f,g,p,t){function v(){l(C);c.addReply(x,function(b){x.id=b;c.replies.push(x);q(C);g&&g()},function(c){u();m(C);b.handleError(c,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},p,t)}function u(){d(x,C,function(b){v()},!0)}var B=N().pdiv,x=b.newComment(e,b.getCurrentUser());x.pCommentId=c.id;null==c.replies&&(c.replies=[]);var C=n(x,c.replies,B,k+1);f?u():v()}if(p||!c.isResolved){F.style.display="none";var G=document.createElement("div");G.className="geCommentContainer";G.setAttribute("data-commentId",c.id);G.style.marginLeft=20*k+5+"px";c.isResolved&&!Editor.isDarkMode()&&(G.style.backgroundColor="ghostWhite");
+var R=document.createElement("div");R.className="geCommentHeader";var T=document.createElement("img");T.className="geCommentUserImg";T.src=c.user.pictureUrl||Editor.userImage;R.appendChild(T);T=document.createElement("div");T.className="geCommentHeaderTxt";R.appendChild(T);var E=document.createElement("div");E.className="geCommentUsername";mxUtils.write(E,c.user.displayName||"");T.appendChild(E);E=document.createElement("div");E.className="geCommentDate";E.setAttribute("data-commentId",c.id);f(c,
+E);T.appendChild(E);G.appendChild(R);R=document.createElement("div");R.className="geCommentTxt";mxUtils.write(R,c.content||"");G.appendChild(R);c.isLocked&&(G.style.opacity="0.5");R=document.createElement("div");R.className="geCommentActions";var I=document.createElement("ul");I.className="geCommentActionsList";R.appendChild(I);u||c.isLocked||0!=k&&!v||B(mxResources.get("reply"),function(){x("",!0)},c.isResolved);T=b.getCurrentUser();null==T||T.id!=c.user.id||u||c.isLocked||(B(mxResources.get("edit"),
+function(){function e(){d(c,G,function(){l(G);c.editComment(c.content,function(){q(G)},function(c){m(G);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}e()},c.isResolved),B(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){l(G);c.deleteComment(function(b){if(!0===b){b=G.querySelector(".geCommentTxt");b.innerHTML="";mxUtils.write(b,mxResources.get("msgDeleted"));var d=G.querySelectorAll(".geCommentAction");for(b=
+0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);q(G);G.style.opacity="0.5"}else{d=N(c).replies;for(b=0;b<d.length;b++)C.removeChild(d[b]);for(b=0;b<e.length;b++)if(e[b]==c){e.splice(b,1);break}F.style.display=0==C.getElementsByTagName("div").length?"block":"none"}},function(c){m(G);b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));u||c.isLocked||0!=k||B(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(b){function d(){var d=
b.target;d.innerHTML="";c.isResolved=!c.isResolved;mxUtils.write(d,c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var e=c.isResolved?"none":"",f=N(c).replies,g=Editor.isDarkMode()?"transparent":c.isResolved?"ghostWhite":"white",k=0;k<f.length;k++){f[k].style.backgroundColor=g;for(var l=f[k].querySelectorAll(".geCommentAction"),m=0;m<l.length;m++)l[m]!=d.parentNode&&(l[m].style.display=e);H||(f[k].style.display="none")}t()}c.isResolved?x(mxResources.get("reOpened")+": ",!0,
-d,!1,!0):x(mxResources.get("markedAsResolved"),!1,d,!0)});F.appendChild(R);null!=g?C.insertBefore(F,g.nextSibling):C.appendChild(F);for(g=0;null!=c.replies&&g<c.replies.length;g++)R=c.replies[g],R.isResolved=c.isResolved,n(R,c.replies,null,k+1,p);null!=y&&(y.comment.id==c.id?(p=c.content,c.content=y.comment.content,d(c,F,y.saveCallback,y.deleteOnCancel),c.content=p):null==y.comment.id&&y.comment.pCommentId==c.id&&(C.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel)));return F}}
-var u=!b.canComment(),v=b.canReplyToReplies(),y=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var G=EditorUi.compactUi?"26px":"30px",C=document.createElement("div");C.className="geCommentsList";C.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";C.style.bottom=parseInt(G)+7+"px";x.appendChild(C);var E=document.createElement("span");E.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(E,mxResources.get("noCommentsFound"));var J=document.createElement("div");J.className="geToolbarContainer geCommentsToolbar";J.style.height=G;J.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";J.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";G=document.createElement("a");G.className="geButton";if(!u){var L=G.cloneNode();L.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';L.setAttribute("title",mxResources.get("create")+
-"...");mxEvent.addListener(L,"click",function(c){function e(){d(f,g,function(c){l(g);b.addComment(c,function(b){c.id=b;K.push(c);q(g)},function(c){m(g);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var f=b.newComment("",b.getCurrentUser()),g=n(f,K,null,0);e();c.preventDefault();mxEvent.consume(c)});J.appendChild(L)}L=G.cloneNode();L.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';L.setAttribute("title",mxResources.get("showResolved"));
-var H=!1;Editor.isDarkMode()&&(L.style.filter="invert(100%)");mxEvent.addListener(L,"click",function(b){this.className=(H=!H)?"geButton geCheckedBtn":"geButton";B();b.preventDefault();mxEvent.consume(b)});J.appendChild(L);b.commentsRefreshNeeded()&&(L=G.cloneNode(),L.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',L.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(L.style.filter="invert(100%)"),mxEvent.addListener(L,"click",function(b){B();
-b.preventDefault();mxEvent.consume(b)}),J.appendChild(L));b.commentsSaveNeeded()&&(G=G.cloneNode(),G.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',G.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(G.style.filter="invert(100%)"),mxEvent.addListener(G,"click",function(b){p();b.preventDefault();mxEvent.consume(b)}),J.appendChild(G));x.appendChild(J);var K=[],B=mxUtils.bind(this,function(){this.hasError=!1;if(null!=y)try{y.div=y.div.cloneNode(!0);
+d,!1,!0):x(mxResources.get("markedAsResolved"),!1,d,!0)});G.appendChild(R);null!=g?C.insertBefore(G,g.nextSibling):C.appendChild(G);for(g=0;null!=c.replies&&g<c.replies.length;g++)R=c.replies[g],R.isResolved=c.isResolved,n(R,c.replies,null,k+1,p);null!=y&&(y.comment.id==c.id?(p=c.content,c.content=y.comment.content,d(c,G,y.saveCallback,y.deleteOnCancel),c.content=p):null==y.comment.id&&y.comment.pCommentId==c.id&&(C.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel)));return G}}
+var u=!b.canComment(),v=b.canReplyToReplies(),y=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var E=EditorUi.compactUi?"26px":"30px",C=document.createElement("div");C.className="geCommentsList";C.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";C.style.bottom=parseInt(E)+7+"px";x.appendChild(C);var F=document.createElement("span");F.style.cssText="display:none;padding-top:10px;text-align:center;";
+mxUtils.write(F,mxResources.get("noCommentsFound"));var I=document.createElement("div");I.className="geToolbarContainer geCommentsToolbar";I.style.height=E;I.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";I.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";E=document.createElement("a");E.className="geButton";if(!u){var L=E.cloneNode();L.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';L.setAttribute("title",mxResources.get("create")+
+"...");mxEvent.addListener(L,"click",function(c){function e(){d(f,g,function(c){l(g);b.addComment(c,function(b){c.id=b;J.push(c);q(g)},function(c){m(g);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var f=b.newComment("",b.getCurrentUser()),g=n(f,J,null,0);e();c.preventDefault();mxEvent.consume(c)});I.appendChild(L)}L=E.cloneNode();L.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';L.setAttribute("title",mxResources.get("showResolved"));
+var H=!1;Editor.isDarkMode()&&(L.style.filter="invert(100%)");mxEvent.addListener(L,"click",function(b){this.className=(H=!H)?"geButton geCheckedBtn":"geButton";B();b.preventDefault();mxEvent.consume(b)});I.appendChild(L);b.commentsRefreshNeeded()&&(L=E.cloneNode(),L.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',L.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(L.style.filter="invert(100%)"),mxEvent.addListener(L,"click",function(b){B();
+b.preventDefault();mxEvent.consume(b)}),I.appendChild(L));b.commentsSaveNeeded()&&(E=E.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',E.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(E.style.filter="invert(100%)"),mxEvent.addListener(E,"click",function(b){p();b.preventDefault();mxEvent.consume(b)}),I.appendChild(E));x.appendChild(I);var J=[],B=mxUtils.bind(this,function(){this.hasError=!1;if(null!=y)try{y.div=y.div.cloneNode(!0);
var c=y.div.querySelector(".geCommentEditTxtArea"),e=y.div.querySelector(".geCommentEditBtns");y.comment.content=c.value;c.parentNode.removeChild(c);e.parentNode.removeChild(e)}catch(N){b.handleError(N)}C.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";v=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(b){function c(b){if(null!=b){b.sort(function(b,c){return new Date(b.modifiedDate)-
-new Date(c.modifiedDate)});for(var d=0;d<b.length;d++)c(b[d].replies)}}b.sort(function(b,c){return new Date(b.modifiedDate)-new Date(c.modifiedDate)});C.innerHTML="";C.appendChild(E);E.style.display="block";K=b;for(b=0;b<K.length;b++)c(K[b].replies),n(K[b],K,null,0,H);null!=y&&null==y.comment.id&&null==y.comment.pCommentId&&(C.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel))},mxUtils.bind(this,function(b){C.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(b&&b.message?
-": "+b.message:""));this.hasError=!0})):C.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});B();this.refreshComments=B;J=mxUtils.bind(this,function(){function b(c){var e=d[c.id];if(null!=e)for(f(c,e),e=0;null!=c.replies&&e<c.replies.length;e++)b(c.replies[e])}if(this.window.isVisible()){for(var c=C.querySelectorAll(".geCommentDate"),d={},e=0;e<c.length;e++){var g=c[e];d[g.getAttribute("data-commentId")]=g}for(e=0;e<K.length;e++)b(K[e])}});setInterval(J,6E4);this.refreshCommentsTime=J;this.window=
+new Date(c.modifiedDate)});for(var d=0;d<b.length;d++)c(b[d].replies)}}b.sort(function(b,c){return new Date(b.modifiedDate)-new Date(c.modifiedDate)});C.innerHTML="";C.appendChild(F);F.style.display="block";J=b;for(b=0;b<J.length;b++)c(J[b].replies),n(J[b],J,null,0,H);null!=y&&null==y.comment.id&&null==y.comment.pCommentId&&(C.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel))},mxUtils.bind(this,function(b){C.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(b&&b.message?
+": "+b.message:""));this.hasError=!0})):C.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});B();this.refreshComments=B;I=mxUtils.bind(this,function(){function b(c){var e=d[c.id];if(null!=e)for(f(c,e),e=0;null!=c.replies&&e<c.replies.length;e++)b(c.replies[e])}if(this.window.isVisible()){for(var c=C.querySelectorAll(".geCommentDate"),d={},e=0;e<c.length;e++){var g=c[e];d[g.getAttribute("data-commentId")]=g}for(e=0;e<J.length;e++)b(J[e])}});setInterval(I,6E4);this.refreshCommentsTime=I;this.window=
new mxWindow(mxResources.get("comments"),x,c,e,k,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(b,c){var d=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||
document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,d-this.table.clientHeight-48));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};var M=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",M);this.destroy=function(){mxEvent.removeListener(window,"resize",M);this.window.destroy()}},ConfirmDialog=function(b,c,e,
k,g,p,t,d,f,l,m){var q=document.createElement("div");q.style.textAlign="center";m=null!=m?m:44;var n=document.createElement("div");n.style.padding="6px";n.style.overflow="auto";n.style.maxHeight=m+"px";n.style.lineHeight="1.2em";mxUtils.write(n,c);q.appendChild(n);null!=l&&(n=document.createElement("div"),n.style.padding="6px 0 6px 0",c=document.createElement("img"),c.setAttribute("src",l),n.appendChild(c),q.appendChild(n));l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace=
@@ -3828,15 +3832,15 @@ c==mxConstants.DIRECTION_WEST?-1:1,0<=e&&e<=f.length-1&&v.setSelectionCell(f[e].
0<v.getIncomingTreeEdges(d).length&&this.addMenuItems(c,["selectSiblings","selectParent"],null,e)):0<v.model.getEdgeCount(d)&&this.addMenuItems(c,["selectConnections"],null,e)}};u.actions.addAction("selectChildren",function(){if(v.isEnabled()&&1==v.getSelectionCount()){var b=v.getSelectionCell(),b=v.getOutgoingTreeEdges(b);if(null!=b){for(var c=[],d=0;d<b.length;d++)c.push(v.model.getTerminal(b[d],!1));v.setSelectionCells(c)}}},null,null,"Alt+Shift+X");u.actions.addAction("selectSiblings",function(){if(v.isEnabled()&&
1==v.getSelectionCount()){var b=v.getSelectionCell(),b=v.getIncomingTreeEdges(b);if(null!=b&&0<b.length&&(b=v.getOutgoingTreeEdges(v.model.getTerminal(b[0],!0)),null!=b)){for(var c=[],d=0;d<b.length;d++)c.push(v.model.getTerminal(b[d],!1));v.setSelectionCells(c)}}},null,null,"Alt+Shift+S");u.actions.addAction("selectParent",function(){if(v.isEnabled()&&1==v.getSelectionCount()){var b=v.getSelectionCell(),b=v.getIncomingTreeEdges(b);null!=b&&0<b.length&&v.setSelectionCell(v.model.getTerminal(b[0],
!0))}},null,null,"Alt+Shift+P");u.actions.addAction("selectDescendants",function(b,c){var d=v.getSelectionCell();if(v.isEnabled()&&v.model.isVertex(d)){if(null!=c&&mxEvent.isAltDown(c))v.setSelectionCells(v.model.getTreeEdges(d,null==c||!mxEvent.isShiftDown(c),null==c||!mxEvent.isControlDown(c)));else{var e=[];v.traverse(d,!0,function(b,d){var f=null!=d&&v.isTreeEdge(d);f&&e.push(d);null!=d&&!f||null!=c&&mxEvent.isShiftDown(c)||e.push(b);return null==d||f})}v.setSelectionCells(e)}},null,null,"Alt+Shift+D");
-var G=v.removeCells;v.removeCells=function(c,d){d=null!=d?d:!0;null==c&&(c=this.getDeletableCells(this.getSelectionCells()));d&&(c=this.getDeletableCells(this.addAllEdges(c)));for(var f=[],g=0;g<c.length;g++){var k=c[g];y.isEdge(k)&&e(k)&&(f.push(k),k=y.getTerminal(k,!1));if(b(k)){var l=[];v.traverse(k,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});0<l.length&&(f=f.concat(l),k=v.getIncomingTreeEdges(c[g]),c=c.concat(k))}else null!=k&&f.push(c[g])}c=
-f;return G.apply(this,arguments)};u.hoverIcons.getStateAt=function(c,d,e){return b(c.cell)?null:this.graph.view.getState(this.graph.getCellAt(d,e))};var C=v.duplicateCells;v.duplicateCells=function(c,d){c=null!=c?c:this.getSelectionCells();for(var e=c.slice(0),f=0;f<e.length;f++){var g=v.view.getState(e[f]);if(null!=g&&b(g.cell))for(var k=v.getIncomingTreeEdges(g.cell),g=0;g<k.length;g++)mxUtils.remove(k[g],c)}this.model.beginUpdate();try{var l=C.call(this,c,d);if(l.length==c.length)for(f=0;f<c.length;f++)if(b(c[f])){var m=
-v.getIncomingTreeEdges(l[f]),k=v.getIncomingTreeEdges(c[f]);if(0==m.length&&0<k.length){var p=this.cloneCell(k[0]);this.addEdge(p,v.getDefaultParent(),this.model.getTerminal(k[0],!0),l[f])}}}finally{this.model.endUpdate()}return l};var E=v.moveCells;v.moveCells=function(c,d,e,f,g,k,l){var m=null;this.model.beginUpdate();try{var p=g,n=this.getCurrentCellStyle(g);if(null!=c&&b(g)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var q=0;q<c.length;q++)if(b(c[q])||v.model.isEdge(c[q])&&null==v.model.getTerminal(c[q],
-!0)){g=v.model.getParent(c[q]);break}if(null!=p&&g!=p&&null!=this.view.getState(c[0])){var t=v.getIncomingTreeEdges(c[0]);if(0<t.length){var u=v.view.getState(v.model.getTerminal(t[0],!0));if(null!=u){var B=v.view.getState(p);null!=B&&(d=(B.getCenterX()-u.getCenterX())/v.view.scale,e=(B.getCenterY()-u.getCenterY())/v.view.scale)}}}}m=E.apply(this,arguments);if(null!=m&&null!=c&&m.length==c.length)for(q=0;q<m.length;q++)if(this.model.isEdge(m[q]))b(p)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[q],
-!0))&&this.model.setTerminal(m[q],p,!0);else if(b(c[q])&&(t=v.getIncomingTreeEdges(c[q]),0<t.length))if(!f)b(p)&&0>mxUtils.indexOf(c,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],p,!0);else if(0==v.getIncomingTreeEdges(m[q]).length){n=p;if(null==n||n==v.model.getParent(c[q]))n=v.model.getTerminal(t[0],!0);f=this.cloneCell(t[0]);this.addEdge(f,v.getDefaultParent(),n,m[q])}}finally{this.model.endUpdate()}return m};if(null!=u.sidebar){var J=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=
-function(c,d,e,f){var g=v.model,k=null;g.beginUpdate();try{if(k=J.apply(this,arguments),b(c))for(var l=0;l<k.length;l++)if(g.isEdge(k[l])&&null==g.getTerminal(k[l],!0)){g.setTerminal(k[l],c,!0);var m=v.getCellGeometry(k[l]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return k}}var L={88:u.actions.get("selectChildren"),84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},H=u.onKeyDown;u.onKeyDown=function(c){try{if(v.isEnabled()&&
+var E=v.removeCells;v.removeCells=function(c,d){d=null!=d?d:!0;null==c&&(c=this.getDeletableCells(this.getSelectionCells()));d&&(c=this.getDeletableCells(this.addAllEdges(c)));for(var f=[],g=0;g<c.length;g++){var k=c[g];y.isEdge(k)&&e(k)&&(f.push(k),k=y.getTerminal(k,!1));if(b(k)){var l=[];v.traverse(k,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});0<l.length&&(f=f.concat(l),k=v.getIncomingTreeEdges(c[g]),c=c.concat(k))}else null!=k&&f.push(c[g])}c=
+f;return E.apply(this,arguments)};u.hoverIcons.getStateAt=function(c,d,e){return b(c.cell)?null:this.graph.view.getState(this.graph.getCellAt(d,e))};var C=v.duplicateCells;v.duplicateCells=function(c,d){c=null!=c?c:this.getSelectionCells();for(var e=c.slice(0),f=0;f<e.length;f++){var g=v.view.getState(e[f]);if(null!=g&&b(g.cell))for(var k=v.getIncomingTreeEdges(g.cell),g=0;g<k.length;g++)mxUtils.remove(k[g],c)}this.model.beginUpdate();try{var l=C.call(this,c,d);if(l.length==c.length)for(f=0;f<c.length;f++)if(b(c[f])){var m=
+v.getIncomingTreeEdges(l[f]),k=v.getIncomingTreeEdges(c[f]);if(0==m.length&&0<k.length){var p=this.cloneCell(k[0]);this.addEdge(p,v.getDefaultParent(),this.model.getTerminal(k[0],!0),l[f])}}}finally{this.model.endUpdate()}return l};var F=v.moveCells;v.moveCells=function(c,d,e,f,g,k,l){var m=null;this.model.beginUpdate();try{var p=g,n=this.getCurrentCellStyle(g);if(null!=c&&b(g)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var q=0;q<c.length;q++)if(b(c[q])||v.model.isEdge(c[q])&&null==v.model.getTerminal(c[q],
+!0)){g=v.model.getParent(c[q]);break}if(null!=p&&g!=p&&null!=this.view.getState(c[0])){var t=v.getIncomingTreeEdges(c[0]);if(0<t.length){var u=v.view.getState(v.model.getTerminal(t[0],!0));if(null!=u){var B=v.view.getState(p);null!=B&&(d=(B.getCenterX()-u.getCenterX())/v.view.scale,e=(B.getCenterY()-u.getCenterY())/v.view.scale)}}}}m=F.apply(this,arguments);if(null!=m&&null!=c&&m.length==c.length)for(q=0;q<m.length;q++)if(this.model.isEdge(m[q]))b(p)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[q],
+!0))&&this.model.setTerminal(m[q],p,!0);else if(b(c[q])&&(t=v.getIncomingTreeEdges(c[q]),0<t.length))if(!f)b(p)&&0>mxUtils.indexOf(c,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],p,!0);else if(0==v.getIncomingTreeEdges(m[q]).length){n=p;if(null==n||n==v.model.getParent(c[q]))n=v.model.getTerminal(t[0],!0);f=this.cloneCell(t[0]);this.addEdge(f,v.getDefaultParent(),n,m[q])}}finally{this.model.endUpdate()}return m};if(null!=u.sidebar){var I=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=
+function(c,d,e,f){var g=v.model,k=null;g.beginUpdate();try{if(k=I.apply(this,arguments),b(c))for(var l=0;l<k.length;l++)if(g.isEdge(k[l])&&null==g.getTerminal(k[l],!0)){g.setTerminal(k[l],c,!0);var m=v.getCellGeometry(k[l]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return k}}var L={88:u.actions.get("selectChildren"),84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},H=u.onKeyDown;u.onKeyDown=function(c){try{if(v.isEnabled()&&
!v.isEditing()&&b(v.getSelectionCell())&&1==v.getSelectionCount()){var d=null;0<v.getIncomingTreeEdges(v.getSelectionCell()).length&&(9==c.which?d=mxEvent.isShiftDown(c)?l(v.getSelectionCell()):m(v.getSelectionCell()):13==c.which&&(d=f(v.getSelectionCell(),!mxEvent.isShiftDown(c))));if(null!=d&&0<d.length)1==d.length&&v.model.isEdge(d[0])?v.setSelectionCell(v.model.getTerminal(d[0],!1)):v.setSelectionCell(d[d.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(v.view.getState(v.getSelectionCell())),
v.startEditingAtCell(v.getSelectionCell()),mxEvent.consume(c);else if(mxEvent.isAltDown(c)&&mxEvent.isShiftDown(c)){var e=L[c.keyCode];null!=e&&(e.funct(c),mxEvent.consume(c))}else 37==c.keyCode?(n(v.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(c)):38==c.keyCode?(n(v.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(c)):39==c.keyCode?(n(v.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(c)):40==c.keyCode&&(n(v.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(c))}}catch(D){u.handleError(D)}mxEvent.isConsumed(c)||H.apply(this,arguments)};var K=v.connectVertex;v.connectVertex=function(c,e,g,k,p,n,q){var t=v.getIncomingTreeEdges(c);if(b(c)){var u=d(c),B=u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST,x=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST;return u==e||0==t.length?m(c,e):B==x?l(c):f(c,e!=mxConstants.DIRECTION_NORTH&&e!=mxConstants.DIRECTION_WEST)}return K.apply(this,arguments)};v.getSubtree=function(d){var e=
+mxEvent.consume(c))}}catch(D){u.handleError(D)}mxEvent.isConsumed(c)||H.apply(this,arguments)};var J=v.connectVertex;v.connectVertex=function(c,e,g,k,p,n,q){var t=v.getIncomingTreeEdges(c);if(b(c)){var u=d(c),B=u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST,x=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST;return u==e||0==t.length?m(c,e):B==x?l(c):f(c,e!=mxConstants.DIRECTION_NORTH&&e!=mxConstants.DIRECTION_WEST)}return J.apply(this,arguments)};v.getSubtree=function(d){var e=
[d];!c(d)&&!b(d)||t(d)||v.traverse(d,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&0>mxUtils.indexOf(e,c)&&e.push(c);(null==c||d)&&0>mxUtils.indexOf(e,b)&&e.push(b);return null==c||d});return e};var B=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){B.apply(this,arguments);(c(this.state.cell)||b(this.state.cell))&&!t(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(b){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(b),mxEvent.getClientY(b),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(b);
this.graph.isMouseDown=!0;u.hoverIcons.reset();mxEvent.consume(b)})))};var M=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){M.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var P=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){P.apply(this,
@@ -3913,50 +3917,50 @@ e){"1"==urlParams.sketch?(d.menus.addMenuItems(b,["insertFreehand"],e),d.insertT
620,420,!0,!1);b.init()}),c)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(b,c){for(var d=0;d<n.length;d++)"-"==n[d]?b.addSeparator(c):p(b,c,mxResources.get(n[d])+"...",n[d])})));this.put("view",new Menu(mxUtils.bind(this,function(b,c){d.menus.addMenuItems(b,"grid guides ruler - connectionArrows connectionPoints -".split(" "),c);if("undefined"!==typeof MathJax){var e=d.menus.addMenuItem(b,"mathematicalTypesetting",c);d.menus.addLinkToItem(e,"https://www.diagrams.net/doc/faq/math-typesetting")}d.menus.addMenuItems(b,
["copyConnect","collapseExpand","-"],c);e=d.getCurrentFile();null!=e&&null!=d.fileNode&&(e=null!=e.getTitle()?e.getTitle():d.defaultFilename,/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||this.addMenuItems(b,["properties"],c));d.menus.addMenuItems(b,["pageScale"],c);"1"!=urlParams.sketch?(d.menus.addMenuItems(b,["-","fullscreen"],c),(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&d.menus.addMenuItems(b,["toggleDarkMode"],c)):d.menus.addMenuItems(b,["pageSetup","-","layers","tags"],c)})))};
EditorUi.prototype.installFormatToolbar=function(b){var c=this.editor.graph,d=document.createElement("div");d.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";c.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(e,f){0<c.getSelectionCount()?(b.appendChild(d),d.innerHTML="Selected: "+c.getSelectionCount()):null!=d.parentNode&&d.parentNode.removeChild(d)}))};
-var G=EditorUi.prototype.init;EditorUi.prototype.init=function(){function d(b,c,d){var e=n.menus.get(b),f=u.addMenu(mxResources.get(b),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}),t);f.className="geMenuItem";f.style.display="inline-block";f.style.boxSizing="border-box";f.style.top="6px";f.style.marginRight="6px";f.style.height="30px";f.style.paddingTop="6px";f.style.paddingBottom="6px";f.style.cursor="pointer";f.setAttribute("title",mxResources.get(b));n.menus.menuCreated(e,f,"geMenuItem");
+var E=EditorUi.prototype.init;EditorUi.prototype.init=function(){function d(b,c,d){var e=n.menus.get(b),f=u.addMenu(mxResources.get(b),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}),t);f.className="geMenuItem";f.style.display="inline-block";f.style.boxSizing="border-box";f.style.top="6px";f.style.marginRight="6px";f.style.height="30px";f.style.paddingTop="6px";f.style.paddingBottom="6px";f.style.cursor="pointer";f.setAttribute("title",mxResources.get(b));n.menus.menuCreated(e,f,"geMenuItem");
null!=d?(f.style.backgroundImage="url("+d+")",f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.width="34px",f.innerHTML=""):c||(f.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",f.style.backgroundPosition="right 6px center",f.style.backgroundRepeat="no-repeat",f.style.paddingRight="22px");return f}function f(b,c,d,e,f,g){var k=document.createElement("a");k.className="geMenuItem";k.style.display="inline-block";
k.style.boxSizing="border-box";k.style.height="30px";k.style.padding="6px";k.style.position="relative";k.style.verticalAlign="top";k.style.top="0px";"1"==urlParams.sketch&&(k.style.borderStyle="none",k.style.boxShadow="none",k.style.padding="6px",k.style.margin="0px");null!=n.statusContainer?q.insertBefore(k,n.statusContainer):q.appendChild(k);null!=g?(k.style.backgroundImage="url("+g+")",k.style.backgroundPosition="center center",k.style.backgroundRepeat="no-repeat",k.style.backgroundSize="24px 24px",
k.style.width="34px"):mxUtils.write(k,b);mxEvent.addListener(k,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}));mxEvent.addListener(k,"click",function(b){"disabled"!=k.getAttribute("disabled")&&c(b);mxEvent.consume(b)});null==d&&(k.style.marginRight="4px");null!=e&&k.setAttribute("title",e);null!=f&&(b=function(){f.isEnabled()?(k.removeAttribute("disabled"),k.style.cursor="pointer"):(k.setAttribute("disabled","disabled"),k.style.cursor="default")},
f.addListener("stateChanged",b),p.addListener("enabledChanged",b),b());return k}function g(b,c,d){d=document.createElement("div");d.className="geMenuItem";d.style.display="inline-block";d.style.verticalAlign="top";d.style.marginRight="6px";d.style.padding="0 4px 0 4px";d.style.height="30px";d.style.position="relative";d.style.top="0px";"1"==urlParams.sketch&&(d.style.boxShadow="none");for(var e=0;e<b.length;e++)null!=b[e]&&("1"==urlParams.sketch&&(b[e].style.padding="10px 8px",b[e].style.width="30px"),
b[e].style.margin="0px",b[e].style.boxShadow="none",d.appendChild(b[e]));null!=c&&mxUtils.setOpacity(d,c);null!=n.statusContainer&&"1"!=urlParams.sketch?q.insertBefore(d,n.statusContainer):q.appendChild(d);return d}function k(){for(var b=q.firstChild;null!=b;){var c=b.nextSibling;"geMenuItem"!=b.className&&"geItem"!=b.className||b.parentNode.removeChild(b);b=c}t=q.firstChild;e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var b=1E3>e||"1"==urlParams.sketch,k=null;
-b||(k=d("diagram"));if("1"==urlParams.sketch)Z.style.left=58>S.offsetTop-S.offsetHeight/2?"70px":"10px";else if(c=b?d("diagram",null,Editor.drawLogoImage):null,null!=c&&(k=c),g([k,f(mxResources.get("shapes"),n.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),n.actions.get("image"),b?Editor.shapesImage:null),f(mxResources.get("format"),n.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+n.actions.get("formatPanel").shortcut+")",n.actions.get("image"),b?Editor.formatImage:
-null)],b?60:null),c=d("insert",!0,b?da:null),g([c,f(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),b?Editor.trashImage:null)],b?60:null),411<=e&&(g([ka,aa],60),520<=e&&(g([oa,640<=e?f("",Q.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Q,Editor.zoomInImage):null,640<=e?f("",pa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",pa,Editor.zoomOutImage):null],60),720<=e&&(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)))){var l=
+b||(k=d("diagram"));if("1"==urlParams.sketch)aa.style.left=58>S.offsetTop-S.offsetHeight/2?"70px":"10px";else if(c=b?d("diagram",null,Editor.drawLogoImage):null,null!=c&&(k=c),g([k,f(mxResources.get("shapes"),n.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),n.actions.get("image"),b?Editor.shapesImage:null),f(mxResources.get("format"),n.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+n.actions.get("formatPanel").shortcut+")",n.actions.get("image"),b?Editor.formatImage:
+null)],b?60:null),c=d("insert",!0,b?da:null),g([c,f(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),b?Editor.trashImage:null)],b?60:null),411<=e&&(g([ka,Z],60),520<=e&&(g([qa,640<=e?f("",Q.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Q,Editor.zoomInImage):null,640<=e?f("",ra.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",ra,Editor.zoomOutImage):null],60),720<=e&&(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)))){var l=
f("",ja.funct,null,mxResources.get("dark"),ja,Editor.isDarkMode()?Editor.lightImage:Editor.darkImage);l.style.opacity="0.4";n.addListener("darkModeChanged",mxUtils.bind(this,function(){l.style.backgroundImage="url("+(Editor.isDarkMode()?Editor.lightImage:Editor.darkImage)+")"}));null!=n.statusContainer&&"1"!=urlParams.sketch?q.insertBefore(l,n.statusContainer):q.appendChild(l)}null!=k&&(mxEvent.disableContextMenu(k),mxEvent.addGestureListeners(k,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||
-mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&n.appIconClicked(b)}),null,null));c=n.menus.get("language");null!=c&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e&&"1"!=urlParams.sketch?(null==ua&&(c=u.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),c.className="geToolbarButton",c.style.backgroundImage="url("+Editor.globeImage+")",c.style.backgroundPosition="center center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize=
-"24px 24px",c.style.position="absolute",c.style.height="24px",c.style.width="24px",c.style.zIndex="1",c.style.right="8px",c.style.cursor="pointer",c.style.top="1"==urlParams.embed?"12px":"11px",q.appendChild(c),ua=c),n.buttonContainer.style.paddingRight="34px"):(n.buttonContainer.style.paddingRight="4px",null!=ua&&(ua.parentNode.removeChild(ua),ua=null))}G.apply(this,arguments);this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:mxSettings.settings.darkMode);
+mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&n.appIconClicked(b)}),null,null));c=n.menus.get("language");null!=c&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e&&"1"!=urlParams.sketch?(null==va&&(c=u.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),c.className="geToolbarButton",c.style.backgroundImage="url("+Editor.globeImage+")",c.style.backgroundPosition="center center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize=
+"24px 24px",c.style.position="absolute",c.style.height="24px",c.style.width="24px",c.style.zIndex="1",c.style.right="8px",c.style.cursor="pointer",c.style.top="1"==urlParams.embed?"12px":"11px",q.appendChild(c),va=c),n.buttonContainer.style.paddingRight="34px"):(n.buttonContainer.style.paddingRight="4px",null!=va&&(va.parentNode.removeChild(va),va=null))}E.apply(this,arguments);this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:mxSettings.settings.darkMode);
var l=document.createElement("div");l.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";l.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(l);"1"==urlParams.sketch&&this.toggleScratchpad();if("1"!=urlParams.sketch&&1E3<=e||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])c(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&
(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));this.keyHandler.bindAction(75,!0,"toggleShapes",!0);if("1"==urlParams.sketch||1E3<=e)if(b(this,!0),"1"==urlParams.sketch){this.formatWindow.window.setClosable(!1);var m=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){m.apply(this,arguments);this.minimized?(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+
150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=parseInt(this.div.style.left)-150+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(b){mxEvent.getSource(b)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.toggleMinimized()}var n=this,p=n.editor.graph;n.toolbar=this.createToolbar(n.createDiv("geToolbar"));n.defaultLibraryName=mxResources.get("untitledLibrary");
var q=document.createElement("div");q.className="geMenubarContainer";var t=null,u=new Menubar(n,q);n.statusContainer=n.createStatusContainer();n.statusContainer.style.position="relative";n.statusContainer.style.maxWidth="";n.statusContainer.style.marginTop="7px";n.statusContainer.style.marginLeft="6px";n.statusContainer.style.color="gray";n.statusContainer.style.cursor="default";var v=n.hideCurrentMenu;n.hideCurrentMenu=function(){v.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};
var x=n.descriptorChanged;n.descriptorChanged=function(){x.apply(this,arguments);var b=n.getCurrentFile();if(null!=b&&null!=b.getTitle()){var c=b.getMode();"google"==c?c="googleDrive":"github"==c?c="gitHub":"gitlab"==c?c="gitLab":"onedrive"==c&&(c="oneDrive");c=mxResources.get(c);q.setAttribute("title",b.getTitle()+(null!=c?" ("+c+")":""))}else q.removeAttribute("title")};n.setStatusText(n.editor.getStatus());q.appendChild(n.statusContainer);n.buttonContainer=document.createElement("div");n.buttonContainer.style.cssText=
"position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";q.appendChild(n.buttonContainer);n.menubarContainer=n.buttonContainer;n.tabContainer=document.createElement("div");n.tabContainer.className="geTabContainer";n.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";var l=n.diagramContainer.parentNode,y=document.createElement("div");y.style.cssText=
-"position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";n.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";var A=n.menus.get("viewZoom"),da="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,I="1"==urlParams.sketch?document.createElement("div"):null,S="1"==urlParams.sketch?document.createElement("div"):null,Z="1"==urlParams.sketch?document.createElement("div"):null;n.addListener("darkModeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=
+"position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";n.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";var A=n.menus.get("viewZoom"),da="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,K="1"==urlParams.sketch?document.createElement("div"):null,S="1"==urlParams.sketch?document.createElement("div"):null,aa="1"==urlParams.sketch?document.createElement("div"):null;n.addListener("darkModeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=
mxUtils.clone(p.stylesheet.styles),this.sidebar.container.innerHTML="",this.sidebar.palettes={},this.sidebar.init(),"1"==urlParams.sketch&&(this.scratchpad=null,this.toggleScratchpad()));p.refresh();p.refreshBackgroundImage();p.view.validateBackground()}));Graph.touchStyle&&(p.panningHandler.isPanningTrigger=function(b){var c=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(c)&&!p.freehand.isDrawing()||mxEvent.isPopupTrigger(c)&&(null==b.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))});
-if(null!=n.hoverIcons){var ma=n.hoverIcons.update;n.hoverIcons.update=function(){p.freehand.isDrawing()||ma.apply(this,arguments)}}if(null!=p.freehand){var ga=p.freehand.createStyle;p.freehand.createStyle=function(b){return ga.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){S.className="geToolbarContainer";I.className="geToolbarContainer";Z.className="geToolbarContainer";q.className="geToolbarContainer";n.picker=S;var ia=!1;mxEvent.addListener(q,"mouseenter",function(){n.statusContainer.style.display=
+if(null!=n.hoverIcons){var ma=n.hoverIcons.update;n.hoverIcons.update=function(){p.freehand.isDrawing()||ma.apply(this,arguments)}}if(null!=p.freehand){var ga=p.freehand.createStyle;p.freehand.createStyle=function(b){return ga.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){S.className="geToolbarContainer";K.className="geToolbarContainer";aa.className="geToolbarContainer";q.className="geToolbarContainer";n.picker=S;var ia=!1;mxEvent.addListener(q,"mouseenter",function(){n.statusContainer.style.display=
"inline-block"});mxEvent.addListener(q,"mouseleave",function(){ia||(n.statusContainer.style.display="none")});var la=mxUtils.bind(this,function(b){null!=n.notificationBtn&&(null!=b?n.notificationBtn.setAttribute("title",b):n.notificationBtn.removeAttribute("title"))});"1"!=urlParams.embed&&n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus());if(0==n.statusContainer.children.length||1==n.statusContainer.children.length&&null==n.statusContainer.firstChild.getAttribute("class")){null!=
-n.statusContainer.firstChild?la(n.statusContainer.firstChild.getAttribute("title")):la(n.editor.getStatus());var b=n.getCurrentFile(),b=null!=b?b.savingStatusKey:DrawioFile.prototype.savingStatusKey;null!=n.notificationBtn&&n.notificationBtn.getAttribute("title")==mxResources.get(b)+"..."?(n.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(b))+'..."src="'+IMAGE_PATH+'/spin.gif">',n.statusContainer.style.display="inline-block",ia=!0):(n.statusContainer.style.display="none",
-ia=!1)}else n.statusContainer.style.display="inline-block",la(null),ia=!0}));O=d("diagram",null,Editor.drawLogoImage);O.style.boxShadow="none";O.style.opacity="0.4";O.style.padding="6px";O.style.margin="0px";Z.appendChild(O);mxEvent.disableContextMenu(O);mxEvent.addGestureListeners(O,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&this.appIconClicked(b)}),null,null);n.statusContainer.style.position=
+n.statusContainer.firstChild?la(n.statusContainer.firstChild.getAttribute("title")):la(n.editor.getStatus());var b=n.getCurrentFile(),b=null!=b?b.savingStatusKey:DrawioFile.prototype.savingStatusKey;null!=n.notificationBtn&&n.notificationBtn.getAttribute("title")==mxResources.get(b)+"..."?(n.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(b))+'..."src="'+Editor.tailSpin+'">',n.statusContainer.style.display="inline-block",ia=!0):(n.statusContainer.style.display="none",
+ia=!1)}else n.statusContainer.style.display="inline-block",la(null),ia=!0}));O=d("diagram",null,Editor.drawLogoImage);O.style.boxShadow="none";O.style.opacity="0.4";O.style.padding="6px";O.style.margin="0px";aa.appendChild(O);mxEvent.disableContextMenu(O);mxEvent.addGestureListeners(O,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&this.appIconClicked(b)}),null,null);n.statusContainer.style.position=
"";n.statusContainer.style.display="none";n.statusContainer.style.margin="0px";n.statusContainer.style.padding="6px 0px";n.statusContainer.style.maxWidth=Math.min(e-240,280)+"px";n.statusContainer.style.display="inline-block";n.statusContainer.style.textOverflow="ellipsis";n.buttonContainer.style.position="";n.buttonContainer.style.paddingRight="0px";n.buttonContainer.style.display="inline-block";var W=document.createElement("a");W.style.padding="0px";W.style.boxShadow="none";W.className="geMenuItem";
W.style.display="inline-block";W.style.width="40px";W.style.height="12px";W.style.marginBottom="-2px";W.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";W.style.backgroundPosition="top center";W.style.backgroundRepeat="no-repeat";W.setAttribute("title","Minimize");var fa=!1,na=mxUtils.bind(this,function(){S.innerHTML="";if(!fa){var b=function(b,d,e){b=f("",b.funct,null,d,b,e);b.style.width="40px";return c(b,null,"pointer")},c=function(b,c,d){null!=c&&b.setAttribute("title",c);b.style.cursor=
null!=d?d:"default";b.style.margin="2px 0px";S.appendChild(b);mxUtils.br(S);return b};c(n.sidebar.createVertexTemplate("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;",40,20,"Text",mxResources.get("text"),!0,!0,null,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");c(n.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;fontSize=24;pointerEvents=1;"+
-("0"!=urlParams.rough?"sketch=1;jiggle=2;":""),140,160,"",mxResources.get("note"),!0,!0,null,!0),mxResources.get("note"));c(n.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!0,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");c(n.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!0,null,!0),mxResources.get("ellipse"));(function(){var b=new mxCell("",new mxGeometry(0,0,p.defaultEdgeLength,
-0),"edgeStyle=none;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=open;sourcePerimeterSpacing=8;targetPerimeterSpacing=8;fontSize=16;"+("0"!=urlParams.rough?"sketch=1;":""));b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,0),!1);b.geometry.points=[];b.geometry.relative=!0;b.edge=!0;c(n.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,b.geometry.height,mxResources.get("line"),!1,null,!0),mxResources.get("line"));
-b=b.clone();b.style+="shape=flexArrow;rounded=1;startSize=8;endSize=8;";b.geometry.width=p.defaultEdgeLength+20;b.geometry.setTerminalPoint(new mxPoint(0,20),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,20),!1);b=c(n.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,40,mxResources.get("arrow"),!1,null,!0),mxResources.get("arrow"));b.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");b.style.paddingBottom="14px";b.style.marginBottom="14px"})();b(n.actions.get("insertFreehand"),
-mxResources.get("freehand"),Editor.freehandImage);var d=n.actions.get("toggleShapes");b(d,mxResources.get("shapes")+" ("+d.shortcut+")",da);b(n.actions.get("insertTemplate"),mxResources.get("template"),Editor.templateImage)}S.appendChild(W)});mxEvent.addListener(W,"click",mxUtils.bind(this,function(){fa?(mxUtils.setPrefixedStyle(S.style,"transform","translate(0, -50%)"),S.style.padding="8px 6px 4px",S.style.top="50%",S.style.bottom="",S.style.height="",W.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+
-")",W.style.width="40px",W.style.height="12px",W.setAttribute("title","Minimize"),fa=!1,na()):(S.innerHTML="",S.appendChild(W),mxUtils.setPrefixedStyle(S.style,"transform","translate(0, 0)"),S.style.top="",S.style.bottom="12px",S.style.padding="0px",S.style.height="24px",W.style.height="24px",W.style.backgroundImage="url("+Editor.plusImage+")",W.setAttribute("title",mxResources.get("insert")),W.style.width="24px",fa=!0)}));na();n.addListener("darkModeChanged",mxUtils.bind(this,function(){na()}))}else n.editor.addListener("statusChanged",
-mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus())}));if(null!=A){var V=function(b){p.popupMenuHandler.hideMenu();mxEvent.isAltDown(b)?n.actions.get("customZoom").funct():n.actions.get("smartFit").funct()},Q=n.actions.get("zoomIn"),pa=n.actions.get("zoomOut"),X=n.actions.get("resetView"),ea=n.actions.get("fullscreen"),ja=n.actions.get("toggleDarkMode"),ra=n.actions.get("undo"),U=n.actions.get("redo"),ka=f("",ra.funct,null,mxResources.get("undo")+" ("+ra.shortcut+")",ra,Editor.undoImage),
-aa=f("",U.funct,null,mxResources.get("redo")+" ("+U.shortcut+")",U,Editor.redoImage),oa=f("",V,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",X,Editor.zoomFitImage),X=f("",ea.funct,null,mxResources.get("fullscreen"),ea,Editor.fullscreenImage);if(null!=I){var sa=n.actions.get("delete"),ca=f("",sa.funct,null,mxResources.get("delete"),sa,Editor.trashImage);ca.style.opacity="0.1";Z.appendChild(ca);sa.addListener("stateChanged",function(){ca.style.opacity=sa.enabled?"0.4":"0.1"});A=function(){ka.style.display=
-0<n.editor.undoManager.history.length||p.isEditing()?"inline-block":"none";aa.style.display=ka.style.display;ka.style.opacity=ra.enabled?"0.4":"0.1";aa.style.opacity=U.enabled?"0.4":"0.1"};Z.appendChild(ka);Z.appendChild(aa);ra.addListener("stateChanged",A);U.addListener("stateChanged",A);A();null!=urlParams.layers&&(A=n.actions.get("layers"),A=f("",A.funct,null,mxResources.get("layers"),A,Editor.layersImage),A.style.opacity="0.4",I.appendChild(A));null!=urlParams.tags&&(A=n.actions.get("tags"),A=
-f("",A.funct,null,mxResources.get("tags"),A,Editor.tagsImage),A.style.opacity="0.4",I.appendChild(A));A=n.actions.get("outline");A=f("",A.funct,null,mxResources.get("outline"),A,Editor.outlineImage);A.style.opacity="0.4";I.appendChild(A);A=f("",pa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",pa,Editor.zoomOutImage);A.style.opacity="0.4";I.appendChild(A);var O=document.createElement("div");O.innerHTML="100%";O.setAttribute("title",mxResources.get("fitWindow")+"/"+mxResources.get("resetView")+
-" (Enter)");O.style.display="inline-block";O.style.cursor="pointer";O.style.textAlign="center";O.style.whiteSpace="nowrap";O.style.paddingRight="10px";O.style.textDecoration="none";O.style.verticalAlign="top";O.style.padding="6px 0";O.style.fontSize="14px";O.style.width="40px";O.style.opacity="0.4";I.appendChild(O);mxEvent.addListener(O,"click",V);V=f("",Q.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Q,Editor.zoomInImage);V.style.opacity="0.4";I.appendChild(V);var ta=
-f("",ja.funct,null,mxResources.get("dark"),ja,Editor.isDarkMode()?Editor.lightImage:Editor.darkImage);ta.style.opacity="0.4";(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&I.appendChild(ta);n.addListener("darkModeChanged",mxUtils.bind(this,function(){ta.style.backgroundImage="url("+(Editor.isDarkMode()?Editor.lightImage:Editor.darkImage)+")"}));ea.visible&&(X.style.opacity="0.4",I.appendChild(X));var ba=this.createPageMenuTab(!1);ba.style.display="none";ba.style.position="";ba.style.marginLeft=
-"";ba.style.top="";ba.style.left="";ba.style.height="100%";ba.style.lineHeight="";ba.style.borderStyle="none";ba.style.padding="3px 0";ba.style.margin="0px";ba.style.background="";ba.style.border="";ba.style.boxShadow="none";ba.style.verticalAlign="top";ba.firstChild.style.height="100%";ba.firstChild.style.opacity="0.6";ba.firstChild.style.margin="0px";I.appendChild(ba);n.addListener("fileDescriptorChanged",function(){ba.style.display="1"==urlParams.pages||null!=n.pages&&1<n.pages.length?"inline-block":
-"none"});n.tabContainer.style.visibility="hidden";q.style.cssText="position:absolute;right:12px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";Z.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
-I.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";y.appendChild(Z);y.appendChild(I);S.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";y.appendChild(S);window.setTimeout(function(){mxUtils.setPrefixedStyle(S.style,
+("0"!=urlParams.rough?"sketch=1;jiggle=2;":""),140,160,"",mxResources.get("note"),!0,!0,null,!0),mxResources.get("note"));c(n.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!0,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");c(n.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!0,null,!0),mxResources.get("ellipse"));(function(){var b="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;endArrow=open;sourcePerimeterSpacing=8;targetPerimeterSpacing=8;fontSize=16;"+
+("0"!=urlParams.rough?"sketch=1;":""),d=new mxCell("",new mxGeometry(0,0,p.defaultEdgeLength,0),b+"curved=1;rounded=0;");d.geometry.setTerminalPoint(new mxPoint(0,0),!0);d.geometry.setTerminalPoint(new mxPoint(d.geometry.width,0),!1);d.geometry.points=[];d.geometry.relative=!0;d.edge=!0;c(n.sidebar.createEdgeTemplateFromCells([d],d.geometry.width,d.geometry.height,mxResources.get("line"),!1,null,!0),mxResources.get("line"));d=d.clone();d.style=b+"shape=flexArrow;rounded=1;startSize=8;endSize=8;";
+d.geometry.width=p.defaultEdgeLength+20;d.geometry.setTerminalPoint(new mxPoint(0,20),!0);d.geometry.setTerminalPoint(new mxPoint(d.geometry.width,20),!1);b=c(n.sidebar.createEdgeTemplateFromCells([d],d.geometry.width,40,mxResources.get("arrow"),!1,null,!0),mxResources.get("arrow"));b.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");b.style.paddingBottom="14px";b.style.marginBottom="14px"})();b(n.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);
+var d=n.actions.get("toggleShapes");b(d,mxResources.get("shapes")+" ("+d.shortcut+")",da);b(n.actions.get("insertTemplate"),mxResources.get("template"),Editor.templateImage)}S.appendChild(W)});mxEvent.addListener(W,"click",mxUtils.bind(this,function(){fa?(mxUtils.setPrefixedStyle(S.style,"transform","translate(0, -50%)"),S.style.padding="8px 6px 4px",S.style.top="50%",S.style.bottom="",S.style.height="",W.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",W.style.width="40px",W.style.height=
+"12px",W.setAttribute("title","Minimize"),fa=!1,na()):(S.innerHTML="",S.appendChild(W),mxUtils.setPrefixedStyle(S.style,"transform","translate(0, 0)"),S.style.top="",S.style.bottom="12px",S.style.padding="0px",S.style.height="24px",W.style.height="24px",W.style.backgroundImage="url("+Editor.plusImage+")",W.setAttribute("title",mxResources.get("insert")),W.style.width="24px",fa=!0)}));na();n.addListener("darkModeChanged",mxUtils.bind(this,function(){na()}))}else n.editor.addListener("statusChanged",
+mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus())}));if(null!=A){var V=function(b){p.popupMenuHandler.hideMenu();mxEvent.isAltDown(b)?n.actions.get("customZoom").funct():n.actions.get("smartFit").funct()},Q=n.actions.get("zoomIn"),ra=n.actions.get("zoomOut"),X=n.actions.get("resetView"),ea=n.actions.get("fullscreen"),ja=n.actions.get("toggleDarkMode"),sa=n.actions.get("undo"),U=n.actions.get("redo"),ka=f("",sa.funct,null,mxResources.get("undo")+" ("+sa.shortcut+")",sa,Editor.undoImage),
+Z=f("",U.funct,null,mxResources.get("redo")+" ("+U.shortcut+")",U,Editor.redoImage),qa=f("",V,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",X,Editor.zoomFitImage),X=f("",ea.funct,null,mxResources.get("fullscreen"),ea,Editor.fullscreenImage);if(null!=K){var ta=n.actions.get("delete"),ca=f("",ta.funct,null,mxResources.get("delete"),ta,Editor.trashImage);ca.style.opacity="0.1";aa.appendChild(ca);ta.addListener("stateChanged",function(){ca.style.opacity=ta.enabled?"0.4":"0.1"});A=function(){ka.style.display=
+0<n.editor.undoManager.history.length||p.isEditing()?"inline-block":"none";Z.style.display=ka.style.display;ka.style.opacity=sa.enabled?"0.4":"0.1";Z.style.opacity=U.enabled?"0.4":"0.1"};aa.appendChild(ka);aa.appendChild(Z);sa.addListener("stateChanged",A);U.addListener("stateChanged",A);A();null!=urlParams.layers&&(A=n.actions.get("layers"),A=f("",A.funct,null,mxResources.get("layers"),A,Editor.layersImage),A.style.opacity="0.4",K.appendChild(A));null!=urlParams.tags&&(A=n.actions.get("tags"),A=
+f("",A.funct,null,mxResources.get("tags"),A,Editor.tagsImage),A.style.opacity="0.4",K.appendChild(A));A=n.actions.get("outline");A=f("",A.funct,null,mxResources.get("outline"),A,Editor.outlineImage);A.style.opacity="0.4";K.appendChild(A);A=f("",ra.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",ra,Editor.zoomOutImage);A.style.opacity="0.4";K.appendChild(A);var O=document.createElement("div");O.innerHTML="100%";O.setAttribute("title",mxResources.get("fitWindow")+"/"+mxResources.get("resetView")+
+" (Enter)");O.style.display="inline-block";O.style.cursor="pointer";O.style.textAlign="center";O.style.whiteSpace="nowrap";O.style.paddingRight="10px";O.style.textDecoration="none";O.style.verticalAlign="top";O.style.padding="6px 0";O.style.fontSize="14px";O.style.width="40px";O.style.opacity="0.4";K.appendChild(O);mxEvent.addListener(O,"click",V);V=f("",Q.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Q,Editor.zoomInImage);V.style.opacity="0.4";K.appendChild(V);var ua=
+f("",ja.funct,null,mxResources.get("dark"),ja,Editor.isDarkMode()?Editor.lightImage:Editor.darkImage);ua.style.opacity="0.4";(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&K.appendChild(ua);n.addListener("darkModeChanged",mxUtils.bind(this,function(){ua.style.backgroundImage="url("+(Editor.isDarkMode()?Editor.lightImage:Editor.darkImage)+")"}));ea.visible&&(X.style.opacity="0.4",K.appendChild(X));var ba=this.createPageMenuTab(!1);ba.style.display="none";ba.style.position="";ba.style.marginLeft=
+"";ba.style.top="";ba.style.left="";ba.style.height="100%";ba.style.lineHeight="";ba.style.borderStyle="none";ba.style.padding="3px 0";ba.style.margin="0px";ba.style.background="";ba.style.border="";ba.style.boxShadow="none";ba.style.verticalAlign="top";ba.firstChild.style.height="100%";ba.firstChild.style.opacity="0.6";ba.firstChild.style.margin="0px";K.appendChild(ba);n.addListener("fileDescriptorChanged",function(){ba.style.display="1"==urlParams.pages||null!=n.pages&&1<n.pages.length?"inline-block":
+"none"});n.tabContainer.style.visibility="hidden";q.style.cssText="position:absolute;right:12px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";aa.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
+K.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";y.appendChild(aa);y.appendChild(K);S.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";y.appendChild(S);window.setTimeout(function(){mxUtils.setPrefixedStyle(S.style,
"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(y)}else q.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;",this.tabContainer.style.right="70px",O=u.addMenu("100%",A.funct),O.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)"),O.style.whiteSpace="nowrap",O.style.paddingRight="10px",O.style.textDecoration="none",O.style.textDecoration="none",O.style.overflow="hidden",
O.style.visibility="hidden",O.style.textAlign="center",O.style.cursor="pointer",O.style.height=parseInt(n.tabContainerHeight)-1+"px",O.style.lineHeight=parseInt(n.tabContainerHeight)+1+"px",O.style.position="absolute",O.style.display="block",O.style.fontSize="12px",O.style.width="59px",O.style.right="0px",O.style.bottom="0px",O.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")",O.style.backgroundPosition="right 6px center",O.style.backgroundRepeat="no-repeat",y.appendChild(O);ea=mxUtils.bind(this,
-function(){O.innerHTML=Math.round(100*n.editor.graph.view.scale)+"%"});n.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ea);n.editor.addListener("resetGraphView",ea);n.editor.addListener("pageSelected",ea);var xa=n.setGraphEnabled;n.setGraphEnabled=function(){xa.apply(this,arguments);null!=this.tabContainer&&(O.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==I?this.tabContainerHeight+"px":"0px")}}y.appendChild(q);
-y.appendChild(n.diagramContainer);l.appendChild(y);n.updateTabContainer();null==I&&y.appendChild(n.tabContainer);var ua=null;k();mxEvent.addListener(window,"resize",function(){k();null!=n.sidebarWindow&&n.sidebarWindow.window.fit();null!=n.formatWindow&&n.formatWindow.window.fit();null!=n.actions.outlineWindow&&n.actions.outlineWindow.window.fit();null!=n.actions.layersWindow&&n.actions.layersWindow.window.fit();null!=n.menus.tagsWindow&&n.menus.tagsWindow.window.fit();null!=n.menus.findWindow&&n.menus.findWindow.window.fit();
+function(){O.innerHTML=Math.round(100*n.editor.graph.view.scale)+"%"});n.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ea);n.editor.addListener("resetGraphView",ea);n.editor.addListener("pageSelected",ea);var ya=n.setGraphEnabled;n.setGraphEnabled=function(){ya.apply(this,arguments);null!=this.tabContainer&&(O.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==K?this.tabContainerHeight+"px":"0px")}}y.appendChild(q);
+y.appendChild(n.diagramContainer);l.appendChild(y);n.updateTabContainer();null==K&&y.appendChild(n.tabContainer);var va=null;k();mxEvent.addListener(window,"resize",function(){k();null!=n.sidebarWindow&&n.sidebarWindow.window.fit();null!=n.formatWindow&&n.formatWindow.window.fit();null!=n.actions.outlineWindow&&n.actions.outlineWindow.window.fit();null!=n.actions.layersWindow&&n.actions.layersWindow.window.fit();null!=n.menus.tagsWindow&&n.menus.tagsWindow.window.fit();null!=n.menus.findWindow&&n.menus.findWindow.window.fit();
null!=n.menus.findReplaceWindow&&n.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,c,e,k,g,p,t){this.file=b;this.id=c;this.content=e;this.modifiedDate=k;this.createdDate=g;this.isResolved=p;this.user=t;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,c,e,k,g){c()};DrawioComment.prototype.editComment=function(b,c,e){c()};DrawioComment.prototype.deleteComment=function(b,c){b()};DrawioUser=function(b,c,e,k,g){this.id=b;this.email=c;this.displayName=e;this.pictureUrl=k;this.locale=g};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About \naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found \nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#ffffff"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#2a2a2a"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(b,c,e){this.init(b,c,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;
GraphViewer.prototype.autoOrigin=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.forceCenter=!1;GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.allowZoomOut=!0;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;GraphViewer.prototype.responsive=!1;
@@ -3998,19 +4002,19 @@ e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbar
function(){mxUtils.setOpacity(e,0);k=null;g=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";g=null}),100)}),b||200)}),t=mxUtils.bind(this,function(b){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=g&&(window.clearTimeout(g),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,b||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||(t(30),p())}));mxEvent.addListener(e,mxClient.IS_POINTER?
"pointermove":"mousemove",function(b){mxEvent.consume(b)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(b){t(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(b){t(100);mxEvent.consume(b)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||t(30)}));var d=this.graph,f=d.getTolerance();d.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();
this.scrollLeft=d.container.scrollLeft;this.scrollTop=d.container.scrollTop},mouseMove:function(b,c){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-d.container.scrollLeft)<f&&Math.abs(this.scrollTop-d.container.scrollTop)<f&&Math.abs(this.startX-c.getGraphX())<f&&Math.abs(this.startY-c.getGraphY())<f&&(0<parseFloat(e.style.opacity||0)?p():t(30))}})}for(var l=this.toolbarItems,m=0,q=null,n=null,u=null,v=null,y=0;y<l.length;y++){var x=l[y];if("pages"==x){v=c.ownerDocument.createElement("div");
-v.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(v,70);var G=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");G.style.borderRightStyle="none";G.style.paddingLeft="0px";G.style.paddingRight="0px";e.appendChild(v);var C=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
-1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");C.style.paddingLeft="0px";C.style.paddingRight="0px";x=mxUtils.bind(this,function(){v.innerHTML="";mxUtils.write(v,this.currentPage+1+" / "+this.diagrams.length);v.style.display=1<this.diagrams.length?"inline-block":"none";G.style.display=v.style.display;C.style.display=v.style.display});this.addListener("graphChanged",x);x()}else if("zoom"==x)this.zoomEnabled&&(b(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
-mxResources.get("zoomOut")||"Zoom Out"),b(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),b(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==x){if(this.layersEnabled){var E=this.graph.getModel(),J=b(mxUtils.bind(this,function(b){if(null!=q)q.parentNode.removeChild(q),
+v.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(v,70);var E=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");E.style.borderRightStyle="none";E.style.paddingLeft="0px";E.style.paddingRight="0px";e.appendChild(v);var C=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");C.style.paddingLeft="0px";C.style.paddingRight="0px";x=mxUtils.bind(this,function(){v.innerHTML="";mxUtils.write(v,this.currentPage+1+" / "+this.diagrams.length);v.style.display=1<this.diagrams.length?"inline-block":"none";E.style.display=v.style.display;C.style.display=v.style.display});this.addListener("graphChanged",x);x()}else if("zoom"==x)this.zoomEnabled&&(b(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
+mxResources.get("zoomOut")||"Zoom Out"),b(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),b(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==x){if(this.layersEnabled){var F=this.graph.getModel(),I=b(mxUtils.bind(this,function(b){if(null!=q)q.parentNode.removeChild(q),
q=null;else{q=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var b=this.graph.getGraphBounds(),c=this.graph.view;0>b.x||0>b.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:c.translate.clone(),scale:c.scale}):null!=this.graph.originalViewState&&0<b.x/c.scale+this.graph.originalViewState.translate.x-c.translate.x&&0<b.y/c.scale+this.graph.originalViewState.translate.y-c.translate.y&&
-(c.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:c.translate.clone(),scale:c.scale})}}));mxEvent.addListener(q,"mouseleave",function(){q.parentNode.removeChild(q);q=null});b=J.getBoundingClientRect();q.style.width="140px";q.style.padding="2px 0px 2px 0px";q.style.border="1px solid #d0d0d0";q.style.backgroundColor="#eee";q.style.fontFamily=Editor.defaultHtmlFont;q.style.fontSize=
-"11px";q.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(q,80);var c=mxUtils.getDocumentScrollOrigin(document);q.style.left=c.x+b.left-1+"px";q.style.top=c.y+b.bottom-2+"px";document.body.appendChild(q)}}),Editor.layersImage,mxResources.get("layers")||"Layers");E.addListener(mxEvent.CHANGE,function(){J.style.display=1<E.getChildCount(E.root)?"inline-block":"none"});J.style.display=1<E.getChildCount(E.root)?"inline-block":"none"}}else if("tags"==x){if(this.tagsEnabled){var L=b(mxUtils.bind(this,
+(c.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:c.translate.clone(),scale:c.scale})}}));mxEvent.addListener(q,"mouseleave",function(){q.parentNode.removeChild(q);q=null});b=I.getBoundingClientRect();q.style.width="140px";q.style.padding="2px 0px 2px 0px";q.style.border="1px solid #d0d0d0";q.style.backgroundColor="#eee";q.style.fontFamily=Editor.defaultHtmlFont;q.style.fontSize=
+"11px";q.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(q,80);var c=mxUtils.getDocumentScrollOrigin(document);q.style.left=c.x+b.left-1+"px";q.style.top=c.y+b.bottom-2+"px";document.body.appendChild(q)}}),Editor.layersImage,mxResources.get("layers")||"Layers");F.addListener(mxEvent.CHANGE,function(){I.style.display=1<F.getChildCount(F.root)?"inline-block":"none"});I.style.display=1<F.getChildCount(F.root)?"inline-block":"none"}}else if("tags"==x){if(this.tagsEnabled){var L=b(mxUtils.bind(this,
function(b){null==n&&(n=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),n.div.getElementsByTagName("div")[0].style.position="",n.div.style.maxHeight="160px",n.div.style.maxWidth="120px",n.div.style.padding="2px",n.div.style.overflow="auto",n.div.style.height="auto",n.div.style.position="fixed",n.div.style.fontFamily=Editor.defaultHtmlFont,n.div.style.fontSize="11px",n.div.style.backgroundColor="#eee",n.div.style.color="#000",n.div.style.border="1px solid #d0d0d0",n.div.style.zIndex=
-this.toolbarZIndex+1,mxUtils.setOpacity(n.div,80));if(null!=u)u.parentNode.removeChild(u),u=null;else{u=n.div;mxEvent.addListener(u,"mouseleave",function(){u.parentNode.removeChild(u);u=null});b=L.getBoundingClientRect();var c=mxUtils.getDocumentScrollOrigin(document);u.style.left=c.x+b.left-1+"px";u.style.top=c.y+b.bottom-2+"px";document.body.appendChild(u);n.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");E.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){L.style.display=0<
+this.toolbarZIndex+1,mxUtils.setOpacity(n.div,80));if(null!=u)u.parentNode.removeChild(u),u=null;else{u=n.div;mxEvent.addListener(u,"mouseleave",function(){u.parentNode.removeChild(u);u=null});b=L.getBoundingClientRect();var c=mxUtils.getDocumentScrollOrigin(document);u.style.left=c.x+b.left-1+"px";u.style.top=c.y+b.bottom-2+"px";document.body.appendChild(u);n.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");F.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){L.style.display=0<
this.graph.getAllTags().length?"inline-block":"none"}));L.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==x?this.lightboxEnabled&&b(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(x=this.graphConfig["toolbar-buttons"][x],null!=x&&(x.elem=b(null==x.enabled||x.enabled?x.handler:function(){},x.image,x.title,x.enabled)))}null!=this.graph.minimumContainerSize&&
-(this.graph.minimumContainerSize.width=34*m);null!=this.graphConfig.title&&(l=c.ownerDocument.createElement("div"),l.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",l.setAttribute("title",this.graphConfig.title),mxUtils.write(l,this.graphConfig.title),mxUtils.setOpacity(l,70),e.appendChild(l),this.filename=l);this.minToolbarWidth=34*m;var H=c.style.border,K=mxUtils.bind(this,function(){e.style.width=
+(this.graph.minimumContainerSize.width=34*m);null!=this.graphConfig.title&&(l=c.ownerDocument.createElement("div"),l.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",l.setAttribute("title",this.graphConfig.title),mxUtils.write(l,this.graphConfig.title),mxUtils.setOpacity(l,70),e.appendChild(l),this.filename=l);this.minToolbarWidth=34*m;var H=c.style.border,J=mxUtils.bind(this,function(){e.style.width=
"inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,c.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var b=c.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},b={left:b.left-d.left,top:b.top-d.top,bottom:b.bottom-d.top,right:b.right-d.left};e.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?
e.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=b.top+1+"px"):e.style.top=b.top+"px";"1px solid transparent"==H&&(c.style.border="1px solid #d0d0d0");document.body.appendChild(e);var f=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=q&&(q.parentNode.removeChild(q),q=null);c.style.border=H});mxEvent.addListener(document,"mousemove",function(b){for(b=mxEvent.getSource(b);null!=b;){if(b==
-c||b==e||b==q)return;b=b.parentNode}f()});mxEvent.addListener(document.body,"mouseleave",function(b){f()})}else e.style.top=-this.toolbarHeight+"px",c.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(c,"mouseenter",K):K();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&K()})).observe(c)};
+c||b==e||b==q)return;b=b.parentNode}f()});mxEvent.addListener(document.body,"mouseleave",function(b){f()})}else e.style.top=-this.toolbarHeight+"px",c.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(c,"mouseenter",J):J();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&J()})).observe(c)};
GraphViewer.prototype.disableButton=function(b){var c=this.graphConfig["toolbar-buttons"][b];null!=c&&(mxUtils.setOpacity(c.elem,30),mxEvent.removeListener(c.elem,"click",c.handler),mxEvent.addListener(c.elem,"mouseenter",function(){c.elem.style.backgroundColor="#eee"}))};
GraphViewer.prototype.addClickHandler=function(b,c){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,k){if(null==k)for(var g=mxEvent.getSource(e);g!=b.container&&null!=g&&null==k;)"a"==g.nodeName.toLowerCase()&&(k=g.getAttribute("href")),g=g.parentNode;null!=c?null==k||b.isCustomLink(k)?mxEvent.consume(e):b.isExternalProtocol(k)||b.isBlankLink(k)||window.setTimeout(function(){c.destroy()},0):null!=k&&null==c&&b.isCustomLink(k)&&
(mxEvent.isTouchEvent(e)||!mxEvent.isPopupTrigger(e))&&b.customLinkClicked(k)&&(mxUtils.clearSelection(),mxEvent.consume(e))}),mxUtils.bind(this,function(b){null!=c||!this.lightboxClickEnabled||mxEvent.isTouchEvent(b)&&0!=this.toolbarItems.length||this.showLightbox()}))};
@@ -4032,8 +4036,8 @@ GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type=
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,c,e){if(null!=GraphViewer.cachedUrls[b])c(GraphViewer.cachedUrls[b]);else{var k=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;k.open("GET",b);k.onload=function(){c(null!=k.getText?k.getText():k.responseText)};k.onerror=e;k.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(b){return window.setTimeout(b,20)},c=function(e,k){function g(){this.q=[];this.add=function(b){this.q.push(b)};var b,c;this.call=function(){b=0;for(c=this.q.length;b<c;b++)this.q[b].call()}}function p(b,c){return b.currentStyle?b.currentStyle[c]:window.getComputedStyle?window.getComputedStyle(b,null).getPropertyValue(c):b.style[c]}function t(c,d){if(!c.resizedAttached)c.resizedAttached=
new g,c.resizedAttached.add(d);else if(c.resizedAttached){c.resizedAttached.add(d);return}c.resizeSensor=document.createElement("div");c.resizeSensor.className="resize-sensor";c.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";c.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
-c.appendChild(c.resizeSensor);"static"==p(c,"position")&&(c.style.position="relative");var e=c.resizeSensor.childNodes[0],f=e.childNodes[0],k=c.resizeSensor.childNodes[1],l=function(){f.style.width="100000px";f.style.height="100000px";e.scrollLeft=1E5;e.scrollTop=1E5;k.scrollLeft=1E5;k.scrollTop=1E5};l();var m=!1,n=function(){c.resizedAttached&&(m&&(c.resizedAttached.call(),m=!1),b(n))};b(n);var q,t,L,H,K=function(){if((L=c.offsetWidth)!=q||(H=c.offsetHeight)!=t)m=!0,q=L,t=H;l()},B=function(b,c,d){b.attachEvent?
-b.attachEvent("on"+c,d):b.addEventListener(c,d)};B(e,"scroll",K);B(k,"scroll",K)}var d=function(){GraphViewer.resizeSensorEnabled&&k()},f=Object.prototype.toString.call(e),l="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(l)for(var f=0,m=e.length;f<m;f++)t(e[f],d);else t(e,d);this.detach=function(){if(l)for(var b=0,d=e.length;b<d;b++)c.detach(e[b]);else c.detach(e)}};
+c.appendChild(c.resizeSensor);"static"==p(c,"position")&&(c.style.position="relative");var e=c.resizeSensor.childNodes[0],f=e.childNodes[0],k=c.resizeSensor.childNodes[1],l=function(){f.style.width="100000px";f.style.height="100000px";e.scrollLeft=1E5;e.scrollTop=1E5;k.scrollLeft=1E5;k.scrollTop=1E5};l();var m=!1,n=function(){c.resizedAttached&&(m&&(c.resizedAttached.call(),m=!1),b(n))};b(n);var q,t,L,H,J=function(){if((L=c.offsetWidth)!=q||(H=c.offsetHeight)!=t)m=!0,q=L,t=H;l()},B=function(b,c,d){b.attachEvent?
+b.attachEvent("on"+c,d):b.addEventListener(c,d)};B(e,"scroll",J);B(k,"scroll",J)}var d=function(){GraphViewer.resizeSensorEnabled&&k()},f=Object.prototype.toString.call(e),l="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(l)for(var f=0,m=e.length;f<m;f++)t(e[f],d);else t(e,d);this.detach=function(){if(l)for(var b=0,d=e.length;b<d;b++)c.detach(e[b]);else c.detach(e)}};
c.detach=function(b){b.resizeSensor&&(b.removeChild(b.resizeSensor),delete b.resizeSensor,delete b.resizedAttached)};window.ResizeSensor=c})();
function mxBpmnShape(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxBpmnShape,mxShape);
mxBpmnShape.prototype.customProperties=[{name:"symbol",dispName:"Event",type:"enum",defVal:"general",enumList:[{val:"general",dispName:"General"},{val:"message",dispName:"Message"},{val:"timer",dispName:"Timer"},{val:"escalation",dispName:"Escalation"},{val:"conditional",dispName:"Conditional"},{val:"link",dispName:"Link"},{val:"error",dispName:"Error"},{val:"cancel",dispName:"Cancel"},{val:"compensation",dispName:"Compensation"},{val:"signal",dispName:"Signal"},{val:"multiple",dispName:"Multiple"},
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index 00ece832..19f4d4cd 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -200,7 +200,7 @@ null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=
if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent)&&(urlParams.gapi="0");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"15.2.7",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"15.2.9",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||
0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_WIN:0<navigator.appVersion.indexOf("Win"),IS_MAC:0<navigator.appVersion.indexOf("Mac"),
@@ -628,8 +628,8 @@ var mxStencilRegistry={stencils:{},addStencil:function(a,b){mxStencilRegistry.st
(function(){function a(a){a=null!=a?a:2;return function(b,c,d,k,l,m,n,p,q,r){c=l*q*1.118;p=m*q*1.118;l*=n+q;m*=n+q;var e=k.clone();e.x-=c;e.y-=p;n=d!=mxConstants.ARROW_CLASSIC&&d!=mxConstants.ARROW_CLASSIC_THIN?1:.75;k.x+=-l*n-c;k.y+=-m*n-p;return function(){b.begin();b.moveTo(e.x,e.y);b.lineTo(e.x-l-m/a,e.y-m+l/a);d!=mxConstants.ARROW_CLASSIC&&d!=mxConstants.ARROW_CLASSIC_THIN||b.lineTo(e.x-3*l/4,e.y-3*m/4);b.lineTo(e.x+m/a-l,e.y-m-l/a);b.close();r?b.fillAndStroke():b.stroke()}}}function b(a){a=
null!=a?a:2;return function(b,c,d,k,l,m,n,p,q,r){c=l*q*1.118;d=m*q*1.118;l*=n+q;m*=n+q;var e=k.clone();e.x-=c;e.y-=d;k.x+=2*-c;k.y+=2*-d;return function(){b.begin();b.moveTo(e.x-l-m/a,e.y-m+l/a);b.lineTo(e.x,e.y);b.lineTo(e.x+m/a-l,e.y-m-l/a);b.stroke()}}}function c(a,b,c,g,k,l,m,n,p,q){n=c==mxConstants.ARROW_DIAMOND?.7071:.9862;b=k*p*n;n*=l*p;k*=m+p;l*=m+p;var d=g.clone();d.x-=b;d.y-=n;g.x+=-k-b;g.y+=-l-n;var e=c==mxConstants.ARROW_DIAMOND?2:3.4;return function(){a.begin();a.moveTo(d.x,d.y);a.lineTo(d.x-
k/2-l/e,d.y+k/e-l/2);a.lineTo(d.x-k,d.y-l);a.lineTo(d.x-k/2+l/e,d.y-l/2-k/e);a.close();q?a.fillAndStroke():a.stroke()}}mxMarker.addMarker("classic",a(2));mxMarker.addMarker("classicThin",a(3));mxMarker.addMarker("block",a(2));mxMarker.addMarker("blockThin",a(3));mxMarker.addMarker("open",b(2));mxMarker.addMarker("openThin",b(3));mxMarker.addMarker("oval",function(a,b,c,g,k,l,m,n,p,q){var d=m/2,e=g.clone();g.x-=k*d;g.y-=l*d;return function(){a.ellipse(e.x-d,e.y-d,m,m);q?a.fillAndStroke():a.stroke()}});
-mxMarker.addMarker("diamond",c);mxMarker.addMarker("diamondThin",c)})();function mxActor(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxActor,mxShape);mxActor.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();this.redrawPath(a,b,c,d,e);a.fillAndStroke()};
-mxActor.prototype.redrawPath=function(a,b,c,d,e){b=d/3;a.moveTo(0,e);a.curveTo(0,3*e/5,0,2*e/5,d/2,2*e/5);a.curveTo(d/2-b,2*e/5,d/2-b,0,d/2,0);a.curveTo(d/2+b,0,d/2+b,2*e/5,d/2,2*e/5);a.curveTo(d,2*e/5,d,3*e/5,d,e);a.close()};function mxCloud(a,b,c,d){mxActor.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxCloud,mxActor);
+mxMarker.addMarker("baseDash",function(a,b,c,g,k,l,m,n,p,q){var d=k*(m+p+1),e=l*(m+p+1);return function(){a.begin();a.moveTo(g.x-e/2,g.y+d/2);a.lineTo(g.x+e/2,g.y-d/2);a.stroke()}});mxMarker.addMarker("diamond",c);mxMarker.addMarker("diamondThin",c)})();function mxActor(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxActor,mxShape);
+mxActor.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();this.redrawPath(a,b,c,d,e);a.fillAndStroke()};mxActor.prototype.redrawPath=function(a,b,c,d,e){b=d/3;a.moveTo(0,e);a.curveTo(0,3*e/5,0,2*e/5,d/2,2*e/5);a.curveTo(d/2-b,2*e/5,d/2-b,0,d/2,0);a.curveTo(d/2+b,0,d/2+b,2*e/5,d/2,2*e/5);a.curveTo(d,2*e/5,d,3*e/5,d,e);a.close()};function mxCloud(a,b,c,d){mxActor.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxCloud,mxActor);
mxCloud.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(.25*d,.25*e);a.curveTo(.05*d,.25*e,0,.5*e,.16*d,.55*e);a.curveTo(0,.66*e,.18*d,.9*e,.31*d,.8*e);a.curveTo(.4*d,e,.7*d,e,.8*d,.8*e);a.curveTo(d,.8*e,d,.6*e,.875*d,.5*e);a.curveTo(d,.3*e,.8*d,.1*e,.625*d,.2*e);a.curveTo(.5*d,.05*e,.3*d,.05*e,.25*d,.25*e);a.close()};function mxRectangleShape(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxRectangleShape,mxShape);
mxRectangleShape.prototype.isHtmlAllowed=function(){var a=!0;null!=this.style&&(a="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));return!this.isRounded&&!this.glass&&0==this.rotation&&(a||null!=this.fill&&this.fill!=mxConstants.NONE)};
mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?f=Math.min(d/2,Math.min(e/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
@@ -2055,11 +2055,11 @@ Editor.prototype.setFilename=function(b){this.filename=b};
Editor.prototype.createUndoManager=function(){var b=this.graph,c=new mxUndoManager;this.undoListener=function(b,e){c.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(b,c){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,e);b.getView().addListener(mxEvent.UNDO,e);e=function(c,e){var g=b.getSelectionCellsForChanges(e.getProperty("edit").changes,function(b){return!(b instanceof mxChildChange)});if(0<g.length){b.getModel();for(var k=[],d=0;d<
g.length;d++)null!=b.view.getState(g[d])&&k.push(g[d]);b.setSelectionCells(k)}};c.addListener(mxEvent.UNDO,e);c.addListener(mxEvent.REDO,e);return c};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};
OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};
-function Dialog(b,c,e,k,g,p,t,d,f,l,m){var q=f?57:0,n=e,u=k,v=f?0:64,y=mxUtils.getDocumentSize();null!=window.innerHeight&&(y.height=window.innerHeight);var x=y.height,G=Math.max(1,Math.round((y.width-e-v)/2)),C=Math.max(1,Math.round((x-k-b.footerHeight)/3));c.style.maxHeight="100%";e=null!=document.body?Math.min(e,document.body.scrollWidth-v):e;k=Math.min(k,x-v);0<b.dialogs.length&&(this.zIndex+=2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",
-this.bg.style.background=Dialog.backdropColor,this.bg.style.height=x+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));y=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=y.x+"px";this.bg.style.top=y.y+"px";G+=y.x;C+=y.y;g&&document.body.appendChild(this.bg);var E=b.createDiv(f?"geTransDialog":"geDialog");g=this.getPosition(G,C,e,k);G=g.x;C=g.y;E.style.width=e+"px";E.style.height=k+"px";E.style.left=G+"px";E.style.top=C+"px";E.style.zIndex=
-this.zIndex;E.appendChild(c);document.body.appendChild(E);!d&&c.clientHeight>E.clientHeight-v&&(c.style.overflowY="auto");if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),p.setAttribute("title",mxResources.get("close")),p.className="geDialogClose",p.style.top=C+14+"px",p.style.left=G+e+38-q+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!m)){var J=!1;
-mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(b){J=!0}),null,mxUtils.bind(this,function(d){J&&(b.hideDialog(!0),J=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var f=l();null!=f&&(n=e=f.w,u=k=f.h)}f=mxUtils.getDocumentSize();x=f.height;this.bg.style.height=x+"px";G=Math.max(1,Math.round((f.width-e-v)/2));C=Math.max(1,Math.round((x-k-b.footerHeight)/3));e=null!=document.body?Math.min(n,document.body.scrollWidth-v):n;k=Math.min(u,x-v);f=this.getPosition(G,C,e,
-k);G=f.x;C=f.y;E.style.left=G+"px";E.style.top=C+"px";E.style.width=e+"px";E.style.height=k+"px";!d&&c.clientHeight>E.clientHeight-v&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=C+14+"px",this.dialogImg.style.left=G+e+38-q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=t;this.container=E;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+function Dialog(b,c,e,k,g,p,t,d,f,l,m){var q=f?57:0,n=e,u=k,v=f?0:64,y=mxUtils.getDocumentSize();null!=window.innerHeight&&(y.height=window.innerHeight);var x=y.height,E=Math.max(1,Math.round((y.width-e-v)/2)),C=Math.max(1,Math.round((x-k-b.footerHeight)/3));c.style.maxHeight="100%";e=null!=document.body?Math.min(e,document.body.scrollWidth-v):e;k=Math.min(k,x-v);0<b.dialogs.length&&(this.zIndex+=2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",
+this.bg.style.background=Dialog.backdropColor,this.bg.style.height=x+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));y=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=y.x+"px";this.bg.style.top=y.y+"px";E+=y.x;C+=y.y;g&&document.body.appendChild(this.bg);var F=b.createDiv(f?"geTransDialog":"geDialog");g=this.getPosition(E,C,e,k);E=g.x;C=g.y;F.style.width=e+"px";F.style.height=k+"px";F.style.left=E+"px";F.style.top=C+"px";F.style.zIndex=
+this.zIndex;F.appendChild(c);document.body.appendChild(F);!d&&c.clientHeight>F.clientHeight-v&&(c.style.overflowY="auto");if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),p.setAttribute("title",mxResources.get("close")),p.className="geDialogClose",p.style.top=C+14+"px",p.style.left=E+e+38-q+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!m)){var I=!1;
+mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(b){I=!0}),null,mxUtils.bind(this,function(d){I&&(b.hideDialog(!0),I=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var f=l();null!=f&&(n=e=f.w,u=k=f.h)}f=mxUtils.getDocumentSize();x=f.height;this.bg.style.height=x+"px";E=Math.max(1,Math.round((f.width-e-v)/2));C=Math.max(1,Math.round((x-k-b.footerHeight)/3));e=null!=document.body?Math.min(n,document.body.scrollWidth-v):n;k=Math.min(u,x-v);f=this.getPosition(E,C,e,
+k);E=f.x;C=f.y;F.style.left=E+"px";F.style.top=C+"px";F.style.width=e+"px";F.style.height=k+"px";!d&&c.clientHeight>F.clientHeight-v&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=C+14+"px",this.dialogImg.style.left=E+e+38-q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=t;this.container=F;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
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+
@@ -2088,19 +2088,19 @@ PageSetupDialog.addPageFormatPanel=function(b,c,e,k){function g(b,c,l){if(l||q!=
e.height==l.format.height?(d.value=l.key,p.setAttribute("checked","checked"),p.defaultChecked=!0,p.checked=!0,t.removeAttribute("checked"),t.defaultChecked=!1,t.checked=!1,b=!0):e.width==l.format.height&&e.height==l.format.width&&(d.value=l.key,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,t.setAttribute("checked","checked"),t.defaultChecked=!0,b=t.checked=!0));b?(f.style.display="",m.style.display="none"):(q.value=e.width/100,n.value=e.height/100,p.setAttribute("checked","checked"),
d.value="custom",f.style.display="none",m.style.display="")}}c="format-"+c;var p=document.createElement("input");p.setAttribute("name",c);p.setAttribute("type","radio");p.setAttribute("value","portrait");var t=document.createElement("input");t.setAttribute("name",c);t.setAttribute("type","radio");t.setAttribute("value","landscape");var d=document.createElement("select");d.style.marginBottom="8px";d.style.width="202px";var f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";
f.style.height="24px";p.style.marginRight="6px";f.appendChild(p);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));f.appendChild(c);t.style.marginLeft="10px";t.style.marginRight="6px";f.appendChild(t);var l=document.createElement("span");l.style.width="100px";mxUtils.write(l,mxResources.get("landscape"));f.appendChild(l);var m=document.createElement("div");m.style.marginLeft="4px";m.style.width="210px";m.style.height="24px";var q=document.createElement("input");
-q.setAttribute("size","7");q.style.textAlign="right";m.appendChild(q);mxUtils.write(m," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in");f.style.display="none";m.style.display="none";for(var u={},v=PageSetupDialog.getFormats(),y=0;y<v.length;y++){var x=v[y];u[x.key]=x;var G=document.createElement("option");G.setAttribute("value",x.key);mxUtils.write(G,x.title);d.appendChild(G)}var C=!1;g();b.appendChild(d);mxUtils.br(b);
-b.appendChild(f);b.appendChild(m);var E=e,J=function(b,c){var l=u[d.value];null!=l.format?(q.value=l.format.width/100,n.value=l.format.height/100,m.style.display="none",f.style.display=""):(f.style.display="none",m.style.display="");l=parseFloat(q.value);if(isNaN(l)||0>=l)q.value=e.width/100;l=parseFloat(n.value);if(isNaN(l)||0>=l)n.value=e.height/100;l=new mxRectangle(0,0,Math.floor(100*parseFloat(q.value)),Math.floor(100*parseFloat(n.value)));"custom"!=d.value&&t.checked&&(l=new mxRectangle(0,0,
-l.height,l.width));c&&C||l.width==E.width&&l.height==E.height||(E=l,null!=k&&k(E))};mxEvent.addListener(c,"click",function(b){p.checked=!0;J(b);mxEvent.consume(b)});mxEvent.addListener(l,"click",function(b){t.checked=!0;J(b);mxEvent.consume(b)});mxEvent.addListener(q,"blur",J);mxEvent.addListener(q,"click",J);mxEvent.addListener(n,"blur",J);mxEvent.addListener(n,"click",J);mxEvent.addListener(t,"change",J);mxEvent.addListener(p,"change",J);mxEvent.addListener(d,"change",function(b){C="custom"==d.value;
-J(b,!0)});J();return{set:function(b){e=b;g(null,null,!0)},get:function(){return E},widthInput:q,heightInput:n}};
+q.setAttribute("size","7");q.style.textAlign="right";m.appendChild(q);mxUtils.write(m," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in");f.style.display="none";m.style.display="none";for(var u={},v=PageSetupDialog.getFormats(),y=0;y<v.length;y++){var x=v[y];u[x.key]=x;var E=document.createElement("option");E.setAttribute("value",x.key);mxUtils.write(E,x.title);d.appendChild(E)}var C=!1;g();b.appendChild(d);mxUtils.br(b);
+b.appendChild(f);b.appendChild(m);var F=e,I=function(b,c){var l=u[d.value];null!=l.format?(q.value=l.format.width/100,n.value=l.format.height/100,m.style.display="none",f.style.display=""):(f.style.display="none",m.style.display="");l=parseFloat(q.value);if(isNaN(l)||0>=l)q.value=e.width/100;l=parseFloat(n.value);if(isNaN(l)||0>=l)n.value=e.height/100;l=new mxRectangle(0,0,Math.floor(100*parseFloat(q.value)),Math.floor(100*parseFloat(n.value)));"custom"!=d.value&&t.checked&&(l=new mxRectangle(0,0,
+l.height,l.width));c&&C||l.width==F.width&&l.height==F.height||(F=l,null!=k&&k(F))};mxEvent.addListener(c,"click",function(b){p.checked=!0;I(b);mxEvent.consume(b)});mxEvent.addListener(l,"click",function(b){t.checked=!0;I(b);mxEvent.consume(b)});mxEvent.addListener(q,"blur",I);mxEvent.addListener(q,"click",I);mxEvent.addListener(n,"blur",I);mxEvent.addListener(n,"click",I);mxEvent.addListener(t,"change",I);mxEvent.addListener(p,"change",I);mxEvent.addListener(d,"change",function(b){C="custom"==d.value;
+I(b,!0)});I();return{set:function(b){e=b;g(null,null,!0)},get:function(){return F},widthInput:q,heightInput:n}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
var FilenameDialog=function(b,c,e,k,g,p,t,d,f,l,m,q){f=null!=f?f:!0;var n,u,v=document.createElement("table"),y=document.createElement("tbody");v.style.position="absolute";v.style.top="30px";v.style.left="20px";n=document.createElement("tr");u=document.createElement("td");u.style.textOverflow="ellipsis";u.style.textAlign="right";u.style.maxWidth="100px";u.style.fontSize="10pt";u.style.width="84px";mxUtils.write(u,(g||mxResources.get("filename"))+":");n.appendChild(u);var x=document.createElement("input");
-x.setAttribute("value",c||"");x.style.marginLeft="4px";x.style.width=null!=q?q+"px":"180px";var G=mxUtils.button(e,function(){if(null==p||p(x.value))f&&b.hideDialog(),k(x.value)});G.className="geBtn gePrimaryBtn";this.init=function(){if(null!=g||null==t)if(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var b=v.parentNode;if(null!=b){var d=null;mxEvent.addListener(b,"dragleave",function(b){null!=d&&(d.style.backgroundColor=
-"",d=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(b){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=x,d.style.backgroundColor="#ebf2f9");b.stopPropagation();b.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=d&&(d.style.backgroundColor="",d=null);0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(b.dataTransfer.getData("text/uri-list")),G.click());b.stopPropagation();
+x.setAttribute("value",c||"");x.style.marginLeft="4px";x.style.width=null!=q?q+"px":"180px";var E=mxUtils.button(e,function(){if(null==p||p(x.value))f&&b.hideDialog(),k(x.value)});E.className="geBtn gePrimaryBtn";this.init=function(){if(null!=g||null==t)if(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var b=v.parentNode;if(null!=b){var d=null;mxEvent.addListener(b,"dragleave",function(b){null!=d&&(d.style.backgroundColor=
+"",d=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(b){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=x,d.style.backgroundColor="#ebf2f9");b.stopPropagation();b.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=d&&(d.style.backgroundColor="",d=null);0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(b.dataTransfer.getData("text/uri-list")),E.click());b.stopPropagation();
b.preventDefault()}))}}};u=document.createElement("td");u.style.whiteSpace="nowrap";u.appendChild(x);n.appendChild(u);if(null!=g||null==t)y.appendChild(n),null!=m&&(u.appendChild(FilenameDialog.createTypeHint(b,x,m)),null!=b.editor.diagramFileTypes&&(n=document.createElement("tr"),u=document.createElement("td"),u.style.textOverflow="ellipsis",u.style.textAlign="right",u.style.maxWidth="100px",u.style.fontSize="10pt",u.style.width="84px",mxUtils.write(u,mxResources.get("type")+":"),n.appendChild(u),
u=document.createElement("td"),u.style.whiteSpace="nowrap",n.appendChild(u),c=FilenameDialog.createFileTypes(b,x,b.editor.diagramFileTypes),c.style.marginLeft="4px",c.style.width="198px",u.appendChild(c),x.style.width=null!=q?q-40+"px":"190px",n.appendChild(u),y.appendChild(n)));null!=t&&(n=document.createElement("tr"),u=document.createElement("td"),u.colSpan=2,u.appendChild(t),n.appendChild(u),y.appendChild(n));n=document.createElement("tr");u=document.createElement("td");u.colSpan=2;u.style.paddingTop=
-null!=m?"12px":"20px";u.style.whiteSpace="nowrap";u.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});m.className="geBtn";b.editor.cancelFirst&&u.appendChild(m);null!=d&&(q=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),q.className="geBtn",u.appendChild(q));mxEvent.addListener(x,"keypress",function(b){13==b.keyCode&&G.click()});u.appendChild(G);b.editor.cancelFirst||u.appendChild(m);n.appendChild(u);y.appendChild(n);
+null!=m?"12px":"20px";u.style.whiteSpace="nowrap";u.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});m.className="geBtn";b.editor.cancelFirst&&u.appendChild(m);null!=d&&(q=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),q.className="geBtn",u.appendChild(q));mxEvent.addListener(x,"keypress",function(b){13==b.keyCode&&E.click()});u.appendChild(E);b.editor.cancelFirst||u.appendChild(m);n.appendChild(u);y.appendChild(n);
v.appendChild(y);this.container=v};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createTypeHint=function(b,c,e){var k=document.createElement("img");k.style.backgroundPosition="center bottom";k.style.backgroundRepeat="no-repeat";k.style.margin="2px 0 0 4px";k.style.verticalAlign="top";k.style.cursor="pointer";k.style.height="16px";k.style.width="16px";mxUtils.setOpacity(k,70);var g=function(){k.setAttribute("src",Editor.helpImage);k.setAttribute("title",mxResources.get("help"));for(var b=0;b<e.length;b++)if(0<e[b].ext.length&&c.value.toLowerCase().substring(c.value.length-
e[b].ext.length-1)=="."+e[b].ext){k.setAttribute("title",mxResources.get(e[b].title));break}};mxEvent.addListener(c,"keyup",g);mxEvent.addListener(c,"change",g);mxEvent.addListener(k,"click",function(c){var e=k.getAttribute("title");k.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=e&&b.showError(null,e,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(c)});
@@ -2115,8 +2115,8 @@ mxGraphView.prototype.validateBackgroundStyles=function(){var b=this.graph,d=nul
b.defaultPageBorderColor,b.container.className="geDiagramContainer geDiagramBackdrop",f.style.backgroundImage="none",f.style.backgroundColor=""):(b.container.className="geDiagramContainer",f.style.backgroundPosition=e,f.style.backgroundColor=d,f.style.backgroundImage=c)};mxGraphView.prototype.createSvgGrid=function(b){for(var d=this.graph.gridSize*this.scale;d<this.minGridSize;)d*=2;for(var f=this.gridSteps*d,c=[],e=1;e<this.gridSteps;e++){var g=e*d;c.push("M 0 "+g+" L "+f+" "+g+" M "+g+" 0 L "+g+
" "+f)}return'<svg width="'+f+'" height="'+f+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+f+'" height="'+f+'" patternUnits="userSpaceOnUse"><path d="'+c.join(" ")+'" fill="none" stroke="'+b+'" opacity="0.2" stroke-width="1"/><path d="M '+f+" 0 L 0 0 0 "+f+'" fill="none" stroke="'+b+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(c,d){b.apply(this,arguments);
if(null!=this.shiftPreview1){var f=this.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);var e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+c,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+d,e))+"px";f.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(b,d,f){var c=this.view.scale,e=this.view.translate,g=this.pageFormat,k=c*this.pageScale,p=this.view.getBackgroundPageBounds();
-d=p.width;f=p.height;var v=new mxRectangle(c*e.x,c*e.y,g.width*k,g.height*k),t=(b=b&&Math.min(v.width,v.height)>this.minPageBreakDist)?Math.ceil(f/v.height)-1:0,x=b?Math.ceil(d/v.width)-1:0,G=p.x+d,C=p.y+f;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<x&&(this.verticalPageBreaks=[]);b=mxUtils.bind(this,function(b){if(null!=b){for(var d=b==this.horizontalPageBreaks?t:x,f=0;f<=d;f++){var c=b==this.horizontalPageBreaks?[new mxPoint(Math.round(p.x),
-Math.round(p.y+(f+1)*v.height)),new mxPoint(Math.round(G),Math.round(p.y+(f+1)*v.height))]:[new mxPoint(Math.round(p.x+(f+1)*v.width),Math.round(p.y)),new mxPoint(Math.round(p.x+(f+1)*v.width),Math.round(C))];null!=b[f]?(b[f].points=c,b[f].redraw()):(c=new mxPolyline(c,this.pageBreakColor),c.dialect=this.dialect,c.isDashed=this.pageBreakDashed,c.pointerEvents=!1,c.init(this.view.backgroundPane),c.redraw(),b[f]=c)}for(f=d;f<b.length;f++)b[f].destroy();b.splice(d,b.length-d)}});b(this.horizontalPageBreaks);
+d=p.width;f=p.height;var v=new mxRectangle(c*e.x,c*e.y,g.width*k,g.height*k),t=(b=b&&Math.min(v.width,v.height)>this.minPageBreakDist)?Math.ceil(f/v.height)-1:0,x=b?Math.ceil(d/v.width)-1:0,E=p.x+d,C=p.y+f;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<x&&(this.verticalPageBreaks=[]);b=mxUtils.bind(this,function(b){if(null!=b){for(var d=b==this.horizontalPageBreaks?t:x,f=0;f<=d;f++){var c=b==this.horizontalPageBreaks?[new mxPoint(Math.round(p.x),
+Math.round(p.y+(f+1)*v.height)),new mxPoint(Math.round(E),Math.round(p.y+(f+1)*v.height))]:[new mxPoint(Math.round(p.x+(f+1)*v.width),Math.round(p.y)),new mxPoint(Math.round(p.x+(f+1)*v.width),Math.round(C))];null!=b[f]?(b[f].points=c,b[f].redraw()):(c=new mxPolyline(c,this.pageBreakColor),c.dialect=this.dialect,c.isDashed=this.pageBreakDashed,c.pointerEvents=!1,c.init(this.view.backgroundPane),c.redraw(),b[f]=c)}for(f=d;f<b.length;f++)b[f].destroy();b.splice(d,b.length-d)}});b(this.horizontalPageBreaks);
b(this.verticalPageBreaks)};var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(b,d,f){for(var e=0;e<d.length;e++){if(this.graph.isTableCell(d[e])||this.graph.isTableRow(d[e]))return!1;if(this.graph.getModel().isVertex(d[e])){var g=this.graph.getCellGeometry(d[e]);if(null!=g&&g.relative)return!1}}return c.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var b=
e.apply(this,arguments);b.intersects=mxUtils.bind(this,function(d,f){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(b,arguments)});return b};mxGraphView.prototype.createBackgroundPageShape=function(b){return new mxRectangleShape(b,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var b=this.getGraphBounds(),d=0<b.width?b.x/this.scale-this.translate.x:0,f=0<b.height?b.y/this.scale-this.translate.y:0,c=this.graph.pageFormat,
e=this.graph.pageScale,g=c.width*e,c=c.height*e,e=Math.floor(Math.min(0,d)/g),k=Math.floor(Math.min(0,f)/c);return new mxRectangle(this.scale*(this.translate.x+e*g),this.scale*(this.translate.y+k*c),this.scale*(Math.ceil(Math.max(1,d+b.width/this.scale)/g)-e)*g,this.scale*(Math.ceil(Math.max(1,f+b.height/this.scale)/c)-k)*c)};var k=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,d){k.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
@@ -2128,19 +2128,19 @@ function(){return!1},k.panningHandler.isForcePanningEvent=function(b){return!mxE
this.setDefaultStyle=function(b){try{var d=k.view.getState(b);if(null!=d){var f=b.clone();f.style="";var c=k.getCellStyle(f);b=[];var f=[],e;for(e in d.style)c[e]!=d.style[e]&&(b.push(d.style[e]),f.push(e));for(var l=k.getModel().getStyle(d.cell),g=null!=l?l.split(";"):[],l=0;l<g.length;l++){var m=g[l],q=m.indexOf("=");if(0<=q){e=m.substring(0,q);var n=m.substring(q+1);null!=c[e]&&"none"==n&&(b.push(n),f.push(e))}}k.getModel().isEdge(d.cell)?k.currentEdgeStyle={}:k.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged",
"keys",f,"values",b,"cells",[d.cell]))}}catch(ma){this.handleError(ma)}};this.clearDefaultStyle=function(){k.currentEdgeStyle=mxUtils.clone(k.defaultEdgeStyle);k.currentVertexStyle=mxUtils.clone(k.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var d=["fontFamily","fontSource","fontSize","fontColor"];for(c=0;c<d.length;c++)0>mxUtils.indexOf(p,d[c])&&p.push(d[c]);var f="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),
l=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["align","verticalAlign"],["opacity"],["html"]];for(c=0;c<l.length;c++)for(e=0;e<l[c].length;e++)p.push(l[c][e]);for(c=0;c<t.length;c++)0>mxUtils.indexOf(p,t[c])&&p.push(t[c]);var m=function(b,d,f,c,e,g,m){c=null!=c?c:k.currentVertexStyle;e=null!=e?e:k.currentEdgeStyle;f=null!=f?f:k.getModel();
-if(m){m=[];for(var F=0;F<b.length;F++)m=m.concat(f.getDescendants(b[F]));b=m}f.beginUpdate();try{for(F=0;F<b.length;F++){var q=b[F],n;if(d)n=["fontSize","fontFamily","fontColor"];else{var D=f.getStyle(q),A=null!=D?D.split(";"):[];n=p.slice();for(var v=0;v<A.length;v++){var u=A[v],x=u.indexOf("=");if(0<=x){var y=u.substring(0,x),N=mxUtils.indexOf(n,y);0<=N&&n.splice(N,1);for(m=0;m<l.length;m++){var C=l[m];if(0<=mxUtils.indexOf(C,y))for(var da=0;da<C.length;da++){var B=mxUtils.indexOf(n,C[da]);0<=B&&
-n.splice(B,1)}}}}}var E=f.isEdge(q);m=E?e:c;for(var J=f.getStyle(q),v=0;v<n.length;v++){var y=n[v],G=m[y];null!=G&&("shape"!=y||E)&&(!E||g||0>mxUtils.indexOf(t,y))&&(J=mxUtils.setStyle(J,y,G))}Editor.simpleLabels&&(J=mxUtils.setStyle(mxUtils.setStyle(J,"html",null),"whiteSpace",null));f.setStyle(q,J)}}finally{f.endUpdate()}};k.addListener("cellsInserted",function(b,d){m(d.getProperty("cells"))});k.addListener("textInserted",function(b,d){m(d.getProperty("cells"),!0)});this.insertHandler=m;this.createDivs();
+if(m){m=[];for(var G=0;G<b.length;G++)m=m.concat(f.getDescendants(b[G]));b=m}f.beginUpdate();try{for(G=0;G<b.length;G++){var q=b[G],n;if(d)n=["fontSize","fontFamily","fontColor"];else{var D=f.getStyle(q),A=null!=D?D.split(";"):[];n=p.slice();for(var v=0;v<A.length;v++){var u=A[v],x=u.indexOf("=");if(0<=x){var y=u.substring(0,x),da=mxUtils.indexOf(n,y);0<=da&&n.splice(da,1);for(m=0;m<l.length;m++){var N=l[m];if(0<=mxUtils.indexOf(N,y))for(var C=0;C<N.length;C++){var B=mxUtils.indexOf(n,N[C]);0<=B&&
+n.splice(B,1)}}}}}var F=f.isEdge(q);m=F?e:c;for(var I=f.getStyle(q),v=0;v<n.length;v++){var y=n[v],E=m[y];null!=E&&("shape"!=y||F)&&(!F||g||0>mxUtils.indexOf(t,y))&&(I=mxUtils.setStyle(I,y,E))}Editor.simpleLabels&&(I=mxUtils.setStyle(mxUtils.setStyle(I,"html",null),"whiteSpace",null));f.setStyle(q,I)}}finally{f.endUpdate()}};k.addListener("cellsInserted",function(b,d){m(d.getProperty("cells"))});k.addListener("textInserted",function(b,d){m(d.getProperty("cells"),!0)});this.insertHandler=m;this.createDivs();
this.createUi();this.refresh();var q=mxUtils.bind(this,function(b){null==b&&(b=window.event);return k.isEditing()||null!=b&&this.isSelectionAllowed(b)});this.container==document.body&&(this.menubarContainer.onselectstart=q,this.menubarContainer.onmousedown=q,this.toolbarContainer.onselectstart=q,this.toolbarContainer.onmousedown=q,this.diagramContainer.onselectstart=q,this.diagramContainer.onmousedown=q,this.sidebarContainer.onselectstart=q,this.sidebarContainer.onmousedown=q,this.formatContainer.onselectstart=
q,this.formatContainer.onmousedown=q,this.footerContainer.onselectstart=q,this.footerContainer.onmousedown=q,null!=this.tabContainer&&(this.tabContainer.onselectstart=q));!this.editor.chromeless||this.editor.editable?(c=function(b){if(null!=b){var d=mxEvent.getSource(b);if("A"==d.nodeName)for(;null!=d;){if("geHint"==d.className)return!0;d=d.parentNode}}return q(b)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",
-c):this.diagramContainer.oncontextmenu=c):k.panningHandler.usePopupTrigger=!1;k.init(this.diagramContainer);mxClient.IS_SVG&&null!=k.view.getDrawPane()&&(c=k.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=k.graphHandler){var n=k.graphHandler.start;k.graphHandler.start=function(){null!=K.hoverIcons&&K.hoverIcons.reset();n.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(b){var d=
+c):this.diagramContainer.oncontextmenu=c):k.panningHandler.usePopupTrigger=!1;k.init(this.diagramContainer);mxClient.IS_SVG&&null!=k.view.getDrawPane()&&(c=k.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=k.graphHandler){var n=k.graphHandler.start;k.graphHandler.start=function(){null!=J.hoverIcons&&J.hoverIcons.reset();n.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(b){var d=
mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(b)-d.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(b)-d.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var u=!1,v=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(b,d){return u||v.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(b){32!=b.which||k.isEditing()?mxEvent.isConsumed(b)||
27!=b.keyCode||this.hideDialog(null,!0):(u=!0,this.hoverIcons.reset(),k.container.style.cursor="move",k.isEditing()||mxEvent.getSource(b)!=k.container||mxEvent.consume(b))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(b){k.container.style.cursor="";u=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var y=k.panningHandler.isForcePanningEvent;k.panningHandler.isForcePanningEvent=function(b){return y.apply(this,arguments)||u||mxEvent.isMouseEvent(b.getEvent())&&
-(this.usePopupTrigger||!mxEvent.isPopupTrigger(b.getEvent()))&&(!mxEvent.isControlDown(b.getEvent())&&mxEvent.isRightMouseButton(b.getEvent())||mxEvent.isMiddleMouseButton(b.getEvent()))};var x=k.cellEditor.isStopEditingEvent;k.cellEditor.isStopEditingEvent=function(b){return x.apply(this,arguments)||13==b.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxClient.IS_SF&&mxEvent.isShiftDown(b))};var G=k.isZoomWheelEvent;k.isZoomWheelEvent=function(){return u||
-G.apply(this,arguments)};var C=!1,E=null,J=null,L=null,H=mxUtils.bind(this,function(){if(null!=this.toolbar&&C!=k.cellEditor.isContentEditing()){for(var b=this.toolbar.container.firstChild,d=[];null!=b;){var f=b.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,b)&&(b.parentNode.removeChild(b),d.push(b));b=f}b=this.toolbar.fontMenu;f=this.toolbar.sizeMenu;if(null==L)this.toolbar.createTextToolbar();else{for(var c=0;c<L.length;c++)this.toolbar.container.appendChild(L[c]);this.toolbar.fontMenu=
-E;this.toolbar.sizeMenu=J}C=k.cellEditor.isContentEditing();E=b;J=f;L=d}}),K=this,B=k.cellEditor.startEditing;k.cellEditor.startEditing=function(){B.apply(this,arguments);H();if(k.cellEditor.isContentEditing()){var b=!1,d=function(){b||(b=!0,window.setTimeout(function(){var d=k.getSelectedEditingElement();null!=d&&(d=mxUtils.getCurrentStyle(d),null!=d&&null!=K.toolbar&&(K.toolbar.setFontName(Graph.stripQuotes(d.fontFamily)),K.toolbar.setFontSize(parseInt(d.fontSize))));b=!1},0))};mxEvent.addListener(k.cellEditor.textarea,
-"input",d);mxEvent.addListener(k.cellEditor.textarea,"touchend",d);mxEvent.addListener(k.cellEditor.textarea,"mouseup",d);mxEvent.addListener(k.cellEditor.textarea,"keyup",d);d()}};var M=k.cellEditor.stopEditing;k.cellEditor.stopEditing=function(b,d){try{M.apply(this,arguments),H()}catch(R){K.handleError(R)}};k.container.setAttribute("tabindex","0");k.container.style.cursor="default";if(window.self===window.top&&null!=k.container.parentNode)try{k.container.focus()}catch(T){}var P=k.fireMouseEvent;
+(this.usePopupTrigger||!mxEvent.isPopupTrigger(b.getEvent()))&&(!mxEvent.isControlDown(b.getEvent())&&mxEvent.isRightMouseButton(b.getEvent())||mxEvent.isMiddleMouseButton(b.getEvent()))};var x=k.cellEditor.isStopEditingEvent;k.cellEditor.isStopEditingEvent=function(b){return x.apply(this,arguments)||13==b.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxClient.IS_SF&&mxEvent.isShiftDown(b))};var E=k.isZoomWheelEvent;k.isZoomWheelEvent=function(){return u||
+E.apply(this,arguments)};var C=!1,F=null,I=null,L=null,H=mxUtils.bind(this,function(){if(null!=this.toolbar&&C!=k.cellEditor.isContentEditing()){for(var b=this.toolbar.container.firstChild,d=[];null!=b;){var f=b.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,b)&&(b.parentNode.removeChild(b),d.push(b));b=f}b=this.toolbar.fontMenu;f=this.toolbar.sizeMenu;if(null==L)this.toolbar.createTextToolbar();else{for(var c=0;c<L.length;c++)this.toolbar.container.appendChild(L[c]);this.toolbar.fontMenu=
+F;this.toolbar.sizeMenu=I}C=k.cellEditor.isContentEditing();F=b;I=f;L=d}}),J=this,B=k.cellEditor.startEditing;k.cellEditor.startEditing=function(){B.apply(this,arguments);H();if(k.cellEditor.isContentEditing()){var b=!1,d=function(){b||(b=!0,window.setTimeout(function(){var d=k.getSelectedEditingElement();null!=d&&(d=mxUtils.getCurrentStyle(d),null!=d&&null!=J.toolbar&&(J.toolbar.setFontName(Graph.stripQuotes(d.fontFamily)),J.toolbar.setFontSize(parseInt(d.fontSize))));b=!1},0))};mxEvent.addListener(k.cellEditor.textarea,
+"input",d);mxEvent.addListener(k.cellEditor.textarea,"touchend",d);mxEvent.addListener(k.cellEditor.textarea,"mouseup",d);mxEvent.addListener(k.cellEditor.textarea,"keyup",d);d()}};var M=k.cellEditor.stopEditing;k.cellEditor.stopEditing=function(b,d){try{M.apply(this,arguments),H()}catch(R){J.handleError(R)}};k.container.setAttribute("tabindex","0");k.container.style.cursor="default";if(window.self===window.top&&null!=k.container.parentNode)try{k.container.focus()}catch(T){}var P=k.fireMouseEvent;
k.fireMouseEvent=function(b,d,f){b==mxEvent.MOUSE_DOWN&&this.container.focus();P.apply(this,arguments)};k.popupMenuHandler.autoExpand=!0;null!=this.menus&&(k.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(b,d,f){this.menus.createPopupMenu(b,d,f)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(b){k.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};k.connectionHandler.addListener(mxEvent.CONNECT,function(b,
-d){var f=[d.getProperty("cell")];d.getProperty("terminalInserted")&&(f.push(d.getProperty("terminal")),window.setTimeout(function(){null!=K.hoverIcons&&K.hoverIcons.update(k.view.getState(f[f.length-1]))},0));m(f)});this.addListener("styleChanged",mxUtils.bind(this,function(b,c){var e=c.getProperty("cells"),l=!1,g=!1;if(0<e.length)for(var m=0;m<e.length&&(l=k.getModel().isVertex(e[m])||l,!(g=k.getModel().isEdge(e[m])||g)||!l);m++);else g=l=!0;for(var e=c.getProperty("keys"),q=c.getProperty("values"),
+d){var f=[d.getProperty("cell")];d.getProperty("terminalInserted")&&(f.push(d.getProperty("terminal")),window.setTimeout(function(){null!=J.hoverIcons&&J.hoverIcons.update(k.view.getState(f[f.length-1]))},0));m(f)});this.addListener("styleChanged",mxUtils.bind(this,function(b,c){var e=c.getProperty("cells"),l=!1,g=!1;if(0<e.length)for(var m=0;m<e.length&&(l=k.getModel().isVertex(e[m])||l,!(g=k.getModel().isEdge(e[m])||g)||!l);m++);else g=l=!0;for(var e=c.getProperty("keys"),q=c.getProperty("values"),
m=0;m<e.length;m++){var n=0<=mxUtils.indexOf(d,e[m]);if("strokeColor"!=e[m]||null!=q[m]&&"none"!=q[m])if(0<=mxUtils.indexOf(t,e[m]))g||0<=mxUtils.indexOf(f,e[m])?null==q[m]?delete k.currentEdgeStyle[e[m]]:k.currentEdgeStyle[e[m]]=q[m]:l&&0<=mxUtils.indexOf(p,e[m])&&(null==q[m]?delete k.currentVertexStyle[e[m]]:k.currentVertexStyle[e[m]]=q[m]);else if(0<=mxUtils.indexOf(p,e[m])){if(l||n)null==q[m]?delete k.currentVertexStyle[e[m]]:k.currentVertexStyle[e[m]]=q[m];if(g||n||0<=mxUtils.indexOf(f,e[m]))null==
q[m]?delete k.currentEdgeStyle[e[m]]:k.currentEdgeStyle[e[m]]=q[m]}}null!=this.toolbar&&(this.toolbar.setFontName(k.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(k.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==k.currentEdgeStyle.edgeStyle&&"1"==k.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==k.currentEdgeStyle.edgeStyle||
"none"==k.currentEdgeStyle.edgeStyle||null==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==k.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==k.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),
@@ -2184,9 +2184,9 @@ EditorUi.prototype.initClipboard=function(){var b=this,c=mxClipboard.cut;mxClipb
null;c.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):g=e.apply(this,arguments);b.updatePasteActionStates();return g};var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);b.updatePasteActionStates()};var g=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(c,e){g.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var b=this.graph.getPageLayout(),d=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+b.x*d.width),this.scale*(this.translate.y+b.y*d.height),this.scale*b.width*d.width,
-this.scale*b.height*d.height)};b.getPreferredPageSize=function(b,d,f){b=this.getPageLayout();d=this.getPageSize();return new mxRectangle(0,0,b.width*d.width,b.height*d.height)};var c=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(d,f,c,e){if(null!=b.container&&!b.isViewer()){c=null!=c?c:0;e=null!=e?e:0;var l=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),g=mxUtils.hasScrollbars(b.container),k=b.view.translate,m=b.view.scale,q=mxRectangle.fromRectangle(l);
-q.x=q.x/m-k.x;q.y=q.y/m-k.y;q.width/=m;q.height/=m;var k=b.container.scrollTop,F=b.container.scrollLeft,n=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)n+=3;var D=b.container.offsetWidth-n,n=b.container.offsetHeight-n;d=d?Math.max(.3,Math.min(f||1,D/q.width)):m;f=(D-d*q.width)/2/d;var p=0==this.lightboxVerticalDivider?0:(n-d*q.height)/this.lightboxVerticalDivider/d;g&&(f=Math.max(f,0),p=Math.max(p,0));if(g||l.width<D||l.height<n)b.view.scaleAndTranslate(d,Math.floor(f-
-q.x),Math.floor(p-q.y)),b.container.scrollTop=k*d/m,b.container.scrollLeft=F*d/m;else if(0!=c||0!=e)l=b.view.translate,b.view.setTranslate(Math.floor(l.x+c/m),Math.floor(l.y+e/m))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var k=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",k);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",k)});this.editor.addListener("resetGraphView",mxUtils.bind(this,
+this.scale*b.height*d.height)};b.getPreferredPageSize=function(b,d,f){b=this.getPageLayout();d=this.getPageSize();return new mxRectangle(0,0,b.width*d.width,b.height*d.height)};var c=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(d,f,c,e){if(null!=b.container&&!b.isViewer()){c=null!=c?c:0;e=null!=e?e:0;var l=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),g=mxUtils.hasScrollbars(b.container),m=b.view.translate,k=b.view.scale,q=mxRectangle.fromRectangle(l);
+q.x=q.x/k-m.x;q.y=q.y/k-m.y;q.width/=k;q.height/=k;var m=b.container.scrollTop,G=b.container.scrollLeft,n=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)n+=3;var D=b.container.offsetWidth-n,n=b.container.offsetHeight-n;d=d?Math.max(.3,Math.min(f||1,D/q.width)):k;f=(D-d*q.width)/2/d;var p=0==this.lightboxVerticalDivider?0:(n-d*q.height)/this.lightboxVerticalDivider/d;g&&(f=Math.max(f,0),p=Math.max(p,0));if(g||l.width<D||l.height<n)b.view.scaleAndTranslate(d,Math.floor(f-
+q.x),Math.floor(p-q.y)),b.container.scrollTop=m*d/k,b.container.scrollLeft=G*d/k;else if(0!=c||0!=e)l=b.view.translate,b.view.setTranslate(Math.floor(l.x+c/k),Math.floor(l.y+e/k))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var k=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",k);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",k)});this.editor.addListener("resetGraphView",mxUtils.bind(this,
function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(d){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(d){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var g=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing=
"border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var d=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=d?parseInt(d["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var t=0,p=mxUtils.bind(this,function(b,d,f){t++;var c=document.createElement("span");c.style.paddingLeft="8px";c.style.paddingRight=
@@ -2198,20 +2198,20 @@ p(mxUtils.bind(this,function(d){b.isLightboxView()?(1==b.view.scale?this.lightbo
"none";u=null}),600)}),b||200)}),y=mxUtils.bind(this,function(b){null!=n&&(window.clearTimeout(n),n=null);null!=u&&(window.clearTimeout(u),u=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,b||30)});if("1"==urlParams.layers){this.layersDialog=null;var x=p(mxUtils.bind(this,function(d){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,
"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var f=x.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=f.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));f=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=f.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(d)}),
-Editor.layersImage,mxResources.get("layers")),G=b.getModel();G.addListener(mxEvent.CHANGE,function(){x.style.display=1<G.getChildCount(G.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(d){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,
+Editor.layersImage,mxResources.get("layers")),E=b.getModel();E.addListener(mxEvent.CHANGE,function(){x.style.display=1<E.getChildCount(E.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(d){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,
"editWindow");mxEvent.consume(d)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(q=0;q<this.lightboxToolbarActions.length;q++){var C=this.lightboxToolbarActions[q];C.elem=p(C.fn,C.icon,C.tooltip)}null!=g.refreshBtn&&p(mxUtils.bind(this,function(b){g.refreshBtn.url?window.location.href=g.refreshBtn.url:window.location.reload();mxEvent.consume(b)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=g.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,
function(d){g.fullscreenBtn.url?b.openLink(g.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(d)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(g.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=document.body))&&p(mxUtils.bind(this,function(b){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(b))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display=
"none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||(mxEvent.isShiftDown(b)||y(30),v())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(b){mxEvent.consume(b)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",
-mxUtils.bind(this,function(d){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(d)?v():y(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(b){mxEvent.isShiftDown(b)?v():y(100);mxEvent.consume(b)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||y(30)}));var E=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(d,f){this.startX=
-f.getGraphX();this.startY=f.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(b,d){},mouseUp:function(d,f){mxEvent.isTouchEvent(f.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<E&&Math.abs(this.scrollTop-b.container.scrollTop)<E&&Math.abs(this.startX-f.getGraphX())<E&&Math.abs(this.startY-f.getGraphY())<E&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?v():y(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var J=
-b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var b=this.graph.getPagePadding(),d=this.graph.getPageSize();this.translate.x=b.x-(this.x0||0)*d.width;this.translate.y=b.y-(this.y0||0)*d.height}J.apply(this,arguments)};if(!b.isViewer()){var L=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var d=this.getPageLayout(),f=this.getPagePadding(),c=this.getPageSize(),e=Math.ceil(2*
+mxUtils.bind(this,function(d){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(d)?v():y(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(b){mxEvent.isShiftDown(b)?v():y(100);mxEvent.consume(b)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||y(30)}));var F=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(d,f){this.startX=
+f.getGraphX();this.startY=f.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(b,d){},mouseUp:function(d,f){mxEvent.isTouchEvent(f.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<F&&Math.abs(this.scrollTop-b.container.scrollTop)<F&&Math.abs(this.startX-f.getGraphX())<F&&Math.abs(this.startY-f.getGraphY())<F&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?v():y(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var I=
+b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var b=this.graph.getPagePadding(),d=this.graph.getPageSize();this.translate.x=b.x-(this.x0||0)*d.width;this.translate.y=b.y-(this.y0||0)*d.height}I.apply(this,arguments)};if(!b.isViewer()){var L=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var d=this.getPageLayout(),f=this.getPagePadding(),c=this.getPageSize(),e=Math.ceil(2*
f.x+d.width*c.width),l=Math.ceil(2*f.y+d.height*c.height),g=b.minimumGraphSize;if(null==g||g.width!=e||g.height!=l)b.minimumGraphSize=new mxRectangle(0,0,e,l);e=f.x-d.x*c.width;f=f.y-d.y*c.height;this.autoTranslate||this.view.translate.x==e&&this.view.translate.y==f?L.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=d.x,this.view.y0=d.y,d=b.view.translate.x,c=b.view.translate.y,b.view.setTranslate(e,f),b.container.scrollLeft+=Math.round((e-d)*b.view.scale),b.container.scrollTop+=Math.round((f-
-c)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var H=b.view.getBackgroundPane(),K=b.view.getDrawPane();b.cumulativeZoomFactor=1;var B=null,M=null,P=null,T=null,N=null,R=function(d){null!=B&&window.clearTimeout(B);window.setTimeout(function(){if(!b.isMouseDown||T)B=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,
-"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),K.style.transformOrigin="",H.style.transformOrigin="",mxClient.IS_SF?(K.style.transform="scale(1)",H.style.transform="scale(1)",window.setTimeout(function(){K.style.transform="";H.style.transform=""},0)):(K.style.transform="",H.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var d=new mxPoint(b.container.scrollLeft,b.container.scrollTop),
-f=mxUtils.getOffset(b.container),l=b.view.scale,g=0,k=0;null!=M&&(g=b.container.offsetWidth/2-M.x+f.x,k=b.container.offsetHeight/2-M.y+f.y);b.zoom(b.cumulativeZoomFactor);b.view.scale!=l&&(null!=P&&(g+=d.x-P.x,k+=d.y-P.y),null!=c&&e.chromelessResize(!1,null,g*(b.cumulativeZoomFactor-1),k*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==g&&0==k||(b.container.scrollLeft-=g*(b.cumulativeZoomFactor-1),b.container.scrollTop-=k*(b.cumulativeZoomFactor-1)));null!=N&&K.setAttribute("filter",
-N);b.cumulativeZoomFactor=1;N=T=M=P=B=null}),null!=d?d:b.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay)},0)},F=Date.now();b.lazyZoom=function(d,f,c){(f=f||!b.scrollbars)&&(M=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));if(mxClient.IS_IOS||!(15>Date.now()-F)){F=Date.now();d?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,
+c)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var H=b.view.getBackgroundPane(),J=b.view.getDrawPane();b.cumulativeZoomFactor=1;var B=null,M=null,P=null,T=null,N=null,R=function(d){null!=B&&window.clearTimeout(B);window.setTimeout(function(){if(!b.isMouseDown||T)B=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,
+"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),J.style.transformOrigin="",H.style.transformOrigin="",mxClient.IS_SF?(J.style.transform="scale(1)",H.style.transform="scale(1)",window.setTimeout(function(){J.style.transform="";H.style.transform=""},0)):(J.style.transform="",H.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var d=new mxPoint(b.container.scrollLeft,b.container.scrollTop),
+f=mxUtils.getOffset(b.container),l=b.view.scale,g=0,m=0;null!=M&&(g=b.container.offsetWidth/2-M.x+f.x,m=b.container.offsetHeight/2-M.y+f.y);b.zoom(b.cumulativeZoomFactor);b.view.scale!=l&&(null!=P&&(g+=d.x-P.x,m+=d.y-P.y),null!=c&&e.chromelessResize(!1,null,g*(b.cumulativeZoomFactor-1),m*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==g&&0==m||(b.container.scrollLeft-=g*(b.cumulativeZoomFactor-1),b.container.scrollTop-=m*(b.cumulativeZoomFactor-1)));null!=N&&J.setAttribute("filter",
+N);b.cumulativeZoomFactor=1;N=T=M=P=B=null}),null!=d?d:b.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay)},0)},G=Date.now();b.lazyZoom=function(d,f,c){(f=f||!b.scrollbars)&&(M=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));if(mxClient.IS_IOS||!(15>Date.now()-G)){G=Date.now();d?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,
this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(b.isFastZoomEnabled()){null==
-N&&""!=K.getAttribute("filter")&&(N=K.getAttribute("filter"),K.removeAttribute("filter"));P=new mxPoint(b.container.scrollLeft,b.container.scrollTop);d=f?b.container.scrollLeft+b.container.clientWidth/2:M.x+b.container.scrollLeft-b.container.offsetLeft;var l=f?b.container.scrollTop+b.container.clientHeight/2:M.y+b.container.scrollTop-b.container.offsetTop;K.style.transformOrigin=d+"px "+l+"px";K.style.transform="scale("+this.cumulativeZoomFactor+")";H.style.transformOrigin=d+"px "+l+"px";H.style.transform=
+N&&""!=J.getAttribute("filter")&&(N=J.getAttribute("filter"),J.removeAttribute("filter"));P=new mxPoint(b.container.scrollLeft,b.container.scrollTop);d=f?b.container.scrollLeft+b.container.clientWidth/2:M.x+b.container.scrollLeft-b.container.offsetLeft;var l=f?b.container.scrollTop+b.container.clientHeight/2:M.y+b.container.scrollTop-b.container.offsetTop;J.style.transformOrigin=d+"px "+l+"px";J.style.transform="scale("+this.cumulativeZoomFactor+")";H.style.transformOrigin=d+"px "+l+"px";H.style.transform=
"scale("+this.cumulativeZoomFactor+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(d=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(d.style,"transform-origin",(f?b.container.clientWidth/2+b.container.scrollLeft-d.offsetLeft+"px":M.x+b.container.scrollLeft-d.offsetLeft-b.container.offsetLeft+"px")+" "+(f?b.container.clientHeight/2+b.container.scrollTop-d.offsetTop+"px":M.y+b.container.scrollTop-d.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(d.style,
"transform","scale("+this.cumulativeZoomFactor+")"));b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset()}R(c)}};mxEvent.addGestureListeners(b.container,function(b){null!=B&&window.clearTimeout(B)},null,function(d){1!=b.cumulativeZoomFactor&&R(0)});mxEvent.addListener(b.container,"scroll",function(d){null==B||b.isMouseDown||1==b.cumulativeZoomFactor||R(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(d,f,c,e,l){b.fireEvent(new mxEventObject("wheel"));
if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!c&&b.isScrollWheelEvent(d))c=b.view.getTranslate(),e=40/b.view.scale,mxEvent.isShiftDown(d)?b.view.setTranslate(c.x+(f?-e:e),c.y):b.view.setTranslate(c.x,c.y+(f?e:-e));else if(c||b.isZoomWheelEvent(d))for(var g=mxEvent.getSource(d);null!=g;){if(g==b.container)return b.tooltipHandler.hideTooltip(),M=null!=e&&null!=l?new mxPoint(e,l):new mxPoint(mxEvent.getClientX(d),mxEvent.getClientY(d)),T=c,b.lazyZoom(f),mxEvent.consume(d),!1;g=g.parentNode}}),
@@ -2307,12 +2307,12 @@ mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhC
mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,c,e){return null};
mxImageShape.prototype.getImageDataUri=function(){var b=this.image;if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b),this.clippedImage=b;b=this.clippedSvg}return b};
Graph=function(b,c,e,k,g,p){mxGraph.call(this,b,c,e,k);this.themes=g||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;c=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<c&&(c=b.indexOf("/",c+2),0<c&&(this.domainUrl=b.substring(0,c)),c=b.lastIndexOf("/"),0<c&&(this.domainPathUrl=b.substring(0,c+1)));this.isHtmlLabel=function(b){b=this.getCurrentCellStyle(b);
-return null!=b?"1"==b.html||"wrap"==b[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var t=null,d=null,f=null,l=null,m=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,c){if("mouseDown"==c.getProperty("eventName")&&this.isEnabled()){var e=c.getProperty("event"),g=e.getState();if(!mxEvent.isAltDown(e.getEvent())&&null!=g)if(this.model.isEdge(g.cell))if(t=new mxPoint(e.getGraphX(),e.getGraphY()),m=this.isCellSelected(g.cell),f=g,d=e,null!=g.text&&null!=g.text.boundingBox&&
-mxUtils.contains(g.text.boundingBox,e.getGraphX(),e.getGraphY()))l=mxEvent.LABEL_HANDLE;else{var k=this.selectionCellsHandler.getHandler(g.cell);null!=k&&null!=k.bends&&0<k.bends.length&&(l=k.getHandleForEvent(e))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(e.getEvent())&&(k=this.selectionCellsHandler.getHandler(g.cell),null==k||null==k.getHandleForEvent(e))){var q=new mxRectangle(e.getGraphX()-1,e.getGraphY()-1);q.grow(mxEvent.isTouchEvent(e.getEvent())?mxShape.prototype.svgStrokeTolerance-
-1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(g.cell)&&!this.isCellSelected(g.cell)){var n=this.model.getParent(g.cell),k=this.model.getParent(n);if(!this.isCellSelected(k)&&(mxUtils.intersects(q,new mxRectangle(g.x,g.y-2,g.width,3))&&this.model.getChildAt(k,0)!=n||mxUtils.intersects(q,new mxRectangle(g.x,g.y+g.height-2,g.width,3))||mxUtils.intersects(q,new mxRectangle(g.x-2,g.y,2,g.height))&&this.model.getChildAt(n,0)!=g.cell||mxUtils.intersects(q,new mxRectangle(g.x+g.width-
-2,g.y,2,g.height)))&&(n=this.selectionCellsHandler.isHandled(k),this.selectCellForEvent(k,e.getEvent()),k=this.selectionCellsHandler.getHandler(k),null!=k)){var p=k.getHandleForEvent(e);null!=p&&(k.start(e.getGraphX(),e.getGraphY(),p),k.blockDelayedSelection=!n,e.consume())}}for(;!e.isConsumed()&&null!=g&&(this.isTableCell(g.cell)||this.isTableRow(g.cell)||this.isTable(g.cell));)this.isSwimlane(g.cell)&&(k=this.getActualStartSize(g.cell),n=this.view.scale,(0<k.x||0<k.width)&&mxUtils.intersects(q,
-new mxRectangle(g.x+(k.x-k.width-1)*n+(0==k.x?g.width:0),g.y,1,g.height))||(0<k.y||0<k.height)&&mxUtils.intersects(q,new mxRectangle(g.x,g.y+(k.y-k.height-1)*n+(0==k.y?g.height:0),g.width,1)))&&(this.selectCellForEvent(g.cell,e.getEvent()),k=this.selectionCellsHandler.getHandler(g.cell),null!=k&&(p=mxEvent.CUSTOM_HANDLE-k.customHandles.length+1,k.start(e.getGraphX(),e.getGraphY(),p),e.consume())),g=this.view.getState(this.model.getParent(g.cell))}}}));this.addMouseListener({mouseDown:function(b,d){},
-mouseMove:mxUtils.bind(this,function(b,c){var e=this.selectionCellsHandler.handlers.map,g;for(g in e)if(null!=e[g].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(c.getEvent()))if(g=this.tolerance,null!=t&&null!=f&&null!=d){if(e=f,Math.abs(t.x-c.getGraphX())>g||Math.abs(t.y-c.getGraphY())>g){var k=this.selectionCellsHandler.getHandler(e.cell);null==k&&this.model.isEdge(e.cell)&&(k=this.createHandler(e));if(null!=k&&null!=k.bends&&0<k.bends.length){g=k.getHandleForEvent(d);
+return null!=b?"1"==b.html||"wrap"==b[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var t=null,d=null,f=null,l=null,m=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,c){if("mouseDown"==c.getProperty("eventName")&&this.isEnabled()){var e=c.getProperty("event"),g=e.getState(),k=this.view.scale;if(!mxEvent.isAltDown(e.getEvent())&&null!=g)if(this.model.isEdge(g.cell))if(t=new mxPoint(e.getGraphX(),e.getGraphY()),m=this.isCellSelected(g.cell),f=g,d=e,null!=g.text&&null!=
+g.text.boundingBox&&mxUtils.contains(g.text.boundingBox,e.getGraphX(),e.getGraphY()))l=mxEvent.LABEL_HANDLE;else{var q=this.selectionCellsHandler.getHandler(g.cell);null!=q&&null!=q.bends&&0<q.bends.length&&(l=q.getHandleForEvent(e))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(e.getEvent())&&(q=this.selectionCellsHandler.getHandler(g.cell),null==q||null==q.getHandleForEvent(e))){var n=new mxRectangle(e.getGraphX()-1,e.getGraphY()-1);n.grow(mxEvent.isTouchEvent(e.getEvent())?mxShape.prototype.svgStrokeTolerance-
+1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(g.cell)&&!this.isCellSelected(g.cell)){var p=this.model.getParent(g.cell),q=this.model.getParent(p);if(!this.isCellSelected(q)){var v=this.getCellGeometry(g.cell),v=null!=v.alternateBounds?v.alternateBounds:v;if(mxUtils.intersects(n,new mxRectangle(g.x,g.y-2,v.width*k,3))&&this.model.getChildAt(q,0)!=p||mxUtils.intersects(n,new mxRectangle(g.x,g.y+v.height-2,v.width,3))||mxUtils.intersects(n,new mxRectangle(g.x-2,g.y,2,v.height*k))&&
+this.model.getChildAt(p,0)!=g.cell||mxUtils.intersects(n,new mxRectangle(g.x+v.width*k-2,g.y,2,v.height*k)))p=this.selectionCellsHandler.isHandled(q),this.selectCellForEvent(q,e.getEvent()),q=this.selectionCellsHandler.getHandler(q),null!=q&&(v=q.getHandleForEvent(e),null!=v&&(q.start(e.getGraphX(),e.getGraphY(),v),q.blockDelayedSelection=!p,e.consume()))}}for(;!e.isConsumed()&&null!=g&&(this.isTableCell(g.cell)||this.isTableRow(g.cell)||this.isTable(g.cell));)this.isSwimlane(g.cell)&&(q=this.getActualStartSize(g.cell),
+(0<q.x||0<q.width)&&mxUtils.intersects(n,new mxRectangle(g.x+(q.x-q.width-1)*k+(0==q.x?g.width:0),g.y,1,g.height))||(0<q.y||0<q.height)&&mxUtils.intersects(n,new mxRectangle(g.x,g.y+(q.y-q.height-1)*k+(0==q.y?g.height:0),g.width,1)))&&(this.selectCellForEvent(g.cell,e.getEvent()),q=this.selectionCellsHandler.getHandler(g.cell),null!=q&&(v=mxEvent.CUSTOM_HANDLE-q.customHandles.length+1,q.start(e.getGraphX(),e.getGraphY(),v),e.consume())),g=this.view.getState(this.model.getParent(g.cell))}}}));this.addMouseListener({mouseDown:function(b,
+d){},mouseMove:mxUtils.bind(this,function(b,c){var e=this.selectionCellsHandler.handlers.map,g;for(g in e)if(null!=e[g].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(c.getEvent()))if(g=this.tolerance,null!=t&&null!=f&&null!=d){if(e=f,Math.abs(t.x-c.getGraphX())>g||Math.abs(t.y-c.getGraphY())>g){var k=this.selectionCellsHandler.getHandler(e.cell);null==k&&this.model.isEdge(e.cell)&&(k=this.createHandler(e));if(null!=k&&null!=k.bends&&0<k.bends.length){g=k.getHandleForEvent(d);
var q=this.view.getEdgeStyle(e),n=q==mxEdgeStyle.EntityRelation;m||l!=mxEvent.LABEL_HANDLE||(g=l);if(n&&0!=g&&g!=k.bends.length-1&&g!=mxEvent.LABEL_HANDLE)!n||null==e.visibleSourceState&&null==e.visibleTargetState||(this.graphHandler.reset(),c.consume());else if(g==mxEvent.LABEL_HANDLE||0==g||null!=e.visibleSourceState||g==k.bends.length-1||null!=e.visibleTargetState)n||g==mxEvent.LABEL_HANDLE||(n=e.absolutePoints,null!=n&&(null==q&&null==g||q==mxEdgeStyle.OrthConnector)&&(g=l,null==g&&(g=new mxRectangle(t.x,
t.y),g.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(g,n[0].x,n[0].y)?g=0:mxUtils.contains(g,n[n.length-1].x,n[n.length-1].y)?g=k.bends.length-1:null!=q&&(2==n.length||3==n.length&&(0==Math.round(n[0].x-n[1].x)&&0==Math.round(n[1].x-n[2].x)||0==Math.round(n[0].y-n[1].y)&&0==Math.round(n[1].y-n[2].y)))?g=2:(g=mxUtils.findNearestSegment(e,t.x,t.y),g=null==q?mxEvent.VIRTUAL_HANDLE-g:g+1))),null==g&&(g=mxEvent.VIRTUAL_HANDLE)),k.start(c.getGraphX(),c.getGraphX(),g),c.consume(),this.graphHandler.reset()}null!=
k&&(this.selectionCellsHandler.isHandlerActive(k)?this.isCellSelected(e.cell)||(this.selectionCellsHandler.handlers.put(e.cell,k),this.selectCellForEvent(e.cell,c.getEvent())):this.isCellSelected(e.cell)||k.destroy());m=!1;t=d=f=l=null}}else if(e=c.getState(),null!=e&&this.isCellEditable(e.cell)){k=null;if(this.model.isEdge(e.cell)){if(g=new mxRectangle(c.getGraphX(),c.getGraphY()),g.grow(mxEdgeHandler.prototype.handleImage.width/2),n=e.absolutePoints,null!=n)if(null!=e.text&&null!=e.text.boundingBox&&
@@ -2324,20 +2324,21 @@ this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPa
function(){var b=q.apply(this,arguments);if(this.graph.pageVisible){for(var d=[],f=this.graph.pageFormat,c=this.graph.pageScale,e=f.width*c,f=f.height*c,c=this.graph.view.translate,l=this.graph.view.scale,g=this.graph.getPageLayout(),k=0;k<g.width;k++)d.push(new mxRectangle(((g.x+k)*e+c.x)*l,(g.y*f+c.y)*l,e*l,f*l));for(k=1;k<g.height;k++)d.push(new mxRectangle((g.x*e+c.x)*l,((g.y+k)*f+c.y)*l,e*l,f*l));b=d.concat(b)}return b};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
function(b,d){return null==b.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(b){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var n=this.graphHandler.getCells;this.graphHandler.getCells=function(b){for(var d=n.apply(this,arguments),f=new mxDictionary,c=[],e=0;e<d.length;e++){var l=this.graph.isTableCell(b)&&this.graph.isTableCell(d[e])&&
this.graph.isCellSelected(d[e])?this.graph.model.getParent(d[e]):this.graph.isTableRow(b)&&this.graph.isTableRow(d[e])&&this.graph.isCellSelected(d[e])?d[e]:this.graph.getCompositeParent(d[e]);null==l||f.get(l)||(f.put(l,!0),c.push(l))}return c};var u=this.graphHandler.start;this.graphHandler.start=function(b,d,f,c){var e=!1;this.graph.isTableCell(b)&&(this.graph.isCellSelected(b)?e=!0:b=this.graph.model.getParent(b));e||this.graph.isTableRow(b)&&this.graph.isCellSelected(b)||(b=this.graph.getCompositeParent(b));
-u.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(b,d){d=this.graph.getCompositeParent(d);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var v=new mxRubberband(this);this.getRubberband=function(){return v};var y=(new Date).getTime(),x=0,G=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var b=this.currentState;G.apply(this,arguments);b!=this.currentState?(y=(new Date).getTime(),x=0):x=(new Date).getTime()-y};var C=
-this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(b){return null!=this.currentState&&b.getState()==this.currentState&&2E3<x||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&C.apply(this,arguments)};var E=this.isToggleEvent;this.isToggleEvent=function(b){return E.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b)};var J=v.isForceRubberbandEvent;v.isForceRubberbandEvent=function(b){return J.apply(this,
+u.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(b,d){d=this.graph.getCompositeParent(d);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var v=new mxRubberband(this);this.getRubberband=function(){return v};var y=(new Date).getTime(),x=0,E=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var b=this.currentState;E.apply(this,arguments);b!=this.currentState?(y=(new Date).getTime(),x=0):x=(new Date).getTime()-y};var C=
+this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(b){return null!=this.currentState&&b.getState()==this.currentState&&2E3<x||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&C.apply(this,arguments)};var F=this.isToggleEvent;this.isToggleEvent=function(b){return F.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b)};var I=v.isForceRubberbandEvent;v.isForceRubberbandEvent=function(b){return I.apply(this,
arguments)&&!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isControlDown(b.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==b.getState()&&mxEvent.isTouchEvent(b.getEvent())};var L=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(L=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,
mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=L)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(b){return mxEvent.isMouseEvent(b.getEvent())};var H=this.click;this.click=function(b){var d=null==b.state&&null!=b.sourceState&&this.isCellLocked(b.sourceState.cell);if(this.isEnabled()&&!d||b.isConsumed())return H.apply(this,arguments);var f=d?b.sourceState.cell:b.getCell();null!=f&&(f=this.getClickableLinkForCell(f),null!=f&&(this.isCustomLink(f)?
-this.customLinkClicked(f):this.openLink(f)));this.isEnabled()&&d&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(b){return b.sourceState};var K=this.tooltipHandler.show;this.tooltipHandler.show=function(){K.apply(this,arguments);if(null!=this.div)for(var b=this.div.getElementsByTagName("a"),d=0;d<b.length;d++)null!=b[d].getAttribute("href")&&null==b[d].getAttribute("target")&&b[d].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(b){return b.sourceState};
+this.customLinkClicked(f):this.openLink(f)));this.isEnabled()&&d&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(b){return b.sourceState};var J=this.tooltipHandler.show;this.tooltipHandler.show=function(){J.apply(this,arguments);if(null!=this.div)for(var b=this.div.getElementsByTagName("a"),d=0;d<b.length;d++)null!=b[d].getAttribute("href")&&null==b[d].getAttribute("target")&&b[d].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(b){return b.sourceState};
this.getCursorForMouseEvent=function(b){var d=null==b.state&&null!=b.sourceState&&this.isCellLocked(b.sourceState.cell);return this.getCursorForCell(d?b.sourceState.cell:b.getCell())};var B=this.getCursorForCell;this.getCursorForCell=function(b){if(!this.isEnabled()||this.isCellLocked(b)){if(null!=this.getClickableLinkForCell(b))return"pointer";if(this.isCellLocked(b))return"default"}return B.apply(this,arguments)};this.selectRegion=function(b,d){var f=this.getCells(b.x,b.y,b.width,b.height,null,
null,null,function(b){return"1"==mxUtils.getValue(b.style,"locked","0")},!0);this.selectCellsForEvent(f,d);return f};var M=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(b,d,f){return this.graph.isCellSelected(b)?!1:M.apply(this,arguments)};this.isCellLocked=function(b){for(;null!=b;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(b),"locked","0"))return!0;b=this.model.getParent(b)}return!1};var P=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,
mxUtils.bind(this,function(b,d){if("mouseDown"==d.getProperty("eventName")){var f=d.getProperty("event").getState();P=null==f||this.isSelectionEmpty()||this.isCellSelected(f.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(b,d){if(!mxEvent.isMultiTouchEvent(d)){var f=d.getProperty("event"),c=d.getProperty("cell");null==c?(f=mxUtils.convertPoint(this.container,mxEvent.getClientX(f),mxEvent.getClientY(f)),v.start(f.x,f.y)):null!=P?this.addSelectionCells(P):
1<this.getSelectionCount()&&this.isCellSelected(c)&&this.removeSelectionCell(c);P=null;d.consume()}}));this.connectionHandler.selectCells=function(b,d){this.graph.setSelectionCell(d||b)};this.connectionHandler.constraintHandler.isStateIgnored=function(b,d){var f=b.view.graph;return d&&(f.isCellSelected(b.cell)||f.isTableRow(b.cell)&&f.selectionCellsHandler.isHandled(f.model.getParent(b.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var b=this.connectionHandler.constraintHandler;
null!=b.currentFocus&&b.isStateIgnored(b.currentFocus,!0)&&(b.currentFocus=null,b.constraints=null,b.destroyIcons());b.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var T=this.updateMouseEvent;this.updateMouseEvent=function(b){b=T.apply(this,arguments);null!=b.state&&this.isCellLocked(b.getCell())&&(b.state=null);return b}}this.currentTranslate=new mxPoint(0,0)};
Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;
-Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
+Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.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.createOffscreenGraph=function(b){var c=new Graph(document.createElement("div"));c.stylesheet.styles=mxUtils.clone(b.styles);c.resetViewOnRootChange=!1;c.setConnectable(!1);c.gridEnabled=!1;c.autoScroll=!1;c.setTooltips(!1);c.setEnabled(!1);c.container.style.visibility="hidden";c.container.style.position="absolute";c.container.style.overflow="hidden";c.container.style.height="1px";c.container.style.width="1px";return c};
-Graph.createSvgImage=function(b,c,e,k,g){e=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+c+'px" '+(null!=k&&null!=g?'viewBox="0 0 '+k+" "+g+'" ':"")+'version="1.1">'+e+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0)),b,c)};
+Graph.createSvgImage=function(b,c,e,k,g){e=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+c+'px" '+(null!=k&&null!=g?'viewBox="0 0 '+k+" "+g+'" ':"")+'version="1.1">'+e+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0)),b,c)};
Graph.zapGremlins=function(b){for(var c=0,e=[],k=0;k<b.length;k++){var g=b.charCodeAt(k);(32<=g||9==g||10==g||13==g)&&65535!=g&&65534!=g||(e.push(b.substring(c,k)),c=k+1)}0<c&&c<b.length&&e.push(b.substring(c));return 0==e.length?b:e.join("")};Graph.stringToBytes=function(b){for(var c=Array(b.length),e=0;e<b.length;e++)c[e]=b.charCodeAt(e);return c};Graph.bytesToString=function(b){for(var c=Array(b.length),e=0;e<b.length;e++)c[e]=String.fromCharCode(b[e]);return c.join("")};
Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(b,e){return String.fromCharCode(parseInt(e,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(b){return"%"+("00"+b.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,c){var e=mxUtils.getXml(b);return Graph.compress(c?e:Graph.zapGremlins(e))};
Graph.arrayBufferToString=function(b){var c="";b=new Uint8Array(b);for(var e=b.byteLength,k=0;k<e;k++)c+=String.fromCharCode(b[k]);return c};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(b){return b.charCodeAt(0)})};
@@ -2405,11 +2406,11 @@ null==t&&(t=f.hasAttribute(d)?null!=f.getAttribute(d)?f.getAttribute(d):"":null)
Graph.prototype.selectCellsForConnectVertex=function(b,c,e){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=e&&(mxEvent.isTouchEvent(c)?e.update(e.getState(this.view.getState(b[1]))):e.reset())):this.setSelectionCells(b)};Graph.prototype.isCloneConnectSource=function(b){var c=null;null!=this.layoutManager&&(c=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=c&&c.constructor==mxStackLayout};
Graph.prototype.connectVertex=function(b,c,e,k,g,p,t,d){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var f=this.isCloneConnectSource(b),l=f?b:this.getCompositeParent(b),m=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(l.geometry.x,l.geometry.y);c==mxConstants.DIRECTION_NORTH?(m.x+=l.geometry.width/2,m.y-=e):c==
mxConstants.DIRECTION_SOUTH?(m.x+=l.geometry.width/2,m.y+=l.geometry.height+e):(m.x=c==mxConstants.DIRECTION_WEST?m.x-e:m.x+(l.geometry.width+e),m.y+=l.geometry.height/2);var q=this.view.getState(this.model.getParent(b));e=this.view.scale;var n=this.view.translate,l=n.x*e,n=n.y*e;null!=q&&this.model.isVertex(q.cell)&&(l=q.x,n=q.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(m.x+=b.parent.geometry.x,m.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(l+m.x*e,n+m.y*e)).grow(40*e);p=null!=p?
-this.getCells(0,0,0,0,null,null,p,null,!0):null;var q=this.view.getState(b),u=null,v=null;if(null!=p){p=p.reverse();for(var y=0;y<p.length;y++)if(!this.isCellLocked(p[y])&&!this.model.isEdge(p[y])&&p[y]!=b)if(!this.model.isAncestor(b,p[y])&&this.isContainer(p[y])&&(null==u||p[y]==this.model.getParent(b)))u=p[y];else if(null==v&&this.isCellConnectable(p[y])&&!this.model.isAncestor(p[y],b)&&!this.isSwimlane(p[y])){var x=this.view.getState(p[y]);null==q||null==x||mxUtils.intersects(q,x)||(v=p[y])}}var G=
-!mxEvent.isShiftDown(k)||mxEvent.isControlDown(k)||g;G&&("1"!=urlParams.sketch||g)&&(c==mxConstants.DIRECTION_NORTH?m.y-=b.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?m.y+=b.geometry.height/2:m.x=c==mxConstants.DIRECTION_WEST?m.x-b.geometry.width/2:m.x+b.geometry.width/2);var C=[],E=v,v=u;g=mxUtils.bind(this,function(e){if(null==t||null!=e||null==v&&f){this.model.beginUpdate();try{if(null==E&&G){var g=this.getAbsoluteParent(null!=e?e:b),g=f?b:this.getCompositeParent(g);E=null!=e?e:this.duplicateCells([g],
-!1)[0];null!=e&&this.addCells([E],this.model.getParent(b),null,null,null,!0);var l=this.getCellGeometry(E);null!=l&&(null!=e&&"1"==urlParams.sketch&&(c==mxConstants.DIRECTION_NORTH?m.y-=l.height/2:c==mxConstants.DIRECTION_SOUTH?m.y+=l.height/2:m.x=c==mxConstants.DIRECTION_WEST?m.x-l.width/2:m.x+l.width/2),l.x=m.x-l.width/2,l.y=m.y-l.height/2);null!=u?(this.addCells([E],u,null,null,null,!0),v=null):G&&!f&&this.addCells([E],this.getDefaultParent(),null,null,null,!0)}var q=mxEvent.isControlDown(k)&&
-mxEvent.isShiftDown(k)&&G||null==v&&f?null:this.insertEdge(this.model.getParent(b),null,"",b,E,this.createCurrentEdgeStyle());if(null!=q&&this.connectionHandler.insertBeforeSource){var n=null;for(e=b;null!=e.parent&&null!=e.geometry&&e.geometry.relative&&e.parent!=q.parent;)e=this.model.getParent(e);null!=e&&null!=e.parent&&e.parent==q.parent&&(n=e.parent.getIndex(e),this.model.add(e.parent,q,n))}null==v&&null!=E&&null!=b.parent&&f&&c==mxConstants.DIRECTION_WEST&&(n=b.parent.getIndex(b),this.model.add(b.parent,
-E,n));null!=q&&C.push(q);null==v&&null!=E&&C.push(E);null==E&&null!=q&&q.geometry.setTerminalPoint(m,!1);null!=q&&this.fireEvent(new mxEventObject("cellsInserted","cells",[q]))}finally{this.model.endUpdate()}}if(null!=d)d(C);else return C});if(null==t||null!=E||!G||null==v&&f)return g(E);t(l+m.x*e,n+m.y*e,g)};
+this.getCells(0,0,0,0,null,null,p,null,!0):null;var q=this.view.getState(b),u=null,v=null;if(null!=p){p=p.reverse();for(var y=0;y<p.length;y++)if(!this.isCellLocked(p[y])&&!this.model.isEdge(p[y])&&p[y]!=b)if(!this.model.isAncestor(b,p[y])&&this.isContainer(p[y])&&(null==u||p[y]==this.model.getParent(b)))u=p[y];else if(null==v&&this.isCellConnectable(p[y])&&!this.model.isAncestor(p[y],b)&&!this.isSwimlane(p[y])){var x=this.view.getState(p[y]);null==q||null==x||mxUtils.intersects(q,x)||(v=p[y])}}var E=
+!mxEvent.isShiftDown(k)||mxEvent.isControlDown(k)||g;E&&("1"!=urlParams.sketch||g)&&(c==mxConstants.DIRECTION_NORTH?m.y-=b.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?m.y+=b.geometry.height/2:m.x=c==mxConstants.DIRECTION_WEST?m.x-b.geometry.width/2:m.x+b.geometry.width/2);var C=[],F=v,v=u;g=mxUtils.bind(this,function(e){if(null==t||null!=e||null==v&&f){this.model.beginUpdate();try{if(null==F&&E){var g=this.getAbsoluteParent(null!=e?e:b),g=f?b:this.getCompositeParent(g);F=null!=e?e:this.duplicateCells([g],
+!1)[0];null!=e&&this.addCells([F],this.model.getParent(b),null,null,null,!0);var l=this.getCellGeometry(F);null!=l&&(null!=e&&"1"==urlParams.sketch&&(c==mxConstants.DIRECTION_NORTH?m.y-=l.height/2:c==mxConstants.DIRECTION_SOUTH?m.y+=l.height/2:m.x=c==mxConstants.DIRECTION_WEST?m.x-l.width/2:m.x+l.width/2),l.x=m.x-l.width/2,l.y=m.y-l.height/2);null!=u?(this.addCells([F],u,null,null,null,!0),v=null):E&&!f&&this.addCells([F],this.getDefaultParent(),null,null,null,!0)}var q=mxEvent.isControlDown(k)&&
+mxEvent.isShiftDown(k)&&E||null==v&&f?null:this.insertEdge(this.model.getParent(b),null,"",b,F,this.createCurrentEdgeStyle());if(null!=q&&this.connectionHandler.insertBeforeSource){var n=null;for(e=b;null!=e.parent&&null!=e.geometry&&e.geometry.relative&&e.parent!=q.parent;)e=this.model.getParent(e);null!=e&&null!=e.parent&&e.parent==q.parent&&(n=e.parent.getIndex(e),this.model.add(e.parent,q,n))}null==v&&null!=F&&null!=b.parent&&f&&c==mxConstants.DIRECTION_WEST&&(n=b.parent.getIndex(b),this.model.add(b.parent,
+F,n));null!=q&&C.push(q);null==v&&null!=F&&C.push(F);null==F&&null!=q&&q.geometry.setTerminalPoint(m,!1);null!=q&&this.fireEvent(new mxEventObject("cellsInserted","cells",[q]))}finally{this.model.endUpdate()}}if(null!=d)d(C);else return C});if(null==t||null!=F||!E||null==v&&f)return g(F);t(l+m.x*e,n+m.y*e,g)};
Graph.prototype.getIndexableText=function(){var b=document.createElement("div"),c=[],e,k;for(k in this.model.cells)if(e=this.model.cells[k],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(b.innerHTML=this.sanitizeHtml(this.getLabel(e)),e=mxUtils.extractTextWithWhitespace([b])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&c.push(e);return c.join(" ")};
Graph.prototype.convertValueToString=function(b){var c=this.model.getValue(b);if(null!=c&&"object"==typeof c){var e=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder"))for(var c=b.getAttribute("placeholder"),k=b;null==e&&null!=k;)null!=k.value&&"object"==typeof k.value&&(e=k.hasAttribute(c)?null!=k.getAttribute(c)?k.getAttribute(c):"":null),k=this.model.getParent(k);else e=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(e=c.getAttribute("label_"+Graph.diagramLanguage)),
null==e&&(e=c.getAttribute("label")||"");return e||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),null!=b&&"javascript:"===b.toLowerCase().substring(0,11)&&(b=b.substring(11)),b):null};
@@ -2471,10 +2472,12 @@ g=this.createVertex(null,null,null!=g?g:"",0,0,c*e,b*k,null!=p?p:"shape=table;ch
return 1<b?(t.geometry.y=k+p,this.createParent(g,this.createParent(t,this.createVertex(null,null,"",p,0,e,k,f),c,e,0),b-1,0,k)):g};Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};
Graph.prototype.setTableRowHeight=function(b,c,e){e=null!=e?e:!0;var k=this.getModel();k.beginUpdate();try{var g=this.getCellGeometry(b);if(null!=g){g=g.clone();g.height+=c;k.setGeometry(b,g);var p=k.getParent(b),t=k.getChildCells(p,!0);if(!e){var d=mxUtils.indexOf(t,b);if(d<t.length-1){var f=t[d+1],l=this.getCellGeometry(f);null!=l&&(l=l.clone(),l.y+=c,l.height-=c,k.setGeometry(f,l))}}var m=this.getCellGeometry(p);null!=m&&(e||(e=b==t[t.length-1]),e&&(m=m.clone(),m.height+=c,k.setGeometry(p,m)));
null!=this.layoutManager&&this.layoutManager.executeLayout(p,!0)}}finally{k.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(b,c,e){e=null!=e?e:!1;var k=this.getModel(),g=k.getParent(b),p=k.getParent(g),t=k.getChildCells(g,!0);b=mxUtils.indexOf(t,b);var d=b==t.length-1;k.beginUpdate();try{for(var f=k.getChildCells(p,!0),l=0;l<f.length;l++){var g=f[l],t=k.getChildCells(g,!0),m=t[b],q=this.getCellGeometry(m);null!=q&&(q=q.clone(),q.width+=c,k.setGeometry(m,q));b<t.length-1&&(m=t[b+1],q=this.getCellGeometry(m),null!=q&&(q=q.clone(),q.x+=c,e||(q.width-=c),k.setGeometry(m,q)))}if(d||
-e){var n=this.getCellGeometry(p);null!=n&&(n=n.clone(),n.width+=c,k.setGeometry(p,n))}null!=this.layoutManager&&this.layoutManager.executeLayout(p,!0)}finally{k.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};
-TableLayout.prototype.getSize=function(b,c){for(var e=0,k=0;k<b.length;k++)if(!this.isVertexIgnored(b[k])){var g=this.graph.getCellGeometry(b[k]);null!=g&&(e+=c?g.width:g.height)}return e};TableLayout.prototype.getRowLayout=function(b,c){for(var e=this.graph.model.getChildCells(b,!0),k=this.graph.getActualStartSize(b,!0),g=this.getSize(e,!0),p=c-k.x-k.width,t=[],k=k.x,d=0;d<e.length;d++){var f=this.graph.getCellGeometry(e[d]);null!=f&&(k+=f.width*p/g,t.push(Math.round(k)))}return t};
-TableLayout.prototype.layoutRow=function(b,c,e,k){var g=this.graph.getModel(),p=g.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var t=b.x,d=0;null!=c&&(c=c.slice(),c.splice(0,0,b.x));for(var f=0;f<p.length;f++){var l=this.graph.getCellGeometry(p[f]);null!=l&&(l=l.clone(),l.y=b.y,l.height=e-b.y-b.height,null!=c?(l.x=c[f],l.width=c[f+1]-l.x,f==p.length-1&&f<c.length-2&&(l.width=k-l.x-b.x-b.width)):(l.x=t,t+=l.width,f==p.length-1?l.width=k-b.x-b.width-d:d+=l.width),g.setGeometry(p[f],l))}return d};
+Graph.prototype.setTableColumnWidth=function(b,c,e){e=null!=e?e:!1;var k=this.getModel(),g=k.getParent(b),p=k.getParent(g),t=k.getChildCells(g,!0);b=mxUtils.indexOf(t,b);var d=b==t.length-1;k.beginUpdate();try{for(var f=k.getChildCells(p,!0),l=0;l<f.length;l++){var g=f[l],t=k.getChildCells(g,!0),m=t[b],q=this.getCellGeometry(m);if(null!=q){var q=q.clone(),n=null!=q.alternateBounds?q.alternateBounds:q;n.width+=c;k.setGeometry(m,q)}b<t.length-1&&(m=t[b+1],q=this.getCellGeometry(m),null!=q&&(q=q.clone(),
+n=null!=q.alternateBounds?q.alternateBounds:q,n.x+=c,e||(n.width-=c),k.setGeometry(m,q)))}if(d||e){var u=this.getCellGeometry(p);null!=u&&(u=u.clone(),n=null!=u.alternateBounds?u.alternateBounds:q,n.width+=c,k.setGeometry(p,u))}null!=this.layoutManager&&this.layoutManager.executeLayout(p,!0)}finally{k.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,c){for(var e=0,k=0;k<b.length;k++)if(!this.isVertexIgnored(b[k])){var g=this.graph.getCellGeometry(b[k]);null!=g&&(e+=c?g.width:g.height)}return e};
+TableLayout.prototype.getRowLayout=function(b,c){for(var e=this.graph.model.getChildCells(b,!0),k=this.graph.getActualStartSize(b,!0),g=this.getSize(e,!0),p=c-k.x-k.width,t=[],k=k.x,d=0;d<e.length;d++){var f=this.graph.getCellGeometry(e[d]);null!=f&&(k+=(null!=f.alternateBounds?f.alternateBounds.width:f.width)*p/g,t.push(Math.round(k)))}return t};
+TableLayout.prototype.layoutRow=function(b,c,e,k){var g=this.graph.getModel(),p=g.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var t=null,d=b.x,f=0;null!=c&&(c=c.slice(),c.splice(0,0,b.x));for(var l=0;l<p.length;l++){var m=this.graph.getCellGeometry(p[l]);null!=m&&(m=m.clone(),m.y=b.y,m.height=e-b.y-b.height,null!=c?(m.x=c[l],m.width=c[l+1]-m.x,l==p.length-1&&l<c.length-2&&(m.width=k-m.x-b.x-b.width)):(m.x=d,d+=m.width,l==p.length-1?m.width=k-b.x-b.width-f:f+=m.width),m.alternateBounds=
+new mxRectangle(0,0,m.width,m.height),g.setGeometry(p[l],m));null!=t&&null!=t.geo&&(1<t.colspan?(t.colspan--,t.geo.width+=m.width,g.setVisible(p[l],!1)):g.setVisible(p[l],!0));if(null==t||1>=t.colspan)t=this.graph.getCurrentCellStyle(p[l],!0),t={colspan:null!=t?parseInt(t.colspan||1):1,style:t,cell:p[l],geo:m}}return f};
TableLayout.prototype.execute=function(b){if(null!=b){var c=this.graph.getActualStartSize(b,!0),e=this.graph.getCellGeometry(b),k=this.graph.getCellStyle(b),g="1"==mxUtils.getValue(k,"resizeLastRow","0"),p="1"==mxUtils.getValue(k,"resizeLast","0"),k="1"==mxUtils.getValue(k,"fixedRows","0"),t=this.graph.getModel(),d=0;t.beginUpdate();try{var f=e.height-c.y-c.height,l=e.width-c.x-c.width,m=t.getChildCells(b,!0),q=this.getSize(m,!1);if(0<f&&0<l&&0<m.length&&0<q){if(g){var n=this.graph.getCellGeometry(m[m.length-
1]);null!=n&&(n=n.clone(),n.height=f-q+n.height,t.setGeometry(m[m.length-1],n))}for(var u=p?null:this.getRowLayout(m[0],l),v=c.y,y=0;y<m.length;y++)n=this.graph.getCellGeometry(m[y]),null!=n&&(n=n.clone(),n.x=c.x,n.width=l,n.y=Math.round(v),v=g||k?v+n.height:v+n.height/q*f,n.height=Math.round(v)-n.y,t.setGeometry(m[y],n)),d=Math.max(d,this.layoutRow(m[y],u,n.height,l));k&&f<q&&(e=e.clone(),e.height=v+c.height,t.setGeometry(b,e));p&&l<d+Graph.minTableColumnWidth&&(e=e.clone(),e.width=d+c.width+c.x+
Graph.minTableColumnWidth,t.setGeometry(b,e))}}finally{t.endUpdate()}}};
@@ -2482,12 +2485,12 @@ Graph.minTableColumnWidth,t.setGeometry(b,e))}}finally{t.endUpdate()}}};
arguments);null!=f&&d&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(f);return f};var e=mxShape.prototype.paint;mxShape.prototype.paint=function(){e.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var b=this.node.getElementsByTagName("path");if(1<b.length){"1"!=mxUtils.getValue(this.state.style,
mxConstants.STYLE_DASHED,"0")&&b[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var d=this.state.view.graph.getFlowAnimationStyle();null!=d&&b[1].setAttribute("class",d.getAttribute("id"))}}};var k=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(b,d){return k.apply(this,arguments)||null!=b.routedPoints&&null!=d.routedPoints&&!mxUtils.equalPoints(d.routedPoints,b.routedPoints)};var g=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
function(b){g.apply(this,arguments);this.graph.model.isEdge(b.cell)&&1!=b.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(b)};mxGraphView.prototype.updateLineJumps=function(b){var d=b.absolutePoints;if(Graph.lineJumpsEnabled){var f=null!=b.routedPoints,c=null;if(null!=d&&null!=this.validEdges&&"none"!==mxUtils.getValue(b.style,"jumpStyle","none")){for(var e=function(d,f,e){var l=new mxPoint(f,e);l.type=d;c.push(l);l=null!=b.routedPoints?b.routedPoints[c.length-1]:null;return null==l||l.type!=
-d||l.x!=f||l.y!=e},l=.5*this.scale,f=!1,c=[],g=0;g<d.length-1;g++){for(var k=d[g+1],m=d[g],p=[],t=d[g+2];g<d.length-2&&mxUtils.ptSegDistSq(m.x,m.y,t.x,t.y,k.x,k.y)<1*this.scale*this.scale;)k=t,g++,t=d[g+2];for(var f=e(0,m.x,m.y)||f,L=0;L<this.validEdges.length;L++){var H=this.validEdges[L],K=H.absolutePoints;if(null!=K&&mxUtils.intersects(b,H)&&"1"!=H.style.noJump)for(H=0;H<K.length-1;H++){for(var B=K[H+1],M=K[H],t=K[H+2];H<K.length-2&&mxUtils.ptSegDistSq(M.x,M.y,t.x,t.y,B.x,B.y)<1*this.scale*this.scale;)B=
-t,H++,t=K[H+2];t=mxUtils.intersection(m.x,m.y,k.x,k.y,M.x,M.y,B.x,B.y);if(null!=t&&(Math.abs(t.x-m.x)>l||Math.abs(t.y-m.y)>l)&&(Math.abs(t.x-k.x)>l||Math.abs(t.y-k.y)>l)&&(Math.abs(t.x-M.x)>l||Math.abs(t.y-M.y)>l)&&(Math.abs(t.x-B.x)>l||Math.abs(t.y-B.y)>l)){B=t.x-m.x;M=t.y-m.y;t={distSq:B*B+M*M,x:t.x,y:t.y};for(B=0;B<p.length;B++)if(p[B].distSq>t.distSq){p.splice(B,0,t);t=null;break}null==t||0!=p.length&&p[p.length-1].x===t.x&&p[p.length-1].y===t.y||p.push(t)}}}for(H=0;H<p.length;H++)f=e(1,p[H].x,
+d||l.x!=f||l.y!=e},l=.5*this.scale,f=!1,c=[],g=0;g<d.length-1;g++){for(var k=d[g+1],m=d[g],p=[],t=d[g+2];g<d.length-2&&mxUtils.ptSegDistSq(m.x,m.y,t.x,t.y,k.x,k.y)<1*this.scale*this.scale;)k=t,g++,t=d[g+2];for(var f=e(0,m.x,m.y)||f,L=0;L<this.validEdges.length;L++){var H=this.validEdges[L],J=H.absolutePoints;if(null!=J&&mxUtils.intersects(b,H)&&"1"!=H.style.noJump)for(H=0;H<J.length-1;H++){for(var B=J[H+1],M=J[H],t=J[H+2];H<J.length-2&&mxUtils.ptSegDistSq(M.x,M.y,t.x,t.y,B.x,B.y)<1*this.scale*this.scale;)B=
+t,H++,t=J[H+2];t=mxUtils.intersection(m.x,m.y,k.x,k.y,M.x,M.y,B.x,B.y);if(null!=t&&(Math.abs(t.x-m.x)>l||Math.abs(t.y-m.y)>l)&&(Math.abs(t.x-k.x)>l||Math.abs(t.y-k.y)>l)&&(Math.abs(t.x-M.x)>l||Math.abs(t.y-M.y)>l)&&(Math.abs(t.x-B.x)>l||Math.abs(t.y-B.y)>l)){B=t.x-m.x;M=t.y-m.y;t={distSq:B*B+M*M,x:t.x,y:t.y};for(B=0;B<p.length;B++)if(p[B].distSq>t.distSq){p.splice(B,0,t);t=null;break}null==t||0!=p.length&&p[p.length-1].x===t.x&&p[p.length-1].y===t.y||p.push(t)}}}for(H=0;H<p.length;H++)f=e(1,p[H].x,
p[H].y)||f}t=d[d.length-1];f=e(0,t.x,t.y)||f}b.routedPoints=c;return f}return!1};var p=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(b,d,f){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)p.apply(this,arguments);else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,
-"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,l=mxUtils.getValue(this.style,"jumpStyle","none"),g=!0,k=null,m=null,q=[],n=null;b.begin();for(var t=0;t<this.state.routedPoints.length;t++){var H=this.state.routedPoints[t],K=new mxPoint(H.x/this.scale,H.y/this.scale);0==t?K=d[0]:t==this.state.routedPoints.length-1&&(K=d[d.length-1]);var B=!1;if(null!=k&&1==H.type){var M=this.state.routedPoints[t+1],H=M.x/this.scale-K.x,M=M.y/this.scale-K.y,H=H*H+M*M;null==n&&(n=new mxPoint(K.x-k.x,K.y-k.y),
-m=Math.sqrt(n.x*n.x+n.y*n.y),0<m?(n.x=n.x*e/m,n.y=n.y*e/m):n=null);H>e*e&&0<m&&(H=k.x-K.x,M=k.y-K.y,H=H*H+M*M,H>e*e&&(B=new mxPoint(K.x-n.x,K.y-n.y),H=new mxPoint(K.x+n.x,K.y+n.y),q.push(B),this.addPoints(b,q,f,c,!1,null,g),q=0>Math.round(n.x)||0==Math.round(n.x)&&0>=Math.round(n.y)?1:-1,g=!1,"sharp"==l?(b.lineTo(B.x-n.y*q,B.y+n.x*q),b.lineTo(H.x-n.y*q,H.y+n.x*q),b.lineTo(H.x,H.y)):"line"==l?(b.moveTo(B.x+n.y*q,B.y-n.x*q),b.lineTo(B.x-n.y*q,B.y+n.x*q),b.moveTo(H.x-n.y*q,H.y+n.x*q),b.lineTo(H.x+n.y*
-q,H.y-n.x*q),b.moveTo(H.x,H.y)):"arc"==l?(q*=1.3,b.curveTo(B.x-n.y*q,B.y+n.x*q,H.x-n.y*q,H.y+n.x*q,H.x,H.y)):(b.moveTo(H.x,H.y),g=!0),q=[H],B=!0))}else n=null;B||(q.push(K),k=K)}this.addPoints(b,q,f,c,!1,null,g);b.stroke()}};var t=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(b,d,f,c){return null!=d&&"centerPerimeter"==d.style[mxConstants.STYLE_PERIMETER]?new mxPoint(d.getCenterX(),d.getCenterY()):t.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint;
+"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,l=mxUtils.getValue(this.style,"jumpStyle","none"),g=!0,k=null,m=null,q=[],n=null;b.begin();for(var t=0;t<this.state.routedPoints.length;t++){var H=this.state.routedPoints[t],J=new mxPoint(H.x/this.scale,H.y/this.scale);0==t?J=d[0]:t==this.state.routedPoints.length-1&&(J=d[d.length-1]);var B=!1;if(null!=k&&1==H.type){var M=this.state.routedPoints[t+1],H=M.x/this.scale-J.x,M=M.y/this.scale-J.y,H=H*H+M*M;null==n&&(n=new mxPoint(J.x-k.x,J.y-k.y),
+m=Math.sqrt(n.x*n.x+n.y*n.y),0<m?(n.x=n.x*e/m,n.y=n.y*e/m):n=null);H>e*e&&0<m&&(H=k.x-J.x,M=k.y-J.y,H=H*H+M*M,H>e*e&&(B=new mxPoint(J.x-n.x,J.y-n.y),H=new mxPoint(J.x+n.x,J.y+n.y),q.push(B),this.addPoints(b,q,f,c,!1,null,g),q=0>Math.round(n.x)||0==Math.round(n.x)&&0>=Math.round(n.y)?1:-1,g=!1,"sharp"==l?(b.lineTo(B.x-n.y*q,B.y+n.x*q),b.lineTo(H.x-n.y*q,H.y+n.x*q),b.lineTo(H.x,H.y)):"line"==l?(b.moveTo(B.x+n.y*q,B.y-n.x*q),b.lineTo(B.x-n.y*q,B.y+n.x*q),b.moveTo(H.x-n.y*q,H.y+n.x*q),b.lineTo(H.x+n.y*
+q,H.y-n.x*q),b.moveTo(H.x,H.y)):"arc"==l?(q*=1.3,b.curveTo(B.x-n.y*q,B.y+n.x*q,H.x-n.y*q,H.y+n.x*q,H.x,H.y)):(b.moveTo(H.x,H.y),g=!0),q=[H],B=!0))}else n=null;B||(q.push(J),k=J)}this.addPoints(b,q,f,c,!1,null,g);b.stroke()}};var t=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(b,d,f,c){return null!=d&&"centerPerimeter"==d.style[mxConstants.STYLE_PERIMETER]?new mxPoint(d.getCenterX(),d.getCenterY()):t.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint;
mxGraphView.prototype.updateFloatingTerminalPoint=function(b,f,c,e){if(null==f||null==b||"1"!=f.style.snapToPoint&&"1"!=b.style.snapToPoint)d.apply(this,arguments);else{f=this.getTerminalPort(b,f,e);var l=this.getNextPoint(b,c,e),g=this.graph.isOrthogonal(b),k=mxUtils.toRadians(Number(f.style[mxConstants.STYLE_ROTATION]||"0")),m=new mxPoint(f.getCenterX(),f.getCenterY());if(0!=k)var q=Math.cos(-k),n=Math.sin(-k),l=mxUtils.getRotatedPoint(l,q,n,m);q=parseFloat(b.style[mxConstants.STYLE_PERIMETER_SPACING]||
0);q+=parseFloat(b.style[e?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);l=this.getPerimeterPoint(f,l,0==k&&g,q);0!=k&&(q=Math.cos(k),n=Math.sin(k),l=mxUtils.getRotatedPoint(l,q,n,m));b.setAbsoluteTerminalPoint(this.snapToAnchorPoint(b,f,c,e,l),e)}};mxGraphView.prototype.snapToAnchorPoint=function(b,d,f,c,e){if(null!=d&&null!=b){b=this.graph.getAllConnectionConstraints(d);c=f=null;if(null!=b)for(var l=0;l<b.length;l++){var g=this.graph.getConnectionPoint(d,
b[l]);if(null!=g){var k=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==c||k<c)f=g,c=k}}null!=f&&(e=f)}return e};var f=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(b,d,c){var e=f.apply(this,arguments);"1"==b.getAttribute("placeholders")&&null!=c.state&&(e=c.state.view.graph.replacePlaceholders(c.state.cell,e));return e};var l=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(b){if(null!=b.style&&"undefined"!==typeof pako){var d=
@@ -2514,22 +2517,22 @@ k){var m=this.createCellLookup([l.root]),k=k.slice();this.model.beginUpdate();tr
(d=this.snap(d),f=this.snap(f));var n=this.getBoundingBoxFromGeometry(b,!0);null!=n&&this.moveCells(b,d-n.x,f-n.y)}}finally{this.model.endUpdate()}}return b};Graph.prototype.encodeCells=function(b){for(var d={},f=this.cloneCells(b,null,d),c=new mxDictionary,e=0;e<b.length;e++)c.put(b[e],!0);for(var l=new mxCodec,g=new mxGraphModel,k=g.getChildAt(g.getRoot(),0),e=0;e<f.length;e++){g.add(k,f[e]);var m=this.view.getState(b[e]);if(null!=m){var q=this.getCellGeometry(f[e]);null!=q&&q.relative&&!this.model.isEdge(b[e])&&
null==c.get(this.model.getParent(b[e]))&&(q.offset=null,q.relative=!1,q.x=m.x/m.view.scale-m.view.translate.x,q.y=m.y/m.view.scale-m.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(d,this.createCellLookup(b)),f);return l.encode(g)};Graph.prototype.isSwimlane=function(b,d){if(null!=b&&this.model.getParent(b)!=this.model.getRoot()&&!this.model.isEdge(b)){var f=this.getCurrentCellStyle(b,d)[mxConstants.STYLE_SHAPE];return f==mxConstants.SHAPE_SWIMLANE||"table"==f}return!1};var d=Graph.prototype.isExtendParent;
Graph.prototype.isExtendParent=function(b){var f=this.model.getParent(b);if(null!=f){var c=this.getCurrentCellStyle(f);if(null!=c.expand)return"0"!=c.expand}return d.apply(this,arguments)&&(null==f||!this.isTable(f))};var f=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(b,d,c,e,l,g,k,m){null==m&&(m=this.model.getParent(b),this.isTable(m)||this.isTableRow(m))&&(m=this.getCellAt(g,k,null,!0,!1));c=null;this.model.beginUpdate();try{c=f.apply(this,[b,d,c,e,l,g,k,m]);this.model.setValue(c,
-"");var q=this.getChildCells(c,!0);for(d=0;d<q.length;d++){var n=this.getCellGeometry(q[d]);null!=n&&n.relative&&0<n.x&&this.model.remove(q[d])}var F=this.getChildCells(b,!0);for(d=0;d<F.length;d++)n=this.getCellGeometry(F[d]),null!=n&&n.relative&&0>=n.x&&this.model.remove(F[d]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[c]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[c]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[b]);this.setCellStyles(mxConstants.STYLE_STARTARROW,
+"");var q=this.getChildCells(c,!0);for(d=0;d<q.length;d++){var n=this.getCellGeometry(q[d]);null!=n&&n.relative&&0<n.x&&this.model.remove(q[d])}var G=this.getChildCells(b,!0);for(d=0;d<G.length;d++)n=this.getCellGeometry(G[d]),null!=n&&n.relative&&0>=n.x&&this.model.remove(G[d]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[c]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[c]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[b]);this.setCellStyles(mxConstants.STYLE_STARTARROW,
mxConstants.NONE,[b]);var ca=this.model.getTerminal(c,!1);if(null!=ca){var v=this.getCurrentCellStyle(ca);null!=v&&"1"==v.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[b]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[b]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[c]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[c]))}}finally{this.model.endUpdate()}return c};var l=Graph.prototype.selectCell;Graph.prototype.selectCell=function(b,d,f){if(d||f)l.apply(this,arguments);
else{var c=this.getSelectionCell(),e=null,g=[],k=mxUtils.bind(this,function(d){if(null!=this.view.getState(d)&&(this.model.isVertex(d)||this.model.isEdge(d)))if(g.push(d),d==c)e=g.length-1;else if(b&&null==c&&0<g.length||null!=e&&b&&g.length>e||!b&&0<e)return;for(var f=0;f<this.model.getChildCount(d);f++)k(this.model.getChildAt(d,f))});k(this.model.root);0<g.length&&(e=null!=e?mxUtils.mod(e+(b?1:-1),g.length):0,this.setSelectionCell(g[e]))}};var m=Graph.prototype.moveCells;Graph.prototype.moveCells=
-function(b,d,f,c,e,l,g){g=null!=g?g:{};if(this.isTable(e)){for(var k=[],q=0;q<b.length;q++)this.isTable(b[q])?k=k.concat(this.model.getChildCells(b[q],!0).reverse()):k.push(b[q]);b=k}this.model.beginUpdate();try{k=[];for(q=0;q<b.length;q++)if(null!=e&&this.isTableRow(b[q])){var n=this.model.getParent(b[q]),F=this.getCellGeometry(b[q]);this.isTable(n)&&k.push(n);if(null!=n&&null!=F&&this.isTable(n)&&this.isTable(e)&&(c||n!=e)){if(!c){var ca=this.getCellGeometry(n);null!=ca&&(ca=ca.clone(),ca.height-=
-F.height,this.model.setGeometry(n,ca))}ca=this.getCellGeometry(e);null!=ca&&(ca=ca.clone(),ca.height+=F.height,this.model.setGeometry(e,ca));var v=this.model.getChildCells(e,!0);if(0<v.length){b[q]=c?this.cloneCell(b[q]):b[q];var p=this.model.getChildCells(b[q],!0),u=this.model.getChildCells(v[0],!0),A=u.length-p.length;if(0<A)for(var D=0;D<A;D++){var x=this.cloneCell(p[p.length-1]);null!=x&&(x.value="",this.model.add(b[q],x))}else if(0>A)for(D=0;D>A;D--)this.model.remove(p[p.length+D-1]);p=this.model.getChildCells(b[q],
-!0);for(D=0;D<u.length;D++){var O=this.getCellGeometry(u[D]),I=this.getCellGeometry(p[D]);null!=O&&null!=I&&(I=I.clone(),I.width=O.width,this.model.setGeometry(p[D],I))}}}}for(var t=m.apply(this,arguments),q=0;q<k.length;q++)!c&&this.model.contains(k[q])&&0==this.model.getChildCount(k[q])&&this.model.remove(k[q]);c&&this.updateCustomLinks(this.createCellMapping(g,this.createCellLookup(b)),t)}finally{this.model.endUpdate()}return t};var q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(b,
+function(b,d,f,c,e,l,g){g=null!=g?g:{};if(this.isTable(e)){for(var k=[],q=0;q<b.length;q++)this.isTable(b[q])?k=k.concat(this.model.getChildCells(b[q],!0).reverse()):k.push(b[q]);b=k}this.model.beginUpdate();try{k=[];for(q=0;q<b.length;q++)if(null!=e&&this.isTableRow(b[q])){var n=this.model.getParent(b[q]),G=this.getCellGeometry(b[q]);this.isTable(n)&&k.push(n);if(null!=n&&null!=G&&this.isTable(n)&&this.isTable(e)&&(c||n!=e)){if(!c){var ca=this.getCellGeometry(n);null!=ca&&(ca=ca.clone(),ca.height-=
+G.height,this.model.setGeometry(n,ca))}ca=this.getCellGeometry(e);null!=ca&&(ca=ca.clone(),ca.height+=G.height,this.model.setGeometry(e,ca));var v=this.model.getChildCells(e,!0);if(0<v.length){b[q]=c?this.cloneCell(b[q]):b[q];var p=this.model.getChildCells(b[q],!0),u=this.model.getChildCells(v[0],!0),A=u.length-p.length;if(0<A)for(var D=0;D<A;D++){var O=this.cloneCell(p[p.length-1]);null!=O&&(O.value="",this.model.add(b[q],O))}else if(0>A)for(D=0;D>A;D--)this.model.remove(p[p.length+D-1]);p=this.model.getChildCells(b[q],
+!0);for(D=0;D<u.length;D++){var x=this.getCellGeometry(u[D]),t=this.getCellGeometry(p[D]);null!=x&&null!=t&&(t=t.clone(),t.width=x.width,this.model.setGeometry(p[D],t))}}}}for(var K=m.apply(this,arguments),q=0;q<k.length;q++)!c&&this.model.contains(k[q])&&0==this.model.getChildCount(k[q])&&this.model.remove(k[q]);c&&this.updateCustomLinks(this.createCellMapping(g,this.createCellLookup(b)),K)}finally{this.model.endUpdate()}return K};var q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(b,
d){var f=[];this.model.beginUpdate();try{for(var c=0;c<b.length;c++)if(this.isTableCell(b[c])){var e=this.model.getParent(b[c]),l=this.model.getParent(e);1==this.model.getChildCount(e)&&1==this.model.getChildCount(l)?0>mxUtils.indexOf(b,l)&&0>mxUtils.indexOf(f,l)&&f.push(l):this.labelChanged(b[c],"")}else{if(this.isTableRow(b[c])&&(l=this.model.getParent(b[c]),0>mxUtils.indexOf(b,l)&&0>mxUtils.indexOf(f,l))){for(var g=this.model.getChildCells(l,!0),k=0,m=0;m<g.length;m++)0<=mxUtils.indexOf(b,g[m])&&
k++;k==g.length&&f.push(l)}f.push(b[c])}f=q.apply(this,[f,d])}finally{this.model.endUpdate()}return f};Graph.prototype.updateCustomLinks=function(b,d,f){f=null!=f?f:new Graph;for(var c=0;c<d.length;c++)null!=d[c]&&f.updateCustomLinksForCell(b,d[c],f)};Graph.prototype.updateCustomLinksForCell=function(b,d){this.doUpdateCustomLinksForCell(b,d);for(var f=this.model.getChildCount(d),c=0;c<f;c++)this.updateCustomLinksForCell(b,this.model.getChildAt(d,c))};Graph.prototype.doUpdateCustomLinksForCell=function(b,
-d){};Graph.prototype.getAllConnectionConstraints=function(b,d){if(null!=b){var f=mxUtils.getValue(b.style,"points",null);if(null!=f){var c=[];try{for(var e=JSON.parse(f),f=0;f<e.length;f++){var l=e[f];c.push(new mxConnectionConstraint(new mxPoint(l[0],l[1]),2<l.length?"0"!=l[2]:!0,null,3<l.length?l[3]:0,4<l.length?l[4]:0))}}catch(ya){}return c}if(null!=b.shape&&null!=b.shape.bounds){l=b.shape.direction;e=b.shape.bounds;f=b.shape.scale;c=e.width/f;e=e.height/f;if(l==mxConstants.DIRECTION_NORTH||l==
+d){};Graph.prototype.getAllConnectionConstraints=function(b,d){if(null!=b){var f=mxUtils.getValue(b.style,"points",null);if(null!=f){var c=[];try{for(var e=JSON.parse(f),f=0;f<e.length;f++){var l=e[f];c.push(new mxConnectionConstraint(new mxPoint(l[0],l[1]),2<l.length?"0"!=l[2]:!0,null,3<l.length?l[3]:0,4<l.length?l[4]:0))}}catch(za){}return c}if(null!=b.shape&&null!=b.shape.bounds){l=b.shape.direction;e=b.shape.bounds;f=b.shape.scale;c=e.width/f;e=e.height/f;if(l==mxConstants.DIRECTION_NORTH||l==
mxConstants.DIRECTION_SOUTH)l=c,c=e,e=l;f=b.shape.getConstraints(b.style,c,e);if(null!=f)return f;if(null!=b.shape.stencil&&null!=b.shape.stencil.constraints)return b.shape.stencil.constraints;if(null!=b.shape.constraints)return b.shape.constraints}}return null};Graph.prototype.flipEdge=function(b){if(null!=b){var d=this.getCurrentCellStyle(b),d=mxUtils.getValue(d,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;
this.setCellStyles(mxConstants.STYLE_ELBOW,d,[b])}};Graph.prototype.isValidRoot=function(b){for(var d=this.model.getChildCount(b),f=0,c=0;c<d;c++){var e=this.model.getChildAt(b,c);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||f++)}return 0<f||this.isContainer(b)};Graph.prototype.isValidDropTarget=function(b,d,f){for(var c=this.getCurrentCellStyle(b),e=!0,l=!0,g=0;g<d.length&&l;g++)e=e&&this.isTable(d[g]),l=l&&this.isTableRow(d[g]);return("1"!=mxUtils.getValue(c,"part","0")||
this.isContainer(b))&&"0"!=mxUtils.getValue(c,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(b))&&!this.isTableRow(b)&&(!this.isTable(b)||l||e)};Graph.prototype.createGroupCell=function(){var b=mxGraph.prototype.createGroupCell.apply(this,arguments);b.setStyle("group");return b};Graph.prototype.isExtendParentsOnAdd=function(b){var d=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(d&&null!=b&&null!=this.layoutManager){var f=this.model.getParent(b);
null!=f&&(f=this.layoutManager.getLayout(f),null!=f&&f.constructor==mxStackLayout&&(d=!1))}return d};Graph.prototype.getPreferredSizeForCell=function(b){var d=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=d&&(d.width+=10,d.height+=4,this.gridEnabled&&(d.width=this.snap(d.width),d.height=this.snap(d.height)));return d};Graph.prototype.turnShapes=function(b,d){var f=this.getModel(),c=[];f.beginUpdate();try{for(var e=0;e<b.length;e++){var l=b[e];if(f.isEdge(l)){var g=f.getTerminal(l,
-!0),k=f.getTerminal(l,!1);f.setTerminal(l,k,!0);f.setTerminal(l,g,!1);var m=f.getGeometry(l);if(null!=m){m=m.clone();null!=m.points&&m.points.reverse();var q=m.getTerminalPoint(!0),n=m.getTerminalPoint(!1);m.setTerminalPoint(q,!1);m.setTerminalPoint(n,!0);f.setGeometry(l,m);var F=this.view.getState(l),v=this.view.getState(g),ca=this.view.getState(k);if(null!=F){var p=null!=v?this.getConnectionConstraint(F,v,!0):null,u=null!=ca?this.getConnectionConstraint(F,ca,!1):null;this.setConnectionConstraint(l,
-g,!0,u);this.setConnectionConstraint(l,k,!1,p);var D=mxUtils.getValue(F.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(F.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[l]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,D,[l])}c.push(l)}}else if(f.isVertex(l)&&(m=this.getCellGeometry(l),null!=m)){if(!(this.isTable(l)||this.isTableRow(l)||this.isTableCell(l)||this.isSwimlane(l))){m=m.clone();m.x+=m.width/
-2-m.height/2;m.y+=m.height/2-m.width/2;var A=m.width;m.width=m.height;m.height=A;f.setGeometry(l,m)}var x=this.view.getState(l);if(null!=x){var O=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],I=mxUtils.getValue(x.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,O[mxUtils.mod(mxUtils.indexOf(O,I)+(d?-1:1),O.length)],[l])}c.push(l)}}}finally{f.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=
+!0),k=f.getTerminal(l,!1);f.setTerminal(l,k,!0);f.setTerminal(l,g,!1);var m=f.getGeometry(l);if(null!=m){m=m.clone();null!=m.points&&m.points.reverse();var q=m.getTerminalPoint(!0),n=m.getTerminalPoint(!1);m.setTerminalPoint(q,!1);m.setTerminalPoint(n,!0);f.setGeometry(l,m);var G=this.view.getState(l),v=this.view.getState(g),ca=this.view.getState(k);if(null!=G){var p=null!=v?this.getConnectionConstraint(G,v,!0):null,u=null!=ca?this.getConnectionConstraint(G,ca,!1):null;this.setConnectionConstraint(l,
+g,!0,u);this.setConnectionConstraint(l,k,!1,p);var D=mxUtils.getValue(G.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(G.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[l]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,D,[l])}c.push(l)}}else if(f.isVertex(l)&&(m=this.getCellGeometry(l),null!=m)){if(!(this.isTable(l)||this.isTableRow(l)||this.isTableCell(l)||this.isSwimlane(l))){m=m.clone();m.x+=m.width/
+2-m.height/2;m.y+=m.height/2-m.width/2;var A=m.width;m.width=m.height;m.height=A;f.setGeometry(l,m)}var x=this.view.getState(l);if(null!=x){var O=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],t=mxUtils.getValue(x.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,O[mxUtils.mod(mxUtils.indexOf(O,t)+(d?-1:1),O.length)],[l])}c.push(l)}}}finally{f.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=
function(b){if(null!=b&&null!=b.fgNode)for(b=b.fgNode.firstChild;null!=b;){if("text"==b.nodeName&&"1"==b.getAttribute("placeholders"))return!0;b=b.nextSibling}return!1};var n=Graph.prototype.processChange;Graph.prototype.processChange=function(b){if(b instanceof mxGeometryChange&&(this.isTableCell(b.cell)||this.isTableRow(b.cell))&&(null==b.previous&&null!=b.geometry||null!=b.previous&&!b.previous.equals(b.geometry))){var d=b.cell;this.isTableCell(d)&&(d=this.model.getParent(d));this.isTableRow(d)&&
(d=this.model.getParent(d));var f=this.view.getState(d);null!=f&&null!=f.shape&&(this.view.invalidate(d),f.shape.bounds=null)}n.apply(this,arguments);b instanceof mxValueChange&&null!=b.cell&&null!=b.cell.value&&"object"==typeof b.cell.value&&this.invalidateDescendantsWithPlaceholders(b.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(b){b=this.model.getDescendants(b);if(0<b.length)for(var d=0;d<b.length;d++){var f=this.view.getState(b[d]);null!=f&&null!=f.shape&&null!=f.shape.stencil&&
this.stencilHasPlaceholders(f.shape.stencil)?this.removeStateForCell(b[d]):this.isReplacePlaceholders(b[d])&&this.view.invalidate(b[d],!1,!1)}};Graph.prototype.replaceElement=function(b,d){for(var f=b.ownerDocument.createElement(null!=d?d:"span"),c=Array.prototype.slice.call(b.attributes);attr=c.pop();)f.setAttribute(attr.nodeName,attr.nodeValue);f.innerHTML=b.innerHTML;b.parentNode.replaceChild(f,b)};Graph.prototype.processElements=function(b,d){if(null!=b)for(var f=b.getElementsByTagName("*"),c=
@@ -2553,19 +2556,19 @@ f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null!=f?this.clear():(null!=g.t
g.container.scrollLeft)<l&&Math.abs(this.scrollTop-g.container.scrollTop)<l&&(null==c.sourceState||!c.isSource(c.sourceState.control))&&((mxEvent.isLeftMouseButton(k)||mxEvent.isMiddleMouseButton(k))&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))&&(null!=this.currentLink?(e=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&e||null==d||d(k,this.currentLink),mxEvent.isConsumed(k)||(k=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(k)?"_blank":
e?g.linkTarget:"_top",g.openLink(this.currentLink,k),c.consume())):null!=f&&!c.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<l&&Math.abs(this.scrollTop-g.container.scrollTop)<l&&Math.abs(this.startX-c.getGraphX())<l&&Math.abs(this.startY-c.getGraphY())<l&&f(c.getEvent()));this.clear()},activate:function(b){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(b.cell));null!=this.currentLink&&(this.currentTarget=g.getLinkTargetForCell(b.cell),g.container.style.cursor="pointer",null!=
this.highlight&&this.highlight.highlight(b))},clear:function(){null!=g.container&&(g.container.style.cursor=e);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(b){};g.addMouseListener(k);mxEvent.addListener(document,"mouseleave",function(b){k.clear()})};Graph.prototype.duplicateCells=function(b,d){b=null!=b?b:this.getSelectionCells();d=null!=d?d:!0;for(var f=0;f<b.length;f++)this.isTableCell(b[f])&&
-(b[f]=this.model.getParent(b[f]));b=this.model.getTopmostCells(b);var c=this.getModel(),e=this.gridSize,l=[];c.beginUpdate();try{for(var g={},k=this.createCellLookup(b),m=this.cloneCells(b,!1,g,!0),f=0;f<b.length;f++){var q=c.getParent(b[f]);if(null!=q){var n=this.moveCells([m[f]],e,e,!1)[0];l.push(n);if(d)c.add(q,m[f]);else{var F=q.getIndex(b[f]);c.add(q,m[f],F+1)}if(this.isTable(q)){var v=this.getCellGeometry(m[f]),p=this.getCellGeometry(q);null!=v&&null!=p&&(p=p.clone(),p.height+=v.height,c.setGeometry(q,
+(b[f]=this.model.getParent(b[f]));b=this.model.getTopmostCells(b);var c=this.getModel(),e=this.gridSize,l=[];c.beginUpdate();try{for(var g={},k=this.createCellLookup(b),m=this.cloneCells(b,!1,g,!0),f=0;f<b.length;f++){var q=c.getParent(b[f]);if(null!=q){var n=this.moveCells([m[f]],e,e,!1)[0];l.push(n);if(d)c.add(q,m[f]);else{var G=q.getIndex(b[f]);c.add(q,m[f],G+1)}if(this.isTable(q)){var v=this.getCellGeometry(m[f]),p=this.getCellGeometry(q);null!=v&&null!=p&&(p=p.clone(),p.height+=v.height,c.setGeometry(q,
p))}}else l.push(m[f])}this.updateCustomLinks(this.createCellMapping(g,k),m,this)}finally{c.endUpdate()}return l};Graph.prototype.insertImage=function(b,d,f){if(null!=b&&null!=this.cellEditor.textarea){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),e=[],l=0;l<c.length;l++)e.push(c[l]);document.execCommand("insertimage",!1,b);b=this.cellEditor.textarea.getElementsByTagName("img");if(b.length==e.length+1)for(l=b.length-1;0<=l;l--)if(0==l||b[l]!=e[l-1]){b[l].setAttribute("width",d);b[l].setAttribute("height",
f);break}}};Graph.prototype.insertLink=function(b){if(null!=this.cellEditor.textarea)if(0==b.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var d=this.cellEditor.textarea.getElementsByTagName("a"),f=[],c=0;c<d.length;c++)f.push(d[c]);document.execCommand("createlink",!1,mxUtils.trim(b));d=this.cellEditor.textarea.getElementsByTagName("a");if(d.length==f.length+1)for(c=d.length-1;0<=c;c--)if(d[c]!=f[c-1]){for(d=d[c].getElementsByTagName("a");0<d.length;){for(f=d[0].parentNode;null!=
d[0].firstChild;)f.insertBefore(d[0].firstChild,d[0]);f.removeChild(d[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(b))};Graph.prototype.isCellResizable=function(b){var d=mxGraph.prototype.isCellResizable.apply(this,arguments),f=this.getCurrentCellStyle(b);return!this.isTableCell(b)&&!this.isTableRow(b)&&(d||"0"!=mxUtils.getValue(f,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==f[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(b,d){null==d&&(d=this.getSelectionCells());
if(null!=d&&1<d.length){for(var f=[],c=null,e=null,l=0;l<d.length;l++)if(this.getModel().isVertex(d[l])){var g=this.view.getState(d[l]);if(null!=g){var k=b?g.getCenterX():g.getCenterY(),c=null!=c?Math.max(c,k):k,e=null!=e?Math.min(e,k):k;f.push(g)}}if(2<f.length){f.sort(function(d,f){return b?d.x-f.x:d.y-f.y});g=this.view.translate;k=this.view.scale;e=e/k-(b?g.x:g.y);c=c/k-(b?g.x:g.y);this.getModel().beginUpdate();try{for(var m=(c-e)/(f.length-1),c=e,l=1;l<f.length-1;l++){var q=this.view.getState(this.model.getParent(f[l].cell)),
n=this.getCellGeometry(f[l].cell),c=c+m;null!=n&&null!=q&&(n=n.clone(),b?n.x=Math.round(c-n.width/2)-q.origin.x:n.y=Math.round(c-n.height/2)-q.origin.y,this.getModel().setGeometry(f[l].cell,n))}}finally{this.getModel().endUpdate()}}}return d};Graph.prototype.isCloneEvent=function(b){return mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)};Graph.prototype.createSvgImageExport=function(){var b=new mxImageExport;b.getLinkForCellState=mxUtils.bind(this,function(b,d){return this.getLinkForCell(b.cell)});
-return b};Graph.prototype.parseBackgroundImage=function(b){var d=null;null!=b&&0<b.length&&(b=JSON.parse(b),d=new mxImage(b.src,b.width,b.height));return d};Graph.prototype.getBackgroundImageObject=function(b){return b};Graph.prototype.getSvg=function(b,d,f,c,e,l,g,k,m,q,n,F,v,p){var u=null;if(null!=p)for(u=new mxDictionary,n=0;n<p.length;n++)u.put(p[n],!0);if(p=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{d=null!=d?d:1;f=null!=f?f:0;e=null!=e?e:!0;
+return b};Graph.prototype.parseBackgroundImage=function(b){var d=null;null!=b&&0<b.length&&(b=JSON.parse(b),d=new mxImage(b.src,b.width,b.height));return d};Graph.prototype.getBackgroundImageObject=function(b){return b};Graph.prototype.getSvg=function(b,d,f,c,e,l,g,k,m,q,n,G,v,p){var u=null;if(null!=p)for(u=new mxDictionary,n=0;n<p.length;n++)u.put(p[n],!0);if(p=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{d=null!=d?d:1;f=null!=f?f:0;e=null!=e?e:!0;
l=null!=l?l:!0;g=null!=g?g:!0;var D="page"==v?this.view.getBackgroundPageBounds():l&&null==u||c||"diagram"==v?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),A=this.view.scale;"diagram"==v&&null!=this.backgroundImage&&D.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*A,(this.view.translate.y+this.backgroundImage.y)*A,this.backgroundImage.width*A,this.backgroundImage.height*A));if(null==D)throw Error(mxResources.get("drawingEmpty"));var x=mxUtils.createXmlDocument(),
-I=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"svg"):x.createElement("svg");null!=b&&(null!=I.style?I.style.backgroundColor=b:I.setAttribute("style","background-color:"+b));null==x.createElementNS?(I.setAttribute("xmlns",mxConstants.NS_SVG),I.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):I.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);b=d/A;var t=Math.max(1,Math.ceil(D.width*b)+2*f)+(q?5:0),ca=Math.max(1,Math.ceil(D.height*b)+2*f)+(q?5:0);
-I.setAttribute("version","1.1");I.setAttribute("width",t+"px");I.setAttribute("height",ca+"px");I.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+t+" "+ca);x.appendChild(I);var C=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"g"):x.createElement("g");I.appendChild(C);var y=this.createSvgCanvas(C);y.foOffset=e?-.5:0;y.textOffset=e?-.5:0;y.imageOffset=e?-.5:0;y.translate(Math.floor(f/d-D.x/A),Math.floor(f/d-D.y/A));var da=document.createElement("div"),B=y.getAlternateText;y.getAlternateText=
-function(b,d,f,c,e,l,g,k,m,q,n,z,Ia){if(null!=l&&0<this.state.fontSize)try{mxUtils.isNode(l)?l=l.innerText:(da.innerHTML=l,l=mxUtils.extractTextWithWhitespace(da.childNodes));for(var Wa=Math.ceil(2*c/this.state.fontSize),qa=[],Sa=0,F=0;(0==Wa||Sa<Wa)&&F<l.length;){var Ta=l.charCodeAt(F);if(10==Ta||13==Ta){if(0<Sa)break}else qa.push(l.charAt(F)),255>Ta&&Sa++;F++}qa.length<l.length&&1<l.length-qa.length&&(l=mxUtils.trim(qa.join(""))+"...");return l}catch(gb){return B.apply(this,arguments)}else return B.apply(this,
-arguments)};var O=this.backgroundImage;if(null!=O){d=A/d;var N=this.view.translate,S=new mxRectangle((O.x+N.x)*d,(O.y+N.y)*d,O.width*d,O.height*d);mxUtils.intersects(D,S)&&y.image(O.x+N.x,O.y+N.y,O.width,O.height,O.src,!0)}y.scale(b);y.textEnabled=g;k=null!=k?k:this.createSvgImageExport();var Z=k.drawCellState,E=k.getLinkForCellState;k.getLinkForCellState=function(b,d){var f=E.apply(this,arguments);return null==f||b.view.graph.isCustomLink(f)?null:f};k.getLinkTargetForCellState=function(b,d){return b.view.graph.getLinkTargetForCell(b.cell)};
-k.drawCellState=function(b,d){for(var f=b.view.graph,c=null!=u?u.get(b.cell):f.isCellSelected(b.cell),e=f.model.getParent(b.cell);!(l&&null==u||c)&&null!=e;)c=null!=u?u.get(e):f.isCellSelected(e),e=f.model.getParent(e);(l&&null==u||c)&&Z.apply(this,arguments)};k.drawState(this.getView().getState(this.model.root),y);this.updateSvgLinks(I,m,!0);this.addForeignObjectWarning(y,I);return I}finally{p&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=
+t=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"svg"):x.createElement("svg");null!=b&&(null!=t.style?t.style.backgroundColor=b:t.setAttribute("style","background-color:"+b));null==x.createElementNS?(t.setAttribute("xmlns",mxConstants.NS_SVG),t.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):t.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);b=d/A;var K=Math.max(1,Math.ceil(D.width*b)+2*f)+(q?5:0),ca=Math.max(1,Math.ceil(D.height*b)+2*f)+(q?5:0);
+t.setAttribute("version","1.1");t.setAttribute("width",K+"px");t.setAttribute("height",ca+"px");t.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+K+" "+ca);x.appendChild(t);var C=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"g"):x.createElement("g");t.appendChild(C);var y=this.createSvgCanvas(C);y.foOffset=e?-.5:0;y.textOffset=e?-.5:0;y.imageOffset=e?-.5:0;y.translate(Math.floor(f/d-D.x/A),Math.floor(f/d-D.y/A));var da=document.createElement("div"),B=y.getAlternateText;y.getAlternateText=
+function(b,d,f,c,e,l,g,k,m,q,n,z,oa){if(null!=l&&0<this.state.fontSize)try{mxUtils.isNode(l)?l=l.innerText:(da.innerHTML=l,l=mxUtils.extractTextWithWhitespace(da.childNodes));for(var Wa=Math.ceil(2*c/this.state.fontSize),pa=[],Sa=0,G=0;(0==Wa||Sa<Wa)&&G<l.length;){var Ta=l.charCodeAt(G);if(10==Ta||13==Ta){if(0<Sa)break}else pa.push(l.charAt(G)),255>Ta&&Sa++;G++}pa.length<l.length&&1<l.length-pa.length&&(l=mxUtils.trim(pa.join(""))+"...");return l}catch(gb){return B.apply(this,arguments)}else return B.apply(this,
+arguments)};var O=this.backgroundImage;if(null!=O){d=A/d;var N=this.view.translate,S=new mxRectangle((O.x+N.x)*d,(O.y+N.y)*d,O.width*d,O.height*d);mxUtils.intersects(D,S)&&y.image(O.x+N.x,O.y+N.y,O.width,O.height,O.src,!0)}y.scale(b);y.textEnabled=g;k=null!=k?k:this.createSvgImageExport();var aa=k.drawCellState,F=k.getLinkForCellState;k.getLinkForCellState=function(b,d){var f=F.apply(this,arguments);return null==f||b.view.graph.isCustomLink(f)?null:f};k.getLinkTargetForCellState=function(b,d){return b.view.graph.getLinkTargetForCell(b.cell)};
+k.drawCellState=function(b,d){for(var f=b.view.graph,c=null!=u?u.get(b.cell):f.isCellSelected(b.cell),e=f.model.getParent(b.cell);!(l&&null==u||c)&&null!=e;)c=null!=u?u.get(e):f.isCellSelected(e),e=f.model.getParent(e);(l&&null==u||c)&&aa.apply(this,arguments)};k.drawState(this.getView().getState(this.model.root),y);this.updateSvgLinks(t,m,!0);this.addForeignObjectWarning(y,t);return t}finally{p&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=
function(b,d){if("0"!=urlParams["svg-warning"]&&0<d.getElementsByTagName("foreignObject").length){var f=b.createElement("switch"),c=b.createElement("g");c.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var e=b.createElement("a");e.setAttribute("transform","translate(0,-5)");null==e.setAttributeNS||d.ownerDocument!=document&&null==document.documentMode?(e.setAttribute("xlink:href",Graph.foreignObjectWarningLink),e.setAttribute("target","_blank")):(e.setAttributeNS(mxConstants.NS_XLINK,
"xlink:href",Graph.foreignObjectWarningLink),e.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var l=b.createElement("text");l.setAttribute("text-anchor","middle");l.setAttribute("font-size","10px");l.setAttribute("x","50%");l.setAttribute("y","100%");mxUtils.write(l,Graph.foreignObjectWarningText);f.appendChild(c);e.appendChild(l);f.appendChild(e);d.appendChild(f)}};Graph.prototype.updateSvgLinks=function(b,d,f){b=b.getElementsByTagName("a");for(var c=0;c<b.length;c++)if(null==b[c].getAttribute("target")){var e=
b[c].getAttribute("href");null==e&&(e=b[c].getAttribute("xlink:href"));null!=e&&(null!=d&&/^https?:\/\//.test(e)?b[c].setAttribute("target",d):f&&this.isCustomLink(e)&&b[c].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(b){b=new mxSvgCanvas2D(b);b.pointerEvents=!0;return b};Graph.prototype.getSelectedElement=function(){var b=null;if(window.getSelection){var d=window.getSelection();d.getRangeAt&&d.rangeCount&&(b=d.getRangeAt(0).commonAncestorContainer)}else document.selection&&
@@ -2573,7 +2576,7 @@ b[c].getAttribute("href");null==e&&(e=b[c].getAttribute("xlink:href"));null!=e&&
d;){if(b==f)return null;b=b.parentNode}return b};Graph.prototype.getParentByNames=function(b,d,f){for(;null!=b&&!(0<=mxUtils.indexOf(d,b.nodeName));){if(b==f)return null;b=b.parentNode}return b};Graph.prototype.selectNode=function(b){var d=null;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){var f=document.createRange();f.selectNode(b);d.removeAllRanges();d.addRange(f)}}else(d=document.selection)&&"Control"!=d.type&&(b=d.createRange(),b.collapse(!0),f=d.createRange(),
f.setEndPoint("StartToStart",b),f.select())};Graph.prototype.deleteCells=function(b,d){var f=null;if(null!=b&&0<b.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){var e=this.model.getParent(b[c]);if(this.isTable(e)){var l=this.getCellGeometry(b[c]),g=this.getCellGeometry(e);null!=l&&null!=g&&(g=g.clone(),g.height-=l.height,this.model.setGeometry(e,g))}}var k=this.selectParentAfterDelete?this.model.getParents(b):null;this.removeCells(b,d)}finally{this.model.endUpdate()}if(null!=k)for(f=
[],c=0;c<k.length;c++)this.model.contains(k[c])&&(this.model.isVertex(k[c])||this.model.isEdge(k[c]))&&f.push(k[c])}return f};Graph.prototype.insertTableColumn=function(b,d){var f=this.getModel();f.beginUpdate();try{var c=b,e=0;if(this.isTableCell(b))var l=f.getParent(b),c=f.getParent(l),e=mxUtils.indexOf(f.getChildCells(l,!0),b);else this.isTableRow(b)?c=f.getParent(b):b=f.getChildCells(c,!0)[0],d||(e=f.getChildCells(b,!0).length-1);for(var g=f.getChildCells(c,!0),k=Graph.minTableColumnWidth,l=0;l<
-g.length;l++){var m=f.getChildCells(g[l],!0)[e],q=f.cloneCell(m,!1),n=this.getCellGeometry(q);q.value=null;if(null!=n){var k=n.width,F=this.getCellGeometry(g[l]);null!=F&&(n.height=F.height)}f.add(g[l],q,e+(d?0:1))}var v=this.getCellGeometry(c);null!=v&&(v=v.clone(),v.width+=k,f.setGeometry(c,v))}finally{f.endUpdate()}};Graph.prototype.insertTableRow=function(b,d){var f=this.getModel();f.beginUpdate();try{var c=b,e=b;if(this.isTableCell(b))e=f.getParent(b),c=f.getParent(e);else if(this.isTableRow(b))c=
+g.length;l++){var m=f.getChildCells(g[l],!0)[e],q=f.cloneCell(m,!1),n=this.getCellGeometry(q);q.value=null;if(null!=n){var k=n.width,G=this.getCellGeometry(g[l]);null!=G&&(n.height=G.height)}f.add(g[l],q,e+(d?0:1))}var v=this.getCellGeometry(c);null!=v&&(v=v.clone(),v.width+=k,f.setGeometry(c,v))}finally{f.endUpdate()}};Graph.prototype.insertTableRow=function(b,d){var f=this.getModel();f.beginUpdate();try{var c=b,e=b;if(this.isTableCell(b))e=f.getParent(b),c=f.getParent(e);else if(this.isTableRow(b))c=
f.getParent(b);else var l=f.getChildCells(c,!0),e=l[d?0:l.length-1];var g=f.getChildCells(e,!0),k=c.getIndex(e),e=f.cloneCell(e,!1);e.value=null;var m=this.getCellGeometry(e);if(null!=m){for(l=0;l<g.length;l++){b=f.cloneCell(g[l],!1);e.insert(b);b.value=null;var q=this.getCellGeometry(b);null!=q&&(q.height=m.height)}f.add(c,e,k+(d?0:1));var n=this.getCellGeometry(c);null!=n&&(n=n.clone(),n.height+=m.height,f.setGeometry(c,n))}}finally{f.endUpdate()}};Graph.prototype.deleteTableColumn=function(b){var d=
this.getModel();d.beginUpdate();try{var f=b,c=b;this.isTableCell(b)&&(c=d.getParent(b));this.isTableRow(c)&&(f=d.getParent(c));var e=d.getChildCells(f,!0);if(0==e.length)d.remove(f);else{this.isTableRow(c)||(c=e[0]);var l=d.getChildCells(c,!0);if(1>=l.length)d.remove(f);else{var g=l.length-1;this.isTableCell(b)&&(g=mxUtils.indexOf(l,b));for(c=b=0;c<e.length;c++){var k=d.getChildCells(e[c],!0)[g];d.remove(k);var m=this.getCellGeometry(k);null!=m&&(b=Math.max(b,m.width))}var q=this.getCellGeometry(f);
null!=q&&(q=q.clone(),q.width-=b,d.setGeometry(f,q))}}}finally{d.endUpdate()}};Graph.prototype.deleteTableRow=function(b){var d=this.getModel();d.beginUpdate();try{var f=b,c=b;this.isTableCell(b)&&(b=c=d.getParent(b));this.isTableRow(b)&&(f=d.getParent(c));var e=d.getChildCells(f,!0);if(1>=e.length)d.remove(f);else{this.isTableRow(c)||(c=e[e.length-1]);d.remove(c);b=0;var l=this.getCellGeometry(c);null!=l&&(b=l.height);var g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.height-=b,d.setGeometry(f,
@@ -2589,8 +2592,8 @@ this.textarea.ownerDocument.defaultView.getSelection(),f=d.getRangeAt(0),c="\t";
function(b){f||window.getSelection().containsNode(b,!0)?(b.removeAttribute("align"),b.style.textAlign=null):c=!1});c&&this.graph.cellEditor.setAlign(b)}document.execCommand("justify"+b.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var b=window.getSelection();if(b.getRangeAt&&b.rangeCount){for(var d=[],f=0,c=b.rangeCount;f<c;++f)d.push(b.getRangeAt(f));return d}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();
return null};mxCellEditor.prototype.restoreSelection=function(b){try{if(b)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var d=0,f=b.length;d<f;++d)sel.addRange(b[d])}else document.selection&&b.select&&b.select()}catch(ba){}};var v=mxCellRenderer.prototype.postConfigureShape;mxCellRenderer.prototype.postConfigureShape=function(b){var d=Editor.isDarkMode()?"#ffffff":"#000000",f=b.view.graph.defaultPageBackgroundColor;this.resolveDefaultColor(b,"fill",b.shape,f);this.resolveDefaultColor(b,
"stroke",b.shape,d);this.resolveDefaultColor(b,"laneFill",b.shape,f);this.resolveDefaultColor(b,"imageBackground",b.shape,f);this.resolveDefaultColor(b,"imageBorder",b.shape,d);this.resolveDefaultColor(b,"background",b.text,f);this.resolveDefaultColor(b,"color",b.text,d);v.apply(this,arguments)};mxCellRenderer.prototype.resolveDefaultColor=function(b,d,f,c){null!=f&&"default"==f[d]&&(f[d]=c)};var y=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(b){null!=
-b.text&&(b.text.replaceLinefeeds="0"!=mxUtils.getValue(b.style,"nl2Br","1"));y.apply(this,arguments)};var x=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(b,d){this.isKeepFocusEvent(b)||!mxEvent.isAltDown(b.getEvent())?x.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(b){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var G=mxCellEditor.prototype.startEditing;
-mxCellEditor.prototype.startEditing=function(b,d){b=this.graph.getStartEditingCell(b,d);G.apply(this,arguments);var f=this.graph.view.getState(b);this.textarea.className=null!=f&&1==f.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(b);var f=this.graph.getModel().getParent(b),c=this.graph.getCellGeometry(b);if(this.graph.getModel().isEdge(f)&&null!=c&&c.relative||this.graph.getModel().isEdge(b))this.textarea.style.outline=
+b.text&&(b.text.replaceLinefeeds="0"!=mxUtils.getValue(b.style,"nl2Br","1"));y.apply(this,arguments)};var x=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(b,d){this.isKeepFocusEvent(b)||!mxEvent.isAltDown(b.getEvent())?x.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(b){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var E=mxCellEditor.prototype.startEditing;
+mxCellEditor.prototype.startEditing=function(b,d){b=this.graph.getStartEditingCell(b,d);E.apply(this,arguments);var f=this.graph.view.getState(b);this.textarea.className=null!=f&&1==f.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(b);var f=this.graph.getModel().getParent(b),c=this.graph.getCellGeometry(b);if(this.graph.getModel().isEdge(f)&&null!=c&&c.relative||this.graph.getModel().isEdge(b))this.textarea.style.outline=
mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var C=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(b){function d(b,f){f.originalNode=b;b=b.firstChild;for(var c=f.firstChild;null!=b&&null!=c;)d(b,c),b=b.nextSibling,c=c.nextSibling;return f}function f(b,d){if(null!=b)if(d.originalNode!=b)c(b);else for(b=b.firstChild,d=d.firstChild;null!=b;){var e=b.nextSibling;null==d?c(b):(f(b,d),d=d.nextSibling);b=e}}function c(b){for(var d=
b.firstChild;null!=d;){var f=d.nextSibling;c(d);d=f}1==b.nodeType&&("BR"===b.nodeName||null!=b.firstChild)||3==b.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(b)).length?(3==b.nodeType&&mxUtils.setTextContent(b,mxUtils.getTextContent(b).replace(/\n|\r/g,"")),1==b.nodeType&&(b.removeAttribute("style"),b.removeAttribute("class"),b.removeAttribute("width"),b.removeAttribute("cellpadding"),b.removeAttribute("cellspacing"),b.removeAttribute("border"))):b.parentNode.removeChild(b)}C.apply(this,arguments);
7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(b){var c=d(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?f(this.textarea,c):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var b=this.graph.view.getState(this.editingCell);
@@ -2599,334 +2602,334 @@ mxConstants.DEFAULT_FONTFAMILY),e=mxUtils.getValue(b.style,mxConstants.STYLE_ALI
0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&k.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"px";this.textarea.style.textDecoration=k.join(" ");this.textarea.style.fontWeight=l?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=d;this.textarea.style.textAlign=e;this.textarea.style.padding=
"0px";this.textarea.innerHTML!=m&&(this.textarea.innerHTML=m,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var m=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(m=mxUtils.replaceTrailingNewlines(m,"<div><br></div>"));m=this.graph.sanitizeHtml(d?
m.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):m,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var c=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;
-this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=m&&(this.textarea.innerHTML=m);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=f;this.resize()}};var E=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(b,d){if(null!=this.textarea)if(b=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=
+this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=m&&(this.textarea.innerHTML=m);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=f;this.resize()}};var F=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(b,d){if(null!=this.textarea)if(b=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=
b){var f=b.view.scale;this.bounds=mxRectangle.fromRectangle(b);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*f;this.bounds.height=60*f;var c=null!=b.text?b.text.margin:null;null==c&&(c=mxUtils.getAlignmentAsPoint(mxUtils.getValue(b.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=c.x*this.bounds.width;this.bounds.y+=c.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-
4)/f)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/f)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/f)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*f);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/f)+(this.textarea.offsetWidth-this.textarea.clientWidth)+
-"px",this.bounds.width=parseInt(this.textarea.style.width)*f);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+f+","+f+")")}else this.textarea.style.height="",this.textarea.style.overflow="",E.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(b,d){if("0"==mxUtils.getValue(b.style,"html",
+"px",this.bounds.width=parseInt(this.textarea.style.width)*f);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+f+","+f+")")}else this.textarea.style.height="",this.textarea.style.overflow="",F.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(b,d){if("0"==mxUtils.getValue(b.style,"html",
"0"))return mxCellEditorGetInitialValue.apply(this,arguments);var f=this.graph.getEditingValue(b.cell,d);"1"==mxUtils.getValue(b.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>"));return f=this.graph.sanitizeHtml(f,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(b){if("0"==mxUtils.getValue(b.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var d=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return d=
-"1"==mxUtils.getValue(b.style,"nl2Br","1")?d.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):d.replace(/\r\n/g,"").replace(/\n/g,"")};var J=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(b){this.codeViewMode&&this.toggleViewMode();J.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(ca){}};var L=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(b,d){this.graph.getModel().beginUpdate();
+"1"==mxUtils.getValue(b.style,"nl2Br","1")?d.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):d.replace(/\r\n/g,"").replace(/\n/g,"")};var I=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(b){this.codeViewMode&&this.toggleViewMode();I.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(ca){}};var L=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(b,d){this.graph.getModel().beginUpdate();
try{L.apply(this,arguments),""==d&&this.graph.isCellDeletable(b.cell)&&0==this.graph.model.getChildCount(b.cell)&&this.graph.isTransparentState(b)&&this.graph.removeCells([b.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(b){var d=mxUtils.getValue(b.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=d&&d!=mxConstants.NONE||!(null!=b.cell.geometry&&0<b.cell.geometry.width)||0==mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0)&&0!=
mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,1)||(d=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,null));d==mxConstants.NONE&&(d=null);return d};mxCellEditor.prototype.getMinimumSize=function(b){var d=this.graph.getView().scale;return new mxRectangle(0,0,null==b.text?30:b.text.size*d+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(b,d){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&
!mxEvent.isAltDown(d.getEvent)};mxGraphView.prototype.formatUnitText=function(b){return b?c(b,this.unit):b};mxGraphHandler.prototype.updateHint=function(d){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var f=this.graph.view.translate,e=this.graph.view.scale;d=this.roundLength((this.bounds.x+this.currentDx)/e-f.x);f=this.roundLength((this.bounds.y+this.currentDy)/e-f.y);e=this.graph.view.unit;this.hint.innerHTML=
c(d,e)+", "+c(f,e);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var H=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(b,d){H.apply(this,arguments);var f=this.graph.getCellStyle(b);if(null==
-f.childLayout){var c=this.graph.model.getParent(b),e=null!=c?this.graph.getCellGeometry(c):null;if(null!=e&&(f=this.graph.getCellStyle(c),"stackLayout"==f.childLayout)){var l=parseFloat(mxUtils.getValue(f,"stackBorder",mxStackLayout.prototype.border)),f="1"==mxUtils.getValue(f,"horizontalStack","1"),g=this.graph.getActualStartSize(c),e=e.clone();f?e.height=d.height+g.y+g.height+2*l:e.width=d.width+g.x+g.width+2*l;this.graph.model.setGeometry(c,e)}}};var K=mxSelectionCellsHandler.prototype.getHandledSelectionCells;
-mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function b(b){f.get(b)||(f.put(b,!0),e.push(b))}for(var d=K.apply(this,arguments),f=new mxDictionary,c=this.graph.model,e=[],l=0;l<d.length;l++){var g=d[l];this.graph.isTableCell(g)?b(c.getParent(c.getParent(g))):this.graph.isTableRow(g)&&b(c.getParent(g));b(g)}return e};var B=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(b){var d=B.apply(this,arguments);d.stroke=
+f.childLayout){var c=this.graph.model.getParent(b),e=null!=c?this.graph.getCellGeometry(c):null;if(null!=e&&(f=this.graph.getCellStyle(c),"stackLayout"==f.childLayout)){var l=parseFloat(mxUtils.getValue(f,"stackBorder",mxStackLayout.prototype.border)),f="1"==mxUtils.getValue(f,"horizontalStack","1"),g=this.graph.getActualStartSize(c),e=e.clone();f?e.height=d.height+g.y+g.height+2*l:e.width=d.width+g.x+g.width+2*l;this.graph.model.setGeometry(c,e)}}};var J=mxSelectionCellsHandler.prototype.getHandledSelectionCells;
+mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function b(b){f.get(b)||(f.put(b,!0),e.push(b))}for(var d=J.apply(this,arguments),f=new mxDictionary,c=this.graph.model,e=[],l=0;l<d.length;l++){var g=d[l];this.graph.isTableCell(g)?b(c.getParent(c.getParent(g))):this.graph.isTableRow(g)&&b(c.getParent(g));b(g)}return e};var B=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(b){var d=B.apply(this,arguments);d.stroke=
"#C0C0C0";d.strokewidth=1;return d};var M=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(b){var d=M.apply(this,arguments);d.stroke="#C0C0C0";d.strokewidth=1;return d};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var b=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+b.x/2,this.bounds.y+this.rotationHandleVSpacing-
b.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(b,d){return this.graph.isRecursiveVertexResize(b)&&!mxEvent.isControlDown(d.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(b,d){return!(!this.graph.isSwimlane(b.cell)&&0<this.graph.model.getChildCount(b.cell)&&!this.graph.isCellCollapsed(b.cell)&&"1"==mxUtils.getValue(b.style,"recursiveResize","1")&&null==mxUtils.getValue(b.style,"childLayout",null))&&mxEvent.isControlDown(d.getEvent())||mxEvent.isMetaDown(d.getEvent())};
var P=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return P.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var T=mxVertexHandler.prototype.isParentHighlightVisible;
mxVertexHandler.prototype.isParentHighlightVisible=function(){return T.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var N=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(b){return b.tableHandle||N.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var b=0;this.graph.isTableRow(this.state.cell)?
-b=1:this.graph.isTableCell(this.state.cell)&&(b=2);return b};var R=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return R.apply(this,arguments).grow(-this.getSelectionBorderInset())};var F=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=F.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var d=this.graph,f=d.model,c=this.state,e=this.selectionBorder,l=this;null==
-b&&(b=[]);var g=d.view.getCellStates(f.getChildCells(this.state.cell,!0));if(0<g.length){for(var k=d.view.getCellStates(f.getChildCells(g[0].cell,!0)),f=0;f<k.length;f++)mxUtils.bind(this,function(f){var g=k[f],m=f<k.length-1?k[f+1]:null,q=new mxLine(new mxRectangle,mxConstants.NONE,1,!0);q.isDashed=e.isDashed;q.svgStrokeTolerance++;q=new mxHandle(g,"col-resize",null,q);q.tableHandle=!0;var n=0;q.shape.node.parentNode.insertBefore(q.shape.node,q.shape.node.parentNode.firstChild);q.redraw=function(){if(null!=
-this.shape&&null!=this.state.shape){var b=d.getActualStartSize(c.cell);this.shape.stroke=0==n?mxConstants.NONE:e.stroke;this.shape.bounds.x=this.state.x+this.state.width+n*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=c.y+(f==k.length-1?0:b.y*this.graph.view.scale);this.shape.bounds.height=c.height-(f==k.length-1?0:(b.height+b.y)*this.graph.view.scale);this.shape.redraw()}};var F=!1;q.setPosition=function(b,f,c){n=Math.max(Graph.minTableColumnWidth-b.width,f.x-b.x-b.width);F=
-mxEvent.isShiftDown(c.getEvent());null==m||F||(n=Math.min((m.x+m.width-g.x-g.width)/d.view.scale-Graph.minTableColumnWidth,n))};q.execute=function(b){if(0!=n)d.setTableColumnWidth(this.state.cell,n,F);else if(!l.blockDelayedSelection){var f=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(f,b)}n=0};q.reset=function(){n=0};b.push(q)})(f);for(f=0;f<g.length;f++)mxUtils.bind(this,function(f){f=g[f];var k=new mxLine(new mxRectangle,mxConstants.NONE,1);k.isDashed=e.isDashed;
-k.svgStrokeTolerance++;f=new mxHandle(f,"row-resize",null,k);f.tableHandle=!0;var m=0;f.shape.node.parentNode.insertBefore(f.shape.node,f.shape.node.parentNode.firstChild);f.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.stroke=0==m?mxConstants.NONE:e.stroke,this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+m*this.graph.view.scale,this.shape.bounds.height=1,this.shape.redraw())};f.setPosition=function(b,
-d,f){m=Math.max(Graph.minTableRowHeight-b.height,d.y-b.y-b.height)};f.execute=function(b){if(0!=m)d.setTableRowHeight(this.state.cell,m,!mxEvent.isShiftDown(b.getEvent()));else if(!l.blockDelayedSelection){var f=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(f,b)}m=0};f.reset=function(){m=0};b.push(f)})(f)}}return null!=b?b.reverse():null};var D=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){D.apply(this,arguments);
-if(null!=this.moveHandles)for(var d=0;d<this.moveHandles.length;d++)this.moveHandles[d].style.visibility=b?"":"hidden";if(null!=this.cornerHandles)for(d=0;d<this.cornerHandles.length;d++)this.cornerHandles[d].node.style.visibility=b?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var b=this.graph.model;if(null!=this.moveHandles){for(var d=0;d<this.moveHandles.length;d++)this.moveHandles[d].parentNode.removeChild(this.moveHandles[d]);this.moveHandles=null}this.moveHandles=[];for(d=
-0;d<b.getChildCount(this.state.cell);d++)mxUtils.bind(this,function(d){if(null!=d&&b.isVertex(d.cell)){var f=mxUtils.createImage(Editor.rowMoveImage);f.style.position="absolute";f.style.cursor="pointer";f.style.width="7px";f.style.height="4px";f.style.padding="4px 2px 4px 2px";f.rowState=d;mxEvent.addGestureListeners(f,mxUtils.bind(this,function(b){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(b)&&this.graph.isCellSelected(d.cell)||this.graph.selectCellForEvent(d.cell,
-b);mxEvent.isPopupTrigger(b)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(b),mxEvent.getClientY(b),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0);mxEvent.consume(b)}),null,mxUtils.bind(this,function(b){mxEvent.isPopupTrigger(b)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(b),mxEvent.getClientY(b),d.cell,b),mxEvent.consume(b))}));this.moveHandles.push(f);this.graph.container.appendChild(f)}})(this.graph.view.getState(b.getChildAt(this.state.cell,
-d)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var b=0;b<this.customHandles.length;b++)this.customHandles[b].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var A=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var b=new mxPoint(0,0),d=this.tolerance,f=this.state.style.shape;null==mxCellRenderer.defaultShapes[f]&&mxStencilRegistry.getStencil(f);
-f=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!f&&null!=this.customHandles)for(var c=0;c<this.customHandles.length;c++)if(null!=this.customHandles[c].shape&&null!=this.customHandles[c].shape.bounds){var e=this.customHandles[c].shape.bounds,l=e.getCenterX(),g=e.getCenterY();if(Math.abs(this.state.x-l)<e.width/2||Math.abs(this.state.y-g)<e.height/2||Math.abs(this.state.x+this.state.width-l)<e.width/2||Math.abs(this.state.y+this.state.height-g)<e.height/
-2){f=!0;break}}f&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(d/=2,this.graph.isTable(this.state.cell)&&(d+=7),b.x=this.sizers[0].bounds.width+d,b.y=this.sizers[0].bounds.height+d):b=A.apply(this,arguments);return b};mxVertexHandler.prototype.updateHint=function(d){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{d=
-this.state.view.scale;var f=this.state.view.unit;this.hint.innerHTML=c(this.roundLength(this.bounds.width/d),f)+" x "+c(this.roundLength(this.bounds.height/d),f)}d=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==d&&(d=this.bounds);this.hint.style.left=d.x+Math.round((d.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=d.y+d.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};
-mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var da=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(b,d){da.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var I=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=
-function(b,d){I.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(d,f){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var e=this.graph.view.translate,l=this.graph.view.scale,g=this.roundLength(f.x/l-e.x),e=this.roundLength(f.y/l-e.y),l=this.graph.view.unit;this.hint.innerHTML=c(g,l)+", "+c(e,l);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=
-this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(g=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*g.x)+"%, "+Math.round(100*g.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(d.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(d.getGraphY(),f.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=
-mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=
-mxClient.IS_SVG?Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22" stroke-width="1"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>'):new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>'):new mxImage(IMAGE_PATH+"/handle-terminal.png",
-17,17);HoverIcons.prototype.rotationHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>',
-24,24):new mxImage(IMAGE_PATH+"/handle-rotate.png",16,16);mxClient.IS_SVG&&(mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="'+HoverIcons.prototype.arrowFill+'"/>'));mxVertexHandler.TABLE_HANDLE_COLOR="#fca000";mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxEdgeHandler.prototype.terminalHandleImage=
-HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,
-Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxClient.IS_SVG||((new Image).src=HoverIcons.prototype.mainHandle.src,(new Image).src=HoverIcons.prototype.fixedHandle.src,(new Image).src=HoverIcons.prototype.terminalHandle.src,(new Image).src=HoverIcons.prototype.secondaryHandle.src,(new Image).src=HoverIcons.prototype.rotationHandle.src,(new Image).src=HoverIcons.prototype.triangleUp.src,(new Image).src=HoverIcons.prototype.triangleRight.src,
-(new Image).src=HoverIcons.prototype.triangleDown.src,(new Image).src=HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=
-!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(b){return!mxEvent.isShiftDown(b.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=
-function(b){return!mxEvent.isShiftDown(b.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(b){return mxEvent.isMouseEvent(b.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=
-function(b){var d=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(d)||mxEvent.isPopupTrigger(d)&&(null==b.getState()||mxEvent.isControlDown(d)||mxEvent.isShiftDown(d))};var S=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(b,d){S.apply(this,arguments);mxEvent.isTouchEvent(d.getEvent())&&this.graph.isCellSelected(d.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(b){var d=
-b.getEvent();return mxEvent.isLeftMouseButton(d)&&(this.useLeftButtonForPanning&&null==b.getState()||mxEvent.isControlDown(d)&&!mxEvent.isShiftDown(d))||this.usePopupTrigger&&mxEvent.isPopupTrigger(d)};mxRubberband.prototype.isSpaceEvent=function(b){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(b.getEvent())&&mxEvent.isShiftDown(b.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&
-(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(b,d){if(this.cancelled)this.cancelled=!1,d.consume();else{var f=null!=this.div&&"none"!=this.div.style.display,c=null,e=null,l=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(c=this.first.x,e=this.first.y,l=(this.currentX-c)/this.graph.view.scale,g=(this.currentY-e)/this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(l=this.graph.snap(l),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(l)<
-this.graph.tolerance&&(l=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(f){if(mxEvent.isAltDown(d.getEvent())&&this.graph.isToggleEvent(d.getEvent())){var l=new mxRectangle(this.x,this.y,this.width,this.height),k=this.graph.getCells(l.x,l.y,l.width,l.height);this.graph.removeSelectionCells(k)}else if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(k=this.graph.getCellsBeyond(c,e,this.graph.getDefaultParent(),!0,!0),f=0;f<k.length;f++)if(this.graph.isCellMovable(k[f])){var m=
-this.graph.view.getState(k[f]),q=this.graph.getCellGeometry(k[f]);null!=m&&null!=q&&(q=q.clone(),q.translate(l,g),this.graph.model.setGeometry(k[f],q))}}finally{this.graph.model.endUpdate()}}else l=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(l,d.getEvent());d.consume()}}};mxRubberband.prototype.mouseMove=function(b,d){if(!d.isConsumed()&&null!=this.first){var f=mxUtils.getScrollOrigin(this.graph.container),c=mxUtils.getOffset(this.graph.container);f.x-=c.x;f.y-=c.y;
-var c=d.getX()+f.x,f=d.getY()+f.y,e=this.first.x-c,l=this.first.y-f,g=this.graph.tolerance;if(null!=this.div||Math.abs(e)>g||Math.abs(l)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(c,f),this.isSpaceEvent(d)?(c=this.x+this.width,f=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=
-0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=c-this.width),this.y<this.first.y&&(this.y=f-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=
-this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),
-this.secondDiv=null)),d.consume()}};var Z=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);Z.apply(this,arguments)};var ma=(new Date).getTime(),ga=0,ia=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(b,d,f,c){ia.apply(this,arguments);f!=this.currentTerminalState?(ma=(new Date).getTime(),ga=0):ga=(new Date).getTime()-ma;this.currentTerminalState=
-f};var la=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(b){return null!=this.currentTerminalState&&b.getState()==this.currentTerminalState&&2E3<ga||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&la.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(b,d){var f=null!=b&&0==b,c=this.state.getVisibleTerminalState(f),e=null!=b&&(0==b||b>=this.state.absolutePoints.length-
-1||this.constructor==mxElbowEdgeHandler&&2==b)?this.graph.getConnectionConstraint(this.state,c,f):null,f=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(f),e):null)?this.fixedHandleImage:null!=e&&null!=c?this.terminalHandleImage:this.handleImage;if(null!=f)return f=new mxImageShape(new mxRectangle(0,0,f.width,f.height),f.src),f.preserveImageAspect=!1,f;f=mxConstants.HANDLE_SIZE;this.preferHtml&&--f;return new mxRectangleShape(new mxRectangle(0,0,f,f),mxConstants.HANDLE_FILLCOLOR,
-mxConstants.HANDLE_STROKECOLOR)};var W=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(b,d,f){this.handleImage=d==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:d==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return W.apply(this,arguments)};var fa=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(b){if(null!=b&&1==b.length){var d=this.graph.getModel(),f=d.getParent(b[0]),c=this.graph.getCellGeometry(b[0]);
-if(d.isEdge(f)&&null!=c&&c.relative&&(d=this.graph.view.getState(b[0]),null!=d&&2>d.width&&2>d.height&&null!=d.text&&null!=d.text.boundingBox))return mxRectangle.fromRectangle(d.text.boundingBox)}return fa.apply(this,arguments)};var na=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var b=na.apply(this,arguments),d=[],f=0;f<b.length;f++)"1"!=mxUtils.getValue(b[f].style,"part","0")&&d.push(b[f]);return d};var V=mxVertexHandler.prototype.getSelectionBounds;
-mxVertexHandler.prototype.getSelectionBounds=function(b){var d=this.graph.getModel(),f=d.getParent(b.cell),c=this.graph.getCellGeometry(b.cell);return d.isEdge(f)&&null!=c&&c.relative&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox?(d=b.text.unrotatedBoundingBox||b.text.boundingBox,new mxRectangle(Math.round(d.x),Math.round(d.y),Math.round(d.width),Math.round(d.height))):V.apply(this,arguments)};var Q=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(b,
-d){var f=this.graph.getModel(),c=f.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(d)==mxEvent.ROTATION_HANDLE||!f.isEdge(c)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Q.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var b=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);
-this.state.view.graph.model.isVertex(this.state.cell)&&b==mxConstants.NONE&&d==mxConstants.NONE?(b=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,b,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var pa=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(b,d){pa.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&
-null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var X=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(b,d){X.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display=
-"");this.blockDelayedSelection=null};var ea=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ea.apply(this,arguments);var b=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var d=0;4>d;d++){var f=new mxRectangleShape(new mxRectangle(0,
-0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);f.dialect=mxConstants.DIALECT_SVG;f.init(this.graph.view.getOverlayPane());this.cornerHandles.push(f)}}var c=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(b,d){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));
-c()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(b,d){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);d=this.graph.getLinkForCell(this.state.cell);f=this.graph.getLinksForState(this.state);this.updateLinkHint(d,f);if(null!=d||null!=f&&0<f.length)b=!0;b&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=
-function(d,f){try{if(null==d&&(null==f||0==f.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=d||null!=f&&0<f.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));
-this.linkHint.innerHTML="";if(null!=d&&(this.linkHint.appendChild(this.graph.createLinkForHint(d)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var c=document.createElement("img");c.setAttribute("src",Editor.editImage);c.setAttribute("title",mxResources.get("editLink"));c.setAttribute("width","11");c.setAttribute("height","11");c.style.marginLeft="10px";c.style.marginBottom="-1px";c.style.cursor="pointer";this.linkHint.appendChild(c);mxEvent.addListener(c,"click",mxUtils.bind(this,
-function(b){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(b)}));this.linkHint.appendChildGraph.createRemoveIcon(mxResources.get("removeIt",[mxResources.get("link")]),mxUtils.bind(this,function(b){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(b)}))}if(null!=f)for(c=0;c<f.length;c++){var e=document.createElement("div");e.style.marginTop=null!=d||0<c?"6px":"0px";e.appendChild(this.graph.createLinkForHint(f[c].getAttribute("href"),mxUtils.getTextContent(f[c])));
-this.linkHint.appendChild(e)}}}catch(xa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var ja=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){ja.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var b=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&
-(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(d,f){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));b();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var d=this.graph.getLinkForCell(this.state.cell),
-f=this.graph.getLinksForState(this.state);if(null!=d||null!=f&&0<f.length)this.updateLinkHint(d,f),this.redrawHandles()};var ra=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){ra.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var U=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var b=0;b<this.moveHandles.length;b++)this.moveHandles[b].style.left=
-this.moveHandles[b].rowState.x+this.moveHandles[b].rowState.width-5+"px",this.moveHandles[b].style.top=this.moveHandles[b].rowState.y+this.moveHandles[b].rowState.height/2-6+"px";if(null!=this.cornerHandles){var b=this.getSelectionBorderInset(),d=this.cornerHandles,f=d[0].bounds.height/2;d[0].bounds.x=this.state.x-d[0].bounds.width/2+b;d[0].bounds.y=this.state.y-f+b;d[0].redraw();d[1].bounds.x=d[0].bounds.x+this.state.width-2*b;d[1].bounds.y=d[0].bounds.y;d[1].redraw();d[2].bounds.x=d[0].bounds.x;
-d[2].bounds.y=this.state.y+this.state.height-2*b;d[2].redraw();d[3].bounds.x=d[1].bounds.x;d[3].bounds.y=d[2].bounds.y;d[3].redraw();for(b=0;b<this.cornerHandles.length;b++)this.cornerHandles[b].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");U.apply(this);null!=this.state&&
-null!=this.linkHint&&(b=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),d=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),f=mxUtils.getBoundingBox(d,this.state.style[mxConstants.STYLE_ROTATION]||"0",b),b=null!=f?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,d=null!=this.state.text?this.state.text.boundingBox:null,null==f&&(f=this.state),f=f.y+f.height,null!=d&&(f=Math.max(f,d.y+d.height)),this.linkHint.style.left=
-Math.max(0,Math.round(b.x+(b.width-this.linkHint.clientWidth)/2))+"px",this.linkHint.style.top=Math.round(f+this.verticalOffset/2+Editor.hintOffset)+"px")};var ka=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){ka.apply(this,arguments);if(null!=this.moveHandles){for(var b=0;b<this.moveHandles.length;b++)null!=this.moveHandles[b]&&null!=this.moveHandles[b].parentNode&&this.moveHandles[b].parentNode.removeChild(this.moveHandles[b]);this.moveHandles=null}if(null!=this.cornerHandles){for(b=
-0;b<this.cornerHandles.length;b++)null!=this.cornerHandles[b]&&null!=this.cornerHandles[b].node&&null!=this.cornerHandles[b].node.parentNode&&this.cornerHandles[b].node.parentNode.removeChild(this.cornerHandles[b].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),
-this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var aa=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(aa.apply(this),null!=this.state&&null!=this.linkHint)){var b=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(b=new mxRectangle(b.x,b.y,b.width,b.height),b.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(b.x+(b.width-
-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b.y+b.height+Editor.hintOffset)+"px"}};var oa=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){oa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var sa=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){sa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),
-this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function k(){mxActor.call(this)}function g(){mxCylinder.call(this)}function p(){mxCylinder.call(this)}function t(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxShape.call(this)}function l(){mxShape.call(this)}function m(b,d,f,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=f;this.strokewidth=null!=c?c:1}function q(){mxActor.call(this)}function n(){mxCylinder.call(this)}
-function u(){mxCylinder.call(this)}function v(){mxActor.call(this)}function y(){mxActor.call(this)}function x(){mxActor.call(this)}function G(){mxActor.call(this)}function C(){mxActor.call(this)}function E(){mxActor.call(this)}function J(){mxActor.call(this)}function L(b,d){this.canvas=b;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=d;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,L.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;
-this.canvas.moveTo=mxUtils.bind(this,L.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,L.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,L.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,L.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,L.prototype.arcTo)}function H(){mxRectangleShape.call(this)}function K(){mxRectangleShape.call(this)}
-function B(){mxActor.call(this)}function M(){mxActor.call(this)}function P(){mxActor.call(this)}function T(){mxRectangleShape.call(this)}function N(){mxRectangleShape.call(this)}function R(){mxCylinder.call(this)}function F(){mxShape.call(this)}function D(){mxShape.call(this)}function A(){mxEllipse.call(this)}function da(){mxShape.call(this)}function I(){mxShape.call(this)}function S(){mxRectangleShape.call(this)}function Z(){mxShape.call(this)}function ma(){mxShape.call(this)}function ga(){mxShape.call(this)}
-function ia(){mxShape.call(this)}function la(){mxShape.call(this)}function W(){mxCylinder.call(this)}function fa(){mxCylinder.call(this)}function na(){mxRectangleShape.call(this)}function V(){mxDoubleEllipse.call(this)}function Q(){mxDoubleEllipse.call(this)}function pa(){mxArrowConnector.call(this);this.spacing=0}function X(){mxArrowConnector.call(this);this.spacing=0}function ea(){mxActor.call(this)}function ja(){mxRectangleShape.call(this)}function ra(){mxActor.call(this)}function U(){mxActor.call(this)}
-function ka(){mxActor.call(this)}function aa(){mxActor.call(this)}function oa(){mxActor.call(this)}function sa(){mxActor.call(this)}function ca(){mxActor.call(this)}function O(){mxActor.call(this)}function ta(){mxActor.call(this)}function ba(){mxActor.call(this)}function xa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function ya(){mxEllipse.call(this)}function Ea(){mxRhombus.call(this)}function Ja(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function Ha(){mxEllipse.call(this)}
-function wa(){mxEllipse.call(this)}function za(){mxActor.call(this)}function va(){mxActor.call(this)}function Aa(){mxActor.call(this)}function Y(b,d,f,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=f;this.strokewidth=null!=c?c:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Fa(){mxConnector.call(this)}function Ua(b,d,f,c,e,l,g,k,m,q){g+=m;var z=c.clone();c.x-=e*(2*g+m);c.y-=l*(2*g+m);e*=g+m;l*=g+m;return function(){b.ellipse(z.x-
+b=1:this.graph.isTableCell(this.state.cell)&&(b=2);return b};var R=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return R.apply(this,arguments).grow(-this.getSelectionBorderInset())};var G=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=G.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var d=this.graph,f=d.model,c=this.state,e=this.selectionBorder,l=this;null==
+b&&(b=[]);var g=d.view.getCellStates(f.getChildCells(this.state.cell,!0));if(0<g.length){for(var k=f.getChildCells(g[0].cell,!0),f=0;f<k.length;f++)mxUtils.bind(this,function(f){var g=d.view.getState(k[f]),m=d.getCellGeometry(k[f]),q=null!=m.alternateBounds?m.alternateBounds:m;null==g&&(g=new mxCellState(d.view,k[f],d.getCellStyle(k[f])),g.x=c.x+m.x*d.view.scale,g.y=c.y+m.y*d.view.scale,g.width=q.width*d.view.scale,g.height=q.height*d.view.scale,g.updateCachedBounds());var m=f<k.length-1?k[f+1]:null,
+n=null!=m?d.getCellGeometry(m):null,G=null!=n&&null!=n.alternateBounds?n.alternateBounds:n,m=new mxLine(new mxRectangle,mxConstants.NONE,1,!0);m.isDashed=e.isDashed;m.svgStrokeTolerance++;m=new mxHandle(g,"col-resize",null,m);m.tableHandle=!0;var v=0;m.shape.node.parentNode.insertBefore(m.shape.node,m.shape.node.parentNode.firstChild);m.redraw=function(){if(null!=this.shape){var b=d.getActualStartSize(c.cell);this.shape.stroke=0==v?mxConstants.NONE:e.stroke;this.shape.bounds.x=this.state.x+(q.width+
+v)*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=c.y+(f==k.length-1?0:b.y*this.graph.view.scale);this.shape.bounds.height=c.height-(f==k.length-1?0:(b.height+b.y)*this.graph.view.scale);this.shape.redraw()}};var p=!1;m.setPosition=function(b,f,c){v=Math.max(Graph.minTableColumnWidth-q.width,f.x-b.x-q.width);p=mxEvent.isShiftDown(c.getEvent());null==n||null==G||p||(v=Math.min(g.x/d.view.scale-q.width-Graph.minTableColumnWidth+n.x+d.view.translate.x+G.width,v))};m.execute=function(b){if(0!=
+v)d.setTableColumnWidth(this.state.cell,v,p);else if(!l.blockDelayedSelection){var f=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(f,b)}v=0};m.positionChanged=function(){};m.reset=function(){v=0};b.push(m)})(f);for(f=0;f<g.length;f++)mxUtils.bind(this,function(f){f=g[f];var k=new mxLine(new mxRectangle,mxConstants.NONE,1);k.isDashed=e.isDashed;k.svgStrokeTolerance++;f=new mxHandle(f,"row-resize",null,k);f.tableHandle=!0;var m=0;f.shape.node.parentNode.insertBefore(f.shape.node,
+f.shape.node.parentNode.firstChild);f.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.stroke=0==m?mxConstants.NONE:e.stroke,this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+m*this.graph.view.scale,this.shape.bounds.height=1,this.shape.redraw())};f.setPosition=function(b,d,f){m=Math.max(Graph.minTableRowHeight-b.height,d.y-b.y-b.height)};f.execute=function(b){if(0!=m)d.setTableRowHeight(this.state.cell,
+m,!mxEvent.isShiftDown(b.getEvent()));else if(!l.blockDelayedSelection){var f=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(f,b)}m=0};f.reset=function(){m=0};b.push(f)})(f)}}return null!=b?b.reverse():null};var D=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){D.apply(this,arguments);if(null!=this.moveHandles)for(var d=0;d<this.moveHandles.length;d++)this.moveHandles[d].style.visibility=b?"":"hidden";if(null!=
+this.cornerHandles)for(d=0;d<this.cornerHandles.length;d++)this.cornerHandles[d].node.style.visibility=b?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var b=this.graph.model;if(null!=this.moveHandles){for(var d=0;d<this.moveHandles.length;d++)this.moveHandles[d].parentNode.removeChild(this.moveHandles[d]);this.moveHandles=null}this.moveHandles=[];for(d=0;d<b.getChildCount(this.state.cell);d++)mxUtils.bind(this,function(d){if(null!=d&&b.isVertex(d.cell)){var f=mxUtils.createImage(Editor.rowMoveImage);
+f.style.position="absolute";f.style.cursor="pointer";f.style.width="7px";f.style.height="4px";f.style.padding="4px 2px 4px 2px";f.rowState=d;mxEvent.addGestureListeners(f,mxUtils.bind(this,function(b){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(b)&&this.graph.isCellSelected(d.cell)||this.graph.selectCellForEvent(d.cell,b);mxEvent.isPopupTrigger(b)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(b),mxEvent.getClientY(b),this.graph.getSelectionCells()),
+this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0);mxEvent.consume(b)}),null,mxUtils.bind(this,function(b){mxEvent.isPopupTrigger(b)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(b),mxEvent.getClientY(b),d.cell,b),mxEvent.consume(b))}));this.moveHandles.push(f);this.graph.container.appendChild(f)}})(this.graph.view.getState(b.getChildAt(this.state.cell,d)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var b=
+0;b<this.customHandles.length;b++)this.customHandles[b].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var A=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var b=new mxPoint(0,0),d=this.tolerance,f=this.state.style.shape;null==mxCellRenderer.defaultShapes[f]&&mxStencilRegistry.getStencil(f);f=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;
+if(!f&&null!=this.customHandles)for(var c=0;c<this.customHandles.length;c++)if(null!=this.customHandles[c].shape&&null!=this.customHandles[c].shape.bounds){var e=this.customHandles[c].shape.bounds,l=e.getCenterX(),g=e.getCenterY();if(Math.abs(this.state.x-l)<e.width/2||Math.abs(this.state.y-g)<e.height/2||Math.abs(this.state.x+this.state.width-l)<e.width/2||Math.abs(this.state.y+this.state.height-g)<e.height/2){f=!0;break}}f&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(d/=2,this.graph.isTable(this.state.cell)&&
+(d+=7),b.x=this.sizers[0].bounds.width+d,b.y=this.sizers[0].bounds.height+d):b=A.apply(this,arguments);return b};mxVertexHandler.prototype.updateHint=function(d){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{d=this.state.view.scale;var f=this.state.view.unit;this.hint.innerHTML=c(this.roundLength(this.bounds.width/d),f)+" x "+c(this.roundLength(this.bounds.height/
+d),f)}d=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==d&&(d=this.bounds);this.hint.style.left=d.x+Math.round((d.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=d.y+d.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display=
+"")};var da=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(b,d){da.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var K=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(b,d){K.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=
+function(d,f){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var e=this.graph.view.translate,l=this.graph.view.scale,g=this.roundLength(f.x/l-e.x),e=this.roundLength(f.y/l-e.y),l=this.graph.view.unit;this.hint.innerHTML=c(g,l)+", "+c(e,l);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(g=this.constraintHandler.currentConstraint.point,this.hint.innerHTML=
+"["+Math.round(100*g.x)+"%, "+Math.round(100*g.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(d.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(d.getGraphY(),f.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+
+HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22" stroke-width="1"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>'):
+new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>'):new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+
+'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>',24,24):new mxImage(IMAGE_PATH+"/handle-rotate.png",16,16);mxClient.IS_SVG&&(mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,
+5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="'+HoverIcons.prototype.arrowFill+'"/>'));mxVertexHandler.TABLE_HANDLE_COLOR="#fca000";mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxEdgeHandler.prototype.terminalHandleImage=HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle;
+mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=
+HoverIcons.prototype.roundDrop);mxClient.IS_SVG||((new Image).src=HoverIcons.prototype.mainHandle.src,(new Image).src=HoverIcons.prototype.fixedHandle.src,(new Image).src=HoverIcons.prototype.terminalHandle.src,(new Image).src=HoverIcons.prototype.secondaryHandle.src,(new Image).src=HoverIcons.prototype.rotationHandle.src,(new Image).src=HoverIcons.prototype.triangleUp.src,(new Image).src=HoverIcons.prototype.triangleRight.src,(new Image).src=HoverIcons.prototype.triangleDown.src,(new Image).src=
+HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=
+!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(b){return!mxEvent.isShiftDown(b.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(b){return!mxEvent.isShiftDown(b.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||
+0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(b){return mxEvent.isMouseEvent(b.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(b){var d=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(d)||
+mxEvent.isPopupTrigger(d)&&(null==b.getState()||mxEvent.isControlDown(d)||mxEvent.isShiftDown(d))};var S=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(b,d){S.apply(this,arguments);mxEvent.isTouchEvent(d.getEvent())&&this.graph.isCellSelected(d.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(b){var d=b.getEvent();return mxEvent.isLeftMouseButton(d)&&(this.useLeftButtonForPanning&&null==
+b.getState()||mxEvent.isControlDown(d)&&!mxEvent.isShiftDown(d))||this.usePopupTrigger&&mxEvent.isPopupTrigger(d)};mxRubberband.prototype.isSpaceEvent=function(b){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(b.getEvent())&&mxEvent.isShiftDown(b.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(b,d){if(this.cancelled)this.cancelled=
+!1,d.consume();else{var f=null!=this.div&&"none"!=this.div.style.display,c=null,e=null,l=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(c=this.first.x,e=this.first.y,l=(this.currentX-c)/this.graph.view.scale,g=(this.currentY-e)/this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(l=this.graph.snap(l),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(l)<this.graph.tolerance&&(l=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(f){if(mxEvent.isAltDown(d.getEvent())&&
+this.graph.isToggleEvent(d.getEvent())){var l=new mxRectangle(this.x,this.y,this.width,this.height),k=this.graph.getCells(l.x,l.y,l.width,l.height);this.graph.removeSelectionCells(k)}else if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(k=this.graph.getCellsBeyond(c,e,this.graph.getDefaultParent(),!0,!0),f=0;f<k.length;f++)if(this.graph.isCellMovable(k[f])){var m=this.graph.view.getState(k[f]),q=this.graph.getCellGeometry(k[f]);null!=m&&null!=q&&(q=q.clone(),q.translate(l,g),this.graph.model.setGeometry(k[f],
+q))}}finally{this.graph.model.endUpdate()}}else l=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(l,d.getEvent());d.consume()}}};mxRubberband.prototype.mouseMove=function(b,d){if(!d.isConsumed()&&null!=this.first){var f=mxUtils.getScrollOrigin(this.graph.container),c=mxUtils.getOffset(this.graph.container);f.x-=c.x;f.y-=c.y;var c=d.getX()+f.x,f=d.getY()+f.y,e=this.first.x-c,l=this.first.y-f,g=this.graph.tolerance;if(null!=this.div||Math.abs(e)>g||Math.abs(l)>g)null==
+this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(c,f),this.isSpaceEvent(d)?(c=this.x+this.width,f=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=c-this.width),this.y<this.first.y&&(this.y=f-this.height)),
+this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+
+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),d.consume()}};var aa=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=
+this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);aa.apply(this,arguments)};var ma=(new Date).getTime(),ga=0,ia=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(b,d,f,c){ia.apply(this,arguments);f!=this.currentTerminalState?(ma=(new Date).getTime(),ga=0):ga=(new Date).getTime()-ma;this.currentTerminalState=f};var la=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(b){return null!=
+this.currentTerminalState&&b.getState()==this.currentTerminalState&&2E3<ga||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&la.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(b,d){var f=null!=b&&0==b,c=this.state.getVisibleTerminalState(f),e=null!=b&&(0==b||b>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==b)?this.graph.getConnectionConstraint(this.state,c,f):null,f=null!=(null!=
+e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(f),e):null)?this.fixedHandleImage:null!=e&&null!=c?this.terminalHandleImage:this.handleImage;if(null!=f)return f=new mxImageShape(new mxRectangle(0,0,f.width,f.height),f.src),f.preserveImageAspect=!1,f;f=mxConstants.HANDLE_SIZE;this.preferHtml&&--f;return new mxRectangleShape(new mxRectangle(0,0,f,f),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var W=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=
+function(b,d,f){this.handleImage=d==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:d==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return W.apply(this,arguments)};var fa=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(b){if(null!=b&&1==b.length){var d=this.graph.getModel(),f=d.getParent(b[0]),c=this.graph.getCellGeometry(b[0]);if(d.isEdge(f)&&null!=c&&c.relative&&(d=this.graph.view.getState(b[0]),null!=d&&2>d.width&&2>d.height&&
+null!=d.text&&null!=d.text.boundingBox))return mxRectangle.fromRectangle(d.text.boundingBox)}return fa.apply(this,arguments)};var na=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var b=na.apply(this,arguments),d=[],f=0;f<b.length;f++)"1"!=mxUtils.getValue(b[f].style,"part","0")&&d.push(b[f]);return d};var V=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(b){var d=this.graph.getModel(),f=d.getParent(b.cell),
+c=this.graph.getCellGeometry(b.cell);return d.isEdge(f)&&null!=c&&c.relative&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox?(d=b.text.unrotatedBoundingBox||b.text.boundingBox,new mxRectangle(Math.round(d.x),Math.round(d.y),Math.round(d.width),Math.round(d.height))):V.apply(this,arguments)};var Q=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(b,d){var f=this.graph.getModel(),c=f.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
+(this.getHandleForEvent(d)==mxEvent.ROTATION_HANDLE||!f.isEdge(c)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Q.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var b=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&b==mxConstants.NONE&&d==mxConstants.NONE?(b=mxUtils.mod(mxUtils.getValue(this.state.style,
+mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,b,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var ra=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(b,d){ra.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display=
+"none"))};var X=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(b,d){X.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var ea=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ea.apply(this,arguments);var b=!1;
+null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var d=0;4>d;d++){var f=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);f.dialect=mxConstants.DIALECT_SVG;f.init(this.graph.view.getOverlayPane());
+this.cornerHandles.push(f)}}var c=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(b,d){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));c()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,
+this.changeHandler);this.editingHandler=mxUtils.bind(this,function(b,d){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);d=this.graph.getLinkForCell(this.state.cell);f=this.graph.getLinksForState(this.state);this.updateLinkHint(d,f);if(null!=d||null!=f&&0<f.length)b=!0;b&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(d,f){try{if(null==d&&(null==f||0==f.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),
+this.linkHint=null);else if(null!=d||null!=f&&0<f.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerHTML="";if(null!=d&&(this.linkHint.appendChild(this.graph.createLinkForHint(d)),this.graph.isEnabled()&&"function"===
+typeof this.graph.editLink)){var c=document.createElement("img");c.setAttribute("src",Editor.editImage);c.setAttribute("title",mxResources.get("editLink"));c.setAttribute("width","11");c.setAttribute("height","11");c.style.marginLeft="10px";c.style.marginBottom="-1px";c.style.cursor="pointer";this.linkHint.appendChild(c);mxEvent.addListener(c,"click",mxUtils.bind(this,function(b){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(b)}));this.linkHint.appendChildGraph.createRemoveIcon(mxResources.get("removeIt",
+[mxResources.get("link")]),mxUtils.bind(this,function(b){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(b)}))}if(null!=f)for(c=0;c<f.length;c++){var e=document.createElement("div");e.style.marginTop=null!=d||0<c?"6px":"0px";e.appendChild(this.graph.createLinkForHint(f[c].getAttribute("href"),mxUtils.getTextContent(f[c])));this.linkHint.appendChild(e)}}}catch(ya){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var ja=mxEdgeHandler.prototype.init;
+mxEdgeHandler.prototype.init=function(){ja.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var b=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,
+function(d,f){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));b();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var d=this.graph.getLinkForCell(this.state.cell),f=this.graph.getLinksForState(this.state);if(null!=d||null!=f&&0<f.length)this.updateLinkHint(d,f),this.redrawHandles()};var sa=mxConnectionHandler.prototype.init;
+mxConnectionHandler.prototype.init=function(){sa.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var U=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var b=0;b<this.moveHandles.length;b++)this.moveHandles[b].style.left=this.moveHandles[b].rowState.x+this.moveHandles[b].rowState.width-5+"px",this.moveHandles[b].style.top=this.moveHandles[b].rowState.y+
+this.moveHandles[b].rowState.height/2-6+"px";if(null!=this.cornerHandles){var b=this.getSelectionBorderInset(),d=this.cornerHandles,f=d[0].bounds.height/2;d[0].bounds.x=this.state.x-d[0].bounds.width/2+b;d[0].bounds.y=this.state.y-f+b;d[0].redraw();d[1].bounds.x=d[0].bounds.x+this.state.width-2*b;d[1].bounds.y=d[0].bounds.y;d[1].redraw();d[2].bounds.x=d[0].bounds.x;d[2].bounds.y=this.state.y+this.state.height-2*b;d[2].redraw();d[3].bounds.x=d[1].bounds.x;d[3].bounds.y=d[2].bounds.y;d[3].redraw();
+for(b=0;b<this.cornerHandles.length;b++)this.cornerHandles[b].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");U.apply(this);null!=this.state&&null!=this.linkHint&&(b=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),d=new mxRectangle(this.state.x,this.state.y-
+22,this.state.width+24,this.state.height+22),f=mxUtils.getBoundingBox(d,this.state.style[mxConstants.STYLE_ROTATION]||"0",b),b=null!=f?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,d=null!=this.state.text?this.state.text.boundingBox:null,null==f&&(f=this.state),f=f.y+f.height,null!=d&&(f=Math.max(f,d.y+d.height)),this.linkHint.style.left=Math.max(0,Math.round(b.x+(b.width-this.linkHint.clientWidth)/2))+"px",this.linkHint.style.top=Math.round(f+this.verticalOffset/
+2+Editor.hintOffset)+"px")};var ka=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){ka.apply(this,arguments);if(null!=this.moveHandles){for(var b=0;b<this.moveHandles.length;b++)null!=this.moveHandles[b]&&null!=this.moveHandles[b].parentNode&&this.moveHandles[b].parentNode.removeChild(this.moveHandles[b]);this.moveHandles=null}if(null!=this.cornerHandles){for(b=0;b<this.cornerHandles.length;b++)null!=this.cornerHandles[b]&&null!=this.cornerHandles[b].node&&null!=this.cornerHandles[b].node.parentNode&&
+this.cornerHandles[b].node.parentNode.removeChild(this.cornerHandles[b].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};
+var Z=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Z.apply(this),null!=this.state&&null!=this.linkHint)){var b=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(b=new mxRectangle(b.x,b.y,b.width,b.height),b.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(b.x+(b.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b.y+b.height+Editor.hintOffset)+"px"}};var qa=mxEdgeHandler.prototype.reset;
+mxEdgeHandler.prototype.reset=function(){qa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var ta=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){ta.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function k(){mxActor.call(this)}function g(){mxCylinder.call(this)}function p(){mxCylinder.call(this)}function t(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxShape.call(this)}function l(){mxShape.call(this)}function m(b,d,f,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=f;this.strokewidth=null!=c?c:1}function q(){mxActor.call(this)}function n(){mxCylinder.call(this)}
+function u(){mxCylinder.call(this)}function v(){mxActor.call(this)}function y(){mxActor.call(this)}function x(){mxActor.call(this)}function E(){mxActor.call(this)}function C(){mxActor.call(this)}function F(){mxActor.call(this)}function I(){mxActor.call(this)}function L(b,d){this.canvas=b;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=d;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,L.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;
+this.canvas.moveTo=mxUtils.bind(this,L.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,L.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,L.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,L.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,L.prototype.arcTo)}function H(){mxRectangleShape.call(this)}function J(){mxRectangleShape.call(this)}
+function B(){mxActor.call(this)}function M(){mxActor.call(this)}function P(){mxActor.call(this)}function T(){mxRectangleShape.call(this)}function N(){mxRectangleShape.call(this)}function R(){mxCylinder.call(this)}function G(){mxShape.call(this)}function D(){mxShape.call(this)}function A(){mxEllipse.call(this)}function da(){mxShape.call(this)}function K(){mxShape.call(this)}function S(){mxRectangleShape.call(this)}function aa(){mxShape.call(this)}function ma(){mxShape.call(this)}function ga(){mxShape.call(this)}
+function ia(){mxShape.call(this)}function la(){mxShape.call(this)}function W(){mxCylinder.call(this)}function fa(){mxCylinder.call(this)}function na(){mxRectangleShape.call(this)}function V(){mxDoubleEllipse.call(this)}function Q(){mxDoubleEllipse.call(this)}function ra(){mxArrowConnector.call(this);this.spacing=0}function X(){mxArrowConnector.call(this);this.spacing=0}function ea(){mxActor.call(this)}function ja(){mxRectangleShape.call(this)}function sa(){mxActor.call(this)}function U(){mxActor.call(this)}
+function ka(){mxActor.call(this)}function Z(){mxActor.call(this)}function qa(){mxActor.call(this)}function ta(){mxActor.call(this)}function ca(){mxActor.call(this)}function O(){mxActor.call(this)}function ua(){mxActor.call(this)}function ba(){mxActor.call(this)}function ya(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function Fa(){mxRhombus.call(this)}function Ja(){mxEllipse.call(this)}function Ca(){mxEllipse.call(this)}function Ia(){mxEllipse.call(this)}
+function xa(){mxEllipse.call(this)}function Aa(){mxActor.call(this)}function wa(){mxActor.call(this)}function Ba(){mxActor.call(this)}function Y(b,d,f,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=f;this.strokewidth=null!=c?c:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Ga(){mxConnector.call(this)}function Ua(b,d,f,c,e,l,g,k,m,q){g+=m;var z=c.clone();c.x-=e*(2*g+m);c.y-=l*(2*g+m);e*=g+m;l*=g+m;return function(){b.ellipse(z.x-
e-g,z.y-l-g,2*g,2*g);q?b.fillAndStroke():b.stroke()}}mxUtils.extend(b,mxSwimlane);b.prototype.getLabelBounds=function(b){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};b.prototype.paintVertexShape=function(b,d,f,c,e){0==this.getTitleSize()?mxRectangleShape.prototype.paintBackground.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),b.translate(-d,-f));this.paintForeground(b,
d,f,c,e)};b.prototype.paintForeground=function(b,d,f,c,e){if(null!=this.state){var z=this.flipH,l=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)var g=z,z=l,l=g;b.rotate(-this.getShapeRotation(),z,l,d+c/2,f+e/2);s=this.scale;d=this.bounds.x/s;f=this.bounds.y/s;c=this.bounds.width/s;e=this.bounds.height/s;this.paintTableForeground(b,d,f,c,e)}};b.prototype.paintTableForeground=function(b,d,f,c,e){var z=this.state.view.graph,l=z.getActualStartSize(this.state.cell),
-g=z.model.getChildCells(this.state.cell,!0);if(0<g.length){var k="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),Ia="0"!=mxUtils.getValue(this.state.style,"columnLines","1");if(k)for(k=1;k<g.length;k++){var m=z.getCellGeometry(g[k]);null!=m&&(b.begin(),b.moveTo(d+l.x,f+m.y),b.lineTo(d+c-l.width,f+m.y),b.end(),b.stroke())}if(Ia)for(c=z.model.getChildCells(g[0],!0),k=1;k<c.length;k++)m=z.getCellGeometry(c[k]),null!=m&&(b.begin(),b.moveTo(d+m.x+l.x,f+l.y),b.lineTo(d+m.x+l.x,f+e-l.height),b.end(),
-b.stroke())}};mxCellRenderer.registerShape("table",b);mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.darkOpacity=0;c.prototype.darkOpacity2=0;c.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),l=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));
-b.translate(d,f);b.begin();b.moveTo(0,0);b.lineTo(c-z,0);b.lineTo(c,z);b.lineTo(c,e);b.lineTo(z,e);b.lineTo(0,e-z);b.lineTo(0,0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),0!=l&&(b.setFillAlpha(Math.abs(l)),b.setFillColor(0>l?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(c-z,0),b.lineTo(c,z),b.lineTo(z,z),b.close(),b.fill()),0!=g&&(b.setFillAlpha(Math.abs(g)),b.setFillColor(0>g?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(z,z),b.lineTo(z,e),b.lineTo(0,e-z),
-b.close(),b.fill()),b.begin(),b.moveTo(z,e),b.lineTo(z,z),b.lineTo(0,0),b.moveTo(z,z),b.lineTo(c,z),b.end(),b.stroke())};c.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)?(b=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(b,b,0,0)):null};mxCellRenderer.registerShape("cube",c);var Qa=Math.tan(mxUtils.toRadians(30)),Ga=(.5-Qa)/2;mxCellRenderer.registerShape("isoRectangle",k);mxUtils.extend(e,mxCylinder);e.prototype.size=
-6;e.prototype.paintVertexShape=function(b,d,f,c,e){b.setFillColor(this.stroke);var z=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;b.ellipse(d+.5*(c-z),f+.5*(e-z),z,z);b.fill();b.setFillColor(mxConstants.NONE);b.rect(d,f,c,e);b.fill()};mxCellRenderer.registerShape("waypoint",e);mxUtils.extend(k,mxActor);k.prototype.size=20;k.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/Qa);b.translate((c-d)/2,(e-d)/2+d/4);b.moveTo(0,.25*d);b.lineTo(.5*d,d*Ga);
-b.lineTo(d,.25*d);b.lineTo(.5*d,(.5-Ga)*d);b.lineTo(0,.25*d);b.close();b.end()};mxCellRenderer.registerShape("isoRectangle",k);mxUtils.extend(g,mxCylinder);g.prototype.size=20;g.prototype.redrawPath=function(b,d,f,c,e,l){d=Math.min(c,e/(.5+Qa));l?(b.moveTo(0,.25*d),b.lineTo(.5*d,(.5-Ga)*d),b.lineTo(d,.25*d),b.moveTo(.5*d,(.5-Ga)*d),b.lineTo(.5*d,(1-Ga)*d)):(b.translate((c-d)/2,(e-d)/2),b.moveTo(0,.25*d),b.lineTo(.5*d,d*Ga),b.lineTo(d,.25*d),b.lineTo(d,.75*d),b.lineTo(.5*d,(1-Ga)*d),b.lineTo(0,.75*
-d),b.close());b.end()};mxCellRenderer.registerShape("isoCube",g);mxUtils.extend(p,mxCylinder);p.prototype.redrawPath=function(b,d,f,c,e,l){d=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(l&&null!=this.fill||!l&&null==this.fill)b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),l||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),l||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),l||(b.stroke(),b.begin()),b.translate(0,-d);l||(b.moveTo(0,
-d),b.curveTo(0,-d/3,c,-d/3,c,d),b.lineTo(c,e-d),b.curveTo(c,e+d/3,0,e+d/3,0,e-d),b.close())};p.prototype.getLabelMargins=function(b){return new mxRectangle(0,2.5*Math.min(b.height/2,Math.round(b.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",p);mxUtils.extend(t,mxCylinder);t.prototype.size=30;t.prototype.darkOpacity=0;t.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),l=
-Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));b.translate(d,f);b.begin();b.moveTo(0,0);b.lineTo(c-z,0);b.lineTo(c,z);b.lineTo(c,e);b.lineTo(0,e);b.lineTo(0,0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),0!=l&&(b.setFillAlpha(Math.abs(l)),b.setFillColor(0>l?"#FFFFFF":"#000000"),b.begin(),b.moveTo(c-z,0),b.lineTo(c-z,z),b.lineTo(c,z),b.close(),b.fill()),b.begin(),b.moveTo(c-z,0),b.lineTo(c-z,z),b.lineTo(c,z),b.end(),b.stroke())};
-mxCellRenderer.registerShape("note",t);mxUtils.extend(d,t);mxCellRenderer.registerShape("note2",d);d.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(b.height*this.scale,d*this.scale),0,0)}return null};mxUtils.extend(f,mxShape);f.prototype.isoAngle=15;f.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*
-Math.PI/200,z=Math.min(c*Math.tan(z),.5*e);b.translate(d,f);b.begin();b.moveTo(.5*c,0);b.lineTo(c,z);b.lineTo(c,e-z);b.lineTo(.5*c,e);b.lineTo(0,e-z);b.lineTo(0,z);b.close();b.fillAndStroke();b.setShadow(!1);b.begin();b.moveTo(0,z);b.lineTo(.5*c,2*z);b.lineTo(c,z);b.moveTo(.5*c,2*z);b.lineTo(.5*c,e);b.stroke()};mxCellRenderer.registerShape("isoCube2",f);mxUtils.extend(l,mxShape);l.prototype.size=15;l.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));b.translate(d,f);0==z?(b.rect(0,0,c,e),b.fillAndStroke()):(b.begin(),b.moveTo(0,z),b.arcTo(.5*c,z,0,0,1,.5*c,0),b.arcTo(.5*c,z,0,0,1,c,z),b.lineTo(c,e-z),b.arcTo(.5*c,z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),b.begin(),b.moveTo(c,z),b.arcTo(.5*c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke())};mxCellRenderer.registerShape("cylinder2",l);mxUtils.extend(m,mxCylinder);m.prototype.size=15;m.prototype.paintVertexShape=function(b,
-d,f,c,e){var z=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),l=mxUtils.getValue(this.style,"lid",!0);b.translate(d,f);0==z?(b.rect(0,0,c,e),b.fillAndStroke()):(b.begin(),l?(b.moveTo(0,z),b.arcTo(.5*c,z,0,0,1,.5*c,0),b.arcTo(.5*c,z,0,0,1,c,z)):(b.moveTo(0,0),b.arcTo(.5*c,z,0,0,0,.5*c,z),b.arcTo(.5*c,z,0,0,0,c,0)),b.lineTo(c,e-z),b.arcTo(.5*c,z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),l&&(b.begin(),b.moveTo(c,z),b.arcTo(.5*
-c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke()))};mxCellRenderer.registerShape("cylinder3",m);mxUtils.extend(q,mxActor);q.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c/2,.5*e,c,0);b.quadTo(.5*c,e/2,c,e);b.quadTo(c/2,.5*e,0,e);b.quadTo(.5*c,e/2,0,0);b.end()};mxCellRenderer.registerShape("switch",q);mxUtils.extend(n,mxCylinder);n.prototype.tabWidth=60;n.prototype.tabHeight=20;n.prototype.tabPosition="right";n.prototype.arcSize=.1;n.prototype.paintVertexShape=function(b,
-d,f,c,e){b.translate(d,f);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var z=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),l=mxUtils.getValue(this.style,"rounded",!1),g=mxUtils.getValue(this.style,"absoluteArcSize",!1),k=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));g||(k*=Math.min(c,e));k=Math.min(k,.5*c,.5*(e-f));d=Math.max(d,
-k);d=Math.min(c-k,d);l||(k=0);b.begin();"left"==z?(b.moveTo(Math.max(k,0),f),b.lineTo(Math.max(k,0),0),b.lineTo(d,0),b.lineTo(d,f)):(b.moveTo(c-d,f),b.lineTo(c-d,0),b.lineTo(c-Math.max(k,0),0),b.lineTo(c-Math.max(k,0),f));l?(b.moveTo(0,k+f),b.arcTo(k,k,0,0,1,k,f),b.lineTo(c-k,f),b.arcTo(k,k,0,0,1,c,k+f),b.lineTo(c,e-k),b.arcTo(k,k,0,0,1,c-k,e),b.lineTo(k,e),b.arcTo(k,k,0,0,1,0,e-k)):(b.moveTo(0,f),b.lineTo(c,f),b.lineTo(c,e),b.lineTo(0,e));b.close();b.fillAndStroke();b.setShadow(!1);"triangle"==mxUtils.getValue(this.style,
-"folderSymbol",null)&&(b.begin(),b.moveTo(c-30,f+20),b.lineTo(c-20,f+10),b.lineTo(c-10,f+20),b.close(),b.stroke())};mxCellRenderer.registerShape("folder",n);n.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var f=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,c=mxUtils.getValue(this.style,
-"rounded",!1),e=mxUtils.getValue(this.style,"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(z*=Math.min(b.width,b.height));z=Math.min(z,.5*b.width,.5*(b.height-d));c||(z=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(b.width,b.width-f),Math.min(b.height,b.height-d)):new mxRectangle(Math.min(b.width,b.width-f),0,z,Math.min(b.height,b.height-d))}return new mxRectangle(0,Math.min(b.height,d),0,0)}return null};
-mxUtils.extend(u,mxCylinder);u.prototype.arcSize=.1;u.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);var z=mxUtils.getValue(this.style,"rounded",!1),l=mxUtils.getValue(this.style,"absoluteArcSize",!1);d=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));f=mxUtils.getValue(this.style,"umlStateConnection",null);l||(d*=Math.min(c,e));d=Math.min(d,.5*c,.5*e);z||(d=0);z=0;null!=f&&(z=10);b.begin();b.moveTo(z,d);b.arcTo(d,d,0,0,1,z+d,0);b.lineTo(c-d,0);b.arcTo(d,d,0,0,1,c,
-d);b.lineTo(c,e-d);b.arcTo(d,d,0,0,1,c-d,e);b.lineTo(z+d,e);b.arcTo(d,d,0,0,1,z,e-d);b.close();b.fillAndStroke();b.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(b.roundrect(c-40,e-20,10,10,3,3),b.stroke(),b.roundrect(c-20,e-20,10,10,3,3),b.stroke(),b.begin(),b.moveTo(c-30,e-15),b.lineTo(c-20,e-15),b.stroke());"connPointRefEntry"==f?(b.ellipse(0,.5*e-10,20,20),b.fillAndStroke()):"connPointRefExit"==f&&(b.ellipse(0,.5*e-10,20,20),b.fillAndStroke(),b.begin(),b.moveTo(5,
-.5*e-5),b.lineTo(15,.5*e+5),b.moveTo(15,.5*e-5),b.lineTo(5,.5*e+5),b.stroke())};u.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",u);mxUtils.extend(v,mxActor);v.prototype.size=30;v.prototype.isRoundable=function(){return!0};v.prototype.redrawPath=function(b,d,f,c,e){d=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c,e),new mxPoint(0,e),new mxPoint(0,d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("card",v);mxUtils.extend(y,mxActor);y.prototype.size=.4;y.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(0,d/2);b.quadTo(c/4,1.4*d,c/2,d/2);b.quadTo(3*
-c/4,d*(1-1.4),c,d/2);b.lineTo(c,e-d/2);b.quadTo(3*c/4,e-1.4*d,c/2,e-d/2);b.quadTo(c/4,e-d*(1-1.4),0,e-d/2);b.lineTo(0,d/2);b.close();b.end()};y.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",this.size),f=b.width,c=b.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return d*=c,new mxRectangle(b.x,b.y+d,f,c-2*d);d*=f;return new mxRectangle(b.x+d,b.y,f-
-2*d,c)}return b};mxCellRenderer.registerShape("tape",y);mxUtils.extend(x,mxActor);x.prototype.size=.3;x.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*b.height):null};x.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(0,0);b.lineTo(c,0);b.lineTo(c,e-d/2);b.quadTo(3*c/4,e-1.4*d,c/2,e-d/2);b.quadTo(c/
-4,e-d*(1-1.4),0,e-d/2);b.lineTo(0,d/2);b.close();b.end()};mxCellRenderer.registerShape("document",x);var $a=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(b,d,f,c){var e=mxUtils.getValue(this.style,"size");return null!=e?c*Math.max(0,Math.min(1,e)):$a.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*
-this.scale,b.height*d),0,0)}return null};m.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(d/=2);return new mxRectangle(0,Math.min(b.height*this.scale,2*d*this.scale),0,Math.max(0,.3*d*this.scale))}return null};n.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,
-"labelInHeader",!1)){var f=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,c=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(z*=Math.min(b.width,b.height));z=Math.min(z,.5*b.width,.5*(b.height-d));c||(z=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(b.width,b.width-
-f),Math.min(b.height,b.height-d)):new mxRectangle(Math.min(b.width,b.width-f),0,z,Math.min(b.height,b.height-d))}return new mxRectangle(0,Math.min(b.height,d),0,0)}return null};u.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};d.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",
-15);return new mxRectangle(0,Math.min(b.height*this.scale,d*this.scale),0,Math.max(0,d*this.scale))}return null};mxUtils.extend(G,mxActor);G.prototype.size=.2;G.prototype.fixedSize=20;G.prototype.isRoundable=function(){return!0};G.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c-d,e)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("parallelogram",G);mxUtils.extend(C,mxActor);C.prototype.size=.2;C.prototype.fixedSize=20;C.prototype.isRoundable=function(){return!0};C.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*c,parseFloat(mxUtils.getValue(this.style,"size",
-this.fixedSize)))):c*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,e)],this.isRounded,f,!0)};mxCellRenderer.registerShape("trapezoid",C);mxUtils.extend(E,mxActor);E.prototype.size=.5;E.prototype.redrawPath=function(b,d,f,c,e){b.setFillColor(null);d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,e/2),new mxPoint(0,e/2),new mxPoint(d,e/2),new mxPoint(d,e),new mxPoint(c,e)],this.isRounded,f,!1);b.end()};mxCellRenderer.registerShape("curlyBracket",E);mxUtils.extend(J,mxActor);J.prototype.redrawPath=function(b,d,f,c,e){b.setStrokeWidth(1);b.setFillColor(this.stroke);d=c/5;b.rect(0,0,d,e);b.fillAndStroke();b.rect(2*d,0,d,e);
-b.fillAndStroke();b.rect(4*d,0,d,e);b.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",J);L.prototype.moveTo=function(b,d){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d;this.firstX=b;this.firstY=d};L.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};L.prototype.quadTo=function(b,d,f,c){this.originalQuadTo.apply(this.canvas,
-arguments);this.lastX=f;this.lastY=c};L.prototype.curveTo=function(b,d,f,c,e,l){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=l};L.prototype.arcTo=function(b,d,f,c,e,l,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=l;this.lastY=g};L.prototype.lineTo=function(b,d){if(null!=this.lastX&&null!=this.lastY){var f=function(b){return"number"===typeof b?b?0>b?-1:1:b===b?0:NaN:NaN},c=Math.abs(b-this.lastX),e=Math.abs(d-this.lastY),z=Math.sqrt(c*c+e*e);if(2>z){this.originalLineTo.apply(this.canvas,
-arguments);this.lastX=b;this.lastY=d;return}var l=Math.round(z/10),g=this.defaultVariation;5>l&&(l=5,g/=3);for(var k=f(b-this.lastX)*c/l,f=f(d-this.lastY)*e/l,c=c/z,e=e/z,z=0;z<l;z++){var m=(Math.random()-.5)*g;this.originalLineTo.call(this.canvas,k*z+this.lastX-m*e,f*z+this.lastY-m*c)}this.originalLineTo.call(this.canvas,b,d)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d};L.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;
-this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var ab=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(b){ab.apply(this,arguments);null==b.handJiggle&&(b.handJiggle=this.createHandJiggle(b))};var bb=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(b){bb.apply(this,arguments);null!=b.handJiggle&&(b.handJiggle.destroy(),
-delete b.handJiggle)};mxShape.prototype.createComicCanvas=function(b){return new L(b,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(b){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(b)};mxRhombus.prototype.defaultJiggle=2;var cb=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,
-"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&cb.apply(this,arguments)};var db=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(b,d,f,c,e){if(null==b.handJiggle||b.handJiggle.constructor!=L)db.apply(this,arguments);else{var z=!0;null!=this.style&&(z="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(z||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)z||
-null!=this.fill&&this.fill!=mxConstants.NONE||(b.pointerEvents=!1),b.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?z=Math.min(c/2,Math.min(e/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,z=Math.min(c*z,e*z)),b.moveTo(d+z,f),b.lineTo(d+c-z,f),b.quadTo(d+c,f,d+c,f+z),b.lineTo(d+c,f+e-z),b.quadTo(d+c,f+e,d+c-z,
-f+e),b.lineTo(d+z,f+e),b.quadTo(d,f+e,d,f+e-z),b.lineTo(d,f+z),b.quadTo(d,f,d+z,f)):(b.moveTo(d,f),b.lineTo(d+c,f),b.lineTo(d+c,f+e),b.lineTo(d,f+e),b.lineTo(d,f)),b.close(),b.end(),b.fillAndStroke()}};mxUtils.extend(H,mxRectangleShape);H.prototype.size=.1;H.prototype.fixedSize=!1;H.prototype.isHtmlAllowed=function(){return!1};H.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||
-this.direction==mxConstants.DIRECTION_WEST)){var d=b.width,f=b.height;b=new mxRectangle(b.x,b.y,d,f);var c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,c=Math.max(c,Math.min(d*e,f*e));b.x+=Math.round(c);b.width-=Math.round(2*c)}return b};H.prototype.paintForeground=function(b,d,f,c,e){var z=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),
-l=parseFloat(mxUtils.getValue(this.style,"size",this.size)),l=z?Math.max(0,Math.min(c,l)):c*Math.max(0,Math.min(1,l));this.isRounded&&(z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,l=Math.max(l,Math.min(c*z,e*z)));l=Math.round(l);b.begin();b.moveTo(d+l,f);b.lineTo(d+l,f+e);b.moveTo(d+c-l,f);b.lineTo(d+c-l,f+e);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",H);mxCellRenderer.registerShape("process2",
-H);mxUtils.extend(K,mxRectangleShape);K.prototype.paintBackground=function(b,d,f,c,e){b.setFillColor(mxConstants.NONE);b.rect(d,f,c,e);b.fill()};K.prototype.paintForeground=function(b,d,f,c,e){};mxCellRenderer.registerShape("transparent",K);mxUtils.extend(B,mxHexagon);B.prototype.size=30;B.prototype.position=.5;B.prototype.position2=.5;B.prototype.base=20;B.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};B.prototype.isRoundable=
-function(){return!0};B.prototype.redrawPath=function(b,d,f,c,e){d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var z=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),l=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),g=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"base",this.base))));
-this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,e-f),new mxPoint(Math.min(c,z+g),e-f),new mxPoint(l,e),new mxPoint(Math.max(0,z),e-f),new mxPoint(0,e-f)],this.isRounded,d,!0,[4])};mxCellRenderer.registerShape("callout",B);mxUtils.extend(M,mxActor);M.prototype.size=.2;M.prototype.fixedSize=20;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,
-"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c-d,0),new mxPoint(c,e/2),new mxPoint(c-d,e),new mxPoint(0,e),new mxPoint(d,e/2)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("step",M);mxUtils.extend(P,mxHexagon);P.prototype.size=.25;P.prototype.fixedSize=20;P.prototype.isRoundable=function(){return!0};
-P.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.5*e),new mxPoint(c-d,e),new mxPoint(d,e),new mxPoint(0,.5*e)],this.isRounded,f,
-!0)};mxCellRenderer.registerShape("hexagon",P);mxUtils.extend(T,mxRectangleShape);T.prototype.isHtmlAllowed=function(){return!1};T.prototype.paintForeground=function(b,d,f,c,e){var z=Math.min(c/5,e/5)+1;b.begin();b.moveTo(d+c/2,f+z);b.lineTo(d+c/2,f+e-z);b.moveTo(d+z,f+e/2);b.lineTo(d+c-z,f+e/2);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",T);var Xa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(b){if(1==
-this.style["double"]){var d=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+d,b.y+d,b.width-2*d,b.height-2*d)}return b};mxRhombus.prototype.paintVertexShape=function(b,d,f,c,e){Xa.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var z=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=z;f+=z;c-=2*z;e-=2*z;0<c&&0<e&&(b.setShadow(!1),Xa.apply(this,[b,d,f,c,e]))}};mxUtils.extend(N,
-mxRectangleShape);N.prototype.isHtmlAllowed=function(){return!1};N.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var d=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+d,b.y+d,b.width-2*d,b.height-2*d)}return b};N.prototype.paintForeground=function(b,d,f,c,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var z=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);d+=z;f+=z;c-=2*z;e-=2*z;0<c&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}b.setDashed(!1);var z=0,l;do{l=mxCellRenderer.defaultShapes[this.style["symbol"+z]];if(null!=l){var g=this.style["symbol"+z+"Align"],k=this.style["symbol"+z+"VerticalAlign"],m=this.style["symbol"+z+"Width"],q=this.style["symbol"+z+"Height"],n=this.style["symbol"+z+"Spacing"]||0,Ia=this.style["symbol"+z+"VSpacing"]||n,qa=this.style["symbol"+z+"ArcSpacing"];null!=qa&&(qa*=this.getArcSize(c+this.strokewidth,
-e+this.strokewidth),n+=qa,Ia+=qa);var qa=d,F=f,qa=g==mxConstants.ALIGN_CENTER?qa+(c-m)/2:g==mxConstants.ALIGN_RIGHT?qa+(c-m-n):qa+n,F=k==mxConstants.ALIGN_MIDDLE?F+(e-q)/2:k==mxConstants.ALIGN_BOTTOM?F+(e-q-Ia):F+Ia;b.save();g=new l;g.style=this.style;l.prototype.paintVertexShape.call(g,b,qa,F,m,q);b.restore()}z++}while(null!=l)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",N);mxUtils.extend(R,mxCylinder);R.prototype.redrawPath=function(b,d,f,
-c,e,l){l?(b.moveTo(0,0),b.lineTo(c/2,e/2),b.lineTo(c,0),b.end()):(b.moveTo(0,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(0,e),b.close())};mxCellRenderer.registerShape("message",R);mxUtils.extend(F,mxShape);F.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.ellipse(c/4,0,c/2,e/4);b.fillAndStroke();b.begin();b.moveTo(c/2,e/4);b.lineTo(c/2,2*e/3);b.moveTo(c/2,e/3);b.lineTo(0,e/3);b.moveTo(c/2,e/3);b.lineTo(c,e/3);b.moveTo(c/2,2*e/3);b.lineTo(0,e);b.moveTo(c/2,2*e/3);b.lineTo(c,e);b.end();
-b.stroke()};mxCellRenderer.registerShape("umlActor",F);mxUtils.extend(D,mxShape);D.prototype.getLabelMargins=function(b){return new mxRectangle(b.width/6,0,0,0)};D.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(0,e/4);b.lineTo(0,3*e/4);b.end();b.stroke();b.begin();b.moveTo(0,e/2);b.lineTo(c/6,e/2);b.end();b.stroke();b.ellipse(c/6,0,5*c/6,e);b.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",D);mxUtils.extend(A,mxEllipse);A.prototype.paintVertexShape=function(b,
-d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(d+c/8,f+e);b.lineTo(d+7*c/8,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("umlEntity",A);mxUtils.extend(da,mxShape);da.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(c,0);b.lineTo(0,e);b.moveTo(0,0);b.lineTo(c,e);b.end();b.stroke()};mxCellRenderer.registerShape("umlDestroy",da);mxUtils.extend(I,mxShape);I.prototype.getLabelBounds=function(b){return new mxRectangle(b.x,
-b.y+b.height/8,b.width,7*b.height/8)};I.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(3*c/8,e/8*1.1);b.lineTo(5*c/8,0);b.end();b.stroke();b.ellipse(0,e/8,c,7*e/8);b.fillAndStroke()};I.prototype.paintForeground=function(b,d,f,c,e){b.begin();b.moveTo(3*c/8,e/8*1.1);b.lineTo(5*c/8,e/4);b.end();b.stroke()};mxCellRenderer.registerShape("umlControl",I);mxUtils.extend(S,mxRectangleShape);S.prototype.size=40;S.prototype.isHtmlAllowed=function(){return!1};S.prototype.getLabelBounds=
-function(b){var d=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(b.x,b.y,b.width,d)};S.prototype.paintBackground=function(b,d,f,c,e){var l=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),z=mxUtils.getValue(this.style,"participant");null==z||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,b,d,f,c,l):(z=this.state.view.graph.cellRenderer.getShape(z),null!=z&&z!=S&&(z=new z,
-z.apply(this.state),b.save(),z.paintVertexShape(b,d,f,c,l),b.restore()));l<e&&(b.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),b.begin(),b.moveTo(d+c/2,f+l),b.lineTo(d+c/2,f+e),b.end(),b.stroke())};S.prototype.paintForeground=function(b,d,f,c,e){var l=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,b,d,f,c,Math.min(e,l))};mxCellRenderer.registerShape("umlLifeline",S);mxUtils.extend(Z,mxShape);
-Z.prototype.width=60;Z.prototype.height=30;Z.prototype.corner=10;Z.prototype.getLabelMargins=function(b){return new mxRectangle(0,0,b.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),b.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};Z.prototype.paintBackground=function(b,d,f,c,e){var l=this.corner,z=Math.min(c,Math.max(l,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),g=Math.min(e,Math.max(1.5*l,parseFloat(mxUtils.getValue(this.style,
-"height",this.height)))),k=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);k!=mxConstants.NONE&&(b.setFillColor(k),b.rect(d,f,c,e),b.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(b,d,f,c,e),b.setGradient(this.fill,this.gradient,d,f,c,e,this.gradientDirection)):b.setFillColor(this.fill);b.begin();b.moveTo(d,f);b.lineTo(d+z,f);b.lineTo(d+z,f+Math.max(0,g-1.5*l));b.lineTo(d+Math.max(0,z-
-l),f+g);b.lineTo(d,f+g);b.close();b.fillAndStroke();b.begin();b.moveTo(d+z,f);b.lineTo(d+c,f);b.lineTo(d+c,f+e);b.lineTo(d,f+e);b.lineTo(d,f+g);b.stroke()};mxCellRenderer.registerShape("umlFrame",Z);mxPerimeter.CenterPerimeter=function(b,d,f,c){return new mxPoint(b.getCenterX(),b.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(b,d,f,c){c=S.prototype.size;null!=d&&(c=mxUtils.getValue(d.style,"size",c)*d.view.scale);d=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||
-1)*d.view.scale/2-1;f.x<b.getCenterX()&&(d=-1*(d+1));return new mxPoint(b.getCenterX()+d,Math.min(b.y+b.height,Math.max(b.y+c,f.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(b,d,f,c){c=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(b,d,f,c){c=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||
-1)*d.view.scale/2-1;null!=d.style.backboneSize&&(c+=parseFloat(d.style.backboneSize)*d.view.scale/2-1);if("south"==d.style[mxConstants.STYLE_DIRECTION]||"north"==d.style[mxConstants.STYLE_DIRECTION])return f.x<b.getCenterX()&&(c=-1*(c+1)),new mxPoint(b.getCenterX()+c,Math.min(b.y+b.height,Math.max(b.y,f.y)));f.y<b.getCenterY()&&(c=-1*(c+1));return new mxPoint(Math.min(b.x+b.width,Math.max(b.x,f.x)),b.getCenterY()+c)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=
-function(b,d,f,c){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(b,new mxRectangle(0,0,0,Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(d.style,"size",B.prototype.size))*d.view.scale))),d.style),d,f,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),l=e?G.prototype.fixedSize:G.prototype.size;null!=d&&(l=mxUtils.getValue(d.style,"size",l));
-e&&(l*=d.view.scale);var g=b.x,z=b.y,k=b.width,m=b.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(m,l)):m*Math.max(0,Math.min(1,l)),z=[new mxPoint(g,z),new mxPoint(g+k,z+e),new mxPoint(g+k,z+m),new mxPoint(g,z+m-e),new mxPoint(g,z)]):(e=e?Math.max(0,Math.min(.5*k,l)):k*Math.max(0,Math.min(1,l)),z=[new mxPoint(g+e,z),new mxPoint(g+k,z),
-new mxPoint(g+k-e,z+m),new mxPoint(g,z+m),new mxPoint(g+e,z)]);m=b.getCenterX();b=b.getCenterY();b=new mxPoint(m,b);c&&(f.x<g||f.x>g+k?b.y=f.y:b.x=f.x);return mxUtils.getPerimeterPoint(z,b,f)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),l=e?C.prototype.fixedSize:C.prototype.size;null!=d&&(l=mxUtils.getValue(d.style,"size",l));e&&(l*=d.view.scale);var g=b.x,
-z=b.y,k=b.width,m=b.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(.5*k,l)):k*Math.max(0,Math.min(1,l)),z=[new mxPoint(g+e,z),new mxPoint(g+k-e,z),new mxPoint(g+k,z+m),new mxPoint(g,z+m),new mxPoint(g+e,z)]):d==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,l)):k*Math.max(0,Math.min(1,l)),z=[new mxPoint(g,z),new mxPoint(g+k,z),new mxPoint(g+k-e,z+m),new mxPoint(g+
-e,z+m),new mxPoint(g,z)]):d==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(m,l)):m*Math.max(0,Math.min(1,l)),z=[new mxPoint(g,z+e),new mxPoint(g+k,z),new mxPoint(g+k,z+m),new mxPoint(g,z+m-e),new mxPoint(g,z+e)]):(e=e?Math.max(0,Math.min(m,l)):m*Math.max(0,Math.min(1,l)),z=[new mxPoint(g,z),new mxPoint(g+k,z+e),new mxPoint(g+k,z+m-e),new mxPoint(g,z+m),new mxPoint(g,z)]);m=b.getCenterX();b=b.getCenterY();b=new mxPoint(m,b);c&&(f.x<g||f.x>g+k?b.y=f.y:b.x=f.x);return mxUtils.getPerimeterPoint(z,
-b,f)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),l=e?M.prototype.fixedSize:M.prototype.size;null!=d&&(l=mxUtils.getValue(d.style,"size",l));e&&(l*=d.view.scale);var g=b.x,z=b.y,k=b.width,m=b.height,q=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?
-(e=e?Math.max(0,Math.min(k,l)):k*Math.max(0,Math.min(1,l)),z=[new mxPoint(g,z),new mxPoint(g+k-e,z),new mxPoint(g+k,b),new mxPoint(g+k-e,z+m),new mxPoint(g,z+m),new mxPoint(g+e,b),new mxPoint(g,z)]):d==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,l)):k*Math.max(0,Math.min(1,l)),z=[new mxPoint(g+e,z),new mxPoint(g+k,z),new mxPoint(g+k-e,b),new mxPoint(g+k,z+m),new mxPoint(g+e,z+m),new mxPoint(g,b),new mxPoint(g+e,z)]):d==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(m,l)):m*Math.max(0,
-Math.min(1,l)),z=[new mxPoint(g,z+e),new mxPoint(q,z),new mxPoint(g+k,z+e),new mxPoint(g+k,z+m),new mxPoint(q,z+m-e),new mxPoint(g,z+m),new mxPoint(g,z+e)]):(e=e?Math.max(0,Math.min(m,l)):m*Math.max(0,Math.min(1,l)),z=[new mxPoint(g,z),new mxPoint(q,z+e),new mxPoint(g+k,z),new mxPoint(g+k,z+m-e),new mxPoint(q,z+m),new mxPoint(g,z+m-e),new mxPoint(g,z)]);q=new mxPoint(q,b);c&&(f.x<g||f.x>g+k?q.y=f.y:q.x=f.x);return mxUtils.getPerimeterPoint(z,q,f)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);
-mxPerimeter.HexagonPerimeter2=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),l=e?P.prototype.fixedSize:P.prototype.size;null!=d&&(l=mxUtils.getValue(d.style,"size",l));e&&(l*=d.view.scale);var g=b.x,z=b.y,k=b.width,m=b.height,q=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(m,l)):m*Math.max(0,
-Math.min(1,l)),z=[new mxPoint(q,z),new mxPoint(g+k,z+e),new mxPoint(g+k,z+m-e),new mxPoint(q,z+m),new mxPoint(g,z+m-e),new mxPoint(g,z+e),new mxPoint(q,z)]):(e=e?Math.max(0,Math.min(k,l)):k*Math.max(0,Math.min(1,l)),z=[new mxPoint(g+e,z),new mxPoint(g+k-e,z),new mxPoint(g+k,b),new mxPoint(g+k-e,z+m),new mxPoint(g+e,z+m),new mxPoint(g,b),new mxPoint(g+e,z)]);q=new mxPoint(q,b);c&&(f.x<g||f.x>g+k?q.y=f.y:q.x=f.x);return mxUtils.getPerimeterPoint(z,q,f)};mxStyleRegistry.putValue("hexagonPerimeter2",
-mxPerimeter.HexagonPerimeter2);mxUtils.extend(ma,mxShape);ma.prototype.size=10;ma.prototype.paintBackground=function(b,d,f,c,e){var l=parseFloat(mxUtils.getValue(this.style,"size",this.size));b.translate(d,f);b.ellipse((c-l)/2,0,l,l);b.fillAndStroke();b.begin();b.moveTo(c/2,l);b.lineTo(c/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("lollipop",ma);mxUtils.extend(ga,mxShape);ga.prototype.size=10;ga.prototype.inset=2;ga.prototype.paintBackground=function(b,d,f,c,e){var l=parseFloat(mxUtils.getValue(this.style,
-"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(d,f);b.begin();b.moveTo(c/2,l+g);b.lineTo(c/2,e);b.end();b.stroke();b.begin();b.moveTo((c-l)/2-g,l/2);b.quadTo((c-l)/2-g,l+g,c/2,l+g);b.quadTo((c+l)/2+g,l+g,(c+l)/2+g,l/2);b.end();b.stroke()};mxCellRenderer.registerShape("requires",ga);mxUtils.extend(ia,mxShape);ia.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);
-b.end();b.stroke()};mxCellRenderer.registerShape("requiredInterface",ia);mxUtils.extend(la,mxShape);la.prototype.inset=2;la.prototype.paintBackground=function(b,d,f,c,e){var l=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(d,f);b.ellipse(0,l,c-2*l,e-2*l);b.fillAndStroke();b.begin();b.moveTo(c/2,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,c/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",la);mxUtils.extend(W,mxCylinder);W.prototype.jettyWidth=
-20;W.prototype.jettyHeight=10;W.prototype.redrawPath=function(b,d,f,c,e,l){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));f=g/2;var g=f+g/2,z=Math.min(d,e-d),k=Math.min(z+2*d,e-d);l?(b.moveTo(f,z),b.lineTo(g,z),b.lineTo(g,z+d),b.lineTo(f,z+d),b.moveTo(f,k),b.lineTo(g,k),b.lineTo(g,k+d),b.lineTo(f,k+d)):(b.moveTo(f,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(f,e),b.lineTo(f,k+d),b.lineTo(0,k+d),b.lineTo(0,
-k),b.lineTo(f,k),b.lineTo(f,z+d),b.lineTo(0,z+d),b.lineTo(0,z),b.lineTo(f,z),b.close());b.end()};mxCellRenderer.registerShape("module",W);mxUtils.extend(fa,mxCylinder);fa.prototype.jettyWidth=32;fa.prototype.jettyHeight=12;fa.prototype.redrawPath=function(b,d,f,c,e,l){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));f=g/2;var g=f+g/2,z=.3*e-d/2,k=.7*e-d/2;l?(b.moveTo(f,z),b.lineTo(g,z),b.lineTo(g,
-z+d),b.lineTo(f,z+d),b.moveTo(f,k),b.lineTo(g,k),b.lineTo(g,k+d),b.lineTo(f,k+d)):(b.moveTo(f,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(f,e),b.lineTo(f,k+d),b.lineTo(0,k+d),b.lineTo(0,k),b.lineTo(f,k),b.lineTo(f,z+d),b.lineTo(0,z+d),b.lineTo(0,z),b.lineTo(f,z),b.close());b.end()};mxCellRenderer.registerShape("component",fa);mxUtils.extend(na,mxRectangleShape);na.prototype.paintForeground=function(b,d,f,c,e){var l=c/2,g=e/2,z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;b.begin();this.addPoints(b,[new mxPoint(d+l,f),new mxPoint(d+c,f+g),new mxPoint(d+l,f+e),new mxPoint(d,f+g)],this.isRounded,z,!0);b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",na);mxUtils.extend(V,mxDoubleEllipse);V.prototype.outerStroke=!0;V.prototype.paintVertexShape=function(b,d,f,c,e){var l=Math.min(4,Math.min(c/5,e/5));0<c&&0<e&&(b.ellipse(d+l,f+l,c-2*l,e-2*l),b.fillAndStroke());b.setShadow(!1);this.outerStroke&&
-(b.ellipse(d,f,c,e),b.stroke())};mxCellRenderer.registerShape("endState",V);mxUtils.extend(Q,V);Q.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Q);mxUtils.extend(pa,mxArrowConnector);pa.prototype.defaultWidth=4;pa.prototype.isOpenEnded=function(){return!0};pa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};pa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",
-pa);mxUtils.extend(X,mxArrowConnector);X.prototype.defaultWidth=10;X.prototype.defaultArrowWidth=20;X.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};X.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};X.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",
-X);mxUtils.extend(ea,mxActor);ea.prototype.size=30;ea.prototype.isRoundable=function(){return!0};ea.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(0,d),new mxPoint(c,0),new mxPoint(c,e)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("manualInput",ea);mxUtils.extend(ja,mxRectangleShape);ja.prototype.dx=
-20;ja.prototype.dy=20;ja.prototype.isHtmlAllowed=function(){return!1};ja.prototype.paintForeground=function(b,d,f,c,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var l=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,l=Math.max(l,Math.min(c*g,e*g));g=Math.max(l,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));l=Math.max(l,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));
-b.begin();b.moveTo(d,f+l);b.lineTo(d+c,f+l);b.end();b.stroke();b.begin();b.moveTo(d+g,f);b.lineTo(d+g,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("internalStorage",ja);mxUtils.extend(ra,mxActor);ra.prototype.dx=20;ra.prototype.dy=20;ra.prototype.redrawPath=function(b,d,f,c,e){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));
-var l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f),new mxPoint(d,f),new mxPoint(d,e),new mxPoint(0,e)],this.isRounded,l,!0);b.end()};mxCellRenderer.registerShape("corner",ra);mxUtils.extend(U,mxActor);U.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.lineTo(0,e);b.end();b.moveTo(c,0);b.lineTo(c,e);b.end();b.moveTo(0,e/2);b.lineTo(c,e/2);b.end()};mxCellRenderer.registerShape("crossbar",
-U);mxUtils.extend(ka,mxActor);ka.prototype.dx=20;ka.prototype.dy=20;ka.prototype.redrawPath=function(b,d,f,c,e){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f),new mxPoint((c+
-d)/2,f),new mxPoint((c+d)/2,e),new mxPoint((c-d)/2,e),new mxPoint((c-d)/2,f),new mxPoint(0,f)],this.isRounded,l,!0);b.end()};mxCellRenderer.registerShape("tee",ka);mxUtils.extend(aa,mxActor);aa.prototype.arrowWidth=.3;aa.prototype.arrowSize=.2;aa.prototype.redrawPath=function(b,d,f,c,e){var l=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));f=(e-l)/2;var l=
-f+l,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,f),new mxPoint(c-d,f),new mxPoint(c-d,0),new mxPoint(c,e/2),new mxPoint(c-d,e),new mxPoint(c-d,l),new mxPoint(0,l)],this.isRounded,g,!0);b.end()};mxCellRenderer.registerShape("singleArrow",aa);mxUtils.extend(oa,mxActor);oa.prototype.redrawPath=function(b,d,f,c,e){var l=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",aa.prototype.arrowWidth))));d=c*Math.max(0,
-Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",aa.prototype.arrowSize))));f=(e-l)/2;var l=f+l,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e/2),new mxPoint(d,0),new mxPoint(d,f),new mxPoint(c-d,f),new mxPoint(c-d,0),new mxPoint(c,e/2),new mxPoint(c-d,e),new mxPoint(c-d,l),new mxPoint(d,l),new mxPoint(d,e)],this.isRounded,g,!0);b.end()};mxCellRenderer.registerShape("doubleArrow",oa);mxUtils.extend(sa,mxActor);sa.prototype.size=
-.1;sa.prototype.fixedSize=20;sa.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(d,0);b.lineTo(c,0);b.quadTo(c-2*d,e/2,c,e);b.lineTo(d,e);b.quadTo(d-2*d,e/2,d,0);b.close();b.end()};mxCellRenderer.registerShape("dataStorage",sa);mxUtils.extend(ca,mxActor);ca.prototype.redrawPath=
-function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.close();b.end()};mxCellRenderer.registerShape("or",ca);mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.quadTo(c/2,e/2,0,0);b.close();b.end()};mxCellRenderer.registerShape("xor",O);mxUtils.extend(ta,mxActor);ta.prototype.size=20;ta.prototype.isRoundable=function(){return!0};ta.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.8*d),new mxPoint(c,e),new mxPoint(0,e),new mxPoint(0,.8*d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("loopLimit",ta);mxUtils.extend(ba,mxActor);ba.prototype.size=.375;ba.prototype.isRoundable=function(){return!0};ba.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,e-d),new mxPoint(c/2,e),new mxPoint(0,e-d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("offPageConnector",ba);mxUtils.extend(xa,mxEllipse);xa.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(d+c/2,f+e);b.lineTo(d+c,f+e);b.end();b.stroke()};
-mxCellRenderer.registerShape("tapeData",xa);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(d,f+e/2);b.lineTo(d+c,f+e/2);b.end();b.stroke();b.begin();b.moveTo(d+c/2,f);b.lineTo(d+c/2,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("orEllipse",ua);mxUtils.extend(ya,mxEllipse);ya.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);b.setShadow(!1);b.begin();b.moveTo(d+.145*c,f+.145*e);b.lineTo(d+.855*c,f+.855*e);b.end();b.stroke();b.begin();b.moveTo(d+.855*c,f+.145*e);b.lineTo(d+.145*c,f+.855*e);b.end();b.stroke()};mxCellRenderer.registerShape("sumEllipse",ya);mxUtils.extend(Ea,mxRhombus);Ea.prototype.paintVertexShape=function(b,d,f,c,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(d,f+e/2);b.lineTo(d+c,f+e/2);b.end();b.stroke()};mxCellRenderer.registerShape("sortShape",
-Ea);mxUtils.extend(Ja,mxEllipse);Ja.prototype.paintVertexShape=function(b,d,f,c,e){b.begin();b.moveTo(d,f);b.lineTo(d+c,f);b.lineTo(d+c/2,f+e/2);b.close();b.fillAndStroke();b.begin();b.moveTo(d,f+e);b.lineTo(d+c,f+e);b.lineTo(d+c/2,f+e/2);b.close();b.fillAndStroke()};mxCellRenderer.registerShape("collate",Ja);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=function(b,d,f,c,e){var l=f+e-5;b.begin();b.moveTo(d,f);b.lineTo(d,f+e);b.moveTo(d,l);b.lineTo(d+10,l-5);b.moveTo(d,l);b.lineTo(d+10,
-l+5);b.moveTo(d,l);b.lineTo(d+c,l);b.moveTo(d+c,f);b.lineTo(d+c,f+e);b.moveTo(d+c,l);b.lineTo(d+c-10,l-5);b.moveTo(d+c,l);b.lineTo(d+c-10,l+5);b.end();b.stroke()};mxCellRenderer.registerShape("dimension",Ba);mxUtils.extend(Ha,mxEllipse);Ha.prototype.paintVertexShape=function(b,d,f,c,e){this.outline||b.setStrokeColor(null);if(null!=this.style){var l=b.pointerEvents;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||null!=this.fill&&this.fill!=mxConstants.NONE||(b.pointerEvents=
-!1);b.rect(d,f,c,e);b.fill();b.pointerEvents=l;b.setStrokeColor(this.stroke);b.begin();b.moveTo(d,f);this.outline||"1"==mxUtils.getValue(this.style,"top","1")?b.lineTo(d+c,f):b.moveTo(d+c,f);this.outline||"1"==mxUtils.getValue(this.style,"right","1")?b.lineTo(d+c,f+e):b.moveTo(d+c,f+e);this.outline||"1"==mxUtils.getValue(this.style,"bottom","1")?b.lineTo(d,f+e):b.moveTo(d,f+e);(this.outline||"1"==mxUtils.getValue(this.style,"left","1"))&&b.lineTo(d,f);b.end();b.stroke()}};mxCellRenderer.registerShape("partialRectangle",
-Ha);mxUtils.extend(wa,mxEllipse);wa.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();"vertical"==mxUtils.getValue(this.style,"line")?(b.moveTo(d+c/2,f),b.lineTo(d+c/2,f+e)):(b.moveTo(d,f+e/2),b.lineTo(d+c,f+e/2));b.end();b.stroke()};mxCellRenderer.registerShape("lineEllipse",wa);mxUtils.extend(za,mxActor);za.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/2);b.moveTo(0,0);b.lineTo(c-d,0);b.quadTo(c,0,c,e/2);
-b.quadTo(c,e,c-d,e);b.lineTo(0,e);b.close();b.end()};mxCellRenderer.registerShape("delay",za);mxUtils.extend(va,mxActor);va.prototype.size=.2;va.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(e,c);var l=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=(e-l)/2;f=d+l;var g=(c-l)/2,l=g+l;b.moveTo(0,d);b.lineTo(g,d);b.lineTo(g,0);b.lineTo(l,0);b.lineTo(l,d);b.lineTo(c,d);b.lineTo(c,f);b.lineTo(l,f);b.lineTo(l,e);b.lineTo(g,e);b.lineTo(g,f);b.lineTo(0,f);b.close();
-b.end()};mxCellRenderer.registerShape("cross",va);mxUtils.extend(Aa,mxActor);Aa.prototype.size=.25;Aa.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/2);f=Math.min(c-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);b.moveTo(0,e/2);b.lineTo(f,0);b.lineTo(c-d,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,c-d,e);b.lineTo(f,e);b.close();b.end()};mxCellRenderer.registerShape("display",Aa);mxUtils.extend(Y,mxActor);Y.prototype.cst={RECT2:"mxgraph.basic.rect"};Y.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"}]}];Y.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);this.strictDrawShape(b,0,0,c,e)};Y.prototype.strictDrawShape=function(b,d,f,c,e,l){var g=l&&l.rectStyle?l.rectStyle:
-mxUtils.getValue(this.style,"rectStyle",this.rectStyle),k=l&&l.absoluteCornerSize?l.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),m=l&&l.size?l.size:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),q=l&&l.rectOutline?l.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),n=l&&l.indent?l.indent:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),z=l&&l.dashed?l.dashed:
-mxUtils.getValue(this.style,"dashed",!1),F=l&&l.dashPattern?l.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),v=l&&l.relIndent?l.relIndent:Math.max(0,Math.min(50,n)),p=l&&l.top?l.top:mxUtils.getValue(this.style,"top",!0),u=l&&l.right?l.right:mxUtils.getValue(this.style,"right",!0),D=l&&l.bottom?l.bottom:mxUtils.getValue(this.style,"bottom",!0),A=l&&l.left?l.left:mxUtils.getValue(this.style,"left",!0),x=l&&l.topLeftStyle?l.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),
-I=l&&l.topRightStyle?l.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),t=l&&l.bottomRightStyle?l.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),y=l&&l.bottomLeftStyle?l.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),C=l&&l.fillColor?l.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");l&&l.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var da=l&&l.strokeWidth?l.strokeWidth:mxUtils.getValue(this.style,
-"strokeWidth","1"),B=l&&l.fillColor2?l.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),N=l&&l.gradientColor2?l.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),qa=l&&l.gradientDirection2?l.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),S=l&&l.opacity?l.opacity:mxUtils.getValue(this.style,"opacity","100"),Z=Math.max(0,Math.min(50,m));l=Y.prototype;b.setDashed(z);F&&""!=F&&b.setDashPattern(F);b.setStrokeWidth(da);m=Math.min(.5*e,.5*c,m);k||
-(m=Z*Math.min(c,e)/100);m=Math.min(m,.5*Math.min(c,e));k||(n=Math.min(v*Math.min(c,e)/100));n=Math.min(n,.5*Math.min(c,e)-m);(p||u||D||A)&&"frame"!=q&&(b.begin(),p?l.moveNW(b,d,f,c,e,g,x,m,A):b.moveTo(0,0),p&&l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),u&&l.paintNE(b,d,f,c,e,g,I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),D&&l.paintSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),A&&l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),b.close(),b.fill(),b.setShadow(!1),b.setFillColor(B),
-z=k=S,"none"==B&&(k=0),"none"==N&&(z=0),b.setGradient(B,N,0,0,c,e,qa,k,z),b.begin(),p?l.moveNWInner(b,d,f,c,e,g,x,m,n,p,A):b.moveTo(n,0),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),A&&D&&l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D),D&&u&&l.paintSEInner(b,d,f,c,e,g,t,m,n),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u),u&&p&&l.paintNEInner(b,d,f,c,e,g,I,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),p&&A&&l.paintNWInner(b,d,f,c,e,g,x,m,n),b.fill(),"none"==C&&(b.begin(),l.paintFolds(b,
-d,f,c,e,g,x,I,t,y,m,p,u,D,A),b.stroke()));p||u||D||!A?p||u||!D||A?!p&&!u&&D&&A?"frame"!=q?(b.begin(),l.moveSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),"double"==q&&(l.moveNWInner(b,d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D)),b.stroke()):(b.begin(),l.moveSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,
-D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.lineNWInner(b,d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D),b.close(),b.fillAndStroke()):p||!u||D||A?!p&&u&&!D&&A?"frame"!=q?(b.begin(),l.moveSW(b,d,f,c,e,g,x,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),"double"==q&&(l.moveNWInner(b,d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A)),b.stroke(),b.begin(),l.moveNE(b,d,f,c,e,g,I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),"double"==
-q&&(l.moveSEInner(b,d,f,c,e,g,t,m,n,D),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u)),b.stroke()):(b.begin(),l.moveSW(b,d,f,c,e,g,x,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.lineNWInner(b,d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),b.close(),b.fillAndStroke(),b.begin(),l.moveNE(b,d,f,c,e,g,I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),l.lineSEInner(b,d,f,c,e,g,t,m,n,D),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u),b.close(),b.fillAndStroke()):!p&&u&&D&&!A?"frame"!=q?(b.begin(),l.moveNE(b,d,f,c,e,g,I,
-m,p),l.paintRight(b,d,f,c,e,g,t,m,D),l.paintSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),"double"==q&&(l.moveSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D),l.paintSEInner(b,d,f,c,e,g,t,m,n),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u)),b.stroke()):(b.begin(),l.moveNE(b,d,f,c,e,g,I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),l.paintSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.lineSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D),l.paintSEInner(b,
-d,f,c,e,g,t,m,n),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u),b.close(),b.fillAndStroke()):!p&&u&&D&&A?"frame"!=q?(b.begin(),l.moveNE(b,d,f,c,e,g,I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),l.paintSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),"double"==q&&(l.moveNWInner(b,d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D),l.paintSEInner(b,d,f,c,e,g,t,
-m,n),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u)),b.stroke()):(b.begin(),l.moveNE(b,d,f,c,e,g,I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),l.paintSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.lineNWInner(b,d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D),l.paintSEInner(b,d,f,c,e,g,t,m,n),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u),b.close(),b.fillAndStroke()):
-!p||u||D||A?p&&!u&&!D&&A?"frame"!=q?(b.begin(),l.moveSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),"double"==q&&(l.moveNEInner(b,d,f,c,e,g,I,m,n,u),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A)),b.stroke()):(b.begin(),l.moveSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),l.lineNEInner(b,d,f,c,e,g,I,m,n,
-u),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),b.close(),b.fillAndStroke()):p&&!u&&D&&!A?"frame"!=q?(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),"double"==q&&(l.moveNEInner(b,d,f,c,e,g,I,m,n,u),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p)),b.stroke(),b.begin(),l.moveSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),"double"==q&&(l.moveSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D)),
-b.stroke()):(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),l.lineNEInner(b,d,f,c,e,g,I,m,n,u),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),b.close(),b.fillAndStroke(),b.begin(),l.moveSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.lineSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D),b.close(),b.fillAndStroke()):p&&!u&&D&&A?"frame"!=q?(b.begin(),l.moveSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,
-c,e,g,x,m,p),l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),"double"==q&&(l.moveNEInner(b,d,f,c,e,g,I,m,n,u),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D)),b.stroke()):(b.begin(),l.moveSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,
-f,c,e,g,I,m,u),l.lineNEInner(b,d,f,c,e,g,I,m,n,u),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D),b.close(),b.fillAndStroke()):p&&u&&!D&&!A?"frame"!=q?(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),l.paintNE(b,d,f,c,e,g,I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),"double"==q&&(l.moveSEInner(b,d,f,c,e,g,t,m,n,D),l.paintRightInner(b,d,f,c,e,
-g,I,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,I,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p)),b.stroke()):(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),l.paintNE(b,d,f,c,e,g,I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),l.lineSEInner(b,d,f,c,e,g,t,m,n,D),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,I,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),b.close(),b.fillAndStroke()):p&&u&&!D&&A?"frame"!=q?(b.begin(),l.moveSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.paintNW(b,
-d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),l.paintNE(b,d,f,c,e,g,I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),"double"==q&&(l.moveSEInner(b,d,f,c,e,g,t,m,n,D),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,I,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A)),b.stroke()):(b.begin(),l.moveSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),l.paintNE(b,d,
-f,c,e,g,I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),l.lineSEInner(b,d,f,c,e,g,t,m,n,D),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,I,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),b.close(),b.fillAndStroke()):p&&u&&D&&!A?"frame"!=q?(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),l.paintNE(b,d,f,c,e,g,I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),l.paintSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,
-c,e,g,y,m,A),"double"==q&&(l.moveSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D),l.paintSEInner(b,d,f,c,e,g,t,m,n),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,I,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p)),b.stroke()):(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),l.paintNE(b,d,f,c,e,g,I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),l.paintSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.lineSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,
-d,f,c,e,g,t,m,n,u,D),l.paintSEInner(b,d,f,c,e,g,t,m,n),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,I,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),b.close(),b.fillAndStroke()):p&&u&&D&&A&&("frame"!=q?(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),l.paintNE(b,d,f,c,e,g,I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),l.paintSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),
-b.close(),"double"==q&&(l.moveSWInner(b,d,f,c,e,g,y,m,n,A),l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D),l.paintSEInner(b,d,f,c,e,g,t,m,n),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,I,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),b.close()),b.stroke()):(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),l.paintNE(b,d,f,c,e,g,
-I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),l.paintSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),b.close(),l.moveSWInner(b,d,f,c,e,g,y,m,n,A),l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D),l.paintSEInner(b,d,f,c,e,g,t,m,n),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,I,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,e,g,y,m,n,
-D,A),b.close(),b.fillAndStroke())):"frame"!=q?(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),"double"==q&&(l.moveNEInner(b,d,f,c,e,g,I,m,n,u),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p)),b.stroke()):(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,I,m,u),l.lineNEInner(b,d,f,c,e,g,I,m,n,u),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),l.moveNE(b,d,f,c,e,g,I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),"double"==q&&(l.moveSEInner(b,d,
-f,c,e,g,t,m,n,D),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u)),b.stroke()):(b.begin(),l.moveNE(b,d,f,c,e,g,I,m,p),l.paintRight(b,d,f,c,e,g,t,m,D),l.lineSEInner(b,d,f,c,e,g,t,m,n,D),l.paintRightInner(b,d,f,c,e,g,I,m,n,p,u),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),l.moveSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),"double"==q&&(l.moveSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D)),b.stroke()):(b.begin(),l.moveSE(b,d,f,c,e,g,t,m,u),l.paintBottom(b,d,f,c,e,g,y,
-m,A),l.lineSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,d,f,c,e,g,t,m,n,u,D),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),l.moveSW(b,d,f,c,e,g,x,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),"double"==q&&(l.moveNWInner(b,d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A)),b.stroke()):(b.begin(),l.moveSW(b,d,f,c,e,g,x,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.lineNWInner(b,d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),b.close(),b.fillAndStroke());b.begin();l.paintFolds(b,d,f,
-c,e,g,x,I,t,y,m,p,u,D,A);b.stroke()};Y.prototype.moveNW=function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==g&&"square"==l||!k?b.moveTo(0,0):b.moveTo(0,m)};Y.prototype.moveNE=function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==g&&"square"==l||!k?b.moveTo(c,0):b.moveTo(c-m,0)};Y.prototype.moveSE=function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==g&&"square"==l||!k?b.moveTo(c,e):b.moveTo(c,e-m)};Y.prototype.moveSW=function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==g&&"square"==l||!k?b.moveTo(0,e):
-b.moveTo(m,e)};Y.prototype.paintNW=function(b,d,f,c,e,l,g,m,k){if(k)if("rounded"==g||"default"==g&&"rounded"==l||"invRound"==g||"default"==g&&"invRound"==l){d=0;if("rounded"==g||"default"==g&&"rounded"==l)d=1;b.arcTo(m,m,0,0,d,m,0)}else("snip"==g||"default"==g&&"snip"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(m,0);else b.lineTo(0,0)};Y.prototype.paintTop=function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==g&&"square"==l||!k?b.lineTo(c,0):b.lineTo(c-m,0)};Y.prototype.paintNE=function(b,d,f,
-c,e,l,g,m,k){if(k)if("rounded"==g||"default"==g&&"rounded"==l||"invRound"==g||"default"==g&&"invRound"==l){d=0;if("rounded"==g||"default"==g&&"rounded"==l)d=1;b.arcTo(m,m,0,0,d,c,m)}else("snip"==g||"default"==g&&"snip"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(c,m);else b.lineTo(c,0)};Y.prototype.paintRight=function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==g&&"square"==l||!k?b.lineTo(c,e):b.lineTo(c,e-m)};Y.prototype.paintLeft=function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==g&&"square"==
-l||!k?b.lineTo(0,0):b.lineTo(0,m)};Y.prototype.paintSE=function(b,d,f,c,e,l,g,m,k){if(k)if("rounded"==g||"default"==g&&"rounded"==l||"invRound"==g||"default"==g&&"invRound"==l){d=0;if("rounded"==g||"default"==g&&"rounded"==l)d=1;b.arcTo(m,m,0,0,d,c-m,e)}else("snip"==g||"default"==g&&"snip"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(c-m,e);else b.lineTo(c,e)};Y.prototype.paintBottom=function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==g&&"square"==l||!k?b.lineTo(0,e):b.lineTo(m,e)};Y.prototype.paintSW=
-function(b,d,f,c,e,l,g,m,k){if(k)if("rounded"==g||"default"==g&&"rounded"==l||"invRound"==g||"default"==g&&"invRound"==l){d=0;if("rounded"==g||"default"==g&&"rounded"==l)d=1;b.arcTo(m,m,0,0,d,0,e-m)}else("snip"==g||"default"==g&&"snip"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(0,e-m);else b.lineTo(0,e)};Y.prototype.paintNWInner=function(b,d,f,c,e,l,g,m,k){if("rounded"==g||"default"==g&&"rounded"==l)b.arcTo(m-.5*k,m-.5*k,0,0,0,k,.5*k+m);else if("invRound"==g||"default"==g&&"invRound"==l)b.arcTo(m+
-k,m+k,0,0,1,k,k+m);else if("snip"==g||"default"==g&&"snip"==l)b.lineTo(k,.5*k+m);else if("fold"==g||"default"==g&&"fold"==l)b.lineTo(k+m,k+m),b.lineTo(k,k+m)};Y.prototype.paintTopInner=function(b,d,f,c,e,l,g,m,k,n,q){n||q?!n&&q?b.lineTo(0,k):n&&!q?b.lineTo(k,0):n?"square"==g||"default"==g&&"square"==l?b.lineTo(k,k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.lineTo(m+.5*k,k):b.lineTo(m+k,k):b.lineTo(0,k):b.lineTo(0,0)};Y.prototype.paintNEInner=function(b,d,f,c,e,
-l,g,m,k){if("rounded"==g||"default"==g&&"rounded"==l)b.arcTo(m-.5*k,m-.5*k,0,0,0,c-m-.5*k,k);else if("invRound"==g||"default"==g&&"invRound"==l)b.arcTo(m+k,m+k,0,0,1,c-m-k,k);else if("snip"==g||"default"==g&&"snip"==l)b.lineTo(c-m-.5*k,k);else if("fold"==g||"default"==g&&"fold"==l)b.lineTo(c-m-k,m+k),b.lineTo(c-m-k,k)};Y.prototype.paintRightInner=function(b,d,f,c,e,l,g,m,k,n,q){n||q?!n&&q?b.lineTo(c-k,0):n&&!q?b.lineTo(c,k):n?"square"==g||"default"==g&&"square"==l?b.lineTo(c-k,k):"rounded"==g||"default"==
-g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.lineTo(c-k,m+.5*k):b.lineTo(c-k,m+k):b.lineTo(c-k,0):b.lineTo(c,0)};Y.prototype.paintLeftInner=function(b,d,f,c,e,l,g,m,k,n,q){n||q?!n&&q?b.lineTo(k,e):n&&!q?b.lineTo(0,e-k):n?"square"==g||"default"==g&&"square"==l?b.lineTo(k,e-k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.lineTo(k,e-m-.5*k):b.lineTo(k,e-m-k):b.lineTo(k,e):b.lineTo(0,e)};Y.prototype.paintSEInner=function(b,d,f,c,e,l,g,m,k){if("rounded"==g||"default"==
-g&&"rounded"==l)b.arcTo(m-.5*k,m-.5*k,0,0,0,c-k,e-m-.5*k);else if("invRound"==g||"default"==g&&"invRound"==l)b.arcTo(m+k,m+k,0,0,1,c-k,e-m-k);else if("snip"==g||"default"==g&&"snip"==l)b.lineTo(c-k,e-m-.5*k);else if("fold"==g||"default"==g&&"fold"==l)b.lineTo(c-m-k,e-m-k),b.lineTo(c-k,e-m-k)};Y.prototype.paintBottomInner=function(b,d,f,c,e,l,g,m,k,n,q){n||q?!n&&q?b.lineTo(c,e-k):n&&!q?b.lineTo(c-k,e):"square"==g||"default"==g&&"square"==l||!n?b.lineTo(c-k,e-k):"rounded"==g||"default"==g&&"rounded"==
-l||"snip"==g||"default"==g&&"snip"==l?b.lineTo(c-m-.5*k,e-k):b.lineTo(c-m-k,e-k):b.lineTo(c,e)};Y.prototype.paintSWInner=function(b,d,f,c,e,l,g,m,k,n){if(!n)b.lineTo(k,e);else if("square"==g||"default"==g&&"square"==l)b.lineTo(k,e-k);else if("rounded"==g||"default"==g&&"rounded"==l)b.arcTo(m-.5*k,m-.5*k,0,0,0,m+.5*k,e-k);else if("invRound"==g||"default"==g&&"invRound"==l)b.arcTo(m+k,m+k,0,0,1,m+k,e-k);else if("snip"==g||"default"==g&&"snip"==l)b.lineTo(m+.5*k,e-k);else if("fold"==g||"default"==g&&
-"fold"==l)b.lineTo(k+m,e-m-k),b.lineTo(k+m,e-k)};Y.prototype.moveSWInner=function(b,d,f,c,e,l,g,m,k,n){n?"square"==g||"default"==g&&"square"==l?b.moveTo(k,e-k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.moveTo(k,e-m-.5*k):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.moveTo(k,e-m-k):b.moveTo(0,e-k)};Y.prototype.lineSWInner=function(b,d,f,c,e,l,g,m,k,n){n?"square"==g||"default"==g&&"square"==l?b.lineTo(k,e-k):"rounded"==g||"default"==
-g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.lineTo(k,e-m-.5*k):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(k,e-m-k):b.lineTo(0,e-k)};Y.prototype.moveSEInner=function(b,d,f,c,e,l,g,m,k,n){n?"square"==g||"default"==g&&"square"==l?b.moveTo(c-k,e-k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.moveTo(c-k,e-m-.5*k):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.moveTo(c-k,e-m-
-k):b.moveTo(c-k,e)};Y.prototype.lineSEInner=function(b,d,f,c,e,l,g,m,k,n){n?"square"==g||"default"==g&&"square"==l?b.lineTo(c-k,e-k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.lineTo(c-k,e-m-.5*k):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(c-k,e-m-k):b.lineTo(c-k,e)};Y.prototype.moveNEInner=function(b,d,f,c,e,l,g,m,k,n){n?"square"==g||"default"==g&&"square"==l||n?b.moveTo(c-k,k):"rounded"==g||"default"==g&&"rounded"==
-l||"snip"==g||"default"==g&&"snip"==l?b.moveTo(c-k,m+.5*k):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.moveTo(c-k,m+k):b.moveTo(c,k)};Y.prototype.lineNEInner=function(b,d,f,c,e,l,g,m,k,n){n?"square"==g||"default"==g&&"square"==l||n?b.lineTo(c-k,k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.lineTo(c-k,m+.5*k):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(c-k,m+k):b.lineTo(c,k)};
-Y.prototype.moveNWInner=function(b,d,f,c,e,l,g,m,k,n,q){n||q?!n&&q?b.moveTo(k,0):n&&!q?b.moveTo(0,k):"square"==g||"default"==g&&"square"==l?b.moveTo(k,k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.moveTo(k,m+.5*k):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.moveTo(k,m+k):b.moveTo(0,0)};Y.prototype.lineNWInner=function(b,d,f,c,e,l,g,k,m,n,q){n||q?!n&&q?b.lineTo(m,0):n&&!q?b.lineTo(0,m):"square"==g||"default"==g&&"square"==
-l?b.lineTo(m,m):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.lineTo(m,k+.5*m):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(m,k+m):b.lineTo(0,0)};Y.prototype.paintFolds=function(b,d,f,c,e,l,g,m,k,n,q,F,p,A,u){if("fold"==l||"fold"==g||"fold"==m||"fold"==k||"fold"==n)("fold"==g||"default"==g&&"fold"==l)&&F&&u&&(b.moveTo(0,q),b.lineTo(q,q),b.lineTo(q,0)),("fold"==m||"default"==m&&"fold"==l)&&F&&p&&(b.moveTo(c-q,0),b.lineTo(c-
-q,q),b.lineTo(c,q)),("fold"==k||"default"==k&&"fold"==l)&&A&&p&&(b.moveTo(c-q,e),b.lineTo(c-q,e-q),b.lineTo(c,e-q)),("fold"==n||"default"==n&&"fold"==l)&&A&&u&&(b.moveTo(0,e-q),b.lineTo(q,e-q),b.lineTo(q,e))};mxCellRenderer.registerShape(Y.prototype.cst.RECT2,Y);Y.prototype.constraints=null;mxUtils.extend(Fa,mxConnector);Fa.prototype.origPaintEdgeShape=Fa.prototype.paintEdgeShape;Fa.prototype.paintEdgeShape=function(b,d,f){for(var c=[],e=0;e<d.length;e++)c.push(mxUtils.clone(d[e]));var e=b.state.dashed,
-l=b.state.fixDash;Fa.prototype.origPaintEdgeShape.apply(this,[b,c,f]);3<=b.state.strokeWidth&&(c=mxUtils.getValue(this.style,"fillColor",null),null!=c&&(b.setStrokeColor(c),b.setStrokeWidth(b.state.strokeWidth-2),b.setDashed(e,l),Fa.prototype.origPaintEdgeShape.apply(this,[b,d,f])))};mxCellRenderer.registerShape("filledEdge",Fa);"undefined"!==typeof StyleFormatPanel&&function(){var b=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var d=this.format.getSelectionState(),
-f=b.apply(this,arguments);"umlFrame"==d.style.shape&&f.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return f}}();mxMarker.addMarker("dash",function(b,d,f,c,e,l,g,m,k,n){var q=e*(g+k+1),F=l*(g+k+1);return function(){b.begin();b.moveTo(c.x-q/2-F/2,c.y-F/2+q/2);b.lineTo(c.x+F/2-3*q/2,c.y-3*F/2-q/2);b.stroke()}});mxMarker.addMarker("box",function(b,d,f,c,e,l,g,m,k,n){var q=e*(g+k+1),F=l*(g+k+1),p=c.x+q/2,z=c.y+F/2;c.x-=q;c.y-=F;return function(){b.begin();
-b.moveTo(p-q/2-F/2,z-F/2+q/2);b.lineTo(p-q/2+F/2,z-F/2-q/2);b.lineTo(p+F/2-3*q/2,z-3*F/2-q/2);b.lineTo(p-F/2-3*q/2,z-3*F/2+q/2);b.close();n?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("cross",function(b,d,f,c,e,l,g,m,k,n){var q=e*(g+k+1),F=l*(g+k+1);return function(){b.begin();b.moveTo(c.x-q/2-F/2,c.y-F/2+q/2);b.lineTo(c.x+F/2-3*q/2,c.y-3*F/2-q/2);b.moveTo(c.x-q/2+F/2,c.y-F/2-q/2);b.lineTo(c.x-F/2-3*q/2,c.y-3*F/2+q/2);b.stroke()}});mxMarker.addMarker("circle",Ua);mxMarker.addMarker("circlePlus",
-function(b,d,f,c,e,l,g,k,m,n){var q=c.clone(),F=Ua.apply(this,arguments),p=e*(g+2*m),z=l*(g+2*m);return function(){F.apply(this,arguments);b.begin();b.moveTo(q.x-e*m,q.y-l*m);b.lineTo(q.x-2*p+e*m,q.y-2*z+l*m);b.moveTo(q.x-p-z+l*m,q.y-z+p-e*m);b.lineTo(q.x+z-p-l*m,q.y-z-p+e*m);b.stroke()}});mxMarker.addMarker("halfCircle",function(b,d,f,c,e,l,g,m,k,n){var q=e*(g+k+1),F=l*(g+k+1),p=c.clone();c.x-=q;c.y-=F;return function(){b.begin();b.moveTo(p.x-F,p.y+q);b.quadTo(c.x-F,c.y+q,c.x,c.y);b.quadTo(c.x+F,
-c.y-q,p.x+F,p.y-q);b.stroke()}});mxMarker.addMarker("async",function(b,d,f,c,e,l,g,m,k,n){d=e*k*1.118;f=l*k*1.118;e*=g+k;l*=g+k;var q=c.clone();q.x-=d;q.y-=f;c.x+=1*-e-d;c.y+=1*-l-f;return function(){b.begin();b.moveTo(q.x,q.y);m?b.lineTo(q.x-e-l/2,q.y-l+e/2):b.lineTo(q.x+l/2-e,q.y-l-e/2);b.lineTo(q.x-e,q.y-l);b.close();n?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("openAsync",function(b){b=null!=b?b:2;return function(d,f,c,e,l,g,m,k,n,q){l*=m+n;g*=m+n;var F=e.clone();return function(){d.begin();
-d.moveTo(F.x,F.y);k?d.lineTo(F.x-l-g/b,F.y-g+l/b):d.lineTo(F.x+g/b-l,F.y-g-l/b);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ya=function(b,d,f){return La(b,["width"],d,function(d,c,e,l,g){g=b.shape.getEdgeWidth()*b.view.scale+f;return new mxPoint(l.x+c*d/4+e*g/2,l.y+e*d/4-c*g/2)},function(d,c,e,l,g,m){d=Math.sqrt(mxUtils.ptSegDistSq(l.x,l.y,g.x,g.y,m.x,m.y));b.style.width=Math.round(2*d)/b.view.scale-f})},La=function(b,d,f,c,e){return ha(b,d,function(d){var e=b.absolutePoints,l=
-e.length-1;d=b.view.translate;var g=b.view.scale,m=f?e[0]:e[l],e=f?e[1]:e[l-1],l=e.x-m.x,k=e.y-m.y,n=Math.sqrt(l*l+k*k),m=c.call(this,n,l/n,k/n,m,e);return new mxPoint(m.x/g-d.x,m.y/g-d.y)},function(d,c,l){var g=b.absolutePoints,m=g.length-1;d=b.view.translate;var k=b.view.scale,n=f?g[0]:g[m],g=f?g[1]:g[m-1],m=g.x-n.x,q=g.y-n.y,F=Math.sqrt(m*m+q*q);c.x=(c.x+d.x)*k;c.y=(c.y+d.y)*k;e.call(this,F,m/F,q/F,n,g,c,l)})},Da=function(b){return function(d){return[ha(d,["arrowWidth","arrowSize"],function(d){var f=
-Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",aa.prototype.arrowWidth))),c=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",aa.prototype.arrowSize)));return new mxPoint(d.x+(1-c)*d.width,d.y+(1-f)*d.height/2)},function(d,f){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(d.y+d.height/2-f.y)/d.height*2));this.state.style.arrowSize=Math.max(0,Math.min(b,(d.x+d.width-f.x)/d.width))})]}},Za=function(b){return function(d){return[ha(d,["size"],function(d){var f=
-Math.max(0,Math.min(.5*d.height,parseFloat(mxUtils.getValue(this.state.style,"size",b))));return new mxPoint(d.x,d.y+f)},function(b,d){this.state.style.size=Math.max(0,d.y-b.y)},!0)]}},Ra=function(b,d,f){return function(c){var e=[ha(c,["size"],function(f){var c=Math.max(0,Math.min(f.width,Math.min(f.height,parseFloat(mxUtils.getValue(this.state.style,"size",d)))))*b;return new mxPoint(f.x+c,f.y+c)},function(d,f){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(d.width,f.x-d.x),Math.min(d.height,
-f.y-d.y)))/b)},!1)];f&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(Ca(c));return e}},Ma=function(b,d,f,c,e){f=null!=f?f:.5;return function(l){var g=[ha(l,["size"],function(d){var f=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,c=parseFloat(mxUtils.getValue(this.state.style,"size",f?e:b));return new mxPoint(d.x+Math.max(0,Math.min(.5*d.width,c*(f?1:d.width))),d.getCenterY())},function(b,d,c){b=null!=e&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?
-d.x-b.x:Math.max(0,Math.min(f,(d.x-b.x)/b.width));this.state.style.size=b},!1,c)];d&&mxUtils.getValue(l.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(Ca(l));return g}},Va=function(b,d,f){b=null!=b?b:.5;return function(c){var e=[ha(c,["size"],function(c){var e=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,l=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",e?f:d)));return new mxPoint(c.x+Math.min(.75*c.width*b,l*(e?.75:.75*c.width)),c.y+c.height/4)},function(d,c){var e=
-null!=f&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?c.x-d.x:Math.max(0,Math.min(b,(c.x-d.x)/d.width*.75));this.state.style.size=e},!1,!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(Ca(c));return e}},Ka=function(){return function(b){var d=[];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ca(b));return d}},Ca=function(b,d){return ha(b,[mxConstants.STYLE_ARCSIZE],function(f){var c=null!=d?d:f.height/8;if("1"==mxUtils.getValue(b.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,
-0)){var e=mxUtils.getValue(b.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(f.x+f.width-Math.min(f.width/2,e),f.y+c)}e=Math.max(0,parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(f.x+f.width-Math.min(Math.max(f.width/2,f.height/2),Math.min(f.width,f.height)*e),f.y+c)},function(d,f,c){"1"==mxUtils.getValue(b.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=
-Math.round(Math.max(0,Math.min(d.width,2*(d.x+d.width-f.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(d.width-f.x+d.x)/Math.min(d.width,d.height))))})},ha=function(b,d,f,c,e,l,g){var m=new mxHandle(b,null,mxVertexHandler.prototype.secondaryHandleImage);m.execute=function(b){for(var f=0;f<d.length;f++)this.copyStyle(d[f]);g&&g(b)};m.getPosition=f;m.setPosition=c;m.ignoreGrid=null!=e?e:!0;if(l){var k=m.positionChanged;m.positionChanged=function(){k.apply(this,
-arguments);b.view.invalidate(this.state.cell);b.view.validate()}}return m},Na={link:function(b){return[Ya(b,!0,10),Ya(b,!1,10)]},flexArrow:function(b){var d=b.view.graph.gridSize/b.view.scale,f=[];mxUtils.getValue(b.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(f.push(La(b,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,f,c,e,l){d=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;l=3*mxUtils.getNumber(b.style,mxConstants.STYLE_STARTSIZE,
-mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+f*(l+b.shape.strokewidth*b.view.scale)+c*d/2,e.y+c*(l+b.shape.strokewidth*b.view.scale)-f*d/2)},function(f,c,e,l,g,m,k){f=Math.sqrt(mxUtils.ptSegDistSq(l.x,l.y,g.x,g.y,m.x,m.y));c=mxUtils.ptLineDist(l.x,l.y,l.x+e,l.y-c,m.x,m.y);b.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-b.shape.strokewidth)/3)/100/b.view.scale;b.style.width=Math.round(2*f)/b.view.scale;mxEvent.isControlDown(k.getEvent())&&(b.style[mxConstants.STYLE_ENDSIZE]=
-b.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(b.style[mxConstants.STYLE_STARTSIZE])-parseFloat(b.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE])})),f.push(La(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,f,c,e,l){d=(b.shape.getStartArrowWidth()-b.shape.strokewidth)*b.view.scale;l=3*mxUtils.getNumber(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
-5)*b.view.scale;return new mxPoint(e.x+f*(l+b.shape.strokewidth*b.view.scale)+c*d/2,e.y+c*(l+b.shape.strokewidth*b.view.scale)-f*d/2)},function(f,c,e,l,g,m,k){f=Math.sqrt(mxUtils.ptSegDistSq(l.x,l.y,g.x,g.y,m.x,m.y));c=mxUtils.ptLineDist(l.x,l.y,l.x+e,l.y-c,m.x,m.y);b.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-b.shape.strokewidth)/3)/100/b.view.scale;b.style.startWidth=Math.max(0,Math.round(2*f)-b.shape.getEdgeWidth())/b.view.scale;mxEvent.isControlDown(k.getEvent())&&(b.style[mxConstants.STYLE_ENDSIZE]=
-b.style[mxConstants.STYLE_STARTSIZE],b.style.endWidth=b.style.startWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(b.style[mxConstants.STYLE_STARTSIZE])-parseFloat(b.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(b.style.startWidth)-parseFloat(b.style.endWidth))<d&&(b.style.startWidth=b.style.endWidth))})));mxUtils.getValue(b.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(f.push(La(b,
-["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(d,f,c,e,l){d=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;l=3*mxUtils.getNumber(b.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+f*(l+b.shape.strokewidth*b.view.scale)-c*d/2,e.y+c*(l+b.shape.strokewidth*b.view.scale)+f*d/2)},function(f,c,e,l,g,m,k){f=Math.sqrt(mxUtils.ptSegDistSq(l.x,l.y,g.x,g.y,m.x,m.y));c=mxUtils.ptLineDist(l.x,l.y,l.x+e,l.y-c,m.x,m.y);b.style[mxConstants.STYLE_ENDSIZE]=
-Math.round(100*(c-b.shape.strokewidth)/3)/100/b.view.scale;b.style.width=Math.round(2*f)/b.view.scale;mxEvent.isControlDown(k.getEvent())&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(b.style[mxConstants.STYLE_ENDSIZE])-parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<d/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE])})),f.push(La(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
-!1,function(d,f,c,e,l){d=(b.shape.getEndArrowWidth()-b.shape.strokewidth)*b.view.scale;l=3*mxUtils.getNumber(b.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+f*(l+b.shape.strokewidth*b.view.scale)-c*d/2,e.y+c*(l+b.shape.strokewidth*b.view.scale)+f*d/2)},function(f,c,e,l,g,m,k){f=Math.sqrt(mxUtils.ptSegDistSq(l.x,l.y,g.x,g.y,m.x,m.y));c=mxUtils.ptLineDist(l.x,l.y,l.x+e,l.y-c,m.x,m.y);b.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-b.shape.strokewidth)/
-3)/100/b.view.scale;b.style.endWidth=Math.max(0,Math.round(2*f)-b.shape.getEdgeWidth())/b.view.scale;mxEvent.isControlDown(k.getEvent())&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE],b.style.startWidth=b.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(b.style[mxConstants.STYLE_ENDSIZE])-parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<d/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(b.style.endWidth)-
-parseFloat(b.style.startWidth))<d&&(b.style.endWidth=b.style.startWidth))})));return f},swimlane:function(b){var d=[];if(mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED)){var f=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));d.push(Ca(b,f/2))}d.push(ha(b,[mxConstants.STYLE_STARTSIZE],function(d){var f=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,
-1)?new mxPoint(d.getCenterX(),d.y+Math.max(0,Math.min(d.height,f))):new mxPoint(d.x+Math.max(0,Math.min(d.width,f)),d.getCenterY())},function(d,f){b.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(d.height,f.y-d.y))):Math.round(Math.max(0,Math.min(d.width,f.x-d.x)))},!1,null,function(d){if(mxEvent.isControlDown(d.getEvent())&&(d=b.view.graph,d.isTableRow(b.cell)||d.isTableCell(b.cell))){for(var f=d.getSwimlaneDirection(b.style),
-c=d.model.getParent(b.cell),c=d.model.getChildCells(c,!0),e=[],l=0;l<c.length;l++)c[l]!=b.cell&&d.isSwimlane(c[l])&&d.getSwimlaneDirection(d.getCurrentCellStyle(c[l]))==f&&e.push(c[l]);d.setCellStyles(mxConstants.STYLE_STARTSIZE,b.style[mxConstants.STYLE_STARTSIZE],e)}}));return d},label:Ka(),ext:Ka(),rectangle:Ka(),triangle:Ka(),rhombus:Ka(),umlLifeline:function(b){return[ha(b,["size"],function(b){var d=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",S.prototype.size))));
-return new mxPoint(b.getCenterX(),b.y+d)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},umlFrame:function(b){return[ha(b,["width","height"],function(b){var d=Math.max(Z.prototype.corner,Math.min(b.width,mxUtils.getValue(this.state.style,"width",Z.prototype.width))),f=Math.max(1.5*Z.prototype.corner,Math.min(b.height,mxUtils.getValue(this.state.style,"height",Z.prototype.height)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.width=
-Math.round(Math.max(Z.prototype.corner,Math.min(b.width,d.x-b.x)));this.state.style.height=Math.round(Math.max(1.5*Z.prototype.corner,Math.min(b.height,d.y-b.y)))},!1)]},process:function(b){var d=[ha(b,["size"],function(b){var d="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),f=parseFloat(mxUtils.getValue(this.state.style,"size",H.prototype.size));return d?new mxPoint(b.x+f,b.y+b.height/4):new mxPoint(b.x+b.width*f,b.y+b.height/4)},function(b,d){var f="0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0")?Math.max(0,Math.min(.5*b.width,d.x-b.x)):Math.max(0,Math.min(.5,(d.x-b.x)/b.width));this.state.style.size=f},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ca(b));return d},cross:function(b){return[ha(b,["size"],function(b){var d=Math.min(b.width,b.height),d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",va.prototype.size)))*d/2;return new mxPoint(b.getCenterX()-d,b.getCenterY()-d)},function(b,d){var f=Math.min(b.width,b.height);this.state.style.size=
-Math.max(0,Math.min(1,Math.min(Math.max(0,b.getCenterY()-d.y)/f*2,Math.max(0,b.getCenterX()-d.x)/f*2)))})]},note:function(b){return[ha(b,["size"],function(b){var d=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size)))));return new mxPoint(b.x+b.width-d,b.y+d)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,b.x+b.width-d.x),Math.min(b.height,d.y-b.y))))})]},note2:function(b){return[ha(b,["size"],function(b){var f=
-Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size)))));return new mxPoint(b.x+b.width-f,b.y+f)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,b.x+b.width-d.x),Math.min(b.height,d.y-b.y))))})]},manualInput:function(b){var d=[ha(b,["size"],function(b){var d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",ea.prototype.size)));return new mxPoint(b.x+b.width/4,b.y+3*d/4)},function(b,
-d){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,4*(d.y-b.y)/3)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ca(b));return d},dataStorage:function(b){return[ha(b,["size"],function(b){var d="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),f=parseFloat(mxUtils.getValue(this.state.style,"size",d?sa.prototype.fixedSize:sa.prototype.size));return new mxPoint(b.x+b.width-f*(d?1:b.width),b.getCenterY())},function(b,d){var f="0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0")?Math.max(0,Math.min(b.width,b.x+b.width-d.x)):Math.max(0,Math.min(1,(b.x+b.width-d.x)/b.width));this.state.style.size=f},!1)]},callout:function(b){var d=[ha(b,["size","position"],function(b){var d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",B.prototype.size))),f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",B.prototype.position)));mxUtils.getValue(this.state.style,"base",B.prototype.base);return new mxPoint(b.x+f*b.width,b.y+b.height-
-d)},function(b,d){mxUtils.getValue(this.state.style,"base",B.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(b.height,b.y+b.height-d.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(d.x-b.x)/b.width)))/100},!1),ha(b,["position2"],function(b){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",B.prototype.position2)));return new mxPoint(b.x+d*b.width,b.y+b.height)},function(b,d){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
-(d.x-b.x)/b.width)))/100},!1),ha(b,["base"],function(b){var d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",B.prototype.size))),f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",B.prototype.position))),c=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"base",B.prototype.base)));return new mxPoint(b.x+Math.min(b.width,f*b.width+c),b.y+b.height-d)},function(b,d){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",B.prototype.position)));
-this.state.style.base=Math.round(Math.max(0,Math.min(b.width,d.x-b.x-f*b.width)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ca(b));return d},internalStorage:function(b){var d=[ha(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",ja.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",ja.prototype.dy)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.dx=Math.round(Math.max(0,
-Math.min(b.width,d.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ca(b));return d},module:function(b){return[ha(b,["jettyWidth","jettyHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"jettyWidth",W.prototype.jettyWidth))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"jettyHeight",W.prototype.jettyHeight)));return new mxPoint(b.x+d/2,b.y+
-2*f)},function(b,d){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(b.width,d.x-b.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(b.height,d.y-b.y))/2)})]},corner:function(b){return[ha(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",ra.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",ra.prototype.dy)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.dx=Math.round(Math.max(0,
-Math.min(b.width,d.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},tee:function(b){return[ha(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",ka.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",ka.prototype.dy)));return new mxPoint(b.x+(b.width+d)/2,b.y+f)},function(b,d){this.state.style.dx=Math.round(Math.max(0,2*Math.min(b.width/2,d.x-b.x-b.width/2)));this.state.style.dy=
-Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},singleArrow:Da(1),doubleArrow:Da(.5),folder:function(b){return[ha(b,["tabWidth","tabHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"tabWidth",n.prototype.tabWidth))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"tabHeight",n.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",n.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(d=b.width-d);return new mxPoint(b.x+
-d,b.y+f)},function(b,d){var f=Math.max(0,Math.min(b.width,d.x-b.x));mxUtils.getValue(this.state.style,"tabPosition",n.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(f=b.width-f);this.state.style.tabWidth=Math.round(f);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},document:function(b){return[ha(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",x.prototype.size))));return new mxPoint(b.x+3*b.width/4,b.y+(1-
-d)*b.height)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(b.y+b.height-d.y)/b.height))},!1)]},tape:function(b){return[ha(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",y.prototype.size))));return new mxPoint(b.getCenterX(),b.y+d*b.height/2)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(d.y-b.y)/b.height*2))},!1)]},isoCube2:function(b){return[ha(b,["isoAngle"],function(b){var d=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,
-"isoAngle",f.isoAngle))))*Math.PI/200;return new mxPoint(b.x,b.y+Math.min(b.width*Math.tan(d),.5*b.height))},function(b,d){this.state.style.isoAngle=Math.max(0,50*(d.y-b.y)/b.height)},!0)]},cylinder2:Za(l.prototype.size),cylinder3:Za(m.prototype.size),offPageConnector:function(b){return[ha(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ba.prototype.size))));return new mxPoint(b.getCenterX(),b.y+(1-d)*b.height)},function(b,d){this.state.style.size=
-Math.max(0,Math.min(1,(b.y+b.height-d.y)/b.height))},!1)]},"mxgraph.basic.rect":function(b){var d=[Graph.createHandle(b,["size"],function(b){var d=Math.max(0,Math.min(b.width/2,b.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(b.x+d,b.y+d)},function(b,d){this.state.style.size=Math.round(100*Math.max(0,Math.min(b.height/2,b.width/2,d.x-b.x)))/100})];b=Graph.createHandle(b,["indent"],function(b){var d=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,
-"indent",this.dx2))));return new mxPoint(b.x+.75*b.width,b.y+d*b.height/200)},function(b,d){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(d.y-b.y)/b.height)))/100});d.push(b);return d},step:Ma(M.prototype.size,!0,null,!0,M.prototype.fixedSize),hexagon:Ma(P.prototype.size,!0,.5,!0,P.prototype.fixedSize),curlyBracket:Ma(E.prototype.size,!1),display:Ma(Aa.prototype.size,!1),cube:Ra(1,c.prototype.size,!1),card:Ra(.5,v.prototype.size,!0),loopLimit:Ra(.5,ta.prototype.size,!0),trapezoid:Va(.5,
-C.prototype.size,C.prototype.fixedSize),parallelogram:Va(1,G.prototype.size,G.prototype.fixedSize)};Graph.createHandle=ha;Graph.handleFactory=Na;var eb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=eb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&null==mxStencilRegistry.getStencil(d)?d=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&
-(d=mxConstants.SHAPE_SWIMLANE);d=Na[d];null==d&&null!=this.state.shape&&this.state.shape.isRoundable()&&(d=Na[mxConstants.SHAPE_RECTANGLE]);null!=d&&(d=d(this.state),null!=d&&(b=null==b?d:b.concat(d)))}return b};mxEdgeHandler.prototype.createCustomHandles=function(){var b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)&&(b=mxConstants.SHAPE_CONNECTOR);b=Na[b];return null!=b?b(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory=
-{};var Oa=new mxPoint(1,0),Pa=new mxPoint(1,0),Da=mxUtils.toRadians(-30),Oa=mxUtils.getRotatedPoint(Oa,Math.cos(Da),Math.sin(Da)),Da=mxUtils.toRadians(-150),Pa=mxUtils.getRotatedPoint(Pa,Math.cos(Da),Math.sin(Da));mxEdgeStyle.IsometricConnector=function(b,d,f,c,e){var l=b.view;c=null!=c&&0<c.length?c[0]:null;var g=b.absolutePoints,m=g[0],g=g[g.length-1];null!=c&&(c=l.transformControlPoint(b,c));null==m&&null!=d&&(m=new mxPoint(d.getCenterX(),d.getCenterY()));null==g&&null!=f&&(g=new mxPoint(f.getCenterX(),
-f.getCenterY()));var k=Oa.x,n=Oa.y,q=Pa.x,F=Pa.y,p="horizontal"==mxUtils.getValue(b.style,"elbow","horizontal");if(null!=g&&null!=m){b=function(b,d,f){b-=A.x;var c=d-A.y;d=(F*b-q*c)/(k*F-n*q);b=(n*b-k*c)/(n*q-k*F);p?(f&&(A=new mxPoint(A.x+k*d,A.y+n*d),e.push(A)),A=new mxPoint(A.x+q*b,A.y+F*b)):(f&&(A=new mxPoint(A.x+q*b,A.y+F*b),e.push(A)),A=new mxPoint(A.x+k*d,A.y+n*d));e.push(A)};var A=m;null==c&&(c=new mxPoint(m.x+(g.x-m.x)/2,m.y+(g.y-m.y)/2));b(c.x,c.y,!0);b(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",
-mxEdgeStyle.IsometricConnector);var fb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(b,d){if(d==mxEdgeStyle.IsometricConnector){var f=new mxElbowEdgeHandler(b);f.snapToTerminals=!1;return f}return fb.apply(this,arguments)};k.prototype.constraints=[];g.prototype.getConstraints=function(b,d,f){b=[];var c=Math.tan(mxUtils.toRadians(30)),e=(.5-c)/2,c=Math.min(d,f/(.5+c));d=(d-c)/2;f=(f-c)/2;b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f+.25*c));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,d+.5*c,f+c*e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,f+.25*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,f+.75*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+.5*c,f+(1-e)*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f+.75*c));return b};f.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,c=Math.min(d*
-Math.tan(c),.5*f);b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f-c));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
-0,c));return b};B.prototype.getConstraints=function(b,d,f){b=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1));b.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f-c)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,
-f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-c)));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
-.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
-0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Ha.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=
-mxRectangleShape.prototype.constraints;T.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;t.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
-null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f+c)));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,
-0),!1));return b};v.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.5*(f+c)));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};c.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f+c)));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),f));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,c,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-c)));return b};m.prototype.getConstraints=function(b,d,f){b=[];d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,
-1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,d));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-d));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-d));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d+.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,d+.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1,null,0,f-d-.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-d-.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-d));b.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-d));return b};n.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,
-"tabWidth",this.tabWidth)))),e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(b.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
-.5*(d+c),e))):(b.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.25*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,d,.5*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.75*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,f));b.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return b};ja.prototype.constraints=mxRectangleShape.prototype.constraints;sa.prototype.constraints=mxRectangleShape.prototype.constraints;xa.prototype.constraints=mxEllipse.prototype.constraints;ua.prototype.constraints=mxEllipse.prototype.constraints;ya.prototype.constraints=mxEllipse.prototype.constraints;wa.prototype.constraints=
-mxEllipse.prototype.constraints;ea.prototype.constraints=mxRectangleShape.prototype.constraints;za.prototype.constraints=mxRectangleShape.prototype.constraints;Aa.prototype.getConstraints=function(b,d,f){b=[];var c=Math.min(d,f/2),e=Math.min(d-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
-.5*(e+d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+d-c),f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));return b};W.prototype.getConstraints=function(b,d,f){d=parseFloat(mxUtils.getValue(b,"jettyWidth",W.prototype.jettyWidth))/2;b=parseFloat(mxUtils.getValue(b,
-"jettyHeight",W.prototype.jettyHeight));var c=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,d),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,d),
-new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(f-.5*b,1.5*b)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(f-.5*b,3.5*b))];f>5*b&&c.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,d));f>8*b&&c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,d));f>15*
-b&&c.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,d));return c};ta.prototype.constraints=mxRectangleShape.prototype.constraints;ba.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
-.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];F.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,
-1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];fa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,
-.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,
-.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,
-.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,
-1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
-.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ma.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,
-1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=
-[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),
-new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
-.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];G.prototype.constraints=mxRectangleShape.prototype.constraints;C.prototype.constraints=mxRectangleShape.prototype.constraints;x.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+g=z.model.getChildCells(this.state.cell,!0);if(0<g.length){var k="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),m="0"!=mxUtils.getValue(this.state.style,"columnLines","1"),oa=z.getCellGeometry(g[0]),pa=[{y:null!=oa?oa.y+oa.height:0,cells:z.model.getChildCells(g[0],!0)}];if(k)for(k=1;k<g.length;k++){var oa=z.getCellGeometry(g[k]),q={y:0,cells:z.model.getChildCells(g[k],!0)};pa.push(q);null!=oa&&(q.y=oa.y+oa.height,b.begin(),b.moveTo(d+l.x,f+oa.y),b.lineTo(d+c-l.width,f+oa.y),b.end(),b.stroke())}if(m)for(c=
+z.model.getChildCells(g[0],!0),k=1;k<c.length;k++)if(oa=z.getCellGeometry(c[k]),null!=oa){b.begin();b.moveTo(d+oa.x+l.x,f+l.y);for(m=g=0;m<pa.length;m++)q=pa[m],null!=q&&(z.model.isVisible(q.cells[k])?g=q.y:(0<g&&b.lineTo(d+oa.x+l.x,f+g-l.height),b.moveTo(d+oa.x+l.x,f+q.y),g=0));b.lineTo(d+oa.x+l.x,f+e-l.height);b.end();b.stroke()}}};mxCellRenderer.registerShape("table",b);mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.darkOpacity=0;c.prototype.darkOpacity2=0;c.prototype.paintVertexShape=
+function(b,d,f,c,e){var z=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),l=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));b.translate(d,f);b.begin();b.moveTo(0,0);b.lineTo(c-z,0);b.lineTo(c,z);b.lineTo(c,e);b.lineTo(z,e);b.lineTo(0,e-z);b.lineTo(0,0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),
+0!=l&&(b.setFillAlpha(Math.abs(l)),b.setFillColor(0>l?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(c-z,0),b.lineTo(c,z),b.lineTo(z,z),b.close(),b.fill()),0!=g&&(b.setFillAlpha(Math.abs(g)),b.setFillColor(0>g?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(z,z),b.lineTo(z,e),b.lineTo(0,e-z),b.close(),b.fill()),b.begin(),b.moveTo(z,e),b.lineTo(z,z),b.lineTo(0,0),b.moveTo(z,z),b.lineTo(c,z),b.end(),b.stroke())};c.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,
+"boundedLbl",!1)?(b=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(b,b,0,0)):null};mxCellRenderer.registerShape("cube",c);var Qa=Math.tan(mxUtils.toRadians(30)),Ha=(.5-Qa)/2;mxCellRenderer.registerShape("isoRectangle",k);mxUtils.extend(e,mxCylinder);e.prototype.size=6;e.prototype.paintVertexShape=function(b,d,f,c,e){b.setFillColor(this.stroke);var z=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;b.ellipse(d+.5*(c-z),
+f+.5*(e-z),z,z);b.fill();b.setFillColor(mxConstants.NONE);b.rect(d,f,c,e);b.fill()};mxCellRenderer.registerShape("waypoint",e);mxUtils.extend(k,mxActor);k.prototype.size=20;k.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/Qa);b.translate((c-d)/2,(e-d)/2+d/4);b.moveTo(0,.25*d);b.lineTo(.5*d,d*Ha);b.lineTo(d,.25*d);b.lineTo(.5*d,(.5-Ha)*d);b.lineTo(0,.25*d);b.close();b.end()};mxCellRenderer.registerShape("isoRectangle",k);mxUtils.extend(g,mxCylinder);g.prototype.size=20;g.prototype.redrawPath=
+function(b,d,f,c,e,l){d=Math.min(c,e/(.5+Qa));l?(b.moveTo(0,.25*d),b.lineTo(.5*d,(.5-Ha)*d),b.lineTo(d,.25*d),b.moveTo(.5*d,(.5-Ha)*d),b.lineTo(.5*d,(1-Ha)*d)):(b.translate((c-d)/2,(e-d)/2),b.moveTo(0,.25*d),b.lineTo(.5*d,d*Ha),b.lineTo(d,.25*d),b.lineTo(d,.75*d),b.lineTo(.5*d,(1-Ha)*d),b.lineTo(0,.75*d),b.close());b.end()};mxCellRenderer.registerShape("isoCube",g);mxUtils.extend(p,mxCylinder);p.prototype.redrawPath=function(b,d,f,c,e,l){d=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(l&&null!=
+this.fill||!l&&null==this.fill)b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),l||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),l||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),l||(b.stroke(),b.begin()),b.translate(0,-d);l||(b.moveTo(0,d),b.curveTo(0,-d/3,c,-d/3,c,d),b.lineTo(c,e-d),b.curveTo(c,e+d/3,0,e+d/3,0,e-d),b.close())};p.prototype.getLabelMargins=function(b){return new mxRectangle(0,2.5*Math.min(b.height/2,Math.round(b.height/
+8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",p);mxUtils.extend(t,mxCylinder);t.prototype.size=30;t.prototype.darkOpacity=0;t.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),l=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));b.translate(d,f);b.begin();b.moveTo(0,0);b.lineTo(c-z,0);b.lineTo(c,z);b.lineTo(c,e);b.lineTo(0,e);b.lineTo(0,
+0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),0!=l&&(b.setFillAlpha(Math.abs(l)),b.setFillColor(0>l?"#FFFFFF":"#000000"),b.begin(),b.moveTo(c-z,0),b.lineTo(c-z,z),b.lineTo(c,z),b.close(),b.fill()),b.begin(),b.moveTo(c-z,0),b.lineTo(c-z,z),b.lineTo(c,z),b.end(),b.stroke())};mxCellRenderer.registerShape("note",t);mxUtils.extend(d,t);mxCellRenderer.registerShape("note2",d);d.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,
+"size",15);return new mxRectangle(0,Math.min(b.height*this.scale,d*this.scale),0,0)}return null};mxUtils.extend(f,mxShape);f.prototype.isoAngle=15;f.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,z=Math.min(c*Math.tan(z),.5*e);b.translate(d,f);b.begin();b.moveTo(.5*c,0);b.lineTo(c,z);b.lineTo(c,e-z);b.lineTo(.5*c,e);b.lineTo(0,e-z);b.lineTo(0,z);b.close();b.fillAndStroke();b.setShadow(!1);
+b.begin();b.moveTo(0,z);b.lineTo(.5*c,2*z);b.lineTo(c,z);b.moveTo(.5*c,2*z);b.lineTo(.5*c,e);b.stroke()};mxCellRenderer.registerShape("isoCube2",f);mxUtils.extend(l,mxShape);l.prototype.size=15;l.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.translate(d,f);0==z?(b.rect(0,0,c,e),b.fillAndStroke()):(b.begin(),b.moveTo(0,z),b.arcTo(.5*c,z,0,0,1,.5*c,0),b.arcTo(.5*c,z,0,0,1,c,z),b.lineTo(c,e-z),b.arcTo(.5*c,
+z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),b.begin(),b.moveTo(c,z),b.arcTo(.5*c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke())};mxCellRenderer.registerShape("cylinder2",l);mxUtils.extend(m,mxCylinder);m.prototype.size=15;m.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),l=mxUtils.getValue(this.style,"lid",!0);b.translate(d,f);0==z?(b.rect(0,0,c,e),b.fillAndStroke()):
+(b.begin(),l?(b.moveTo(0,z),b.arcTo(.5*c,z,0,0,1,.5*c,0),b.arcTo(.5*c,z,0,0,1,c,z)):(b.moveTo(0,0),b.arcTo(.5*c,z,0,0,0,.5*c,z),b.arcTo(.5*c,z,0,0,0,c,0)),b.lineTo(c,e-z),b.arcTo(.5*c,z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),l&&(b.begin(),b.moveTo(c,z),b.arcTo(.5*c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke()))};mxCellRenderer.registerShape("cylinder3",m);mxUtils.extend(q,mxActor);q.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c/
+2,.5*e,c,0);b.quadTo(.5*c,e/2,c,e);b.quadTo(c/2,.5*e,0,e);b.quadTo(.5*c,e/2,0,0);b.end()};mxCellRenderer.registerShape("switch",q);mxUtils.extend(n,mxCylinder);n.prototype.tabWidth=60;n.prototype.tabHeight=20;n.prototype.tabPosition="right";n.prototype.arcSize=.1;n.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));
+var z=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),l=mxUtils.getValue(this.style,"rounded",!1),g=mxUtils.getValue(this.style,"absoluteArcSize",!1),k=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));g||(k*=Math.min(c,e));k=Math.min(k,.5*c,.5*(e-f));d=Math.max(d,k);d=Math.min(c-k,d);l||(k=0);b.begin();"left"==z?(b.moveTo(Math.max(k,0),f),b.lineTo(Math.max(k,0),0),b.lineTo(d,0),b.lineTo(d,f)):(b.moveTo(c-d,f),b.lineTo(c-d,0),b.lineTo(c-Math.max(k,0),0),b.lineTo(c-Math.max(k,
+0),f));l?(b.moveTo(0,k+f),b.arcTo(k,k,0,0,1,k,f),b.lineTo(c-k,f),b.arcTo(k,k,0,0,1,c,k+f),b.lineTo(c,e-k),b.arcTo(k,k,0,0,1,c-k,e),b.lineTo(k,e),b.arcTo(k,k,0,0,1,0,e-k)):(b.moveTo(0,f),b.lineTo(c,f),b.lineTo(c,e),b.lineTo(0,e));b.close();b.fillAndStroke();b.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(b.begin(),b.moveTo(c-30,f+20),b.lineTo(c-20,f+10),b.lineTo(c-10,f+20),b.close(),b.stroke())};mxCellRenderer.registerShape("folder",n);n.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,
+"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var f=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,c=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(z*=Math.min(b.width,b.height));z=Math.min(z,.5*b.width,.5*(b.height-d));c||(z=0);return"left"==
+mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(b.width,b.width-f),Math.min(b.height,b.height-d)):new mxRectangle(Math.min(b.width,b.width-f),0,z,Math.min(b.height,b.height-d))}return new mxRectangle(0,Math.min(b.height,d),0,0)}return null};mxUtils.extend(u,mxCylinder);u.prototype.arcSize=.1;u.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);var z=mxUtils.getValue(this.style,"rounded",!1),l=mxUtils.getValue(this.style,"absoluteArcSize",!1);d=
+parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));f=mxUtils.getValue(this.style,"umlStateConnection",null);l||(d*=Math.min(c,e));d=Math.min(d,.5*c,.5*e);z||(d=0);z=0;null!=f&&(z=10);b.begin();b.moveTo(z,d);b.arcTo(d,d,0,0,1,z+d,0);b.lineTo(c-d,0);b.arcTo(d,d,0,0,1,c,d);b.lineTo(c,e-d);b.arcTo(d,d,0,0,1,c-d,e);b.lineTo(z+d,e);b.arcTo(d,d,0,0,1,z,e-d);b.close();b.fillAndStroke();b.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(b.roundrect(c-40,e-20,
+10,10,3,3),b.stroke(),b.roundrect(c-20,e-20,10,10,3,3),b.stroke(),b.begin(),b.moveTo(c-30,e-15),b.lineTo(c-20,e-15),b.stroke());"connPointRefEntry"==f?(b.ellipse(0,.5*e-10,20,20),b.fillAndStroke()):"connPointRefExit"==f&&(b.ellipse(0,.5*e-10,20,20),b.fillAndStroke(),b.begin(),b.moveTo(5,.5*e-5),b.lineTo(15,.5*e+5),b.moveTo(15,.5*e-5),b.lineTo(5,.5*e+5),b.stroke())};u.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",
+null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",u);mxUtils.extend(v,mxActor);v.prototype.size=30;v.prototype.isRoundable=function(){return!0};v.prototype.redrawPath=function(b,d,f,c,e){d=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c,e),new mxPoint(0,e),new mxPoint(0,
+d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("card",v);mxUtils.extend(y,mxActor);y.prototype.size=.4;y.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(0,d/2);b.quadTo(c/4,1.4*d,c/2,d/2);b.quadTo(3*c/4,d*(1-1.4),c,d/2);b.lineTo(c,e-d/2);b.quadTo(3*c/4,e-1.4*d,c/2,e-d/2);b.quadTo(c/4,e-d*(1-1.4),0,e-d/2);b.lineTo(0,d/2);b.close();b.end()};y.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.style,
+"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",this.size),f=b.width,c=b.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return d*=c,new mxRectangle(b.x,b.y+d,f,c-2*d);d*=f;return new mxRectangle(b.x+d,b.y,f-2*d,c)}return b};mxCellRenderer.registerShape("tape",y);mxUtils.extend(x,mxActor);x.prototype.size=.3;x.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,
+0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*b.height):null};x.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(0,0);b.lineTo(c,0);b.lineTo(c,e-d/2);b.quadTo(3*c/4,e-1.4*d,c/2,e-d/2);b.quadTo(c/4,e-d*(1-1.4),0,e-d/2);b.lineTo(0,d/2);b.close();b.end()};mxCellRenderer.registerShape("document",x);var $a=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(b,d,f,c){var e=
+mxUtils.getValue(this.style,"size");return null!=e?c*Math.max(0,Math.min(1,e)):$a.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,b.height*d),0,0)}return null};m.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,
+"lid",!0)||(d/=2);return new mxRectangle(0,Math.min(b.height*this.scale,2*d*this.scale),0,Math.max(0,.3*d*this.scale))}return null};n.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var f=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,c=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,
+"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(z*=Math.min(b.width,b.height));z=Math.min(z,.5*b.width,.5*(b.height-d));c||(z=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(b.width,b.width-f),Math.min(b.height,b.height-d)):new mxRectangle(Math.min(b.width,b.width-f),0,z,Math.min(b.height,b.height-d))}return new mxRectangle(0,Math.min(b.height,d),0,0)}return null};u.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,
+"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};d.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(b.height*this.scale,d*this.scale),0,Math.max(0,d*this.scale))}return null};mxUtils.extend(E,mxActor);E.prototype.size=.2;E.prototype.fixedSize=20;E.prototype.isRoundable=function(){return!0};E.prototype.redrawPath=
+function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c-d,e)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("parallelogram",E);mxUtils.extend(C,
+mxActor);C.prototype.size=.2;C.prototype.fixedSize=20;C.prototype.isRoundable=function(){return!0};C.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(d,
+0),new mxPoint(c-d,0),new mxPoint(c,e)],this.isRounded,f,!0)};mxCellRenderer.registerShape("trapezoid",C);mxUtils.extend(F,mxActor);F.prototype.size=.5;F.prototype.redrawPath=function(b,d,f,c,e){b.setFillColor(null);d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,e/2),new mxPoint(0,e/2),new mxPoint(d,e/2),new mxPoint(d,
+e),new mxPoint(c,e)],this.isRounded,f,!1);b.end()};mxCellRenderer.registerShape("curlyBracket",F);mxUtils.extend(I,mxActor);I.prototype.redrawPath=function(b,d,f,c,e){b.setStrokeWidth(1);b.setFillColor(this.stroke);d=c/5;b.rect(0,0,d,e);b.fillAndStroke();b.rect(2*d,0,d,e);b.fillAndStroke();b.rect(4*d,0,d,e);b.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",I);L.prototype.moveTo=function(b,d){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d;this.firstX=b;this.firstY=
+d};L.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};L.prototype.quadTo=function(b,d,f,c){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=c};L.prototype.curveTo=function(b,d,f,c,e,l){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=l};L.prototype.arcTo=function(b,d,f,c,e,l,g){this.originalArcTo.apply(this.canvas,
+arguments);this.lastX=l;this.lastY=g};L.prototype.lineTo=function(b,d){if(null!=this.lastX&&null!=this.lastY){var f=function(b){return"number"===typeof b?b?0>b?-1:1:b===b?0:NaN:NaN},c=Math.abs(b-this.lastX),e=Math.abs(d-this.lastY),z=Math.sqrt(c*c+e*e);if(2>z){this.originalLineTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d;return}var l=Math.round(z/10),g=this.defaultVariation;5>l&&(l=5,g/=3);for(var k=f(b-this.lastX)*c/l,f=f(d-this.lastY)*e/l,c=c/z,e=e/z,z=0;z<l;z++){var m=(Math.random()-
+.5)*g;this.originalLineTo.call(this.canvas,k*z+this.lastX-m*e,f*z+this.lastY-m*c)}this.originalLineTo.call(this.canvas,b,d)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d};L.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=
+1.5;var ab=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(b){ab.apply(this,arguments);null==b.handJiggle&&(b.handJiggle=this.createHandJiggle(b))};var bb=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(b){bb.apply(this,arguments);null!=b.handJiggle&&(b.handJiggle.destroy(),delete b.handJiggle)};mxShape.prototype.createComicCanvas=function(b){return new L(b,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(b){return this.outline||
+null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(b)};mxRhombus.prototype.defaultJiggle=2;var cb=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&cb.apply(this,arguments)};var db=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=
+function(b,d,f,c,e){if(null==b.handJiggle||b.handJiggle.constructor!=L)db.apply(this,arguments);else{var z=!0;null!=this.style&&(z="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(z||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)z||null!=this.fill&&this.fill!=mxConstants.NONE||(b.pointerEvents=!1),b.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?z=Math.min(c/2,Math.min(e/2,mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,z=Math.min(c*z,e*z)),b.moveTo(d+z,f),b.lineTo(d+c-z,f),b.quadTo(d+c,f,d+c,f+z),b.lineTo(d+c,f+e-z),b.quadTo(d+c,f+e,d+c-z,f+e),b.lineTo(d+z,f+e),b.quadTo(d,f+e,d,f+e-z),b.lineTo(d,f+z),b.quadTo(d,f,d+z,f)):(b.moveTo(d,f),b.lineTo(d+c,f),b.lineTo(d+c,f+e),b.lineTo(d,f+e),b.lineTo(d,f)),b.close(),b.end(),b.fillAndStroke()}};mxUtils.extend(H,
+mxRectangleShape);H.prototype.size=.1;H.prototype.fixedSize=!1;H.prototype.isHtmlAllowed=function(){return!1};H.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var d=b.width,f=b.height;b=new mxRectangle(b.x,b.y,d,f);var c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=
+mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,c=Math.max(c,Math.min(d*e,f*e));b.x+=Math.round(c);b.width-=Math.round(2*c)}return b};H.prototype.paintForeground=function(b,d,f,c,e){var z=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),l=parseFloat(mxUtils.getValue(this.style,"size",this.size)),l=z?Math.max(0,Math.min(c,l)):c*Math.max(0,Math.min(1,l));this.isRounded&&(z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/
+100,l=Math.max(l,Math.min(c*z,e*z)));l=Math.round(l);b.begin();b.moveTo(d+l,f);b.lineTo(d+l,f+e);b.moveTo(d+c-l,f);b.lineTo(d+c-l,f+e);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",H);mxCellRenderer.registerShape("process2",H);mxUtils.extend(J,mxRectangleShape);J.prototype.paintBackground=function(b,d,f,c,e){b.setFillColor(mxConstants.NONE);b.rect(d,f,c,e);b.fill()};J.prototype.paintForeground=function(b,d,f,c,e){};mxCellRenderer.registerShape("transparent",
+J);mxUtils.extend(B,mxHexagon);B.prototype.size=30;B.prototype.position=.5;B.prototype.position2=.5;B.prototype.base=20;B.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};B.prototype.isRoundable=function(){return!0};B.prototype.redrawPath=function(b,d,f,c,e){d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",
+this.size))));var z=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),l=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),g=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,e-f),new mxPoint(Math.min(c,z+g),e-f),new mxPoint(l,e),new mxPoint(Math.max(0,z),e-f),new mxPoint(0,e-f)],this.isRounded,d,!0,[4])};mxCellRenderer.registerShape("callout",
+B);mxUtils.extend(M,mxActor);M.prototype.size=.2;M.prototype.fixedSize=20;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,
+0),new mxPoint(c-d,0),new mxPoint(c,e/2),new mxPoint(c-d,e),new mxPoint(0,e),new mxPoint(d,e/2)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("step",M);mxUtils.extend(P,mxHexagon);P.prototype.size=.25;P.prototype.fixedSize=20;P.prototype.isRoundable=function(){return!0};P.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.5*e),new mxPoint(c-d,e),new mxPoint(d,e),new mxPoint(0,.5*e)],this.isRounded,f,!0)};mxCellRenderer.registerShape("hexagon",P);mxUtils.extend(T,mxRectangleShape);T.prototype.isHtmlAllowed=function(){return!1};T.prototype.paintForeground=function(b,d,f,c,e){var z=Math.min(c/5,e/5)+1;b.begin();b.moveTo(d+c/2,f+z);b.lineTo(d+c/2,
+f+e-z);b.moveTo(d+z,f+e/2);b.lineTo(d+c-z,f+e/2);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",T);var Xa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var d=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+d,b.y+d,b.width-2*d,b.height-2*d)}return b};mxRhombus.prototype.paintVertexShape=
+function(b,d,f,c,e){Xa.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var z=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=z;f+=z;c-=2*z;e-=2*z;0<c&&0<e&&(b.setShadow(!1),Xa.apply(this,[b,d,f,c,e]))}};mxUtils.extend(N,mxRectangleShape);N.prototype.isHtmlAllowed=function(){return!1};N.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var d=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;
+return new mxRectangle(b.x+d,b.y+d,b.width-2*d,b.height-2*d)}return b};N.prototype.paintForeground=function(b,d,f,c,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var z=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=z;f+=z;c-=2*z;e-=2*z;0<c&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}b.setDashed(!1);var z=0,l;do{l=mxCellRenderer.defaultShapes[this.style["symbol"+z]];if(null!=l){var g=this.style["symbol"+z+"Align"],
+k=this.style["symbol"+z+"VerticalAlign"],m=this.style["symbol"+z+"Width"],q=this.style["symbol"+z+"Height"],n=this.style["symbol"+z+"Spacing"]||0,oa=this.style["symbol"+z+"VSpacing"]||n,pa=this.style["symbol"+z+"ArcSpacing"];null!=pa&&(pa*=this.getArcSize(c+this.strokewidth,e+this.strokewidth),n+=pa,oa+=pa);var pa=d,G=f,pa=g==mxConstants.ALIGN_CENTER?pa+(c-m)/2:g==mxConstants.ALIGN_RIGHT?pa+(c-m-n):pa+n,G=k==mxConstants.ALIGN_MIDDLE?G+(e-q)/2:k==mxConstants.ALIGN_BOTTOM?G+(e-q-oa):G+oa;b.save();g=
+new l;g.style=this.style;l.prototype.paintVertexShape.call(g,b,pa,G,m,q);b.restore()}z++}while(null!=l)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",N);mxUtils.extend(R,mxCylinder);R.prototype.redrawPath=function(b,d,f,c,e,l){l?(b.moveTo(0,0),b.lineTo(c/2,e/2),b.lineTo(c,0),b.end()):(b.moveTo(0,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(0,e),b.close())};mxCellRenderer.registerShape("message",R);mxUtils.extend(G,mxShape);G.prototype.paintBackground=
+function(b,d,f,c,e){b.translate(d,f);b.ellipse(c/4,0,c/2,e/4);b.fillAndStroke();b.begin();b.moveTo(c/2,e/4);b.lineTo(c/2,2*e/3);b.moveTo(c/2,e/3);b.lineTo(0,e/3);b.moveTo(c/2,e/3);b.lineTo(c,e/3);b.moveTo(c/2,2*e/3);b.lineTo(0,e);b.moveTo(c/2,2*e/3);b.lineTo(c,e);b.end();b.stroke()};mxCellRenderer.registerShape("umlActor",G);mxUtils.extend(D,mxShape);D.prototype.getLabelMargins=function(b){return new mxRectangle(b.width/6,0,0,0)};D.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();
+b.moveTo(0,e/4);b.lineTo(0,3*e/4);b.end();b.stroke();b.begin();b.moveTo(0,e/2);b.lineTo(c/6,e/2);b.end();b.stroke();b.ellipse(c/6,0,5*c/6,e);b.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",D);mxUtils.extend(A,mxEllipse);A.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(d+c/8,f+e);b.lineTo(d+7*c/8,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("umlEntity",A);mxUtils.extend(da,mxShape);da.prototype.paintVertexShape=
+function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(c,0);b.lineTo(0,e);b.moveTo(0,0);b.lineTo(c,e);b.end();b.stroke()};mxCellRenderer.registerShape("umlDestroy",da);mxUtils.extend(K,mxShape);K.prototype.getLabelBounds=function(b){return new mxRectangle(b.x,b.y+b.height/8,b.width,7*b.height/8)};K.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(3*c/8,e/8*1.1);b.lineTo(5*c/8,0);b.end();b.stroke();b.ellipse(0,e/8,c,7*e/8);b.fillAndStroke()};K.prototype.paintForeground=
+function(b,d,f,c,e){b.begin();b.moveTo(3*c/8,e/8*1.1);b.lineTo(5*c/8,e/4);b.end();b.stroke()};mxCellRenderer.registerShape("umlControl",K);mxUtils.extend(S,mxRectangleShape);S.prototype.size=40;S.prototype.isHtmlAllowed=function(){return!1};S.prototype.getLabelBounds=function(b){var d=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(b.x,b.y,b.width,d)};S.prototype.paintBackground=function(b,d,f,c,e){var l=Math.max(0,Math.min(e,
+parseFloat(mxUtils.getValue(this.style,"size",this.size)))),z=mxUtils.getValue(this.style,"participant");null==z||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,b,d,f,c,l):(z=this.state.view.graph.cellRenderer.getShape(z),null!=z&&z!=S&&(z=new z,z.apply(this.state),b.save(),z.paintVertexShape(b,d,f,c,l),b.restore()));l<e&&(b.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),b.begin(),b.moveTo(d+c/2,f+l),b.lineTo(d+c/2,f+e),b.end(),b.stroke())};S.prototype.paintForeground=
+function(b,d,f,c,e){var l=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,b,d,f,c,Math.min(e,l))};mxCellRenderer.registerShape("umlLifeline",S);mxUtils.extend(aa,mxShape);aa.prototype.width=60;aa.prototype.height=30;aa.prototype.corner=10;aa.prototype.getLabelMargins=function(b){return new mxRectangle(0,0,b.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),b.height-parseFloat(mxUtils.getValue(this.style,
+"height",this.height)*this.scale))};aa.prototype.paintBackground=function(b,d,f,c,e){var l=this.corner,z=Math.min(c,Math.max(l,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),g=Math.min(e,Math.max(1.5*l,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),k=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);k!=mxConstants.NONE&&(b.setFillColor(k),b.rect(d,f,c,e),b.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=
+mxConstants.NONE?(this.getGradientBounds(b,d,f,c,e),b.setGradient(this.fill,this.gradient,d,f,c,e,this.gradientDirection)):b.setFillColor(this.fill);b.begin();b.moveTo(d,f);b.lineTo(d+z,f);b.lineTo(d+z,f+Math.max(0,g-1.5*l));b.lineTo(d+Math.max(0,z-l),f+g);b.lineTo(d,f+g);b.close();b.fillAndStroke();b.begin();b.moveTo(d+z,f);b.lineTo(d+c,f);b.lineTo(d+c,f+e);b.lineTo(d,f+e);b.lineTo(d,f+g);b.stroke()};mxCellRenderer.registerShape("umlFrame",aa);mxPerimeter.CenterPerimeter=function(b,d,f,c){return new mxPoint(b.getCenterX(),
+b.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(b,d,f,c){c=S.prototype.size;null!=d&&(c=mxUtils.getValue(d.style,"size",c)*d.view.scale);d=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||1)*d.view.scale/2-1;f.x<b.getCenterX()&&(d=-1*(d+1));return new mxPoint(b.getCenterX()+d,Math.min(b.y+b.height,Math.max(b.y+c,f.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=
+function(b,d,f,c){c=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(b,d,f,c){c=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||1)*d.view.scale/2-1;null!=d.style.backboneSize&&(c+=parseFloat(d.style.backboneSize)*d.view.scale/2-1);if("south"==d.style[mxConstants.STYLE_DIRECTION]||"north"==d.style[mxConstants.STYLE_DIRECTION])return f.x<b.getCenterX()&&(c=-1*(c+1)),
+new mxPoint(b.getCenterX()+c,Math.min(b.y+b.height,Math.max(b.y,f.y)));f.y<b.getCenterY()&&(c=-1*(c+1));return new mxPoint(Math.min(b.x+b.width,Math.max(b.x,f.x)),b.getCenterY()+c)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(b,d,f,c){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(b,new mxRectangle(0,0,0,Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(d.style,"size",B.prototype.size))*d.view.scale))),d.style),
+d,f,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),l=e?E.prototype.fixedSize:E.prototype.size;null!=d&&(l=mxUtils.getValue(d.style,"size",l));e&&(l*=d.view.scale);var g=b.x,z=b.y,k=b.width,m=b.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?
+(e=e?Math.max(0,Math.min(m,l)):m*Math.max(0,Math.min(1,l)),z=[new mxPoint(g,z),new mxPoint(g+k,z+e),new mxPoint(g+k,z+m),new mxPoint(g,z+m-e),new mxPoint(g,z)]):(e=e?Math.max(0,Math.min(.5*k,l)):k*Math.max(0,Math.min(1,l)),z=[new mxPoint(g+e,z),new mxPoint(g+k,z),new mxPoint(g+k-e,z+m),new mxPoint(g,z+m),new mxPoint(g+e,z)]);m=b.getCenterX();b=b.getCenterY();b=new mxPoint(m,b);c&&(f.x<g||f.x>g+k?b.y=f.y:b.x=f.x);return mxUtils.getPerimeterPoint(z,b,f)};mxStyleRegistry.putValue("parallelogramPerimeter",
+mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),l=e?C.prototype.fixedSize:C.prototype.size;null!=d&&(l=mxUtils.getValue(d.style,"size",l));e&&(l*=d.view.scale);var g=b.x,z=b.y,k=b.width,m=b.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(.5*k,l)):k*Math.max(0,Math.min(1,l)),z=[new mxPoint(g+
+e,z),new mxPoint(g+k-e,z),new mxPoint(g+k,z+m),new mxPoint(g,z+m),new mxPoint(g+e,z)]):d==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,l)):k*Math.max(0,Math.min(1,l)),z=[new mxPoint(g,z),new mxPoint(g+k,z),new mxPoint(g+k-e,z+m),new mxPoint(g+e,z+m),new mxPoint(g,z)]):d==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(m,l)):m*Math.max(0,Math.min(1,l)),z=[new mxPoint(g,z+e),new mxPoint(g+k,z),new mxPoint(g+k,z+m),new mxPoint(g,z+m-e),new mxPoint(g,z+e)]):(e=e?Math.max(0,Math.min(m,l)):
+m*Math.max(0,Math.min(1,l)),z=[new mxPoint(g,z),new mxPoint(g+k,z+e),new mxPoint(g+k,z+m-e),new mxPoint(g,z+m),new mxPoint(g,z)]);m=b.getCenterX();b=b.getCenterY();b=new mxPoint(m,b);c&&(f.x<g||f.x>g+k?b.y=f.y:b.x=f.x);return mxUtils.getPerimeterPoint(z,b,f)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),l=e?M.prototype.fixedSize:M.prototype.size;null!=d&&(l=mxUtils.getValue(d.style,
+"size",l));e&&(l*=d.view.scale);var g=b.x,z=b.y,k=b.width,m=b.height,q=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(k,l)):k*Math.max(0,Math.min(1,l)),z=[new mxPoint(g,z),new mxPoint(g+k-e,z),new mxPoint(g+k,b),new mxPoint(g+k-e,z+m),new mxPoint(g,z+m),new mxPoint(g+e,b),new mxPoint(g,z)]):d==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,
+l)):k*Math.max(0,Math.min(1,l)),z=[new mxPoint(g+e,z),new mxPoint(g+k,z),new mxPoint(g+k-e,b),new mxPoint(g+k,z+m),new mxPoint(g+e,z+m),new mxPoint(g,b),new mxPoint(g+e,z)]):d==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(m,l)):m*Math.max(0,Math.min(1,l)),z=[new mxPoint(g,z+e),new mxPoint(q,z),new mxPoint(g+k,z+e),new mxPoint(g+k,z+m),new mxPoint(q,z+m-e),new mxPoint(g,z+m),new mxPoint(g,z+e)]):(e=e?Math.max(0,Math.min(m,l)):m*Math.max(0,Math.min(1,l)),z=[new mxPoint(g,z),new mxPoint(q,z+
+e),new mxPoint(g+k,z),new mxPoint(g+k,z+m-e),new mxPoint(q,z+m),new mxPoint(g,z+m-e),new mxPoint(g,z)]);q=new mxPoint(q,b);c&&(f.x<g||f.x>g+k?q.y=f.y:q.x=f.x);return mxUtils.getPerimeterPoint(z,q,f)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),l=e?P.prototype.fixedSize:P.prototype.size;null!=d&&(l=mxUtils.getValue(d.style,"size",l));e&&(l*=d.view.scale);var g=b.x,z=b.y,k=b.width,
+m=b.height,q=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(m,l)):m*Math.max(0,Math.min(1,l)),z=[new mxPoint(q,z),new mxPoint(g+k,z+e),new mxPoint(g+k,z+m-e),new mxPoint(q,z+m),new mxPoint(g,z+m-e),new mxPoint(g,z+e),new mxPoint(q,z)]):(e=e?Math.max(0,Math.min(k,l)):k*Math.max(0,Math.min(1,l)),z=[new mxPoint(g+
+e,z),new mxPoint(g+k-e,z),new mxPoint(g+k,b),new mxPoint(g+k-e,z+m),new mxPoint(g+e,z+m),new mxPoint(g,b),new mxPoint(g+e,z)]);q=new mxPoint(q,b);c&&(f.x<g||f.x>g+k?q.y=f.y:q.x=f.x);return mxUtils.getPerimeterPoint(z,q,f)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ma,mxShape);ma.prototype.size=10;ma.prototype.paintBackground=function(b,d,f,c,e){var l=parseFloat(mxUtils.getValue(this.style,"size",this.size));b.translate(d,f);b.ellipse((c-l)/2,0,l,l);
+b.fillAndStroke();b.begin();b.moveTo(c/2,l);b.lineTo(c/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("lollipop",ma);mxUtils.extend(ga,mxShape);ga.prototype.size=10;ga.prototype.inset=2;ga.prototype.paintBackground=function(b,d,f,c,e){var l=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(d,f);b.begin();b.moveTo(c/2,l+g);b.lineTo(c/2,e);b.end();b.stroke();b.begin();b.moveTo((c-l)/2-g,l/2);b.quadTo((c-
+l)/2-g,l+g,c/2,l+g);b.quadTo((c+l)/2+g,l+g,(c+l)/2+g,l/2);b.end();b.stroke()};mxCellRenderer.registerShape("requires",ga);mxUtils.extend(ia,mxShape);ia.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.end();b.stroke()};mxCellRenderer.registerShape("requiredInterface",ia);mxUtils.extend(la,mxShape);la.prototype.inset=2;la.prototype.paintBackground=function(b,d,f,c,e){var l=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+
+this.strokewidth;b.translate(d,f);b.ellipse(0,l,c-2*l,e-2*l);b.fillAndStroke();b.begin();b.moveTo(c/2,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,c/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",la);mxUtils.extend(W,mxCylinder);W.prototype.jettyWidth=20;W.prototype.jettyHeight=10;W.prototype.redrawPath=function(b,d,f,c,e,l){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));
+f=g/2;var g=f+g/2,z=Math.min(d,e-d),k=Math.min(z+2*d,e-d);l?(b.moveTo(f,z),b.lineTo(g,z),b.lineTo(g,z+d),b.lineTo(f,z+d),b.moveTo(f,k),b.lineTo(g,k),b.lineTo(g,k+d),b.lineTo(f,k+d)):(b.moveTo(f,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(f,e),b.lineTo(f,k+d),b.lineTo(0,k+d),b.lineTo(0,k),b.lineTo(f,k),b.lineTo(f,z+d),b.lineTo(0,z+d),b.lineTo(0,z),b.lineTo(f,z),b.close());b.end()};mxCellRenderer.registerShape("module",W);mxUtils.extend(fa,mxCylinder);fa.prototype.jettyWidth=32;fa.prototype.jettyHeight=
+12;fa.prototype.redrawPath=function(b,d,f,c,e,l){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));f=g/2;var g=f+g/2,z=.3*e-d/2,k=.7*e-d/2;l?(b.moveTo(f,z),b.lineTo(g,z),b.lineTo(g,z+d),b.lineTo(f,z+d),b.moveTo(f,k),b.lineTo(g,k),b.lineTo(g,k+d),b.lineTo(f,k+d)):(b.moveTo(f,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(f,e),b.lineTo(f,k+d),b.lineTo(0,k+d),b.lineTo(0,k),b.lineTo(f,k),b.lineTo(f,z+d),b.lineTo(0,
+z+d),b.lineTo(0,z),b.lineTo(f,z),b.close());b.end()};mxCellRenderer.registerShape("component",fa);mxUtils.extend(na,mxRectangleShape);na.prototype.paintForeground=function(b,d,f,c,e){var l=c/2,g=e/2,z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b.begin();this.addPoints(b,[new mxPoint(d+l,f),new mxPoint(d+c,f+g),new mxPoint(d+l,f+e),new mxPoint(d,f+g)],this.isRounded,z,!0);b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",
+na);mxUtils.extend(V,mxDoubleEllipse);V.prototype.outerStroke=!0;V.prototype.paintVertexShape=function(b,d,f,c,e){var l=Math.min(4,Math.min(c/5,e/5));0<c&&0<e&&(b.ellipse(d+l,f+l,c-2*l,e-2*l),b.fillAndStroke());b.setShadow(!1);this.outerStroke&&(b.ellipse(d,f,c,e),b.stroke())};mxCellRenderer.registerShape("endState",V);mxUtils.extend(Q,V);Q.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Q);mxUtils.extend(ra,mxArrowConnector);ra.prototype.defaultWidth=4;ra.prototype.isOpenEnded=
+function(){return!0};ra.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ra.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",ra);mxUtils.extend(X,mxArrowConnector);X.prototype.defaultWidth=10;X.prototype.defaultArrowWidth=20;X.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};X.prototype.getEndArrowWidth=
+function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};X.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",X);mxUtils.extend(ea,mxActor);ea.prototype.size=30;ea.prototype.isRoundable=function(){return!0};ea.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));f=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(0,d),new mxPoint(c,0),new mxPoint(c,e)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("manualInput",ea);mxUtils.extend(ja,mxRectangleShape);ja.prototype.dx=20;ja.prototype.dy=20;ja.prototype.isHtmlAllowed=function(){return!1};ja.prototype.paintForeground=function(b,d,f,c,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var l=0;if(this.isRounded)var g=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,l=Math.max(l,Math.min(c*g,e*g));g=Math.max(l,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));l=Math.max(l,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.begin();b.moveTo(d,f+l);b.lineTo(d+c,f+l);b.end();b.stroke();b.begin();b.moveTo(d+g,f);b.lineTo(d+g,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("internalStorage",ja);mxUtils.extend(sa,mxActor);sa.prototype.dx=20;sa.prototype.dy=
+20;sa.prototype.redrawPath=function(b,d,f,c,e){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f),new mxPoint(d,f),new mxPoint(d,e),new mxPoint(0,e)],this.isRounded,l,!0);b.end()};
+mxCellRenderer.registerShape("corner",sa);mxUtils.extend(U,mxActor);U.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.lineTo(0,e);b.end();b.moveTo(c,0);b.lineTo(c,e);b.end();b.moveTo(0,e/2);b.lineTo(c,e/2);b.end()};mxCellRenderer.registerShape("crossbar",U);mxUtils.extend(ka,mxActor);ka.prototype.dx=20;ka.prototype.dy=20;ka.prototype.redrawPath=function(b,d,f,c,e){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,
+"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f),new mxPoint((c+d)/2,f),new mxPoint((c+d)/2,e),new mxPoint((c-d)/2,e),new mxPoint((c-d)/2,f),new mxPoint(0,f)],this.isRounded,l,!0);b.end()};mxCellRenderer.registerShape("tee",ka);mxUtils.extend(Z,mxActor);Z.prototype.arrowWidth=.3;Z.prototype.arrowSize=.2;Z.prototype.redrawPath=
+function(b,d,f,c,e){var l=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));f=(e-l)/2;var l=f+l,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,f),new mxPoint(c-d,f),new mxPoint(c-d,0),new mxPoint(c,e/2),new mxPoint(c-d,e),new mxPoint(c-d,l),new mxPoint(0,l)],this.isRounded,g,!0);b.end()};mxCellRenderer.registerShape("singleArrow",
+Z);mxUtils.extend(qa,mxActor);qa.prototype.redrawPath=function(b,d,f,c,e){var l=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Z.prototype.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Z.prototype.arrowSize))));f=(e-l)/2;var l=f+l,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e/2),new mxPoint(d,0),new mxPoint(d,f),new mxPoint(c-d,f),new mxPoint(c-d,0),new mxPoint(c,
+e/2),new mxPoint(c-d,e),new mxPoint(c-d,l),new mxPoint(d,l),new mxPoint(d,e)],this.isRounded,g,!0);b.end()};mxCellRenderer.registerShape("doubleArrow",qa);mxUtils.extend(ta,mxActor);ta.prototype.size=.1;ta.prototype.fixedSize=20;ta.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(d,
+0);b.lineTo(c,0);b.quadTo(c-2*d,e/2,c,e);b.lineTo(d,e);b.quadTo(d-2*d,e/2,d,0);b.close();b.end()};mxCellRenderer.registerShape("dataStorage",ta);mxUtils.extend(ca,mxActor);ca.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.close();b.end()};mxCellRenderer.registerShape("or",ca);mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.quadTo(c/2,e/2,0,0);b.close();b.end()};mxCellRenderer.registerShape("xor",
+O);mxUtils.extend(ua,mxActor);ua.prototype.size=20;ua.prototype.isRoundable=function(){return!0};ua.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.8*d),new mxPoint(c,e),new mxPoint(0,e),new mxPoint(0,.8*d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("loopLimit",
+ua);mxUtils.extend(ba,mxActor);ba.prototype.size=.375;ba.prototype.isRoundable=function(){return!0};ba.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,e-d),new mxPoint(c/2,e),new mxPoint(0,e-d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("offPageConnector",
+ba);mxUtils.extend(ya,mxEllipse);ya.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(d+c/2,f+e);b.lineTo(d+c,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("tapeData",ya);mxUtils.extend(va,mxEllipse);va.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(d,f+e/2);b.lineTo(d+c,f+e/2);b.end();b.stroke();b.begin();b.moveTo(d+c/2,f);
+b.lineTo(d+c/2,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("orEllipse",va);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(d+.145*c,f+.145*e);b.lineTo(d+.855*c,f+.855*e);b.end();b.stroke();b.begin();b.moveTo(d+.855*c,f+.145*e);b.lineTo(d+.145*c,f+.855*e);b.end();b.stroke()};mxCellRenderer.registerShape("sumEllipse",za);mxUtils.extend(Fa,mxRhombus);Fa.prototype.paintVertexShape=
+function(b,d,f,c,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(d,f+e/2);b.lineTo(d+c,f+e/2);b.end();b.stroke()};mxCellRenderer.registerShape("sortShape",Fa);mxUtils.extend(Ja,mxEllipse);Ja.prototype.paintVertexShape=function(b,d,f,c,e){b.begin();b.moveTo(d,f);b.lineTo(d+c,f);b.lineTo(d+c/2,f+e/2);b.close();b.fillAndStroke();b.begin();b.moveTo(d,f+e);b.lineTo(d+c,f+e);b.lineTo(d+c/2,f+e/2);b.close();b.fillAndStroke()};mxCellRenderer.registerShape("collate",
+Ja);mxUtils.extend(Ca,mxEllipse);Ca.prototype.paintVertexShape=function(b,d,f,c,e){var l=f+e-5;b.begin();b.moveTo(d,f);b.lineTo(d,f+e);b.moveTo(d,l);b.lineTo(d+10,l-5);b.moveTo(d,l);b.lineTo(d+10,l+5);b.moveTo(d,l);b.lineTo(d+c,l);b.moveTo(d+c,f);b.lineTo(d+c,f+e);b.moveTo(d+c,l);b.lineTo(d+c-10,l-5);b.moveTo(d+c,l);b.lineTo(d+c-10,l+5);b.end();b.stroke()};mxCellRenderer.registerShape("dimension",Ca);mxUtils.extend(Ia,mxEllipse);Ia.prototype.paintVertexShape=function(b,d,f,c,e){this.outline||b.setStrokeColor(null);
+if(null!=this.style){var l=b.pointerEvents;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||null!=this.fill&&this.fill!=mxConstants.NONE||(b.pointerEvents=!1);b.rect(d,f,c,e);b.fill();b.pointerEvents=l;b.setStrokeColor(this.stroke);b.begin();b.moveTo(d,f);this.outline||"1"==mxUtils.getValue(this.style,"top","1")?b.lineTo(d+c,f):b.moveTo(d+c,f);this.outline||"1"==mxUtils.getValue(this.style,"right","1")?b.lineTo(d+c,f+e):b.moveTo(d+c,f+e);this.outline||"1"==mxUtils.getValue(this.style,
+"bottom","1")?b.lineTo(d,f+e):b.moveTo(d,f+e);(this.outline||"1"==mxUtils.getValue(this.style,"left","1"))&&b.lineTo(d,f);b.end();b.stroke()}};mxCellRenderer.registerShape("partialRectangle",Ia);mxUtils.extend(xa,mxEllipse);xa.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();"vertical"==mxUtils.getValue(this.style,"line")?(b.moveTo(d+c/2,f),b.lineTo(d+c/2,f+e)):(b.moveTo(d,f+e/2),b.lineTo(d+c,f+e/2));b.end();b.stroke()};
+mxCellRenderer.registerShape("lineEllipse",xa);mxUtils.extend(Aa,mxActor);Aa.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/2);b.moveTo(0,0);b.lineTo(c-d,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,c-d,e);b.lineTo(0,e);b.close();b.end()};mxCellRenderer.registerShape("delay",Aa);mxUtils.extend(wa,mxActor);wa.prototype.size=.2;wa.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(e,c);var l=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=(e-l)/2;f=d+l;var g=(c-
+l)/2,l=g+l;b.moveTo(0,d);b.lineTo(g,d);b.lineTo(g,0);b.lineTo(l,0);b.lineTo(l,d);b.lineTo(c,d);b.lineTo(c,f);b.lineTo(l,f);b.lineTo(l,e);b.lineTo(g,e);b.lineTo(g,f);b.lineTo(0,f);b.close();b.end()};mxCellRenderer.registerShape("cross",wa);mxUtils.extend(Ba,mxActor);Ba.prototype.size=.25;Ba.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/2);f=Math.min(c-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);b.moveTo(0,e/2);b.lineTo(f,0);b.lineTo(c-d,0);b.quadTo(c,0,c,e/
+2);b.quadTo(c,e,c-d,e);b.lineTo(f,e);b.close();b.end()};mxCellRenderer.registerShape("display",Ba);mxUtils.extend(Y,mxActor);Y.prototype.cst={RECT2:"mxgraph.basic.rect"};Y.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"}]}];Y.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);this.strictDrawShape(b,0,0,c,e)};Y.prototype.strictDrawShape=function(b,d,f,c,e,l){var g=l&&l.rectStyle?l.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),k=l&&l.absoluteCornerSize?l.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),m=l&&l.size?l.size:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),q=l&&l.rectOutline?l.rectOutline:
+mxUtils.getValue(this.style,"rectOutline",this.rectOutline),n=l&&l.indent?l.indent:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),z=l&&l.dashed?l.dashed:mxUtils.getValue(this.style,"dashed",!1),G=l&&l.dashPattern?l.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),v=l&&l.relIndent?l.relIndent:Math.max(0,Math.min(50,n)),p=l&&l.top?l.top:mxUtils.getValue(this.style,"top",!0),u=l&&l.right?l.right:mxUtils.getValue(this.style,"right",!0),D=l&&l.bottom?l.bottom:
+mxUtils.getValue(this.style,"bottom",!0),A=l&&l.left?l.left:mxUtils.getValue(this.style,"left",!0),x=l&&l.topLeftStyle?l.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),t=l&&l.topRightStyle?l.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),K=l&&l.bottomRightStyle?l.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),y=l&&l.bottomLeftStyle?l.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),C=l&&l.fillColor?l.fillColor:
+mxUtils.getValue(this.style,"fillColor","#ffffff");l&&l.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var da=l&&l.strokeWidth?l.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),B=l&&l.fillColor2?l.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),N=l&&l.gradientColor2?l.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),pa=l&&l.gradientDirection2?l.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),S=l&&l.opacity?l.opacity:
+mxUtils.getValue(this.style,"opacity","100"),oa=Math.max(0,Math.min(50,m));l=Y.prototype;b.setDashed(z);G&&""!=G&&b.setDashPattern(G);b.setStrokeWidth(da);m=Math.min(.5*e,.5*c,m);k||(m=oa*Math.min(c,e)/100);m=Math.min(m,.5*Math.min(c,e));k||(n=Math.min(v*Math.min(c,e)/100));n=Math.min(n,.5*Math.min(c,e)-m);(p||u||D||A)&&"frame"!=q&&(b.begin(),p?l.moveNW(b,d,f,c,e,g,x,m,A):b.moveTo(0,0),p&&l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,u),u&&l.paintNE(b,d,f,c,e,g,t,m,p),l.paintRight(b,d,f,
+c,e,g,K,m,D),D&&l.paintSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),A&&l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),b.close(),b.fill(),b.setShadow(!1),b.setFillColor(B),z=k=S,"none"==B&&(k=0),"none"==N&&(z=0),b.setGradient(B,N,0,0,c,e,pa,k,z),b.begin(),p?l.moveNWInner(b,d,f,c,e,g,x,m,n,p,A):b.moveTo(n,0),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),A&&D&&l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D),D&&u&&l.paintSEInner(b,d,f,c,e,g,K,m,n),l.paintRightInner(b,
+d,f,c,e,g,t,m,n,p,u),u&&p&&l.paintNEInner(b,d,f,c,e,g,t,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),p&&A&&l.paintNWInner(b,d,f,c,e,g,x,m,n),b.fill(),"none"==C&&(b.begin(),l.paintFolds(b,d,f,c,e,g,x,t,K,y,m,p,u,D,A),b.stroke()));p||u||D||!A?p||u||!D||A?!p&&!u&&D&&A?"frame"!=q?(b.begin(),l.moveSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),"double"==q&&(l.moveNWInner(b,d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),l.paintSWInner(b,
+d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D)),b.stroke()):(b.begin(),l.moveSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.lineNWInner(b,d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D),b.close(),b.fillAndStroke()):p||!u||D||A?!p&&u&&!D&&A?"frame"!=q?(b.begin(),l.moveSW(b,d,f,c,e,g,x,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),"double"==
+q&&(l.moveNWInner(b,d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A)),b.stroke(),b.begin(),l.moveNE(b,d,f,c,e,g,t,m,p),l.paintRight(b,d,f,c,e,g,K,m,D),"double"==q&&(l.moveSEInner(b,d,f,c,e,g,K,m,n,D),l.paintRightInner(b,d,f,c,e,g,t,m,n,p,u)),b.stroke()):(b.begin(),l.moveSW(b,d,f,c,e,g,x,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.lineNWInner(b,d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),b.close(),b.fillAndStroke(),b.begin(),l.moveNE(b,d,f,c,e,g,t,m,p),l.paintRight(b,d,f,c,e,
+g,K,m,D),l.lineSEInner(b,d,f,c,e,g,K,m,n,D),l.paintRightInner(b,d,f,c,e,g,t,m,n,p,u),b.close(),b.fillAndStroke()):!p&&u&&D&&!A?"frame"!=q?(b.begin(),l.moveNE(b,d,f,c,e,g,t,m,p),l.paintRight(b,d,f,c,e,g,K,m,D),l.paintSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),"double"==q&&(l.moveSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D),l.paintSEInner(b,d,f,c,e,g,K,m,n),l.paintRightInner(b,d,f,c,e,g,t,m,n,p,u)),b.stroke()):(b.begin(),l.moveNE(b,d,f,c,e,g,t,m,p),l.paintRight(b,
+d,f,c,e,g,K,m,D),l.paintSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.lineSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D),l.paintSEInner(b,d,f,c,e,g,K,m,n),l.paintRightInner(b,d,f,c,e,g,t,m,n,p,u),b.close(),b.fillAndStroke()):!p&&u&&D&&A?"frame"!=q?(b.begin(),l.moveNE(b,d,f,c,e,g,t,m,p),l.paintRight(b,d,f,c,e,g,K,m,D),l.paintSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),"double"==q&&(l.moveNWInner(b,
+d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D),l.paintSEInner(b,d,f,c,e,g,K,m,n),l.paintRightInner(b,d,f,c,e,g,t,m,n,p,u)),b.stroke()):(b.begin(),l.moveNE(b,d,f,c,e,g,t,m,p),l.paintRight(b,d,f,c,e,g,K,m,D),l.paintSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.lineNWInner(b,d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),l.paintSWInner(b,
+d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D),l.paintSEInner(b,d,f,c,e,g,K,m,n),l.paintRightInner(b,d,f,c,e,g,t,m,n,p,u),b.close(),b.fillAndStroke()):!p||u||D||A?p&&!u&&!D&&A?"frame"!=q?(b.begin(),l.moveSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,u),"double"==q&&(l.moveNEInner(b,d,f,c,e,g,t,m,n,u),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A)),b.stroke()):
+(b.begin(),l.moveSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,u),l.lineNEInner(b,d,f,c,e,g,t,m,n,u),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),b.close(),b.fillAndStroke()):p&&!u&&D&&!A?"frame"!=q?(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,u),"double"==q&&(l.moveNEInner(b,d,f,c,e,g,t,m,n,u),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p)),b.stroke(),b.begin(),
+l.moveSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),"double"==q&&(l.moveSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D)),b.stroke()):(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,u),l.lineNEInner(b,d,f,c,e,g,t,m,n,u),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),b.close(),b.fillAndStroke(),b.begin(),l.moveSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.lineSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D),b.close(),b.fillAndStroke()):
+p&&!u&&D&&A?"frame"!=q?(b.begin(),l.moveSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,u),"double"==q&&(l.moveNEInner(b,d,f,c,e,g,t,m,n,u),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D)),b.stroke()):(b.begin(),l.moveSE(b,d,f,c,e,g,K,
+m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,u),l.lineNEInner(b,d,f,c,e,g,t,m,n,u),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D),b.close(),b.fillAndStroke()):p&&u&&!D&&!A?"frame"!=q?(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,
+u),l.paintNE(b,d,f,c,e,g,t,m,p),l.paintRight(b,d,f,c,e,g,K,m,D),"double"==q&&(l.moveSEInner(b,d,f,c,e,g,K,m,n,D),l.paintRightInner(b,d,f,c,e,g,t,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,t,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p)),b.stroke()):(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,u),l.paintNE(b,d,f,c,e,g,t,m,p),l.paintRight(b,d,f,c,e,g,K,m,D),l.lineSEInner(b,d,f,c,e,g,K,m,n,D),l.paintRightInner(b,d,f,c,e,g,t,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,t,m,n),l.paintTopInner(b,d,f,
+c,e,g,x,m,n,A,p),b.close(),b.fillAndStroke()):p&&u&&!D&&A?"frame"!=q?(b.begin(),l.moveSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,u),l.paintNE(b,d,f,c,e,g,t,m,p),l.paintRight(b,d,f,c,e,g,K,m,D),"double"==q&&(l.moveSEInner(b,d,f,c,e,g,K,m,n,D),l.paintRightInner(b,d,f,c,e,g,t,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,t,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A)),b.stroke()):
+(b.begin(),l.moveSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,u),l.paintNE(b,d,f,c,e,g,t,m,p),l.paintRight(b,d,f,c,e,g,K,m,D),l.lineSEInner(b,d,f,c,e,g,K,m,n,D),l.paintRightInner(b,d,f,c,e,g,t,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,t,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),b.close(),b.fillAndStroke()):p&&u&&D&&!A?"frame"!=q?(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,
+A),l.paintTop(b,d,f,c,e,g,t,m,u),l.paintNE(b,d,f,c,e,g,t,m,p),l.paintRight(b,d,f,c,e,g,K,m,D),l.paintSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),"double"==q&&(l.moveSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D),l.paintSEInner(b,d,f,c,e,g,K,m,n),l.paintRightInner(b,d,f,c,e,g,t,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,t,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p)),b.stroke()):(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,u),l.paintNE(b,d,f,c,e,g,t,
+m,p),l.paintRight(b,d,f,c,e,g,K,m,D),l.paintSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.lineSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D),l.paintSEInner(b,d,f,c,e,g,K,m,n),l.paintRightInner(b,d,f,c,e,g,t,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,t,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),b.close(),b.fillAndStroke()):p&&u&&D&&A&&("frame"!=q?(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,u),l.paintNE(b,d,f,c,e,g,t,m,
+p),l.paintRight(b,d,f,c,e,g,K,m,D),l.paintSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),b.close(),"double"==q&&(l.moveSWInner(b,d,f,c,e,g,y,m,n,A),l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D),l.paintSEInner(b,d,f,c,e,g,K,m,n),l.paintRightInner(b,d,f,c,e,g,t,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,t,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,
+e,g,y,m,n,D,A),b.close()),b.stroke()):(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,u),l.paintNE(b,d,f,c,e,g,t,m,p),l.paintRight(b,d,f,c,e,g,K,m,D),l.paintSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.paintSW(b,d,f,c,e,g,y,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),b.close(),l.moveSWInner(b,d,f,c,e,g,y,m,n,A),l.paintSWInner(b,d,f,c,e,g,y,m,n,D),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D),l.paintSEInner(b,d,f,c,e,g,K,m,n),l.paintRightInner(b,d,f,c,
+e,g,t,m,n,p,u),l.paintNEInner(b,d,f,c,e,g,t,m,n),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p),l.paintNWInner(b,d,f,c,e,g,x,m,n),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),b.close(),b.fillAndStroke())):"frame"!=q?(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,u),"double"==q&&(l.moveNEInner(b,d,f,c,e,g,t,m,n,u),l.paintTopInner(b,d,f,c,e,g,x,m,n,A,p)),b.stroke()):(b.begin(),l.moveNW(b,d,f,c,e,g,x,m,A),l.paintTop(b,d,f,c,e,g,t,m,u),l.lineNEInner(b,d,f,c,e,g,t,m,n,u),l.paintTopInner(b,d,f,c,
+e,g,x,m,n,A,p),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),l.moveNE(b,d,f,c,e,g,t,m,p),l.paintRight(b,d,f,c,e,g,K,m,D),"double"==q&&(l.moveSEInner(b,d,f,c,e,g,K,m,n,D),l.paintRightInner(b,d,f,c,e,g,t,m,n,p,u)),b.stroke()):(b.begin(),l.moveNE(b,d,f,c,e,g,t,m,p),l.paintRight(b,d,f,c,e,g,K,m,D),l.lineSEInner(b,d,f,c,e,g,K,m,n,D),l.paintRightInner(b,d,f,c,e,g,t,m,n,p,u),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),l.moveSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),"double"==q&&
+(l.moveSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D)),b.stroke()):(b.begin(),l.moveSE(b,d,f,c,e,g,K,m,u),l.paintBottom(b,d,f,c,e,g,y,m,A),l.lineSWInner(b,d,f,c,e,g,y,m,n,A),l.paintBottomInner(b,d,f,c,e,g,K,m,n,u,D),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),l.moveSW(b,d,f,c,e,g,x,m,D),l.paintLeft(b,d,f,c,e,g,x,m,p),"double"==q&&(l.moveNWInner(b,d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A)),b.stroke()):(b.begin(),l.moveSW(b,d,f,c,e,g,x,m,D),l.paintLeft(b,
+d,f,c,e,g,x,m,p),l.lineNWInner(b,d,f,c,e,g,x,m,n,p,A),l.paintLeftInner(b,d,f,c,e,g,y,m,n,D,A),b.close(),b.fillAndStroke());b.begin();l.paintFolds(b,d,f,c,e,g,x,t,K,y,m,p,u,D,A);b.stroke()};Y.prototype.moveNW=function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==g&&"square"==l||!k?b.moveTo(0,0):b.moveTo(0,m)};Y.prototype.moveNE=function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==g&&"square"==l||!k?b.moveTo(c,0):b.moveTo(c-m,0)};Y.prototype.moveSE=function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==g&&
+"square"==l||!k?b.moveTo(c,e):b.moveTo(c,e-m)};Y.prototype.moveSW=function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==g&&"square"==l||!k?b.moveTo(0,e):b.moveTo(m,e)};Y.prototype.paintNW=function(b,d,f,c,e,l,g,m,k){if(k)if("rounded"==g||"default"==g&&"rounded"==l||"invRound"==g||"default"==g&&"invRound"==l){d=0;if("rounded"==g||"default"==g&&"rounded"==l)d=1;b.arcTo(m,m,0,0,d,m,0)}else("snip"==g||"default"==g&&"snip"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(m,0);else b.lineTo(0,0)};Y.prototype.paintTop=
+function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==g&&"square"==l||!k?b.lineTo(c,0):b.lineTo(c-m,0)};Y.prototype.paintNE=function(b,d,f,c,e,l,g,m,k){if(k)if("rounded"==g||"default"==g&&"rounded"==l||"invRound"==g||"default"==g&&"invRound"==l){d=0;if("rounded"==g||"default"==g&&"rounded"==l)d=1;b.arcTo(m,m,0,0,d,c,m)}else("snip"==g||"default"==g&&"snip"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(c,m);else b.lineTo(c,0)};Y.prototype.paintRight=function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==
+g&&"square"==l||!k?b.lineTo(c,e):b.lineTo(c,e-m)};Y.prototype.paintLeft=function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==g&&"square"==l||!k?b.lineTo(0,0):b.lineTo(0,m)};Y.prototype.paintSE=function(b,d,f,c,e,l,g,m,k){if(k)if("rounded"==g||"default"==g&&"rounded"==l||"invRound"==g||"default"==g&&"invRound"==l){d=0;if("rounded"==g||"default"==g&&"rounded"==l)d=1;b.arcTo(m,m,0,0,d,c-m,e)}else("snip"==g||"default"==g&&"snip"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(c-m,e);else b.lineTo(c,
+e)};Y.prototype.paintBottom=function(b,d,f,c,e,l,g,m,k){"square"==g||"default"==g&&"square"==l||!k?b.lineTo(0,e):b.lineTo(m,e)};Y.prototype.paintSW=function(b,d,f,c,e,l,g,m,k){if(k)if("rounded"==g||"default"==g&&"rounded"==l||"invRound"==g||"default"==g&&"invRound"==l){d=0;if("rounded"==g||"default"==g&&"rounded"==l)d=1;b.arcTo(m,m,0,0,d,0,e-m)}else("snip"==g||"default"==g&&"snip"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(0,e-m);else b.lineTo(0,e)};Y.prototype.paintNWInner=function(b,d,f,
+c,e,l,g,m,k){if("rounded"==g||"default"==g&&"rounded"==l)b.arcTo(m-.5*k,m-.5*k,0,0,0,k,.5*k+m);else if("invRound"==g||"default"==g&&"invRound"==l)b.arcTo(m+k,m+k,0,0,1,k,k+m);else if("snip"==g||"default"==g&&"snip"==l)b.lineTo(k,.5*k+m);else if("fold"==g||"default"==g&&"fold"==l)b.lineTo(k+m,k+m),b.lineTo(k,k+m)};Y.prototype.paintTopInner=function(b,d,f,c,e,l,g,m,k,n,q){n||q?!n&&q?b.lineTo(0,k):n&&!q?b.lineTo(k,0):n?"square"==g||"default"==g&&"square"==l?b.lineTo(k,k):"rounded"==g||"default"==g&&
+"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.lineTo(m+.5*k,k):b.lineTo(m+k,k):b.lineTo(0,k):b.lineTo(0,0)};Y.prototype.paintNEInner=function(b,d,f,c,e,l,g,m,k){if("rounded"==g||"default"==g&&"rounded"==l)b.arcTo(m-.5*k,m-.5*k,0,0,0,c-m-.5*k,k);else if("invRound"==g||"default"==g&&"invRound"==l)b.arcTo(m+k,m+k,0,0,1,c-m-k,k);else if("snip"==g||"default"==g&&"snip"==l)b.lineTo(c-m-.5*k,k);else if("fold"==g||"default"==g&&"fold"==l)b.lineTo(c-m-k,m+k),b.lineTo(c-m-k,k)};Y.prototype.paintRightInner=
+function(b,d,f,c,e,l,g,m,k,n,q){n||q?!n&&q?b.lineTo(c-k,0):n&&!q?b.lineTo(c,k):n?"square"==g||"default"==g&&"square"==l?b.lineTo(c-k,k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.lineTo(c-k,m+.5*k):b.lineTo(c-k,m+k):b.lineTo(c-k,0):b.lineTo(c,0)};Y.prototype.paintLeftInner=function(b,d,f,c,e,l,g,m,k,n,q){n||q?!n&&q?b.lineTo(k,e):n&&!q?b.lineTo(0,e-k):n?"square"==g||"default"==g&&"square"==l?b.lineTo(k,e-k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==
+g&&"snip"==l?b.lineTo(k,e-m-.5*k):b.lineTo(k,e-m-k):b.lineTo(k,e):b.lineTo(0,e)};Y.prototype.paintSEInner=function(b,d,f,c,e,l,g,m,k){if("rounded"==g||"default"==g&&"rounded"==l)b.arcTo(m-.5*k,m-.5*k,0,0,0,c-k,e-m-.5*k);else if("invRound"==g||"default"==g&&"invRound"==l)b.arcTo(m+k,m+k,0,0,1,c-k,e-m-k);else if("snip"==g||"default"==g&&"snip"==l)b.lineTo(c-k,e-m-.5*k);else if("fold"==g||"default"==g&&"fold"==l)b.lineTo(c-m-k,e-m-k),b.lineTo(c-k,e-m-k)};Y.prototype.paintBottomInner=function(b,d,f,c,
+e,l,g,m,k,n,q){n||q?!n&&q?b.lineTo(c,e-k):n&&!q?b.lineTo(c-k,e):"square"==g||"default"==g&&"square"==l||!n?b.lineTo(c-k,e-k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.lineTo(c-m-.5*k,e-k):b.lineTo(c-m-k,e-k):b.lineTo(c,e)};Y.prototype.paintSWInner=function(b,d,f,c,e,l,g,m,k,n){if(!n)b.lineTo(k,e);else if("square"==g||"default"==g&&"square"==l)b.lineTo(k,e-k);else if("rounded"==g||"default"==g&&"rounded"==l)b.arcTo(m-.5*k,m-.5*k,0,0,0,m+.5*k,e-k);else if("invRound"==
+g||"default"==g&&"invRound"==l)b.arcTo(m+k,m+k,0,0,1,m+k,e-k);else if("snip"==g||"default"==g&&"snip"==l)b.lineTo(m+.5*k,e-k);else if("fold"==g||"default"==g&&"fold"==l)b.lineTo(k+m,e-m-k),b.lineTo(k+m,e-k)};Y.prototype.moveSWInner=function(b,d,f,c,e,l,g,m,k,n){n?"square"==g||"default"==g&&"square"==l?b.moveTo(k,e-k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.moveTo(k,e-m-.5*k):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.moveTo(k,
+e-m-k):b.moveTo(0,e-k)};Y.prototype.lineSWInner=function(b,d,f,c,e,l,g,m,k,n){n?"square"==g||"default"==g&&"square"==l?b.lineTo(k,e-k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.lineTo(k,e-m-.5*k):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(k,e-m-k):b.lineTo(0,e-k)};Y.prototype.moveSEInner=function(b,d,f,c,e,l,g,m,k,n){n?"square"==g||"default"==g&&"square"==l?b.moveTo(c-k,e-k):"rounded"==g||"default"==g&&"rounded"==
+l||"snip"==g||"default"==g&&"snip"==l?b.moveTo(c-k,e-m-.5*k):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.moveTo(c-k,e-m-k):b.moveTo(c-k,e)};Y.prototype.lineSEInner=function(b,d,f,c,e,l,g,m,k,n){n?"square"==g||"default"==g&&"square"==l?b.lineTo(c-k,e-k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.lineTo(c-k,e-m-.5*k):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(c-k,e-m-k):b.lineTo(c-
+k,e)};Y.prototype.moveNEInner=function(b,d,f,c,e,l,g,m,k,n){n?"square"==g||"default"==g&&"square"==l||n?b.moveTo(c-k,k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.moveTo(c-k,m+.5*k):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.moveTo(c-k,m+k):b.moveTo(c,k)};Y.prototype.lineNEInner=function(b,d,f,c,e,l,g,m,k,n){n?"square"==g||"default"==g&&"square"==l||n?b.lineTo(c-k,k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==
+g&&"snip"==l?b.lineTo(c-k,m+.5*k):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(c-k,m+k):b.lineTo(c,k)};Y.prototype.moveNWInner=function(b,d,f,c,e,l,g,m,k,n,q){n||q?!n&&q?b.moveTo(k,0):n&&!q?b.moveTo(0,k):"square"==g||"default"==g&&"square"==l?b.moveTo(k,k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.moveTo(k,m+.5*k):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.moveTo(k,m+k):b.moveTo(0,
+0)};Y.prototype.lineNWInner=function(b,d,f,c,e,l,g,m,k,n,q){n||q?!n&&q?b.lineTo(k,0):n&&!q?b.lineTo(0,k):"square"==g||"default"==g&&"square"==l?b.lineTo(k,k):"rounded"==g||"default"==g&&"rounded"==l||"snip"==g||"default"==g&&"snip"==l?b.lineTo(k,m+.5*k):("invRound"==g||"default"==g&&"invRound"==l||"fold"==g||"default"==g&&"fold"==l)&&b.lineTo(k,m+k):b.lineTo(0,0)};Y.prototype.paintFolds=function(b,d,f,c,e,l,g,m,k,n,q,G,p,u,v){if("fold"==l||"fold"==g||"fold"==m||"fold"==k||"fold"==n)("fold"==g||"default"==
+g&&"fold"==l)&&G&&v&&(b.moveTo(0,q),b.lineTo(q,q),b.lineTo(q,0)),("fold"==m||"default"==m&&"fold"==l)&&G&&p&&(b.moveTo(c-q,0),b.lineTo(c-q,q),b.lineTo(c,q)),("fold"==k||"default"==k&&"fold"==l)&&u&&p&&(b.moveTo(c-q,e),b.lineTo(c-q,e-q),b.lineTo(c,e-q)),("fold"==n||"default"==n&&"fold"==l)&&u&&v&&(b.moveTo(0,e-q),b.lineTo(q,e-q),b.lineTo(q,e))};mxCellRenderer.registerShape(Y.prototype.cst.RECT2,Y);Y.prototype.constraints=null;mxUtils.extend(Ga,mxConnector);Ga.prototype.origPaintEdgeShape=Ga.prototype.paintEdgeShape;
+Ga.prototype.paintEdgeShape=function(b,d,f){for(var c=[],e=0;e<d.length;e++)c.push(mxUtils.clone(d[e]));var e=b.state.dashed,l=b.state.fixDash;Ga.prototype.origPaintEdgeShape.apply(this,[b,c,f]);3<=b.state.strokeWidth&&(c=mxUtils.getValue(this.style,"fillColor",null),null!=c&&(b.setStrokeColor(c),b.setStrokeWidth(b.state.strokeWidth-2),b.setDashed(e,l),Ga.prototype.origPaintEdgeShape.apply(this,[b,d,f])))};mxCellRenderer.registerShape("filledEdge",Ga);"undefined"!==typeof StyleFormatPanel&&function(){var b=
+StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var d=this.format.getSelectionState(),f=b.apply(this,arguments);"umlFrame"==d.style.shape&&f.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return f}}();mxMarker.addMarker("dash",function(b,d,f,c,e,l,g,m,k,n){var q=e*(g+k+1),G=l*(g+k+1);return function(){b.begin();b.moveTo(c.x-q/2-G/2,c.y-G/2+q/2);b.lineTo(c.x+G/2-3*q/2,c.y-3*G/2-q/2);b.stroke()}});mxMarker.addMarker("box",
+function(b,d,f,c,e,l,g,m,k,n){var q=e*(g+k+1),G=l*(g+k+1),p=c.x+q/2,z=c.y+G/2;c.x-=q;c.y-=G;return function(){b.begin();b.moveTo(p-q/2-G/2,z-G/2+q/2);b.lineTo(p-q/2+G/2,z-G/2-q/2);b.lineTo(p+G/2-3*q/2,z-3*G/2-q/2);b.lineTo(p-G/2-3*q/2,z-3*G/2+q/2);b.close();n?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("cross",function(b,d,f,c,e,l,g,m,k,n){var q=e*(g+k+1),G=l*(g+k+1);return function(){b.begin();b.moveTo(c.x-q/2-G/2,c.y-G/2+q/2);b.lineTo(c.x+G/2-3*q/2,c.y-3*G/2-q/2);b.moveTo(c.x-q/2+G/2,c.y-
+G/2-q/2);b.lineTo(c.x-G/2-3*q/2,c.y-3*G/2+q/2);b.stroke()}});mxMarker.addMarker("circle",Ua);mxMarker.addMarker("circlePlus",function(b,d,f,c,e,l,g,m,k,n){var q=c.clone(),G=Ua.apply(this,arguments),p=e*(g+2*k),z=l*(g+2*k);return function(){G.apply(this,arguments);b.begin();b.moveTo(q.x-e*k,q.y-l*k);b.lineTo(q.x-2*p+e*k,q.y-2*z+l*k);b.moveTo(q.x-p-z+l*k,q.y-z+p-e*k);b.lineTo(q.x+z-p-l*k,q.y-z-p+e*k);b.stroke()}});mxMarker.addMarker("halfCircle",function(b,d,f,c,e,l,g,m,k,q){var n=e*(g+k+1),G=l*(g+
+k+1),p=c.clone();c.x-=n;c.y-=G;return function(){b.begin();b.moveTo(p.x-G,p.y+n);b.quadTo(c.x-G,c.y+n,c.x,c.y);b.quadTo(c.x+G,c.y-n,p.x+G,p.y-n);b.stroke()}});mxMarker.addMarker("async",function(b,d,f,c,e,l,g,m,k,q){d=e*k*1.118;f=l*k*1.118;e*=g+k;l*=g+k;var n=c.clone();n.x-=d;n.y-=f;c.x+=1*-e-d;c.y+=1*-l-f;return function(){b.begin();b.moveTo(n.x,n.y);m?b.lineTo(n.x-e-l/2,n.y-l+e/2):b.lineTo(n.x+l/2-e,n.y-l-e/2);b.lineTo(n.x-e,n.y-l);b.close();q?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("openAsync",
+function(b){b=null!=b?b:2;return function(d,f,c,e,l,g,m,k,n,q){l*=m+n;g*=m+n;var G=e.clone();return function(){d.begin();d.moveTo(G.x,G.y);k?d.lineTo(G.x-l-g/b,G.y-g+l/b):d.lineTo(G.x+g/b-l,G.y-g-l/b);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ya=function(b,d,f){return La(b,["width"],d,function(d,c,e,l,g){g=b.shape.getEdgeWidth()*b.view.scale+f;return new mxPoint(l.x+c*d/4+e*g/2,l.y+e*d/4-c*g/2)},function(d,c,e,l,g,m){d=Math.sqrt(mxUtils.ptSegDistSq(l.x,l.y,g.x,g.y,m.x,m.y));b.style.width=
+Math.round(2*d)/b.view.scale-f})},La=function(b,d,f,c,e){return ha(b,d,function(d){var e=b.absolutePoints,l=e.length-1;d=b.view.translate;var g=b.view.scale,m=f?e[0]:e[l],e=f?e[1]:e[l-1],l=e.x-m.x,k=e.y-m.y,n=Math.sqrt(l*l+k*k),m=c.call(this,n,l/n,k/n,m,e);return new mxPoint(m.x/g-d.x,m.y/g-d.y)},function(d,c,l){var g=b.absolutePoints,m=g.length-1;d=b.view.translate;var k=b.view.scale,n=f?g[0]:g[m],g=f?g[1]:g[m-1],m=g.x-n.x,q=g.y-n.y,G=Math.sqrt(m*m+q*q);c.x=(c.x+d.x)*k;c.y=(c.y+d.y)*k;e.call(this,
+G,m/G,q/G,n,g,c,l)})},Ea=function(b){return function(d){return[ha(d,["arrowWidth","arrowSize"],function(d){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Z.prototype.arrowWidth))),c=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",Z.prototype.arrowSize)));return new mxPoint(d.x+(1-c)*d.width,d.y+(1-f)*d.height/2)},function(d,f){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(d.y+d.height/2-f.y)/d.height*2));this.state.style.arrowSize=Math.max(0,
+Math.min(b,(d.x+d.width-f.x)/d.width))})]}},Za=function(b){return function(d){return[ha(d,["size"],function(d){var f=Math.max(0,Math.min(.5*d.height,parseFloat(mxUtils.getValue(this.state.style,"size",b))));return new mxPoint(d.x,d.y+f)},function(b,d){this.state.style.size=Math.max(0,d.y-b.y)},!0)]}},Ra=function(b,d,f){return function(c){var e=[ha(c,["size"],function(f){var c=Math.max(0,Math.min(f.width,Math.min(f.height,parseFloat(mxUtils.getValue(this.state.style,"size",d)))))*b;return new mxPoint(f.x+
+c,f.y+c)},function(d,f){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(d.width,f.x-d.x),Math.min(d.height,f.y-d.y)))/b)},!1)];f&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(Da(c));return e}},Ma=function(b,d,f,c,e){f=null!=f?f:.5;return function(l){var g=[ha(l,["size"],function(d){var f=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,c=parseFloat(mxUtils.getValue(this.state.style,"size",f?e:b));return new mxPoint(d.x+Math.max(0,Math.min(.5*d.width,
+c*(f?1:d.width))),d.getCenterY())},function(b,d,c){b=null!=e&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?d.x-b.x:Math.max(0,Math.min(f,(d.x-b.x)/b.width));this.state.style.size=b},!1,c)];d&&mxUtils.getValue(l.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(Da(l));return g}},Va=function(b,d,f){b=null!=b?b:.5;return function(c){var e=[ha(c,["size"],function(c){var e=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,l=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,
+"size",e?f:d)));return new mxPoint(c.x+Math.min(.75*c.width*b,l*(e?.75:.75*c.width)),c.y+c.height/4)},function(d,c){var e=null!=f&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?c.x-d.x:Math.max(0,Math.min(b,(c.x-d.x)/d.width*.75));this.state.style.size=e},!1,!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(Da(c));return e}},Ka=function(){return function(b){var d=[];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Da(b));return d}},Da=function(b,d){return ha(b,
+[mxConstants.STYLE_ARCSIZE],function(f){var c=null!=d?d:f.height/8;if("1"==mxUtils.getValue(b.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(b.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(f.x+f.width-Math.min(f.width/2,e),f.y+c)}e=Math.max(0,parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(f.x+f.width-Math.min(Math.max(f.width/2,f.height/2),Math.min(f.width,f.height)*
+e),f.y+c)},function(d,f,c){"1"==mxUtils.getValue(b.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(d.width,2*(d.x+d.width-f.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(d.width-f.x+d.x)/Math.min(d.width,d.height))))})},ha=function(b,d,f,c,e,l,g){var m=new mxHandle(b,null,mxVertexHandler.prototype.secondaryHandleImage);m.execute=function(b){for(var f=0;f<d.length;f++)this.copyStyle(d[f]);
+g&&g(b)};m.getPosition=f;m.setPosition=c;m.ignoreGrid=null!=e?e:!0;if(l){var k=m.positionChanged;m.positionChanged=function(){k.apply(this,arguments);b.view.invalidate(this.state.cell);b.view.validate()}}return m},Na={link:function(b){return[Ya(b,!0,10),Ya(b,!1,10)]},flexArrow:function(b){var d=b.view.graph.gridSize/b.view.scale,f=[];mxUtils.getValue(b.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(f.push(La(b,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+!0,function(d,f,c,e,l){d=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;l=3*mxUtils.getNumber(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+f*(l+b.shape.strokewidth*b.view.scale)+c*d/2,e.y+c*(l+b.shape.strokewidth*b.view.scale)-f*d/2)},function(f,c,e,l,g,m,k){f=Math.sqrt(mxUtils.ptSegDistSq(l.x,l.y,g.x,g.y,m.x,m.y));c=mxUtils.ptLineDist(l.x,l.y,l.x+e,l.y-c,m.x,m.y);b.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-b.shape.strokewidth)/
+3)/100/b.view.scale;b.style.width=Math.round(2*f)/b.view.scale;mxEvent.isControlDown(k.getEvent())&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(b.style[mxConstants.STYLE_STARTSIZE])-parseFloat(b.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE])})),f.push(La(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,
+f,c,e,l){d=(b.shape.getStartArrowWidth()-b.shape.strokewidth)*b.view.scale;l=3*mxUtils.getNumber(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+f*(l+b.shape.strokewidth*b.view.scale)+c*d/2,e.y+c*(l+b.shape.strokewidth*b.view.scale)-f*d/2)},function(f,c,e,l,g,m,k){f=Math.sqrt(mxUtils.ptSegDistSq(l.x,l.y,g.x,g.y,m.x,m.y));c=mxUtils.ptLineDist(l.x,l.y,l.x+e,l.y-c,m.x,m.y);b.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-b.shape.strokewidth)/3)/
+100/b.view.scale;b.style.startWidth=Math.max(0,Math.round(2*f)-b.shape.getEdgeWidth())/b.view.scale;mxEvent.isControlDown(k.getEvent())&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE],b.style.endWidth=b.style.startWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(b.style[mxConstants.STYLE_STARTSIZE])-parseFloat(b.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(b.style.startWidth)-
+parseFloat(b.style.endWidth))<d&&(b.style.startWidth=b.style.endWidth))})));mxUtils.getValue(b.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(f.push(La(b,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(d,f,c,e,l){d=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;l=3*mxUtils.getNumber(b.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+f*(l+b.shape.strokewidth*b.view.scale)-c*d/2,e.y+c*(l+b.shape.strokewidth*
+b.view.scale)+f*d/2)},function(f,c,e,l,g,m,k){f=Math.sqrt(mxUtils.ptSegDistSq(l.x,l.y,g.x,g.y,m.x,m.y));c=mxUtils.ptLineDist(l.x,l.y,l.x+e,l.y-c,m.x,m.y);b.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-b.shape.strokewidth)/3)/100/b.view.scale;b.style.width=Math.round(2*f)/b.view.scale;mxEvent.isControlDown(k.getEvent())&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(b.style[mxConstants.STYLE_ENDSIZE])-parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<
+d/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE])})),f.push(La(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(d,f,c,e,l){d=(b.shape.getEndArrowWidth()-b.shape.strokewidth)*b.view.scale;l=3*mxUtils.getNumber(b.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+f*(l+b.shape.strokewidth*b.view.scale)-c*d/2,e.y+c*(l+b.shape.strokewidth*b.view.scale)+f*d/2)},function(f,c,e,l,g,m,k){f=
+Math.sqrt(mxUtils.ptSegDistSq(l.x,l.y,g.x,g.y,m.x,m.y));c=mxUtils.ptLineDist(l.x,l.y,l.x+e,l.y-c,m.x,m.y);b.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-b.shape.strokewidth)/3)/100/b.view.scale;b.style.endWidth=Math.max(0,Math.round(2*f)-b.shape.getEdgeWidth())/b.view.scale;mxEvent.isControlDown(k.getEvent())&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE],b.style.startWidth=b.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(b.style[mxConstants.STYLE_ENDSIZE])-
+parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<d/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(b.style.endWidth)-parseFloat(b.style.startWidth))<d&&(b.style.endWidth=b.style.startWidth))})));return f},swimlane:function(b){var d=[];if(mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED)){var f=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));d.push(Da(b,f/2))}d.push(ha(b,[mxConstants.STYLE_STARTSIZE],
+function(d){var f=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(d.getCenterX(),d.y+Math.max(0,Math.min(d.height,f))):new mxPoint(d.x+Math.max(0,Math.min(d.width,f)),d.getCenterY())},function(d,f){b.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(d.height,f.y-d.y))):Math.round(Math.max(0,
+Math.min(d.width,f.x-d.x)))},!1,null,function(d){if(mxEvent.isControlDown(d.getEvent())&&(d=b.view.graph,d.isTableRow(b.cell)||d.isTableCell(b.cell))){for(var f=d.getSwimlaneDirection(b.style),c=d.model.getParent(b.cell),c=d.model.getChildCells(c,!0),e=[],l=0;l<c.length;l++)c[l]!=b.cell&&d.isSwimlane(c[l])&&d.getSwimlaneDirection(d.getCurrentCellStyle(c[l]))==f&&e.push(c[l]);d.setCellStyles(mxConstants.STYLE_STARTSIZE,b.style[mxConstants.STYLE_STARTSIZE],e)}}));return d},label:Ka(),ext:Ka(),rectangle:Ka(),
+triangle:Ka(),rhombus:Ka(),umlLifeline:function(b){return[ha(b,["size"],function(b){var d=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",S.prototype.size))));return new mxPoint(b.getCenterX(),b.y+d)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},umlFrame:function(b){return[ha(b,["width","height"],function(b){var d=Math.max(aa.prototype.corner,Math.min(b.width,mxUtils.getValue(this.state.style,"width",aa.prototype.width))),
+f=Math.max(1.5*aa.prototype.corner,Math.min(b.height,mxUtils.getValue(this.state.style,"height",aa.prototype.height)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.width=Math.round(Math.max(aa.prototype.corner,Math.min(b.width,d.x-b.x)));this.state.style.height=Math.round(Math.max(1.5*aa.prototype.corner,Math.min(b.height,d.y-b.y)))},!1)]},process:function(b){var d=[ha(b,["size"],function(b){var d="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),f=parseFloat(mxUtils.getValue(this.state.style,
+"size",H.prototype.size));return d?new mxPoint(b.x+f,b.y+b.height/4):new mxPoint(b.x+b.width*f,b.y+b.height/4)},function(b,d){var f="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*b.width,d.x-b.x)):Math.max(0,Math.min(.5,(d.x-b.x)/b.width));this.state.style.size=f},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Da(b));return d},cross:function(b){return[ha(b,["size"],function(b){var d=Math.min(b.width,b.height),d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"size",wa.prototype.size)))*d/2;return new mxPoint(b.getCenterX()-d,b.getCenterY()-d)},function(b,d){var f=Math.min(b.width,b.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,b.getCenterY()-d.y)/f*2,Math.max(0,b.getCenterX()-d.x)/f*2)))})]},note:function(b){return[ha(b,["size"],function(b){var d=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size)))));return new mxPoint(b.x+b.width-d,b.y+d)},function(b,d){this.state.style.size=
+Math.round(Math.max(0,Math.min(Math.min(b.width,b.x+b.width-d.x),Math.min(b.height,d.y-b.y))))})]},note2:function(b){return[ha(b,["size"],function(b){var f=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size)))));return new mxPoint(b.x+b.width-f,b.y+f)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,b.x+b.width-d.x),Math.min(b.height,d.y-b.y))))})]},manualInput:function(b){var d=[ha(b,["size"],function(b){var d=
+Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",ea.prototype.size)));return new mxPoint(b.x+b.width/4,b.y+3*d/4)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,4*(d.y-b.y)/3)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Da(b));return d},dataStorage:function(b){return[ha(b,["size"],function(b){var d="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),f=parseFloat(mxUtils.getValue(this.state.style,"size",d?ta.prototype.fixedSize:
+ta.prototype.size));return new mxPoint(b.x+b.width-f*(d?1:b.width),b.getCenterY())},function(b,d){var f="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(b.width,b.x+b.width-d.x)):Math.max(0,Math.min(1,(b.x+b.width-d.x)/b.width));this.state.style.size=f},!1)]},callout:function(b){var d=[ha(b,["size","position"],function(b){var d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",B.prototype.size))),f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"position",B.prototype.position)));mxUtils.getValue(this.state.style,"base",B.prototype.base);return new mxPoint(b.x+f*b.width,b.y+b.height-d)},function(b,d){mxUtils.getValue(this.state.style,"base",B.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(b.height,b.y+b.height-d.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(d.x-b.x)/b.width)))/100},!1),ha(b,["position2"],function(b){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",B.prototype.position2)));
+return new mxPoint(b.x+d*b.width,b.y+b.height)},function(b,d){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(d.x-b.x)/b.width)))/100},!1),ha(b,["base"],function(b){var d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",B.prototype.size))),f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",B.prototype.position))),c=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"base",B.prototype.base)));return new mxPoint(b.x+Math.min(b.width,
+f*b.width+c),b.y+b.height-d)},function(b,d){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",B.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(b.width,d.x-b.x-f*b.width)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Da(b));return d},internalStorage:function(b){var d=[ha(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",ja.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,
+"dy",ja.prototype.dy)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.dx=Math.round(Math.max(0,Math.min(b.width,d.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Da(b));return d},module:function(b){return[ha(b,["jettyWidth","jettyHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"jettyWidth",W.prototype.jettyWidth))),f=Math.max(0,Math.min(b.height,
+mxUtils.getValue(this.state.style,"jettyHeight",W.prototype.jettyHeight)));return new mxPoint(b.x+d/2,b.y+2*f)},function(b,d){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(b.width,d.x-b.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(b.height,d.y-b.y))/2)})]},corner:function(b){return[ha(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",sa.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,
+"dy",sa.prototype.dy)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.dx=Math.round(Math.max(0,Math.min(b.width,d.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},tee:function(b){return[ha(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",ka.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",ka.prototype.dy)));return new mxPoint(b.x+(b.width+d)/2,b.y+f)},function(b,
+d){this.state.style.dx=Math.round(Math.max(0,2*Math.min(b.width/2,d.x-b.x-b.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},singleArrow:Ea(1),doubleArrow:Ea(.5),folder:function(b){return[ha(b,["tabWidth","tabHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"tabWidth",n.prototype.tabWidth))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"tabHeight",n.prototype.tabHeight)));mxUtils.getValue(this.state.style,
+"tabPosition",n.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(d=b.width-d);return new mxPoint(b.x+d,b.y+f)},function(b,d){var f=Math.max(0,Math.min(b.width,d.x-b.x));mxUtils.getValue(this.state.style,"tabPosition",n.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(f=b.width-f);this.state.style.tabWidth=Math.round(f);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},document:function(b){return[ha(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
+"size",x.prototype.size))));return new mxPoint(b.x+3*b.width/4,b.y+(1-d)*b.height)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(b.y+b.height-d.y)/b.height))},!1)]},tape:function(b){return[ha(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",y.prototype.size))));return new mxPoint(b.getCenterX(),b.y+d*b.height/2)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(d.y-b.y)/b.height*2))},!1)]},isoCube2:function(b){return[ha(b,
+["isoAngle"],function(b){var d=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",f.isoAngle))))*Math.PI/200;return new mxPoint(b.x,b.y+Math.min(b.width*Math.tan(d),.5*b.height))},function(b,d){this.state.style.isoAngle=Math.max(0,50*(d.y-b.y)/b.height)},!0)]},cylinder2:Za(l.prototype.size),cylinder3:Za(m.prototype.size),offPageConnector:function(b){return[ha(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ba.prototype.size))));
+return new mxPoint(b.getCenterX(),b.y+(1-d)*b.height)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(b.y+b.height-d.y)/b.height))},!1)]},"mxgraph.basic.rect":function(b){var d=[Graph.createHandle(b,["size"],function(b){var d=Math.max(0,Math.min(b.width/2,b.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(b.x+d,b.y+d)},function(b,d){this.state.style.size=Math.round(100*Math.max(0,Math.min(b.height/2,b.width/2,d.x-b.x)))/100})];b=Graph.createHandle(b,
+["indent"],function(b){var d=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(b.x+.75*b.width,b.y+d*b.height/200)},function(b,d){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(d.y-b.y)/b.height)))/100});d.push(b);return d},step:Ma(M.prototype.size,!0,null,!0,M.prototype.fixedSize),hexagon:Ma(P.prototype.size,!0,.5,!0,P.prototype.fixedSize),curlyBracket:Ma(F.prototype.size,!1),display:Ma(Ba.prototype.size,!1),cube:Ra(1,
+c.prototype.size,!1),card:Ra(.5,v.prototype.size,!0),loopLimit:Ra(.5,ua.prototype.size,!0),trapezoid:Va(.5,C.prototype.size,C.prototype.fixedSize),parallelogram:Va(1,E.prototype.size,E.prototype.fixedSize)};Graph.createHandle=ha;Graph.handleFactory=Na;var eb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=eb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&
+null==mxStencilRegistry.getStencil(d)?d=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(d=mxConstants.SHAPE_SWIMLANE);d=Na[d];null==d&&null!=this.state.shape&&this.state.shape.isRoundable()&&(d=Na[mxConstants.SHAPE_RECTANGLE]);null!=d&&(d=d(this.state),null!=d&&(b=null==b?d:b.concat(d)))}return b};mxEdgeHandler.prototype.createCustomHandles=function(){var b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)&&(b=mxConstants.SHAPE_CONNECTOR);
+b=Na[b];return null!=b?b(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Oa=new mxPoint(1,0),Pa=new mxPoint(1,0),Ea=mxUtils.toRadians(-30),Oa=mxUtils.getRotatedPoint(Oa,Math.cos(Ea),Math.sin(Ea)),Ea=mxUtils.toRadians(-150),Pa=mxUtils.getRotatedPoint(Pa,Math.cos(Ea),Math.sin(Ea));mxEdgeStyle.IsometricConnector=function(b,d,f,c,e){var l=b.view;c=null!=c&&0<c.length?c[0]:null;var g=b.absolutePoints,m=g[0],g=g[g.length-1];null!=c&&(c=l.transformControlPoint(b,c));null==
+m&&null!=d&&(m=new mxPoint(d.getCenterX(),d.getCenterY()));null==g&&null!=f&&(g=new mxPoint(f.getCenterX(),f.getCenterY()));var k=Oa.x,n=Oa.y,q=Pa.x,G=Pa.y,p="horizontal"==mxUtils.getValue(b.style,"elbow","horizontal");if(null!=g&&null!=m){b=function(b,d,f){b-=u.x;var c=d-u.y;d=(G*b-q*c)/(k*G-n*q);b=(n*b-k*c)/(n*q-k*G);p?(f&&(u=new mxPoint(u.x+k*d,u.y+n*d),e.push(u)),u=new mxPoint(u.x+q*b,u.y+G*b)):(f&&(u=new mxPoint(u.x+q*b,u.y+G*b),e.push(u)),u=new mxPoint(u.x+k*d,u.y+n*d));e.push(u)};var u=m;null==
+c&&(c=new mxPoint(m.x+(g.x-m.x)/2,m.y+(g.y-m.y)/2));b(c.x,c.y,!0);b(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var fb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(b,d){if(d==mxEdgeStyle.IsometricConnector){var f=new mxElbowEdgeHandler(b);f.snapToTerminals=!1;return f}return fb.apply(this,arguments)};k.prototype.constraints=[];g.prototype.getConstraints=function(b,d,f){b=[];var c=Math.tan(mxUtils.toRadians(30)),e=(.5-
+c)/2,c=Math.min(d,f/(.5+c));d=(d-c)/2;f=(f-c)/2;b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f+.25*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+.5*c,f+c*e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,f+.25*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,f+.75*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+.5*c,f+(1-e)*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f+.75*c));return b};f.prototype.getConstraints=
+function(b,d,f){b=[];var c=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,c=Math.min(d*Math.tan(c),.5*f);b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f-c));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));return b};B.prototype.getConstraints=function(b,d,f){b=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f-c)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
+d,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-c)));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,
+1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Ia.prototype.constraints=mxRectangleShape.prototype.constraints;
+mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;T.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;t.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f+c)));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};v.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f+c)));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};c.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f+c)));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(d+c),f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-c)));return b};m.prototype.getConstraints=function(b,d,f){b=[];d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,d));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-d));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-d));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d+.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1,null,0,d+.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,f-d-.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-d-.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-d));b.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-d));return b};n.prototype.getConstraints=
+function(b,d,f){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(b.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,c,e)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),e))):(b.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,d,.25*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.75*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.75*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));b.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return b};ja.prototype.constraints=mxRectangleShape.prototype.constraints;ta.prototype.constraints=mxRectangleShape.prototype.constraints;ya.prototype.constraints=mxEllipse.prototype.constraints;va.prototype.constraints=mxEllipse.prototype.constraints;
+za.prototype.constraints=mxEllipse.prototype.constraints;xa.prototype.constraints=mxEllipse.prototype.constraints;ea.prototype.constraints=mxRectangleShape.prototype.constraints;Aa.prototype.constraints=mxRectangleShape.prototype.constraints;Ba.prototype.getConstraints=function(b,d,f){b=[];var c=Math.min(d,f/2),e=Math.min(d-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+d-c),f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));return b};W.prototype.getConstraints=function(b,d,f){d=parseFloat(mxUtils.getValue(b,
+"jettyWidth",W.prototype.jettyWidth))/2;b=parseFloat(mxUtils.getValue(b,"jettyHeight",W.prototype.jettyHeight));var c=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,d),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
+.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,d),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(f-.5*b,1.5*b)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(f-.5*b,3.5*b))];f>5*b&&c.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,d));f>8*b&&c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1,null,d));f>15*b&&c.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,d));return c};ua.prototype.constraints=mxRectangleShape.prototype.constraints;ba.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];G.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
+.1),!1),new mxConnectionConstraint(new mxPoint(0,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)];fa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,
+.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
+.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ma.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
+0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,
+.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,
+1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
+.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];E.prototype.constraints=mxRectangleShape.prototype.constraints;C.prototype.constraints=mxRectangleShape.prototype.constraints;x.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;ka.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,
"dy",this.dy))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*d+.25*c,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),e));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(d+c),.5*(f+e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),f));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),.5*(f+e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*d-.25*c,e));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*e));return b};ra.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*e));return b};sa.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d,.5*e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(f+e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
-1),!1));return b};U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];aa.prototype.getConstraints=
+1),!1));return b};U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];Z.prototype.getConstraints=
function(b,d,f){b=[];var c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),c=(f-c)/2;b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-e),c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,0));b.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-e),f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-c));return b};oa.prototype.getConstraints=function(b,d,f){b=[];var c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",aa.prototype.arrowWidth)))),e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",aa.prototype.arrowSize)))),c=(f-c)/2;b.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));return b};va.prototype.getConstraints=
+.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-e),f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-c));return b};qa.prototype.getConstraints=function(b,d,f){b=[];var c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Z.prototype.arrowWidth)))),e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Z.prototype.arrowSize)))),c=(f-c)/2;b.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));return b};wa.prototype.getConstraints=
function(b,d,f){b=[];var c=Math.min(f,d),e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),c=(f-e)/2,l=c+e,g=(d-e)/2,e=g+e;b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,0));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,e,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,f-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,f));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+e),c));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+e),l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
@@ -3001,8 +3004,8 @@ DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:
DrawioFile.prototype.updateFile=function(b,c,e,k){null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():this.getLatestVersion(mxUtils.bind(this,function(g){try{null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():null!=g?this.mergeFile(g,b,c,k):this.reloadFile(b,c))}catch(p){null!=c&&c(p)}}),c))};
DrawioFile.prototype.mergeFile=function(b,c,e,k){var g=!0;try{this.stats.fileMerged++;var p=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),t=this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement);if(null!=t&&0<t.length){this.shadowPages=t;this.backupPatch=this.isModified()?this.ui.diffPages(p,this.ui.pages):null;var d=[this.ui.diffPages(null!=k?k:p,this.shadowPages)];if(!this.ignorePatches(d)){var f=this.ui.patchPages(p,
d[0]);k={};var l=this.ui.getHashValueForPages(f,k),p={},m=this.ui.getHashValueForPages(this.shadowPages,p);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",d,"checksum",m==l,l);if(null!=l&&l!=m){var q=this.compressReportData(this.getAnonymizedXmlForPages(t)),n=this.compressReportData(this.getAnonymizedXmlForPages(f)),u=this.ui.hashValue(b.getCurrentEtag()),v=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,d,"Shadow Details: "+JSON.stringify(k)+
-"\nChecksum: "+l+"\nCurrent: "+m+"\nCurrent Details: "+JSON.stringify(p)+"\nFrom: "+u+"\nTo: "+v+"\n\nFile Data:\n"+q+"\nPatched Shadow:\n"+n,null,"mergeFile");return}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(G){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
-null!=e&&e(G);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,G);else{var y=this.getCurrentUser(),x=null!=y?y.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,G)}}catch(C){}}};
+"\nChecksum: "+l+"\nCurrent: "+m+"\nCurrent Details: "+JSON.stringify(p)+"\nFrom: "+u+"\nTo: "+v+"\n\nFile Data:\n"+q+"\nPatched Shadow:\n"+n,null,"mergeFile");return}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(E){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+null!=e&&e(E);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,E);else{var y=this.getCurrentUser(),x=null!=y?y.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,E)}}catch(C){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var c=new mxCodec(mxUtils.createXmlDocument()),e=c.document.createElement("mxfile");if(null!=b)for(var k=0;k<b.length;k++){var g=c.encode(new mxGraphModel(b[k].root));"1"!=urlParams.dev&&(g=this.ui.anonymizeNode(g,!0));g.setAttribute("id",b[k].getId());b[k].viewState&&this.ui.editor.graph.saveViewState(b[k].viewState,g,!0);e.appendChild(g)}return mxUtils.getPrettyXml(e)};
DrawioFile.prototype.compressReportData=function(b,c,e){c=null!=c?c:1E4;null!=e&&null!=b&&b.length>e?b=b.substring(0,e)+"[...]":null!=b&&b.length>c&&(b=Graph.compress(b)+"\n");return b};
DrawioFile.prototype.checksumError=function(b,c,e,k,g){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=c)for(b=0;b<c.length;b++)this.ui.anonymizePatch(c[b]);var p=mxUtils.bind(this,function(b){var d=this.compressReportData(JSON.stringify(c,null,2));b=null!=b?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement)),
@@ -3084,33 +3087,35 @@ Editor.syncImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5v
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTAgNi4zNVY0LjI2Yy0uOC4yMS0xLjU1LjU0LTIuMjMuOTZsMS40NiAxLjQ2Yy4yNS0uMTIuNS0uMjQuNzctLjMzem0tNy4xNC0uOTRsMi4zNiAyLjM2QzQuNDUgOC45OSA0IDEwLjQ0IDQgMTJjMCAyLjIxLjkxIDQuMiAyLjM2IDUuNjRMNCAyMGg2di02bC0yLjI0IDIuMjRDNi42OCAxNS4xNSA2IDEzLjY2IDYgMTJjMC0xIC4yNS0xLjk0LjY4LTIuNzdsOC4wOCA4LjA4Yy0uMjUuMTMtLjUuMjUtLjc3LjM0djIuMDljLjgtLjIxIDEuNTUtLjU0IDIuMjMtLjk2bDIuMzYgMi4zNiAxLjI3LTEuMjdMNC4xNCA0LjE0IDIuODYgNS40MXpNMjAgNGgtNnY2bDIuMjQtMi4yNEMxNy4zMiA4Ljg1IDE4IDEwLjM0IDE4IDEyYzAgMS0uMjUgMS45NC0uNjggMi43N2wxLjQ2IDEuNDZDMTkuNTUgMTUuMDEgMjAgMTMuNTYgMjAgMTJjMC0yLjIxLS45MS00LjItMi4zNi01LjY0TDIwIDR6Ii8+PC9zdmc+";
Editor.syncProblemImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyAxMmMwIDIuMjEuOTEgNC4yIDIuMzYgNS42NEwzIDIwaDZ2LTZsLTIuMjQgMi4yNEM1LjY4IDE1LjE1IDUgMTMuNjYgNSAxMmMwLTIuNjEgMS42Ny00LjgzIDQtNS42NVY0LjI2QzUuNTUgNS4xNSAzIDguMjcgMyAxMnptOCA1aDJ2LTJoLTJ2MnpNMjEgNGgtNnY2bDIuMjQtMi4yNEMxOC4zMiA4Ljg1IDE5IDEwLjM0IDE5IDEyYzAgMi42MS0xLjY3IDQuODMtNCA1LjY1djIuMDljMy40NS0uODkgNi00LjAxIDYtNy43NCAwLTIuMjEtLjkxLTQuMi0yLjM2LTUuNjRMMjEgNHptLTEwIDloMlY3aC0ydjZ6Ii8+PC9zdmc+";
Editor.drawLogoImage="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJFYmVuZV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMjUwIDI1MCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjUwIDI1MDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MntmaWxsOiMwMDA7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QyIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLDE1KSIgZD0iTTE5Ny4xLDEzOC4zaC0yMy43bC0yNS00Mi43YzUuNy0xLjIsOS44LTYuMiw5LjctMTJWNTEuNWMwLTYuOC01LjQtMTIuMy0xMi4yLTEyLjNjMCwwLTAuMSwwLTAuMSwwaC00MS43CgljLTYuOCwwLTEyLjMsNS40LTEyLjMsMTIuMmMwLDAsMCwwLjEsMCwwLjF2MzIuMWMwLDUuOCw0LDEwLjgsOS43LDEybC0yNSw0Mi43SDUyLjljLTYuOCwwLTEyLjMsNS40LTEyLjMsMTIuMmMwLDAsMCwwLjEsMCwwLjEKCXYzMi4xYzAsNi44LDUuNCwxMi4zLDEyLjIsMTIuM2MwLDAsMC4xLDAsMC4xLDBoNDEuN2M2LjgsMCwxMi4zLTUuNCwxMi4zLTEyLjJjMCwwLDAtMC4xLDAtMC4xdi0zMi4xYzAtNi44LTUuNC0xMi4zLTEyLjItMTIuMwoJYzAsMC0wLjEsMC0wLjEsMGgtNGwyNC44LTQyLjRoMTkuM2wyNC45LDQyLjRoLTQuMWMtNi44LDAtMTIuMyw1LjQtMTIuMywxMi4yYzAsMCwwLDAuMSwwLDAuMXYzMi4xYzAsNi44LDUuNCwxMi4zLDEyLjIsMTIuMwoJYzAsMCwwLjEsMCwwLjEsMGg0MS43YzYuOCwwLDEyLjMtNS40LDEyLjMtMTIuMmMwLDAsMC0wLjEsMC0wLjF2LTMyLjFjMC02LjgtNS40LTEyLjMtMTIuMi0xMi4zCglDMTk3LjIsMTM4LjMsMTk3LjIsMTM4LjMsMTk3LjEsMTM4LjN6Ii8+Cjwvc3ZnPgo=";
+Editor.tailSpin="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9Ii0yIC0yIDQ0IDQ0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogICAgPGRlZnM+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IHgxPSI4LjA0MiUiIHkxPSIwJSIgeDI9IjY1LjY4MiUiIHkyPSIyMy44NjUlIiBpZD0iYSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiM4MDgwODAiIHN0b3Atb3BhY2l0eT0iMCIgb2Zmc2V0PSIwJSIvPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjODA4MDgwIiBzdG9wLW9wYWNpdHk9Ii42MzEiIG9mZnNldD0iNjMuMTQ2JSIvPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjODA4MDgwIiBvZmZzZXQ9IjEwMCUiLz4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPC9kZWZzPgogICAgPGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxIDEpIj4KICAgICAgICAgICAgPHBhdGggZD0iTTM2IDE4YzAtOS45NC04LjA2LTE4LTE4LTE4IiBzdHJva2U9InVybCgjYSkiIHN0cm9rZS13aWR0aD0iNiI+CiAgICAgICAgICAgICAgICA8YW5pbWF0ZVRyYW5zZm9ybQogICAgICAgICAgICAgICAgICAgIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIKICAgICAgICAgICAgICAgICAgICB0eXBlPSJyb3RhdGUiCiAgICAgICAgICAgICAgICAgICAgZnJvbT0iMCAxOCAxOCIKICAgICAgICAgICAgICAgICAgICB0bz0iMzYwIDE4IDE4IgogICAgICAgICAgICAgICAgICAgIGR1cj0iMC45cyIKICAgICAgICAgICAgICAgICAgICByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgLz4KICAgICAgICAgICAgPC9wYXRoPgogICAgICAgICAgICA8Y2lyY2xlIGZpbGw9IiM4MDgwODAiIGN4PSIzNiIgY3k9IjE4IiByPSIxIj4KICAgICAgICAgICAgICAgIDxhbmltYXRlVHJhbnNmb3JtCiAgICAgICAgICAgICAgICAgICAgYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIgogICAgICAgICAgICAgICAgICAgIHR5cGU9InJvdGF0ZSIKICAgICAgICAgICAgICAgICAgICBmcm9tPSIwIDE4IDE4IgogICAgICAgICAgICAgICAgICAgIHRvPSIzNjAgMTggMTgiCiAgICAgICAgICAgICAgICAgICAgZHVyPSIwLjlzIgogICAgICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPgogICAgICAgICAgICA8L2NpcmNsZT4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPgo=";
Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";Editor.hiResImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAh1BMVEUAAABMTExERERBQUFBQUFFRUVAQEBCQkJAQEA6OjpDQ0NKSkpBQUFBQUFERERERERBQUFCQkJCQkJCQkJJSUlBQUFCQkJDQ0NDQ0NCQkJDQ0NBQUFBQUFCQkJBQUFCQkJCQkJDQ0NCQkJHR0dBQUFCQkJCQkJAQEBCQkJDQ0NAQEBERERCQkIk1hS2AAAAKnRSTlMAAjj96BL7PgQFRwfu3TYazKuVjRXl1V1DPCn1uLGjnWNVIgy9hU40eGqPkM38AAACG0lEQVRYw+2X63KbMBCFzwZblgGDceN74muatpLe//m6MHV3gHGFAv2RjM94MAbxzdnVsQbBDKwH8AH8MDAyafzjqYeyOG04XE7RS8nIRDXg6BlT+rA0nmtAPh+NQRDxIASIMG44rAMrGunBgHwy3uUldxggIStGKp2f+DQc2O4h4eQsX3O2IFB/oEbsjOKbStnjAEA+zJ0ylZTbgvoDn8xNyn6Dbj5Kd4GsNpABa6duQPfSdEj88TgMAhKuCWjAkgmFXPLnsD0pWd3OFGdrMugQII/eOMPEiGOzqPMIeWrcSoMCg71W1pXBPvCP+gS/OdXqQ3uW23+93XGWLl/OaBb805bNcBPoEIcVJsnHzcxpZH86u5KZ9gDby5dQCcnKqdbke4ItI4Tzd7IW9hZQt4EO6GG9b9sYuuK9Wwn8TIr2xKbF2+3Nhr+qxChJ/AI6pIfCu4z4Zowp4ZUNihz79vewzctnHDwTvQO/hCdFBzrUGDOPn2Y/F8YKT4oOATLvlhOznzmBSdFBJWtc58y7r+UVFOCQczy3wpN6pegDqHtsCPTGvH9JuTO0Dyg8icldYPk+RB6g8Aofj4m2EKBvtTmUPD9xDd1pPcSReV2U5iD/ik2yrngtvvqBfPzOvKiDTKTsCdoHZJ7pLLffgTwlJ5vJdtJV2/jiAYaLvLGhMAEDO5QcDg2M/jOw/8Zn+K3ZwJvHT7ZffgC/NvA3zcybTeIfE4EAAAAASUVORK5CYII=":
IMAGE_PATH+"/img-hi-res.png";Editor.loResImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==":
IMAGE_PATH+"/img-lo-res.png";Editor.cameraImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE0LjEyIDRsMS44MyAySDIwdjEySDRWNmg0LjA1bDEuODMtMmg0LjI0TTE1IDJIOUw3LjE3IDRINGMtMS4xIDAtMiAuOS0yIDJ2MTJjMCAxLjEuOSAyIDIgMmgxNmMxLjEgMCAyLS45IDItMlY2YzAtMS4xLS45LTItMi0yaC0zLjE3TDE1IDJ6bS0zIDdjMS42NSAwIDMgMS4zNSAzIDNzLTEuMzUgMy0zIDMtMy0xLjM1LTMtMyAxLjM1LTMgMy0zbTAtMmMtMi43NiAwLTUgMi4yNC01IDVzMi4yNCA1IDUgNSA1LTIuMjQgNS01LTIuMjQtNS01LTV6Ii8+PC9zdmc+";
Editor.tagsImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjE4cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjE4cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMjEuNDEsMTEuNDFsLTguODMtOC44M0MxMi4yMSwyLjIxLDExLjcsMiwxMS4xNywySDRDMi45LDIsMiwyLjksMiw0djcuMTdjMCwwLjUzLDAuMjEsMS4wNCwwLjU5LDEuNDFsOC44Myw4LjgzIGMwLjc4LDAuNzgsMi4wNSwwLjc4LDIuODMsMGw3LjE3LTcuMTdDMjIuMiwxMy40NiwyMi4yLDEyLjIsMjEuNDEsMTEuNDF6IE0xMi44MywyMEw0LDExLjE3VjRoNy4xN0wyMCwxMi44M0wxMi44MywyMHoiLz48Y2lyY2xlIGN4PSI2LjUiIGN5PSI2LjUiIHI9IjEuNSIvPjwvZz48L2c+PC9zdmc+";
Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.errorImage="data:image/gif;base64,R0lGODlhEAAQAPcAAADGAIQAAISEhP8AAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAAALAAAAAAQABAAAAhoAAEIFBigYMGBCAkGGMCQ4cGECxtKHBAAYUQCEzFSHLiQgMeGHjEGEAAg4oCQJz86LCkxpEqHAkwyRClxpEyXGmGaREmTIsmOL1GO/DkzI0yOE2sKIMlRJsWhCQHENDiUaVSpS5cmDAgAOw==";
-Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.compressXml=!0;Editor.globalVars=null;Editor.shadowOptionEnabled=!mxClient.IS_SF;Editor.config=
-null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(b,d){return"1"!=mxUtils.getValue(b.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"comic","0")||"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(b,d){return"1"==
-mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(b,d){return"1"==
-mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",
-defVal:!1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(b,
-d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"comic","0")||"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==
-urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",
-dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(b){return"orthogonalEdgeStyle"==mxUtils.getValue(b.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",
-dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",
-defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",
-type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(b,d){var c=d.editorUi.editor.graph.getCellStyle(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null);return"1"==mxUtils.getValue(c,"resizeLastRow","0")},isVisible:function(b,
-d){var c=d.editorUi.editor.graph;return 1==b.vertices.length&&0==b.edges.length&&c.isTable(b.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(b,d){var c=d.editorUi.editor.graph.getCellStyle(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null);return"1"==mxUtils.getValue(c,"resizeLast","0")},isVisible:function(b,d){var c=d.editorUi.editor.graph;return 1==b.vertices.length&&0==b.edges.length&&c.isTable(b.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",
-type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",
-dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",
-dispName:"Connectable",type:"bool",getDefaultValue:function(b,d){return d.editorUi.editor.graph.isCellConnectable(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null)},isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",
-dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",
-dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(b,d){var c=1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null,f=d.editorUi.editor.graph;return null!=
-c&&(f.isSwimlane(c)||0<f.model.getChildCount(c))},isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(b,d){var c=1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null,f=d.editorUi.editor.graph;return null!=c&&(f.isContainer(c)&&"0"!=b.style.collapsible||!f.isContainer(c)&&"1"==b.style.collapsible)},isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"recursiveResize",
-dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length&&!d.editorUi.editor.graph.isSwimlane(b.vertices[0])&&null==mxUtils.getValue(b.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(b,d){var c=d.editorUi.editor.graph.model;return 0<b.vertices.length?c.isVertex(c.getParent(b.vertices[0])):!1}},{name:"editable",dispName:"Editable",
-type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(b,d){var c=0<b.vertices.length?d.editorUi.editor.graph.getCellGeometry(b.vertices[0]):null;return null!=c&&!c.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",
-dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,
-isVisible:function(b,d){var c=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,null);return d.editorUi.editor.graph.isSwimlane(b.vertices[0])||null==c||c==mxConstants.NONE||null!=b.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(b,d){return 0<b.vertices.length&&d.editorUi.editor.graph.isContainer(b.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
+Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;
+Editor.compressXml=!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(b,d){return"1"!=mxUtils.getValue(b.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"comic","0")||"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",
+type:"int",defVal:-1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"curveFitting",dispName:"Curve Fitting",
+type:"float",defVal:.95,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",
+dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"zigzagOffset",
+dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"comic","0")||"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(b,
+d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",
+type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(b){return"orthogonalEdgeStyle"==mxUtils.getValue(b.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",
+type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},
+{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",
+defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(b,d){var c=d.editorUi.editor.graph;return"1"==urlParams.test&&1==b.vertices.length&&0==b.edges.length&&c.isTableCell(b.vertices[0])}},{type:"separator"},
+{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(b,d){var c=d.editorUi.editor.graph.getCellStyle(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null);return"1"==mxUtils.getValue(c,"resizeLastRow","0")},isVisible:function(b,d){var c=d.editorUi.editor.graph;return 1==b.vertices.length&&0==b.edges.length&&c.isTable(b.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(b,d){var c=d.editorUi.editor.graph.getCellStyle(1==
+b.vertices.length&&0==b.edges.length?b.vertices[0]:null);return"1"==mxUtils.getValue(c,"resizeLast","0")},isVisible:function(b,d){var c=d.editorUi.editor.graph;return 1==b.vertices.length&&0==b.edges.length&&c.isTable(b.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},
+{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",
+defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(b,d){return d.editorUi.editor.graph.isCellConnectable(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null)},isVisible:function(b,d){return 1==b.vertices.length&&
+0==b.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",
+dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",
+type:"bool",defVal:!1,isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(b,d){var c=1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null,f=d.editorUi.editor.graph;return null!=c&&(f.isSwimlane(c)||0<f.model.getChildCount(c))},isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(b,d){var c=1==b.vertices.length&&
+0==b.edges.length?b.vertices[0]:null,f=d.editorUi.editor.graph;return null!=c&&(f.isContainer(c)&&"0"!=b.style.collapsible||!f.isContainer(c)&&"1"==b.style.collapsible)},isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length&&!d.editorUi.editor.graph.isSwimlane(b.vertices[0])&&null==mxUtils.getValue(b.style,"childLayout",null)}},{name:"expand",
+dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(b,d){var c=d.editorUi.editor.graph.model;return 0<b.vertices.length?c.isVertex(c.getParent(b.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",
+dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(b,d){var c=0<b.vertices.length?d.editorUi.editor.graph.getCellGeometry(b.vertices[0]):null;return null!=c&&!c.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},
+{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(b,d){var c=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,null);return d.editorUi.editor.graph.isSwimlane(b.vertices[0])||null==c||c==mxConstants.NONE||null!=b.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",
+type:"bool",defVal:!1,isVisible:function(b,d){return 0<b.vertices.length&&d.editorUi.editor.graph.isContainer(b.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
Editor.createRoughCanvas=function(b){var d=rough.canvas({getContext:function(){return b}});d.draw=function(d){var c=d.sets||[];d=d.options||this.getDefaultOptions();for(var f=0;f<c.length;f++){var e=c[f];switch(e.type){case "path":null!=d.stroke&&this._drawToContext(b,e,d);break;case "fillPath":this._drawToContext(b,e,d);break;case "fillSketch":this.fillSketch(b,e,d)}}};d.fillSketch=function(d,c,f){var e=b.state.strokeColor,g=b.state.strokeWidth,l=b.state.strokeAlpha,k=b.state.dashed,m=f.fillWeight;
0>m&&(m=f.strokeWidth/2);b.setStrokeAlpha(b.state.fillAlpha);b.setStrokeColor(f.fill||"");b.setStrokeWidth(m);b.setDashed(!1);this._drawToContext(d,c,f);b.setDashed(k);b.setStrokeWidth(g);b.setStrokeColor(e);b.setStrokeAlpha(l)};d._drawToContext=function(b,d,c){b.begin();for(var f=0;f<d.ops.length;f++){var e=d.ops[f],g=e.data;switch(e.op){case "move":b.moveTo(g[0],g[1]);break;case "bcurveTo":b.curveTo(g[0],g[1],g[2],g[3],g[4],g[5]);break;case "lineTo":b.lineTo(g[0],g[1])}}b.end();"fillPath"===d.type&&
c.filled?b.fill():b.stroke()};return d};(function(){function b(d,c,f){this.canvas=d;this.rc=c;this.shape=f;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,b.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,b.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,b.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
@@ -3124,7 +3129,7 @@ this.originalEnd.apply(this.canvas,arguments)};b.prototype.addOp=function(){if(n
function(b,d){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,b,d),this.lastX=b,this.lastY=d,this.firstX=b,this.firstY=d)};b.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};b.prototype.quadTo=function(b,d,c,f){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,b,d,c,f),this.lastX=c,this.lastY=f)};b.prototype.curveTo=function(b,d,c,f,e,g){this.passThrough?
this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,b,d,c,f,e,g),this.lastX=e,this.lastY=g)};b.prototype.arcTo=function(b,d,c,f,e,g,l){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var k=mxUtils.arcToCurves(this.lastX,this.lastY,b,d,c,f,e,g,l);if(null!=k)for(var m=0;m<k.length;m+=6)this.curveTo(k[m],k[m+1],k[m+2],k[m+3],k[m+4],k[m+5]);this.lastX=g;this.lastY=l}};b.prototype.rect=function(b,d,c,f){this.passThrough?this.originalRect.apply(this.canvas,
arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(b,d,c,f,this.getStyle(!0,!0)))};b.prototype.ellipse=function(b,d,c,f){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(b+c/2,d+f/2,c,f,this.getStyle(!0,!0)))};b.prototype.roundrect=function(b,d,c,f,e,g){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(b+e,d),this.lineTo(b+c-e,d),this.quadTo(b+c,d,b+c,d+g),this.lineTo(b+
-c,d+f-g),this.quadTo(b+c,d+f,b+c-e,d+f),this.lineTo(b+e,d+f),this.quadTo(b,d+f,b,d+f-g),this.lineTo(b,d+g),this.quadTo(b,d,b+e,d))};b.prototype.drawPath=function(b){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),b)}catch(Z){}this.passThrough=!1}else if(null!=this.nextShape){for(var d in b)this.nextShape.options[d]=b[d];null==b.stroke&&delete this.nextShape.options.stroke;b.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);
+c,d+f-g),this.quadTo(b+c,d+f,b+c-e,d+f),this.lineTo(b+e,d+f),this.quadTo(b,d+f,b,d+f-g),this.lineTo(b,d+g),this.quadTo(b,d,b+e,d))};b.prototype.drawPath=function(b){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),b)}catch(aa){}this.passThrough=!1}else if(null!=this.nextShape){for(var d in b)this.nextShape.options[d]=b[d];null==b.stroke&&delete this.nextShape.options.stroke;b.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);
this.passThrough=!1}};b.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};b.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};b.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};b.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;
this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;
this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(d){return new b(d,Editor.createRoughCanvas(d),this)};var d=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(b){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0")?d.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(b):this.createRoughCanvas(b)};var c=mxShape.prototype.paint;
@@ -3137,7 +3142,7 @@ f=null;0<c.length?(c=Graph.decompress(c,null,d),null!=c&&0<c.length&&(f=mxUtils.
!mxClient.IS_SF?atob(b):Base64.decode(b,!0);if("%PDF-1.7"==b.substring(0,8)){var d=b.indexOf("EmbeddedFile");if(-1<d){var c=b.indexOf("stream",d)+9;if(0<b.substring(d,c).indexOf("application#2Fvnd.jgraph.mxfile"))return d=b.indexOf("endstream",c-1),pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(c,d)),{to:"string"})}return null}for(var c=null,d="",f=0,e=0,g=[],l=null;e<b.length;){var k=b.charCodeAt(e),e=e+1;10!=k&&(d+=String.fromCharCode(k));k=="/Subject (%3Cmxfile".charCodeAt(f)?f++:f=0;if(19==
f){var m=b.indexOf("%3C%2Fmxfile%3E)",e)+15,e=e-9;if(m>e){c=b.substring(e,m);break}}10==k&&("endobj"==d?l=null:"obj"==d.substring(d.length-3,d.length)||"xref"==d||"trailer"==d?(l=[],g[d.split(" ")[0]]=l):null!=l&&l.push(d),d="")}null==c&&(c=Editor.extractGraphModelFromXref(g));null!=c&&(c=decodeURIComponent(c.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return c};Editor.extractGraphModelFromXref=function(b){var d=b.trailer,c=null;null!=d&&(d=/.* \/Info (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<
d.length&&(d=b[d[1]],null!=d&&(d=/.* \/Subject (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<d.length&&(b=b[d[1]],null!=b&&(b=b.join("\n"),c=b.substring(1,b.length-1))))));return c};Editor.extractGraphModelFromPng=function(b){var d=null;try{var c=b.substring(b.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(f,mxUtils.bind(this,function(b,c,e){b=f.substring(b+8,b+8+e);"zTXt"==c?(e=b.indexOf(String.fromCharCode(0)),"mxGraphModel"==b.substring(0,e)&&(b=pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(e+
-2)),{to:"string"}).replace(/\+/g," "),null!=b&&0<b.length&&(d=b))):"tEXt"==c&&(b=b.split(String.fromCharCode(0)),1<b.length&&("mxGraphModel"==b[0]||"mxfile"==b[0])&&(d=b[1]));if(null!=d||"IDAT"==c)return!0}))}catch(I){}null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));return d};Editor.extractParserError=function(b,d){var c=null,f=null!=b?b.getElementsByTagName("parsererror"):null;null!=f&&0<f.length&&(c=d||mxResources.get("invalidChars"),f=f[0].getElementsByTagName("div"),
+2)),{to:"string"}).replace(/\+/g," "),null!=b&&0<b.length&&(d=b))):"tEXt"==c&&(b=b.split(String.fromCharCode(0)),1<b.length&&("mxGraphModel"==b[0]||"mxfile"==b[0])&&(d=b[1]));if(null!=d||"IDAT"==c)return!0}))}catch(K){}null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));return d};Editor.extractParserError=function(b,d){var c=null,f=null!=b?b.getElementsByTagName("parsererror"):null;null!=f&&0<f.length&&(c=d||mxResources.get("invalidChars"),f=f[0].getElementsByTagName("div"),
0<f.length&&(c=mxUtils.getTextContent(f[0])));return null!=c?mxUtils.trim(c):c};Editor.addRetryToError=function(b,d){if(null!=b){var c=null!=b.error?b.error:b;null==c.retry&&(c.retry=d)}};Editor.configure=function(b,d){if(null!=b){Editor.config=b;Editor.configVersion=b.version;Menus.prototype.defaultFonts=b.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=b.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=b.defaultColors||ColorDialog.prototype.defaultColors;
ColorDialog.prototype.colorNames=b.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=b.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=b.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=b.autosaveDelay||DrawioFile.prototype.autosaveDelay;null!=b.templateFile&&(EditorUi.templateFile=b.templateFile);null!=b.styles&&(Editor.styles=b.styles);null!=b.globalVars&&(Editor.globalVars=
b.globalVars);null!=b.compressXml&&(Editor.compressXml=b.compressXml);null!=b.includeDiagram&&(Editor.defaultIncludeDiagram=b.includeDiagram);null!=b.simpleLabels&&(Editor.simpleLabels=b.simpleLabels);b.customFonts&&(Menus.prototype.defaultFonts=b.customFonts.concat(Menus.prototype.defaultFonts));b.customPresetColors&&(ColorDialog.prototype.presetColors=b.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=b.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=b.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));
@@ -3150,7 +3155,7 @@ b){Editor.prototype.fontCss=b;var d=document.getElementsByTagName("script")[0];i
Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!0;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(d){d=null!=d&&"mxlibrary"!=d.nodeName?this.extractGraphModel(d):null;if(null!=d){var c=d.getElementsByTagName("parsererror");if(null!=c&&0<c.length){var c=c[0],f=c.getElementsByTagName("div");null!=f&&0<f.length&&
(c=f[0]);throw{message:mxUtils.getTextContent(c)};}if("mxGraphModel"==d.nodeName){c=d.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=c&&""!=c)c!=this.graph.currentStyle&&(f=null!=this.graph.themes?this.graph.themes[c]:mxUtils.load(STYLE_PATH+"/"+c+".xml").getDocumentElement(),null!=f&&(e=new mxCodec(f.ownerDocument),e.decode(f,this.graph.getStylesheet())));else if(f=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),
null!=f){var e=new mxCodec(f.ownerDocument);e.decode(f,this.graph.getStylesheet())}this.graph.currentStyle=c;this.graph.mathEnabled="1"==urlParams.math||"1"==d.getAttribute("math");c=d.getAttribute("backgroundImage");null!=c?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(c)):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();
-this.graph.updateCssTransform();this.graph.setShadowVisible("1"==d.getAttribute("shadow"),!1);if(c=d.getAttribute("extFonts"))try{for(c=c.split("|").map(function(b){b=b.split("^");return{name:b[0],url:b[1]}}),f=0;f<c.length;f++)this.graph.addExtFont(c[f].name,c[f].url)}catch(I){console.log("ExtFonts format error: "+I.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",
+this.graph.updateCssTransform();this.graph.setShadowVisible("1"==d.getAttribute("shadow"),!1);if(c=d.getAttribute("extFonts"))try{for(c=c.split("|").map(function(b){b=b.split("^");return{name:b[0],url:b[1]}}),f=0;f<c.length;f++)this.graph.addExtFont(c[f].name,c[f].url)}catch(K){console.log("ExtFonts format error: "+K.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",
toString:function(){return this.message}};};var c=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(b,d){b=null!=b?b:!0;var f=c.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&f.setAttribute("style",this.graph.currentStyle);var e=this.graph.getBackgroundImageObject(this.graph.backgroundImage,d);null!=e&&f.setAttribute("backgroundImage",JSON.stringify(e));f.setAttribute("math",this.graph.mathEnabled?"1":"0");f.setAttribute("shadow",this.graph.shadowVisible?
"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(e=this.graph.extFonts.map(function(b){return b.name+"^"+b.url}),f.setAttribute("extFonts",e.join("|")));return f};Editor.prototype.isDataSvg=function(b){try{var d=mxUtils.parseXml(b).documentElement.getAttribute("content");if(null!=d&&(null!=d&&"<"!=d.charAt(0)&&"%"!=d.charAt(0)&&(d=unescape(window.atob?atob(d):Base64.decode(cont,d))),null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d)),null!=d&&0<d.length)){var c=mxUtils.parseXml(d).documentElement;
return"mxfile"==c.nodeName||"mxGraphModel"==c.nodeName}}catch(da){}return!1};Editor.prototype.extractGraphModel=function(b,d,c){return Editor.extractGraphModel.apply(this,arguments)};var e=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&
@@ -3158,7 +3163,7 @@ this.graph.isCssTransformsSupported();this.graph.updateCssTransform();e.apply(th
"div.MathJax_SVG_Display { position: static; }\nspan.MathJax_SVG { position: static !important; }";Editor.initMath=function(b,d){if("undefined"===typeof window.MathJax){b=(null!=b?b:DRAW_MATH_URL+"/MathJax.js")+"?config=TeX-MML-AM_"+("html"==urlParams["math-output"]?"HTMLorMML":"SVG")+"-full";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(b){window.setTimeout(function(){"hidden"!=b.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,b])},0)};var c=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):
"TeX";d=null!=d?d:{"HTML-CSS":{availableFonts:[c],imageFont:null},SVG:{font:c,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(d);MathJax.Hub.Register.StartupHook("Begin",function(){for(var b=0;b<Editor.mathJaxQueue.length;b++)Editor.doMathJaxRender(Editor.mathJaxQueue[b])})}};Editor.MathJaxRender=function(b){"undefined"!==typeof MathJax&&
"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(b):Editor.mathJaxQueue.push(b)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var f=Editor.prototype.init;Editor.prototype.init=function(){f.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,d){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};c=document.getElementsByTagName("script");if(null!=c&&0<c.length){var e=document.createElement("script");
-e.setAttribute("type","text/javascript");e.setAttribute("src",b);c[0].parentNode.appendChild(e)}try{if(mxClient.IS_GC||mxClient.IS_SF){var g=document.createElement("style");g.type="text/css";g.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(g)}}catch(Z){}}};Editor.prototype.csvToArray=function(b){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(b))return null;
+e.setAttribute("type","text/javascript");e.setAttribute("src",b);c[0].parentNode.appendChild(e)}try{if(mxClient.IS_GC||mxClient.IS_SF){var g=document.createElement("style");g.type="text/css";g.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(g)}}catch(aa){}}};Editor.prototype.csvToArray=function(b){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(b))return null;
var d=[];b.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(b,c,f,e){void 0!==c?d.push(c.replace(/\\'/g,"'")):void 0!==f?d.push(f.replace(/\\"/g,'"')):void 0!==e&&d.push(e);return""});/,\s*$/.test(b)&&d.push("");return d};Editor.prototype.isCorsEnabledForUrl=function(b){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||b.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&
null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(b)||"https://raw.githubusercontent.com/"===b.substring(0,34)};Editor.prototype.createImageUrlConverter=function(){var b=new mxUrlConverter;b.updateBaseUrl();var d=b.convert,c=this;b.convert=function(f){if(null!=f){var e="http://"==f.substring(0,7)||"https://"==f.substring(0,8);e&&!navigator.onLine?f=Editor.svgBrokenImage.src:!e||f.substring(0,b.baseUrl.length)==
b.baseUrl||c.crossOriginImages&&c.isCorsEnabledForUrl(f)?"chrome-extension://"==f.substring(0,19)||mxClient.IS_CHROMEAPP||(f=d.apply(this,arguments)):f=PROXY_URL+"?url="+encodeURIComponent(f)}return f};return b};Editor.createSvgDataUri=function(b){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(b)))};Editor.prototype.convertImageToDataUri=function(b,d){try{var c=!0,f=window.setTimeout(mxUtils.bind(this,function(){c=!1;d(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(b))mxUtils.get(b,
@@ -3175,17 +3180,17 @@ k||/(\.woff)($|\?)/i.test(b))d="application/font-woff";else if("woff2"==k||/(\.w
null,"data:"+d+";charset=utf-8;base64,")}})(Editor.trimCssUrl(c[g].substring(0,l)),k)}e()}else d(b)};Editor.prototype.loadFonts=function(b){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(d){this.resolvedFontCss=d;b()})):b()};Editor.prototype.embedExtFonts=function(b){var d=this.graph.getCustomFonts();if(0<d.length){var c="",f=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var e=mxUtils.bind(this,function(){0==f&&this.embedCssFonts(c,
b)}),g=0;g<d.length;g++)mxUtils.bind(this,function(b,d){Graph.isCssFontUrl(d)?null==this.cachedGoogleFonts[d]?(f++,this.loadUrl(d,mxUtils.bind(this,function(b){this.cachedGoogleFonts[d]=b;c+=b;f--;e()}),mxUtils.bind(this,function(b){f--;c+="@import url("+d+");";e()}))):c+=this.cachedGoogleFonts[d]:c+='@font-face {font-family: "'+b+'";src: url("'+d+'")}'})(d[g].name,d[g].url);e()}else b()};Editor.prototype.addMathCss=function(b){b=b.getElementsByTagName("defs");if(null!=b&&0<b.length)for(var d=document.getElementsByTagName("style"),
c=0;c<d.length;c++)0<mxUtils.getTextContent(d[c]).indexOf("MathJax")&&b[0].appendChild(d[c].cloneNode(!0))};Editor.prototype.addFontCss=function(b,d){d=null!=d?d:this.absoluteCssFonts(this.fontCss);if(null!=d){var c=b.getElementsByTagName("defs"),f=b.ownerDocument;0==c.length?(c=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),null!=b.firstChild?b.insertBefore(c,b.firstChild):b.appendChild(c)):c=c[0];f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,
-"style"):f.createElement("style");f.setAttribute("type","text/css");mxUtils.setTextContent(f,d);c.appendChild(f)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(b,d,c){var f=mxClient.IS_FF?8192:16384;return Math.min(c,Math.min(f/b,f/d))};Editor.prototype.exportToCanvas=function(b,d,c,f,e,g,l,k,m,n,q,p,u,v,x,t,y,C){try{g=null!=g?g:!0;l=null!=l?l:!0;p=null!=p?p:this.graph;u=null!=u?u:0;var A=m?null:p.background;
-A==mxConstants.NONE&&(A=null);null==A&&(A=f);null==A&&0==m&&(A=t?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(p.getSvg(null,null,u,v,null,l,null,null,null,n,null,t,y,C),mxUtils.bind(this,function(c){try{var f=new Image;f.onload=mxUtils.bind(this,function(){try{var l=function(){mxClient.IS_SF?window.setTimeout(function(){v.drawImage(f,0,0);b(m,c)},0):(v.drawImage(f,0,0),b(m,c))},m=document.createElement("canvas"),n=parseInt(c.getAttribute("width")),q=parseInt(c.getAttribute("height"));
-k=null!=k?k:1;null!=d&&(k=g?Math.min(1,Math.min(3*d/(4*q),d/n)):d/n);k=this.getMaxCanvasScale(n,q,k);n=Math.ceil(k*n);q=Math.ceil(k*q);m.setAttribute("width",n);m.setAttribute("height",q);var v=m.getContext("2d");null!=A&&(v.beginPath(),v.rect(0,0,n,q),v.fillStyle=A,v.fill());1!=k&&v.scale(k,k);if(x){var t=p.view,y=t.scale;t.scale=1;var F=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor))));t.scale=y;var F="data:image/svg+xml;base64,"+F,D=p.gridSize*t.gridSteps*k,C=p.getGraphBounds(),
-B=t.translate.x*y,I=t.translate.y*y,N=B+(C.x-B)/y-u,E=I+(C.y-I)/y-u,G=new Image;G.onload=function(){try{for(var b=-Math.round(D-mxUtils.mod((B-N)*k,D)),d=-Math.round(D-mxUtils.mod((I-E)*k,D));b<n;b+=D)for(var c=d;c<q;c+=D)v.drawImage(G,b/k,c/k);l()}catch(Aa){null!=e&&e(Aa)}};G.onerror=function(b){null!=e&&e(b)};G.src=F}else l()}catch(wa){null!=e&&e(wa)}});f.onerror=function(b){null!=e&&e(b)};n&&this.graph.addSvgShadow(c);this.graph.mathEnabled&&this.addMathCss(c);var l=mxUtils.bind(this,function(){try{null!=
-this.resolvedFontCss&&this.addFontCss(c,this.resolvedFontCss),f.src=Editor.createSvgDataUri(mxUtils.getXml(c))}catch(ka){null!=e&&e(ka)}});this.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.addFontCss(c,b),this.loadFonts(l)}catch(aa){null!=e&&e(aa)}}))}catch(ka){null!=e&&e(ka)}}),c,q)}catch(ja){null!=e&&e(ja)}};Editor.crcTable=[];for(var g=0;256>g;g++)for(var p=g,t=0;8>t;t++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[g]=p;Editor.updateCRC=function(b,d,c,f){for(var e=0;e<f;e++)b=
+"style"):f.createElement("style");f.setAttribute("type","text/css");mxUtils.setTextContent(f,d);c.appendChild(f)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(b,d,c){var f=mxClient.IS_FF?8192:16384;return Math.min(c,Math.min(f/b,f/d))};Editor.prototype.exportToCanvas=function(b,d,c,f,e,g,l,k,m,n,q,p,u,v,x,t,y,C){try{g=null!=g?g:!0;l=null!=l?l:!0;p=null!=p?p:this.graph;u=null!=u?u:0;var G=m?null:p.background;
+G==mxConstants.NONE&&(G=null);null==G&&(G=f);null==G&&0==m&&(G=t?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(p.getSvg(null,null,u,v,null,l,null,null,null,n,null,t,y,C),mxUtils.bind(this,function(c){try{var f=new Image;f.onload=mxUtils.bind(this,function(){try{var l=function(){mxClient.IS_SF?window.setTimeout(function(){v.drawImage(f,0,0);b(m,c)},0):(v.drawImage(f,0,0),b(m,c))},m=document.createElement("canvas"),n=parseInt(c.getAttribute("width")),q=parseInt(c.getAttribute("height"));
+k=null!=k?k:1;null!=d&&(k=g?Math.min(1,Math.min(3*d/(4*q),d/n)):d/n);k=this.getMaxCanvasScale(n,q,k);n=Math.ceil(k*n);q=Math.ceil(k*q);m.setAttribute("width",n);m.setAttribute("height",q);var v=m.getContext("2d");null!=G&&(v.beginPath(),v.rect(0,0,n,q),v.fillStyle=G,v.fill());1!=k&&v.scale(k,k);if(x){var t=p.view,y=t.scale;t.scale=1;var D=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor))));t.scale=y;var D="data:image/svg+xml;base64,"+D,A=p.gridSize*t.gridSteps*k,C=p.getGraphBounds(),
+B=t.translate.x*y,N=t.translate.y*y,K=B+(C.x-B)/y-u,F=N+(C.y-N)/y-u,E=new Image;E.onload=function(){try{for(var b=-Math.round(A-mxUtils.mod((B-K)*k,A)),d=-Math.round(A-mxUtils.mod((N-F)*k,A));b<n;b+=A)for(var c=d;c<q;c+=A)v.drawImage(E,b/k,c/k);l()}catch(Ba){null!=e&&e(Ba)}};E.onerror=function(b){null!=e&&e(b)};E.src=D}else l()}catch(xa){null!=e&&e(xa)}});f.onerror=function(b){null!=e&&e(b)};n&&this.graph.addSvgShadow(c);this.graph.mathEnabled&&this.addMathCss(c);var l=mxUtils.bind(this,function(){try{null!=
+this.resolvedFontCss&&this.addFontCss(c,this.resolvedFontCss),f.src=Editor.createSvgDataUri(mxUtils.getXml(c))}catch(ka){null!=e&&e(ka)}});this.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.addFontCss(c,b),this.loadFonts(l)}catch(Z){null!=e&&e(Z)}}))}catch(ka){null!=e&&e(ka)}}),c,q)}catch(ja){null!=e&&e(ja)}};Editor.crcTable=[];for(var g=0;256>g;g++)for(var p=g,t=0;8>t;t++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[g]=p;Editor.updateCRC=function(b,d,c,f){for(var e=0;e<f;e++)b=
Editor.crcTable[(b^d.charCodeAt(c+e))&255]^b>>>8;return b};Editor.crc32=function(b){for(var d=-1,c=0;c<b.length;c++)d=d>>>8^Editor.crcTable[(d^b.charCodeAt(c))&255];return(d^-1)>>>0};Editor.writeGraphModelToPng=function(b,d,c,f,e){function g(b,d){var c=m;m+=d;return b.substring(c,m)}function l(b){b=g(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}function k(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}b=b.substring(b.indexOf(",")+
1);b=window.atob?atob(b):Base64.decode(b,!0);var m=0;if(g(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(g(b,4),"IHDR"!=g(b,4))null!=e&&e();else{g(b,17);e=b.substring(0,m);do{var n=l(b);if("IDAT"==g(b,4)){e=b.substring(0,m-8);"pHYs"==d&&"dpi"==c?(c=Math.round(f/.0254),c=k(c)+k(c)+String.fromCharCode(1)):c=c+String.fromCharCode(0)+("zTXt"==d?String.fromCharCode(0):"")+f;f=4294967295;f=Editor.updateCRC(f,d,0,4);f=Editor.updateCRC(f,c,0,c.length);e+=k(c.length)+
d+c+k(f^4294967295);e+=b.substring(m-8,b.length);break}e+=b.substring(m-8,m-4+n);g(b,n);g(b,4)}while(n);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(b,c){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var f=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=
function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(b,d){var c=null;null!=b.editor.graph.getModel().getParent(d)?c=d.getId():null!=b.currentPage&&(c=b.currentPage.getId());return c});if(null!=window.StyleFormatPanel){var l=Format.prototype.init;Format.prototype.init=function(){l.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var m=Format.prototype.refresh;
Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?m.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var b=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=b&&b.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(b){return!1};var q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(b){b=q.apply(this,arguments);
-this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var d=this.editorUi,c=d.editor.graph,f=this.createOption(mxResources.get("shadow"),function(){return c.shadowVisible},function(b){var f=new ChangePageSetup(d);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=b;c.model.execute(f)},{install:function(b){this.listener=function(){b(c.shadowVisible)};d.addListener("shadowVisibleChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});Editor.shadowOptionEnabled||
+this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var d=this.editorUi,c=d.editor.graph,f=this.createOption(mxResources.get("shadow"),function(){return c.shadowVisible},function(b){var f=new ChangePageSetup(d);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=b;c.model.execute(f)},{install:function(b){this.listener=function(){b(c.shadowVisible)};d.addListener("shadowVisibleChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});Editor.enableShadowOption||
(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));b.appendChild(f)}return b};var n=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(b){b=n.apply(this,arguments);var d=this.editorUi,c=d.editor.graph;if(c.isEnabled()){var f=d.getCurrentFile();if(null!=f&&f.isAutosaveOptional()){var e=this.createOption(mxResources.get("autosave"),function(){return d.editor.autosave},function(b){d.editor.setAutosave(b);d.editor.autosave&&
f.isModified()&&f.fileChanged()},{install:function(b){this.listener=function(){b(d.editor.autosave)};d.editor.addListener("autosaveChanged",this.listener)},destroy:function(){d.editor.removeListener(this.listener)}});b.appendChild(e)}}if(this.isMathOptionVisible()&&c.isEnabled()&&"undefined"!==typeof MathJax){e=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return c.mathEnabled},function(b){d.actions.get("mathematicalTypesetting").funct()},{install:function(b){this.listener=
function(){b(c.mathEnabled)};d.addListener("mathEnabledChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});e.style.paddingTop="5px";b.appendChild(e);var g=d.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");g.style.position="relative";g.style.marginLeft="6px";g.style.top="2px";e.appendChild(g)}return b};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
@@ -3226,10 +3231,10 @@ C[l],m=document.createElement("option");m.value=mxUtils.htmlEntities(k.val);m.in
t,u)):"readOnly"==x?(u=document.createElement("input"),u.setAttribute("readonly",""),u.value=c,u.style.width="96px",u.style.borderWidth="0px",y.appendChild(u)):(y.innerHTML=c,mxEvent.addListener(y,"click",mxUtils.bind(q,function(){function g(){var b=l.value,b=0==b.length&&"string"!=x?0:b;n.allowAuto&&(null!=b.trim&&"auto"==b.trim().toLowerCase()?(b="auto",x="string"):(b=parseFloat(b),b=isNaN(b)?0:b));null!=n.min&&b<n.min?b=n.min:null!=n.max&&b>n.max&&(b=n.max);b=mxUtils.htmlEntities(("int"==x?parseInt(b):
b)+"");f(d,b,n)}var l=document.createElement("input");e(y,l,!0);l.value=c;l.className="gePropEditor";"int"!=x&&"float"!=x||n.allowAuto||(l.type="number",l.step="int"==x?"1":"any",null!=n.min&&(l.min=parseFloat(n.min)),null!=n.max&&(l.max=parseFloat(n.max)));b.appendChild(l);mxEvent.addListener(l,"keypress",function(b){13==b.keyCode&&g()});l.focus();mxEvent.addListener(l,"blur",function(){g()})})));n.isDeletable&&(u=mxUtils.button("-",mxUtils.bind(q,function(b){f(d,"",n,n.index);mxEvent.consume(b)})),
u.style.height="16px",u.style.width="25px",u.style["float"]="right",u.className="geColorBtn",y.appendChild(u));t.appendChild(y);return t}var q=this,p=this.editorUi.editor.graph,u=[];b.style.position="relative";b.style.padding="0";var v=document.createElement("table");v.className="geProperties";v.style.whiteSpace="nowrap";v.style.width="100%";var x=document.createElement("tr");x.className="gePropHeader";var t=document.createElement("th");t.className="gePropHeaderCell";var y=document.createElement("img");
-y.src=Sidebar.prototype.expandedImage;t.appendChild(y);mxUtils.write(t,mxResources.get("property"));x.style.cursor="pointer";var C=function(){var d=v.querySelectorAll(".gePropNonHeaderRow"),c;if(q.editorUi.propertiesCollapsed){y.src=Sidebar.prototype.collapsedImage;c="none";for(var f=b.childNodes.length-1;0<=f;f--)try{var e=b.childNodes[f],g=e.nodeName.toUpperCase();"INPUT"!=g&&"SELECT"!=g||b.removeChild(e)}catch(ua){}}else y.src=Sidebar.prototype.expandedImage,c="";for(f=0;f<d.length;f++)d[f].style.display=
-c};mxEvent.addListener(x,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;C()});x.appendChild(t);t=document.createElement("th");t.className="gePropHeaderCell";t.innerHTML=mxResources.get("value");x.appendChild(t);v.appendChild(x);var A=!1,D=!1,x=null;1==c.vertices.length&&0==c.edges.length?x=c.vertices[0].id:0==c.vertices.length&&1==c.edges.length&&(x=c.edges[0].id);null!=x&&v.appendChild(n("id",mxUtils.htmlEntities(x),{dispName:"ID",type:"readOnly"},!0,!1));for(var F in d)if(x=
-d[F],"function"!=typeof x.isVisible||x.isVisible(c,this)){var B=null!=c.style[F]?mxUtils.htmlEntities(c.style[F]+""):null!=x.getDefaultValue?x.getDefaultValue(c,this):x.defVal;if("separator"==x.type)D=!D;else{if("staticArr"==x.type)x.size=parseInt(c.style[x.sizeProperty]||d[x.sizeProperty].defVal)||0;else if(null!=x.dependentProps){for(var N=x.dependentProps,E=[],G=[],t=0;t<N.length;t++){var P=c.style[N[t]];G.push(d[N[t]].subDefVal);E.push(null!=P?P.split(","):[])}x.dependentPropsDefVal=G;x.dependentPropsVals=
-E}v.appendChild(n(F,B,x,A,D));A=!A}}for(t=0;t<u.length;t++)for(x=u[t],d=x.parentRow,c=0;c<x.values.length;c++)F=n(x.name,x.values[c],{type:x.type,parentRow:x.parentRow,isDeletable:x.isDeletable,index:c,defVal:x.defVal,countProperty:x.countProperty,size:x.size},0==c%2,x.flipBkg),d.parentNode.insertBefore(F,d.nextSibling),d=F;b.appendChild(v);C();return b};StyleFormatPanel.prototype.addStyles=function(b){function d(b){mxEvent.addListener(b,"mouseenter",function(){b.style.opacity="1"});mxEvent.addListener(b,
+y.src=Sidebar.prototype.expandedImage;t.appendChild(y);mxUtils.write(t,mxResources.get("property"));x.style.cursor="pointer";var C=function(){var d=v.querySelectorAll(".gePropNonHeaderRow"),c;if(q.editorUi.propertiesCollapsed){y.src=Sidebar.prototype.collapsedImage;c="none";for(var f=b.childNodes.length-1;0<=f;f--)try{var e=b.childNodes[f],g=e.nodeName.toUpperCase();"INPUT"!=g&&"SELECT"!=g||b.removeChild(e)}catch(va){}}else y.src=Sidebar.prototype.expandedImage,c="";for(f=0;f<d.length;f++)d[f].style.display=
+c};mxEvent.addListener(x,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;C()});x.appendChild(t);t=document.createElement("th");t.className="gePropHeaderCell";t.innerHTML=mxResources.get("value");x.appendChild(t);v.appendChild(x);var G=!1,D=!1,x=null;1==c.vertices.length&&0==c.edges.length?x=c.vertices[0].id:0==c.vertices.length&&1==c.edges.length&&(x=c.edges[0].id);null!=x&&v.appendChild(n("id",mxUtils.htmlEntities(x),{dispName:"ID",type:"readOnly"},!0,!1));for(var A in d)if(x=
+d[A],"function"!=typeof x.isVisible||x.isVisible(c,this)){var B=null!=c.style[A]?mxUtils.htmlEntities(c.style[A]+""):null!=x.getDefaultValue?x.getDefaultValue(c,this):x.defVal;if("separator"==x.type)D=!D;else{if("staticArr"==x.type)x.size=parseInt(c.style[x.sizeProperty]||d[x.sizeProperty].defVal)||0;else if(null!=x.dependentProps){for(var N=x.dependentProps,F=[],E=[],t=0;t<N.length;t++){var P=c.style[N[t]];E.push(d[N[t]].subDefVal);F.push(null!=P?P.split(","):[])}x.dependentPropsDefVal=E;x.dependentPropsVals=
+F}v.appendChild(n(A,B,x,G,D));G=!G}}for(t=0;t<u.length;t++)for(x=u[t],d=x.parentRow,c=0;c<x.values.length;c++)A=n(x.name,x.values[c],{type:x.type,parentRow:x.parentRow,isDeletable:x.isDeletable,index:c,defVal:x.defVal,countProperty:x.countProperty,size:x.size},0==c%2,x.flipBkg),d.parentNode.insertBefore(A,d.nextSibling),d=A;b.appendChild(v);C();return b};StyleFormatPanel.prototype.addStyles=function(b){function d(b){mxEvent.addListener(b,"mouseenter",function(){b.style.opacity="1"});mxEvent.addListener(b,
"mouseleave",function(){b.style.opacity="0.5"})}var c=this.editorUi,f=c.editor.graph,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.paddingLeft="24px";e.style.paddingRight="20px";b.style.paddingLeft="16px";b.style.paddingBottom="6px";b.style.position="relative";b.appendChild(e);var g="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),l=document.createElement("div");
l.style.whiteSpace="nowrap";l.style.position="relative";l.style.textAlign="center";for(var k=[],m=0;m<this.defaultColorSchemes.length;m++){var n=document.createElement("div");n.style.display="inline-block";n.style.width="6px";n.style.height="6px";n.style.marginLeft="4px";n.style.marginRight="3px";n.style.borderRadius="3px";n.style.cursor="pointer";n.style.background="transparent";n.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(b){mxEvent.addListener(n,"click",mxUtils.bind(this,function(){q(b)}))})(m);
k.push(n);l.appendChild(n)}var q=mxUtils.bind(this,function(b){null!=this.format.currentScheme&&(k[this.format.currentScheme].style.background="transparent");this.format.currentScheme=b;p(this.defaultColorSchemes[this.format.currentScheme]);k[this.format.currentScheme].style.background="#84d7ff"}),p=mxUtils.bind(this,function(b){var d=mxUtils.bind(this,function(b){var d=mxUtils.button("",mxUtils.bind(this,function(d){f.getModel().beginUpdate();try{for(var e=this.format.getSelectionState().cells,l=
@@ -3252,7 +3257,7 @@ b[d].getAttribute("face"):b[d].style.fontFamily;null!=f&&Graph.addFont(f,c)}}};G
"mouseenter",b);mxEvent.addListener(this.container,"mousemove",b);mxEvent.addListener(this.container,"mouseleave",function(b){d=null});this.isMouseInsertPoint=function(){return null!=d};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=d?this.getPointForEvent(d):c.apply(this,arguments)};var f=this.layoutManager.getLayout;this.layoutManager.getLayout=function(b){var d=this.graph.getCellStyle(b);if(null!=d){if("rack"==d.childLayout){var c=new mxStackLayout(this.graph,!1);c.gridSize=
null!=d.rackUnitSize?parseFloat(d.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;c.marginLeft=d.marginLeft||0;c.marginRight=d.marginRight||0;c.marginTop=d.marginTop||0;c.marginBottom=d.marginBottom||0;c.allowGaps=d.allowGaps||0;c.horizontal="1"==mxUtils.getValue(d,"horizontalRack","0");c.resizeParent=!1;c.fill=!0;return c}if("undefined"!==typeof mxTableLayout&&"tableLayout"==d.childLayout)return c=new mxTableLayout(this.graph),c.rows=d.tableRows||2,c.columns=d.tableColumns||
2,c.colPercentages=d.colPercentages,c.rowPercentages=d.rowPercentages,c.equalColumns="1"==mxUtils.getValue(d,"equalColumns",c.colPercentages?"0":"1"),c.equalRows="1"==mxUtils.getValue(d,"equalRows",c.rowPercentages?"0":"1"),c.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1"),c.border=d.tableBorder||c.border,c.marginLeft=d.marginLeft||0,c.marginRight=d.marginRight||0,c.marginTop=d.marginTop||0,c.marginBottom=d.marginBottom||0,c.autoAddCol="1"==mxUtils.getValue(d,"autoAddCol","0"),c.autoAddRow=
-"1"==mxUtils.getValue(d,"autoAddRow",c.autoAddCol?"0":"1"),c.colWidths=d.colWidths||"100",c.rowHeights=d.rowHeights||"50",c}return f.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(b){return Graph.processFontStyle(x.apply(this,arguments))};var G=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(b,d,c,f,e,g,l,k,m,n,q){G.apply(this,arguments);Graph.processFontAttributes(q)};
+"1"==mxUtils.getValue(d,"autoAddRow",c.autoAddCol?"0":"1"),c.colWidths=d.colWidths||"100",c.rowHeights=d.rowHeights||"50",c}return f.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(b){return Graph.processFontStyle(x.apply(this,arguments))};var E=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(b,d,c,f,e,g,l,k,m,n,q){E.apply(this,arguments);Graph.processFontAttributes(q)};
var C=mxText.prototype.redraw;mxText.prototype.redraw=function(){C.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(b,d,c){function f(){for(var b=l.getSelectionCells(),d=[],c=0;c<b.length;c++)l.isCellVisible(b[c])&&d.push(b[c]);l.setSelectionCells(d)}function e(b){l.hiddenTags=b?[]:k.slice();f();l.refresh()}function g(b,c){n.innerHTML="";if(0<b.length){var g=document.createElement("table");g.setAttribute("cellpadding",
"2");g.style.boxSizing="border-box";g.style.tableLayout="fixed";g.style.width="100%";var m=document.createElement("tbody");if(null!=b&&0<b.length)for(var q=0;q<b.length;q++)(function(b){var g=0>mxUtils.indexOf(l.hiddenTags,b),n=document.createElement("tr"),q=document.createElement("td");q.style.align="center";q.style.width="16px";var p=document.createElement("img");p.setAttribute("src",g?Editor.visibleImage:Editor.hiddenImage);p.setAttribute("title",mxResources.get(g?"hideIt":"show",[b]));mxUtils.setOpacity(p,
g?75:25);p.style.verticalAlign="middle";p.style.cursor="pointer";p.style.width="16px";if(d||Editor.isDarkMode())p.style.filter="invert(100%)";q.appendChild(p);mxEvent.addListener(p,"click",function(d){var c=mxUtils.indexOf(l.hiddenTags,b);mxEvent.isShiftDown(d)?e(0<=mxUtils.indexOf(l.hiddenTags,b)):(0>c?l.hiddenTags.push(b):0<=c&&l.hiddenTags.splice(c,1),f(),l.refresh());mxEvent.consume(d)});n.appendChild(q);q=document.createElement("td");q.style.overflow="hidden";q.style.whiteSpace="nowrap";q.style.textOverflow=
@@ -3263,13 +3268,13 @@ if(d||Editor.isDarkMode())p.style.filter="invert(100%)";mxEvent.addListener(p,"c
"border-box";n.style.borderRadius="4px";n.style.userSelect="none";n.style.overflow="auto";n.style.position="absolute";n.style.left="10px";n.style.right="10px";n.style.top="10px";n.style.border=l.isEnabled()?"1px solid #808080":"none";n.style.bottom=l.isEnabled()?"48px":"10px";m.appendChild(n);var q=mxUtils.button(mxResources.get("reset"),function(b){l.hiddenTags=[];mxEvent.isShiftDown(b)||(k=l.hiddenTags.slice());f();l.refresh()});q.setAttribute("title",mxResources.get("reset"));q.className="geBtn";
q.style.margin="0 4px 0 0";var p=mxUtils.button(mxResources.get("add"),function(){null!=c&&c(k,function(b){k=b;u()})});p.setAttribute("title",mxResources.get("add"));p.className="geBtn";p.style.margin="0";l.addListener(mxEvent.ROOT,function(){k=l.hiddenTags.slice()});var u=mxUtils.bind(this,function(d,c){if(b()){for(var f=l.getAllTags(),e=0;e<f.length;e++)0>mxUtils.indexOf(k,f[e])&&k.push(f[e]);k.sort();l.isSelectionEmpty()?g(k):g(k,l.getCommonTagsForCells(l.getSelectionCells()))}});l.selectionModel.addListener(mxEvent.CHANGE,
u);l.model.addListener(mxEvent.CHANGE,u);l.addListener(mxEvent.REFRESH,u);var v=document.createElement("div");v.style.boxSizing="border-box";v.style.whiteSpace="nowrap";v.style.position="absolute";v.style.overflow="hidden";v.style.bottom="0px";v.style.height="42px";v.style.right="10px";v.style.left="10px";l.isEnabled()&&(v.appendChild(q),v.appendChild(p),m.appendChild(v));return{div:m,refresh:u}};Graph.prototype.getCustomFonts=function(){var b=this.extFonts,b=null!=b?b.slice():[],d;for(d in Graph.customFontElements){var c=
-Graph.customFontElements[d];b.push({name:c.name,url:c.url})}return b};Graph.prototype.setFont=function(b,d){Graph.addFont(b,d);document.execCommand("fontname",!1,b);if(null!=d){var c=this.cellEditor.textarea.getElementsByTagName("font");d=Graph.getFontUrl(b,d);for(var f=0;f<c.length;f++)c[f].getAttribute("face")==b&&c[f].getAttribute("data-font-src")!=d&&c[f].setAttribute("data-font-src",d)}};var E=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return E.apply(this,
+Graph.customFontElements[d];b.push({name:c.name,url:c.url})}return b};Graph.prototype.setFont=function(b,d){Graph.addFont(b,d);document.execCommand("fontname",!1,b);if(null!=d){var c=this.cellEditor.textarea.getElementsByTagName("font");d=Graph.getFontUrl(b,d);for(var f=0;f<c.length;f++)c[f].getAttribute("face")==b&&c[f].getAttribute("data-font-src")!=d&&c[f].setAttribute("data-font-src",d)}};var F=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return F.apply(this,
arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var b=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=b)for(var d in b)this.globalVars[d]=b[d]}catch(A){null!=window.console&&console.log("Error in vars URL parameter: "+A)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):
-{}};var J=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(b){var d=J.apply(this,arguments);null==d&&null!=this.globalVars&&(d=this.globalVars[b]);return d};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var b=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(b.ownerDocument)).decode(b)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var L=Graph.prototype.getSvg;Graph.prototype.getSvg=
-function(b,d,c,f,e,g,l,k,m,n,q,p,u,v){var x=null,t=null;p||null==this.themes||"darkTheme"!=this.defaultThemeName||(x=this.stylesheet,t=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":"#2a2a2a",this.stylesheet=this.getDefaultStylesheet(),this.refresh());var y=L.apply(this,arguments),C=this.getCustomFonts();if(q&&0<C.length){var B=y.ownerDocument,A=null!=B.createElementNS?B.createElementNS(mxConstants.NS_SVG,"style"):B.createElement("style");
-null!=B.setAttributeNS?A.setAttributeNS("type","text/css"):A.setAttribute("type","text/css");for(var F="",N="",D=0;D<C.length;D++){var E=C[D].name,I=C[D].url;Graph.isCssFontUrl(I)?F+="@import url("+I+");\n":N+='@font-face {\nfont-family: "'+E+'";\nsrc: url("'+I+'");\n}\n'}A.appendChild(B.createTextNode(F+N));y.getElementsByTagName("defs")[0].appendChild(A)}null!=x&&(this.defaultPageBackgroundColor=t,this.stylesheet=x,this.refresh());return y};var H=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=
+{}};var I=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(b){var d=I.apply(this,arguments);null==d&&null!=this.globalVars&&(d=this.globalVars[b]);return d};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var b=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(b.ownerDocument)).decode(b)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var L=Graph.prototype.getSvg;Graph.prototype.getSvg=
+function(b,d,c,f,e,g,l,k,m,n,q,p,u,v){var x=null,t=null;p||null==this.themes||"darkTheme"!=this.defaultThemeName||(x=this.stylesheet,t=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":"#2a2a2a",this.stylesheet=this.getDefaultStylesheet(),this.refresh());var y=L.apply(this,arguments),C=this.getCustomFonts();if(q&&0<C.length){var B=y.ownerDocument,N=null!=B.createElementNS?B.createElementNS(mxConstants.NS_SVG,"style"):B.createElement("style");
+null!=B.setAttributeNS?N.setAttributeNS("type","text/css"):N.setAttribute("type","text/css");for(var G="",A="",D=0;D<C.length;D++){var F=C[D].name,E=C[D].url;Graph.isCssFontUrl(E)?G+="@import url("+E+");\n":A+='@font-face {\nfont-family: "'+F+'";\nsrc: url("'+E+'");\n}\n'}N.appendChild(B.createTextNode(G+A));y.getElementsByTagName("defs")[0].appendChild(N)}null!=x&&(this.defaultPageBackgroundColor=t,this.stylesheet=x,this.refresh());return y};var H=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=
function(){var b=H.apply(this,arguments);if(this.mathEnabled){var d=b.drawText;b.drawText=function(b,c){if(null!=b.text&&null!=b.text.value&&b.text.checkBounds()&&(mxUtils.isNode(b.text.value)||b.text.dialect==mxConstants.DIALECT_STRICTHTML)){var f=b.text.getContentNode();if(null!=f){f=f.cloneNode(!0);if(f.getElementsByTagNameNS)for(var e=f.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<e.length;)e[0].parentNode.removeChild(e[0]);null!=f.innerHTML&&(e=b.text.value,b.text.value=
-f.innerHTML,d.apply(this,arguments),b.text.value=e)}}else d.apply(this,arguments)}}return b};var K=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){K.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var b=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||
+f.innerHTML,d.apply(this,arguments),b.text.value=e)}}else d.apply(this,arguments)}}return b};var J=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){J.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var b=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||
this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",b.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,b.ownerSVGElement))}};
Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&this.setBackgroundImage(this.backgroundImage)};var B=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){B.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(b){"data:action/json,"==b.substring(0,17)&&(b=JSON.parse(b.substring(17)),null!=b.actions&&this.executeCustomActions(b.actions))};Graph.prototype.executeCustomActions=
function(b,d){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var c=!1,f=0,e=0,g=mxUtils.bind(this,function(){c||(c=!0,this.model.beginUpdate())}),l=mxUtils.bind(this,function(){c&&(c=!1,this.model.endUpdate())}),k=mxUtils.bind(this,function(){0<
@@ -3305,30 +3310,30 @@ mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupN
[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=
[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=
[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(b){var d=null;null!=b&&0<b.length&&("ER"==b.substring(0,2)?d="mxgraph.er":"sysML"==b.substring(0,5)&&(d="mxgraph.sysml"));return d};var P=mxMarker.createMarker;mxMarker.createMarker=function(b,d,c,f,e,g,l,k,m,n){if(null!=c&&null==mxMarker.markers[c]){var q=this.getPackageForType(c);null!=q&&mxStencilRegistry.getStencil(q)}return P.apply(this,arguments)};PrintDialog.prototype.create=function(b,d){function c(){v.value=Math.max(1,
-Math.min(k,Math.max(parseInt(v.value),parseInt(u.value))));u.value=Math.max(1,Math.min(k,Math.min(parseInt(v.value),parseInt(u.value))))}function f(d){function c(d,c,l){var g=d.useCssTransforms,k=d.currentTranslate,m=d.currentScale,n=d.view.translate,q=d.view.scale;d.useCssTransforms&&(d.useCssTransforms=!1,d.currentTranslate=new mxPoint(0,0),d.currentScale=1,d.view.translate=new mxPoint(0,0),d.view.scale=1);var p=d.getGraphBounds(),u=0,v=0,x=K.get(),t=1/d.pageScale,B=C.checked;if(B)var t=parseInt(M.value),
+Math.min(k,Math.max(parseInt(v.value),parseInt(u.value))));u.value=Math.max(1,Math.min(k,Math.min(parseInt(v.value),parseInt(u.value))))}function f(d){function c(d,c,g){var l=d.useCssTransforms,k=d.currentTranslate,m=d.currentScale,n=d.view.translate,q=d.view.scale;d.useCssTransforms&&(d.useCssTransforms=!1,d.currentTranslate=new mxPoint(0,0),d.currentScale=1,d.view.translate=new mxPoint(0,0),d.view.scale=1);var p=d.getGraphBounds(),u=0,v=0,x=J.get(),t=1/d.pageScale,B=C.checked;if(B)var t=parseInt(M.value),
N=parseInt(R.value),t=Math.min(x.height*N/(p.height/d.view.scale),x.width*t/(p.width/d.view.scale));else t=parseInt(y.value)/(100*d.pageScale),isNaN(t)&&(f=1/d.pageScale,y.value="100 %");x=mxRectangle.fromRectangle(x);x.width=Math.ceil(x.width*f);x.height=Math.ceil(x.height*f);t*=f;!B&&d.pageVisible?(p=d.getPageLayout(),u-=p.x*x.width,v-=p.y*x.height):B=!0;if(null==c){c=PrintDialog.createPrintPreview(d,t,x,0,u,v,B);c.pageSelector=!1;c.mathEnabled=!1;u=b.getCurrentFile();null!=u&&(c.title=u.getTitle());
-var E=c.writeHead;c.writeHead=function(c){E.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)c.writeln('<style type="text/css">'),c.writeln(Editor.mathJaxWebkitCss),c.writeln("</style>");mxClient.IS_GC&&(c.writeln('<style type="text/css">'),c.writeln("@media print {"),c.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),c.writeln("}"),c.writeln("</style>"));null!=b.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(b.editor.fontCss),c.writeln("</style>"));for(var f=
-d.getCustomFonts(),e=0;e<f.length;e++){var l=f[e].name,g=f[e].url;Graph.isCssFontUrl(g)?c.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(g)+'" charset="UTF-8" type="text/css">'):(c.writeln('<style type="text/css">'),c.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(l)+'";\nsrc: url("'+mxUtils.htmlEntities(g)+'");\n}'),c.writeln("</style>"))}};if("undefined"!==typeof MathJax){var A=c.renderPage;c.renderPage=function(d,c,f,e,l,g){var k=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&
-!b.editor.useForeignObjectForMath?!0:b.editor.originalNoForeignObject;var m=A.apply(this,arguments);mxClient.NO_FO=k;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:m.className="geDisableMathJax";return m}}u=null;v=e.enableFlowAnimation;e.enableFlowAnimation=!1;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(u=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());c.open(null,null,l,!0);e.enableFlowAnimation=v;null!=u&&(e.stylesheet=u,e.refresh())}else{x=d.background;if(null==
-x||""==x||x==mxConstants.NONE)x="#ffffff";c.backgroundColor=x;c.autoOrigin=B;c.appendGraph(d,t,u,v,l,!0);l=d.getCustomFonts();if(null!=c.wnd)for(u=0;u<l.length;u++)v=l[u].name,B=l[u].url,Graph.isCssFontUrl(B)?c.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(B)+'" charset="UTF-8" type="text/css">'):(c.wnd.document.writeln('<style type="text/css">'),c.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(v)+'";\nsrc: url("'+mxUtils.htmlEntities(B)+'");\n}'),
-c.wnd.document.writeln("</style>"))}g&&(d.useCssTransforms=g,d.currentTranslate=k,d.currentScale=m,d.view.translate=n,d.view.scale=q);return c}var f=parseInt(H.value)/100;isNaN(f)&&(f=1,H.value="100 %");var f=.75*f,g=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(g=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());var l=u.value,k=v.value,n=!q.checked,p=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(b,q.checked,l,k,C.checked,M.value,R.value,parseInt(y.value)/100,parseInt(H.value)/
-100,K.get());else{n&&(n=l==m&&k==m);if(!n&&null!=b.pages&&b.pages.length){var x=0,n=b.pages.length-1;q.checked||(x=parseInt(l)-1,n=parseInt(k)-1);for(var t=x;t<=n;t++){var B=b.pages[t],l=B==b.currentPage?e:null;if(null==l){var l=b.createTemporaryGraph(e.stylesheet),k=!0,x=!1,N=null,E=null;null==B.viewState&&null==B.root&&b.updatePageRoot(B);null!=B.viewState&&(k=B.viewState.pageVisible,x=B.viewState.mathEnabled,N=B.viewState.background,E=B.viewState.backgroundImage,l.extFonts=B.viewState.extFonts);
-l.background=N;l.backgroundImage=null!=E?new mxImage(E.src,E.width,E.height):null;l.pageVisible=k;l.mathEnabled=x;var A=l.getGlobalVariable;l.getGlobalVariable=function(d){return"page"==d?B.getName():"pagenumber"==d?t+1:"pagecount"==d?null!=b.pages?b.pages.length:1:A.apply(this,arguments)};document.body.appendChild(l.container);b.updatePageRoot(B);l.model.setRoot(B.root)}p=c(l,p,t!=n);l!=e&&l.container.parentNode.removeChild(l.container)}}else p=c(e);null==p?b.handleError({message:mxResources.get("errorUpdatingPreview")}):
+var F=c.writeHead;c.writeHead=function(c){F.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)c.writeln('<style type="text/css">'),c.writeln(Editor.mathJaxWebkitCss),c.writeln("</style>");mxClient.IS_GC&&(c.writeln('<style type="text/css">'),c.writeln("@media print {"),c.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),c.writeln("}"),c.writeln("</style>"));null!=b.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(b.editor.fontCss),c.writeln("</style>"));for(var f=
+d.getCustomFonts(),e=0;e<f.length;e++){var g=f[e].name,l=f[e].url;Graph.isCssFontUrl(l)?c.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(l)+'" charset="UTF-8" type="text/css">'):(c.writeln('<style type="text/css">'),c.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(g)+'";\nsrc: url("'+mxUtils.htmlEntities(l)+'");\n}'),c.writeln("</style>"))}};if("undefined"!==typeof MathJax){var E=c.renderPage;c.renderPage=function(d,c,f,e,g,l){var k=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&
+!b.editor.useForeignObjectForMath?!0:b.editor.originalNoForeignObject;var m=E.apply(this,arguments);mxClient.NO_FO=k;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:m.className="geDisableMathJax";return m}}u=null;v=e.enableFlowAnimation;e.enableFlowAnimation=!1;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(u=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());c.open(null,null,g,!0);e.enableFlowAnimation=v;null!=u&&(e.stylesheet=u,e.refresh())}else{x=d.background;if(null==
+x||""==x||x==mxConstants.NONE)x="#ffffff";c.backgroundColor=x;c.autoOrigin=B;c.appendGraph(d,t,u,v,g,!0);g=d.getCustomFonts();if(null!=c.wnd)for(u=0;u<g.length;u++)v=g[u].name,B=g[u].url,Graph.isCssFontUrl(B)?c.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(B)+'" charset="UTF-8" type="text/css">'):(c.wnd.document.writeln('<style type="text/css">'),c.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(v)+'";\nsrc: url("'+mxUtils.htmlEntities(B)+'");\n}'),
+c.wnd.document.writeln("</style>"))}l&&(d.useCssTransforms=l,d.currentTranslate=k,d.currentScale=m,d.view.translate=n,d.view.scale=q);return c}var f=parseInt(H.value)/100;isNaN(f)&&(f=1,H.value="100 %");var f=.75*f,g=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(g=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());var l=u.value,k=v.value,n=!q.checked,p=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(b,q.checked,l,k,C.checked,M.value,R.value,parseInt(y.value)/100,parseInt(H.value)/
+100,J.get());else{n&&(n=l==m&&k==m);if(!n&&null!=b.pages&&b.pages.length){var x=0,n=b.pages.length-1;q.checked||(x=parseInt(l)-1,n=parseInt(k)-1);for(var t=x;t<=n;t++){var B=b.pages[t],l=B==b.currentPage?e:null;if(null==l){var l=b.createTemporaryGraph(e.stylesheet),k=!0,x=!1,N=null,F=null;null==B.viewState&&null==B.root&&b.updatePageRoot(B);null!=B.viewState&&(k=B.viewState.pageVisible,x=B.viewState.mathEnabled,N=B.viewState.background,F=B.viewState.backgroundImage,l.extFonts=B.viewState.extFonts);
+l.background=N;l.backgroundImage=null!=F?new mxImage(F.src,F.width,F.height):null;l.pageVisible=k;l.mathEnabled=x;var E=l.getGlobalVariable;l.getGlobalVariable=function(d){return"page"==d?B.getName():"pagenumber"==d?t+1:"pagecount"==d?null!=b.pages?b.pages.length:1:E.apply(this,arguments)};document.body.appendChild(l.container);b.updatePageRoot(B);l.model.setRoot(B.root)}p=c(l,p,t!=n);l!=e&&l.container.parentNode.removeChild(l.container)}}else p=c(e);null==p?b.handleError({message:mxResources.get("errorUpdatingPreview")}):
(p.mathEnabled&&(n=p.wnd.document,d&&(p.wnd.IMMEDIATE_PRINT=!0),n.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),p.closeDocument(),!p.mathEnabled&&d&&PrintDialog.printPreview(p));null!=g&&(e.stylesheet=g,e.refresh())}}var e=b.editor.graph,g=document.createElement("div"),l=document.createElement("h3");l.style.width="100%";l.style.textAlign="center";l.style.marginTop="0px";mxUtils.write(l,d||mxResources.get("print"));g.appendChild(l);var k=1,m=1,n=
document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");n.appendChild(q);l=document.createElement("span");mxUtils.write(l,mxResources.get("printAllPages"));n.appendChild(l);mxUtils.br(n);var p=q.cloneNode(!0);q.setAttribute("checked","checked");
p.setAttribute("value","range");n.appendChild(p);l=document.createElement("span");mxUtils.write(l,mxResources.get("pages")+":");n.appendChild(l);var u=document.createElement("input");u.style.cssText="margin:0 8px 0 8px;";u.setAttribute("value","1");u.setAttribute("type","number");u.setAttribute("min","1");u.style.width="50px";n.appendChild(u);l=document.createElement("span");mxUtils.write(l,mxResources.get("to"));n.appendChild(l);var v=u.cloneNode(!0);n.appendChild(v);mxEvent.addListener(u,"focus",
function(){p.checked=!0});mxEvent.addListener(v,"focus",function(){p.checked=!0});mxEvent.addListener(u,"change",c);mxEvent.addListener(v,"change",c);if(null!=b.pages&&(k=b.pages.length,null!=b.currentPage))for(l=0;l<b.pages.length;l++)if(b.currentPage==b.pages[l]){m=l+1;u.value=m;v.value=m;break}u.setAttribute("max",k);v.setAttribute("max",k);b.isPagesEnabled()?1<k&&(g.appendChild(n),p.checked=!0):p.checked=!0;var x=document.createElement("div");x.style.marginBottom="10px";var t=document.createElement("input");
t.style.marginRight="8px";t.setAttribute("value","adjust");t.setAttribute("type","radio");t.setAttribute("name","printZoom");x.appendChild(t);l=document.createElement("span");mxUtils.write(l,mxResources.get("adjustTo"));x.appendChild(l);var y=document.createElement("input");y.style.cssText="margin:0 8px 0 8px;";y.setAttribute("value","100 %");y.style.width="50px";x.appendChild(y);mxEvent.addListener(y,"focus",function(){t.checked=!0});g.appendChild(x);var n=n.cloneNode(!1),C=t.cloneNode(!0);C.setAttribute("value",
-"fit");t.setAttribute("checked","checked");l=document.createElement("div");l.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";l.appendChild(C);n.appendChild(l);x=document.createElement("table");x.style.display="inline-block";var B=document.createElement("tbody"),N=document.createElement("tr"),E=N.cloneNode(!0),G=document.createElement("td"),P=G.cloneNode(!0),D=G.cloneNode(!0),J=G.cloneNode(!0),F=G.cloneNode(!0),T=G.cloneNode(!0);G.style.textAlign="right";J.style.textAlign=
-"right";mxUtils.write(G,mxResources.get("fitTo"));var M=document.createElement("input");M.style.cssText="margin:0 8px 0 8px;";M.setAttribute("value","1");M.setAttribute("min","1");M.setAttribute("type","number");M.style.width="40px";P.appendChild(M);l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsAcross"));D.appendChild(l);mxUtils.write(J,mxResources.get("fitToBy"));var R=M.cloneNode(!0);F.appendChild(R);mxEvent.addListener(M,"focus",function(){C.checked=!0});mxEvent.addListener(R,
-"focus",function(){C.checked=!0});l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsDown"));T.appendChild(l);N.appendChild(G);N.appendChild(P);N.appendChild(D);E.appendChild(J);E.appendChild(F);E.appendChild(T);B.appendChild(N);B.appendChild(E);x.appendChild(B);n.appendChild(x);g.appendChild(n);n=document.createElement("div");l=document.createElement("div");l.style.fontWeight="bold";l.style.marginBottom="12px";mxUtils.write(l,mxResources.get("paperSize"));n.appendChild(l);
-l=document.createElement("div");l.style.marginBottom="12px";var K=PageSetupDialog.addPageFormatPanel(l,"printdialog",b.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);n.appendChild(l);l=document.createElement("span");mxUtils.write(l,mxResources.get("pageScale"));n.appendChild(l);var H=document.createElement("input");H.style.cssText="margin:0 8px 0 8px;";H.setAttribute("value","100 %");H.style.width="60px";n.appendChild(H);g.appendChild(n);l=document.createElement("div");l.style.cssText=
+"fit");t.setAttribute("checked","checked");l=document.createElement("div");l.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";l.appendChild(C);n.appendChild(l);x=document.createElement("table");x.style.display="inline-block";var B=document.createElement("tbody"),N=document.createElement("tr"),F=N.cloneNode(!0),E=document.createElement("td"),P=E.cloneNode(!0),D=E.cloneNode(!0),I=E.cloneNode(!0),G=E.cloneNode(!0),T=E.cloneNode(!0);E.style.textAlign="right";I.style.textAlign=
+"right";mxUtils.write(E,mxResources.get("fitTo"));var M=document.createElement("input");M.style.cssText="margin:0 8px 0 8px;";M.setAttribute("value","1");M.setAttribute("min","1");M.setAttribute("type","number");M.style.width="40px";P.appendChild(M);l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsAcross"));D.appendChild(l);mxUtils.write(I,mxResources.get("fitToBy"));var R=M.cloneNode(!0);G.appendChild(R);mxEvent.addListener(M,"focus",function(){C.checked=!0});mxEvent.addListener(R,
+"focus",function(){C.checked=!0});l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsDown"));T.appendChild(l);N.appendChild(E);N.appendChild(P);N.appendChild(D);F.appendChild(I);F.appendChild(G);F.appendChild(T);B.appendChild(N);B.appendChild(F);x.appendChild(B);n.appendChild(x);g.appendChild(n);n=document.createElement("div");l=document.createElement("div");l.style.fontWeight="bold";l.style.marginBottom="12px";mxUtils.write(l,mxResources.get("paperSize"));n.appendChild(l);
+l=document.createElement("div");l.style.marginBottom="12px";var J=PageSetupDialog.addPageFormatPanel(l,"printdialog",b.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);n.appendChild(l);l=document.createElement("span");mxUtils.write(l,mxResources.get("pageScale"));n.appendChild(l);var H=document.createElement("input");H.style.cssText="margin:0 8px 0 8px;";H.setAttribute("value","100 %");H.style.width="60px";n.appendChild(H);g.appendChild(n);l=document.createElement("div");l.style.cssText=
"text-align:right;margin:48px 0 0 0;";n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";b.editor.cancelFirst&&l.appendChild(n);b.isOffline()||(x=mxUtils.button(mxResources.get("help"),function(){e.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),x.className="geBtn",l.appendChild(x));PrintDialog.previewEnabled&&(x=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();f(!1)}),x.className="geBtn",l.appendChild(x));x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?
"print":"ok"),function(){b.hideDialog();f(!0)});x.className="geBtn gePrimaryBtn";l.appendChild(x);b.editor.cancelFirst||l.appendChild(n);g.appendChild(l);this.container=g};var T=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var b=this.image;null!=b&&null!=b.src&&Graph.isPageLink(b.src)&&
(b={originalSrc:b.src});this.page.viewState.backgroundImage=b}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else T.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=
-this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var N=document.createElement("canvas"),R=new Image;R.onload=function(){try{N.getContext("2d").drawImage(R,0,0);var b=N.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=b&&6<b.length}catch(D){}};R.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(F){}})();
+this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var N=document.createElement("canvas"),R=new Image;R.onload=function(){try{N.getContext("2d").drawImage(R,0,0);var b=N.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=b&&6<b.length}catch(D){}};R.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(G){}})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};b.afterDecode=function(b,e,k){k.previousColor=k.color;k.previousImage=k.image;k.previousFormat=k.format;null!=k.foldingEnabled&&(k.foldingEnabled=!k.foldingEnabled);null!=k.mathEnabled&&(k.mathEnabled=!k.mathEnabled);null!=k.shadowVisible&&(k.shadowVisible=!k.shadowVisible);return k};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="15.2.7";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="15.2.9";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=
!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,
noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(b,c,e,g,k,n,p){n=null!=n?n:0<=b.indexOf("NetworkError")||0<=b.indexOf("SecurityError")||0<=b.indexOf("NS_ERROR_FAILURE")||0<=b.indexOf("out of memory")?"CONFIG":
@@ -3352,11 +3357,11 @@ d&&k.selectPage(k.pages[0])};if(39==b.keyCode)return function(){d<k.pages.length
15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var k=mxUtils.parseXml(b),n=this.editor.extractGraphModel(k.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),d=null!=n?mxUtils.getXml(n):""}catch(u){}return d};EditorUi.prototype.validateFileData=function(b){if(null!=b&&0<b.length){var d=b.indexOf('<meta charset="utf-8">');0<=d&&(b=b.slice(0,d)+'<meta charset="utf-8"/>'+b.slice(d+23-1,b.length));b=Graph.zapGremlins(b)}return b};
EditorUi.prototype.replaceFileData=function(b){b=this.validateFileData(b);b=null!=b&&0<b.length?mxUtils.parseXml(b).documentElement:null;var d=null!=b?this.editor.extractGraphModel(b,!0):null;null!=d&&(b=d);if(null!=b){d=this.editor.graph;d.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,e=b.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<e.length||1==e.length&&e[0].hasAttribute("name")){this.fileNode=b;this.pages=null!=this.pages?this.pages:[];for(var g=e.length-
1;0<=g;g--){var k=this.updatePageRoot(new DiagramPage(e[g]));null==k.getName()&&k.setName(mxResources.get("pageWithNumber",[g+1]));d.model.execute(new ChangePage(this,k,0==g?k:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),d.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),
-this.editor.setGraphXml(b),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(g=0;g<c.length;g++)d.model.execute(new ChangePage(this,c[g],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(b,c,e,g,k,n,p,v,t,x,G){c=null!=c?c:this.editor.graph;k=null!=k?k:!1;t=null!=t?t:!0;var d,f=null;null==e||e.getMode()==App.MODE_DEVICE||e.getMode()==App.MODE_BROWSER?d="_blank":f=d=g;if(null==b)return"";var l=b;if("mxfile"!=l.nodeName.toLowerCase()){if(G){var m=
+this.editor.setGraphXml(b),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(g=0;g<c.length;g++)d.model.execute(new ChangePage(this,c[g],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(b,c,e,g,k,n,p,v,t,x,E){c=null!=c?c:this.editor.graph;k=null!=k?k:!1;t=null!=t?t:!0;var d,f=null;null==e||e.getMode()==App.MODE_DEVICE||e.getMode()==App.MODE_BROWSER?d="_blank":f=d=g;if(null==b)return"";var l=b;if("mxfile"!=l.nodeName.toLowerCase()){if(E){var m=
b.ownerDocument.createElement("diagram");m.setAttribute("id",Editor.guid());m.appendChild(b)}else{m=Graph.zapGremlins(mxUtils.getXml(b));l=Graph.compress(m);if(Graph.decompress(l)!=m)return m;m=b.ownerDocument.createElement("diagram");m.setAttribute("id",Editor.guid());mxUtils.setTextContent(m,l)}l=b.ownerDocument.createElement("mxfile");l.appendChild(m)}x?(l=l.cloneNode(!0),l.removeAttribute("modified"),l.removeAttribute("host"),l.removeAttribute("agent"),l.removeAttribute("etag"),l.removeAttribute("userAgent"),
l.removeAttribute("version"),l.removeAttribute("editor"),l.removeAttribute("type")):(l.removeAttribute("userAgent"),l.removeAttribute("version"),l.removeAttribute("editor"),l.removeAttribute("pages"),l.removeAttribute("type"),mxClient.IS_CHROMEAPP?l.setAttribute("host","Chrome"):EditorUi.isElectronApp?l.setAttribute("host","Electron"):l.setAttribute("host",window.location.hostname),l.setAttribute("modified",(new Date).toISOString()),l.setAttribute("agent",navigator.appVersion),l.setAttribute("version",
-EditorUi.VERSION),l.setAttribute("etag",Editor.guid()),b=null!=e?e.getMode():this.mode,null!=b&&l.setAttribute("type",b),1<l.getElementsByTagName("diagram").length&&null!=this.pages&&l.setAttribute("pages",this.pages.length));G=G?mxUtils.getPrettyXml(l):mxUtils.getXml(l);if(!n&&!k&&(p||null!=e&&/(\.html)$/i.test(e.getTitle())))G=this.getHtml2(mxUtils.getXml(l),c,null!=e?e.getTitle():null,d,f);else if(n||!k&&null!=e&&/(\.svg)$/i.test(e.getTitle()))null==e||e.getMode()!=App.MODE_DEVICE&&e.getMode()!=
-App.MODE_BROWSER||(g=null),G=this.getEmbeddedSvg(G,c,g,null,v,t,f);return G};EditorUi.prototype.getXmlFileData=function(b,c,e,g){b=null!=b?b:!0;c=null!=c?c:!1;e=null!=e?e:!Editor.compressXml;var d=this.editor.getGraphXml(b,g);if(b&&null!=this.fileNode&&null!=this.currentPage)if(b=function(b){var c=b.getElementsByTagName("mxGraphModel"),c=0<c.length?c[0]:null;null==c&&e?(c=mxUtils.trim(mxUtils.getTextContent(b)),b=b.cloneNode(!1),0<c.length&&(c=Graph.decompress(c),null!=c&&0<c.length&&b.appendChild(mxUtils.parseXml(c).documentElement))):
+EditorUi.VERSION),l.setAttribute("etag",Editor.guid()),b=null!=e?e.getMode():this.mode,null!=b&&l.setAttribute("type",b),1<l.getElementsByTagName("diagram").length&&null!=this.pages&&l.setAttribute("pages",this.pages.length));E=E?mxUtils.getPrettyXml(l):mxUtils.getXml(l);if(!n&&!k&&(p||null!=e&&/(\.html)$/i.test(e.getTitle())))E=this.getHtml2(mxUtils.getXml(l),c,null!=e?e.getTitle():null,d,f);else if(n||!k&&null!=e&&/(\.svg)$/i.test(e.getTitle()))null==e||e.getMode()!=App.MODE_DEVICE&&e.getMode()!=
+App.MODE_BROWSER||(g=null),E=this.getEmbeddedSvg(E,c,g,null,v,t,f);return E};EditorUi.prototype.getXmlFileData=function(b,c,e,g){b=null!=b?b:!0;c=null!=c?c:!1;e=null!=e?e:!Editor.compressXml;var d=this.editor.getGraphXml(b,g);if(b&&null!=this.fileNode&&null!=this.currentPage)if(b=function(b){var c=b.getElementsByTagName("mxGraphModel"),c=0<c.length?c[0]:null;null==c&&e?(c=mxUtils.trim(mxUtils.getTextContent(b)),b=b.cloneNode(!1),0<c.length&&(c=Graph.decompress(c),null!=c&&0<c.length&&b.appendChild(mxUtils.parseXml(c).documentElement))):
null==c||e?b=b.cloneNode(!0):(b=b.cloneNode(!1),mxUtils.setTextContent(b,Graph.compressNode(c)));d.appendChild(b)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(d)),d=this.fileNode.cloneNode(!1),c)b(this.currentPage.node);else for(c=0;c<this.pages.length;c++){var f=this.pages[c],l=f.node;if(f!=this.currentPage)if(f.needsUpdate){var k=new mxCodec(mxUtils.createXmlDocument()),k=k.encode(new mxGraphModel(f.root));this.editor.graph.saveViewState(f.viewState,
k,null,g);EditorUi.removeChildNodes(l);mxUtils.setTextContent(l,Graph.compressNode(k));delete f.needsUpdate}else g&&(this.updatePageRoot(f),null!=f.viewState.backgroundImage&&(null!=f.viewState.backgroundImage.originalSrc?f.viewState.backgroundImage=this.createImageForPageLink(f.viewState.backgroundImage.originalSrc,f):Graph.isPageLink(f.viewState.backgroundImage.src)&&(f.viewState.backgroundImage=this.createImageForPageLink(f.viewState.backgroundImage.src,f))),null!=f.viewState.backgroundImage&&
null!=f.viewState.backgroundImage.originalSrc&&(k=new mxCodec(mxUtils.createXmlDocument()),k=k.encode(new mxGraphModel(f.root)),this.editor.graph.saveViewState(f.viewState,k,null,g),l=l.cloneNode(!1),mxUtils.setTextContent(l,Graph.compressNode(k))));b(l)}return d};EditorUi.prototype.anonymizeString=function(b,c){for(var d=[],f=0;f<b.length;f++){var e=b.charAt(f);0<=EditorUi.ignoredAnonymizedChars.indexOf(e)?d.push(e):isNaN(parseInt(e))?e.toLowerCase()!=e?d.push(String.fromCharCode(65+Math.round(25*
@@ -3366,8 +3371,8 @@ b[EditorUi.DIFF_INSERT][d].data=mxUtils.getXml(c)}catch(n){b[EditorUi.DIFF_INSER
b.setAttribute(b.attributes[d].name,this.anonymizeString(b.attributes[d].value,c));if(null!=b.childNodes)for(d=0;d<b.childNodes.length;d++)this.anonymizeAttributes(b.childNodes[d],c)};EditorUi.prototype.anonymizeNode=function(b,c){for(var d=b.getElementsByTagName("mxCell"),f=0;f<d.length;f++)null!=d[f].getAttribute("value")&&d[f].setAttribute("value","["+d[f].getAttribute("value").length+"]"),null!=d[f].getAttribute("xmlValue")&&d[f].setAttribute("xmlValue","["+d[f].getAttribute("xmlValue").length+
"]"),null!=d[f].getAttribute("style")&&d[f].setAttribute("style","["+d[f].getAttribute("style").length+"]"),null!=d[f].parentNode&&"root"!=d[f].parentNode.nodeName&&null!=d[f].parentNode.parentNode&&(d[f].setAttribute("id",d[f].parentNode.getAttribute("id")),d[f].parentNode.parentNode.replaceChild(d[f],d[f].parentNode));return b};EditorUi.prototype.synchronizeCurrentFile=function(b){var d=this.getCurrentFile();null!=d&&(d.savingFile?this.handleError({message:mxResources.get("busy")}):!b&&d.invalidChecksum?
d.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(d.clearAutosave(),this.editor.setStatus(""),b?d.reloadFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){d.handleFileError(b,!0)})):d.synchronizeFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){d.handleFileError(b,!0)}))))};EditorUi.prototype.getFileData=function(b,c,e,g,k,n,p,
-v,t,x,G){k=null!=k?k:!0;n=null!=n?n:!1;var d=this.editor.graph;if(c||!b&&null!=t&&/(\.svg)$/i.test(t.getTitle())){var f=null!=d.themes&&"darkTheme"==d.defaultThemeName;x=!1;if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var l=d.getGlobalVariable,d=this.createTemporaryGraph(d.getStylesheet()),m=this.pages[0];d.getGlobalVariable=function(b){return"page"==b?m.getName():"pagenumber"==b?1:l.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(m.root)}}p=null!=p?p:this.getXmlFileData(k,
-n,x,G);t=null!=t?t:this.getCurrentFile();b=this.createFileData(p,d,t,window.location.href,b,c,e,g,k,v,x);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);return b};EditorUi.prototype.getHtml=function(b,c,e,g,k,n){n=null!=n?n:!0;var d=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=c){var d=n?c.getGraphBounds():c.getBoundingBox(c.getSelectionCells()),l=c.view.scale;n=Math.floor(d.x/l-c.view.translate.x);l=Math.floor(d.y/l-c.view.translate.y);d=c.background;null==k&&
+v,t,x,E){k=null!=k?k:!0;n=null!=n?n:!1;var d=this.editor.graph;if(c||!b&&null!=t&&/(\.svg)$/i.test(t.getTitle())){var f=null!=d.themes&&"darkTheme"==d.defaultThemeName;x=!1;if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var l=d.getGlobalVariable,d=this.createTemporaryGraph(d.getStylesheet()),m=this.pages[0];d.getGlobalVariable=function(b){return"page"==b?m.getName():"pagenumber"==b?1:l.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(m.root)}}p=null!=p?p:this.getXmlFileData(k,
+n,x,E);t=null!=t?t:this.getCurrentFile();b=this.createFileData(p,d,t,window.location.href,b,c,e,g,k,v,x);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);return b};EditorUi.prototype.getHtml=function(b,c,e,g,k,n){n=null!=n?n:!0;var d=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=c){var d=n?c.getGraphBounds():c.getBoundingBox(c.getSelectionCells()),l=c.view.scale;n=Math.floor(d.x/l-c.view.translate.x);l=Math.floor(d.y/l-c.view.translate.y);d=c.background;null==k&&
(c=this.getBasenames().join(";"),0<c.length&&(f=EditorUi.drawHost+"/embed.js?s="+c));b.setAttribute("x0",n);b.setAttribute("y0",l)}null!=b&&(b.setAttribute("pan","1"),b.setAttribute("zoom","1"),b.setAttribute("resize","0"),b.setAttribute("fit","0"),b.setAttribute("border","20"),b.setAttribute("links","1"),null!=g&&b.setAttribute("edit",g));null!=k&&(k=k.replace(/&/g,"&amp;"));b=null!=b?Graph.zapGremlins(mxUtils.getXml(b)):"";g=Graph.compress(b);Graph.decompress(g)!=b&&(g=encodeURIComponent(b));return(null==
k?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=k?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==k?null!=e?"<title>"+mxUtils.htmlEntities(e)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=k?'<meta http-equiv="refresh" content="0;URL=\''+k+"'\"/>\n":"")+"</head>\n<body"+(null==k&&null!=d&&d!=mxConstants.NONE?' style="background-color:'+d+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+
g+"</div>\n</div>\n"+(null==k?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+k+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(b,c,e,g,k){c=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=k&&(k=k.replace(/&/g,"&amp;"));b={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,
@@ -3377,134 +3382,133 @@ function(b){b=this.validateFileData(b);this.pages=this.fileNode=this.currentPage
null;this.fileNode=b;this.pages=[];for(var e=0;e<d.length;e++)null==d[e].getAttribute("id")&&d[e].setAttribute("id",e),b=new DiagramPage(d[e]),null==b.getName()&&b.setName(mxResources.get("pageWithNumber",[e+1])),this.pages.push(b),null!=urlParams["page-id"]&&b.getId()==urlParams["page-id"]&&(c=b);this.currentPage=null!=c?c:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];b=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=b&&(this.fileNode=b.ownerDocument.createElement("mxfile"),
this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var g=urlParams["layer-ids"].split(" ");b={};for(e=0;e<g.length;e++)b[g[e]]=!0;for(var k=this.editor.graph.getModel(),p=k.getChildren(k.root),e=0;e<p.length;e++){var v=p[e];k.setVisible(v,b[v.id]||
!1)}}catch(y){}};EditorUi.prototype.getBaseFilename=function(b){var d=this.getCurrentFile(),d=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(d)||/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||/(\.png)$/i.test(d))d=d.substring(0,d.lastIndexOf("."));/(\.drawio)$/i.test(d)&&(d=d.substring(0,d.lastIndexOf(".")));!b&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(d=d+"-"+
-this.currentPage.getName());return d};EditorUi.prototype.downloadFile=function(b,c,e,g,k,n,p,v,t,x,G,C){try{g=null!=g?g:this.editor.graph.isSelectionEmpty();var d=this.getBaseFilename(!k),f=d+("xml"==b||"pdf"==b&&G?".drawio":"")+"."+b;if("xml"==b){var l='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,g,k,null,null,null,c);this.saveData(f,b,l,"text/xml")}else if("html"==b)l=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(f,b,l,"text/html");else if("svg"!=
-b&&"xmlsvg"!=b||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==b?f=d+".png":"jpeg"==b&&(f=d+".jpg"),this.saveRequest(f,b,mxUtils.bind(this,function(d,c){try{var f=this.editor.graph.pageVisible;null!=n&&(this.editor.graph.pageVisible=n);var e=this.createDownloadRequest(d,b,g,c,p,k,v,t,x,G,C);this.editor.graph.pageVisible=f;return e}catch(F){this.handleError(F)}}));else{var m=null,q=mxUtils.bind(this,function(b){b.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",b,"image/svg+xml"):
-this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(m)}))});if("svg"==b){var u=this.editor.graph.background;if(p||u==mxConstants.NONE)u=null;var y=this.editor.graph.getSvg(u,null,null,null,null,g);e&&this.editor.graph.addSvgShadow(y);this.editor.convertImages(y,mxUtils.bind(this,mxUtils.bind(this,function(b){this.spinner.stop();q('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
-mxUtils.getXml(b))})))}else f=d+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(b){this.spinner.stop();q(b)}),g)}}catch(P){this.handleError(P)}};EditorUi.prototype.createDownloadRequest=function(b,c,e,g,k,n,p,v,t,x,G){var d=this.editor.graph,f=d.getGraphBounds();e=this.getFileData(!0,null,null,null,e,0==n?!1:"xmlpng"!=c,null,null,null,!1,"pdf"==c);var l="",m="";if(f.width*f.height>MAX_AREA||e.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};x=x?"1":"0";"pdf"==
-c&&(null!=G?m="&from="+G.from+"&to="+G.to:0==n&&(m="&allPages=1"));if("xmlpng"==c&&(x="1",c="png",null!=this.pages&&null!=this.currentPage))for(n=0;n<this.pages.length;n++)if(this.pages[n]==this.currentPage){l="&from="+n;break}n=d.background;"png"!=c&&"pdf"!=c||!k?k||null!=n&&n!=mxConstants.NONE||(n="#ffffff"):n=mxConstants.NONE;k={globalVars:d.getExportVariables()};t&&(k.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});Graph.translateDiagram&&(k.diagramLanguage=Graph.diagramLanguage);
-return new mxXmlRequest(EXPORT_URL,"format="+c+l+m+"&bg="+(null!=n?n:mxConstants.NONE)+"&base64="+g+"&embedXml="+x+"&xml="+encodeURIComponent(e)+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(k))+(null!=p?"&scale="+p:"")+(null!=v?"&border="+v:""))};EditorUi.prototype.setMode=function(b,c){this.mode=b};EditorUi.prototype.loadDescriptor=function(b,c,e){var d=window.location.hash,f=mxUtils.bind(this,function(f){var e=null!=b.data?b.data:"";null!=f&&0<f.length&&
-(0<e.length&&(e+="\n"),e+=f);f=new LocalFile(this,"csv"!=b.format&&0<e.length?e:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);f.getHash=function(){return d};this.fileLoaded(f);"csv"==b.format&&this.importCsv(e,mxUtils.bind(this,function(b){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=b.update){var g=null!=b.interval?parseInt(b.interval):6E4,l=null,k=mxUtils.bind(this,function(){var d=this.currentPage;
-mxUtils.post(b.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(b){d===this.currentPage&&(200<=b.getStatus()&&300>=b.getStatus()?(this.updateDiagram(b.getText()),m()):this.handleError({message:mxResources.get("error")+" "+b.getStatus()}))}),mxUtils.bind(this,function(b){this.handleError(b)}))}),m=mxUtils.bind(this,function(){window.clearTimeout(l);l=window.setTimeout(k,g)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){m();
-k()}));m();k()}null!=c&&c()});null!=b.url&&0<b.url.length?this.editor.loadUrl(b.url,mxUtils.bind(this,function(b){f(b)}),mxUtils.bind(this,function(b){null!=e&&e(b)})):f("")};EditorUi.prototype.updateDiagram=function(b){function d(b){var d=new mxCellOverlay(b.image||g.warningImage,b.tooltip,b.align,b.valign,b.offset);d.addListener(mxEvent.CLICK,function(d,c){e.alert(b.tooltip)});return d}var c=null,e=this;if(null!=b&&0<b.length&&(c=mxUtils.parseXml(b),b=null!=c?c.documentElement:null,null!=b&&"updates"==
-b.nodeName)){var g=this.editor.graph,k=g.getModel();k.beginUpdate();var p=null;try{for(b=b.firstChild;null!=b;){if("update"==b.nodeName){var v=k.getCell(b.getAttribute("id"));if(null!=v){try{var t=b.getAttribute("value");if(null!=t){var x=mxUtils.parseXml(t).documentElement;if(null!=x)if("1"==x.getAttribute("replace-value"))k.setValue(v,x);else for(var G=x.attributes,C=0;C<G.length;C++)g.setAttributeForCell(v,G[C].nodeName,0<G[C].nodeValue.length?G[C].nodeValue:null)}}catch(P){null!=window.console&&
-console.log("Error in value for "+v.id+": "+P)}try{var E=b.getAttribute("style");null!=E&&g.model.setStyle(v,E)}catch(P){null!=window.console&&console.log("Error in style for "+v.id+": "+P)}try{var J=b.getAttribute("icon");if(null!=J){var L=0<J.length?JSON.parse(J):null;null!=L&&L.append||g.removeCellOverlays(v);null!=L&&g.addCellOverlay(v,d(L))}}catch(P){null!=window.console&&console.log("Error in icon for "+v.id+": "+P)}try{var H=b.getAttribute("geometry");if(null!=H){var H=JSON.parse(H),K=g.getCellGeometry(v);
-if(null!=K){K=K.clone();for(key in H){var B=parseFloat(H[key]);"dx"==key?K.x+=B:"dy"==key?K.y+=B:"dw"==key?K.width+=B:"dh"==key?K.height+=B:K[key]=parseFloat(H[key])}g.model.setGeometry(v,K)}}}catch(P){null!=window.console&&console.log("Error in icon for "+v.id+": "+P)}}}else if("model"==b.nodeName){for(var M=b.firstChild;null!=M&&M.nodeType!=mxConstants.NODETYPE_ELEMENT;)M=M.nextSibling;null!=M&&(new mxCodec(b.firstChild)).decode(M,k)}else if("view"==b.nodeName){if(b.hasAttribute("scale")&&(g.view.scale=
-parseFloat(b.getAttribute("scale"))),b.hasAttribute("dx")||b.hasAttribute("dy"))g.view.translate=new mxPoint(parseFloat(b.getAttribute("dx")||0),parseFloat(b.getAttribute("dy")||0))}else"fit"==b.nodeName&&(p=b.hasAttribute("max-scale")?parseFloat(b.getAttribute("max-scale")):1);b=b.nextSibling}}finally{k.endUpdate()}null!=p&&this.chromelessResize&&this.chromelessResize(!0,p)}return c};EditorUi.prototype.getCopyFilename=function(b,c){var d=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename,
-f="",e=d.lastIndexOf(".");0<=e&&(f=d.substring(e),d=d.substring(0,e));if(c)var g=new Date,e=g.getFullYear(),k=g.getMonth()+1,p=g.getDate(),t=g.getHours(),x=g.getMinutes(),g=g.getSeconds(),d=d+(" "+(e+"-"+k+"-"+p+"-"+t+"-"+x+"-"+g));return d=mxResources.get("copyOf",[d])+f};EditorUi.prototype.fileLoaded=function(b,c){var d=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var f=!1;this.hideDialog();null!=d&&(EditorUi.debug("File.closed",[d]),d.removeListener(this.descriptorChangedListener),
-d.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var e=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=d&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!c&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));
-this.editor.setStatus("");this.updateUi();c||this.showSplash()});if(null!=b)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(b);b.addListener("descriptorChanged",this.descriptorChangedListener);b.addListener("contentChanged",this.descriptorChangedListener);b.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(b.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();
-this.updateUi();b.isEditable()?b.isModified()?(b.addUnsavedStatus(),null!=b.backupPatch&&b.patch([b.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&
-this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));f=!0;this.isOffline()||null==b.getMode()||EditorUi.logEvent({category:b.getMode().toUpperCase()+"-OPEN-FILE-"+b.getHash(),action:"size_"+b.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[b]);if(this.editor.editable&&this.mode==b.getMode()&&b.getMode()!=App.MODE_DEVICE&&null!=b.getMode())try{this.addRecent({id:b.getHash(),title:b.getTitle(),mode:b.getMode()})}catch(u){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+
-1),mxSettings.save()}catch(u){}}catch(u){this.fileLoadedError=u;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=b?b.getHash():"none"),action:"message_"+u.message,label:"stack_"+u.stack})}catch(v){}var g=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=d?this.fileLoaded(d):e()});c?g():this.handleError(u,mxResources.get("errorLoadingFile"),
-g,!0,null,null,!0)}else e();return f};EditorUi.prototype.getHashValueForPages=function(b,c){var d=0,e=new mxGraphModel,f=new mxCodec;null!=c&&(c.byteCount=0,c.attrCount=0,c.eltCount=0,c.nodeCount=0);for(var g=0;g<b.length;g++){this.updatePageRoot(b[g]);var k=b[g].node.cloneNode(!1);k.removeAttribute("name");e.root=b[g].root;var p=f.encode(e);this.editor.graph.saveViewState(b[g].viewState,p,!0);p.removeAttribute("pageWidth");p.removeAttribute("pageHeight");k.appendChild(p);null!=c&&(c.eltCount+=k.getElementsByTagName("*").length,
-c.nodeCount+=k.getElementsByTagName("mxCell").length);d=(d<<5)-d+this.hashValue(k,function(b,d,c,e){return!e||"mxGeometry"!=b.nodeName&&"mxPoint"!=b.nodeName||"x"!=d&&"y"!=d&&"width"!=d&&"height"!=d?e&&"mxCell"==b.nodeName&&"previous"==d?null:c:Math.round(c)},c)<<0}return d};EditorUi.prototype.hashValue=function(b,c,e){var d=0;if(null!=b&&"object"===typeof b&&"number"===typeof b.nodeType&&"string"===typeof b.nodeName&&"function"===typeof b.getAttribute){null!=b.nodeName&&(d^=this.hashValue(b.nodeName,
-c,e));if(null!=b.attributes){null!=e&&(e.attrCount+=b.attributes.length);for(var f=0;f<b.attributes.length;f++){var g=b.attributes[f].name,l=null!=c?c(b,g,b.attributes[f].value,!0):b.attributes[f].value;null!=l&&(d^=this.hashValue(g,c,e)+this.hashValue(l,c,e))}}if(null!=b.childNodes)for(f=0;f<b.childNodes.length;f++)d=(d<<5)-d+this.hashValue(b.childNodes[f],c,e)<<0}else if(null!=b&&"function"!==typeof b){b=String(b);c=0;null!=e&&(e.byteCount+=b.length);for(f=0;f<b.length;f++)c=(c<<5)-c+b.charCodeAt(f)<<
-0;d^=c}return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(b,c,e,g,k,n,p){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(b){null==b&&(b=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,
-b,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(b){var d=mxUtils.createXmlDocument(),c=d.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(b));d.appendChild(c);return mxUtils.getXml(d)};EditorUi.prototype.closeLibrary=function(b){null!=b&&(this.removeLibrarySidebar(b.getHash()),b.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(b.getHash()),".scratchpad"==b.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=
-function(b){var d=this.sidebar.palettes[b];if(null!=d){for(var c=0;c<d.length;c++)d[c].parentNode.removeChild(d[c]);delete this.sidebar.palettes[b]}};EditorUi.prototype.repositionLibrary=function(b){var d=this.sidebar.container;if(null==b){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(b=c[c.length-1].nextSibling)}b=null!=b?b:d.firstChild.nextSibling.nextSibling;var c=d.lastChild,e=c.previousSibling;d.insertBefore(c,b);d.insertBefore(e,c)};EditorUi.prototype.loadLibrary=
-function(b,c){var d=mxUtils.parseXml(b.getData());if("mxlibrary"==d.documentElement.nodeName){var e=JSON.parse(mxUtils.getTextContent(d.documentElement));this.libraryLoaded(b,e,d.documentElement.getAttribute("title"),c)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(b){return""};EditorUi.prototype.libraryLoaded=function(b,c,e,g){if(null!=this.sidebar){b.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(b.getHash());".scratchpad"==b.title&&
-(this.scratchpad=b);var d=this.sidebar.palettes[b.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(b.getHash());var f=null,l=mxUtils.bind(this,function(d,c){0==d.length&&b.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f)):this.addLibraryEntries(d,c)});null!=this.sidebar&&null!=c&&this.sidebar.addEntries(c);e=null!=e&&0<e.length?e:b.getTitle();var k=this.sidebar.addPalette(b.getHash(),
-e,null!=g?g:!0,mxUtils.bind(this,function(b){l(c,b)}));this.repositionLibrary(d);var m=k.parentNode.previousSibling;g=m.getAttribute("title");null!=g&&0<g.length&&".scratchpad"!=b.title&&m.setAttribute("title",this.getLibraryStorageHint(b)+"\n"+g);var p=document.createElement("div");p.style.position="absolute";p.style.right="0px";p.style.top="0px";p.style.padding="8px";p.style.backgroundColor="inherit";m.style.position="relative";var t=document.createElement("img");t.setAttribute("src",Editor.crossImage);
-t.setAttribute("title",mxResources.get("close"));t.setAttribute("valign","absmiddle");t.setAttribute("border","0");t.style.position="relative";t.style.top="2px";t.style.width="14px";t.style.cursor="pointer";t.style.margin="0 3px";Editor.isDarkMode()&&(t.style.filter="invert(100%)");var C=null;if(".scratchpad"!=b.title||this.closableScratchpad)p.appendChild(t),mxEvent.addListener(t,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var c=mxUtils.bind(this,function(){this.closeLibrary(b)});
-null!=C?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(d)}}));if(b.isEditable()){var E=this.editor.graph,J=null,L=mxUtils.bind(this,function(d){this.showLibraryDialog(b.getTitle(),k,c,b,b.getMode());mxEvent.consume(d)}),H=mxUtils.bind(this,function(d){b.setModified(!0);b.isAutosave()?(null!=J&&null!=J.parentNode&&J.parentNode.removeChild(J),J=t.cloneNode(!1),J.setAttribute("src",Editor.spinImage),J.setAttribute("title",
-mxResources.get("saving")),J.style.cursor="default",J.style.marginRight="2px",J.style.marginTop="-2px",p.insertBefore(J,p.firstChild),m.style.paddingRight=18*p.childNodes.length+"px",this.saveLibrary(b.getTitle(),c,b,b.getMode(),!0,!0,function(){null!=J&&null!=J.parentNode&&(J.parentNode.removeChild(J),m.style.paddingRight=18*p.childNodes.length+"px")})):null==C&&(C=t.cloneNode(!1),C.setAttribute("src",Editor.saveImage),C.setAttribute("title",mxResources.get("save")),p.insertBefore(C,p.firstChild),
-mxEvent.addListener(C,"click",mxUtils.bind(this,function(d){this.saveLibrary(b.getTitle(),c,b,b.getMode(),b.constructor==LocalLibrary,!0,function(){null==C||b.isModified()||(m.style.paddingRight=18*p.childNodes.length+"px",C.parentNode.removeChild(C),C=null)});mxEvent.consume(d)})),m.style.paddingRight=18*p.childNodes.length+"px")}),K=mxUtils.bind(this,function(b,d,e,g){b=E.cloneCells(mxUtils.sortCells(E.model.getTopmostCells(b)));for(var l=0;l<b.length;l++){var m=E.getCellGeometry(b[l]);null!=m&&
-m.translate(-d.x,-d.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(b,d.width,d.height,g||"",!0,!1,!1));b={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(b))),w:d.width,h:d.height};null!=g&&(b.title=g);c.push(b);H(e);null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null)}),B=mxUtils.bind(this,function(b){if(E.isSelectionEmpty())E.getRubberband().isActive()?(E.getRubberband().execute(b),E.getRubberband().reset()):this.showError(mxResources.get("error"),
-mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=E.getSelectionCells(),c=E.view.getBounds(d),e=E.view.scale;c.x/=e;c.y/=e;c.width/=e;c.height/=e;c.x-=E.view.translate.x;c.y-=E.view.translate.y;K(d,c)}mxEvent.consume(b)});mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(b){E.isMouseDown&&null!=E.panningManager&&null!=E.graphHandler.first&&(E.graphHandler.suspend(),null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility="hidden"),k.style.backgroundColor=
-"#f1f3f4",k.style.cursor="copy",E.panningManager.stop(),E.autoScroll=!1,mxEvent.consume(b))}),mxUtils.bind(this,function(b){E.isMouseDown&&null!=E.panningManager&&null!=E.graphHandler&&(k.style.backgroundColor="",k.style.cursor="default",this.sidebar.showTooltips=!0,E.panningManager.stop(),E.graphHandler.reset(),E.isMouseDown=!1,E.autoScroll=!0,B(b),mxEvent.consume(b))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(b){E.isMouseDown&&null!=E.graphHandler.first&&(E.graphHandler.resume(),
-null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility="visible"),k.style.backgroundColor="",k.style.cursor="",E.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(b){k.style.backgroundColor="#f1f3f4";b.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(b){k.style.cursor="";k.style.backgroundColor="";0<b.dataTransfer.files.length&&
-this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,e,g,m,n,q,p,u,v){if(null!=d&&"image/"==e.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,n,q),d)],d[0].vertex=!0,K(d,new mxRectangle(0,0,n,q),b,mxEvent.isAltDown(b)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),
-f=null);else{var t=!1,x=mxUtils.bind(this,function(d,e){if(null!=d&&"application/pdf"==e){var g=Editor.extractGraphModelFromPdf(d);null!=g&&0<g.length&&(d=g)}if(null!=d)if(g=mxUtils.parseXml(d),"mxlibrary"==g.documentElement.nodeName)try{var m=JSON.parse(mxUtils.getTextContent(g.documentElement));l(m,k);c=c.concat(m);H(b);this.spinner.stop();t=!0}catch(V){}else if("mxfile"==g.documentElement.nodeName)try{for(var n=g.documentElement.getElementsByTagName("diagram"),m=0;m<n.length;m++){var q=this.stringToCells(Editor.getDiagramNodeXml(n[m])),
-p=this.editor.graph.getBoundingBoxFromGeometry(q);K(q,new mxRectangle(0,0,p.width,p.height),b)}t=!0}catch(V){null!=window.console&&console.log("error in drop handler:",V)}t||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null)});null!=v&&null!=p&&(/(\.v(dx|sdx?))($|\?)/i.test(p)||/(\.vs(x|sx?))($|\?)/i.test(p))?this.importVisio(v,function(b){x(b,"text/xml")},null,p):!this.isOffline()&&(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(d,p)&&null!=v?this.parseFile(v,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?x(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):x(d,e)}}));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"dragleave",function(b){k.style.cursor="";k.style.backgroundColor="";b.stopPropagation();b.preventDefault()}));
-t=t.cloneNode(!1);t.setAttribute("src",Editor.editImage);t.setAttribute("title",mxResources.get("edit"));p.insertBefore(t,p.firstChild);mxEvent.addListener(t,"click",L);mxEvent.addListener(k,"dblclick",function(b){mxEvent.getSource(b)==k&&L(b)});g=t.cloneNode(!1);g.setAttribute("src",Editor.plusImage);g.setAttribute("title",mxResources.get("add"));p.insertBefore(g,p.firstChild);mxEvent.addListener(g,"click",B);this.isOffline()||".scratchpad"!=b.title||null==EditorUi.scratchpadHelpLink||(g=document.createElement("span"),
-g.setAttribute("title",mxResources.get("help")),g.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(g,"?"),mxEvent.addGestureListeners(g,mxUtils.bind(this,function(b){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(b)})),p.insertBefore(g,p.firstChild))}m.appendChild(p);m.style.paddingRight=18*p.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(b,c){for(var d=0;d<b.length;d++){var e=b[d],f=e.data;if(null!=f){var f=this.convertDataUri(f),
-g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+f,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(f=this.stringToCells(Graph.decompress(e.xml)),0<f.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(f,e.w,e.h,e.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(b){return null!=b?b[mxLanguage]||b.main:null};EditorUi.prototype.footerHeight=
-0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):
-Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily=
-"Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";"1"==urlParams.sketch&&(Graph.zoomWheel=!0,Graph.prototype.defaultVertexStyle={pointerEvents:"0",hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},"0"!=urlParams.rough&&(Graph.prototype.defaultVertexStyle.fontFamily=
-Editor.sketchFontFamily,Graph.prototype.defaultVertexStyle.fontSource=Editor.sketchFontSource,Graph.prototype.defaultVertexStyle.fontSize="20",Graph.prototype.defaultVertexStyle.sketch="1",Graph.prototype.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,Graph.prototype.defaultEdgeStyle.fontSource=Editor.sketchFontSource,Graph.prototype.defaultEdgeStyle.fontSize="20",Graph.prototype.defaultEdgeStyle.sketch="1",Menus.prototype.defaultFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)},
-{fontFamily:"Rock Salt",fontUrl:"https://fonts.googleapis.com/css?family=Rock+Salt"},{fontFamily:"Permanent Marker",fontUrl:"https://fonts.googleapis.com/css?family=Permanent+Marker"}].concat(Menus.prototype.defaultFonts)),Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled=!1,Graph.prototype.defaultPageVisible=!1,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=
-function(b,c,e,g,k){b=new ImageDialog(this,b,c,e,g,k);this.showDialog(b.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);b.init()};EditorUi.prototype.showBackgroundImageDialog=function(b,c){b=null!=b?b:mxUtils.bind(this,function(b,d){if(!d){var c=new ChangePageSetup(this,null,b);c.ignoreColor=!0;this.editor.graph.model.execute(c)}});var d=new BackgroundImageDialog(this,b,c);this.showDialog(d.container,360,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(b,c,e,
-g,k){b=new LibraryDialog(this,b,c,e,g,k);this.showDialog(b.container,640,440,!0,!1,mxUtils.bind(this,function(b){b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));b.init()};var e=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(b){var d=e.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(b){this.editor.graph.isSelectionEmpty()&&d.refresh()}));return d};EditorUi.prototype.createSidebarFooterContainer=function(){var b=
-this.createDiv("geSidebarContainer geSidebarFooter");b.style.position="absolute";b.style.overflow="hidden";var c=document.createElement("a");c.className="geTitle";c.style.color="#DF6C0C";c.style.fontWeight="bold";c.style.height="100%";c.style.paddingTop="9px";c.innerHTML="<span>+</span>";var e=c.getElementsByTagName("span")[0];e.style.fontSize="18px";e.style.marginRight="5px";mxUtils.write(c,mxResources.get("moreShapes")+"...");mxEvent.addListener(c,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,
-function(b){b.preventDefault()}));mxEvent.addListener(c,"click",mxUtils.bind(this,function(b){this.actions.get("shapes").funct();mxEvent.consume(b)}));b.appendChild(c);return b};EditorUi.prototype.handleError=function(b,c,e,g,k,n,p){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=b&&null!=b.error?b.error:b;if(null!=b&&null!=b.stack&&null!=b.message)try{p?null!=window.console&&console.error("EditorUi.handleError:",b):EditorUi.logError("Caught: "+(""==b.message&&
-null!=b.name)?b.name:b.message,b.filename,b.lineNumber,b.columnNumber,b,"INFO")}catch(J){}if(null!=f||null!=c){p=mxUtils.htmlEntities(mxResources.get("unknownError"));var l=mxResources.get("ok"),m=null;c=null!=c?c:mxResources.get("error");if(null!=f){null!=f.retry&&(l=mxResources.get("cancel"),m=function(){d();f.retry()});if(404==f.code||404==f.status||403==f.code){p=403==f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=k?k:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+
-(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var q=null!=k?null:null!=n?n:window.location.hash;if(null!=q&&("#G"==q.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==q.substring(0,45))&&(null!=b&&null!=b.error&&(null!=b.error.errors&&0<b.error.errors.length&&"fileAccess"==b.error.errors[0].reason||null!=b.error.data&&0<b.error.data.length&&"fileAccess"==b.error.data[0].reason)||404==f.code||404==f.status)){q="#U"==q.substring(0,
-2)?q.substring(45,q.lastIndexOf("%26ex")):q.substring(2);this.showError(c,p,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+q);this.handleError(b,c,e,g,k)}),m,mxResources.get("changeUser"),mxUtils.bind(this,function(){function b(){f.innerHTML="";for(var b=0;b<d.length;b++){var c=document.createElement("option");mxUtils.write(c,d[b].displayName);c.value=b;f.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";
-mxUtils.write(c,"<"+d[b].email+">");c.setAttribute("disabled","disabled");f.appendChild(c)}c=document.createElement("option");mxUtils.write(c,mxResources.get("addAccount"));c.value=d.length;f.appendChild(c)}var d=this.drive.getUsersList(),c=document.createElement("div"),e=document.createElement("span");e.style.marginTop="6px";mxUtils.write(e,mxResources.get("changeUser")+": ");c.appendChild(e);var f=document.createElement("select");f.style.width="200px";b();mxEvent.addListener(f,"change",mxUtils.bind(this,
-function(){var c=f.value,e=d.length!=c;e&&this.drive.setUser(d[c]);this.drive.authorize(e,mxUtils.bind(this,function(){e||(d=this.drive.getUsersList(),b())}),mxUtils.bind(this,function(b){this.handleError(b)}),!0)}));c.appendChild(f);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(c.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=e&&e()}),480,150);return}}null!=f.message?
-p=""==f.message&&null!=f.name?mxUtils.htmlEntities(f.name):mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?p=mxUtils.htmlEntities(f.response.error):"undefined"!==typeof window.App&&(f.code==App.ERROR_TIMEOUT?p=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?p=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof f&&0<f.length&&(p=mxUtils.htmlEntities(f)))}var u=n=null;null!=f&&null!=f.helpLink&&(n=mxResources.get("help"),u=mxUtils.bind(this,
-function(){return this.editor.graph.openLink(f.helpLink)}));this.showError(c,p,l,e,m,null,null,n,u,null,null,null,g?e:null)}else null!=e&&e()};EditorUi.prototype.alert=function(b,c,e){b=new ErrorDialog(this,null,b,mxResources.get("ok"),c);this.showDialog(b.container,e||340,100,!0,!1);b.init()};EditorUi.prototype.confirm=function(b,c,e,g,k,n){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=Math.min(200,28*Math.ceil(b.length/50));b=new ConfirmDialog(this,b,function(){d();
-null!=c&&c()},function(){d();null!=e&&e()},g,k,null,null,null,null,f);this.showDialog(b.container,340,46+f,!0,n);b.init()};EditorUi.prototype.showBanner=function(b,c,e,g){var d=!1;if(!(this.bannerShowing||this["hideBanner"+b]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+b])){var f=document.createElement("div");f.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+
-mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(f.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(f.style,"transition","all 1s ease");f.className="geBtn gePrimaryBtn";d=document.createElement("img");d.setAttribute("src",IMAGE_PATH+"/logo.png");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";f.appendChild(d);
-d=document.createElement("img");d.setAttribute("src",Dialog.prototype.closeImage);d.setAttribute("title",mxResources.get(g?"doNotShowAgain":"close"));d.setAttribute("border","0");d.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";f.appendChild(d);mxUtils.write(f,c);document.body.appendChild(f);this.bannerShowing=!0;c=document.createElement("div");c.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var l=document.createElement("input");
-l.setAttribute("type","checkbox");l.setAttribute("id","geDoNotShowAgainCheckbox");l.style.marginRight="6px";if(!g){c.appendChild(l);var k=document.createElement("label");k.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(k,mxResources.get("doNotShowAgain"));c.appendChild(k);f.style.paddingBottom="30px";f.appendChild(c)}var m=mxUtils.bind(this,function(){null!=f.parentNode&&(f.parentNode.removeChild(f),this.bannerShowing=!1,l.checked||g)&&(this["hideBanner"+b]=!0,isLocalStorage&&null!=
-mxSettings.settings&&(mxSettings.settings["close"+b]=Date.now(),mxSettings.save()))});mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);m()}));var p=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){m()}),1E3)});mxEvent.addListener(f,"click",mxUtils.bind(this,function(b){var d=mxEvent.getSource(b);d!=l&&d!=k?(null!=e&&e(),m(),mxEvent.consume(b)):p()}));window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(p,3E4);d=!0}return d};EditorUi.prototype.setCurrentFile=function(b){null!=b&&(b.opened=new Date);this.currentFile=b};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(b,c,e,g){b=b.toDataURL("image/"+e);if(null!=b&&6<b.length)null!=c&&(b=Editor.writeGraphModelToPng(b,
-"tEXt","mxfile",encodeURIComponent(c))),0<g&&(b=Editor.writeGraphModelToPng(b,"pHYs","dpi",g));else throw{message:mxResources.get("unknownError")};return b};EditorUi.prototype.saveCanvas=function(b,c,e,g,k){var d="jpeg"==e?"jpg":e;g=this.getBaseFilename(g)+(null!=c?".drawio":"")+"."+d;b=this.createImageDataUri(b,c,e,k);this.saveData(g,d,b.substring(b.lastIndexOf(",")+1),"image/"+e,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&
-"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(b,c){var d=new TextareaDialog(this,b,c,null,null,mxResources.get("close"));d.textarea.style.width="600px";d.textarea.style.height="380px";this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(b,c,e,g,
-k,n){"text/xml"!=e||/(\.drawio)$/i.test(c)||/(\.xml)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.html)$/i.test(c)||(c=c+"."+(null!=n?n:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)b=g?this.base64ToBlob(b,e):new Blob([b],{type:e}),navigator.msSaveOrOpenBlob(b,c);else if(mxClient.IS_IE)e=window.open("about:blank","_blank"),null==e?mxUtils.popup(b,!0):(e.document.write(b),e.document.close(),e.document.execCommand("SaveAs",!0,c),e.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||
-null==e||"image/"!=e.substring(0,6)?this.showTextDialog(c+":",b):this.openInNewWindow(b,e,g);else{var d=document.createElement("a");n=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof d.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var f=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);n=65==(f?parseInt(f[2],10):!1)?!1:n}if(n||this.isOffline()){d.href=URL.createObjectURL(g?this.base64ToBlob(b,e):new Blob([b],{type:e}));n?d.download=c:d.setAttribute("target",
-"_blank");document.body.appendChild(d);try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},2E4),d.click(),d.parentNode.removeChild(d)}catch(y){}}else this.createEchoRequest(b,c,e,g,k).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(b,c,e,g,k,n){b="xml="+encodeURIComponent(b);return new mxXmlRequest(SAVE_URL,b+(null!=e?"&mime="+e:"")+(null!=k?"&format="+k:"")+(null!=n?"&base64="+n:"")+(null!=c?"&filename="+encodeURIComponent(c):"")+(g?"&binary=1":""))};EditorUi.prototype.base64ToBlob=
-function(b,c){c=c||"";for(var d=atob(b),e=d.length,f=Math.ceil(e/1024),g=Array(f),k=0;k<f;++k){for(var p=1024*k,t=Math.min(p+1024,e),x=Array(t-p),G=0;p<t;++G,++p)x[G]=d[p].charCodeAt(0);g[k]=new Uint8Array(x)}return new Blob(g,{type:c})};EditorUi.prototype.saveLocalFile=function(b,c,e,g,k,n,p,t){n=null!=n?n:!1;p=null!=p?p:"vsdx"!=k&&(!mxClient.IS_IOS||!navigator.standalone);k=this.getServiceCount(n);isLocalStorage&&k++;var d=4>=k?2:6<k?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(d,c){try{if("_blank"==
-c)if(null!=e&&"image/"==e.substring(0,6))this.openInNewWindow(b,e,g);else if(null!=e&&"text/html"==e.substring(0,9)){var f=new EmbedDialog(this,b);this.showDialog(f.container,440,240,!0,!0);f.init()}else{var l=window.open("about:blank");null==l?mxUtils.popup(b,!0):(l.document.write("<pre>"+mxUtils.htmlEntities(b,!1)+"</pre>"),l.document.close())}else c==App.MODE_DEVICE||"download"==c?this.doSaveLocalFile(b,d,e,g,null,t):null!=d&&0<d.length&&this.pickFolder(c,mxUtils.bind(this,function(f){try{this.exportFile(b,
-d,e,g,c,f)}catch(L){this.handleError(L)}}))}catch(J){this.handleError(J)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,n,p,null,1<k,d,b,e,g);n=this.isServices(k)?k>d?390:270:160;this.showDialog(c.container,400,n,!0,!0);c.init()};EditorUi.prototype.openInNewWindow=function(b,c,e){var d=window.open("about:blank");null==d||null==d.document?mxUtils.popup(b,!0):("image/svg+xml"!=c||mxClient.IS_SVG?"image/svg+xml"==c?d.document.write("<html>"+
-b+"</html>"):(b=e?b:btoa(unescape(encodeURIComponent(b))),d.document.write('<html><img style="max-width:100%;" src="data:'+c+";base64,"+b+'"/></html>')):d.document.write("<html><pre>"+mxUtils.htmlEntities(b,!1)+"</pre></html>"),d.document.close())};var k=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};
-EditorUi.prototype.addChromelessToolbarItems=function(b){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var d=b(mxUtils.bind(this,function(b){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",
-this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,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 c=d.getBoundingClientRect();
-this.tagsDialog.style.left=c.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=c.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(b)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,
-mxUtils.bind(this,function(){var b=this.editor.graph.getAllTags();d.style.display=0<b.length?"":"none"}));k.apply(this,arguments)}this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",
-mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),
-this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var c=b(mxUtils.bind(this,function(b){var d=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",d);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)d.apply(this);else{this.exportDialog=document.createElement("div");var e=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,
-"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=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=e.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
-this.chromelessToolbar.offsetHeight+4+"px";e=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=e.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(b){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(b,
-null,"png");b=document.createElement("img");b.style.maxWidth="140px";b.style.maxHeight="140px";b.style.cursor="pointer";b.style.backgroundColor="white";b.setAttribute("title",mxResources.get("openInNewWindow"));b.setAttribute("border","0");b.setAttribute("src",c);this.exportDialog.appendChild(b);mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);d.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,
-function(b){this.spinner.stop();this.handleError(b)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",d);document.body.appendChild(this.exportDialog)}mxEvent.consume(b)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(b,c,e,g,k){this.isLocalFileSave()?this.saveLocalFile(e,b,g,k,c):this.saveRequest(b,c,mxUtils.bind(this,function(b,d){return this.createEchoRequest(e,b,g,k,c,d)}),e,k,g)};EditorUi.prototype.saveRequest=
-function(b,c,e,g,k,n,p){p=null!=p?p:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);isLocalStorage&&d++;var f=4>=d?2:6<d?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,d){if("_blank"==d||null!=b&&0<b.length){var f=e("_blank"==d?null:b,d==App.MODE_DEVICE||"download"==d||null==d||"_blank"==d?"0":"1");null!=f&&(d==App.MODE_DEVICE||"download"==d||"_blank"==d?f.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(e){n=null!=n?n:"pdf"==c?"application/pdf":
-"image/"+c;if(null!=g)try{this.exportFile(g,b,n,!0,d,e)}catch(J){this.handleError(J)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),b,n,!0,d,e)}catch(J){this.handleError(J)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(b){this.spinner.stop();this.handleError(b)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),
-mxResources.get("saveAs"),mxResources.get("download"),!1,!1,p,null,1<d,f,g,n,k);d=this.isServices(d)?4<d?390:270:160;this.showDialog(b.container,380,d,!0,!0);b.init()};EditorUi.prototype.isServices=function(b){return 1!=b};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(b,c,e,g,k,n){};EditorUi.prototype.pickFolder=function(b,c,e){c(null)};EditorUi.prototype.exportSvg=function(b,c,e,g,k,n,p,t,y,x,G,C){if(this.spinner.spin(document.body,
-mxResources.get("export")))try{var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;var f=c?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==c&&(f=G?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var l=this.editor.graph.getSvg(f,b,p,t,null,e,null,null,"blank"==x?"_blank":"self"==x?"_top":null,null,!0,G,C);g&&this.editor.graph.addSvgShadow(l);var m=this.getBaseFilename()+(k?".drawio":"")+".svg",q=mxUtils.bind(this,function(b){this.spinner.stop();k&&b.setAttribute("content",
-this.getFileData(!0,null,null,null,e,y,null,null,null,!1));var d='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(b);this.isLocalFileSave()||d.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",d,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.editor.addFontCss(l);this.editor.graph.mathEnabled&&
-this.editor.addMathCss(l);n?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(l,q,this.thumbImageCache)):q(l)}catch(B){this.handleError(B)}};EditorUi.prototype.addRadiobox=function(b,c,e,g,k,n,p){return this.addCheckbox(b,e,g,k,n,p,!0,c)};EditorUi.prototype.addCheckbox=function(b,c,e,g,k,n,p,t){n=null!=n?n:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type",p?"radio":"checkbox");p="geCheckbox-"+Editor.guid();
-d.id=p;null!=t&&d.setAttribute("name",t);e&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);g&&d.setAttribute("disabled","disabled");n&&(b.appendChild(d),e=document.createElement("label"),mxUtils.write(e,c),e.setAttribute("for",p),b.appendChild(e),k||mxUtils.br(b));return d};EditorUi.prototype.addEditButton=function(b,c){var d=this.addCheckbox(b,mxResources.get("edit")+":",!0,null,!0);d.style.marginLeft="24px";var e=this.getCurrentFile(),f="";null!=e&&e.getMode()!=App.MODE_DEVICE&&e.getMode()!=
-App.MODE_BROWSER&&(f=window.location.href);var g=document.createElement("select");g.style.width="120px";g.style.marginLeft="8px";g.style.marginRight="10px";g.className="geBtn";e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("makeCopy"));g.appendChild(e);e=document.createElement("option");e.setAttribute("value","custom");mxUtils.write(e,mxResources.get("custom")+"...");g.appendChild(e);b.appendChild(g);mxEvent.addListener(g,"change",mxUtils.bind(this,
-function(){if("custom"==g.value){var b=new FilenameDialog(this,f,mxResources.get("ok"),function(b){null!=b?f=b:g.value="blank"},mxResources.get("url"),null,null,null,null,function(){g.value="blank"});this.showDialog(b.container,300,80,!0,!1);b.init()}}));mxEvent.addListener(d,"change",mxUtils.bind(this,function(){d.checked&&(null==c||c.checked)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")}));mxUtils.br(b);return{getLink:function(){return d.checked?"blank"===g.value?"_blank":
-f:null},getEditInput:function(){return d},getEditSelect:function(){return g}}};EditorUi.prototype.addLinkSection=function(b,c){function d(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=g&&g!=mxConstants.NONE?"border:1px solid black;background-color:"+g:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(b,mxResources.get("links")+":");var e=document.createElement("select");
+this.currentPage.getName());return d};EditorUi.prototype.downloadFile=function(b,c,e,g,k,n,p,v,t,x,E,C){try{g=null!=g?g:this.editor.graph.isSelectionEmpty();var d=this.getBaseFilename(!k),f=d+("xml"==b||"pdf"==b&&E?".drawio":"")+"."+b;if("xml"==b){var l=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,g,k,null,null,null,c);this.saveData(f,b,l,"text/xml")}else if("html"==b)l=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(f,b,l,"text/html");else if("svg"!=b&&"xmlsvg"!=
+b||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==b?f=d+".png":"jpeg"==b&&(f=d+".jpg"),this.saveRequest(f,b,mxUtils.bind(this,function(d,c){try{var f=this.editor.graph.pageVisible;null!=n&&(this.editor.graph.pageVisible=n);var e=this.createDownloadRequest(d,b,g,c,p,k,v,t,x,E,C);this.editor.graph.pageVisible=f;return e}catch(G){this.handleError(G)}}));else{var m=null,q=mxUtils.bind(this,function(b){b.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
+mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(m)}))});if("svg"==b){var u=this.editor.graph.background;if(p||u==mxConstants.NONE)u=null;var y=this.editor.graph.getSvg(u,null,null,null,null,g);e&&this.editor.graph.addSvgShadow(y);this.editor.convertImages(y,mxUtils.bind(this,mxUtils.bind(this,function(b){this.spinner.stop();q(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(b))})))}else f=d+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(b){this.spinner.stop();
+q(b)}),g)}}catch(P){this.handleError(P)}};EditorUi.prototype.createDownloadRequest=function(b,c,e,g,k,n,p,v,t,x,E){var d=this.editor.graph,f=d.getGraphBounds();e=this.getFileData(!0,null,null,null,e,0==n?!1:"xmlpng"!=c,null,null,null,!1,"pdf"==c);var l="",m="";if(f.width*f.height>MAX_AREA||e.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};x=x?"1":"0";"pdf"==c&&(null!=E?m="&from="+E.from+"&to="+E.to:0==n&&(m="&allPages=1"));if("xmlpng"==c&&(x="1",c="png",null!=this.pages&&
+null!=this.currentPage))for(n=0;n<this.pages.length;n++)if(this.pages[n]==this.currentPage){l="&from="+n;break}n=d.background;"png"!=c&&"pdf"!=c||!k?k||null!=n&&n!=mxConstants.NONE||(n="#ffffff"):n=mxConstants.NONE;k={globalVars:d.getExportVariables()};t&&(k.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});Graph.translateDiagram&&(k.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+c+l+m+"&bg="+(null!=n?n:mxConstants.NONE)+"&base64="+g+"&embedXml="+
+x+"&xml="+encodeURIComponent(e)+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(k))+(null!=p?"&scale="+p:"")+(null!=v?"&border="+v:""))};EditorUi.prototype.setMode=function(b,c){this.mode=b};EditorUi.prototype.loadDescriptor=function(b,c,e){var d=window.location.hash,f=mxUtils.bind(this,function(f){var e=null!=b.data?b.data:"";null!=f&&0<f.length&&(0<e.length&&(e+="\n"),e+=f);f=new LocalFile(this,"csv"!=b.format&&0<e.length?e:this.emptyDiagramXml,null!=
+urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);f.getHash=function(){return d};this.fileLoaded(f);"csv"==b.format&&this.importCsv(e,mxUtils.bind(this,function(b){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=b.update){var g=null!=b.interval?parseInt(b.interval):6E4,l=null,k=mxUtils.bind(this,function(){var d=this.currentPage;mxUtils.post(b.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,
+function(b){d===this.currentPage&&(200<=b.getStatus()&&300>=b.getStatus()?(this.updateDiagram(b.getText()),m()):this.handleError({message:mxResources.get("error")+" "+b.getStatus()}))}),mxUtils.bind(this,function(b){this.handleError(b)}))}),m=mxUtils.bind(this,function(){window.clearTimeout(l);l=window.setTimeout(k,g)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){m();k()}));m();k()}null!=c&&c()});null!=b.url&&0<b.url.length?this.editor.loadUrl(b.url,mxUtils.bind(this,function(b){f(b)}),
+mxUtils.bind(this,function(b){null!=e&&e(b)})):f("")};EditorUi.prototype.updateDiagram=function(b){function d(b){var d=new mxCellOverlay(b.image||g.warningImage,b.tooltip,b.align,b.valign,b.offset);d.addListener(mxEvent.CLICK,function(d,c){e.alert(b.tooltip)});return d}var c=null,e=this;if(null!=b&&0<b.length&&(c=mxUtils.parseXml(b),b=null!=c?c.documentElement:null,null!=b&&"updates"==b.nodeName)){var g=this.editor.graph,k=g.getModel();k.beginUpdate();var p=null;try{for(b=b.firstChild;null!=b;){if("update"==
+b.nodeName){var v=k.getCell(b.getAttribute("id"));if(null!=v){try{var t=b.getAttribute("value");if(null!=t){var x=mxUtils.parseXml(t).documentElement;if(null!=x)if("1"==x.getAttribute("replace-value"))k.setValue(v,x);else for(var E=x.attributes,C=0;C<E.length;C++)g.setAttributeForCell(v,E[C].nodeName,0<E[C].nodeValue.length?E[C].nodeValue:null)}}catch(P){null!=window.console&&console.log("Error in value for "+v.id+": "+P)}try{var F=b.getAttribute("style");null!=F&&g.model.setStyle(v,F)}catch(P){null!=
+window.console&&console.log("Error in style for "+v.id+": "+P)}try{var I=b.getAttribute("icon");if(null!=I){var L=0<I.length?JSON.parse(I):null;null!=L&&L.append||g.removeCellOverlays(v);null!=L&&g.addCellOverlay(v,d(L))}}catch(P){null!=window.console&&console.log("Error in icon for "+v.id+": "+P)}try{var H=b.getAttribute("geometry");if(null!=H){var H=JSON.parse(H),J=g.getCellGeometry(v);if(null!=J){J=J.clone();for(key in H){var B=parseFloat(H[key]);"dx"==key?J.x+=B:"dy"==key?J.y+=B:"dw"==key?J.width+=
+B:"dh"==key?J.height+=B:J[key]=parseFloat(H[key])}g.model.setGeometry(v,J)}}}catch(P){null!=window.console&&console.log("Error in icon for "+v.id+": "+P)}}}else if("model"==b.nodeName){for(var M=b.firstChild;null!=M&&M.nodeType!=mxConstants.NODETYPE_ELEMENT;)M=M.nextSibling;null!=M&&(new mxCodec(b.firstChild)).decode(M,k)}else if("view"==b.nodeName){if(b.hasAttribute("scale")&&(g.view.scale=parseFloat(b.getAttribute("scale"))),b.hasAttribute("dx")||b.hasAttribute("dy"))g.view.translate=new mxPoint(parseFloat(b.getAttribute("dx")||
+0),parseFloat(b.getAttribute("dy")||0))}else"fit"==b.nodeName&&(p=b.hasAttribute("max-scale")?parseFloat(b.getAttribute("max-scale")):1);b=b.nextSibling}}finally{k.endUpdate()}null!=p&&this.chromelessResize&&this.chromelessResize(!0,p)}return c};EditorUi.prototype.getCopyFilename=function(b,c){var d=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename,f="",e=d.lastIndexOf(".");0<=e&&(f=d.substring(e),d=d.substring(0,e));if(c)var g=new Date,e=g.getFullYear(),k=g.getMonth()+1,p=g.getDate(),
+t=g.getHours(),x=g.getMinutes(),g=g.getSeconds(),d=d+(" "+(e+"-"+k+"-"+p+"-"+t+"-"+x+"-"+g));return d=mxResources.get("copyOf",[d])+f};EditorUi.prototype.fileLoaded=function(b,c){var d=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var f=!1;this.hideDialog();null!=d&&(EditorUi.debug("File.closed",[d]),d.removeListener(this.descriptorChangedListener),d.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var e=mxUtils.bind(this,function(){this.setGraphEnabled(!1);
+this.setCurrentFile(null);null!=d&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!c&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();c||this.showSplash()});if(null!=b)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility=
+"");this.openingFile=!0;this.setCurrentFile(b);b.addListener("descriptorChanged",this.descriptorChangedListener);b.addListener("contentChanged",this.descriptorChangedListener);b.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(b.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();b.isEditable()?b.isModified()?(b.addUnsavedStatus(),null!=b.backupPatch&&b.patch([b.backupPatch])):this.editor.setStatus(""):
+this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));f=!0;this.isOffline()||null==b.getMode()||EditorUi.logEvent({category:b.getMode().toUpperCase()+
+"-OPEN-FILE-"+b.getHash(),action:"size_"+b.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[b]);if(this.editor.editable&&this.mode==b.getMode()&&b.getMode()!=App.MODE_DEVICE&&null!=b.getMode())try{this.addRecent({id:b.getHash(),title:b.getTitle(),mode:b.getMode()})}catch(u){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(u){}}catch(u){this.fileLoadedError=u;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+
+(null!=b?b.getHash():"none"),action:"message_"+u.message,label:"stack_"+u.stack})}catch(v){}var g=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=d?this.fileLoaded(d):e()});c?g():this.handleError(u,mxResources.get("errorLoadingFile"),g,!0,null,null,!0)}else e();return f};EditorUi.prototype.getHashValueForPages=function(b,c){var d=0,e=new mxGraphModel,f=new mxCodec;null!=c&&(c.byteCount=
+0,c.attrCount=0,c.eltCount=0,c.nodeCount=0);for(var g=0;g<b.length;g++){this.updatePageRoot(b[g]);var k=b[g].node.cloneNode(!1);k.removeAttribute("name");e.root=b[g].root;var p=f.encode(e);this.editor.graph.saveViewState(b[g].viewState,p,!0);p.removeAttribute("pageWidth");p.removeAttribute("pageHeight");k.appendChild(p);null!=c&&(c.eltCount+=k.getElementsByTagName("*").length,c.nodeCount+=k.getElementsByTagName("mxCell").length);d=(d<<5)-d+this.hashValue(k,function(b,d,c,e){return!e||"mxGeometry"!=
+b.nodeName&&"mxPoint"!=b.nodeName||"x"!=d&&"y"!=d&&"width"!=d&&"height"!=d?e&&"mxCell"==b.nodeName&&"previous"==d?null:c:Math.round(c)},c)<<0}return d};EditorUi.prototype.hashValue=function(b,c,e){var d=0;if(null!=b&&"object"===typeof b&&"number"===typeof b.nodeType&&"string"===typeof b.nodeName&&"function"===typeof b.getAttribute){null!=b.nodeName&&(d^=this.hashValue(b.nodeName,c,e));if(null!=b.attributes){null!=e&&(e.attrCount+=b.attributes.length);for(var f=0;f<b.attributes.length;f++){var g=b.attributes[f].name,
+l=null!=c?c(b,g,b.attributes[f].value,!0):b.attributes[f].value;null!=l&&(d^=this.hashValue(g,c,e)+this.hashValue(l,c,e))}}if(null!=b.childNodes)for(f=0;f<b.childNodes.length;f++)d=(d<<5)-d+this.hashValue(b.childNodes[f],c,e)<<0}else if(null!=b&&"function"!==typeof b){b=String(b);c=0;null!=e&&(e.byteCount+=b.length);for(f=0;f<b.length;f++)c=(c<<5)-c+b.charCodeAt(f)<<0;d^=c}return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=
+function(b,c,e,g,k,n,p){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(b){null==b&&(b=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,b,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(b){var d=mxUtils.createXmlDocument(),
+c=d.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(b));d.appendChild(c);return mxUtils.getXml(d)};EditorUi.prototype.closeLibrary=function(b){null!=b&&(this.removeLibrarySidebar(b.getHash()),b.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(b.getHash()),".scratchpad"==b.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(b){var d=this.sidebar.palettes[b];if(null!=d){for(var c=0;c<d.length;c++)d[c].parentNode.removeChild(d[c]);delete this.sidebar.palettes[b]}};
+EditorUi.prototype.repositionLibrary=function(b){var d=this.sidebar.container;if(null==b){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(b=c[c.length-1].nextSibling)}b=null!=b?b:d.firstChild.nextSibling.nextSibling;var c=d.lastChild,e=c.previousSibling;d.insertBefore(c,b);d.insertBefore(e,c)};EditorUi.prototype.loadLibrary=function(b,c){var d=mxUtils.parseXml(b.getData());if("mxlibrary"==d.documentElement.nodeName){var e=JSON.parse(mxUtils.getTextContent(d.documentElement));
+this.libraryLoaded(b,e,d.documentElement.getAttribute("title"),c)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(b){return""};EditorUi.prototype.libraryLoaded=function(b,c,e,g){if(null!=this.sidebar){b.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(b.getHash());".scratchpad"==b.title&&(this.scratchpad=b);var d=this.sidebar.palettes[b.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(b.getHash());var f=
+null,l=mxUtils.bind(this,function(d,c){0==d.length&&b.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f)):this.addLibraryEntries(d,c)});null!=this.sidebar&&null!=c&&this.sidebar.addEntries(c);e=null!=e&&0<e.length?e:b.getTitle();var k=this.sidebar.addPalette(b.getHash(),e,null!=g?g:!0,mxUtils.bind(this,function(b){l(c,b)}));this.repositionLibrary(d);var m=k.parentNode.previousSibling;g=m.getAttribute("title");
+null!=g&&0<g.length&&".scratchpad"!=b.title&&m.setAttribute("title",this.getLibraryStorageHint(b)+"\n"+g);var p=document.createElement("div");p.style.position="absolute";p.style.right="0px";p.style.top="0px";p.style.padding="8px";p.style.backgroundColor="inherit";m.style.position="relative";var t=document.createElement("img");t.setAttribute("src",Editor.crossImage);t.setAttribute("title",mxResources.get("close"));t.setAttribute("valign","absmiddle");t.setAttribute("border","0");t.style.position="relative";
+t.style.top="2px";t.style.width="14px";t.style.cursor="pointer";t.style.margin="0 3px";Editor.isDarkMode()&&(t.style.filter="invert(100%)");var C=null;if(".scratchpad"!=b.title||this.closableScratchpad)p.appendChild(t),mxEvent.addListener(t,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var c=mxUtils.bind(this,function(){this.closeLibrary(b)});null!=C?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(d)}}));
+if(b.isEditable()){var F=this.editor.graph,I=null,L=mxUtils.bind(this,function(d){this.showLibraryDialog(b.getTitle(),k,c,b,b.getMode());mxEvent.consume(d)}),H=mxUtils.bind(this,function(d){b.setModified(!0);b.isAutosave()?(null!=I&&null!=I.parentNode&&I.parentNode.removeChild(I),I=t.cloneNode(!1),I.setAttribute("src",Editor.spinImage),I.setAttribute("title",mxResources.get("saving")),I.style.cursor="default",I.style.marginRight="2px",I.style.marginTop="-2px",p.insertBefore(I,p.firstChild),m.style.paddingRight=
+18*p.childNodes.length+"px",this.saveLibrary(b.getTitle(),c,b,b.getMode(),!0,!0,function(){null!=I&&null!=I.parentNode&&(I.parentNode.removeChild(I),m.style.paddingRight=18*p.childNodes.length+"px")})):null==C&&(C=t.cloneNode(!1),C.setAttribute("src",Editor.saveImage),C.setAttribute("title",mxResources.get("save")),p.insertBefore(C,p.firstChild),mxEvent.addListener(C,"click",mxUtils.bind(this,function(d){this.saveLibrary(b.getTitle(),c,b,b.getMode(),b.constructor==LocalLibrary,!0,function(){null==
+C||b.isModified()||(m.style.paddingRight=18*p.childNodes.length+"px",C.parentNode.removeChild(C),C=null)});mxEvent.consume(d)})),m.style.paddingRight=18*p.childNodes.length+"px")}),J=mxUtils.bind(this,function(b,d,e,g){b=F.cloneCells(mxUtils.sortCells(F.model.getTopmostCells(b)));for(var l=0;l<b.length;l++){var m=F.getCellGeometry(b[l]);null!=m&&m.translate(-d.x,-d.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(b,d.width,d.height,g||"",!0,!1,!1));b={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(b))),
+w:d.width,h:d.height};null!=g&&(b.title=g);c.push(b);H(e);null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null)}),B=mxUtils.bind(this,function(b){if(F.isSelectionEmpty())F.getRubberband().isActive()?(F.getRubberband().execute(b),F.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=F.getSelectionCells(),c=F.view.getBounds(d),e=F.view.scale;c.x/=e;c.y/=e;c.width/=e;c.height/=e;c.x-=F.view.translate.x;
+c.y-=F.view.translate.y;J(d,c)}mxEvent.consume(b)});mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(b){F.isMouseDown&&null!=F.panningManager&&null!=F.graphHandler.first&&(F.graphHandler.suspend(),null!=F.graphHandler.hint&&(F.graphHandler.hint.style.visibility="hidden"),k.style.backgroundColor="#f1f3f4",k.style.cursor="copy",F.panningManager.stop(),F.autoScroll=!1,mxEvent.consume(b))}),mxUtils.bind(this,function(b){F.isMouseDown&&null!=F.panningManager&&null!=F.graphHandler&&
+(k.style.backgroundColor="",k.style.cursor="default",this.sidebar.showTooltips=!0,F.panningManager.stop(),F.graphHandler.reset(),F.isMouseDown=!1,F.autoScroll=!0,B(b),mxEvent.consume(b))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(b){F.isMouseDown&&null!=F.graphHandler.first&&(F.graphHandler.resume(),null!=F.graphHandler.hint&&(F.graphHandler.hint.style.visibility="visible"),k.style.backgroundColor="",k.style.cursor="",F.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(k,
+"dragover",mxUtils.bind(this,function(b){k.style.backgroundColor="#f1f3f4";b.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(b){k.style.cursor="";k.style.backgroundColor="";0<b.dataTransfer.files.length&&this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,e,g,m,n,q,p,u,v){if(null!=d&&"image/"==e.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
+this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,n,q),d)],d[0].vertex=!0,J(d,new mxRectangle(0,0,n,q),b,mxEvent.isAltDown(b)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null);else{var t=!1,x=mxUtils.bind(this,function(d,e){if(null!=d&&"application/pdf"==e){var g=Editor.extractGraphModelFromPdf(d);null!=g&&0<g.length&&(d=g)}if(null!=d)if(g=mxUtils.parseXml(d),"mxlibrary"==g.documentElement.nodeName)try{var m=
+JSON.parse(mxUtils.getTextContent(g.documentElement));l(m,k);c=c.concat(m);H(b);this.spinner.stop();t=!0}catch(V){}else if("mxfile"==g.documentElement.nodeName)try{for(var n=g.documentElement.getElementsByTagName("diagram"),m=0;m<n.length;m++){var q=this.stringToCells(Editor.getDiagramNodeXml(n[m])),p=this.editor.graph.getBoundingBoxFromGeometry(q);J(q,new mxRectangle(0,0,p.width,p.height),b)}t=!0}catch(V){null!=window.console&&console.log("error in drop handler:",V)}t||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
+null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null)});null!=v&&null!=p&&(/(\.v(dx|sdx?))($|\?)/i.test(p)||/(\.vs(x|sx?))($|\?)/i.test(p))?this.importVisio(v,function(b){x(b,"text/xml")},null,p):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,p)&&null!=v?this.parseFile(v,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?x(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?
+"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):x(d,e)}}));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"dragleave",function(b){k.style.cursor="";k.style.backgroundColor="";b.stopPropagation();b.preventDefault()}));t=t.cloneNode(!1);t.setAttribute("src",Editor.editImage);t.setAttribute("title",mxResources.get("edit"));p.insertBefore(t,p.firstChild);mxEvent.addListener(t,"click",L);mxEvent.addListener(k,"dblclick",function(b){mxEvent.getSource(b)==
+k&&L(b)});g=t.cloneNode(!1);g.setAttribute("src",Editor.plusImage);g.setAttribute("title",mxResources.get("add"));p.insertBefore(g,p.firstChild);mxEvent.addListener(g,"click",B);this.isOffline()||".scratchpad"!=b.title||null==EditorUi.scratchpadHelpLink||(g=document.createElement("span"),g.setAttribute("title",mxResources.get("help")),g.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(g,"?"),mxEvent.addGestureListeners(g,mxUtils.bind(this,function(b){this.openLink(EditorUi.scratchpadHelpLink);
+mxEvent.consume(b)})),p.insertBefore(g,p.firstChild))}m.appendChild(p);m.style.paddingRight=18*p.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(b,c){for(var d=0;d<b.length;d++){var e=b[d],f=e.data;if(null!=f){var f=this.convertDataUri(f),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+f,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(f=this.stringToCells(Graph.decompress(e.xml)),
+0<f.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(f,e.w,e.h,e.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(b){return null!=b?b[mxLanguage]||b.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",
+Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=
+"#2a2a2a",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";"1"==urlParams.sketch&&(Graph.zoomWheel=!0,Graph.prototype.defaultVertexStyle={pointerEvents:"0",hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",
+orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},"0"!=urlParams.rough&&(Graph.prototype.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,Graph.prototype.defaultVertexStyle.fontSource=Editor.sketchFontSource,Graph.prototype.defaultVertexStyle.fontSize="20",Graph.prototype.defaultVertexStyle.sketch="1",Graph.prototype.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,Graph.prototype.defaultEdgeStyle.fontSource=Editor.sketchFontSource,
+Graph.prototype.defaultEdgeStyle.fontSize="20",Graph.prototype.defaultEdgeStyle.sketch="1",Menus.prototype.defaultFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)},{fontFamily:"Rock Salt",fontUrl:"https://fonts.googleapis.com/css?family=Rock+Salt"},{fontFamily:"Permanent Marker",fontUrl:"https://fonts.googleapis.com/css?family=Permanent+Marker"}].concat(Menus.prototype.defaultFonts)),Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",
+Graph.prototype.defaultGridEnabled=!1,Graph.prototype.defaultPageVisible=!1,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(b,c,e,g,k){b=new ImageDialog(this,b,c,e,g,k);this.showDialog(b.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);b.init()};EditorUi.prototype.showBackgroundImageDialog=function(b,c){b=null!=b?b:mxUtils.bind(this,function(b,d){if(!d){var c=new ChangePageSetup(this,
+null,b);c.ignoreColor=!0;this.editor.graph.model.execute(c)}});var d=new BackgroundImageDialog(this,b,c);this.showDialog(d.container,360,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(b,c,e,g,k){b=new LibraryDialog(this,b,c,e,g,k);this.showDialog(b.container,640,440,!0,!1,mxUtils.bind(this,function(b){b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));b.init()};var e=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(b){var d=e.apply(this,
+arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(b){this.editor.graph.isSelectionEmpty()&&d.refresh()}));return d};EditorUi.prototype.createSidebarFooterContainer=function(){var b=this.createDiv("geSidebarContainer geSidebarFooter");b.style.position="absolute";b.style.overflow="hidden";var c=document.createElement("a");c.className="geTitle";c.style.color="#DF6C0C";c.style.fontWeight="bold";c.style.height="100%";c.style.paddingTop="9px";c.innerHTML="<span>+</span>";
+var e=c.getElementsByTagName("span")[0];e.style.fontSize="18px";e.style.marginRight="5px";mxUtils.write(c,mxResources.get("moreShapes")+"...");mxEvent.addListener(c,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}));mxEvent.addListener(c,"click",mxUtils.bind(this,function(b){this.actions.get("shapes").funct();mxEvent.consume(b)}));b.appendChild(c);return b};EditorUi.prototype.handleError=function(b,c,e,g,k,n,p){var d=null!=this.spinner&&null!=this.spinner.pause?
+this.spinner.pause():function(){},f=null!=b&&null!=b.error?b.error:b;if(null!=b&&null!=b.stack&&null!=b.message)try{p?null!=window.console&&console.error("EditorUi.handleError:",b):EditorUi.logError("Caught: "+(""==b.message&&null!=b.name)?b.name:b.message,b.filename,b.lineNumber,b.columnNumber,b,"INFO")}catch(I){}if(null!=f||null!=c){p=mxUtils.htmlEntities(mxResources.get("unknownError"));var l=mxResources.get("ok"),m=null;c=null!=c?c:mxResources.get("error");if(null!=f){null!=f.retry&&(l=mxResources.get("cancel"),
+m=function(){d();f.retry()});if(404==f.code||404==f.status||403==f.code){p=403==f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=k?k:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var q=null!=k?null:null!=n?n:window.location.hash;if(null!=q&&("#G"==q.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==
+q.substring(0,45))&&(null!=b&&null!=b.error&&(null!=b.error.errors&&0<b.error.errors.length&&"fileAccess"==b.error.errors[0].reason||null!=b.error.data&&0<b.error.data.length&&"fileAccess"==b.error.data[0].reason)||404==f.code||404==f.status)){q="#U"==q.substring(0,2)?q.substring(45,q.lastIndexOf("%26ex")):q.substring(2);this.showError(c,p,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+q);this.handleError(b,c,e,g,k)}),
+m,mxResources.get("changeUser"),mxUtils.bind(this,function(){function b(){f.innerHTML="";for(var b=0;b<d.length;b++){var c=document.createElement("option");mxUtils.write(c,d[b].displayName);c.value=b;f.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(c,"<"+d[b].email+">");c.setAttribute("disabled","disabled");f.appendChild(c)}c=document.createElement("option");mxUtils.write(c,mxResources.get("addAccount"));c.value=d.length;f.appendChild(c)}var d=this.drive.getUsersList(),
+c=document.createElement("div"),e=document.createElement("span");e.style.marginTop="6px";mxUtils.write(e,mxResources.get("changeUser")+": ");c.appendChild(e);var f=document.createElement("select");f.style.width="200px";b();mxEvent.addListener(f,"change",mxUtils.bind(this,function(){var c=f.value,e=d.length!=c;e&&this.drive.setUser(d[c]);this.drive.authorize(e,mxUtils.bind(this,function(){e||(d=this.drive.getUsersList(),b())}),mxUtils.bind(this,function(b){this.handleError(b)}),!0)}));c.appendChild(f);
+c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(c.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=e&&e()}),480,150);return}}null!=f.message?p=""==f.message&&null!=f.name?mxUtils.htmlEntities(f.name):mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?p=mxUtils.htmlEntities(f.response.error):"undefined"!==typeof window.App&&(f.code==App.ERROR_TIMEOUT?
+p=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?p=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof f&&0<f.length&&(p=mxUtils.htmlEntities(f)))}var u=n=null;null!=f&&null!=f.helpLink&&(n=mxResources.get("help"),u=mxUtils.bind(this,function(){return this.editor.graph.openLink(f.helpLink)}));this.showError(c,p,l,e,m,null,null,n,u,null,null,null,g?e:null)}else null!=e&&e()};EditorUi.prototype.alert=function(b,c,e){b=new ErrorDialog(this,null,b,mxResources.get("ok"),
+c);this.showDialog(b.container,e||340,100,!0,!1);b.init()};EditorUi.prototype.confirm=function(b,c,e,g,k,n){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=Math.min(200,28*Math.ceil(b.length/50));b=new ConfirmDialog(this,b,function(){d();null!=c&&c()},function(){d();null!=e&&e()},g,k,null,null,null,null,f);this.showDialog(b.container,340,46+f,!0,n);b.init()};EditorUi.prototype.showBanner=function(b,c,e,g){var d=!1;if(!(this.bannerShowing||this["hideBanner"+b]||
+isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+b])){var f=document.createElement("div");f.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(f.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(f.style,"transition",
+"all 1s ease");f.className="geBtn gePrimaryBtn";d=document.createElement("img");d.setAttribute("src",IMAGE_PATH+"/logo.png");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";f.appendChild(d);d=document.createElement("img");d.setAttribute("src",Dialog.prototype.closeImage);d.setAttribute("title",mxResources.get(g?"doNotShowAgain":"close"));d.setAttribute("border","0");d.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
+f.appendChild(d);mxUtils.write(f,c);document.body.appendChild(f);this.bannerShowing=!0;c=document.createElement("div");c.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var l=document.createElement("input");l.setAttribute("type","checkbox");l.setAttribute("id","geDoNotShowAgainCheckbox");l.style.marginRight="6px";if(!g){c.appendChild(l);var k=document.createElement("label");k.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(k,mxResources.get("doNotShowAgain"));c.appendChild(k);
+f.style.paddingBottom="30px";f.appendChild(c)}var m=mxUtils.bind(this,function(){null!=f.parentNode&&(f.parentNode.removeChild(f),this.bannerShowing=!1,l.checked||g)&&(this["hideBanner"+b]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+b]=Date.now(),mxSettings.save()))});mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);m()}));var p=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
+function(){m()}),1E3)});mxEvent.addListener(f,"click",mxUtils.bind(this,function(b){var d=mxEvent.getSource(b);d!=l&&d!=k?(null!=e&&e(),m(),mxEvent.consume(b)):p()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(p,3E4);d=!0}return d};EditorUi.prototype.setCurrentFile=function(b){null!=b&&(b.opened=new Date);this.currentFile=b};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
+function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(b,c,e,g){b=b.toDataURL("image/"+e);if(null!=b&&6<b.length)null!=c&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(c))),0<g&&(b=Editor.writeGraphModelToPng(b,"pHYs","dpi",g));else throw{message:mxResources.get("unknownError")};return b};EditorUi.prototype.saveCanvas=function(b,c,e,g,k){var d="jpeg"==e?"jpg":e;g=this.getBaseFilename(g)+(null!=c?".drawio":"")+"."+d;b=this.createImageDataUri(b,
+c,e,k);this.saveData(g,d,b.substring(b.lastIndexOf(",")+1),"image/"+e,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(b,c){var d=new TextareaDialog(this,b,c,null,null,mxResources.get("close"));d.textarea.style.width="600px";
+d.textarea.style.height="380px";this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(b,c,e,g,k,n){"text/xml"!=e||/(\.drawio)$/i.test(c)||/(\.xml)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.html)$/i.test(c)||(c=c+"."+(null!=n?n:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)b=g?this.base64ToBlob(b,e):new Blob([b],{type:e}),navigator.msSaveOrOpenBlob(b,c);else if(mxClient.IS_IE)e=window.open("about:blank",
+"_blank"),null==e?mxUtils.popup(b,!0):(e.document.write(b),e.document.close(),e.document.execCommand("SaveAs",!0,c),e.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==e||"image/"!=e.substring(0,6)?this.showTextDialog(c+":",b):this.openInNewWindow(b,e,g);else{var d=document.createElement("a");n=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof d.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var f=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
+n=65==(f?parseInt(f[2],10):!1)?!1:n}if(n||this.isOffline()){d.href=URL.createObjectURL(g?this.base64ToBlob(b,e):new Blob([b],{type:e}));n?d.download=c:d.setAttribute("target","_blank");document.body.appendChild(d);try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},2E4),d.click(),d.parentNode.removeChild(d)}catch(y){}}else this.createEchoRequest(b,c,e,g,k).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(b,c,e,g,k,n){b="xml="+encodeURIComponent(b);return new mxXmlRequest(SAVE_URL,
+b+(null!=e?"&mime="+e:"")+(null!=k?"&format="+k:"")+(null!=n?"&base64="+n:"")+(null!=c?"&filename="+encodeURIComponent(c):"")+(g?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(b,c){c=c||"";for(var d=atob(b),e=d.length,f=Math.ceil(e/1024),g=Array(f),k=0;k<f;++k){for(var p=1024*k,t=Math.min(p+1024,e),x=Array(t-p),E=0;p<t;++E,++p)x[E]=d[p].charCodeAt(0);g[k]=new Uint8Array(x)}return new Blob(g,{type:c})};EditorUi.prototype.saveLocalFile=function(b,c,e,g,k,n,p,t){n=null!=n?n:!1;p=null!=p?
+p:"vsdx"!=k&&(!mxClient.IS_IOS||!navigator.standalone);k=this.getServiceCount(n);isLocalStorage&&k++;var d=4>=k?2:6<k?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(d,c){try{if("_blank"==c)if(null!=e&&"image/"==e.substring(0,6))this.openInNewWindow(b,e,g);else if(null!=e&&"text/html"==e.substring(0,9)){var f=new EmbedDialog(this,b);this.showDialog(f.container,440,240,!0,!0);f.init()}else{var l=window.open("about:blank");null==l?mxUtils.popup(b,!0):(l.document.write("<pre>"+mxUtils.htmlEntities(b,
+!1)+"</pre>"),l.document.close())}else c==App.MODE_DEVICE||"download"==c?this.doSaveLocalFile(b,d,e,g,null,t):null!=d&&0<d.length&&this.pickFolder(c,mxUtils.bind(this,function(f){try{this.exportFile(b,d,e,g,c,f)}catch(L){this.handleError(L)}}))}catch(I){this.handleError(I)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,n,p,null,1<k,d,b,e,g);n=this.isServices(k)?k>d?390:270:160;this.showDialog(c.container,400,n,!0,!0);c.init()};EditorUi.prototype.openInNewWindow=
+function(b,c,e){var d=window.open("about:blank");null==d||null==d.document?mxUtils.popup(b,!0):("image/svg+xml"!=c||mxClient.IS_SVG?"image/svg+xml"==c?d.document.write("<html>"+b+"</html>"):(b=e?b:btoa(unescape(encodeURIComponent(b))),d.document.write('<html><img style="max-width:100%;" src="data:'+c+";base64,"+b+'"/></html>')):d.document.write("<html><pre>"+mxUtils.htmlEntities(b,!1)+"</pre></html>"),d.document.close())};var k=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=
+function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(b){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var d=b(mxUtils.bind(this,function(b){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position=
+"",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,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 c=d.getBoundingClientRect();this.tagsDialog.style.left=c.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=c.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(b)}),
+Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var b=this.editor.graph.getAllTags();d.style.display=0<b.length?"":"none"}));k.apply(this,arguments)}this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&
+(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),
+this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var c=b(mxUtils.bind(this,function(b){var d=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",d);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)d.apply(this);
+else{this.exportDialog=document.createElement("div");var e=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=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=e.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";e=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=e.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,
+function(b){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(b,null,"png");b=document.createElement("img");b.style.maxWidth="140px";b.style.maxHeight="140px";b.style.cursor="pointer";b.style.backgroundColor="white";b.setAttribute("title",mxResources.get("openInNewWindow"));b.setAttribute("border","0");b.setAttribute("src",c);this.exportDialog.appendChild(b);mxEvent.addListener(b,"click",mxUtils.bind(this,
+function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);d.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",d);document.body.appendChild(this.exportDialog)}mxEvent.consume(b)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(b,c,e,g,k){this.isLocalFileSave()?
+this.saveLocalFile(e,b,g,k,c):this.saveRequest(b,c,mxUtils.bind(this,function(b,d){return this.createEchoRequest(e,b,g,k,c,d)}),e,k,g)};EditorUi.prototype.saveRequest=function(b,c,e,g,k,n,p){p=null!=p?p:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);isLocalStorage&&d++;var f=4>=d?2:6<d?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,d){if("_blank"==d||null!=b&&0<b.length){var f=e("_blank"==d?null:b,d==App.MODE_DEVICE||"download"==d||null==d||"_blank"==d?"0":"1");
+null!=f&&(d==App.MODE_DEVICE||"download"==d||"_blank"==d?f.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(e){n=null!=n?n:"pdf"==c?"application/pdf":"image/"+c;if(null!=g)try{this.exportFile(g,b,n,!0,d,e)}catch(I){this.handleError(I)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),b,n,!0,d,e)}catch(I){this.handleError(I)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
+function(b){this.spinner.stop();this.handleError(b)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,p,null,1<d,f,g,n,k);d=this.isServices(d)?4<d?390:270:160;this.showDialog(b.container,380,d,!0,!0);b.init()};EditorUi.prototype.isServices=function(b){return 1!=b};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(b,c,e,g,k,n){};EditorUi.prototype.pickFolder=function(b,
+c,e){c(null)};EditorUi.prototype.exportSvg=function(b,c,e,g,k,n,p,t,y,x,E,C){if(this.spinner.spin(document.body,mxResources.get("export")))try{var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;var f=c?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==c&&(f=E?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var l=this.editor.graph.getSvg(f,b,p,t,null,e,null,null,"blank"==x?"_blank":"self"==x?"_top":null,null,!0,E,C);g&&this.editor.graph.addSvgShadow(l);var m=
+this.getBaseFilename()+(k?".drawio":"")+".svg",q=mxUtils.bind(this,function(b){this.spinner.stop();k&&b.setAttribute("content",this.getFileData(!0,null,null,null,e,y,null,null,null,!1));var d=Graph.xmlDeclaration+"\n"+(k?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(b);this.isLocalFileSave()||d.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",d,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}))});
+this.editor.addFontCss(l);this.editor.graph.mathEnabled&&this.editor.addMathCss(l);n?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(l,q,this.thumbImageCache)):q(l)}catch(B){this.handleError(B)}};EditorUi.prototype.addRadiobox=function(b,c,e,g,k,n,p){return this.addCheckbox(b,e,g,k,n,p,!0,c)};EditorUi.prototype.addCheckbox=function(b,c,e,g,k,n,p,t){n=null!=n?n:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type",
+p?"radio":"checkbox");p="geCheckbox-"+Editor.guid();d.id=p;null!=t&&d.setAttribute("name",t);e&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);g&&d.setAttribute("disabled","disabled");n&&(b.appendChild(d),e=document.createElement("label"),mxUtils.write(e,c),e.setAttribute("for",p),b.appendChild(e),k||mxUtils.br(b));return d};EditorUi.prototype.addEditButton=function(b,c){var d=this.addCheckbox(b,mxResources.get("edit")+":",!0,null,!0);d.style.marginLeft="24px";var e=this.getCurrentFile(),
+f="";null!=e&&e.getMode()!=App.MODE_DEVICE&&e.getMode()!=App.MODE_BROWSER&&(f=window.location.href);var g=document.createElement("select");g.style.width="120px";g.style.marginLeft="8px";g.style.marginRight="10px";g.className="geBtn";e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("makeCopy"));g.appendChild(e);e=document.createElement("option");e.setAttribute("value","custom");mxUtils.write(e,mxResources.get("custom")+"...");g.appendChild(e);b.appendChild(g);
+mxEvent.addListener(g,"change",mxUtils.bind(this,function(){if("custom"==g.value){var b=new FilenameDialog(this,f,mxResources.get("ok"),function(b){null!=b?f=b:g.value="blank"},mxResources.get("url"),null,null,null,null,function(){g.value="blank"});this.showDialog(b.container,300,80,!0,!1);b.init()}}));mxEvent.addListener(d,"change",mxUtils.bind(this,function(){d.checked&&(null==c||c.checked)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")}));mxUtils.br(b);return{getLink:function(){return d.checked?
+"blank"===g.value?"_blank":f:null},getEditInput:function(){return d},getEditSelect:function(){return g}}};EditorUi.prototype.addLinkSection=function(b,c){function d(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=g&&g!=mxConstants.NONE?"border:1px solid black;background-color:"+g:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(b,mxResources.get("links")+":");var e=document.createElement("select");
e.style.width="100px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));e.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));e.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));e.appendChild(f);c&&
(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),e.appendChild(f));b.appendChild(e);mxUtils.write(b,mxResources.get("borderColor")+":");var g="#0000ff",k=null,k=mxUtils.button("",mxUtils.bind(this,function(b){this.pickColor(g||"none",function(b){g=b;d()});mxEvent.consume(b)}));d();k.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width=
"22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";b.appendChild(k);mxUtils.br(b);return{getColor:function(){return g},getTarget:function(){return e.value},focus:function(){e.focus()}}};EditorUi.prototype.createUrlParameters=function(b,c,e,g,k,n,p){p=null!=p?p:[];g&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||p.push("lightbox=1"),"auto"!=b&&p.push("target="+b),null!=c&&c!=mxConstants.NONE&&
p.push("highlight="+("#"==c.charAt(0)?c.substring(1):c)),null!=k&&0<k.length&&p.push("edit="+encodeURIComponent(k)),n&&p.push("layers=1"),this.editor.graph.foldingEnabled&&p.push("nav=1"));e&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&p.push("page-id="+this.currentPage.getId());return p};EditorUi.prototype.createLink=function(b,c,e,g,k,n,p,t,y,x){y=this.createUrlParameters(b,c,e,g,k,n,y);b=this.getCurrentFile();c=!0;null!=p?e="#U"+encodeURIComponent(p):(b=this.getCurrentFile(),
t||null==b||b.constructor!=window.DriveFile?e="#R"+encodeURIComponent(e?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(e="#"+b.getHash(),c=!1));c&&null!=b&&null!=b.getTitle()&&b.getTitle()!=this.defaultFilename&&y.push("title="+encodeURIComponent(b.getTitle()));x&&1<e.length&&(y.push("open="+e.substring(1)),e="");return(g&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
-EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<y.length?"?"+y.join("&"):"")+e};EditorUi.prototype.createHtml=function(b,c,e,g,k,n,p,t,y,x,G,C){this.getBasenames();var d={};""!=k&&k!=mxConstants.NONE&&(d.highlight=k);"auto"!==g&&(d.target=g);x||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;e=parseInt(e);isNaN(e)||100==e||(d.zoom=e/100);e=[];p&&(e.push("pages"),d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));c&&(e.push("zoom"),
-d.resize=!0);t&&e.push("layers");y&&e.push("tags");0<e.length&&(x&&e.push("lightbox"),d.toolbar=e.join(" "));null!=G&&0<G.length&&(d.edit=G);null!=b?d.url=b:d.xml=this.getFileData(!0,null,null,null,null,!p);c='<div class="mxgraph" style="'+(n?"max-width:100%;":"")+(""!=e?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';b=null!=b?"&fetch="+encodeURIComponent(b):"";C(c,'<script type="text/javascript" src="'+(0<b.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":
+EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<y.length?"?"+y.join("&"):"")+e};EditorUi.prototype.createHtml=function(b,c,e,g,k,n,p,t,y,x,E,C){this.getBasenames();var d={};""!=k&&k!=mxConstants.NONE&&(d.highlight=k);"auto"!==g&&(d.target=g);x||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;e=parseInt(e);isNaN(e)||100==e||(d.zoom=e/100);e=[];p&&(e.push("pages"),d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));c&&(e.push("zoom"),
+d.resize=!0);t&&e.push("layers");y&&e.push("tags");0<e.length&&(x&&e.push("lightbox"),d.toolbar=e.join(" "));null!=E&&0<E.length&&(d.edit=E);null!=b?d.url=b:d.xml=this.getFileData(!0,null,null,null,null,!p);c='<div class="mxgraph" style="'+(n?"max-width:100%;":"")+(""!=e?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';b=null!=b?"&fetch="+encodeURIComponent(b):"";C(c,'<script type="text/javascript" src="'+(0<b.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":
EditorUi.lightboxHost+"/embed2.js?")+b:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(b,c,e,g){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var l=
document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");l.appendChild(f);var m=document.createElement("span");mxUtils.write(m,mxResources.get("includeCopyOfMyDiagram"));l.appendChild(m);
mxUtils.br(l);l.appendChild(k);m=document.createElement("span");mxUtils.write(m,mxResources.get("publicDiagramUrl"));l.appendChild(m);var p=this.getCurrentFile();null==e&&null!=p&&p.constructor==window.DriveFile&&(m=document.createElement("a"),m.style.paddingLeft="12px",m.style.color="gray",m.style.cursor="pointer",mxUtils.write(m,mxResources.get("share")),l.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(p.getId())})));f.setAttribute("checked",
-"checked");null==e&&k.setAttribute("disabled","disabled");d.appendChild(l);var t=this.addLinkSection(d),C=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var E=document.createElement("input");E.setAttribute("type","text");E.style.marginRight="16px";E.style.width="60px";E.style.marginLeft="4px";E.style.marginRight="12px";E.value="100%";d.appendChild(E);var J=this.addCheckbox(d,mxResources.get("fit"),!0),l=null!=this.pages&&1<this.pages.length,L=L=this.addCheckbox(d,mxResources.get("allPages"),
-l,!l),H=this.addCheckbox(d,mxResources.get("layers"),!0),K=this.addCheckbox(d,mxResources.get("tags"),!0),B=this.addCheckbox(d,mxResources.get("lightbox"),!0),M=this.addEditButton(d,B),P=M.getEditInput();P.style.marginBottom="16px";mxEvent.addListener(B,"change",function(){B.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled");P.checked&&B.checked?M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,
-mxUtils.bind(this,function(){g(k.checked?e:null,C.checked,E.value,t.getTarget(),t.getColor(),J.checked,L.checked,H.checked,K.checked,B.checked,M.getLink())}),null,b,c);this.showDialog(b.container,340,430,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(b,c,e,g,k,n){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,b||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
+"checked");null==e&&k.setAttribute("disabled","disabled");d.appendChild(l);var t=this.addLinkSection(d),C=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var F=document.createElement("input");F.setAttribute("type","text");F.style.marginRight="16px";F.style.width="60px";F.style.marginLeft="4px";F.style.marginRight="12px";F.value="100%";d.appendChild(F);var I=this.addCheckbox(d,mxResources.get("fit"),!0),l=null!=this.pages&&1<this.pages.length,L=L=this.addCheckbox(d,mxResources.get("allPages"),
+l,!l),H=this.addCheckbox(d,mxResources.get("layers"),!0),J=this.addCheckbox(d,mxResources.get("tags"),!0),B=this.addCheckbox(d,mxResources.get("lightbox"),!0),M=this.addEditButton(d,B),P=M.getEditInput();P.style.marginBottom="16px";mxEvent.addListener(B,"change",function(){B.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled");P.checked&&B.checked?M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,
+mxUtils.bind(this,function(){g(k.checked?e:null,C.checked,F.value,t.getTarget(),t.getColor(),I.checked,L.checked,H.checked,J.checked,B.checked,M.getLink())}),null,b,c);this.showDialog(b.container,340,430,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(b,c,e,g,k,n){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,b||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
d.appendChild(f);var l=this.getCurrentFile(),f="https://www.diagrams.net/doc/faq/publish-diagram-as-link";b=0;if(null!=l&&l.constructor==window.DriveFile&&!c){b=80;var f="https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram",m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var p=document.createElement("div");p.style.whiteSpace="normal";mxUtils.write(p,mxResources.get("linkAccountRequired"));
m.appendChild(p);p=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));p.style.marginTop="12px";p.className="geBtn";m.appendChild(p);d.appendChild(m);p=document.createElement("a");p.style.paddingLeft="12px";p.style.color="gray";p.style.fontSize="11px";p.style.cursor="pointer";mxUtils.write(p,mxResources.get("check"));m.appendChild(p);mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&
this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(b){this.spinner.stop();b=new ErrorDialog(this,null,mxResources.get(null!=b?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(b.container,300,80,!0,!1);b.init()}))}))}var q=null,t=null;if(null!=e||null!=g)b+=30,mxUtils.write(d,mxResources.get("width")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.marginRight="16px",q.style.width="50px",q.style.marginLeft="6px",q.style.marginRight=
-"16px",q.style.marginBottom="10px",q.value="100%",d.appendChild(q),mxUtils.write(d,mxResources.get("height")+":"),t=document.createElement("input"),t.setAttribute("type","text"),t.style.width="50px",t.style.marginLeft="6px",t.style.marginBottom="10px",t.value=g+"px",d.appendChild(t),mxUtils.br(d);var J=this.addLinkSection(d,n);e=null!=this.pages&&1<this.pages.length;var L=null;if(null==l||l.constructor!=window.DriveFile||c)L=this.addCheckbox(d,mxResources.get("allPages"),e,!e);var H=this.addCheckbox(d,
-mxResources.get("lightbox"),!0,null,null,!n),K=this.addEditButton(d,H),B=K.getEditInput();n&&(B.style.marginLeft=H.style.marginLeft,H.style.display="none",b-=20);var M=this.addCheckbox(d,mxResources.get("layers"),!0);M.style.marginLeft=B.style.marginLeft;M.style.marginTop="8px";var P=this.addCheckbox(d,mxResources.get("tags"),!0);P.style.marginLeft=B.style.marginLeft;P.style.marginBottom="16px";P.style.marginTop="16px";mxEvent.addListener(H,"change",function(){H.checked?(M.removeAttribute("disabled"),
-B.removeAttribute("disabled")):(M.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"));B.checked&&H.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){k(J.getTarget(),J.getColor(),null==L?!0:L.checked,H.checked,K.getLink(),M.checked,null!=q?q.value:null,null!=t?t.value:null,P.checked)}),null,mxResources.get("create"),f);this.showDialog(c.container,340,300+b,!0,!0);
-null!=q?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)):J.focus()};EditorUi.prototype.showRemoteExportDialog=function(b,c,e,g,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(k?"10":"4")+"px";d.appendChild(f);if(k){mxUtils.write(d,mxResources.get("zoom")+
+"16px",q.style.marginBottom="10px",q.value="100%",d.appendChild(q),mxUtils.write(d,mxResources.get("height")+":"),t=document.createElement("input"),t.setAttribute("type","text"),t.style.width="50px",t.style.marginLeft="6px",t.style.marginBottom="10px",t.value=g+"px",d.appendChild(t),mxUtils.br(d);var I=this.addLinkSection(d,n);e=null!=this.pages&&1<this.pages.length;var L=null;if(null==l||l.constructor!=window.DriveFile||c)L=this.addCheckbox(d,mxResources.get("allPages"),e,!e);var H=this.addCheckbox(d,
+mxResources.get("lightbox"),!0,null,null,!n),J=this.addEditButton(d,H),B=J.getEditInput();n&&(B.style.marginLeft=H.style.marginLeft,H.style.display="none",b-=20);var M=this.addCheckbox(d,mxResources.get("layers"),!0);M.style.marginLeft=B.style.marginLeft;M.style.marginTop="8px";var P=this.addCheckbox(d,mxResources.get("tags"),!0);P.style.marginLeft=B.style.marginLeft;P.style.marginBottom="16px";P.style.marginTop="16px";mxEvent.addListener(H,"change",function(){H.checked?(M.removeAttribute("disabled"),
+B.removeAttribute("disabled")):(M.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"));B.checked&&H.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){k(I.getTarget(),I.getColor(),null==L?!0:L.checked,H.checked,J.getLink(),M.checked,null!=q?q.value:null,null!=t?t.value:null,P.checked)}),null,mxResources.get("create"),f);this.showDialog(c.container,340,300+b,!0,!0);
+null!=q?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)):I.focus()};EditorUi.prototype.showRemoteExportDialog=function(b,c,e,g,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(k?"10":"4")+"px";d.appendChild(f);if(k){mxUtils.write(d,mxResources.get("zoom")+
":");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginRight="16px";l.style.width="60px";l.style.marginLeft="4px";l.style.marginRight="12px";l.value=this.lastExportZoom||"100%";d.appendChild(l);mxUtils.write(d,mxResources.get("borderWidth")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.value=this.lastExportBorder||"0";d.appendChild(m);mxUtils.br(d)}var p=this.addCheckbox(d,
mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),q=g?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),f=this.editor.graph,t=g?null:this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=t&&(t.style.marginBottom="16px");b=new CustomDialog(this,d,mxUtils.bind(this,function(){var b=parseInt(l.value)/100||1,d=parseInt(m.value)||0;e(!p.checked,null!=q?q.checked:!1,null!=
t?t.checked:!1,b,d)}),null,b,c);this.showDialog(b.container,300,(k?25:0)+(g?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(b,c,e,g,k,n,p,t,y){p=null!=p?p:Editor.defaultIncludeDiagram;var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph,l="jpeg"==t?220:300,m=document.createElement("h3");mxUtils.write(m,b);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";d.appendChild(m);mxUtils.write(d,mxResources.get("zoom")+":");var q=
document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value=this.lastExportZoom||"100%";d.appendChild(q);mxUtils.write(d,mxResources.get("borderWidth")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.value=this.lastExportBorder||"0";d.appendChild(v);mxUtils.br(d);var u=this.addCheckbox(d,mxResources.get("selectionOnly"),
-!1,f.isSelectionEmpty()),K=document.createElement("input");K.style.marginTop="16px";K.style.marginRight="8px";K.style.marginLeft="24px";K.setAttribute("disabled","disabled");K.setAttribute("type","checkbox");var B=document.createElement("select");B.style.marginTop="16px";B.style.marginLeft="8px";b=["selectionOnly","diagram","page"];for(m=0;m<b.length;m++)if(!f.isSelectionEmpty()||"selectionOnly"!=b[m]){var M=document.createElement("option");mxUtils.write(M,mxResources.get(b[m]));M.setAttribute("value",
-b[m]);B.appendChild(M)}y?(mxUtils.write(d,mxResources.get("size")+":"),d.appendChild(B),mxUtils.br(d),l+=26,mxEvent.addListener(B,"change",function(){"selectionOnly"==B.value&&(u.checked=!0)})):n&&(d.appendChild(K),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),l+=30,mxEvent.addListener(u,"change",function(){u.checked?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled")}));f.isSelectionEmpty()?y&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display=
-"none",l-=30):(B.value="diagram",K.setAttribute("checked","checked"),K.defaultChecked=!0,mxEvent.addListener(u,"change",function(){B.value=u.checked?"selectionOnly":"diagram"}));var P=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=t),T=null;Editor.isDarkMode()&&(T=this.addCheckbox(d,mxResources.get("dark"),!0),l+=26);var N=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible),R=document.createElement("input");R.style.marginTop="16px";R.style.marginRight="8px";
-R.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||R.setAttribute("disabled","disabled");c&&(d.appendChild(R),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),l+=30);var F=null;if("png"==t||"jpeg"==t)F=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),l+=30;var D=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),p,null,null,"jpeg"!=t);D.style.marginBottom="16px";var A=document.createElement("select");A.style.maxWidth=
+!1,f.isSelectionEmpty()),J=document.createElement("input");J.style.marginTop="16px";J.style.marginRight="8px";J.style.marginLeft="24px";J.setAttribute("disabled","disabled");J.setAttribute("type","checkbox");var B=document.createElement("select");B.style.marginTop="16px";B.style.marginLeft="8px";b=["selectionOnly","diagram","page"];for(m=0;m<b.length;m++)if(!f.isSelectionEmpty()||"selectionOnly"!=b[m]){var M=document.createElement("option");mxUtils.write(M,mxResources.get(b[m]));M.setAttribute("value",
+b[m]);B.appendChild(M)}y?(mxUtils.write(d,mxResources.get("size")+":"),d.appendChild(B),mxUtils.br(d),l+=26,mxEvent.addListener(B,"change",function(){"selectionOnly"==B.value&&(u.checked=!0)})):n&&(d.appendChild(J),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),l+=30,mxEvent.addListener(u,"change",function(){u.checked?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")}));f.isSelectionEmpty()?y&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display=
+"none",l-=30):(B.value="diagram",J.setAttribute("checked","checked"),J.defaultChecked=!0,mxEvent.addListener(u,"change",function(){B.value=u.checked?"selectionOnly":"diagram"}));var P=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=t),T=null;Editor.isDarkMode()&&(T=this.addCheckbox(d,mxResources.get("dark"),!0),l+=26);var N=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible),R=document.createElement("input");R.style.marginTop="16px";R.style.marginRight="8px";
+R.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||R.setAttribute("disabled","disabled");c&&(d.appendChild(R),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),l+=30);var G=null;if("png"==t||"jpeg"==t)G=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),l+=30;var D=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),p,null,null,"jpeg"!=t);D.style.marginBottom="16px";var A=document.createElement("select");A.style.maxWidth=
"260px";A.style.marginLeft="8px";A.style.marginRight="10px";A.className="geBtn";c=document.createElement("option");c.setAttribute("value","auto");mxUtils.write(c,mxResources.get("automatic"));A.appendChild(c);c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("openInNewWindow"));A.appendChild(c);c=document.createElement("option");c.setAttribute("value","self");mxUtils.write(c,mxResources.get("openInThisWindow"));A.appendChild(c);"svg"==t&&(mxUtils.write(d,
-mxResources.get("links")+":"),d.appendChild(A),mxUtils.br(d),mxUtils.br(d),l+=50);e=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=v.value;this.lastExportZoom=q.value;k(q.value,P.checked,!u.checked,N.checked,D.checked,R.checked,v.value,K.checked,!1,A.value,null!=F?F.checked:null,null!=T?T.checked:null,B.value)}),null,e,g);this.showDialog(e.container,340,l,!0,!0,null,null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",
+mxResources.get("links")+":"),d.appendChild(A),mxUtils.br(d),mxUtils.br(d),l+=50);e=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=v.value;this.lastExportZoom=q.value;k(q.value,P.checked,!u.checked,N.checked,D.checked,R.checked,v.value,J.checked,!1,A.value,null!=G?G.checked:null,null!=T?T.checked:null,B.value)}),null,e,g);this.showDialog(e.container,340,l,!0,!0,null,null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",
!1,null)};EditorUi.prototype.showEmbedImageDialog=function(b,c,e,g,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=c){var l=document.createElement("h3");mxUtils.write(l,c);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(l)}var m=this.addCheckbox(d,mxResources.get("fit"),!0),p=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible&&g,!g),q=this.addCheckbox(d,e),t=this.addCheckbox(d,mxResources.get("lightbox"),
-!0),E=this.addEditButton(d,t),J=E.getEditInput(),L=1<f.model.getChildCount(f.model.getRoot()),H=this.addCheckbox(d,mxResources.get("layers"),L,!L);H.style.marginLeft=J.style.marginLeft;H.style.marginBottom="12px";H.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(L&&H.removeAttribute("disabled"),J.removeAttribute("disabled")):(H.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"));J.checked&&t.checked?E.getEditSelect().removeAttribute("disabled"):E.getEditSelect().setAttribute("disabled",
-"disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){b(m.checked,p.checked,q.checked,t.checked,E.getLink(),H.checked)}),null,mxResources.get("embed"),k);this.showDialog(c.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(b,c,e,g,k,n,p,t){function d(d){var c=" ",m="";g&&(c=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+!0),F=this.addEditButton(d,t),I=F.getEditInput(),L=1<f.model.getChildCount(f.model.getRoot()),H=this.addCheckbox(d,mxResources.get("layers"),L,!L);H.style.marginLeft=I.style.marginLeft;H.style.marginBottom="12px";H.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(L&&H.removeAttribute("disabled"),I.removeAttribute("disabled")):(H.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"));I.checked&&t.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled",
+"disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){b(m.checked,p.checked,q.checked,t.checked,F.getLink(),H.checked)}),null,mxResources.get("embed"),k);this.showDialog(c.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(b,c,e,g,k,n,p,t){function d(d){var c=" ",m="";g&&(c=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
EditorUi.lightboxHost+"/?client=1"+(null!=l?"&page="+l:"")+(k?"&edit=_blank":"")+(n?"&layers=1":"")+"');}})(this);\"",m+="cursor:pointer;");b&&(m+="max-width:100%;");var q="";e&&(q=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');p('<img src="'+d+'"'+q+(""!=m?' style="'+m+'"':"")+c+"/>")}var f=this.editor.graph.getGraphBounds(),l=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(b){var c=g?this.getFileData(!0):null;b=
this.createImageDataUri(b,c,"png");d(b)}),null,null,null,mxUtils.bind(this,function(b){t({message:mxResources.get("unknownError")})}),null,!0,e?2:1,null,c,null,null,Editor.defaultBorder);else if(c=this.getFileData(!0),f.width*f.height<=MAX_AREA&&c.length<=MAX_REQUEST_SIZE){var m="";e&&(m="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(g?"1":"0")+m+"&xml="+encodeURIComponent(c));q.send(mxUtils.bind(this,function(){200<=q.getStatus()&&
299>=q.getStatus()?d("data:image/png;base64,"+q.getText()):t({message:mxResources.get("unknownError")})}))}else t({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(b,c,e,g,k,n,p){var d=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!e),f=d.getElementsByTagName("a");if(null!=f)for(var l=0;l<f.length;l++){var m=f[l].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==f[l].getAttribute("target")&&f[l].removeAttribute("target")}g&&
@@ -3515,228 +3519,228 @@ Math.floor((new Date-b)/1E3);var d=Math.floor(b/31536E3);if(1<d)return d+" "+mxR
b;else if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram");if(0<e.length){var d=e[0],f=c.getGlobalVariable;c.getGlobalVariable=function(b){return"page"==b?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==b?1:f.apply(this,arguments)}}}null!=d&&(b=Editor.parseDiagramNode(d))}e=this.editor.graph;try{this.editor.graph=c,this.editor.setGraphXml(b)}catch(n){}finally{this.editor.graph=e}return b};EditorUi.prototype.getPngFileProperties=function(b){var d=1,c=0;if(null!=
b){if(b.hasAttribute("scale")){var e=parseFloat(b.getAttribute("scale"));!isNaN(e)&&0<e&&(d=e)}b.hasAttribute("border")&&(e=parseInt(b.getAttribute("border")),!isNaN(e)&&0<e&&(c=e))}return{scale:d,border:c}};EditorUi.prototype.getEmbeddedPng=function(b,c,e,g,k){try{var d=this.editor.graph,f=null!=d.themes&&"darkTheme"==d.defaultThemeName,l=null;if(null!=e&&0<e.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(e).documentElement,
!0),d),l=e;else if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),m=d.getGlobalVariable,p=this.pages[0];d.getGlobalVariable=function(b){return"page"==b?p.getName():"pagenumber"==b?1:m.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(p.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(e){try{null==l&&(l=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=e.toDataURL("image/png"),f=Editor.writeGraphModelToPng(f,
-"tEXt","mxfile",encodeURIComponent(l));b(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(E){null!=c&&c(E)}}),null,null,null,mxUtils.bind(this,function(b){null!=c&&c(b)}),null,null,g,null,d.shadowVisible,null,d,k)}catch(G){null!=c&&c(G)}};EditorUi.prototype.getEmbeddedSvg=function(b,c,e,g,k,n,p,t,y,x,G,C,E){t=null!=t?t:!0;p=null!=y?y:c.background;p==mxConstants.NONE&&(p=null);n=c.getSvg(p,x,G,null,null,n,null,null,null,c.shadowVisible||
-C,null,E);(c.shadowVisible||C)&&c.addSvgShadow(n);null!=b&&n.setAttribute("content",b);null!=e&&n.setAttribute("resource",e);if(null!=k)this.embedFonts(n,mxUtils.bind(this,function(b){t?this.editor.convertImages(b,mxUtils.bind(this,function(b){k((g?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(b))})):k((g?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
-mxUtils.getXml(b))}));else return(g?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(n)};EditorUi.prototype.embedFonts=function(b,c){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(b,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(d){try{null!=d&&this.editor.addFontCss(b,d),c(b)}catch(m){c(b)}}))}catch(l){c(b)}}))};
-EditorUi.prototype.exportImage=function(b,c,e,g,k,n,p,t,y,x,G,C,E){y=null!=y?y:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(b){this.spinner.stop();try{this.saveCanvas(b,k?this.getFileData(!0,null,null,null,e,t):null,y,null==this.pages||0==this.pages.length,G)}catch(H){this.handleError(H)}}),null,this.thumbImageCache,
-null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,e,b||1,c,g,null,null,n,p,x,C,E)}catch(L){this.spinner.stop(),this.handleError(L)}}};EditorUi.prototype.isCorsEnabledForUrl=function(b){return this.editor.isCorsEnabledForUrl(b)};EditorUi.prototype.importXml=function(b,c,e,g,k,n,p){c=null!=c?c:0;e=null!=e?e:0;var d=[];try{var f=this.editor.graph;if(null!=b&&0<b.length){f.model.beginUpdate();try{var l=mxUtils.parseXml(b);b={};var m=this.editor.extractGraphModel(l.documentElement,
-null!=this.pages);if(null!=m&&"mxfile"==m.nodeName&&null!=this.pages){var q=m.getElementsByTagName("diagram");if(1==q.length&&!n){if(m=Editor.parseDiagramNode(q[0]),null!=this.currentPage&&(b[q[0].getAttribute("id")]=this.currentPage.getId(),null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1]))){var t=q[0].getAttribute("name");null!=t&&""!=t&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,t))}}else if(0<
-q.length){n=[];var u=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(b[q[0].getAttribute("id")]=this.pages[0].getId(),m=Editor.parseDiagramNode(q[0]),g=!1,u=1);for(;u<q.length;u++){var L=q[u].getAttribute("id");q[u].removeAttribute("id");var H=this.updatePageRoot(new DiagramPage(q[u]));b[L]=q[u].getAttribute("id");var K=this.pages.length;null==H.getName()&&H.setName(mxResources.get("pageWithNumber",[K+1]));f.model.execute(new ChangePage(this,H,H,K,!0));n.push(H)}this.updatePageLinks(b,
-n)}}if(null!=m&&"mxGraphModel"===m.nodeName&&(d=f.importGraphModel(m,c,e,g),null!=d))for(u=0;u<d.length;u++)this.updatePageLinksForCell(b,d[u]);p&&this.insertHandler(d,null,null,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,!0,!0)}finally{f.model.endUpdate()}}}catch(B){if(k)throw B;this.handleError(B)}return d};EditorUi.prototype.updatePageLinks=function(b,c){for(var d=0;d<c.length;d++)this.updatePageLinksForCell(b,c[d].root)};EditorUi.prototype.updatePageLinksForCell=function(b,
-c){var d=document.createElement("div"),e=this.editor.graph,f=e.getLinkForCell(c);null!=f&&e.setLinkForCell(c,this.updatePageLink(b,f));if(e.isHtmlLabel(c)){d.innerHTML=e.sanitizeHtml(e.getLabel(c));for(var g=d.getElementsByTagName("a"),k=!1,p=0;p<g.length;p++)f=g[p].getAttribute("href"),null!=f&&(g[p].setAttribute("href",this.updatePageLink(b,f)),k=!0);k&&e.labelChanged(c,d.innerHTML)}for(p=0;p<e.model.getChildCount(c);p++)this.updatePageLinksForCell(b,e.model.getChildAt(c,p))};EditorUi.prototype.updatePageLink=
-function(b,c){if(Graph.isPageLink(c)){var d=b[c.substring(c.indexOf(",")+1)];c=null!=d?"data:page/id,"+d:null}else if("data:action/json,"==c.substring(0,17))try{var e=JSON.parse(c.substring(17));if(null!=e.actions){for(var f=0;f<e.actions.length;f++){var g=e.actions[f];if(null!=g.open&&Graph.isPageLink(g.open)){var k=g.open.substring(g.open.indexOf(",")+1),d=b[k];null!=d?g.open="data:page/id,"+d:null==this.getPageById(k)&&delete g.open}}c="data:action/json,"+JSON.stringify(e)}}catch(v){}return c};
-EditorUi.prototype.isRemoteVisioFormat=function(b){return/(\.v(sd|dx))($|\?)/i.test(b)||/(\.vs(s|x))($|\?)/i.test(b)};EditorUi.prototype.importVisio=function(b,c,e,g,k){g=null!=g?g:b.name;e=null!=e?e:mxUtils.bind(this,function(b){this.handleError(b)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var d=this.isRemoteVisioFormat(g);try{var f="UNKNOWN-VISIO",l=g.lastIndexOf(".");if(0<=l&&l<g.length)f=g.substring(l+1).toUpperCase();else{var m=g.lastIndexOf("/");0<=
-m&&m<g.length&&(g=g.substring(m+1))}EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+g,label:d?"remote":"local"})}catch(C){}if(d)if(null==VSD_CONVERT_URL||this.isOffline())e({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{d=new FormData;d.append("file1",b,g);var n=new XMLHttpRequest;n.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(g)?"?stencil=1":""));n.responseType="blob";this.addRemoteServiceSecurityCheck(n);
-null!=k&&n.setRequestHeader("x-convert-custom",k);n.onreadystatechange=mxUtils.bind(this,function(){if(4==n.readyState)if(200<=n.status&&299>=n.status)try{var b=n.response;if("text/xml"==b.type){var d=new FileReader;d.onload=mxUtils.bind(this,function(b){try{c(b.target.result)}catch(L){e({message:mxResources.get("errorLoadingFile")})}});d.readAsText(b)}else this.doImportVisio(b,c,e,g)}catch(J){e(J)}else try{""==n.responseType||"text"==n.responseType?e({message:n.responseText}):(d=new FileReader,d.onload=
-function(){e({message:JSON.parse(d.result).Message})},d.readAsText(n.response))}catch(J){e({})}});n.send(d)}else try{this.doImportVisio(b,c,e,g)}catch(C){e(C)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.importGraphML=function(b,c,e){e=null!=e?e:mxUtils.bind(this,function(b){this.handleError(b)});
-var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(b,c,e)}catch(q){e(q)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(b){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(b)||
-this.handleError({message:mxResources.get("unknownError")})}catch(l){this.handleError(l)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.convertLucidChart=function(b,c,e){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",
-action:"size_"+b.length}),EditorUi.debug("convertLucidChart",b)}catch(q){}try{c(LucidImporter.importState(JSON.parse(b)))}catch(q){null!=window.console&&console.error(q),e(q)}}else e({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",
-function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",d)})})})}):mxscript("js/extensions.min.js",d))};EditorUi.prototype.generateMermaidImage=function(b,c,e,g){var d=this,f=function(){try{this.loadingMermaid=!1,c=null!=c?c:EditorUi.defaultMermaidConfig,c.securityLevel="strict",c.startOnLoad=!1,mermaid.mermaidAPI.initialize(c),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),b,function(b){try{if(mxClient.IS_IE||mxClient.IS_IE11)b=
-b.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var c=mxUtils.parseXml(b).getElementsByTagName("svg");if(0<c.length){var f=parseFloat(c[0].getAttribute("width")),l=parseFloat(c[0].getAttribute("height"));if(isNaN(f)||isNaN(l))try{var k=c[0].getAttribute("viewBox").split(/\s+/),f=parseFloat(k[2]),l=parseFloat(k[3])}catch(C){f=f||100,l=l||100}e(d.convertDataUri(Editor.createSvgDataUri(b)),f,l)}else g({message:mxResources.get("invalidInput")})}catch(C){g(C)}})}catch(u){g(u)}};
-"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=function(b,c,e,g){function d(b,d,c){c1=b>>2;c2=(b&3)<<4|d>>4;c3=(d&15)<<2|c>>6;c4=c&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(b){if(10>b)return String.fromCharCode(48+b);b-=10;if(26>b)return String.fromCharCode(65+b);b-=26;if(26>b)return String.fromCharCode(97+
-b);b-=26;return 0==b?"-":1==b?"_":"?"}var l=new XMLHttpRequest;l.open("GET",("txt"==c?PLANT_URL+"/txt/":"png"==c?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(b){r="";for(i=0;i<b.length;i+=3)r=i+2==b.length?r+d(b.charCodeAt(i),b.charCodeAt(i+1),0):i+1==b.length?r+d(b.charCodeAt(i),0,0):r+d(b.charCodeAt(i),b.charCodeAt(i+1),b.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(b))),!0);"txt"!=c&&(l.responseType="blob");l.onload=function(b){if(200<=this.status&&300>this.status)if("txt"==
-c)e(this.response);else{var d=new FileReader;d.readAsDataURL(this.response);d.onloadend=function(b){var c=new Image;c.onload=function(){try{var b=c.width,f=c.height;if(0==b&&0==f){var l=d.result,k=l.indexOf(","),m=decodeURIComponent(escape(atob(l.substring(k+1)))),n=mxUtils.parseXml(m).getElementsByTagName("svg");0<n.length&&(b=parseFloat(n[0].getAttribute("width")),f=parseFloat(n[0].getAttribute("height")))}e(d.result,b,f)}catch(B){g(B)}};c.src=d.result};d.onerror=function(b){g(b)}}else g(b)};l.onerror=
-function(b){g(b)};l.send()};EditorUi.prototype.insertAsPreText=function(b,c,e){var d=this.editor.graph,f=null;d.getModel().beginUpdate();try{f=d.insertVertex(null,null,"<pre>"+b+"</pre>",c,e,1,1,"text;html=1;align=left;verticalAlign=top;"),d.updateCellSize(f,!0)}finally{d.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=function(b,c,e,g,k,n,p,t){n=null!=n?n:!0;p=null!=p?p:!0;if(null!=b)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b))this.parseFile(new Blob([b.replace(/\s+/g,
-" ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&this.editor.graph.setSelectionCells(this.insertTextAt(b.responseText,c,e,!0))}));else if("data:"==b.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b))){var d=this.editor.graph;if("data:application/pdf;base64,"==b.substring(0,28)){var f=Editor.extractGraphModelFromPdf(b);if(null!=f&&0<f.length)return this.importXml(f,c,e,n,!0,t)}if("data:image/png;base64,"==
-b.substring(0,22)&&(f=this.extractGraphModelFromPng(b),null!=f&&0<f.length))return this.importXml(f,c,e,n,!0,t);if("data:image/svg+xml;"==b.substring(0,19))try{f=null;"data:image/svg+xml;base64,"==b.substring(0,26)?(f=b.substring(b.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(b.substring(b.indexOf(",")+1));var l=this.importXml(f,c,e,n,!0,t);if(0<l.length)return l}catch(E){}this.loadImage(b,mxUtils.bind(this,function(f){if("data:"==b.substring(0,
-5))this.resizeImage(f,b,mxUtils.bind(this,function(b,f,g){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(c),d.snap(e),f,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(b)+";"))}),p,this.maxImageSize);else{var g=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)),l=Math.round(f.width*g);f=Math.round(f.height*g);d.setSelectionCell(d.insertVertex(null,null,"",d.snap(c),d.snap(e),
-l,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";"))}}),mxUtils.bind(this,function(){var f=null;d.getModel().beginUpdate();try{f=d.insertVertex(d.getDefaultParent(),null,b,d.snap(c),d.snap(e),1,1,"text;"+(g?"html=1;":"")),d.updateCellSize(f),d.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{d.getModel().endUpdate()}d.setSelectionCell(f)}))}else{b=Graph.zapGremlins(mxUtils.trim(b));if(this.isCompatibleString(b))return this.importXml(b,
-c,e,n,null,t);if(0<b.length)if(this.isLucidChartData(b))this.convertLucidChart(b,mxUtils.bind(this,function(b){this.editor.graph.setSelectionCells(this.importXml(b,c,e,n,null,t))}),mxUtils.bind(this,function(b){this.handleError(b)}));else{d=this.editor.graph;k=null;d.getModel().beginUpdate();try{k=d.insertVertex(d.getDefaultParent(),null,"",d.snap(c),d.snap(e),1,1,"text;whiteSpace=wrap;"+(g?"html=1;":""));d.fireEvent(new mxEventObject("textInserted","cells",[k]));"<"==b.charAt(0)&&b.indexOf(">")==
-b.length-1&&(b=mxUtils.htmlEntities(b));b.length>this.maxTextBytes&&(b=b.substring(0,this.maxTextBytes)+"...");k.value=b;d.updateCellSize(k);if(0<this.maxTextWidth&&k.geometry.width>this.maxTextWidth){var m=d.getPreferredSizeForCell(k,this.maxTextWidth);k.geometry.width=m.width;k.geometry.height=m.height}Graph.isLink(k.value)&&d.setLinkForCell(k,k.value);k.geometry.width+=d.gridSize;k.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[k]}}return[]};EditorUi.prototype.formatFileSize=
-function(b){var d=-1;do b/=1024,d++;while(1024<b);return Math.max(b,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[d]};EditorUi.prototype.convertDataUri=function(b){if("data:"==b.substring(0,5)){var d=b.indexOf(";");0<d&&(b=b.substring(0,d)+b.substring(b.indexOf(",",d+1)))}return b};EditorUi.prototype.isRemoteFileFormat=function(b,c){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(b)};EditorUi.prototype.isLucidChartData=function(b){return null!=b&&('{"state":"{\\"Properties\\":'==
-b.substring(0,26)||'{"Properties":'==b.substring(0,14))};EditorUi.prototype.importLocalFile=function(b,c){if(b&&Graph.fileSupport){if(null==this.importFileInputElt){var d=document.createElement("input");d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){null!=d.files&&(this.importFiles(d.files,null,null,this.maxImageSize),d.type="",d.type="file",d.value="")}));d.style.display="none";document.body.appendChild(d);this.importFileInputElt=d}this.importFileInputElt.click()}else{window.openNew=
-!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(b,d){StorageFile.listFiles(this,"F",b,d)});window.openBrowserFile=mxUtils.bind(this,function(b,d,c){StorageFile.getFileContent(this,b,d,c)});window.deleteBrowserFile=mxUtils.bind(this,function(b,d,c){StorageFile.deleteFile(this,b,d,c)});if(!c){var e=Editor.useLocalStorage;Editor.useLocalStorage=!b}window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));window.openFile.setConsumer(mxUtils.bind(this,
-function(b,d){if(null!=d&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(d)){var c=new Blob([b],{type:"application/octet-stream"});this.importVisio(c,mxUtils.bind(this,function(b){this.importXml(b,0,0,!0)}),null,d)}else this.editor.graph.setSelectionCells(this.importXml(b,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!c){var f=this.dialog,g=f.close;this.dialog.close=mxUtils.bind(this,
-function(b){Editor.useLocalStorage=e;g.apply(f,arguments);b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(b,c,e){var d=this,f=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(b).then(function(f){if(0==Object.keys(f.files).length)e();else{var g=0,l,k=!1;f.forEach(function(b,d){var f=d.name.toLowerCase();"diagram/diagram.xml"==f?(k=!0,d.async("string").then(function(b){0==b.indexOf("<mxfile ")?
-c(b):e()})):0==f.indexOf("versions/")&&(f=parseInt(f.substr(9)),f>g&&(g=f,l=d))});0<g?l.async("string").then(function(f){!d.isOffline()&&(new XMLHttpRequest).upload&&d.isRemoteFileFormat(f,b.name)?d.parseFile(new Blob([f],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?c(b.responseText):e())}),b.name):e()}):k||e()}},function(b){e(b)}):e()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=
-!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importFile=function(b,c,e,g,k,n,p,t,y,x,G,C){x=null!=x?x:!0;var d=!1,f=null,l=mxUtils.bind(this,function(b){var d=null;null!=b&&"<mxlibrary"==b.substring(0,10)?this.loadLibrary(new LocalLibrary(this,b,p)):d=this.importXml(b,e,g,x,null,null!=C?mxEvent.isControlDown(C):null);null!=t&&t(d)});"image"==c.substring(0,5)?(y=!1,"image/png"==c.substring(0,9)&&(c=G?null:this.extractGraphModelFromPng(b),null!=c&&0<c.length&&(f=this.importXml(c,e,g,x,
-null,null!=C?mxEvent.isControlDown(C):null),y=!0)),y||(c=this.editor.graph,G=b.indexOf(";"),0<G&&(b=b.substring(0,G)+b.substring(b.indexOf(",",G+1))),x&&c.isGridEnabled()&&(e=c.snap(e),g=c.snap(g)),f=[c.insertVertex(null,null,"",e,g,k,n,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";")])):/(\.*<graphml )/.test(b)?(d=!0,this.importGraphML(b,l)):null!=y&&null!=p&&(/(\.v(dx|sdx?))($|\?)/i.test(p)||/(\.vs(x|sx?))($|\?)/i.test(p))?
-(d=!0,this.importVisio(y,l)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,p)?(d=!0,this.parseFile(null!=y?y:new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?l(b.responseText):null!=t&&t(null))}),p)):0==b.indexOf("PK")&&null!=y?(d=!0,this.importZipFile(y,l,mxUtils.bind(this,function(){f=this.insertTextAt(this.validateFileData(b),e,g,!0,null,x);t(f)}))):/(\.v(sd|dx))($|\?)/i.test(p)||/(\.vs(s|x))($|\?)/i.test(p)||
-(f=this.insertTextAt(this.validateFileData(b),e,g,!0,null,x,null,null!=C?mxEvent.isControlDown(C):null));d||null==t||t(f);return f};EditorUi.prototype.importFiles=function(b,c,e,g,k,n,p,t,y,x,G,C,E){g=null!=g?g:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var d=null!=c&&null!=e,f=!0;c=null!=c?c:0;e=null!=e?e:0;var l=!1;if(!mxClient.IS_CHROMEAPP&&null!=b)for(var m=G||this.resampleThreshold,q=0;q<b.length;q++)if("image/"==b[q].type.substring(0,6)&&b[q].size>m){l=!0;break}var u=mxUtils.bind(this,
-function(){var l=this.editor.graph,m=l.gridSize;k=null!=k?k:mxUtils.bind(this,function(b,c,e,f,g,l,k,m,n){try{return null!=b&&"<mxlibrary"==b.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,b,k)),null):this.importFile(b,c,e,f,g,l,k,m,n,d,C,E)}catch(fa){return this.handleError(fa),null}});n=null!=n?n:mxUtils.bind(this,function(b){l.setSelectionCells(b)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=b.length,u=q,v=[],B=mxUtils.bind(this,function(b,
-d){v[b]=d;if(0==--u){this.spinner.stop();if(null!=t)t(v);else{var c=[];l.getModel().beginUpdate();try{for(var e=0;e<v.length;e++){var f=v[e]();null!=f&&(c=c.concat(f))}}finally{l.getModel().endUpdate()}}n(c)}}),y=0;y<q;y++)mxUtils.bind(this,function(d){var n=b[d];if(null!=n){var q=new FileReader;q.onload=mxUtils.bind(this,function(b){if(null==p||p(n))if("image/"==n.type.substring(0,6))if("image/svg"==n.type.substring(0,9)){var q=Graph.clipSvgDataUri(b.target.result),t=q.indexOf(","),u=decodeURIComponent(escape(atob(q.substring(t+
-1)))),v=mxUtils.parseXml(u),u=v.getElementsByTagName("svg");if(0<u.length){var u=u[0],N=C?null:u.getAttribute("content");null!=N&&"<"!=N.charAt(0)&&"%"!=N.charAt(0)&&(N=unescape(window.atob?atob(N):Base64.decode(N,!0)));null!=N&&"%"==N.charAt(0)&&(N=decodeURIComponent(N));null==N||"<mxfile "!==N.substring(0,8)&&"<mxGraphModel "!==N.substring(0,14)?B(d,mxUtils.bind(this,function(){try{if(q.substring(0,t+1),null!=v){var b=v.getElementsByTagName("svg");if(0<b.length){var f=b[0],p=f.getAttribute("width"),
-x=f.getAttribute("height"),p=null!=p&&"%"!=p.charAt(p.length-1)?parseFloat(p):NaN,x=null!=x&&"%"!=x.charAt(x.length-1)?parseFloat(x):NaN,u=f.getAttribute("viewBox");if(null==u||0==u.length)f.setAttribute("viewBox","0 0 "+p+" "+x);else if(isNaN(p)||isNaN(x)){var B=u.split(" ");3<B.length&&(p=parseFloat(B[2]),x=parseFloat(B[3]))}q=Editor.createSvgDataUri(mxUtils.getXml(f));var N=Math.min(1,Math.min(g/Math.max(1,p)),g/Math.max(1,x)),C=k(q,n.type,c+d*m,e+d*m,Math.max(1,Math.round(p*N)),Math.max(1,Math.round(x*
-N)),n.name);if(isNaN(p)||isNaN(x)){var y=new Image;y.onload=mxUtils.bind(this,function(){p=Math.max(1,y.width);x=Math.max(1,y.height);C[0].geometry.width=p;C[0].geometry.height=x;f.setAttribute("viewBox","0 0 "+p+" "+x);q=Editor.createSvgDataUri(mxUtils.getXml(f));var b=q.indexOf(";");0<b&&(q=q.substring(0,b)+q.substring(q.indexOf(",",b+1)));l.setCellStyles("image",q,[C[0]])});y.src=Editor.createSvgDataUri(mxUtils.getXml(f))}return C}}}catch(aa){}return null})):B(d,mxUtils.bind(this,function(){return k(N,
-"text/xml",c+d*m,e+d*m,0,0,n.name)}))}else B(d,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==n.type){var y=C?null:this.extractGraphModelFromPng(b.target.result);if(null!=y&&0<y.length){var A=new Image;A.src=b.target.result;B(d,mxUtils.bind(this,function(){return k(y,"text/xml",c+d*m,e+d*m,A.width,A.height,n.name)}));u=!0}}u||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
-mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(b.target.result,mxUtils.bind(this,function(l){this.resizeImage(l,b.target.result,mxUtils.bind(this,function(b,l,p){B(d,mxUtils.bind(this,function(){if(null!=b&&b.length<x){var q=f&&this.isResampleImageSize(n.size,G)?Math.min(1,Math.min(g/l,g/p)):1;return k(b,n.type,c+d*m,e+d*m,Math.round(l*q),Math.round(p*q),n.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),f,g,G,n.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else q=b.target.result,k(q,n.type,c+d*m,e+d*m,240,160,n.name,function(b){B(d,function(){return b})},n)});/(\.v(dx|sdx?))($|\?)/i.test(n.name)||/(\.vs(x|sx?))($|\?)/i.test(n.name)?k(null,n.type,c+d*m,e+d*m,240,160,n.name,function(b){B(d,function(){return b})},n):"image"==n.type.substring(0,5)||"application/pdf"==n.type?q.readAsDataURL(n):q.readAsText(n)}})(y)});if(l){l=
-[];for(q=0;q<b.length;q++)l.push(b[q]);b=l;this.confirmImageResize(function(b){f=b;u()},y)}else u()};EditorUi.prototype.confirmImageResize=function(b,c){c=null!=c?c:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(e,f){if(e||c)mxSettings.setResizeImages(e?f:null),mxSettings.save();d();b(f)};null==e||c?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
-function(b){f(b,!0)},function(b){f(b,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):f(!1,e)};EditorUi.prototype.parseFile=function(b,c,e){e=null!=e?e:b.name;var d=new FormData;d.append("format","xml");d.append("upfile",b,e);var f=new XMLHttpRequest;f.open("POST",
-OPEN_URL);f.onreadystatechange=function(){c(f)};f.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+b.size})}catch(n){}};EditorUi.prototype.isResampleImageSize=function(b,c){c=null!=c?c:this.resampleThreshold;return b>c};EditorUi.prototype.resizeImage=function(b,c,e,g,k,n,p){k=null!=k?k:this.maxImageSize;var d=Math.max(1,b.width),f=Math.max(1,b.height);if(g&&this.isResampleImageSize(null!=p?p:c.length,n))try{var l=Math.max(d/k,f/k);if(1<l){var m=Math.round(d/l),q=Math.round(f/
-l),t=document.createElement("canvas");t.width=m;t.height=q;t.getContext("2d").drawImage(b,0,0,m,q);var u=t.toDataURL();if(u.length<c.length){var L=document.createElement("canvas");L.width=m;L.height=q;var H=L.toDataURL();u!==H&&(c=u,d=m,f=q)}}}catch(K){}e(c,d,f)};EditorUi.prototype.extractGraphModelFromPng=function(b){return Editor.extractGraphModelFromPng(b)};EditorUi.prototype.loadImage=function(b,c,e){try{var d=new Image;d.onload=function(){d.width=0<d.width?d.width:120;d.height=0<d.height?d.height:
-120;c(d)};null!=e&&(d.onerror=e);d.src=b}catch(q){if(null!=e)e(q);else throw q;}};var g=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;Editor.isDarkMode()&&(c.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);c.cellEditor.editPlantUmlData=function(d,e,f){var g=JSON.parse(f);e=
-new TextareaDialog(b,mxResources.get("plantUml")+":",g.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generatePlantUmlImage(e,g.format,function(f,l,k){b.spinner.stop();c.getModel().beginUpdate();try{if("txt"==g.format)c.labelChanged(d,"<pre>"+f+"</pre>"),c.updateCellSize(d,!0);else{c.setCellStyles("image",b.convertDataUri(f),[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=l,m.height=k,c.cellsResized([d],[m],!1))}c.setAttributeForCell(d,"plantUmlData",
-JSON.stringify({data:e,format:g.format}))}finally{c.getModel().endUpdate()}},function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};c.cellEditor.editMermaidData=function(d,e,f){var g=JSON.parse(f);e=new TextareaDialog(b,mxResources.get("mermaid")+":",g.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generateMermaidImage(e,g.config,function(f,l,k){b.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",
-f,[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=Math.max(m.width,l),m.height=Math.max(m.height,k),c.cellsResized([d],[m],!1));c.setAttributeForCell(d,"mermaidData",JSON.stringify({data:e,config:g.config},null,2))}finally{c.getModel().endUpdate()}},function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};var e=c.cellEditor.startEditing;c.cellEditor.startEditing=function(d,f){try{var g=this.graph.getAttributeForCell(d,"plantUmlData");if(null!=
-g)this.editPlantUmlData(d,f,g);else if(g=this.graph.getAttributeForCell(d,"mermaidData"),null!=g)this.editMermaidData(d,f,g);else{var l=c.getCellStyle(d);"1"==mxUtils.getValue(l,"metaEdit","0")?b.showDataDialog(d):e.apply(this,arguments)}}catch(T){b.handleError(T)}};c.getLinkTitle=function(d){return b.getLinkTitle(d)};c.customLinkClicked=function(d){var c=!1;try{b.handleCustomLink(d),c=!0}catch(M){b.handleError(M)}return c};var k=c.parseBackgroundImage;c.parseBackgroundImage=function(b){var d=k.apply(this,
-arguments);null!=d&&null!=d.src&&Graph.isPageLink(d.src)&&(d={originalSrc:d.src});return d};var p=c.setBackgroundImage;c.setBackgroundImage=function(d){null!=d&&null!=d.originalSrc&&(d=b.createImageForPageLink(d.originalSrc,b.currentPage));p.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,
-function(b,d){var e=null!=c.backgroundImage?c.backgroundImage.originalSrc:null;if(null!=e){var f=e.indexOf(",");if(0<f)for(var e=e.substring(f+1),f=d.getProperty("patches"),g=0;g<f.length;g++)if(null!=f[g][EditorUi.DIFF_UPDATE]&&null!=f[g][EditorUi.DIFF_UPDATE][e]){c.refreshBackgroundImage();c.view.validateBackgroundImage();break}}}));var n=c.getBackgroundImageObject;c.getBackgroundImageObject=function(b,d){var c=n.apply(this,arguments);null==c||null==c.originalSrc||d||(c={src:c.originalSrc});return c};
-var t=this.clearDefaultStyle;this.clearDefaultStyle=function(){t.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var v=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";"1"==
-urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1");return v.apply(this,arguments)};var y=c.addClickHandler;c.addClickHandler=function(b,d,e){var f=d;d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null!=d&&c.isCustomLink(d)&&(mxEvent.isTouchEvent(b)||!mxEvent.isPopupTrigger(b))&&c.customLinkClicked(d)&&mxEvent.consume(b);null!=f&&f(b,d)};y.call(this,b,d,e)};g.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,
-null,!0);if(null!=this.menus){var x=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(d,c,e){b.editor.graph.isSelectionEmpty()?x.apply(this,arguments):b.menus.addMenuItems(d,"delete - cut copy copyAsImage - duplicate".split(" "),null,e)}}b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var G=c.getExportVariables;c.getExportVariables=
-function(){var d=G.apply(this,arguments),c=b.getCurrentFile();null!=c&&(d.filename=c.getTitle());d.pagecount=null!=b.pages?b.pages.length:1;d.page=null!=b.currentPage?b.currentPage.getName():"";d.pagenumber=null!=b.pages&&null!=b.currentPage?mxUtils.indexOf(b.pages,b.currentPage)+1:1;return d};var C=c.getGlobalVariable;c.getGlobalVariable=function(d){var c=b.getCurrentFile();return"filename"==d&&null!=c?c.getTitle():"page"==d&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==d?null!=b.currentPage&&
-null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:"pagecount"==d?null!=b.pages?b.pages.length:1:C.apply(this,arguments)};var E=c.labelLinkClicked;c.labelLinkClicked=function(b,d,e){var f=d.getAttribute("href");if(null==f||!c.isCustomLink(f)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))E.apply(this,arguments);else{if(!c.isEnabled()||null!=b&&c.isCellLocked(b.cell))c.customLinkClicked(f),c.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=function(){var d=b.defaultFilename,
-c=b.getCurrentFile();null!=c&&(d=null!=c.getTitle()?c.getTitle():d);return d};var J=this.actions.get("print");J.setEnabled(!mxClient.IS_IOS||!navigator.standalone);J.visible=J.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,
-!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&c.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(b){var d=c.cellEditor.text2,e=null;null!=d&&(mxEvent.addListener(d,"dragleave",function(b){null!=e&&(e.parentNode.removeChild(e),e=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(d,
-"dragover",mxUtils.bind(this,function(b){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=this.highlightElement(d));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(b){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,function(b,d,e,f,g,l){c.insertImage(b,g,l)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()},
-mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)?this.loadImage(decodeURIComponent(d),mxUtils.bind(this,function(b){var e=Math.max(1,b.width);b=Math.max(1,b.height);var f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,e)),f/Math.max(1,b));c.insertImage(decodeURIComponent(d),e*f,b*f)})):document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"))}else 0<=
-mxUtils.indexOf(b.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"));b.stopPropagation();b.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(J=this.editor.graph.view,J.setUnit(mxSettings.getUnit()),J.addListener("unitChanged",function(b,d){mxSettings.setUnit(d.getProperty("unit"));mxSettings.save()}),
-this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,J.unit),this.refresh());if("1"==urlParams.styledev){J=document.getElementById("geFooter");null!=J&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width=
-"98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),J.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(b,d){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);
-this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var L=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==this.styleInput?!0:L.apply(this,arguments)}}J=document.getElementById("geInfo");null!=J&&J.parentNode.removeChild(J);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var H=null;mxEvent.addListener(c.container,"dragleave",function(b){c.isEnabled()&&(null!=H&&(H.parentNode.removeChild(H),
-H=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(b){null==H&&(!mxClient.IS_IE||10<document.documentMode)&&(H=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(b){null!=H&&(H.parentNode.removeChild(H),H=null);if(c.isEnabled()){var d=mxUtils.convertPoint(c.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),
-e=c.view.translate,f=c.view.scale,g=d.x/f-e.x,l=d.y/f-e.y;if(0<b.dataTransfer.files.length)mxEvent.isShiftDown(b)?this.openFiles(b.dataTransfer.files,!0):(mxEvent.isAltDown(b)&&(l=g=null),this.importFiles(b.dataTransfer.files,g,l,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b),b));else{mxEvent.isAltDown(b)&&(l=g=0);var k=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):null,d=this.extractGraphModelFromEvent(b,
-null!=this.pages);if(null!=d)c.setSelectionCells(this.importXml(d,g,l,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){var m=b.dataTransfer.getData("text/html"),d=document.createElement("div");d.innerHTML=c.sanitizeHtml(m);var n=null,e=d.getElementsByTagName("img");null!=e&&1==e.length?(m=e[0].getAttribute("src"),null==m&&(m=e[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||(n=!0)):(e=d.getElementsByTagName("a"),null!=e&&1==e.length?m=e[0].getAttribute("href"):
-(d=d.getElementsByTagName("pre"),null!=d&&1==d.length&&(m=mxUtils.getTextContent(d[0]))));var p=!0,q=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(m,g,l,!0,n,null,p,mxEvent.isControlDown(b)))});n&&null!=m&&m.length>this.resampleThreshold?this.confirmImageResize(function(b){p=b;q()},mxEvent.isControlDown(b)):q()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(b){var d=Math.max(1,b.width);b=Math.max(1,b.height);
-var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,b));c.setSelectionCell(c.insertVertex(null,null,"",g,l,d*e,b*e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(b){c.setSelectionCells(this.insertTextAt(k,g,l,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),g,l,!0))}}b.stopPropagation();
-b.preventDefault()}),!1)}c.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var b=this.editor.graph;b.container.addEventListener("paste",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d))try{for(var c=d.clipboardData||d.originalEvent.clipboardData,e=!1,f=0;f<c.types.length;f++)if("text/"===c.types[f].substring(0,5)){e=!0;break}if(!e){var g=c.items;for(index in g){var k=
-g[index];if("file"===k.kind){if(b.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(d,c,e,f,g,l){b.insertImage(d,g,l)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()});else{var p=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],p.x,p.y,this.maxImageSize);mxEvent.consume(d)}break}}}}catch(y){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function b(){window.setTimeout(function(){e.innerHTML=
-"&nbsp;";e.focus();document.execCommand("selectAll",!1,null)},0)}var c=this.editor.graph,e=document.createElement("div");e.setAttribute("autocomplete","off");e.setAttribute("autocorrect","off");e.setAttribute("autocapitalize","off");e.setAttribute("spellcheck","false");e.style.textRendering="optimizeSpeed";e.style.fontFamily="monospace";e.style.wordBreak="break-all";e.style.background="transparent";e.style.color="transparent";e.style.position="absolute";e.style.whiteSpace="nowrap";e.style.overflow=
-"hidden";e.style.display="block";e.style.fontSize="1";e.style.zIndex="-1";e.style.resize="none";e.style.outline="none";e.style.width="1px";e.style.height="1px";mxUtils.setOpacity(e,0);e.contentEditable=!0;e.innerHTML="&nbsp;";var g=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var d=mxEvent.getSource(b);null==c.container||!c.isEnabled()||c.isMouseDown||
-c.isEditing()||null!=this.dialog||"INPUT"==d.nodeName||"TEXTAREA"==d.nodeName||224!=b.keyCode&&(mxClient.IS_MAC||17!=b.keyCode)&&(!mxClient.IS_MAC||91!=b.keyCode&&93!=b.keyCode)||g||(e.style.left=c.container.scrollLeft+10+"px",e.style.top=c.container.scrollTop+10+"px",c.container.appendChild(e),g=!0,e.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var d=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){!g||224!=d&&17!=
-d&&91!=d&&93!=d||(g=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),e.parentNode.removeChild(e),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(e,"copy",mxUtils.bind(this,function(d){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(e),b()}catch(u){this.handleError(u)}}));mxEvent.addListener(e,"cut",mxUtils.bind(this,function(d){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(e,!0),b()}catch(u){this.handleError(u)}}));mxEvent.addListener(e,
-"paste",mxUtils.bind(this,function(b){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(e.innerHTML="&nbsp;",e.focus(),null!=b.clipboardData&&this.pasteCells(b,e,!0,!0),mxEvent.isConsumed(b)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,e,!1,!0)}),0))}),!0);var k=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==e?!0:k.apply(this,arguments)}};EditorUi.prototype.getLinkTitle=function(b){var d=Graph.prototype.getLinkTitle.apply(this,arguments);
-if(Graph.isPageLink(b)){var c=b.indexOf(",");0<c&&(d=this.getPageById(b.substring(c+1)),d=null!=d?d.getName():mxResources.get("pageNotFound"))}else"data:"==b.substring(0,5)&&(d=mxResources.get("action"));return d};EditorUi.prototype.handleCustomLink=function(b){if(Graph.isPageLink(b)){var d=b.indexOf(",");if(b=this.getPageById(b.substring(d+1)))this.selectPage(b);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(b)};EditorUi.prototype.isSettingsEnabled=
-function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(b){b.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged",
-"keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(b,c){if("1"!=urlParams["ext-fonts"])mxSettings.setCustomFonts(this.menus.customFonts);else{var d=c.getProperty("customFonts");this.menus.customFonts=d;mxSettings.setCustomFonts(d)}mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",
-mxUtils.bind(this,function(b,c){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(b,c){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.addListener("gridColorChanged",
-mxUtils.bind(this,function(b,c){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(b,c){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
-this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(b,c,e){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
-this.editor.exportToCanvas(mxUtils.bind(this,function(b,d){try{this.spinner.stop();var e=this.createImageDataUri(b,c,"png"),f=parseInt(d.getAttribute("width")),g=parseInt(d.getAttribute("height"));this.writeImageToClipboard(e,f,g,mxUtils.bind(this,function(b){this.handleError(b)}))}catch(y){this.handleError(y)}}),null,null,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,null,null!=e?e:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
-null,null,null,10,null,null,!0,null,0<b.length?b:null)}catch(m){this.handleError(m)}};EditorUi.prototype.writeImageToClipboard=function(b,c,e,g){var d=this.base64ToBlob(b.substring(b.indexOf(",")+1),"image/png");b=new ClipboardItem({"image/png":d,"text/html":new Blob(['<img src="'+b+'" width="'+c+'" height="'+e+'">'],{type:"text/html"})});navigator.clipboard.write([b])["catch"](g)};EditorUi.prototype.copyCells=function(b,c){var d=this.editor.graph;if(d.isSelectionEmpty())b.innerHTML="";else{var e=
-mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),f=mxUtils.getXml(d.encodeCells(e));mxUtils.setTextContent(b,encodeURIComponent(f));c?(d.removeCells(e,!1),d.lastPasteXml=null):(d.lastPasteXml=f,d.pasteCounter=0);b.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var b=null;if(Editor.enableNativeCipboard){var c=this.editor.graph;c.isSelectionEmpty()||(b=mxUtils.sortCells(c.getExportableCells(c.model.getTopmostCells(c.getSelectionCells()))),
-c=mxUtils.getXml(c.encodeCells(b)),navigator.clipboard.writeText(c))}return b};EditorUi.prototype.pasteXml=function(b,c,e,g){var d=this.editor.graph,f=null;d.lastPasteXml==b?d.pasteCounter++:(d.lastPasteXml=b,d.pasteCounter=0);var l=d.pasteCounter*d.gridSize;if(e||this.isCompatibleString(b))f=this.importXml(b,l,l),d.setSelectionCells(f);else if(c&&1==d.getSelectionCount()){l=d.getStartEditingCell(d.getSelectionCell(),g);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)&&"image"==d.getCurrentCellStyle(l)[mxConstants.STYLE_SHAPE])d.setCellStyles(mxConstants.STYLE_IMAGE,
-b,[l]);else{d.model.beginUpdate();try{d.labelChanged(l,b),Graph.isLink(b)&&d.setLinkForCell(l,b)}finally{d.model.endUpdate()}}d.setSelectionCell(l)}else f=d.getInsertPoint(),d.isMouseInsertPoint()&&(l=0,d.lastPasteXml==b&&0<d.pasteCounter&&d.pasteCounter--),f=this.insertTextAt(b,f.x+l,f.y+l,!0),d.setSelectionCells(f);d.isSelectionEmpty()||(d.scrollCellToVisible(d.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell())));return f};EditorUi.prototype.pasteCells=
-function(b,c,e,g){if(!mxEvent.isConsumed(b)){var d=c,f=!1;if(e&&null!=b.clipboardData&&b.clipboardData.getData){var l=b.clipboardData.getData("text/plain"),k=!1;if(null!=l&&0<l.length&&"%3CmxGraphModel%3E"==l.substring(0,18)){var m=decodeURIComponent(l);this.isCompatibleString(m)&&(k=!0,l=m)}k=k?null:b.clipboardData.getData("text/html");null!=k&&0<k.length?(d=this.parseHtmlData(k),f="text/plain"!=d.getAttribute("data-type")):null!=l&&0<l.length&&(d=document.createElement("div"),mxUtils.setTextContent(d,
-k))}l=d.getElementsByTagName("span");if(null!=l&&0<l.length&&"application/vnd.lucid.chart.objects"===l[0].getAttribute("data-lucid-type"))e=l[0].getAttribute("data-lucid-content"),null!=e&&0<e.length&&(this.convertLucidChart(e,mxUtils.bind(this,function(b){var d=this.editor.graph;d.lastPasteXml==b?d.pasteCounter++:(d.lastPasteXml=b,d.pasteCounter=0);var c=d.pasteCounter*d.gridSize;d.setSelectionCells(this.importXml(b,c,c));d.scrollCellToVisible(d.getSelectionCell())}),mxUtils.bind(this,function(b){this.handleError(b)})),
-mxEvent.consume(b));else{f=f?d.innerHTML:mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText);k=!1;try{var p=f.lastIndexOf("%3E");0<=p&&p<f.length-3&&(f=f.substring(0,p+3))}catch(C){}try{l=d.getElementsByTagName("span"),m=null!=l&&0<l.length?mxUtils.trim(decodeURIComponent(l[0].textContent)):decodeURIComponent(f),this.isCompatibleString(m)&&(k=!0,f=m)}catch(C){}try{if(null!=f&&0<f.length){this.pasteXml(f,g,k,b);try{mxEvent.consume(b)}catch(C){}}else if(!e){var t=this.editor.graph;
-t.lastPasteXml=null;t.pasteCounter=0}}catch(C){this.handleError(C)}}}c.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(b){if(Graph.fileSupport)for(var d=null,c=0;c<b.length;c++)mxEvent.addListener(b[c],"dragleave",function(b){null!=d&&(d.parentNode.removeChild(d),d=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(b[c],"dragover",mxUtils.bind(this,function(b){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==d&&(!mxClient.IS_IE||10<document.documentMode&&
-12>document.documentMode)&&(d=this.highlightElement());b.stopPropagation();b.preventDefault()})),mxEvent.addListener(b[c],"drop",mxUtils.bind(this,function(b){null!=d&&(d.parentNode.removeChild(d),d=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<b.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b)):this.openFiles(b.dataTransfer.files,!0);
-else{var c=this.extractGraphModelFromEvent(b);if(null==c){var e=null!=b.dataTransfer?b.dataTransfer:b.clipboardData;null!=e&&(10==document.documentMode||11==document.documentMode?c=e.getData("Text"):(c=null,c=0<=mxUtils.indexOf(e.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(e.types,"text/html")?e.getData("text/html"):null,null!=c&&0<c.length?(e=document.createElement("div"),e.innerHTML=this.editor.graph.sanitizeHtml(c),e=e.getElementsByTagName("img"),0<e.length&&
-(c=e[0].getAttribute("src"))):0<=mxUtils.indexOf(e.types,"text/plain")&&(c=e.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&this.openLocalFile(b.getText(),null,!0)})):/^https?:\/\//.test(c)&&
-(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}b.stopPropagation();b.preventDefault()}))};EditorUi.prototype.highlightElement=function(b){var d=0,c=0,e,g;if(null==b){g=document.body;var k=document.documentElement;e=(g.clientWidth||k.clientWidth)-3;g=Math.max(g.clientHeight||0,k.clientHeight)-
-3}else d=b.offsetTop,c=b.offsetLeft,e=b.clientWidth,g=b.clientHeight;k=document.createElement("div");k.style.zIndex=mxPopupMenu.prototype.zIndex+2;k.style.border="3px dotted rgb(254, 137, 12)";k.style.pointerEvents="none";k.style.position="absolute";k.style.top=d+"px";k.style.left=c+"px";k.style.width=Math.max(0,e-3)+"px";k.style.height=Math.max(0,g-3)+"px";null!=b&&b.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(k):document.body.appendChild(k);return k};EditorUi.prototype.stringToCells=
-function(b){b=mxUtils.parseXml(b);var d=this.editor.extractGraphModel(b.documentElement);b=[];if(null!=d){var c=new mxCodec(d.ownerDocument),e=new mxGraphModel;c.decode(d,e);d=e.getChildAt(e.getRoot(),0);for(c=0;c<e.getChildCount(d);c++)b.push(e.getChildAt(d,c))}return b};EditorUi.prototype.openFileHandle=function(b,c,e,g,k){if(null!=c&&0<c.length){!this.useCanvasForExport&&/(\.png)$/i.test(c)?c=c.substring(0,c.length-4)+".drawio":/(\.pdf)$/i.test(c)&&(c=c.substring(0,c.length-4)+".drawio");var d=
-mxUtils.bind(this,function(b){c=0<=c.lastIndexOf(".")?c.substring(0,c.lastIndexOf("."))+".drawio":c+".drawio";if("<mxlibrary"==b.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,g);try{this.loadLibrary(new LocalLibrary(this,b,c))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(b,c,g)});if(/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c))this.importVisio(e,mxUtils.bind(this,
-function(b){this.spinner.stop();d(b)}));else if(/(\.*<graphml )/.test(b))this.importGraphML(b,mxUtils.bind(this,function(b){this.spinner.stop();d(b)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,c))this.parseFile(e,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?d(b.responseText):this.handleError({message:mxResources.get(413==b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));
-else if(this.isLucidChartData(b))/(\.json)$/i.test(c)&&(c=c.substring(0,c.length-5)+".drawio"),this.convertLucidChart(b,mxUtils.bind(this,function(b){this.spinner.stop();this.openLocalFile(b,c,g)}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}));else if("<mxlibrary"==b.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,g);try{this.loadLibrary(new LocalLibrary(this,b,e.name))}catch(v){this.handleError(v,
-mxResources.get("errorLoadingFile"))}}else if(0==b.indexOf("PK"))this.importZipFile(e,mxUtils.bind(this,function(b){this.spinner.stop();d(b)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(b,c,g)}));else{if("image/png"==e.type.substring(0,9))b=this.extractGraphModelFromPng(b);else if("application/pdf"==e.type){var f=Editor.extractGraphModelFromPdf(b);null!=f&&(k=null,g=!0,b=f)}this.spinner.stop();this.openLocalFile(b,c,g,k,null!=k?e:null)}}};EditorUi.prototype.openFiles=function(b,
-c){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=0;d<b.length;d++)mxUtils.bind(this,function(b){var d=new FileReader;d.onload=mxUtils.bind(this,function(d){try{this.openFileHandle(d.target.result,b.name,b,c)}catch(u){this.handleError(u)}});d.onerror=mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b);window.openFile=null});"image"!==b.type.substring(0,5)&&"application/pdf"!==b.type||"image/svg"===b.type.substring(0,9)?d.readAsText(b):d.readAsDataURL(b)})(b[d])};
-EditorUi.prototype.openLocalFile=function(b,c,e,g,k){var d=this.getCurrentFile(),f=mxUtils.bind(this,function(){window.openFile=null;if(null==c&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(b);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,b,c||this.defaultFilename,e,g,k))});if(null!=b&&0<b.length)null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=g)?f():(mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp||null!=g)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b,c),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):f()})));else throw Error(mxResources.get("notADiagramFile"));
-};EditorUi.prototype.getBasenames=function(){var b={};if(null!=this.pages)for(var c=0;c<this.pages.length;c++)this.updatePageRoot(this.pages[c]),this.addBasenamesForCell(this.pages[c].root,b);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),b);var c=[],e;for(e in b)c.push(e);return c};EditorUi.prototype.addBasenamesForCell=function(b,c){function d(b){if(null!=b){var d=b.lastIndexOf(".");0<d&&(b=b.substring(d+1,b.length));null==c[b]&&(c[b]=!0)}}var e=this.editor.graph,f=e.getCellStyle(b);
-d(mxStencilRegistry.getBasenameForStencil(f[mxConstants.STYLE_SHAPE]));e.model.isEdge(b)&&(d(mxMarker.getPackageForType(f[mxConstants.STYLE_STARTARROW])),d(mxMarker.getPackageForType(f[mxConstants.STYLE_ENDARROW])));for(var f=e.model.getChildCount(b),g=0;g<f;g++)this.addBasenamesForCell(e.model.getChildAt(b,g),c)};EditorUi.prototype.setGraphEnabled=function(b){this.diagramContainer.style.visibility=b?"":"hidden";this.formatContainer.style.visibility=b?"":"hidden";this.sidebarFooterContainer.style.display=
-b?"":"none";this.sidebarContainer.style.display=b?"":"none";this.hsplit.style.display=b?"":"none";this.editor.graph.setEnabled(b);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=b?"":"hidden",this.ruler.vRuler.container.style.visibility=b?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=b?"":"hidden");b||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),
-null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(b,c,e,g){this.spinner.stop();
-this.addEmbedButtons();this.setGraphEnabled(!0);if(null==b||0==b.length)b=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,b,{}));this.mode=App.MODE_EMBED;this.setFileData(b);if(g)try{var d=this.editor.graph;d.setGridEnabled(!1);d.pageVisible=!1;var f=d.model.cells,k;for(k in f){var l=f[k];null!=l&&null!=l.style&&(l.style+=";sketch=1;"+(-1==l.style.indexOf("fontFamily=")||-1<l.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
-""))}}catch(y){console.log(y)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=e?e:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
-this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(b,c){null!=b?b.getPublicUrl(c):c(null)};EditorUi.prototype.createLoadMessage=function(b){var d=this.editor.graph;return{event:b,pageVisible:d.pageVisible,translate:d.view.translate,bounds:d.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:d.view.scale,page:d.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(b){var d=null,c=!1,
-e=!1,g=null,k=mxUtils.bind(this,function(b,d){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,k);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var k=f.data,l=mxUtils.bind(this,function(b){if(null!=b&&"function"===typeof b.charAt&&"<"!=b.charAt(0))try{"data:image/png;base64,"==
-b.substring(0,22)?b=this.extractGraphModelFromPng(b):"data:image/svg+xml;base64,"==b.substring(0,26)?b=atob(b.substring(26)):"data:image/svg+xml;utf8,"==b.substring(0,24)&&(b=b.substring(24)),null!=b&&("%"==b.charAt(0)?b=decodeURIComponent(b):"<"!=b.charAt(0)&&(b=Graph.decompress(b)))}catch(pa){}return b});if("json"==urlParams.proto){var m=!1;try{k=JSON.parse(k)}catch(Q){k=null}try{if(null==k)return;if("dialog"==k.action){this.showError(null!=k.titleKey?mxResources.get(k.titleKey):k.title,null!=k.messageKey?
-mxResources.get(k.messageKey):k.message,null!=k.buttonKey?mxResources.get(k.buttonKey):k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("layout"==k.action){this.executeLayoutList(k.layouts);return}if("prompt"==k.action){this.spinner.stop();var n=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?mxResources.get(k.okKey):k.ok,function(b){null!=b?p.postMessage(JSON.stringify({event:"prompt",value:b,message:k}),"*"):p.postMessage(JSON.stringify({event:"prompt-cancel",message:k}),
-"*")},null!=k.titleKey?mxResources.get(k.titleKey):k.title);this.showDialog(n.container,300,80,!0,!1);n.init();return}if("draft"==k.action){var q=l(k.xml);this.spinner.stop();n=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();p.postMessage(JSON.stringify({event:"draft",result:"edit",message:k}),"*")}),mxUtils.bind(this,function(){this.hideDialog();p.postMessage(JSON.stringify({event:"draft",result:"discard",message:k}),
-"*")}),k.editKey?mxResources.get(k.editKey):null,k.discardKey?mxResources.get(k.discardKey):null,k.ignore?mxUtils.bind(this,function(){this.hideDialog();p.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),"*")}):null);this.showDialog(n.container,640,480,!0,!1,mxUtils.bind(this,function(b){b&&this.actions.get("exit").funct()}));try{n.init()}catch(Q){p.postMessage(JSON.stringify({event:"draft",error:Q.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();
-var t=1==k.enableRecent,u=1==k.enableSearch,v=1==k.enableCustomTemp;if("1"==urlParams.newTempDlg&&!k.templatesOnly&&null!=k.callback){var B=this.getCurrentUser(),y=new TemplatesDialog(this,function(b,d,c){b=b||this.emptyDiagramXml;p.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d,tempUrl:c.url,libs:c.libs,builtIn:null!=c.info&&null!=c.info.custContentId,message:k}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=B?B.id:
-null,t?mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getRecentDiagrams",[c],null,b,d)}):null,u?mxUtils.bind(this,function(b,d,c,e){this.remoteInvoke("searchDiagrams",[b,e],null,d,c)}):null,mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getFileContent",[b.url],null,d,c)}),null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,!1,!1,!0,!0);this.showDialog(y.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}n=
-new NewDialog(this,!1,k.templatesOnly?!1:null!=k.callback,mxUtils.bind(this,function(d,c,e,g){d=d||this.emptyDiagramXml;null!=k.callback?p.postMessage(JSON.stringify({event:"template",xml:d,blank:d==this.emptyDiagramXml,name:c,tempUrl:e,libs:g,builtIn:!0,message:k}),"*"):(b(d,f,d!=this.emptyDiagramXml,k.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,t?mxUtils.bind(this,function(b){this.remoteInvoke("getRecentDiagrams",[null],null,b,function(){b(null,
-"Network Error!")})}):null,u?mxUtils.bind(this,function(b,d){this.remoteInvoke("searchDiagrams",[b,null],null,d,function(){d(null,"Network Error!")})}):null,mxUtils.bind(this,function(b,d,c){p.postMessage(JSON.stringify({event:"template",docUrl:b,info:d,name:c}),"*")}),null,null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,1==k.withoutType);this.showDialog(n.container,620,460,!0,!1,mxUtils.bind(this,function(b){this.sidebar.hideTooltip();
-b&&this.actions.get("exit").funct()}));n.init();return}if("textContent"==k.action){var P=this.getDiagramTextContent();p.postMessage(JSON.stringify({event:"textContent",data:P,message:k}),"*");return}if("status"==k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var T=null!=k.messageKey?mxResources.get(k.messageKey):
-k.message;null==k.show||k.show?this.spinner.spin(document.body,T):this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var N=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var R=this.editor.graph,F=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();var d=this.createLoadMessage("export");d.format=
-k.format;d.message=k;d.data=b;d.xml=N;p.postMessage(JSON.stringify(d),"*")}),D=mxUtils.bind(this,function(b){null==b&&(b=Editor.blankImage);"xmlpng"==k.format&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(N)));R!=this.editor.graph&&R.container.parentNode.removeChild(R.container);F(b)}),A=k.pageId||(null!=this.pages?k.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){null!=k.xml&&0<k.xml.length&&(c=!0,this.setFileData(N),c=!1);if(null!=
-this.pages&&this.currentPage.getId()!=A){for(var da=R.getGlobalVariable,R=this.createTemporaryGraph(R.getStylesheet()),I,S=0;S<this.pages.length;S++)if(this.pages[S].getId()==A){I=this.updatePageRoot(this.pages[S]);break}null==I&&(I=this.currentPage);R.getGlobalVariable=function(b){return"page"==b?I.getName():"pagenumber"==b?1:da.apply(this,arguments)};document.body.appendChild(R.container);R.model.setRoot(I.root)}if(null!=k.layerIds){for(var Z=R.model,ma=Z.getChildCells(Z.getRoot()),n={},S=0;S<k.layerIds.length;S++)n[k.layerIds[S]]=
-!0;for(S=0;S<ma.length;S++)Z.setVisible(ma[S],n[ma[S].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(b){D(b.toDataURL("image/png"))}),k.width,null,k.background,mxUtils.bind(this,function(){D(null)}),null,null,k.scale,k.transparent,k.shadow,null,R,k.border,null,k.grid,k.keepTheme)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=A?"&pageId="+A:"")+(null!=k.layerIds&&0<k.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):
-"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(N))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?F("data:image/png;base64,"+b.getText()):D(null)}),mxUtils.bind(this,function(){D(null)}))}}else{null!=k.xml&&0<k.xml.length&&(c=!0,this.setFileData(k.xml),c=!1);T=this.createLoadMessage("export");T.message=k;if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ga=this.getXmlFileData();T.xml=
-mxUtils.getXml(ga);T.data=this.getFileData(null,null,!0,null,null,null,ga);T.format=k.format}else if("html"==k.format)N=this.editor.getGraphXml(),T.data=this.getHtml(N,this.editor.graph),T.xml=mxUtils.getXml(N),T.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;var ia=null!=k.background?k.background:this.editor.graph.background;ia==mxConstants.NONE&&(ia=null);T.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);T.format="svg";var la=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);
-this.spinner.stop();T.data=Editor.createSvgDataUri(b);p.postMessage(JSON.stringify(T),"*")});if("xmlsvg"==k.format)(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))&&this.getEmbeddedSvg(T.xml,this.editor.graph,null,!0,la,null,null,k.embedImages,ia,k.scale,k.border,k.shadow,k.keepTheme);else if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){this.editor.graph.setEnabled(!1);
-var W=this.editor.graph.getSvg(ia,k.scale,k.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||k.shadow,null,k.keepTheme);(this.editor.graph.shadowVisible||k.shadow)&&this.editor.graph.addSvgShadow(W);this.embedFonts(W,mxUtils.bind(this,function(b){k.embedImages||null==k.embedImages?this.editor.convertImages(b,mxUtils.bind(this,function(b){la(mxUtils.getXml(b))})):la(mxUtils.getXml(b))}))}return}p.postMessage(JSON.stringify(T),"*")}return}if("load"==k.action){m=k.toSketch;e=1==
-k.autosave;this.hideDialog();null!=k.modified&&null==urlParams.modified&&(urlParams.modified=k.modified);null!=k.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=k.saveAndExit);null!=k.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=k.noSaveBtn);null!=k.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=k.noExitBtn);null!=k.title&&null!=this.buttonContainer&&(q=document.createElement("span"),mxUtils.write(q,k.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight=
-"12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="1"==urlParams.noLangIcon?"0":"25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(q),this.embedFilenameSpan=q);try{k.libs&&this.sidebar.showEntries(k.libs)}catch(Q){}k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):
-null!=k.descriptor?k.descriptor:k.xml}else{if("merge"==k.action){var fa=this.getCurrentFile();null!=fa&&(q=l(k.xml),null!=q&&""!=q&&fa.mergeFile(new LocalFile(this,q),function(){p.postMessage(JSON.stringify({event:"merge",message:k}),"*")},function(b){p.postMessage(JSON.stringify({event:"merge",message:k,error:b}),"*")}))}else"remoteInvokeReady"==k.action?this.handleRemoteInvokeReady(p):"remoteInvoke"==k.action?this.handleRemoteInvoke(k,f.origin):"remoteInvokeResponse"==k.action?this.handleRemoteInvokeResponse(k):
-p.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}catch(Q){this.handleError(Q)}}var na=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),V=mxUtils.bind(this,function(f,k){c=!0;try{b(f,k,null,m)}catch(ea){this.handleError(ea)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");g=na();e&&null==d&&(d=mxUtils.bind(this,function(b,d){var e=na();if(e!=
-g&&!c){var f=this.createLoadMessage("autosave");f.xml=e;(window.opener||window.parent).postMessage(JSON.stringify(f),"*")}g=e}),this.editor.graph.model.addListener(mxEvent.CHANGE,d),this.editor.graph.addListener("gridSizeChanged",d),this.editor.graph.addListener("shadowVisibleChanged",d),this.addListener("pageFormatChanged",d),this.addListener("pageScaleChanged",d),this.addListener("backgroundColorChanged",d),this.addListener("backgroundImageChanged",d),this.addListener("foldingEnabledChanged",d),
-this.addListener("mathEnabledChanged",d),this.addListener("gridEnabledChanged",d),this.addListener("guidesEnabledChanged",d),this.addListener("pageViewChanged",d));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var l=this.createLoadMessage("load");l.xml=f;p.postMessage(JSON.stringify(l),"*")}});null!=k&&"function"===typeof k.substring&&"data:application/vnd.visio;base64,"==k.substring(0,34)?(l="0M8R4KGxGuE"==k.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(k.substring(k.indexOf(",")+
-1)),function(b){V(b,f)},mxUtils.bind(this,function(b){this.handleError(b)}),l)):null!=k&&"function"===typeof k.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(k,"")?this.parseFile(new Blob([k],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&"<mxGraphModel"==b.responseText.substring(0,13)&&V(b.responseText,f)}),""):null!=k&&"function"===typeof k.substring&&this.isLucidChartData(k)?this.convertLucidChart(k,
-mxUtils.bind(this,function(b){V(b)}),mxUtils.bind(this,function(b){this.handleError(b)})):null==k||"object"!==typeof k||null==k.format||null==k.data&&null==k.url?(k=l(k),V(k,f)):this.loadDescriptor(k,mxUtils.bind(this,function(b){V(na(),f)}),mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"))}))}}));var p=window.opener||window.parent,k="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";p.postMessage(k,"*");if("json"==urlParams.proto){var t=
-this.editor.graph.openLink;this.editor.graph.openLink=function(b,d,c){t.apply(this,arguments);p.postMessage(JSON.stringify({event:"openLink",href:b,target:d,allowOpener:c}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var b=document.createElement("div");b.style.display="inline-block";b.style.position="absolute";b.style.paddingTop="atlas"==uiTheme?"2px":"0px";b.style.paddingLeft="8px";b.style.paddingBottom="2px";var c=document.createElement("button");c.className="geBigButton";
-var e=c;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var g="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,g);c.setAttribute("title",g);mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));b.appendChild(c)}}else mxUtils.write(c,mxResources.get("save")),c.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),
-b.appendChild(c),"1"==urlParams.saveAndExit&&(c=document.createElement("a"),mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),b.appendChild(c),e=c);"1"!=urlParams.noExitBtn&&(c=document.createElement("a"),e="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),
-mxUtils.write(c,e),c.setAttribute("title",e),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),b.appendChild(c),e=c);e.style.marginRight="20px";this.toolbar.container.appendChild(b);this.toolbar.staticElements.push(b);b.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,
-mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(b){this.importCsv(b)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(b,c){for(var d=this.editor.graph,e=d.getSelectionCells(),f=0;f<b.length;f++){var g=new window[b[f].layout](d);
-if(null!=b[f].config)for(var k in b[f].config)g[k]=b[f].config[k];this.executeLayout(function(){g.execute(d.getDefaultParent(),0==e.length?null:e)},f==b.length-1,c)}};EditorUi.prototype.importCsv=function(b,c){try{var d=b.split("\n"),e=[],f=[],g={};if(0<d.length){var k={},p=null,t=null,x=null,G=null,C=null,E=null,J=null,L=null,H=null,K="",B="auto",M="auto",P=null,T=null,N=40,R=40,F=100,D=0,A=this.editor.graph;A.getGraphBounds();for(var da=function(){null!=c?c(ba):(A.setSelectionCells(ba),A.scrollCellToVisible(A.getSelectionCell()))},
-I=A.getFreeInsertPoint(),S=I.x,Z=I.y,I=Z,ma=null,ga="auto",H=null,ia=[],la=null,W=null,fa=0;fa<d.length&&"#"==d[fa].charAt(0);){b=d[fa];for(fa++;fa<d.length&&"\\"==b.charAt(b.length-1)&&"#"==d[fa].charAt(0);)b=b.substring(0,b.length-1)+mxUtils.trim(d[fa].substring(1)),fa++;if("#"!=b.charAt(1)){var na=b.indexOf(":");if(0<na){var V=mxUtils.trim(b.substring(1,na)),Q=mxUtils.trim(b.substring(na+1));"label"==V?ma=A.sanitizeHtml(Q):"labelname"==V&&0<Q.length&&"-"!=Q?C=Q:"labels"==V&&0<Q.length&&"-"!=Q?
-E=JSON.parse(Q):"style"==V?t=Q:"parentstyle"==V?J=Q:"stylename"==V&&0<Q.length&&"-"!=Q?G=Q:"styles"==V&&0<Q.length&&"-"!=Q?x=JSON.parse(Q):"vars"==V&&0<Q.length&&"-"!=Q?p=JSON.parse(Q):"identity"==V&&0<Q.length&&"-"!=Q?L=Q:"parent"==V&&0<Q.length&&"-"!=Q?H=Q:"namespace"==V&&0<Q.length&&"-"!=Q?K=Q:"width"==V?B=Q:"height"==V?M=Q:"left"==V&&0<Q.length?P=Q:"top"==V&&0<Q.length?T=Q:"ignore"==V?W=Q.split(","):"connect"==V?ia.push(JSON.parse(Q)):"link"==V?la=Q:"padding"==V?D=parseFloat(Q):"edgespacing"==
-V?N=parseFloat(Q):"nodespacing"==V?R=parseFloat(Q):"levelspacing"==V?F=parseFloat(Q):"layout"==V&&(ga=Q)}}}if(null==d[fa])throw Error(mxResources.get("invalidOrMissingFile"));for(var pa=this.editor.csvToArray(d[fa]),V=na=null,Q=[],X=0;X<pa.length;X++)L==pa[X]&&(na=X),H==pa[X]&&(V=X),Q.push(mxUtils.trim(pa[X]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ma&&(ma="%"+Q[0]+"%");if(null!=ia)for(var ea=0;ea<ia.length;ea++)null==k[ia[ea].to]&&(k[ia[ea].to]={});L=[];for(X=fa+1;X<
-d.length;X++){var ja=this.editor.csvToArray(d[X]);if(null==ja){var ra=40<d[X].length?d[X].substring(0,40)+"...":d[X];throw Error(ra+" ("+X+"):\n"+mxResources.get("containsValidationErrors"));}0<ja.length&&L.push(ja)}A.model.beginUpdate();try{for(X=0;X<L.length;X++){var ja=L[X],U=null,ka=null!=na?K+ja[na]:null;null!=ka&&(U=A.model.getCell(ka));var d=null!=U,aa=new mxCell(ma,new mxGeometry(S,I,0,0),t||"whiteSpace=wrap;html=1;");aa.vertex=!0;aa.id=ka;for(var oa=0;oa<ja.length;oa++)A.setAttributeForCell(aa,
-Q[oa],ja[oa]);if(null!=C&&null!=E){var sa=E[aa.getAttribute(C)];null!=sa&&A.labelChanged(aa,sa)}if(null!=G&&null!=x){var ca=x[aa.getAttribute(G)];null!=ca&&(aa.style=ca)}A.setAttributeForCell(aa,"placeholders","1");aa.style=A.replacePlaceholders(aa,aa.style,p);d&&(A.model.setGeometry(U,aa.geometry),A.model.setStyle(U,aa.style),0>mxUtils.indexOf(f,U)&&f.push(U));U=aa;if(!d)for(ea=0;ea<ia.length;ea++)k[ia[ea].to][U.getAttribute(ia[ea].to)]=U;null!=la&&"link"!=la&&(A.setLinkForCell(U,U.getAttribute(la)),
-A.setAttributeForCell(U,la,null));A.fireEvent(new mxEventObject("cellsInserted","cells",[U]));var O=this.editor.graph.getPreferredSizeForCell(U);U.vertex&&(null!=P&&null!=U.getAttribute(P)&&(U.geometry.x=S+parseFloat(U.getAttribute(P))),null!=T&&null!=U.getAttribute(T)&&(U.geometry.y=Z+parseFloat(U.getAttribute(T))),"@"==B.charAt(0)&&null!=U.getAttribute(B.substring(1))?U.geometry.width=parseFloat(U.getAttribute(B.substring(1))):U.geometry.width="auto"==B?O.width+D:parseFloat(B),"@"==M.charAt(0)&&
-null!=U.getAttribute(M.substring(1))?U.geometry.height=parseFloat(U.getAttribute(M.substring(1))):U.geometry.height="auto"==M?O.height+D:parseFloat(M),I+=U.geometry.height+R);d?(null==g[ka]&&(g[ka]=[]),g[ka].push(U)):(H=null!=V?A.model.getCell(K+ja[V]):null,e.push(U),null!=H?(H.style=A.replacePlaceholders(H,J,p),A.addCell(U,H)):f.push(A.addCell(U)))}for(var ta=f.slice(),ba=f.slice(),ea=0;ea<ia.length;ea++)for(var xa=ia[ea],X=0;X<e.length;X++){var U=e[X],ua=mxUtils.bind(this,function(b,d,c){var e=
-d.getAttribute(c.from);if(null!=e&&(A.setAttributeForCell(d,c.from,null),""!=e))for(var e=e.split(","),f=0;f<e.length;f++){var g=k[c.to][e[f]];if(null!=g){var l=c.label;null!=c.fromlabel&&(l=(d.getAttribute(c.fromlabel)||"")+(l||""));null!=c.sourcelabel&&(l=A.replacePlaceholders(d,c.sourcelabel,p)+(l||""));null!=c.tolabel&&(l=(l||"")+(g.getAttribute(c.tolabel)||""));null!=c.targetlabel&&(l=(l||"")+A.replacePlaceholders(g,c.targetlabel,p));var m="target"==c.placeholders==!c.invert?g:b,m=null!=c.style?
-A.replacePlaceholders(m,c.style,p):A.createCurrentEdgeStyle(),l=A.insertEdge(null,null,l||"",c.invert?g:b,c.invert?b:g,m);if(null!=c.labels)for(m=0;m<c.labels.length;m++){var n=c.labels[m],q=new mxCell(n.label||m,new mxGeometry(null!=n.x?n.x:0,null!=n.y?n.y:0,0,0),"resizable=0;html=1;");q.vertex=!0;q.connectable=!1;q.geometry.relative=!0;null!=n.placeholders&&(q.value=A.replacePlaceholders("target"==n.placeholders==!c.invert?g:b,q.value,p));if(null!=n.dx||null!=n.dy)q.geometry.offset=new mxPoint(null!=
-n.dx?n.dx:0,null!=n.dy?n.dy:0);l.insert(q)}ba.push(l);mxUtils.remove(c.invert?b:g,ta)}}});ua(U,U,xa);if(null!=g[U.id])for(oa=0;oa<g[U.id].length;oa++)ua(U,g[U.id][oa],xa)}if(null!=W)for(X=0;X<e.length;X++)for(U=e[X],oa=0;oa<W.length;oa++)A.setAttributeForCell(U,mxUtils.trim(W[oa]),null);if(0<f.length){var ya=new mxParallelEdgeLayout(A);ya.spacing=N;ya.checkOverlap=!0;var Ea=function(){0<ya.spacing&&ya.execute(A.getDefaultParent());for(var b=0;b<f.length;b++){var d=A.getCellGeometry(f[b]);d.x=Math.round(A.snap(d.x));
-d.y=Math.round(A.snap(d.y));"auto"==B&&(d.width=Math.round(A.snap(d.width)));"auto"==M&&(d.height=Math.round(A.snap(d.height)))}};if("["==ga.charAt(0)){var Ja=da;A.view.validate();this.executeLayoutList(JSON.parse(ga),function(){Ea();Ja()});da=null}else if("circle"==ga){var Ba=new mxCircleLayout(A);Ba.disableEdgeStyle=!1;Ba.resetEdges=!1;var Ha=Ba.isVertexIgnored;Ba.isVertexIgnored=function(b){return Ha.apply(this,arguments)||0>mxUtils.indexOf(f,b)};this.executeLayout(function(){Ba.execute(A.getDefaultParent());
-Ea()},!0,da);da=null}else if("horizontaltree"==ga||"verticaltree"==ga||"auto"==ga&&ba.length==2*f.length-1&&1==ta.length){A.view.validate();var wa=new mxCompactTreeLayout(A,"horizontaltree"==ga);wa.levelDistance=R;wa.edgeRouting=!1;wa.resetEdges=!1;this.executeLayout(function(){wa.execute(A.getDefaultParent(),0<ta.length?ta[0]:null)},!0,da);da=null}else if("horizontalflow"==ga||"verticalflow"==ga||"auto"==ga&&1==ta.length){A.view.validate();var za=new mxHierarchicalLayout(A,"horizontalflow"==ga?mxConstants.DIRECTION_WEST:
-mxConstants.DIRECTION_NORTH);za.intraCellSpacing=R;za.parallelEdgeSpacing=N;za.interRankCellSpacing=F;za.disableEdgeStyle=!1;this.executeLayout(function(){za.execute(A.getDefaultParent(),ba);A.moveCells(ba,S,Z)},!0,da);da=null}else if("organic"==ga||"auto"==ga&&ba.length>f.length){A.view.validate();var va=new mxFastOrganicLayout(A);va.forceConstant=3*R;va.disableEdgeStyle=!1;va.resetEdges=!1;var Aa=va.isVertexIgnored;va.isVertexIgnored=function(b){return Aa.apply(this,arguments)||0>mxUtils.indexOf(f,
-b)};this.executeLayout(function(){va.execute(A.getDefaultParent());Ea()},!0,da);da=null}}this.hideDialog()}finally{A.model.endUpdate()}null!=da&&da()}}catch(Y){this.handleError(Y)}};EditorUi.prototype.getSearch=function(b){var d="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=b&&0<window.location.search.length){var c="?",e;for(e in urlParams)0>mxUtils.indexOf(b,e)&&null!=urlParams[e]&&(d+=c+e+"="+urlParams[e],c="&")}else d=window.location.search;return d};EditorUi.prototype.getUrl=function(b){b=
-null!=b?b:window.location.pathname;var d=0<b.indexOf("?")?1:0;if("1"==urlParams.offline)b+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),e;for(e in urlParams)0>mxUtils.indexOf(c,e)&&(b=0==d?b+"?":b+"&",null!=urlParams[e]&&(b+=e+"="+urlParams[e],d++))}return b};EditorUi.prototype.showLinkDialog=function(b,c,e,g,k){b=new LinkDialog(this,b,c,e,!0,g,k);this.showDialog(b.container,560,130,!0,!0);b.init()};EditorUi.prototype.getServiceCount=
-function(b){var d=1;null==this.drive&&"function"!==typeof window.DriveClient||d++;null==this.dropbox&&"function"!==typeof window.DropboxClient||d++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||d++;null!=this.gitHub&&d++;null!=this.gitLab&&d++;null!=this.notion&&d++;b&&isLocalStorage&&"1"==urlParams.browser&&d++;return d};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var b=this.getCurrentFile(),c=null!=b||"1"==urlParams.embed&&this.editor.graph.isEnabled();
-this.menus.get("viewPanels").setEnabled(c);this.menus.get("viewZoom").setEnabled(c);var e=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==b||b.isRestricted());this.actions.get("makeCopy").setEnabled(!e);this.actions.get("print").setEnabled(!e);this.menus.get("exportAs").setEnabled(!e);this.menus.get("embed").setEnabled(!e);e="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(e);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(e),
-this.menus.get("newLibrary").setEnabled(e));b="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=b&&b.isEditable();this.actions.get("image").setEnabled(c);this.actions.get("zoomIn").setEnabled(c);this.actions.get("zoomOut").setEnabled(c);this.actions.get("resetView").setEnabled(c);this.actions.get("undo").setEnabled(this.canUndo()&&b);this.actions.get("redo").setEnabled(this.canRedo()&&b);this.menus.get("edit").setEnabled(c);this.menus.get("view").setEnabled(c);this.menus.get("importFrom").setEnabled(b);
-this.menus.get("arrange").setEnabled(b);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(b),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(b));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var b=this.getCurrentFile();
-return null!=b&&b.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);var b=this.editor.graph,c=this.getCurrentFile(),e=this.isDiagramActive(),g=b.getEditableCells(b.getSelectionCells());this.actions.get("pageSetup").setEnabled(e);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(e);this.actions.get("editData").setEnabled(0<
-g.length||b.isSelectionEmpty());this.actions.get("shadowVisible").setEnabled(e);this.actions.get("connectionArrows").setEnabled(e);this.actions.get("connectionPoints").setEnabled(e);this.actions.get("copyStyle").setEnabled(e&&!b.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(e&&0<g.length);this.actions.get("editGeometry").setEnabled(0<g.length&&b.getModel().isVertex(g[0]));this.actions.get("createShape").setEnabled(e);this.actions.get("createRevision").setEnabled(e);this.actions.get("moveToFolder").setEnabled(null!=
-c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(e&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=
-c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());c=this.actions.get("findReplace");c.setEnabled("hidden"!=this.diagramContainer.style.visibility);c.label=mxResources.get("find")+(b.isEnabled()?"/"+mxResources.get("replace"):"")+"...";b=b.view.getState(b.getSelectionCell());this.actions.get("editShape").setEnabled(e&&null!=b&&null!=b.shape&&null!=b.shape.stencil)};var t=EditorUi.prototype.destroy;
-EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);t.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(b,c,e,g,k,p,t,v){var d=b.editor.graph;if("xml"==e)b.hideDialog(),b.saveData(c,"xml",mxUtils.getXml(b.editor.getGraphXml()),"text/xml");else if("svg"==e)b.hideDialog(),b.saveData(c,"svg",mxUtils.getXml(d.getSvg(g,
-k,p)),"image/svg+xml");else{var f=b.getFileData(!0,null,null,null,null,!0),l=d.getGraphBounds(),m=Math.floor(l.width*k/d.view.scale),n=Math.floor(l.height*k/d.view.scale);if(f.length<=MAX_REQUEST_SIZE&&m*n<MAX_AREA)if(b.hideDialog(),"png"!=e&&"jpg"!=e&&"jpeg"!=e||!b.isExportToCanvas()){var q={globalVars:d.getExportVariables()};v&&(q.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});b.saveRequest(c,e,function(b,d){return new mxXmlRequest(EXPORT_URL,"format="+e+"&base64="+(d||"0")+
-(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<t?"&dpi="+t:"")+"&bg="+(null!=g?g:"none")+"&w="+m+"&h="+n+"&border="+p+"&xml="+encodeURIComponent(f))})}else"png"==e?b.exportImage(k,null==g||"none"==g,!0,!1,!1,p,!0,!1,null,v,t):b.exportImage(k,!1,!0,!1,!1,p,!0,!1,"jpeg",v);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var b=this.editor.graph,c="";if(null!=
-this.pages)for(var e=0;e<this.pages.length;e++){var g=b;this.currentPage!=this.pages[e]&&(g=this.createTemporaryGraph(b.getStylesheet()),this.updatePageRoot(this.pages[e]),g.model.setRoot(this.pages[e].root));c+=this.pages[e].getName()+" "+g.getIndexableText()+" "}else c=b.getIndexableText();this.editor.graph.setEnabled(!0);return c};EditorUi.prototype.showRemotelyStoredLibrary=function(b){var d={},c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,
-mxUtils.htmlEntities(b));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var g=document.createElement("div");g.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";g.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var k={};try{var p=mxSettings.getCustomLibraries();for(b=0;b<p.length;b++){var t=p[b];if("R"==t.substring(0,1)){var y=JSON.parse(decodeURIComponent(t.substring(1)));k[y[0]]=
-{id:y[0],title:y[1],downloadUrl:y[2]}}}}catch(x){}this.remoteInvoke("getCustomLibraries",null,null,function(b){g.innerHTML="";if(0==b.length)g.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<b.length;c++){var e=b[c];k[e.id]&&(d[e.id]=e);var f=this.addCheckbox(g,e.title,k[e.id]);(function(b,c){mxEvent.addListener(c,"change",function(){this.checked?d[b.id]=b:delete d[b.id]})})(e,f)}},mxUtils.bind(this,
-function(b){g.innerHTML="";var c=document.createElement("div");c.style.padding="8px";c.style.textAlign="center";mxUtils.write(c,mxResources.get("error")+": ");mxUtils.write(c,null!=b&&null!=b.message?b.message:mxResources.get("unknownError"));g.appendChild(c)}));c.appendChild(g);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var b=0,c;for(c in d)null==k[c]&&(b++,mxUtils.bind(this,function(c){this.remoteInvoke("getFileContent",[c.downloadUrl],
-null,mxUtils.bind(this,function(d){b--;0==b&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,d,c))}catch(J){this.handleError(J,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){b--;0==b&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(d[c]));for(c in k)d[c]||this.closeLibrary(new RemoteLibrary(this,null,k[c]));0==b&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(c.container,
-340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(b){this.remoteWin=b;for(var c=0;c<this.remoteInvokeQueue.length;c++)b.postMessage(this.remoteInvokeQueue[c],
-"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(b){var c=b.msgMarkers,d=this.remoteInvokeCallbacks[c.callbackId];if(null==d)throw Error("No callback for "+(null!=c?c.callbackId:"null"));b.error?d.error&&d.error(b.error.errResp):d.callback&&d.callback.apply(this,b.resp);this.remoteInvokeCallbacks[c.callbackId]=null};EditorUi.prototype.remoteInvoke=function(b,c,e,g,k){var d=!0,f=window.setTimeout(mxUtils.bind(this,function(){d=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),
-this.timeout),l=mxUtils.bind(this,function(){window.clearTimeout(f);d&&g.apply(this,arguments)}),m=mxUtils.bind(this,function(){window.clearTimeout(f);d&&k.apply(this,arguments)});e=e||{};e.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:l,error:m});b=JSON.stringify({event:"remoteInvoke",funtionName:b,functionArgs:c,msgMarkers:e});null!=this.remoteWin?this.remoteWin.postMessage(b,"*"):this.remoteInvokeQueue.push(b)};EditorUi.prototype.handleRemoteInvoke=function(b,
-c){var d=mxUtils.bind(this,function(c,d){var e={event:"remoteInvokeResponse",msgMarkers:b.msgMarkers};null!=d?e.error={errResp:d}:null!=c&&(e.resp=c);this.remoteWin.postMessage(JSON.stringify(e),"*")});try{var e=b.funtionName,f=this.remoteInvokableFns[e];if(null!=f&&"function"===typeof this[e]){if(f.allowedDomains){for(var g=!1,k=0;k<f.allowedDomains.length;k++)if(c=="https://"+f.allowedDomains[k]){g=!0;break}if(!g){d(null,"Invalid Call: "+e+" is not allowed.");return}}var p=b.functionArgs;Array.isArray(p)||
-(p=[]);if(f.isAsync)p.push(function(){d(Array.prototype.slice.apply(arguments))}),p.push(function(b){d(null,b||"Unkown Error")}),this[e].apply(this,p);else{var t=this[e].apply(this,p);d([t])}}else d(null,"Invalid Call: "+e+" is not found.")}catch(x){d(null,"Invalid Call: An error occurred, "+x.message)}};EditorUi.prototype.openDatabase=function(b,c){if(null==this.database){var d=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=d)try{var e=d.open("database",2);e.onupgradeneeded=
-function(b){try{var d=e.result;1>b.oldVersion&&d.createObjectStore("objects",{keyPath:"key"});2>b.oldVersion&&(d.createObjectStore("files",{keyPath:"title"}),d.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(u){null!=c&&c(u)}};e.onsuccess=mxUtils.bind(this,function(c){var d=e.result;this.database=d;EditorUi.migrateStorageFiles&&(StorageFile.migrate(d),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||
-(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(b){if(!b||"1"==urlParams.forceMigration){var c=document.createElement("iframe");c.style.display="none";c.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(c);var d=!0,e=!1,f,g=0,k=mxUtils.bind(this,function(){e=!0;this.setDatabaseItem(".drawioMigrated3",!0);c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"setMigratedFlag"}),"*")}),l=mxUtils.bind(this,function(){g++;m()}),m=mxUtils.bind(this,function(){try{if(g>=f.length)k();else{var b=f[g];StorageFile.getFileContent(this,b,mxUtils.bind(this,function(d){null==d||".scratchpad"==b&&d==this.emptyLibraryXml?c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[b]}),"*"):l()}),l)}}catch(B){console.log(B)}}),p=mxUtils.bind(this,function(b){try{this.setDatabaseItem(null,[{title:b.title,
-size:b.data.length,lastModified:Date.now(),type:b.isLib?"L":"F"},{title:b.title,data:b.data}],l,l,["filesInfo","files"])}catch(B){console.log(B)}});b=mxUtils.bind(this,function(b){try{if(b.source==c.contentWindow){var g={};try{g=JSON.parse(b.data)}catch(M){}"init"==g.event?(c.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=g.event||e||
-(d?null!=g.resp&&0<g.resp.length&&null!=g.resp[0]?(f=g.resp[0],d=!1,m()):k():null!=g.resp&&0<g.resp.length&&null!=g.resp[0]?p(g.resp[0]):l())}}catch(M){console.log(M)}});window.addEventListener("message",b)}})));b(d);d.onversionchange=function(){d.close()}});e.onerror=c;e.onblocked=function(){}}catch(q){null!=c&&c(q)}else null!=c&&c()}else b(this.database)};EditorUi.prototype.setDatabaseItem=function(b,c,e,g,k){this.openDatabase(mxUtils.bind(this,function(d){try{k=k||"objects";Array.isArray(k)||(k=
-[k],b=[b],c=[c]);var f=d.transaction(k,"readwrite");f.oncomplete=e;f.onerror=g;for(d=0;d<k.length;d++)f.objectStore(k[d]).put(null!=b&&null!=b[d]?{key:b[d],data:c[d]}:c[d])}catch(v){null!=g&&g(v)}}),g)};EditorUi.prototype.removeDatabaseItem=function(b,c,e,g){this.openDatabase(mxUtils.bind(this,function(d){g=g||"objects";Array.isArray(g)||(g=[g],b=[b]);d=d.transaction(g,"readwrite");d.oncomplete=c;d.onerror=e;for(var f=0;f<g.length;f++)d.objectStore(g[f])["delete"](b[f])}),e)};EditorUi.prototype.getDatabaseItem=
-function(b,c,e,g){this.openDatabase(mxUtils.bind(this,function(d){try{g=g||"objects";var f=d.transaction([g],"readonly").objectStore(g).get(b);f.onsuccess=function(){c(f.result)};f.onerror=e}catch(u){null!=e&&e(u)}}),e)};EditorUi.prototype.getDatabaseItems=function(b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],"readonly").objectStore(e).openCursor(IDBKeyRange.lowerBound(0)),g=[];f.onsuccess=function(c){null==c.target.result?b(g):(g.push(c.target.result.value),
-c.target.result["continue"]())};f.onerror=c}catch(u){null!=c&&c(u)}}),c)};EditorUi.prototype.getDatabaseItemKeys=function(b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],"readonly").objectStore(e).getAllKeys();f.onsuccess=function(){b(f.result)};f.onerror=c}catch(n){null!=c&&c(n)}}),c)};EditorUi.prototype.commentsSupported=function(){var b=this.getCurrentFile();return null!=b?b.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var b=
-this.getCurrentFile();return null!=b?b.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var b=this.getCurrentFile();return null!=b?b.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(b,c){var d=this.getCurrentFile();null!=d?d.getComments(b,c):b([])};EditorUi.prototype.addComment=function(b,c,e){var d=this.getCurrentFile();null!=d?d.addComment(b,c,e):c(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var b=this.getCurrentFile();return null!=b?
-b.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var b=this.getCurrentFile();return null!=b?b.canComment():!0};EditorUi.prototype.newComment=function(b,c){var d=this.getCurrentFile();return null!=d?d.newComment(b,c):new DrawioComment(this,null,b,Date.now(),Date.now(),!1,c)};EditorUi.prototype.isRevisionHistorySupported=function(){var b=this.getCurrentFile();return null!=b&&b.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(b,c){var d=this.getCurrentFile();null!=
-d&&d.getRevisions?d.getRevisions(b,c):c({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var b=this.getCurrentFile();return null!=b&&(b.constructor==DriveFile&&b.isEditable()||b.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(b){b.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(b,c,e,g,k,p,t,v){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
-return this.editor.loadUrl(b,c,e,g,k,p,t,v)};EditorUi.prototype.loadFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(b)};EditorUi.prototype.createSvgDataUri=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(b)};EditorUi.prototype.embedCssFonts=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(b,c)};EditorUi.prototype.embedExtFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
-return this.editor.embedExtFonts(b)};EditorUi.prototype.exportToCanvas=function(b,c,e,g,k,p,t,v,y,x,G,C,E,J,L,H){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(b,c,e,g,k,p,t,v,y,x,G,C,E,J,L,H)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(b,c,e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
-return this.editor.convertImages(b,c,e,g)};EditorUi.prototype.convertImageToDataUri=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(b,c)};EditorUi.prototype.base64Encode=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(b)};EditorUi.prototype.updateCRC=function(b,c,e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(b,c,e,g)};EditorUi.prototype.crc32=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
-return Editor.crc32(b)};EditorUi.prototype.writeGraphModelToPng=function(b,c,e,g,k){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(b,c,e,g,k)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var b=[],c=0;c<localStorage.length;c++){var e=localStorage.key(c),g=localStorage.getItem(e);if(0<e.length&&(".scratchpad"==e||"."!=e.charAt(0))&&0<g.length){var k=
-"<mxfile "===g.substring(0,8)||"<?xml"===g.substring(0,5)||"\x3c!--[if IE]>"===g.substring(0,12),g="<mxlibrary>"===g.substring(0,11);(k||g)&&b.push(e)}}return b};EditorUi.prototype.getLocalStorageFile=function(b){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var c=localStorage.getItem(b);return{title:b,data:c,isLib:"<mxlibrary>"===c.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,c,e,k,g,p){function t(){for(var b=C.getElementsByTagName("div"),c=0,d=0;d<b.length;d++)"none"!=b[d].style.display&&b[d].parentNode==C&&c++;E.style.display=0==c?"block":"none"}function d(b,c,d,e){function f(){c.removeChild(l);c.removeChild(m);k.style.display="block";g.style.display="block"}y={div:c,comment:b,saveCallback:d,deleteOnCancel:e};var g=c.querySelector(".geCommentTxt"),k=c.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
+"tEXt","mxfile",encodeURIComponent(l));b(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(F){null!=c&&c(F)}}),null,null,null,mxUtils.bind(this,function(b){null!=c&&c(b)}),null,null,g,null,d.shadowVisible,null,d,k)}catch(E){null!=c&&c(E)}};EditorUi.prototype.getEmbeddedSvg=function(b,c,e,g,k,n,p,t,y,x,E,C,F){t=null!=t?t:!0;p=null!=y?y:c.background;p==mxConstants.NONE&&(p=null);n=c.getSvg(p,x,E,null,null,n,null,null,null,c.shadowVisible||
+C,null,F);(c.shadowVisible||C)&&c.addSvgShadow(n);null!=b&&n.setAttribute("content",b);null!=e&&n.setAttribute("resource",e);var d=(g?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(n);if(null!=k)this.embedFonts(n,mxUtils.bind(this,function(b){t?this.editor.convertImages(b,mxUtils.bind(this,function(b){k(d)})):k(d)}));else return d};EditorUi.prototype.embedFonts=function(b,c){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&
+this.editor.addFontCss(b,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(d){try{null!=d&&this.editor.addFontCss(b,d),c(b)}catch(m){c(b)}}))}catch(l){c(b)}}))};EditorUi.prototype.exportImage=function(b,c,e,g,k,n,p,t,y,x,E,C,F){y=null!=y?y:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,
+function(b){this.spinner.stop();try{this.saveCanvas(b,k?this.getFileData(!0,null,null,null,e,t):null,y,null==this.pages||0==this.pages.length,E)}catch(H){this.handleError(H)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,e,b||1,c,g,null,null,n,p,x,C,F)}catch(L){this.spinner.stop(),this.handleError(L)}}};EditorUi.prototype.isCorsEnabledForUrl=function(b){return this.editor.isCorsEnabledForUrl(b)};EditorUi.prototype.importXml=function(b,
+c,e,g,k,n,p){c=null!=c?c:0;e=null!=e?e:0;var d=[];try{var f=this.editor.graph;if(null!=b&&0<b.length){f.model.beginUpdate();try{var l=mxUtils.parseXml(b);b={};var m=this.editor.extractGraphModel(l.documentElement,null!=this.pages);if(null!=m&&"mxfile"==m.nodeName&&null!=this.pages){var q=m.getElementsByTagName("diagram");if(1==q.length&&!n){if(m=Editor.parseDiagramNode(q[0]),null!=this.currentPage&&(b[q[0].getAttribute("id")]=this.currentPage.getId(),null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&
+this.currentPage.getName()==mxResources.get("pageWithNumber",[1]))){var t=q[0].getAttribute("name");null!=t&&""!=t&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,t))}}else if(0<q.length){n=[];var u=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(b[q[0].getAttribute("id")]=this.pages[0].getId(),m=Editor.parseDiagramNode(q[0]),g=!1,u=1);for(;u<q.length;u++){var L=q[u].getAttribute("id");q[u].removeAttribute("id");var H=this.updatePageRoot(new DiagramPage(q[u]));
+b[L]=q[u].getAttribute("id");var J=this.pages.length;null==H.getName()&&H.setName(mxResources.get("pageWithNumber",[J+1]));f.model.execute(new ChangePage(this,H,H,J,!0));n.push(H)}this.updatePageLinks(b,n)}}if(null!=m&&"mxGraphModel"===m.nodeName&&(d=f.importGraphModel(m,c,e,g),null!=d))for(u=0;u<d.length;u++)this.updatePageLinksForCell(b,d[u]);p&&this.insertHandler(d,null,null,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,!0,!0)}finally{f.model.endUpdate()}}}catch(B){if(k)throw B;
+this.handleError(B)}return d};EditorUi.prototype.updatePageLinks=function(b,c){for(var d=0;d<c.length;d++)this.updatePageLinksForCell(b,c[d].root)};EditorUi.prototype.updatePageLinksForCell=function(b,c){var d=document.createElement("div"),e=this.editor.graph,f=e.getLinkForCell(c);null!=f&&e.setLinkForCell(c,this.updatePageLink(b,f));if(e.isHtmlLabel(c)){d.innerHTML=e.sanitizeHtml(e.getLabel(c));for(var g=d.getElementsByTagName("a"),k=!1,p=0;p<g.length;p++)f=g[p].getAttribute("href"),null!=f&&(g[p].setAttribute("href",
+this.updatePageLink(b,f)),k=!0);k&&e.labelChanged(c,d.innerHTML)}for(p=0;p<e.model.getChildCount(c);p++)this.updatePageLinksForCell(b,e.model.getChildAt(c,p))};EditorUi.prototype.updatePageLink=function(b,c){if(Graph.isPageLink(c)){var d=b[c.substring(c.indexOf(",")+1)];c=null!=d?"data:page/id,"+d:null}else if("data:action/json,"==c.substring(0,17))try{var e=JSON.parse(c.substring(17));if(null!=e.actions){for(var f=0;f<e.actions.length;f++){var g=e.actions[f];if(null!=g.open&&Graph.isPageLink(g.open)){var k=
+g.open.substring(g.open.indexOf(",")+1),d=b[k];null!=d?g.open="data:page/id,"+d:null==this.getPageById(k)&&delete g.open}}c="data:action/json,"+JSON.stringify(e)}}catch(v){}return c};EditorUi.prototype.isRemoteVisioFormat=function(b){return/(\.v(sd|dx))($|\?)/i.test(b)||/(\.vs(s|x))($|\?)/i.test(b)};EditorUi.prototype.importVisio=function(b,c,e,g,k){g=null!=g?g:b.name;e=null!=e?e:mxUtils.bind(this,function(b){this.handleError(b)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var d=
+this.isRemoteVisioFormat(g);try{var f="UNKNOWN-VISIO",l=g.lastIndexOf(".");if(0<=l&&l<g.length)f=g.substring(l+1).toUpperCase();else{var m=g.lastIndexOf("/");0<=m&&m<g.length&&(g=g.substring(m+1))}EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+g,label:d?"remote":"local"})}catch(C){}if(d)if(null==VSD_CONVERT_URL||this.isOffline())e({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{d=new FormData;d.append("file1",
+b,g);var n=new XMLHttpRequest;n.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(g)?"?stencil=1":""));n.responseType="blob";this.addRemoteServiceSecurityCheck(n);null!=k&&n.setRequestHeader("x-convert-custom",k);n.onreadystatechange=mxUtils.bind(this,function(){if(4==n.readyState)if(200<=n.status&&299>=n.status)try{var b=n.response;if("text/xml"==b.type){var d=new FileReader;d.onload=mxUtils.bind(this,function(b){try{c(b.target.result)}catch(L){e({message:mxResources.get("errorLoadingFile")})}});
+d.readAsText(b)}else this.doImportVisio(b,c,e,g)}catch(I){e(I)}else try{""==n.responseType||"text"==n.responseType?e({message:n.responseText}):(d=new FileReader,d.onload=function(){e({message:JSON.parse(d.result).Message})},d.readAsText(n.response))}catch(I){e({})}});n.send(d)}else try{this.doImportVisio(b,c,e,g)}catch(C){e(C)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=
+!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.importGraphML=function(b,c,e){e=null!=e?e:mxUtils.bind(this,function(b){this.handleError(b)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(b,c,e)}catch(q){e(q)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",
+d))};EditorUi.prototype.exportVisio=function(b){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(b)||this.handleError({message:mxResources.get("unknownError")})}catch(l){this.handleError(l)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",
+d))};EditorUi.prototype.convertLucidChart=function(b,c,e){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+b.length}),EditorUi.debug("convertLucidChart",b)}catch(q){}try{c(LucidImporter.importState(JSON.parse(b)))}catch(q){null!=window.console&&console.error(q),e(q)}}else e({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||
+this.loadingExtensions||this.isOffline(!0)?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",d)})})})}):mxscript("js/extensions.min.js",d))};EditorUi.prototype.generateMermaidImage=function(b,c,e,g){var d=this,f=function(){try{this.loadingMermaid=
+!1,c=null!=c?c:EditorUi.defaultMermaidConfig,c.securityLevel="strict",c.startOnLoad=!1,mermaid.mermaidAPI.initialize(c),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),b,function(b){try{if(mxClient.IS_IE||mxClient.IS_IE11)b=b.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var c=mxUtils.parseXml(b).getElementsByTagName("svg");if(0<c.length){var f=parseFloat(c[0].getAttribute("width")),l=parseFloat(c[0].getAttribute("height"));
+if(isNaN(f)||isNaN(l))try{var k=c[0].getAttribute("viewBox").split(/\s+/),f=parseFloat(k[2]),l=parseFloat(k[3])}catch(C){f=f||100,l=l||100}e(d.convertDataUri(Editor.createSvgDataUri(b)),f,l)}else g({message:mxResources.get("invalidInput")})}catch(C){g(C)}})}catch(u){g(u)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=
+function(b,c,e,g){function d(b,d,c){c1=b>>2;c2=(b&3)<<4|d>>4;c3=(d&15)<<2|c>>6;c4=c&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(b){if(10>b)return String.fromCharCode(48+b);b-=10;if(26>b)return String.fromCharCode(65+b);b-=26;if(26>b)return String.fromCharCode(97+b);b-=26;return 0==b?"-":1==b?"_":"?"}var l=new XMLHttpRequest;l.open("GET",("txt"==c?PLANT_URL+"/txt/":"png"==c?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(b){r="";for(i=0;i<b.length;i+=3)r=i+2==b.length?r+
+d(b.charCodeAt(i),b.charCodeAt(i+1),0):i+1==b.length?r+d(b.charCodeAt(i),0,0):r+d(b.charCodeAt(i),b.charCodeAt(i+1),b.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(b))),!0);"txt"!=c&&(l.responseType="blob");l.onload=function(b){if(200<=this.status&&300>this.status)if("txt"==c)e(this.response);else{var d=new FileReader;d.readAsDataURL(this.response);d.onloadend=function(b){var c=new Image;c.onload=function(){try{var b=c.width,f=c.height;if(0==b&&0==f){var l=d.result,k=l.indexOf(","),
+m=decodeURIComponent(escape(atob(l.substring(k+1)))),n=mxUtils.parseXml(m).getElementsByTagName("svg");0<n.length&&(b=parseFloat(n[0].getAttribute("width")),f=parseFloat(n[0].getAttribute("height")))}e(d.result,b,f)}catch(B){g(B)}};c.src=d.result};d.onerror=function(b){g(b)}}else g(b)};l.onerror=function(b){g(b)};l.send()};EditorUi.prototype.insertAsPreText=function(b,c,e){var d=this.editor.graph,f=null;d.getModel().beginUpdate();try{f=d.insertVertex(null,null,"<pre>"+b+"</pre>",c,e,1,1,"text;html=1;align=left;verticalAlign=top;"),
+d.updateCellSize(f,!0)}finally{d.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=function(b,c,e,g,k,n,p,t){n=null!=n?n:!0;p=null!=p?p:!0;if(null!=b)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b))this.parseFile(new Blob([b.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&this.editor.graph.setSelectionCells(this.insertTextAt(b.responseText,c,e,!0))}));
+else if("data:"==b.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b))){var d=this.editor.graph;if("data:application/pdf;base64,"==b.substring(0,28)){var f=Editor.extractGraphModelFromPdf(b);if(null!=f&&0<f.length)return this.importXml(f,c,e,n,!0,t)}if("data:image/png;base64,"==b.substring(0,22)&&(f=this.extractGraphModelFromPng(b),null!=f&&0<f.length))return this.importXml(f,c,e,n,!0,t);if("data:image/svg+xml;"==b.substring(0,19))try{f=null;"data:image/svg+xml;base64,"==
+b.substring(0,26)?(f=b.substring(b.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(b.substring(b.indexOf(",")+1));var l=this.importXml(f,c,e,n,!0,t);if(0<l.length)return l}catch(F){}this.loadImage(b,mxUtils.bind(this,function(f){if("data:"==b.substring(0,5))this.resizeImage(f,b,mxUtils.bind(this,function(b,f,g){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(c),d.snap(e),f,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+this.convertDataUri(b)+";"))}),p,this.maxImageSize);else{var g=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)),l=Math.round(f.width*g);f=Math.round(f.height*g);d.setSelectionCell(d.insertVertex(null,null,"",d.snap(c),d.snap(e),l,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";"))}}),mxUtils.bind(this,function(){var f=null;d.getModel().beginUpdate();try{f=d.insertVertex(d.getDefaultParent(),
+null,b,d.snap(c),d.snap(e),1,1,"text;"+(g?"html=1;":"")),d.updateCellSize(f),d.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{d.getModel().endUpdate()}d.setSelectionCell(f)}))}else{b=Graph.zapGremlins(mxUtils.trim(b));if(this.isCompatibleString(b))return this.importXml(b,c,e,n,null,t);if(0<b.length)if(this.isLucidChartData(b))this.convertLucidChart(b,mxUtils.bind(this,function(b){this.editor.graph.setSelectionCells(this.importXml(b,c,e,n,null,t))}),mxUtils.bind(this,function(b){this.handleError(b)}));
+else{d=this.editor.graph;k=null;d.getModel().beginUpdate();try{k=d.insertVertex(d.getDefaultParent(),null,"",d.snap(c),d.snap(e),1,1,"text;whiteSpace=wrap;"+(g?"html=1;":""));d.fireEvent(new mxEventObject("textInserted","cells",[k]));"<"==b.charAt(0)&&b.indexOf(">")==b.length-1&&(b=mxUtils.htmlEntities(b));b.length>this.maxTextBytes&&(b=b.substring(0,this.maxTextBytes)+"...");k.value=b;d.updateCellSize(k);if(0<this.maxTextWidth&&k.geometry.width>this.maxTextWidth){var m=d.getPreferredSizeForCell(k,
+this.maxTextWidth);k.geometry.width=m.width;k.geometry.height=m.height}Graph.isLink(k.value)&&d.setLinkForCell(k,k.value);k.geometry.width+=d.gridSize;k.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[k]}}return[]};EditorUi.prototype.formatFileSize=function(b){var d=-1;do b/=1024,d++;while(1024<b);return Math.max(b,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[d]};EditorUi.prototype.convertDataUri=function(b){if("data:"==b.substring(0,5)){var d=b.indexOf(";");0<d&&(b=
+b.substring(0,d)+b.substring(b.indexOf(",",d+1)))}return b};EditorUi.prototype.isRemoteFileFormat=function(b,c){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(b)};EditorUi.prototype.isLucidChartData=function(b){return null!=b&&('{"state":"{\\"Properties\\":'==b.substring(0,26)||'{"Properties":'==b.substring(0,14))};EditorUi.prototype.importLocalFile=function(b,c){if(b&&Graph.fileSupport){if(null==this.importFileInputElt){var d=document.createElement("input");d.setAttribute("type",
+"file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){null!=d.files&&(this.importFiles(d.files,null,null,this.maxImageSize),d.type="",d.type="file",d.value="")}));d.style.display="none";document.body.appendChild(d);this.importFileInputElt=d}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(b,d){StorageFile.listFiles(this,"F",b,d)});window.openBrowserFile=mxUtils.bind(this,function(b,d,c){StorageFile.getFileContent(this,
+b,d,c)});window.deleteBrowserFile=mxUtils.bind(this,function(b,d,c){StorageFile.deleteFile(this,b,d,c)});if(!c){var e=Editor.useLocalStorage;Editor.useLocalStorage=!b}window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));window.openFile.setConsumer(mxUtils.bind(this,function(b,d){if(null!=d&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(d)){var c=new Blob([b],{type:"application/octet-stream"});this.importVisio(c,mxUtils.bind(this,function(b){this.importXml(b,0,0,!0)}),
+null,d)}else this.editor.graph.setSelectionCells(this.importXml(b,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!c){var f=this.dialog,g=f.close;this.dialog.close=mxUtils.bind(this,function(b){Editor.useLocalStorage=e;g.apply(f,arguments);b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(b,c,e){var d=this,f=mxUtils.bind(this,
+function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(b).then(function(f){if(0==Object.keys(f.files).length)e();else{var g=0,l,k=!1;f.forEach(function(b,d){var f=d.name.toLowerCase();"diagram/diagram.xml"==f?(k=!0,d.async("string").then(function(b){0==b.indexOf("<mxfile ")?c(b):e()})):0==f.indexOf("versions/")&&(f=parseInt(f.substr(9)),f>g&&(g=f,l=d))});0<g?l.async("string").then(function(f){!d.isOffline()&&(new XMLHttpRequest).upload&&d.isRemoteFileFormat(f,b.name)?d.parseFile(new Blob([f],
+{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?c(b.responseText):e())}),b.name):e()}):k||e()}},function(b){e(b)}):e()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importFile=function(b,c,e,g,k,n,p,t,y,x,E,C){x=null!=x?x:!0;var d=!1,f=null,l=mxUtils.bind(this,function(b){var d=null;null!=b&&"<mxlibrary"==b.substring(0,10)?
+this.loadLibrary(new LocalLibrary(this,b,p)):d=this.importXml(b,e,g,x,null,null!=C?mxEvent.isControlDown(C):null);null!=t&&t(d)});"image"==c.substring(0,5)?(y=!1,"image/png"==c.substring(0,9)&&(c=E?null:this.extractGraphModelFromPng(b),null!=c&&0<c.length&&(f=this.importXml(c,e,g,x,null,null!=C?mxEvent.isControlDown(C):null),y=!0)),y||(c=this.editor.graph,E=b.indexOf(";"),0<E&&(b=b.substring(0,E)+b.substring(b.indexOf(",",E+1))),x&&c.isGridEnabled()&&(e=c.snap(e),g=c.snap(g)),f=[c.insertVertex(null,
+null,"",e,g,k,n,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";")])):/(\.*<graphml )/.test(b)?(d=!0,this.importGraphML(b,l)):null!=y&&null!=p&&(/(\.v(dx|sdx?))($|\?)/i.test(p)||/(\.vs(x|sx?))($|\?)/i.test(p))?(d=!0,this.importVisio(y,l)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,p)?(d=!0,this.parseFile(null!=y?y:new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==
+b.readyState&&(200<=b.status&&299>=b.status?l(b.responseText):null!=t&&t(null))}),p)):0==b.indexOf("PK")&&null!=y?(d=!0,this.importZipFile(y,l,mxUtils.bind(this,function(){f=this.insertTextAt(this.validateFileData(b),e,g,!0,null,x);t(f)}))):/(\.v(sd|dx))($|\?)/i.test(p)||/(\.vs(s|x))($|\?)/i.test(p)||(f=this.insertTextAt(this.validateFileData(b),e,g,!0,null,x,null,null!=C?mxEvent.isControlDown(C):null));d||null==t||t(f);return f};EditorUi.prototype.importFiles=function(b,c,e,g,k,n,p,t,y,x,E,C,F){g=
+null!=g?g:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var d=null!=c&&null!=e,f=!0;c=null!=c?c:0;e=null!=e?e:0;var l=!1;if(!mxClient.IS_CHROMEAPP&&null!=b)for(var m=E||this.resampleThreshold,q=0;q<b.length;q++)if("image/"==b[q].type.substring(0,6)&&b[q].size>m){l=!0;break}var u=mxUtils.bind(this,function(){var l=this.editor.graph,m=l.gridSize;k=null!=k?k:mxUtils.bind(this,function(b,c,e,f,g,l,k,m,n){try{return null!=b&&"<mxlibrary"==b.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,
+b,k)),null):this.importFile(b,c,e,f,g,l,k,m,n,d,C,F)}catch(fa){return this.handleError(fa),null}});n=null!=n?n:mxUtils.bind(this,function(b){l.setSelectionCells(b)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=b.length,u=q,v=[],B=mxUtils.bind(this,function(b,d){v[b]=d;if(0==--u){this.spinner.stop();if(null!=t)t(v);else{var c=[];l.getModel().beginUpdate();try{for(var e=0;e<v.length;e++){var f=v[e]();null!=f&&(c=c.concat(f))}}finally{l.getModel().endUpdate()}}n(c)}}),y=
+0;y<q;y++)mxUtils.bind(this,function(d){var n=b[d];if(null!=n){var q=new FileReader;q.onload=mxUtils.bind(this,function(b){if(null==p||p(n))if("image/"==n.type.substring(0,6))if("image/svg"==n.type.substring(0,9)){var q=Graph.clipSvgDataUri(b.target.result),t=q.indexOf(","),u=decodeURIComponent(escape(atob(q.substring(t+1)))),v=mxUtils.parseXml(u),u=v.getElementsByTagName("svg");if(0<u.length){var u=u[0],N=C?null:u.getAttribute("content");null!=N&&"<"!=N.charAt(0)&&"%"!=N.charAt(0)&&(N=unescape(window.atob?
+atob(N):Base64.decode(N,!0)));null!=N&&"%"==N.charAt(0)&&(N=decodeURIComponent(N));null==N||"<mxfile "!==N.substring(0,8)&&"<mxGraphModel "!==N.substring(0,14)?B(d,mxUtils.bind(this,function(){try{if(q.substring(0,t+1),null!=v){var b=v.getElementsByTagName("svg");if(0<b.length){var f=b[0],p=f.getAttribute("width"),x=f.getAttribute("height"),p=null!=p&&"%"!=p.charAt(p.length-1)?parseFloat(p):NaN,x=null!=x&&"%"!=x.charAt(x.length-1)?parseFloat(x):NaN,u=f.getAttribute("viewBox");if(null==u||0==u.length)f.setAttribute("viewBox",
+"0 0 "+p+" "+x);else if(isNaN(p)||isNaN(x)){var B=u.split(" ");3<B.length&&(p=parseFloat(B[2]),x=parseFloat(B[3]))}q=Editor.createSvgDataUri(mxUtils.getXml(f));var N=Math.min(1,Math.min(g/Math.max(1,p)),g/Math.max(1,x)),C=k(q,n.type,c+d*m,e+d*m,Math.max(1,Math.round(p*N)),Math.max(1,Math.round(x*N)),n.name);if(isNaN(p)||isNaN(x)){var y=new Image;y.onload=mxUtils.bind(this,function(){p=Math.max(1,y.width);x=Math.max(1,y.height);C[0].geometry.width=p;C[0].geometry.height=x;f.setAttribute("viewBox",
+"0 0 "+p+" "+x);q=Editor.createSvgDataUri(mxUtils.getXml(f));var b=q.indexOf(";");0<b&&(q=q.substring(0,b)+q.substring(q.indexOf(",",b+1)));l.setCellStyles("image",q,[C[0]])});y.src=Editor.createSvgDataUri(mxUtils.getXml(f))}return C}}}catch(Z){}return null})):B(d,mxUtils.bind(this,function(){return k(N,"text/xml",c+d*m,e+d*m,0,0,n.name)}))}else B(d,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==n.type){var y=C?null:this.extractGraphModelFromPng(b.target.result);if(null!=y&&
+0<y.length){var A=new Image;A.src=b.target.result;B(d,mxUtils.bind(this,function(){return k(y,"text/xml",c+d*m,e+d*m,A.width,A.height,n.name)}));u=!0}}u||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(b.target.result,mxUtils.bind(this,function(l){this.resizeImage(l,
+b.target.result,mxUtils.bind(this,function(b,l,p){B(d,mxUtils.bind(this,function(){if(null!=b&&b.length<x){var q=f&&this.isResampleImageSize(n.size,E)?Math.min(1,Math.min(g/l,g/p)):1;return k(b,n.type,c+d*m,e+d*m,Math.round(l*q),Math.round(p*q),n.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,g,E,n.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else q=b.target.result,k(q,n.type,c+d*m,e+d*m,240,160,n.name,
+function(b){B(d,function(){return b})},n)});/(\.v(dx|sdx?))($|\?)/i.test(n.name)||/(\.vs(x|sx?))($|\?)/i.test(n.name)?k(null,n.type,c+d*m,e+d*m,240,160,n.name,function(b){B(d,function(){return b})},n):"image"==n.type.substring(0,5)||"application/pdf"==n.type?q.readAsDataURL(n):q.readAsText(n)}})(y)});if(l){l=[];for(q=0;q<b.length;q++)l.push(b[q]);b=l;this.confirmImageResize(function(b){f=b;u()},y)}else u()};EditorUi.prototype.confirmImageResize=function(b,c){c=null!=c?c:!1;var d=null!=this.spinner&&
+null!=this.spinner.pause?this.spinner.pause():function(){},e=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(e,f){if(e||c)mxSettings.setResizeImages(e?f:null),mxSettings.save();d();b(f)};null==e||c?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(b){f(b,!0)},function(b){f(b,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+
+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):f(!1,e)};EditorUi.prototype.parseFile=function(b,c,e){e=null!=e?e:b.name;var d=new FormData;d.append("format","xml");d.append("upfile",b,e);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){c(f)};f.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+b.size})}catch(n){}};EditorUi.prototype.isResampleImageSize=function(b,
+c){c=null!=c?c:this.resampleThreshold;return b>c};EditorUi.prototype.resizeImage=function(b,c,e,g,k,n,p){k=null!=k?k:this.maxImageSize;var d=Math.max(1,b.width),f=Math.max(1,b.height);if(g&&this.isResampleImageSize(null!=p?p:c.length,n))try{var l=Math.max(d/k,f/k);if(1<l){var m=Math.round(d/l),q=Math.round(f/l),t=document.createElement("canvas");t.width=m;t.height=q;t.getContext("2d").drawImage(b,0,0,m,q);var u=t.toDataURL();if(u.length<c.length){var L=document.createElement("canvas");L.width=m;L.height=
+q;var H=L.toDataURL();u!==H&&(c=u,d=m,f=q)}}}catch(J){}e(c,d,f)};EditorUi.prototype.extractGraphModelFromPng=function(b){return Editor.extractGraphModelFromPng(b)};EditorUi.prototype.loadImage=function(b,c,e){try{var d=new Image;d.onload=function(){d.width=0<d.width?d.width:120;d.height=0<d.height?d.height:120;c(d)};null!=e&&(d.onerror=e);d.src=b}catch(q){if(null!=e)e(q);else throw q;}};var g=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&
+!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;Editor.isDarkMode()&&(c.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);c.cellEditor.editPlantUmlData=function(d,e,f){var g=JSON.parse(f);e=new TextareaDialog(b,mxResources.get("plantUml")+":",g.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generatePlantUmlImage(e,g.format,function(f,l,k){b.spinner.stop();
+c.getModel().beginUpdate();try{if("txt"==g.format)c.labelChanged(d,"<pre>"+f+"</pre>"),c.updateCellSize(d,!0);else{c.setCellStyles("image",b.convertDataUri(f),[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=l,m.height=k,c.cellsResized([d],[m],!1))}c.setAttributeForCell(d,"plantUmlData",JSON.stringify({data:e,format:g.format}))}finally{c.getModel().endUpdate()}},function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};c.cellEditor.editMermaidData=
+function(d,e,f){var g=JSON.parse(f);e=new TextareaDialog(b,mxResources.get("mermaid")+":",g.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generateMermaidImage(e,g.config,function(f,l,k){b.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",f,[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=Math.max(m.width,l),m.height=Math.max(m.height,k),c.cellsResized([d],[m],!1));c.setAttributeForCell(d,"mermaidData",JSON.stringify({data:e,
+config:g.config},null,2))}finally{c.getModel().endUpdate()}},function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};var e=c.cellEditor.startEditing;c.cellEditor.startEditing=function(d,f){try{var g=this.graph.getAttributeForCell(d,"plantUmlData");if(null!=g)this.editPlantUmlData(d,f,g);else if(g=this.graph.getAttributeForCell(d,"mermaidData"),null!=g)this.editMermaidData(d,f,g);else{var l=c.getCellStyle(d);"1"==mxUtils.getValue(l,"metaEdit","0")?b.showDataDialog(d):
+e.apply(this,arguments)}}catch(T){b.handleError(T)}};c.getLinkTitle=function(d){return b.getLinkTitle(d)};c.customLinkClicked=function(d){var c=!1;try{b.handleCustomLink(d),c=!0}catch(M){b.handleError(M)}return c};var k=c.parseBackgroundImage;c.parseBackgroundImage=function(b){var d=k.apply(this,arguments);null!=d&&null!=d.src&&Graph.isPageLink(d.src)&&(d={originalSrc:d.src});return d};var p=c.setBackgroundImage;c.setBackgroundImage=function(d){null!=d&&null!=d.originalSrc&&(d=b.createImageForPageLink(d.originalSrc,
+b.currentPage));p.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(b,d){var e=null!=c.backgroundImage?c.backgroundImage.originalSrc:null;if(null!=e){var f=e.indexOf(",");if(0<f)for(var e=e.substring(f+1),f=d.getProperty("patches"),g=0;g<f.length;g++)if(null!=f[g][EditorUi.DIFF_UPDATE]&&
+null!=f[g][EditorUi.DIFF_UPDATE][e]){c.refreshBackgroundImage();c.view.validateBackgroundImage();break}}}));var n=c.getBackgroundImageObject;c.getBackgroundImageObject=function(b,d){var c=n.apply(this,arguments);null==c||null==c.originalSrc||d||(c={src:c.originalSrc});return c};var t=this.clearDefaultStyle;this.clearDefaultStyle=function(){t.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");
+if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var v=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1");return v.apply(this,arguments)};var y=c.addClickHandler;c.addClickHandler=function(b,d,e){var f=d;d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null!=
+d&&c.isCustomLink(d)&&(mxEvent.isTouchEvent(b)||!mxEvent.isPopupTrigger(b))&&c.customLinkClicked(d)&&mxEvent.consume(b);null!=f&&f(b,d)};y.call(this,b,d,e)};g.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var x=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(d,c,e){b.editor.graph.isSelectionEmpty()?x.apply(this,arguments):b.menus.addMenuItems(d,"delete - cut copy copyAsImage - duplicate".split(" "),
+null,e)}}b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var E=c.getExportVariables;c.getExportVariables=function(){var d=E.apply(this,arguments),c=b.getCurrentFile();null!=c&&(d.filename=c.getTitle());d.pagecount=null!=b.pages?b.pages.length:1;d.page=null!=b.currentPage?b.currentPage.getName():"";d.pagenumber=null!=b.pages&&null!=b.currentPage?mxUtils.indexOf(b.pages,
+b.currentPage)+1:1;return d};var C=c.getGlobalVariable;c.getGlobalVariable=function(d){var c=b.getCurrentFile();return"filename"==d&&null!=c?c.getTitle():"page"==d&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==d?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:"pagecount"==d?null!=b.pages?b.pages.length:1:C.apply(this,arguments)};var F=c.labelLinkClicked;c.labelLinkClicked=function(b,d,e){var f=d.getAttribute("href");if(null==f||!c.isCustomLink(f)||!mxEvent.isTouchEvent(e)&&
+mxEvent.isPopupTrigger(e))F.apply(this,arguments);else{if(!c.isEnabled()||null!=b&&c.isCellLocked(b.cell))c.customLinkClicked(f),c.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=function(){var d=b.defaultFilename,c=b.getCurrentFile();null!=c&&(d=null!=c.getTitle()?c.getTitle():d);return d};var I=this.actions.get("print");I.setEnabled(!mxClient.IS_IOS||!navigator.standalone);I.visible=I.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,
+!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&c.addListener(mxEvent.EDITING_STARTED,
+mxUtils.bind(this,function(b){var d=c.cellEditor.text2,e=null;null!=d&&(mxEvent.addListener(d,"dragleave",function(b){null!=e&&(e.parentNode.removeChild(e),e=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(b){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=this.highlightElement(d));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(b){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<
+b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,function(b,d,e,f,g,l){c.insertImage(b,g,l)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()},mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)?this.loadImage(decodeURIComponent(d),mxUtils.bind(this,function(b){var e=Math.max(1,
+b.width);b=Math.max(1,b.height);var f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,e)),f/Math.max(1,b));c.insertImage(decodeURIComponent(d),e*f,b*f)})):document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"));b.stopPropagation();
+b.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(I=this.editor.graph.view,I.setUnit(mxSettings.getUnit()),I.addListener("unitChanged",function(b,d){mxSettings.setUnit(d.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,I.unit),this.refresh());if("1"==urlParams.styledev){I=document.getElementById("geFooter");
+null!=I&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),I.appendChild(this.styleInput),
+this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(b,d){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var L=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==this.styleInput?!0:L.apply(this,arguments)}}I=document.getElementById("geInfo");
+null!=I&&I.parentNode.removeChild(I);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var H=null;mxEvent.addListener(c.container,"dragleave",function(b){c.isEnabled()&&(null!=H&&(H.parentNode.removeChild(H),H=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(b){null==H&&(!mxClient.IS_IE||10<document.documentMode)&&(H=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();
+b.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(b){null!=H&&(H.parentNode.removeChild(H),H=null);if(c.isEnabled()){var d=mxUtils.convertPoint(c.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),e=c.view.translate,f=c.view.scale,g=d.x/f-e.x,l=d.y/f-e.y;if(0<b.dataTransfer.files.length)mxEvent.isShiftDown(b)?this.openFiles(b.dataTransfer.files,!0):(mxEvent.isAltDown(b)&&(l=g=null),this.importFiles(b.dataTransfer.files,g,l,this.maxImageSize,null,null,null,
+null,mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b),b));else{mxEvent.isAltDown(b)&&(l=g=0);var k=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):null,d=this.extractGraphModelFromEvent(b,null!=this.pages);if(null!=d)c.setSelectionCells(this.importXml(d,g,l,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){var m=b.dataTransfer.getData("text/html"),d=document.createElement("div");d.innerHTML=c.sanitizeHtml(m);var n=null,e=d.getElementsByTagName("img");
+null!=e&&1==e.length?(m=e[0].getAttribute("src"),null==m&&(m=e[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||(n=!0)):(e=d.getElementsByTagName("a"),null!=e&&1==e.length?m=e[0].getAttribute("href"):(d=d.getElementsByTagName("pre"),null!=d&&1==d.length&&(m=mxUtils.getTextContent(d[0]))));var p=!0,q=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(m,g,l,!0,n,null,p,mxEvent.isControlDown(b)))});n&&null!=m&&m.length>this.resampleThreshold?this.confirmImageResize(function(b){p=
+b;q()},mxEvent.isControlDown(b)):q()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(b){var d=Math.max(1,b.width);b=Math.max(1,b.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,b));c.setSelectionCell(c.insertVertex(null,null,"",g,l,d*e,b*e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(b){c.setSelectionCells(this.insertTextAt(k,
+g,l,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),g,l,!0))}}b.stopPropagation();b.preventDefault()}),!1)}c.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var b=this.editor.graph;b.container.addEventListener("paste",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d))try{for(var c=
+d.clipboardData||d.originalEvent.clipboardData,e=!1,f=0;f<c.types.length;f++)if("text/"===c.types[f].substring(0,5)){e=!0;break}if(!e){var g=c.items;for(index in g){var k=g[index];if("file"===k.kind){if(b.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(d,c,e,f,g,l){b.insertImage(d,g,l)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()});else{var p=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],
+p.x,p.y,this.maxImageSize);mxEvent.consume(d)}break}}}}catch(y){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function b(){window.setTimeout(function(){e.innerHTML="&nbsp;";e.focus();document.execCommand("selectAll",!1,null)},0)}var c=this.editor.graph,e=document.createElement("div");e.setAttribute("autocomplete","off");e.setAttribute("autocorrect","off");e.setAttribute("autocapitalize","off");e.setAttribute("spellcheck","false");e.style.textRendering="optimizeSpeed";e.style.fontFamily=
+"monospace";e.style.wordBreak="break-all";e.style.background="transparent";e.style.color="transparent";e.style.position="absolute";e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.display="block";e.style.fontSize="1";e.style.zIndex="-1";e.style.resize="none";e.style.outline="none";e.style.width="1px";e.style.height="1px";mxUtils.setOpacity(e,0);e.contentEditable=!0;e.innerHTML="&nbsp;";var g=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,
+null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var d=mxEvent.getSource(b);null==c.container||!c.isEnabled()||c.isMouseDown||c.isEditing()||null!=this.dialog||"INPUT"==d.nodeName||"TEXTAREA"==d.nodeName||224!=b.keyCode&&(mxClient.IS_MAC||17!=b.keyCode)&&(!mxClient.IS_MAC||91!=b.keyCode&&93!=b.keyCode)||g||(e.style.left=c.container.scrollLeft+10+"px",e.style.top=c.container.scrollTop+10+"px",c.container.appendChild(e),g=!0,e.focus(),document.execCommand("selectAll",!1,null))}));
+mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var d=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){!g||224!=d&&17!=d&&91!=d&&93!=d||(g=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),e.parentNode.removeChild(e),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(e,"copy",mxUtils.bind(this,function(d){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(e),b()}catch(u){this.handleError(u)}}));mxEvent.addListener(e,"cut",
+mxUtils.bind(this,function(d){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(e,!0),b()}catch(u){this.handleError(u)}}));mxEvent.addListener(e,"paste",mxUtils.bind(this,function(b){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(e.innerHTML="&nbsp;",e.focus(),null!=b.clipboardData&&this.pasteCells(b,e,!0,!0),mxEvent.isConsumed(b)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,e,!1,!0)}),0))}),!0);var k=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==
+e?!0:k.apply(this,arguments)}};EditorUi.prototype.getLinkTitle=function(b){var d=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(b)){var c=b.indexOf(",");0<c&&(d=this.getPageById(b.substring(c+1)),d=null!=d?d.getName():mxResources.get("pageNotFound"))}else"data:"==b.substring(0,5)&&(d=mxResources.get("action"));return d};EditorUi.prototype.handleCustomLink=function(b){if(Graph.isPageLink(b)){var d=b.indexOf(",");if(b=this.getPageById(b.substring(d+1)))this.selectPage(b);else throw Error(mxResources.get("pageNotFound")||
+"Page not found");}else this.editor.graph.handleCustomLink(b)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(b){b.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),
+this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(b,c){if("1"!=urlParams["ext-fonts"])mxSettings.setCustomFonts(this.menus.customFonts);else{var d=c.getProperty("customFonts");this.menus.customFonts=d;mxSettings.setCustomFonts(d)}mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());
+this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(b,c){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(b,c){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));
+this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.addListener("gridColorChanged",mxUtils.bind(this,function(b,c){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(b,c){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=
+urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};
+EditorUi.prototype.copyImage=function(b,c,e){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(b,d){try{this.spinner.stop();var e=this.createImageDataUri(b,c,"png"),f=parseInt(d.getAttribute("width")),g=parseInt(d.getAttribute("height"));this.writeImageToClipboard(e,f,g,mxUtils.bind(this,function(b){this.handleError(b)}))}catch(y){this.handleError(y)}}),null,null,null,mxUtils.bind(this,function(b){this.spinner.stop();
+this.handleError(b)}),null,null,null!=e?e:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!0,null,0<b.length?b:null)}catch(m){this.handleError(m)}};EditorUi.prototype.writeImageToClipboard=function(b,c,e,g){var d=this.base64ToBlob(b.substring(b.indexOf(",")+1),"image/png");b=new ClipboardItem({"image/png":d,"text/html":new Blob(['<img src="'+b+'" width="'+c+'" height="'+e+'">'],{type:"text/html"})});navigator.clipboard.write([b])["catch"](g)};
+EditorUi.prototype.copyCells=function(b,c){var d=this.editor.graph;if(d.isSelectionEmpty())b.innerHTML="";else{var e=mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),f=mxUtils.getXml(d.encodeCells(e));mxUtils.setTextContent(b,encodeURIComponent(f));c?(d.removeCells(e,!1),d.lastPasteXml=null):(d.lastPasteXml=f,d.pasteCounter=0);b.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var b=null;if(Editor.enableNativeCipboard){var c=this.editor.graph;
+c.isSelectionEmpty()||(b=mxUtils.sortCells(c.getExportableCells(c.model.getTopmostCells(c.getSelectionCells()))),c=mxUtils.getXml(c.encodeCells(b)),navigator.clipboard.writeText(c))}return b};EditorUi.prototype.pasteXml=function(b,c,e,g){var d=this.editor.graph,f=null;d.lastPasteXml==b?d.pasteCounter++:(d.lastPasteXml=b,d.pasteCounter=0);var l=d.pasteCounter*d.gridSize;if(e||this.isCompatibleString(b))f=this.importXml(b,l,l),d.setSelectionCells(f);else if(c&&1==d.getSelectionCount()){l=d.getStartEditingCell(d.getSelectionCell(),
+g);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)&&"image"==d.getCurrentCellStyle(l)[mxConstants.STYLE_SHAPE])d.setCellStyles(mxConstants.STYLE_IMAGE,b,[l]);else{d.model.beginUpdate();try{d.labelChanged(l,b),Graph.isLink(b)&&d.setLinkForCell(l,b)}finally{d.model.endUpdate()}}d.setSelectionCell(l)}else f=d.getInsertPoint(),d.isMouseInsertPoint()&&(l=0,d.lastPasteXml==b&&0<d.pasteCounter&&d.pasteCounter--),f=this.insertTextAt(b,f.x+l,f.y+l,!0),d.setSelectionCells(f);d.isSelectionEmpty()||(d.scrollCellToVisible(d.getSelectionCell()),
+null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell())));return f};EditorUi.prototype.pasteCells=function(b,c,e,g){if(!mxEvent.isConsumed(b)){var d=c,f=!1;if(e&&null!=b.clipboardData&&b.clipboardData.getData){var l=b.clipboardData.getData("text/plain"),k=!1;if(null!=l&&0<l.length&&"%3CmxGraphModel%3E"==l.substring(0,18)){var m=decodeURIComponent(l);this.isCompatibleString(m)&&(k=!0,l=m)}k=k?null:b.clipboardData.getData("text/html");null!=k&&0<k.length?(d=this.parseHtmlData(k),
+f="text/plain"!=d.getAttribute("data-type")):null!=l&&0<l.length&&(d=document.createElement("div"),mxUtils.setTextContent(d,k))}l=d.getElementsByTagName("span");if(null!=l&&0<l.length&&"application/vnd.lucid.chart.objects"===l[0].getAttribute("data-lucid-type"))e=l[0].getAttribute("data-lucid-content"),null!=e&&0<e.length&&(this.convertLucidChart(e,mxUtils.bind(this,function(b){var d=this.editor.graph;d.lastPasteXml==b?d.pasteCounter++:(d.lastPasteXml=b,d.pasteCounter=0);var c=d.pasteCounter*d.gridSize;
+d.setSelectionCells(this.importXml(b,c,c));d.scrollCellToVisible(d.getSelectionCell())}),mxUtils.bind(this,function(b){this.handleError(b)})),mxEvent.consume(b));else{f=f?d.innerHTML:mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText);k=!1;try{var p=f.lastIndexOf("%3E");0<=p&&p<f.length-3&&(f=f.substring(0,p+3))}catch(C){}try{l=d.getElementsByTagName("span"),m=null!=l&&0<l.length?mxUtils.trim(decodeURIComponent(l[0].textContent)):decodeURIComponent(f),this.isCompatibleString(m)&&
+(k=!0,f=m)}catch(C){}try{if(null!=f&&0<f.length){this.pasteXml(f,g,k,b);try{mxEvent.consume(b)}catch(C){}}else if(!e){var t=this.editor.graph;t.lastPasteXml=null;t.pasteCounter=0}}catch(C){this.handleError(C)}}}c.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(b){if(Graph.fileSupport)for(var d=null,c=0;c<b.length;c++)mxEvent.addListener(b[c],"dragleave",function(b){null!=d&&(d.parentNode.removeChild(d),d=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(b[c],"dragover",
+mxUtils.bind(this,function(b){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==d&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(d=this.highlightElement());b.stopPropagation();b.preventDefault()})),mxEvent.addListener(b[c],"drop",mxUtils.bind(this,function(b){null!=d&&(d.parentNode.removeChild(d),d=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<b.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(b.dataTransfer.files,
+0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b)):this.openFiles(b.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(b);if(null==c){var e=null!=b.dataTransfer?b.dataTransfer:b.clipboardData;null!=e&&(10==document.documentMode||11==document.documentMode?c=e.getData("Text"):(c=null,c=0<=mxUtils.indexOf(e.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(e.types,"text/html")?e.getData("text/html"):null,null!=
+c&&0<c.length?(e=document.createElement("div"),e.innerHTML=this.editor.graph.sanitizeHtml(c),e=e.getElementsByTagName("img"),0<e.length&&(c=e[0].getAttribute("src"))):0<=mxUtils.indexOf(e.types,"text/plain")&&(c=e.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,
+function(b){200<=b.getStatus()&&299>=b.getStatus()&&this.openLocalFile(b.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}b.stopPropagation();b.preventDefault()}))};EditorUi.prototype.highlightElement=function(b){var d=0,c=0,e,g;if(null==b){g=document.body;
+var k=document.documentElement;e=(g.clientWidth||k.clientWidth)-3;g=Math.max(g.clientHeight||0,k.clientHeight)-3}else d=b.offsetTop,c=b.offsetLeft,e=b.clientWidth,g=b.clientHeight;k=document.createElement("div");k.style.zIndex=mxPopupMenu.prototype.zIndex+2;k.style.border="3px dotted rgb(254, 137, 12)";k.style.pointerEvents="none";k.style.position="absolute";k.style.top=d+"px";k.style.left=c+"px";k.style.width=Math.max(0,e-3)+"px";k.style.height=Math.max(0,g-3)+"px";null!=b&&b.parentNode==this.editor.graph.container?
+this.editor.graph.container.appendChild(k):document.body.appendChild(k);return k};EditorUi.prototype.stringToCells=function(b){b=mxUtils.parseXml(b);var d=this.editor.extractGraphModel(b.documentElement);b=[];if(null!=d){var c=new mxCodec(d.ownerDocument),e=new mxGraphModel;c.decode(d,e);d=e.getChildAt(e.getRoot(),0);for(c=0;c<e.getChildCount(d);c++)b.push(e.getChildAt(d,c))}return b};EditorUi.prototype.openFileHandle=function(b,c,e,g,k){if(null!=c&&0<c.length){!this.useCanvasForExport&&/(\.png)$/i.test(c)?
+c=c.substring(0,c.length-4)+".drawio":/(\.pdf)$/i.test(c)&&(c=c.substring(0,c.length-4)+".drawio");var d=mxUtils.bind(this,function(b){c=0<=c.lastIndexOf(".")?c.substring(0,c.lastIndexOf("."))+".drawio":c+".drawio";if("<mxlibrary"==b.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,g);try{this.loadLibrary(new LocalLibrary(this,b,c))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(b,
+c,g)});if(/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c))this.importVisio(e,mxUtils.bind(this,function(b){this.spinner.stop();d(b)}));else if(/(\.*<graphml )/.test(b))this.importGraphML(b,mxUtils.bind(this,function(b){this.spinner.stop();d(b)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,c))this.parseFile(e,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?d(b.responseText):this.handleError({message:mxResources.get(413==
+b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(b))/(\.json)$/i.test(c)&&(c=c.substring(0,c.length-5)+".drawio"),this.convertLucidChart(b,mxUtils.bind(this,function(b){this.spinner.stop();this.openLocalFile(b,c,g)}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}));else if("<mxlibrary"==b.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,
+this.defaultFilename,g);try{this.loadLibrary(new LocalLibrary(this,b,e.name))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else if(0==b.indexOf("PK"))this.importZipFile(e,mxUtils.bind(this,function(b){this.spinner.stop();d(b)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(b,c,g)}));else{if("image/png"==e.type.substring(0,9))b=this.extractGraphModelFromPng(b);else if("application/pdf"==e.type){var f=Editor.extractGraphModelFromPdf(b);null!=f&&(k=null,g=!0,
+b=f)}this.spinner.stop();this.openLocalFile(b,c,g,k,null!=k?e:null)}}};EditorUi.prototype.openFiles=function(b,c){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=0;d<b.length;d++)mxUtils.bind(this,function(b){var d=new FileReader;d.onload=mxUtils.bind(this,function(d){try{this.openFileHandle(d.target.result,b.name,b,c)}catch(u){this.handleError(u)}});d.onerror=mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b);window.openFile=null});"image"!==b.type.substring(0,
+5)&&"application/pdf"!==b.type||"image/svg"===b.type.substring(0,9)?d.readAsText(b):d.readAsDataURL(b)})(b[d])};EditorUi.prototype.openLocalFile=function(b,c,e,g,k){var d=this.getCurrentFile(),f=mxUtils.bind(this,function(){window.openFile=null;if(null==c&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(b);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,b,c||this.defaultFilename,e,g,k))});if(null!=
+b&&0<b.length)null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=g)?f():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=g)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b,c),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),
+null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):f()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var b={};if(null!=this.pages)for(var c=0;c<this.pages.length;c++)this.updatePageRoot(this.pages[c]),this.addBasenamesForCell(this.pages[c].root,b);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),b);var c=[],e;for(e in b)c.push(e);return c};EditorUi.prototype.addBasenamesForCell=function(b,c){function d(b){if(null!=
+b){var d=b.lastIndexOf(".");0<d&&(b=b.substring(d+1,b.length));null==c[b]&&(c[b]=!0)}}var e=this.editor.graph,f=e.getCellStyle(b);d(mxStencilRegistry.getBasenameForStencil(f[mxConstants.STYLE_SHAPE]));e.model.isEdge(b)&&(d(mxMarker.getPackageForType(f[mxConstants.STYLE_STARTARROW])),d(mxMarker.getPackageForType(f[mxConstants.STYLE_ENDARROW])));for(var f=e.model.getChildCount(b),g=0;g<f;g++)this.addBasenamesForCell(e.model.getChildAt(b,g),c)};EditorUi.prototype.setGraphEnabled=function(b){this.diagramContainer.style.visibility=
+b?"":"hidden";this.formatContainer.style.visibility=b?"":"hidden";this.sidebarFooterContainer.style.display=b?"":"none";this.sidebarContainer.style.display=b?"":"none";this.hsplit.style.display=b?"":"none";this.editor.graph.setEnabled(b);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=b?"":"hidden",this.ruler.vRuler.container.style.visibility=b?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=b?"":"hidden");b||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),
+null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&
+this.installMessageHandler(mxUtils.bind(this,function(b,c,e,g){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);if(null==b||0==b.length)b=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,b,{}));this.mode=App.MODE_EMBED;this.setFileData(b);if(g)try{var d=this.editor.graph;d.setGridEnabled(!1);d.pageVisible=!1;var f=d.model.cells,k;for(k in f){var l=f[k];null!=l&&null!=l.style&&(l.style+=";sketch=1;"+(-1==l.style.indexOf("fontFamily=")||-1<l.style.indexOf("fontFamily=Helvetica;")?
+"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(y){console.log(y)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=e?e:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=
+function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(b,c){null!=b?b.getPublicUrl(c):c(null)};EditorUi.prototype.createLoadMessage=function(b){var d=this.editor.graph;return{event:b,pageVisible:d.pageVisible,translate:d.view.translate,bounds:d.getGraphBounds(),currentPage:this.getSelectedPageIndex(),
+scale:d.view.scale,page:d.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(b){var d=null,c=!1,e=!1,g=null,k=mxUtils.bind(this,function(b,d){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,k);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||
+window.parent)){var k=f.data,l=mxUtils.bind(this,function(b){if(null!=b&&"function"===typeof b.charAt&&"<"!=b.charAt(0))try{"data:image/png;base64,"==b.substring(0,22)?b=this.extractGraphModelFromPng(b):"data:image/svg+xml;base64,"==b.substring(0,26)?b=atob(b.substring(26)):"data:image/svg+xml;utf8,"==b.substring(0,24)&&(b=b.substring(24)),null!=b&&("%"==b.charAt(0)?b=decodeURIComponent(b):"<"!=b.charAt(0)&&(b=Graph.decompress(b)))}catch(ra){}return b});if("json"==urlParams.proto){var m=!1;try{k=
+JSON.parse(k)}catch(Q){k=null}try{if(null==k)return;if("dialog"==k.action){this.showError(null!=k.titleKey?mxResources.get(k.titleKey):k.title,null!=k.messageKey?mxResources.get(k.messageKey):k.message,null!=k.buttonKey?mxResources.get(k.buttonKey):k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("layout"==k.action){this.executeLayoutList(k.layouts);return}if("prompt"==k.action){this.spinner.stop();var n=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?mxResources.get(k.okKey):
+k.ok,function(b){null!=b?p.postMessage(JSON.stringify({event:"prompt",value:b,message:k}),"*"):p.postMessage(JSON.stringify({event:"prompt-cancel",message:k}),"*")},null!=k.titleKey?mxResources.get(k.titleKey):k.title);this.showDialog(n.container,300,80,!0,!1);n.init();return}if("draft"==k.action){var q=l(k.xml);this.spinner.stop();n=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();p.postMessage(JSON.stringify({event:"draft",
+result:"edit",message:k}),"*")}),mxUtils.bind(this,function(){this.hideDialog();p.postMessage(JSON.stringify({event:"draft",result:"discard",message:k}),"*")}),k.editKey?mxResources.get(k.editKey):null,k.discardKey?mxResources.get(k.discardKey):null,k.ignore?mxUtils.bind(this,function(){this.hideDialog();p.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),"*")}):null);this.showDialog(n.container,640,480,!0,!1,mxUtils.bind(this,function(b){b&&this.actions.get("exit").funct()}));
+try{n.init()}catch(Q){p.postMessage(JSON.stringify({event:"draft",error:Q.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();var t=1==k.enableRecent,u=1==k.enableSearch,v=1==k.enableCustomTemp;if("1"==urlParams.newTempDlg&&!k.templatesOnly&&null!=k.callback){var B=this.getCurrentUser(),y=new TemplatesDialog(this,function(b,d,c){b=b||this.emptyDiagramXml;p.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d,tempUrl:c.url,libs:c.libs,
+builtIn:null!=c.info&&null!=c.info.custContentId,message:k}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=B?B.id:null,t?mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getRecentDiagrams",[c],null,b,d)}):null,u?mxUtils.bind(this,function(b,d,c,e){this.remoteInvoke("searchDiagrams",[b,e],null,d,c)}):null,mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getFileContent",[b.url],null,d,c)}),null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",
+null,null,b,function(){b({},0)})}):null,!1,!1,!0,!0);this.showDialog(y.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}n=new NewDialog(this,!1,k.templatesOnly?!1:null!=k.callback,mxUtils.bind(this,function(d,c,e,g){d=d||this.emptyDiagramXml;null!=k.callback?p.postMessage(JSON.stringify({event:"template",xml:d,blank:d==this.emptyDiagramXml,name:c,tempUrl:e,libs:g,builtIn:!0,message:k}),"*"):(b(d,f,d!=this.emptyDiagramXml,k.toSketch),this.editor.modified||this.editor.setStatus(""))}),
+null,null,null,null,null,null,null,t?mxUtils.bind(this,function(b){this.remoteInvoke("getRecentDiagrams",[null],null,b,function(){b(null,"Network Error!")})}):null,u?mxUtils.bind(this,function(b,d){this.remoteInvoke("searchDiagrams",[b,null],null,d,function(){d(null,"Network Error!")})}):null,mxUtils.bind(this,function(b,d,c){p.postMessage(JSON.stringify({event:"template",docUrl:b,info:d,name:c}),"*")}),null,null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},
+0)})}):null,1==k.withoutType);this.showDialog(n.container,620,460,!0,!1,mxUtils.bind(this,function(b){this.sidebar.hideTooltip();b&&this.actions.get("exit").funct()}));n.init();return}if("textContent"==k.action){var P=this.getDiagramTextContent();p.postMessage(JSON.stringify({event:"textContent",data:P,message:k}),"*");return}if("status"==k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));
+null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var T=null!=k.messageKey?mxResources.get(k.messageKey):k.message;null==k.show||k.show?this.spinner.spin(document.body,T):this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var N=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var R=this.editor.graph,
+G=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();var d=this.createLoadMessage("export");d.format=k.format;d.message=k;d.data=b;d.xml=N;p.postMessage(JSON.stringify(d),"*")}),D=mxUtils.bind(this,function(b){null==b&&(b=Editor.blankImage);"xmlpng"==k.format&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(N)));R!=this.editor.graph&&R.container.parentNode.removeChild(R.container);G(b)}),A=k.pageId||(null!=this.pages?k.currentPage?this.currentPage.getId():
+this.pages[0].getId():null);if(this.isExportToCanvas()){null!=k.xml&&0<k.xml.length&&(c=!0,this.setFileData(N),c=!1);if(null!=this.pages&&this.currentPage.getId()!=A){for(var da=R.getGlobalVariable,R=this.createTemporaryGraph(R.getStylesheet()),K,S=0;S<this.pages.length;S++)if(this.pages[S].getId()==A){K=this.updatePageRoot(this.pages[S]);break}null==K&&(K=this.currentPage);R.getGlobalVariable=function(b){return"page"==b?K.getName():"pagenumber"==b?1:da.apply(this,arguments)};document.body.appendChild(R.container);
+R.model.setRoot(K.root)}if(null!=k.layerIds){for(var aa=R.model,ma=aa.getChildCells(aa.getRoot()),n={},S=0;S<k.layerIds.length;S++)n[k.layerIds[S]]=!0;for(S=0;S<ma.length;S++)aa.setVisible(ma[S],n[ma[S].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(b){D(b.toDataURL("image/png"))}),k.width,null,k.background,mxUtils.bind(this,function(){D(null)}),null,null,k.scale,k.transparent,k.shadow,null,R,k.border,null,k.grid,k.keepTheme)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+
+("xmlpng"==k.format?"1":"0")+(null!=A?"&pageId="+A:"")+(null!=k.layerIds&&0<k.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(N))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?G("data:image/png;base64,"+b.getText()):D(null)}),mxUtils.bind(this,function(){D(null)}))}}else{null!=k.xml&&0<k.xml.length&&(c=!0,this.setFileData(k.xml),c=!1);T=this.createLoadMessage("export");
+T.message=k;if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ga=this.getXmlFileData();T.xml=mxUtils.getXml(ga);T.data=this.getFileData(null,null,!0,null,null,null,ga);T.format=k.format}else if("html"==k.format)N=this.editor.getGraphXml(),T.data=this.getHtml(N,this.editor.graph),T.xml=mxUtils.getXml(N),T.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;var ia=null!=k.background?k.background:this.editor.graph.background;ia==mxConstants.NONE&&
+(ia=null);T.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);T.format="svg";var la=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();T.data=Editor.createSvgDataUri(b);p.postMessage(JSON.stringify(T),"*")});if("xmlsvg"==k.format)(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))&&this.getEmbeddedSvg(T.xml,this.editor.graph,null,!0,la,null,null,k.embedImages,ia,k.scale,k.border,k.shadow,
+k.keepTheme);else if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){this.editor.graph.setEnabled(!1);var W=this.editor.graph.getSvg(ia,k.scale,k.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||k.shadow,null,k.keepTheme);(this.editor.graph.shadowVisible||k.shadow)&&this.editor.graph.addSvgShadow(W);this.embedFonts(W,mxUtils.bind(this,function(b){k.embedImages||null==k.embedImages?this.editor.convertImages(b,mxUtils.bind(this,
+function(b){la(mxUtils.getXml(b))})):la(mxUtils.getXml(b))}))}return}p.postMessage(JSON.stringify(T),"*")}return}if("load"==k.action){m=k.toSketch;e=1==k.autosave;this.hideDialog();null!=k.modified&&null==urlParams.modified&&(urlParams.modified=k.modified);null!=k.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=k.saveAndExit);null!=k.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=k.noSaveBtn);null!=k.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=k.noExitBtn);
+null!=k.title&&null!=this.buttonContainer&&(q=document.createElement("span"),mxUtils.write(q,k.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="1"==urlParams.noLangIcon?"0":"25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(q),
+this.embedFilenameSpan=q);try{k.libs&&this.sidebar.showEntries(k.libs)}catch(Q){}k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):null!=k.descriptor?k.descriptor:k.xml}else{if("merge"==k.action){var fa=this.getCurrentFile();null!=fa&&(q=l(k.xml),null!=q&&""!=q&&fa.mergeFile(new LocalFile(this,q),function(){p.postMessage(JSON.stringify({event:"merge",message:k}),"*")},function(b){p.postMessage(JSON.stringify({event:"merge",message:k,error:b}),"*")}))}else"remoteInvokeReady"==k.action?this.handleRemoteInvokeReady(p):
+"remoteInvoke"==k.action?this.handleRemoteInvoke(k,f.origin):"remoteInvokeResponse"==k.action?this.handleRemoteInvokeResponse(k):p.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}catch(Q){this.handleError(Q)}}var na=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),V=mxUtils.bind(this,function(f,k){c=!0;try{b(f,k,null,m)}catch(ea){this.handleError(ea)}c=
+!1;null!=urlParams.modified&&this.editor.setStatus("");g=na();e&&null==d&&(d=mxUtils.bind(this,function(b,d){var e=na();if(e!=g&&!c){var f=this.createLoadMessage("autosave");f.xml=e;(window.opener||window.parent).postMessage(JSON.stringify(f),"*")}g=e}),this.editor.graph.model.addListener(mxEvent.CHANGE,d),this.editor.graph.addListener("gridSizeChanged",d),this.editor.graph.addListener("shadowVisibleChanged",d),this.addListener("pageFormatChanged",d),this.addListener("pageScaleChanged",d),this.addListener("backgroundColorChanged",
+d),this.addListener("backgroundImageChanged",d),this.addListener("foldingEnabledChanged",d),this.addListener("mathEnabledChanged",d),this.addListener("gridEnabledChanged",d),this.addListener("guidesEnabledChanged",d),this.addListener("pageViewChanged",d));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var l=this.createLoadMessage("load");l.xml=f;p.postMessage(JSON.stringify(l),"*")}});null!=k&&"function"===typeof k.substring&&"data:application/vnd.visio;base64,"==k.substring(0,34)?(l="0M8R4KGxGuE"==
+k.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(k.substring(k.indexOf(",")+1)),function(b){V(b,f)},mxUtils.bind(this,function(b){this.handleError(b)}),l)):null!=k&&"function"===typeof k.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(k,"")?this.parseFile(new Blob([k],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&"<mxGraphModel"==b.responseText.substring(0,13)&&V(b.responseText,
+f)}),""):null!=k&&"function"===typeof k.substring&&this.isLucidChartData(k)?this.convertLucidChart(k,mxUtils.bind(this,function(b){V(b)}),mxUtils.bind(this,function(b){this.handleError(b)})):null==k||"object"!==typeof k||null==k.format||null==k.data&&null==k.url?(k=l(k),V(k,f)):this.loadDescriptor(k,mxUtils.bind(this,function(b){V(na(),f)}),mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"))}))}}));var p=window.opener||window.parent,k="json"==urlParams.proto?JSON.stringify({event:"init"}):
+urlParams.ready||"ready";p.postMessage(k,"*");if("json"==urlParams.proto){var t=this.editor.graph.openLink;this.editor.graph.openLink=function(b,d,c){t.apply(this,arguments);p.postMessage(JSON.stringify({event:"openLink",href:b,target:d,allowOpener:c}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var b=document.createElement("div");b.style.display="inline-block";b.style.position="absolute";b.style.paddingTop="atlas"==uiTheme?"2px":"0px";b.style.paddingLeft="8px";b.style.paddingBottom=
+"2px";var c=document.createElement("button");c.className="geBigButton";var e=c;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var g="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,g);c.setAttribute("title",g);mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));b.appendChild(c)}}else mxUtils.write(c,mxResources.get("save")),c.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+
+"+S)"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),b.appendChild(c),"1"==urlParams.saveAndExit&&(c=document.createElement("a"),mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),b.appendChild(c),e=c);"1"!=urlParams.noExitBtn&&
+(c=document.createElement("a"),e="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(c,e),c.setAttribute("title",e),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),b.appendChild(c),e=c);e.style.marginRight="20px";this.toolbar.container.appendChild(b);this.toolbar.staticElements.push(b);b.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=
+function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(b){this.importCsv(b)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(b,c){for(var d=this.editor.graph,
+e=d.getSelectionCells(),f=0;f<b.length;f++){var g=new window[b[f].layout](d);if(null!=b[f].config)for(var k in b[f].config)g[k]=b[f].config[k];this.executeLayout(function(){g.execute(d.getDefaultParent(),0==e.length?null:e)},f==b.length-1,c)}};EditorUi.prototype.importCsv=function(b,c){try{var d=b.split("\n"),e=[],f=[],g={};if(0<d.length){var k={},p=null,t=null,x=null,E=null,C=null,F=null,I=null,L=null,H=null,J="",B="auto",M="auto",P=null,T=null,N=40,R=40,G=100,D=0,A=this.editor.graph;A.getGraphBounds();
+for(var da=function(){null!=c?c(ba):(A.setSelectionCells(ba),A.scrollCellToVisible(A.getSelectionCell()))},K=A.getFreeInsertPoint(),S=K.x,aa=K.y,K=aa,ma=null,ga="auto",H=null,ia=[],la=null,W=null,fa=0;fa<d.length&&"#"==d[fa].charAt(0);){b=d[fa];for(fa++;fa<d.length&&"\\"==b.charAt(b.length-1)&&"#"==d[fa].charAt(0);)b=b.substring(0,b.length-1)+mxUtils.trim(d[fa].substring(1)),fa++;if("#"!=b.charAt(1)){var na=b.indexOf(":");if(0<na){var V=mxUtils.trim(b.substring(1,na)),Q=mxUtils.trim(b.substring(na+
+1));"label"==V?ma=A.sanitizeHtml(Q):"labelname"==V&&0<Q.length&&"-"!=Q?C=Q:"labels"==V&&0<Q.length&&"-"!=Q?F=JSON.parse(Q):"style"==V?t=Q:"parentstyle"==V?I=Q:"stylename"==V&&0<Q.length&&"-"!=Q?E=Q:"styles"==V&&0<Q.length&&"-"!=Q?x=JSON.parse(Q):"vars"==V&&0<Q.length&&"-"!=Q?p=JSON.parse(Q):"identity"==V&&0<Q.length&&"-"!=Q?L=Q:"parent"==V&&0<Q.length&&"-"!=Q?H=Q:"namespace"==V&&0<Q.length&&"-"!=Q?J=Q:"width"==V?B=Q:"height"==V?M=Q:"left"==V&&0<Q.length?P=Q:"top"==V&&0<Q.length?T=Q:"ignore"==V?W=
+Q.split(","):"connect"==V?ia.push(JSON.parse(Q)):"link"==V?la=Q:"padding"==V?D=parseFloat(Q):"edgespacing"==V?N=parseFloat(Q):"nodespacing"==V?R=parseFloat(Q):"levelspacing"==V?G=parseFloat(Q):"layout"==V&&(ga=Q)}}}if(null==d[fa])throw Error(mxResources.get("invalidOrMissingFile"));for(var ra=this.editor.csvToArray(d[fa]),V=na=null,Q=[],X=0;X<ra.length;X++)L==ra[X]&&(na=X),H==ra[X]&&(V=X),Q.push(mxUtils.trim(ra[X]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ma&&(ma="%"+
+Q[0]+"%");if(null!=ia)for(var ea=0;ea<ia.length;ea++)null==k[ia[ea].to]&&(k[ia[ea].to]={});L=[];for(X=fa+1;X<d.length;X++){var ja=this.editor.csvToArray(d[X]);if(null==ja){var sa=40<d[X].length?d[X].substring(0,40)+"...":d[X];throw Error(sa+" ("+X+"):\n"+mxResources.get("containsValidationErrors"));}0<ja.length&&L.push(ja)}A.model.beginUpdate();try{for(X=0;X<L.length;X++){var ja=L[X],U=null,ka=null!=na?J+ja[na]:null;null!=ka&&(U=A.model.getCell(ka));var d=null!=U,Z=new mxCell(ma,new mxGeometry(S,
+K,0,0),t||"whiteSpace=wrap;html=1;");Z.vertex=!0;Z.id=ka;for(var qa=0;qa<ja.length;qa++)A.setAttributeForCell(Z,Q[qa],ja[qa]);if(null!=C&&null!=F){var ta=F[Z.getAttribute(C)];null!=ta&&A.labelChanged(Z,ta)}if(null!=E&&null!=x){var ca=x[Z.getAttribute(E)];null!=ca&&(Z.style=ca)}A.setAttributeForCell(Z,"placeholders","1");Z.style=A.replacePlaceholders(Z,Z.style,p);d&&(A.model.setGeometry(U,Z.geometry),A.model.setStyle(U,Z.style),0>mxUtils.indexOf(f,U)&&f.push(U));U=Z;if(!d)for(ea=0;ea<ia.length;ea++)k[ia[ea].to][U.getAttribute(ia[ea].to)]=
+U;null!=la&&"link"!=la&&(A.setLinkForCell(U,U.getAttribute(la)),A.setAttributeForCell(U,la,null));A.fireEvent(new mxEventObject("cellsInserted","cells",[U]));var O=this.editor.graph.getPreferredSizeForCell(U);U.vertex&&(null!=P&&null!=U.getAttribute(P)&&(U.geometry.x=S+parseFloat(U.getAttribute(P))),null!=T&&null!=U.getAttribute(T)&&(U.geometry.y=aa+parseFloat(U.getAttribute(T))),"@"==B.charAt(0)&&null!=U.getAttribute(B.substring(1))?U.geometry.width=parseFloat(U.getAttribute(B.substring(1))):U.geometry.width=
+"auto"==B?O.width+D:parseFloat(B),"@"==M.charAt(0)&&null!=U.getAttribute(M.substring(1))?U.geometry.height=parseFloat(U.getAttribute(M.substring(1))):U.geometry.height="auto"==M?O.height+D:parseFloat(M),K+=U.geometry.height+R);d?(null==g[ka]&&(g[ka]=[]),g[ka].push(U)):(H=null!=V?A.model.getCell(J+ja[V]):null,e.push(U),null!=H?(H.style=A.replacePlaceholders(H,I,p),A.addCell(U,H)):f.push(A.addCell(U)))}for(var ua=f.slice(),ba=f.slice(),ea=0;ea<ia.length;ea++)for(var ya=ia[ea],X=0;X<e.length;X++){var U=
+e[X],va=mxUtils.bind(this,function(b,d,c){var e=d.getAttribute(c.from);if(null!=e&&(A.setAttributeForCell(d,c.from,null),""!=e))for(var e=e.split(","),f=0;f<e.length;f++){var g=k[c.to][e[f]];if(null!=g){var l=c.label;null!=c.fromlabel&&(l=(d.getAttribute(c.fromlabel)||"")+(l||""));null!=c.sourcelabel&&(l=A.replacePlaceholders(d,c.sourcelabel,p)+(l||""));null!=c.tolabel&&(l=(l||"")+(g.getAttribute(c.tolabel)||""));null!=c.targetlabel&&(l=(l||"")+A.replacePlaceholders(g,c.targetlabel,p));var m="target"==
+c.placeholders==!c.invert?g:b,m=null!=c.style?A.replacePlaceholders(m,c.style,p):A.createCurrentEdgeStyle(),l=A.insertEdge(null,null,l||"",c.invert?g:b,c.invert?b:g,m);if(null!=c.labels)for(m=0;m<c.labels.length;m++){var n=c.labels[m],q=new mxCell(n.label||m,new mxGeometry(null!=n.x?n.x:0,null!=n.y?n.y:0,0,0),"resizable=0;html=1;");q.vertex=!0;q.connectable=!1;q.geometry.relative=!0;null!=n.placeholders&&(q.value=A.replacePlaceholders("target"==n.placeholders==!c.invert?g:b,q.value,p));if(null!=n.dx||
+null!=n.dy)q.geometry.offset=new mxPoint(null!=n.dx?n.dx:0,null!=n.dy?n.dy:0);l.insert(q)}ba.push(l);mxUtils.remove(c.invert?b:g,ua)}}});va(U,U,ya);if(null!=g[U.id])for(qa=0;qa<g[U.id].length;qa++)va(U,g[U.id][qa],ya)}if(null!=W)for(X=0;X<e.length;X++)for(U=e[X],qa=0;qa<W.length;qa++)A.setAttributeForCell(U,mxUtils.trim(W[qa]),null);if(0<f.length){var za=new mxParallelEdgeLayout(A);za.spacing=N;za.checkOverlap=!0;var Fa=function(){0<za.spacing&&za.execute(A.getDefaultParent());for(var b=0;b<f.length;b++){var d=
+A.getCellGeometry(f[b]);d.x=Math.round(A.snap(d.x));d.y=Math.round(A.snap(d.y));"auto"==B&&(d.width=Math.round(A.snap(d.width)));"auto"==M&&(d.height=Math.round(A.snap(d.height)))}};if("["==ga.charAt(0)){var Ja=da;A.view.validate();this.executeLayoutList(JSON.parse(ga),function(){Fa();Ja()});da=null}else if("circle"==ga){var Ca=new mxCircleLayout(A);Ca.disableEdgeStyle=!1;Ca.resetEdges=!1;var Ia=Ca.isVertexIgnored;Ca.isVertexIgnored=function(b){return Ia.apply(this,arguments)||0>mxUtils.indexOf(f,
+b)};this.executeLayout(function(){Ca.execute(A.getDefaultParent());Fa()},!0,da);da=null}else if("horizontaltree"==ga||"verticaltree"==ga||"auto"==ga&&ba.length==2*f.length-1&&1==ua.length){A.view.validate();var xa=new mxCompactTreeLayout(A,"horizontaltree"==ga);xa.levelDistance=R;xa.edgeRouting=!1;xa.resetEdges=!1;this.executeLayout(function(){xa.execute(A.getDefaultParent(),0<ua.length?ua[0]:null)},!0,da);da=null}else if("horizontalflow"==ga||"verticalflow"==ga||"auto"==ga&&1==ua.length){A.view.validate();
+var Aa=new mxHierarchicalLayout(A,"horizontalflow"==ga?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Aa.intraCellSpacing=R;Aa.parallelEdgeSpacing=N;Aa.interRankCellSpacing=G;Aa.disableEdgeStyle=!1;this.executeLayout(function(){Aa.execute(A.getDefaultParent(),ba);A.moveCells(ba,S,aa)},!0,da);da=null}else if("organic"==ga||"auto"==ga&&ba.length>f.length){A.view.validate();var wa=new mxFastOrganicLayout(A);wa.forceConstant=3*R;wa.disableEdgeStyle=!1;wa.resetEdges=!1;var Ba=wa.isVertexIgnored;
+wa.isVertexIgnored=function(b){return Ba.apply(this,arguments)||0>mxUtils.indexOf(f,b)};this.executeLayout(function(){wa.execute(A.getDefaultParent());Fa()},!0,da);da=null}}this.hideDialog()}finally{A.model.endUpdate()}null!=da&&da()}}catch(Y){this.handleError(Y)}};EditorUi.prototype.getSearch=function(b){var d="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=b&&0<window.location.search.length){var c="?",e;for(e in urlParams)0>mxUtils.indexOf(b,e)&&null!=urlParams[e]&&(d+=c+e+"="+urlParams[e],
+c="&")}else d=window.location.search;return d};EditorUi.prototype.getUrl=function(b){b=null!=b?b:window.location.pathname;var d=0<b.indexOf("?")?1:0;if("1"==urlParams.offline)b+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),e;for(e in urlParams)0>mxUtils.indexOf(c,e)&&(b=0==d?b+"?":b+"&",null!=urlParams[e]&&(b+=e+"="+urlParams[e],d++))}return b};EditorUi.prototype.showLinkDialog=function(b,c,e,g,k){b=new LinkDialog(this,
+b,c,e,!0,g,k);this.showDialog(b.container,560,130,!0,!0);b.init()};EditorUi.prototype.getServiceCount=function(b){var d=1;null==this.drive&&"function"!==typeof window.DriveClient||d++;null==this.dropbox&&"function"!==typeof window.DropboxClient||d++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||d++;null!=this.gitHub&&d++;null!=this.gitLab&&d++;null!=this.notion&&d++;b&&isLocalStorage&&"1"==urlParams.browser&&d++;return d};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();
+this.updateActionStates();var b=this.getCurrentFile(),c=null!=b||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(c);this.menus.get("viewZoom").setEnabled(c);var e=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==b||b.isRestricted());this.actions.get("makeCopy").setEnabled(!e);this.actions.get("print").setEnabled(!e);this.menus.get("exportAs").setEnabled(!e);this.menus.get("embed").setEnabled(!e);e="1"!=urlParams.embed||this.editor.graph.isEnabled();
+this.menus.get("extras").setEnabled(e);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(e),this.menus.get("newLibrary").setEnabled(e));b="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=b&&b.isEditable();this.actions.get("image").setEnabled(c);this.actions.get("zoomIn").setEnabled(c);this.actions.get("zoomOut").setEnabled(c);this.actions.get("resetView").setEnabled(c);this.actions.get("undo").setEnabled(this.canUndo()&&b);this.actions.get("redo").setEnabled(this.canRedo()&&
+b);this.menus.get("edit").setEnabled(c);this.menus.get("view").setEnabled(c);this.menus.get("importFrom").setEnabled(b);this.menus.get("arrange").setEnabled(b);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(b),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(b));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=
+function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var b=this.getCurrentFile();return null!=b&&b.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);var b=this.editor.graph,c=this.getCurrentFile(),e=this.isDiagramActive(),g=b.getEditableCells(b.getSelectionCells());this.actions.get("pageSetup").setEnabled(e);this.actions.get("autosave").setEnabled(null!=
+c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(e);this.actions.get("editData").setEnabled(0<g.length||b.isSelectionEmpty());this.actions.get("shadowVisible").setEnabled(e);this.actions.get("connectionArrows").setEnabled(e);this.actions.get("connectionPoints").setEnabled(e);this.actions.get("copyStyle").setEnabled(e&&!b.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(e&&0<g.length);this.actions.get("editGeometry").setEnabled(0<g.length&&b.getModel().isVertex(g[0]));
+this.actions.get("createShape").setEnabled(e);this.actions.get("createRevision").setEnabled(e);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(e&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);
+this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());c=this.actions.get("findReplace");c.setEnabled("hidden"!=this.diagramContainer.style.visibility);c.label=mxResources.get("find")+(b.isEnabled()?"/"+mxResources.get("replace"):"")+"...";b=b.view.getState(b.getSelectionCell());
+this.actions.get("editShape").setEnabled(e&&null!=b&&null!=b.shape&&null!=b.shape.stencil)};var t=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);t.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(b,c,e,g,k,p,t,v){var d=b.editor.graph;if("xml"==e)b.hideDialog(),b.saveData(c,"xml",
+mxUtils.getXml(b.editor.getGraphXml()),"text/xml");else if("svg"==e)b.hideDialog(),b.saveData(c,"svg",mxUtils.getXml(d.getSvg(g,k,p)),"image/svg+xml");else{var f=b.getFileData(!0,null,null,null,null,!0),l=d.getGraphBounds(),m=Math.floor(l.width*k/d.view.scale),n=Math.floor(l.height*k/d.view.scale);if(f.length<=MAX_REQUEST_SIZE&&m*n<MAX_AREA)if(b.hideDialog(),"png"!=e&&"jpg"!=e&&"jpeg"!=e||!b.isExportToCanvas()){var q={globalVars:d.getExportVariables()};v&&(q.grid={size:d.gridSize,steps:d.view.gridSteps,
+color:d.view.gridColor});b.saveRequest(c,e,function(b,d){return new mxXmlRequest(EXPORT_URL,"format="+e+"&base64="+(d||"0")+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<t?"&dpi="+t:"")+"&bg="+(null!=g?g:"none")+"&w="+m+"&h="+n+"&border="+p+"&xml="+encodeURIComponent(f))})}else"png"==e?b.exportImage(k,null==g||"none"==g,!0,!1,!1,p,!0,!1,null,v,t):b.exportImage(k,!1,!0,!1,!1,p,!0,!1,"jpeg",v);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});
+EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var b=this.editor.graph,c="";if(null!=this.pages)for(var e=0;e<this.pages.length;e++){var g=b;this.currentPage!=this.pages[e]&&(g=this.createTemporaryGraph(b.getStylesheet()),this.updatePageRoot(this.pages[e]),g.model.setRoot(this.pages[e].root));c+=this.pages[e].getName()+" "+g.getIndexableText()+" "}else c=b.getIndexableText();this.editor.graph.setEnabled(!0);return c};EditorUi.prototype.showRemotelyStoredLibrary=
+function(b){var d={},c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxUtils.htmlEntities(b));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var g=document.createElement("div");g.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";g.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var k={};try{var p=mxSettings.getCustomLibraries();
+for(b=0;b<p.length;b++){var t=p[b];if("R"==t.substring(0,1)){var y=JSON.parse(decodeURIComponent(t.substring(1)));k[y[0]]={id:y[0],title:y[1],downloadUrl:y[2]}}}}catch(x){}this.remoteInvoke("getCustomLibraries",null,null,function(b){g.innerHTML="";if(0==b.length)g.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<b.length;c++){var e=b[c];k[e.id]&&(d[e.id]=e);var f=this.addCheckbox(g,e.title,k[e.id]);
+(function(b,c){mxEvent.addListener(c,"change",function(){this.checked?d[b.id]=b:delete d[b.id]})})(e,f)}},mxUtils.bind(this,function(b){g.innerHTML="";var d=document.createElement("div");d.style.padding="8px";d.style.textAlign="center";mxUtils.write(d,mxResources.get("error")+": ");mxUtils.write(d,null!=b&&null!=b.message?b.message:mxResources.get("unknownError"));g.appendChild(d)}));c.appendChild(g);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));
+var b=0,c;for(c in d)null==k[c]&&(b++,mxUtils.bind(this,function(d){this.remoteInvoke("getFileContent",[d.downloadUrl],null,mxUtils.bind(this,function(c){b--;0==b&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,d))}catch(I){this.handleError(I,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){b--;0==b&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(d[c]));for(c in k)d[c]||this.closeLibrary(new RemoteLibrary(this,null,k[c]));
+0==b&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(c.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];
+EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(b){this.remoteWin=b;for(var d=0;d<this.remoteInvokeQueue.length;d++)b.postMessage(this.remoteInvokeQueue[d],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(b){var d=b.msgMarkers,c=this.remoteInvokeCallbacks[d.callbackId];if(null==c)throw Error("No callback for "+(null!=d?d.callbackId:"null"));b.error?c.error&&c.error(b.error.errResp):c.callback&&c.callback.apply(this,
+b.resp);this.remoteInvokeCallbacks[d.callbackId]=null};EditorUi.prototype.remoteInvoke=function(b,c,e,g,k){var d=!0,f=window.setTimeout(mxUtils.bind(this,function(){d=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),l=mxUtils.bind(this,function(){window.clearTimeout(f);d&&g.apply(this,arguments)}),m=mxUtils.bind(this,function(){window.clearTimeout(f);d&&k.apply(this,arguments)});e=e||{};e.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:l,
+error:m});b=JSON.stringify({event:"remoteInvoke",funtionName:b,functionArgs:c,msgMarkers:e});null!=this.remoteWin?this.remoteWin.postMessage(b,"*"):this.remoteInvokeQueue.push(b)};EditorUi.prototype.handleRemoteInvoke=function(b,c){var d=mxUtils.bind(this,function(d,c){var e={event:"remoteInvokeResponse",msgMarkers:b.msgMarkers};null!=c?e.error={errResp:c}:null!=d&&(e.resp=d);this.remoteWin.postMessage(JSON.stringify(e),"*")});try{var e=b.funtionName,f=this.remoteInvokableFns[e];if(null!=f&&"function"===
+typeof this[e]){if(f.allowedDomains){for(var g=!1,k=0;k<f.allowedDomains.length;k++)if(c=="https://"+f.allowedDomains[k]){g=!0;break}if(!g){d(null,"Invalid Call: "+e+" is not allowed.");return}}var p=b.functionArgs;Array.isArray(p)||(p=[]);if(f.isAsync)p.push(function(){d(Array.prototype.slice.apply(arguments))}),p.push(function(b){d(null,b||"Unkown Error")}),this[e].apply(this,p);else{var t=this[e].apply(this,p);d([t])}}else d(null,"Invalid Call: "+e+" is not found.")}catch(x){d(null,"Invalid Call: An error occurred, "+
+x.message)}};EditorUi.prototype.openDatabase=function(b,c){if(null==this.database){var d=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=d)try{var e=d.open("database",2);e.onupgradeneeded=function(b){try{var d=e.result;1>b.oldVersion&&d.createObjectStore("objects",{keyPath:"key"});2>b.oldVersion&&(d.createObjectStore("files",{keyPath:"title"}),d.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(u){null!=c&&c(u)}};e.onsuccess=
+mxUtils.bind(this,function(d){var c=e.result;this.database=c;EditorUi.migrateStorageFiles&&(StorageFile.migrate(c),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(b){if(!b||"1"==urlParams.forceMigration){var c=document.createElement("iframe");c.style.display="none";c.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);
+document.body.appendChild(c);var d=!0,e=!1,f,g=0,k=mxUtils.bind(this,function(){e=!0;this.setDatabaseItem(".drawioMigrated3",!0);c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),l=mxUtils.bind(this,function(){g++;m()}),m=mxUtils.bind(this,function(){try{if(g>=f.length)k();else{var b=f[g];StorageFile.getFileContent(this,b,mxUtils.bind(this,function(d){null==d||".scratchpad"==b&&d==this.emptyLibraryXml?c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
+funtionName:"getLocalStorageFile",functionArgs:[b]}),"*"):l()}),l)}}catch(B){console.log(B)}}),p=mxUtils.bind(this,function(b){try{this.setDatabaseItem(null,[{title:b.title,size:b.data.length,lastModified:Date.now(),type:b.isLib?"L":"F"},{title:b.title,data:b.data}],l,l,["filesInfo","files"])}catch(B){console.log(B)}});b=mxUtils.bind(this,function(b){try{if(b.source==c.contentWindow){var g={};try{g=JSON.parse(b.data)}catch(M){}"init"==g.event?(c.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
+"*"),c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=g.event||e||(d?null!=g.resp&&0<g.resp.length&&null!=g.resp[0]?(f=g.resp[0],d=!1,m()):k():null!=g.resp&&0<g.resp.length&&null!=g.resp[0]?p(g.resp[0]):l())}}catch(M){console.log(M)}});window.addEventListener("message",b)}})));b(c);c.onversionchange=function(){c.close()}});e.onerror=c;e.onblocked=function(){}}catch(q){null!=c&&c(q)}else null!=c&&c()}else b(this.database)};
+EditorUi.prototype.setDatabaseItem=function(b,c,e,g,k){this.openDatabase(mxUtils.bind(this,function(d){try{k=k||"objects";Array.isArray(k)||(k=[k],b=[b],c=[c]);var f=d.transaction(k,"readwrite");f.oncomplete=e;f.onerror=g;for(d=0;d<k.length;d++)f.objectStore(k[d]).put(null!=b&&null!=b[d]?{key:b[d],data:c[d]}:c[d])}catch(v){null!=g&&g(v)}}),g)};EditorUi.prototype.removeDatabaseItem=function(b,c,e,g){this.openDatabase(mxUtils.bind(this,function(d){g=g||"objects";Array.isArray(g)||(g=[g],b=[b]);d=d.transaction(g,
+"readwrite");d.oncomplete=c;d.onerror=e;for(var f=0;f<g.length;f++)d.objectStore(g[f])["delete"](b[f])}),e)};EditorUi.prototype.getDatabaseItem=function(b,c,e,g){this.openDatabase(mxUtils.bind(this,function(d){try{g=g||"objects";var f=d.transaction([g],"readonly").objectStore(g).get(b);f.onsuccess=function(){c(f.result)};f.onerror=e}catch(u){null!=e&&e(u)}}),e)};EditorUi.prototype.getDatabaseItems=function(b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],
+"readonly").objectStore(e).openCursor(IDBKeyRange.lowerBound(0)),g=[];f.onsuccess=function(c){null==c.target.result?b(g):(g.push(c.target.result.value),c.target.result["continue"]())};f.onerror=c}catch(u){null!=c&&c(u)}}),c)};EditorUi.prototype.getDatabaseItemKeys=function(b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],"readonly").objectStore(e).getAllKeys();f.onsuccess=function(){b(f.result)};f.onerror=c}catch(n){null!=c&&c(n)}}),c)};EditorUi.prototype.commentsSupported=
+function(){var b=this.getCurrentFile();return null!=b?b.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var b=this.getCurrentFile();return null!=b?b.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var b=this.getCurrentFile();return null!=b?b.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(b,c){var d=this.getCurrentFile();null!=d?d.getComments(b,c):b([])};EditorUi.prototype.addComment=function(b,c,e){var d=this.getCurrentFile();
+null!=d?d.addComment(b,c,e):c(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var b=this.getCurrentFile();return null!=b?b.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var b=this.getCurrentFile();return null!=b?b.canComment():!0};EditorUi.prototype.newComment=function(b,c){var d=this.getCurrentFile();return null!=d?d.newComment(b,c):new DrawioComment(this,null,b,Date.now(),Date.now(),!1,c)};EditorUi.prototype.isRevisionHistorySupported=function(){var b=this.getCurrentFile();
+return null!=b&&b.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(b,c){var d=this.getCurrentFile();null!=d&&d.getRevisions?d.getRevisions(b,c):c({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var b=this.getCurrentFile();return null!=b&&(b.constructor==DriveFile&&b.isEditable()||b.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(b){b.setRequestHeader("Content-Language",
+"da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(b,c,e,g,k,p,t,v){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(b,c,e,g,k,p,t,v)};EditorUi.prototype.loadFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(b)};EditorUi.prototype.createSvgDataUri=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(b)};EditorUi.prototype.embedCssFonts=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");
+return this.editor.embedCssFonts(b,c)};EditorUi.prototype.embedExtFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(b)};EditorUi.prototype.exportToCanvas=function(b,c,e,g,k,p,t,v,y,x,E,C,F,I,L,H){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(b,c,e,g,k,p,t,v,y,x,E,C,F,I,L,H)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");
+return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(b,c,e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(b,c,e,g)};EditorUi.prototype.convertImageToDataUri=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(b,c)};EditorUi.prototype.base64Encode=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(b)};EditorUi.prototype.updateCRC=
+function(b,c,e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(b,c,e,g)};EditorUi.prototype.crc32=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(b)};EditorUi.prototype.writeGraphModelToPng=function(b,c,e,g,k){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(b,c,e,g,k)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=
+urlParams.forceMigration)return null;for(var b=[],c=0;c<localStorage.length;c++){var e=localStorage.key(c),g=localStorage.getItem(e);if(0<e.length&&(".scratchpad"==e||"."!=e.charAt(0))&&0<g.length){var k="<mxfile "===g.substring(0,8)||"<?xml"===g.substring(0,5)||"\x3c!--[if IE]>"===g.substring(0,12),g="<mxlibrary>"===g.substring(0,11);(k||g)&&b.push(e)}}return b};EditorUi.prototype.getLocalStorageFile=function(b){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;
+var c=localStorage.getItem(b);return{title:b,data:c,isLib:"<mxlibrary>"===c.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(b,c,e,k,g,p){function t(){for(var b=C.getElementsByTagName("div"),c=0,d=0;d<b.length;d++)"none"!=b[d].style.display&&b[d].parentNode==C&&c++;F.style.display=0==c?"block":"none"}function d(b,c,d,e){function f(){c.removeChild(l);c.removeChild(m);k.style.display="block";g.style.display="block"}y={div:c,comment:b,saveCallback:d,deleteOnCancel:e};var g=c.querySelector(".geCommentTxt"),k=c.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
"geCommentEditTxtArea";l.style.minHeight=g.offsetHeight+"px";l.value=b.content;c.insertBefore(l,g);var m=document.createElement("div");m.className="geCommentEditBtns";var p=mxUtils.button(mxResources.get("cancel"),function(){e?(c.parentNode.removeChild(c),t()):f();y=null});p.className="geCommentEditBtn";m.appendChild(p);var n=mxUtils.button(mxResources.get("save"),function(){g.innerHTML="";b.content=l.value;mxUtils.write(g,b.content);f();d(b);y=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this,
function(b){mxEvent.isConsumed(b)||((mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b))&&13==b.keyCode?(n.click(),mxEvent.consume(b)):27==b.keyCode&&(p.click(),mxEvent.consume(b)))}));n.focus();n.className="geCommentEditBtn gePrimaryBtn";m.appendChild(n);c.insertBefore(m,g);k.style.display="none";g.style.display="none";l.focus()}function f(c,d){d.innerHTML="";var e=new Date(c.modifiedDate),f=b.timeSince(e);null==f&&(f=mxResources.get("lessThanAMinute"));mxUtils.write(d,mxResources.get("timeAgo",
[f],"{1} ago"));d.setAttribute("title",e.toLocaleDateString()+" "+e.toLocaleTimeString())}function l(b){var c=document.createElement("img");c.className="geCommentBusyImg";c.src=IMAGE_PATH+"/spin.gif";b.appendChild(c);b.busyImg=c}function m(b){b.style.border="1px solid red";b.removeChild(b.busyImg)}function q(b){b.style.border="";b.removeChild(b.busyImg)}function n(c,e,g,k,p){function B(b,d,e){var f=document.createElement("li");f.className="geCommentAction";var g=document.createElement("a");g.className=
-"geCommentActionLnk";mxUtils.write(g,b);f.appendChild(g);mxEvent.addListener(g,"click",function(b){d(b,c);b.preventDefault();mxEvent.consume(b)});G.appendChild(f);e&&(f.style.display="none")}function N(){function b(c){d.push(e);if(null!=c.replies)for(var f=0;f<c.replies.length;f++)e=e.nextSibling,b(c.replies[f])}var d=[],e=F;b(c);return{pdiv:e,replies:d}}function x(e,f,g,p,t){function v(){l(C);c.addReply(x,function(b){x.id=b;c.replies.push(x);q(C);g&&g()},function(c){u();m(C);b.handleError(c,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},p,t)}function u(){d(x,C,function(b){v()},!0)}var B=N().pdiv,x=b.newComment(e,b.getCurrentUser());x.pCommentId=c.id;null==c.replies&&(c.replies=[]);var C=n(x,c.replies,B,k+1);f?u():v()}if(p||!c.isResolved){E.style.display="none";var F=document.createElement("div");F.className="geCommentContainer";F.setAttribute("data-commentId",c.id);F.style.marginLeft=20*k+5+"px";c.isResolved&&!Editor.isDarkMode()&&(F.style.backgroundColor="ghostWhite");
-var R=document.createElement("div");R.className="geCommentHeader";var T=document.createElement("img");T.className="geCommentUserImg";T.src=c.user.pictureUrl||Editor.userImage;R.appendChild(T);T=document.createElement("div");T.className="geCommentHeaderTxt";R.appendChild(T);var J=document.createElement("div");J.className="geCommentUsername";mxUtils.write(J,c.user.displayName||"");T.appendChild(J);J=document.createElement("div");J.className="geCommentDate";J.setAttribute("data-commentId",c.id);f(c,
-J);T.appendChild(J);F.appendChild(R);R=document.createElement("div");R.className="geCommentTxt";mxUtils.write(R,c.content||"");F.appendChild(R);c.isLocked&&(F.style.opacity="0.5");R=document.createElement("div");R.className="geCommentActions";var G=document.createElement("ul");G.className="geCommentActionsList";R.appendChild(G);u||c.isLocked||0!=k&&!v||B(mxResources.get("reply"),function(){x("",!0)},c.isResolved);T=b.getCurrentUser();null==T||T.id!=c.user.id||u||c.isLocked||(B(mxResources.get("edit"),
-function(){function e(){d(c,F,function(){l(F);c.editComment(c.content,function(){q(F)},function(c){m(F);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}e()},c.isResolved),B(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){l(F);c.deleteComment(function(b){if(!0===b){b=F.querySelector(".geCommentTxt");b.innerHTML="";mxUtils.write(b,mxResources.get("msgDeleted"));var d=F.querySelectorAll(".geCommentAction");for(b=
-0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);q(F);F.style.opacity="0.5"}else{d=N(c).replies;for(b=0;b<d.length;b++)C.removeChild(d[b]);for(b=0;b<e.length;b++)if(e[b]==c){e.splice(b,1);break}E.style.display=0==C.getElementsByTagName("div").length?"block":"none"}},function(c){m(F);b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));u||c.isLocked||0!=k||B(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(b){function d(){var d=
+"geCommentActionLnk";mxUtils.write(g,b);f.appendChild(g);mxEvent.addListener(g,"click",function(b){d(b,c);b.preventDefault();mxEvent.consume(b)});I.appendChild(f);e&&(f.style.display="none")}function N(){function b(c){d.push(e);if(null!=c.replies)for(var f=0;f<c.replies.length;f++)e=e.nextSibling,b(c.replies[f])}var d=[],e=G;b(c);return{pdiv:e,replies:d}}function x(e,f,g,p,t){function v(){l(C);c.addReply(x,function(b){x.id=b;c.replies.push(x);q(C);g&&g()},function(c){u();m(C);b.handleError(c,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},p,t)}function u(){d(x,C,function(b){v()},!0)}var B=N().pdiv,x=b.newComment(e,b.getCurrentUser());x.pCommentId=c.id;null==c.replies&&(c.replies=[]);var C=n(x,c.replies,B,k+1);f?u():v()}if(p||!c.isResolved){F.style.display="none";var G=document.createElement("div");G.className="geCommentContainer";G.setAttribute("data-commentId",c.id);G.style.marginLeft=20*k+5+"px";c.isResolved&&!Editor.isDarkMode()&&(G.style.backgroundColor="ghostWhite");
+var R=document.createElement("div");R.className="geCommentHeader";var T=document.createElement("img");T.className="geCommentUserImg";T.src=c.user.pictureUrl||Editor.userImage;R.appendChild(T);T=document.createElement("div");T.className="geCommentHeaderTxt";R.appendChild(T);var E=document.createElement("div");E.className="geCommentUsername";mxUtils.write(E,c.user.displayName||"");T.appendChild(E);E=document.createElement("div");E.className="geCommentDate";E.setAttribute("data-commentId",c.id);f(c,
+E);T.appendChild(E);G.appendChild(R);R=document.createElement("div");R.className="geCommentTxt";mxUtils.write(R,c.content||"");G.appendChild(R);c.isLocked&&(G.style.opacity="0.5");R=document.createElement("div");R.className="geCommentActions";var I=document.createElement("ul");I.className="geCommentActionsList";R.appendChild(I);u||c.isLocked||0!=k&&!v||B(mxResources.get("reply"),function(){x("",!0)},c.isResolved);T=b.getCurrentUser();null==T||T.id!=c.user.id||u||c.isLocked||(B(mxResources.get("edit"),
+function(){function e(){d(c,G,function(){l(G);c.editComment(c.content,function(){q(G)},function(c){m(G);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}e()},c.isResolved),B(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){l(G);c.deleteComment(function(b){if(!0===b){b=G.querySelector(".geCommentTxt");b.innerHTML="";mxUtils.write(b,mxResources.get("msgDeleted"));var d=G.querySelectorAll(".geCommentAction");for(b=
+0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);q(G);G.style.opacity="0.5"}else{d=N(c).replies;for(b=0;b<d.length;b++)C.removeChild(d[b]);for(b=0;b<e.length;b++)if(e[b]==c){e.splice(b,1);break}F.style.display=0==C.getElementsByTagName("div").length?"block":"none"}},function(c){m(G);b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));u||c.isLocked||0!=k||B(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(b){function d(){var d=
b.target;d.innerHTML="";c.isResolved=!c.isResolved;mxUtils.write(d,c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var e=c.isResolved?"none":"",f=N(c).replies,g=Editor.isDarkMode()?"transparent":c.isResolved?"ghostWhite":"white",k=0;k<f.length;k++){f[k].style.backgroundColor=g;for(var l=f[k].querySelectorAll(".geCommentAction"),m=0;m<l.length;m++)l[m]!=d.parentNode&&(l[m].style.display=e);H||(f[k].style.display="none")}t()}c.isResolved?x(mxResources.get("reOpened")+": ",!0,
-d,!1,!0):x(mxResources.get("markedAsResolved"),!1,d,!0)});F.appendChild(R);null!=g?C.insertBefore(F,g.nextSibling):C.appendChild(F);for(g=0;null!=c.replies&&g<c.replies.length;g++)R=c.replies[g],R.isResolved=c.isResolved,n(R,c.replies,null,k+1,p);null!=y&&(y.comment.id==c.id?(p=c.content,c.content=y.comment.content,d(c,F,y.saveCallback,y.deleteOnCancel),c.content=p):null==y.comment.id&&y.comment.pCommentId==c.id&&(C.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel)));return F}}
-var u=!b.canComment(),v=b.canReplyToReplies(),y=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var G=EditorUi.compactUi?"26px":"30px",C=document.createElement("div");C.className="geCommentsList";C.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";C.style.bottom=parseInt(G)+7+"px";x.appendChild(C);var E=document.createElement("span");E.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(E,mxResources.get("noCommentsFound"));var J=document.createElement("div");J.className="geToolbarContainer geCommentsToolbar";J.style.height=G;J.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";J.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";G=document.createElement("a");G.className="geButton";if(!u){var L=G.cloneNode();L.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';L.setAttribute("title",mxResources.get("create")+
-"...");mxEvent.addListener(L,"click",function(c){function e(){d(f,g,function(c){l(g);b.addComment(c,function(b){c.id=b;K.push(c);q(g)},function(c){m(g);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var f=b.newComment("",b.getCurrentUser()),g=n(f,K,null,0);e();c.preventDefault();mxEvent.consume(c)});J.appendChild(L)}L=G.cloneNode();L.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';L.setAttribute("title",mxResources.get("showResolved"));
-var H=!1;Editor.isDarkMode()&&(L.style.filter="invert(100%)");mxEvent.addListener(L,"click",function(b){this.className=(H=!H)?"geButton geCheckedBtn":"geButton";B();b.preventDefault();mxEvent.consume(b)});J.appendChild(L);b.commentsRefreshNeeded()&&(L=G.cloneNode(),L.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',L.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(L.style.filter="invert(100%)"),mxEvent.addListener(L,"click",function(b){B();
-b.preventDefault();mxEvent.consume(b)}),J.appendChild(L));b.commentsSaveNeeded()&&(G=G.cloneNode(),G.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',G.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(G.style.filter="invert(100%)"),mxEvent.addListener(G,"click",function(b){p();b.preventDefault();mxEvent.consume(b)}),J.appendChild(G));x.appendChild(J);var K=[],B=mxUtils.bind(this,function(){this.hasError=!1;if(null!=y)try{y.div=y.div.cloneNode(!0);
+d,!1,!0):x(mxResources.get("markedAsResolved"),!1,d,!0)});G.appendChild(R);null!=g?C.insertBefore(G,g.nextSibling):C.appendChild(G);for(g=0;null!=c.replies&&g<c.replies.length;g++)R=c.replies[g],R.isResolved=c.isResolved,n(R,c.replies,null,k+1,p);null!=y&&(y.comment.id==c.id?(p=c.content,c.content=y.comment.content,d(c,G,y.saveCallback,y.deleteOnCancel),c.content=p):null==y.comment.id&&y.comment.pCommentId==c.id&&(C.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel)));return G}}
+var u=!b.canComment(),v=b.canReplyToReplies(),y=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var E=EditorUi.compactUi?"26px":"30px",C=document.createElement("div");C.className="geCommentsList";C.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";C.style.bottom=parseInt(E)+7+"px";x.appendChild(C);var F=document.createElement("span");F.style.cssText="display:none;padding-top:10px;text-align:center;";
+mxUtils.write(F,mxResources.get("noCommentsFound"));var I=document.createElement("div");I.className="geToolbarContainer geCommentsToolbar";I.style.height=E;I.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";I.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";E=document.createElement("a");E.className="geButton";if(!u){var L=E.cloneNode();L.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';L.setAttribute("title",mxResources.get("create")+
+"...");mxEvent.addListener(L,"click",function(c){function e(){d(f,g,function(c){l(g);b.addComment(c,function(b){c.id=b;J.push(c);q(g)},function(c){m(g);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var f=b.newComment("",b.getCurrentUser()),g=n(f,J,null,0);e();c.preventDefault();mxEvent.consume(c)});I.appendChild(L)}L=E.cloneNode();L.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';L.setAttribute("title",mxResources.get("showResolved"));
+var H=!1;Editor.isDarkMode()&&(L.style.filter="invert(100%)");mxEvent.addListener(L,"click",function(b){this.className=(H=!H)?"geButton geCheckedBtn":"geButton";B();b.preventDefault();mxEvent.consume(b)});I.appendChild(L);b.commentsRefreshNeeded()&&(L=E.cloneNode(),L.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',L.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(L.style.filter="invert(100%)"),mxEvent.addListener(L,"click",function(b){B();
+b.preventDefault();mxEvent.consume(b)}),I.appendChild(L));b.commentsSaveNeeded()&&(E=E.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',E.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(E.style.filter="invert(100%)"),mxEvent.addListener(E,"click",function(b){p();b.preventDefault();mxEvent.consume(b)}),I.appendChild(E));x.appendChild(I);var J=[],B=mxUtils.bind(this,function(){this.hasError=!1;if(null!=y)try{y.div=y.div.cloneNode(!0);
var c=y.div.querySelector(".geCommentEditTxtArea"),e=y.div.querySelector(".geCommentEditBtns");y.comment.content=c.value;c.parentNode.removeChild(c);e.parentNode.removeChild(e)}catch(N){b.handleError(N)}C.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";v=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(b){function c(b){if(null!=b){b.sort(function(b,c){return new Date(b.modifiedDate)-
-new Date(c.modifiedDate)});for(var d=0;d<b.length;d++)c(b[d].replies)}}b.sort(function(b,c){return new Date(b.modifiedDate)-new Date(c.modifiedDate)});C.innerHTML="";C.appendChild(E);E.style.display="block";K=b;for(b=0;b<K.length;b++)c(K[b].replies),n(K[b],K,null,0,H);null!=y&&null==y.comment.id&&null==y.comment.pCommentId&&(C.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel))},mxUtils.bind(this,function(b){C.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(b&&b.message?
-": "+b.message:""));this.hasError=!0})):C.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});B();this.refreshComments=B;J=mxUtils.bind(this,function(){function b(c){var e=d[c.id];if(null!=e)for(f(c,e),e=0;null!=c.replies&&e<c.replies.length;e++)b(c.replies[e])}if(this.window.isVisible()){for(var c=C.querySelectorAll(".geCommentDate"),d={},e=0;e<c.length;e++){var g=c[e];d[g.getAttribute("data-commentId")]=g}for(e=0;e<K.length;e++)b(K[e])}});setInterval(J,6E4);this.refreshCommentsTime=J;this.window=
+new Date(c.modifiedDate)});for(var d=0;d<b.length;d++)c(b[d].replies)}}b.sort(function(b,c){return new Date(b.modifiedDate)-new Date(c.modifiedDate)});C.innerHTML="";C.appendChild(F);F.style.display="block";J=b;for(b=0;b<J.length;b++)c(J[b].replies),n(J[b],J,null,0,H);null!=y&&null==y.comment.id&&null==y.comment.pCommentId&&(C.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel))},mxUtils.bind(this,function(b){C.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(b&&b.message?
+": "+b.message:""));this.hasError=!0})):C.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});B();this.refreshComments=B;I=mxUtils.bind(this,function(){function b(c){var e=d[c.id];if(null!=e)for(f(c,e),e=0;null!=c.replies&&e<c.replies.length;e++)b(c.replies[e])}if(this.window.isVisible()){for(var c=C.querySelectorAll(".geCommentDate"),d={},e=0;e<c.length;e++){var g=c[e];d[g.getAttribute("data-commentId")]=g}for(e=0;e<J.length;e++)b(J[e])}});setInterval(I,6E4);this.refreshCommentsTime=I;this.window=
new mxWindow(mxResources.get("comments"),x,c,e,k,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(b,c){var d=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||
document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,d-this.table.clientHeight-48));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};var M=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",M);this.destroy=function(){mxEvent.removeListener(window,"resize",M);this.window.destroy()}},ConfirmDialog=function(b,c,e,
k,g,p,t,d,f,l,m){var q=document.createElement("div");q.style.textAlign="center";m=null!=m?m:44;var n=document.createElement("div");n.style.padding="6px";n.style.overflow="auto";n.style.maxHeight=m+"px";n.style.lineHeight="1.2em";mxUtils.write(n,c);q.appendChild(n);null!=l&&(n=document.createElement("div"),n.style.padding="6px 0 6px 0",c=document.createElement("img"),c.setAttribute("src",l),n.appendChild(c),q.appendChild(n));l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace=
@@ -3828,15 +3832,15 @@ c==mxConstants.DIRECTION_WEST?-1:1,0<=e&&e<=f.length-1&&v.setSelectionCell(f[e].
0<v.getIncomingTreeEdges(d).length&&this.addMenuItems(c,["selectSiblings","selectParent"],null,e)):0<v.model.getEdgeCount(d)&&this.addMenuItems(c,["selectConnections"],null,e)}};u.actions.addAction("selectChildren",function(){if(v.isEnabled()&&1==v.getSelectionCount()){var b=v.getSelectionCell(),b=v.getOutgoingTreeEdges(b);if(null!=b){for(var c=[],d=0;d<b.length;d++)c.push(v.model.getTerminal(b[d],!1));v.setSelectionCells(c)}}},null,null,"Alt+Shift+X");u.actions.addAction("selectSiblings",function(){if(v.isEnabled()&&
1==v.getSelectionCount()){var b=v.getSelectionCell(),b=v.getIncomingTreeEdges(b);if(null!=b&&0<b.length&&(b=v.getOutgoingTreeEdges(v.model.getTerminal(b[0],!0)),null!=b)){for(var c=[],d=0;d<b.length;d++)c.push(v.model.getTerminal(b[d],!1));v.setSelectionCells(c)}}},null,null,"Alt+Shift+S");u.actions.addAction("selectParent",function(){if(v.isEnabled()&&1==v.getSelectionCount()){var b=v.getSelectionCell(),b=v.getIncomingTreeEdges(b);null!=b&&0<b.length&&v.setSelectionCell(v.model.getTerminal(b[0],
!0))}},null,null,"Alt+Shift+P");u.actions.addAction("selectDescendants",function(b,c){var d=v.getSelectionCell();if(v.isEnabled()&&v.model.isVertex(d)){if(null!=c&&mxEvent.isAltDown(c))v.setSelectionCells(v.model.getTreeEdges(d,null==c||!mxEvent.isShiftDown(c),null==c||!mxEvent.isControlDown(c)));else{var e=[];v.traverse(d,!0,function(b,d){var f=null!=d&&v.isTreeEdge(d);f&&e.push(d);null!=d&&!f||null!=c&&mxEvent.isShiftDown(c)||e.push(b);return null==d||f})}v.setSelectionCells(e)}},null,null,"Alt+Shift+D");
-var G=v.removeCells;v.removeCells=function(c,d){d=null!=d?d:!0;null==c&&(c=this.getDeletableCells(this.getSelectionCells()));d&&(c=this.getDeletableCells(this.addAllEdges(c)));for(var f=[],g=0;g<c.length;g++){var k=c[g];y.isEdge(k)&&e(k)&&(f.push(k),k=y.getTerminal(k,!1));if(b(k)){var l=[];v.traverse(k,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});0<l.length&&(f=f.concat(l),k=v.getIncomingTreeEdges(c[g]),c=c.concat(k))}else null!=k&&f.push(c[g])}c=
-f;return G.apply(this,arguments)};u.hoverIcons.getStateAt=function(c,d,e){return b(c.cell)?null:this.graph.view.getState(this.graph.getCellAt(d,e))};var C=v.duplicateCells;v.duplicateCells=function(c,d){c=null!=c?c:this.getSelectionCells();for(var e=c.slice(0),f=0;f<e.length;f++){var g=v.view.getState(e[f]);if(null!=g&&b(g.cell))for(var k=v.getIncomingTreeEdges(g.cell),g=0;g<k.length;g++)mxUtils.remove(k[g],c)}this.model.beginUpdate();try{var l=C.call(this,c,d);if(l.length==c.length)for(f=0;f<c.length;f++)if(b(c[f])){var m=
-v.getIncomingTreeEdges(l[f]),k=v.getIncomingTreeEdges(c[f]);if(0==m.length&&0<k.length){var p=this.cloneCell(k[0]);this.addEdge(p,v.getDefaultParent(),this.model.getTerminal(k[0],!0),l[f])}}}finally{this.model.endUpdate()}return l};var E=v.moveCells;v.moveCells=function(c,d,e,f,g,k,l){var m=null;this.model.beginUpdate();try{var p=g,n=this.getCurrentCellStyle(g);if(null!=c&&b(g)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var q=0;q<c.length;q++)if(b(c[q])||v.model.isEdge(c[q])&&null==v.model.getTerminal(c[q],
-!0)){g=v.model.getParent(c[q]);break}if(null!=p&&g!=p&&null!=this.view.getState(c[0])){var t=v.getIncomingTreeEdges(c[0]);if(0<t.length){var u=v.view.getState(v.model.getTerminal(t[0],!0));if(null!=u){var B=v.view.getState(p);null!=B&&(d=(B.getCenterX()-u.getCenterX())/v.view.scale,e=(B.getCenterY()-u.getCenterY())/v.view.scale)}}}}m=E.apply(this,arguments);if(null!=m&&null!=c&&m.length==c.length)for(q=0;q<m.length;q++)if(this.model.isEdge(m[q]))b(p)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[q],
-!0))&&this.model.setTerminal(m[q],p,!0);else if(b(c[q])&&(t=v.getIncomingTreeEdges(c[q]),0<t.length))if(!f)b(p)&&0>mxUtils.indexOf(c,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],p,!0);else if(0==v.getIncomingTreeEdges(m[q]).length){n=p;if(null==n||n==v.model.getParent(c[q]))n=v.model.getTerminal(t[0],!0);f=this.cloneCell(t[0]);this.addEdge(f,v.getDefaultParent(),n,m[q])}}finally{this.model.endUpdate()}return m};if(null!=u.sidebar){var J=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=
-function(c,d,e,f){var g=v.model,k=null;g.beginUpdate();try{if(k=J.apply(this,arguments),b(c))for(var l=0;l<k.length;l++)if(g.isEdge(k[l])&&null==g.getTerminal(k[l],!0)){g.setTerminal(k[l],c,!0);var m=v.getCellGeometry(k[l]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return k}}var L={88:u.actions.get("selectChildren"),84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},H=u.onKeyDown;u.onKeyDown=function(c){try{if(v.isEnabled()&&
+var E=v.removeCells;v.removeCells=function(c,d){d=null!=d?d:!0;null==c&&(c=this.getDeletableCells(this.getSelectionCells()));d&&(c=this.getDeletableCells(this.addAllEdges(c)));for(var f=[],g=0;g<c.length;g++){var k=c[g];y.isEdge(k)&&e(k)&&(f.push(k),k=y.getTerminal(k,!1));if(b(k)){var l=[];v.traverse(k,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});0<l.length&&(f=f.concat(l),k=v.getIncomingTreeEdges(c[g]),c=c.concat(k))}else null!=k&&f.push(c[g])}c=
+f;return E.apply(this,arguments)};u.hoverIcons.getStateAt=function(c,d,e){return b(c.cell)?null:this.graph.view.getState(this.graph.getCellAt(d,e))};var C=v.duplicateCells;v.duplicateCells=function(c,d){c=null!=c?c:this.getSelectionCells();for(var e=c.slice(0),f=0;f<e.length;f++){var g=v.view.getState(e[f]);if(null!=g&&b(g.cell))for(var k=v.getIncomingTreeEdges(g.cell),g=0;g<k.length;g++)mxUtils.remove(k[g],c)}this.model.beginUpdate();try{var l=C.call(this,c,d);if(l.length==c.length)for(f=0;f<c.length;f++)if(b(c[f])){var m=
+v.getIncomingTreeEdges(l[f]),k=v.getIncomingTreeEdges(c[f]);if(0==m.length&&0<k.length){var p=this.cloneCell(k[0]);this.addEdge(p,v.getDefaultParent(),this.model.getTerminal(k[0],!0),l[f])}}}finally{this.model.endUpdate()}return l};var F=v.moveCells;v.moveCells=function(c,d,e,f,g,k,l){var m=null;this.model.beginUpdate();try{var p=g,n=this.getCurrentCellStyle(g);if(null!=c&&b(g)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var q=0;q<c.length;q++)if(b(c[q])||v.model.isEdge(c[q])&&null==v.model.getTerminal(c[q],
+!0)){g=v.model.getParent(c[q]);break}if(null!=p&&g!=p&&null!=this.view.getState(c[0])){var t=v.getIncomingTreeEdges(c[0]);if(0<t.length){var u=v.view.getState(v.model.getTerminal(t[0],!0));if(null!=u){var B=v.view.getState(p);null!=B&&(d=(B.getCenterX()-u.getCenterX())/v.view.scale,e=(B.getCenterY()-u.getCenterY())/v.view.scale)}}}}m=F.apply(this,arguments);if(null!=m&&null!=c&&m.length==c.length)for(q=0;q<m.length;q++)if(this.model.isEdge(m[q]))b(p)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[q],
+!0))&&this.model.setTerminal(m[q],p,!0);else if(b(c[q])&&(t=v.getIncomingTreeEdges(c[q]),0<t.length))if(!f)b(p)&&0>mxUtils.indexOf(c,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],p,!0);else if(0==v.getIncomingTreeEdges(m[q]).length){n=p;if(null==n||n==v.model.getParent(c[q]))n=v.model.getTerminal(t[0],!0);f=this.cloneCell(t[0]);this.addEdge(f,v.getDefaultParent(),n,m[q])}}finally{this.model.endUpdate()}return m};if(null!=u.sidebar){var I=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=
+function(c,d,e,f){var g=v.model,k=null;g.beginUpdate();try{if(k=I.apply(this,arguments),b(c))for(var l=0;l<k.length;l++)if(g.isEdge(k[l])&&null==g.getTerminal(k[l],!0)){g.setTerminal(k[l],c,!0);var m=v.getCellGeometry(k[l]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return k}}var L={88:u.actions.get("selectChildren"),84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},H=u.onKeyDown;u.onKeyDown=function(c){try{if(v.isEnabled()&&
!v.isEditing()&&b(v.getSelectionCell())&&1==v.getSelectionCount()){var d=null;0<v.getIncomingTreeEdges(v.getSelectionCell()).length&&(9==c.which?d=mxEvent.isShiftDown(c)?l(v.getSelectionCell()):m(v.getSelectionCell()):13==c.which&&(d=f(v.getSelectionCell(),!mxEvent.isShiftDown(c))));if(null!=d&&0<d.length)1==d.length&&v.model.isEdge(d[0])?v.setSelectionCell(v.model.getTerminal(d[0],!1)):v.setSelectionCell(d[d.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(v.view.getState(v.getSelectionCell())),
v.startEditingAtCell(v.getSelectionCell()),mxEvent.consume(c);else if(mxEvent.isAltDown(c)&&mxEvent.isShiftDown(c)){var e=L[c.keyCode];null!=e&&(e.funct(c),mxEvent.consume(c))}else 37==c.keyCode?(n(v.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(c)):38==c.keyCode?(n(v.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(c)):39==c.keyCode?(n(v.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(c)):40==c.keyCode&&(n(v.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(c))}}catch(D){u.handleError(D)}mxEvent.isConsumed(c)||H.apply(this,arguments)};var K=v.connectVertex;v.connectVertex=function(c,e,g,k,p,n,q){var t=v.getIncomingTreeEdges(c);if(b(c)){var u=d(c),B=u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST,x=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST;return u==e||0==t.length?m(c,e):B==x?l(c):f(c,e!=mxConstants.DIRECTION_NORTH&&e!=mxConstants.DIRECTION_WEST)}return K.apply(this,arguments)};v.getSubtree=function(d){var e=
+mxEvent.consume(c))}}catch(D){u.handleError(D)}mxEvent.isConsumed(c)||H.apply(this,arguments)};var J=v.connectVertex;v.connectVertex=function(c,e,g,k,p,n,q){var t=v.getIncomingTreeEdges(c);if(b(c)){var u=d(c),B=u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST,x=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST;return u==e||0==t.length?m(c,e):B==x?l(c):f(c,e!=mxConstants.DIRECTION_NORTH&&e!=mxConstants.DIRECTION_WEST)}return J.apply(this,arguments)};v.getSubtree=function(d){var e=
[d];!c(d)&&!b(d)||t(d)||v.traverse(d,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&0>mxUtils.indexOf(e,c)&&e.push(c);(null==c||d)&&0>mxUtils.indexOf(e,b)&&e.push(b);return null==c||d});return e};var B=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){B.apply(this,arguments);(c(this.state.cell)||b(this.state.cell))&&!t(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(b){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(b),mxEvent.getClientY(b),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(b);
this.graph.isMouseDown=!0;u.hoverIcons.reset();mxEvent.consume(b)})))};var M=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){M.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var P=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){P.apply(this,
@@ -3913,50 +3917,50 @@ e){"1"==urlParams.sketch?(d.menus.addMenuItems(b,["insertFreehand"],e),d.insertT
620,420,!0,!1);b.init()}),c)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(b,c){for(var d=0;d<n.length;d++)"-"==n[d]?b.addSeparator(c):p(b,c,mxResources.get(n[d])+"...",n[d])})));this.put("view",new Menu(mxUtils.bind(this,function(b,c){d.menus.addMenuItems(b,"grid guides ruler - connectionArrows connectionPoints -".split(" "),c);if("undefined"!==typeof MathJax){var e=d.menus.addMenuItem(b,"mathematicalTypesetting",c);d.menus.addLinkToItem(e,"https://www.diagrams.net/doc/faq/math-typesetting")}d.menus.addMenuItems(b,
["copyConnect","collapseExpand","-"],c);e=d.getCurrentFile();null!=e&&null!=d.fileNode&&(e=null!=e.getTitle()?e.getTitle():d.defaultFilename,/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||this.addMenuItems(b,["properties"],c));d.menus.addMenuItems(b,["pageScale"],c);"1"!=urlParams.sketch?(d.menus.addMenuItems(b,["-","fullscreen"],c),(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&d.menus.addMenuItems(b,["toggleDarkMode"],c)):d.menus.addMenuItems(b,["pageSetup","-","layers","tags"],c)})))};
EditorUi.prototype.installFormatToolbar=function(b){var c=this.editor.graph,d=document.createElement("div");d.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";c.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(e,f){0<c.getSelectionCount()?(b.appendChild(d),d.innerHTML="Selected: "+c.getSelectionCount()):null!=d.parentNode&&d.parentNode.removeChild(d)}))};
-var G=EditorUi.prototype.init;EditorUi.prototype.init=function(){function d(b,c,d){var e=n.menus.get(b),f=u.addMenu(mxResources.get(b),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}),t);f.className="geMenuItem";f.style.display="inline-block";f.style.boxSizing="border-box";f.style.top="6px";f.style.marginRight="6px";f.style.height="30px";f.style.paddingTop="6px";f.style.paddingBottom="6px";f.style.cursor="pointer";f.setAttribute("title",mxResources.get(b));n.menus.menuCreated(e,f,"geMenuItem");
+var E=EditorUi.prototype.init;EditorUi.prototype.init=function(){function d(b,c,d){var e=n.menus.get(b),f=u.addMenu(mxResources.get(b),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}),t);f.className="geMenuItem";f.style.display="inline-block";f.style.boxSizing="border-box";f.style.top="6px";f.style.marginRight="6px";f.style.height="30px";f.style.paddingTop="6px";f.style.paddingBottom="6px";f.style.cursor="pointer";f.setAttribute("title",mxResources.get(b));n.menus.menuCreated(e,f,"geMenuItem");
null!=d?(f.style.backgroundImage="url("+d+")",f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.width="34px",f.innerHTML=""):c||(f.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",f.style.backgroundPosition="right 6px center",f.style.backgroundRepeat="no-repeat",f.style.paddingRight="22px");return f}function f(b,c,d,e,f,g){var k=document.createElement("a");k.className="geMenuItem";k.style.display="inline-block";
k.style.boxSizing="border-box";k.style.height="30px";k.style.padding="6px";k.style.position="relative";k.style.verticalAlign="top";k.style.top="0px";"1"==urlParams.sketch&&(k.style.borderStyle="none",k.style.boxShadow="none",k.style.padding="6px",k.style.margin="0px");null!=n.statusContainer?q.insertBefore(k,n.statusContainer):q.appendChild(k);null!=g?(k.style.backgroundImage="url("+g+")",k.style.backgroundPosition="center center",k.style.backgroundRepeat="no-repeat",k.style.backgroundSize="24px 24px",
k.style.width="34px"):mxUtils.write(k,b);mxEvent.addListener(k,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}));mxEvent.addListener(k,"click",function(b){"disabled"!=k.getAttribute("disabled")&&c(b);mxEvent.consume(b)});null==d&&(k.style.marginRight="4px");null!=e&&k.setAttribute("title",e);null!=f&&(b=function(){f.isEnabled()?(k.removeAttribute("disabled"),k.style.cursor="pointer"):(k.setAttribute("disabled","disabled"),k.style.cursor="default")},
f.addListener("stateChanged",b),p.addListener("enabledChanged",b),b());return k}function g(b,c,d){d=document.createElement("div");d.className="geMenuItem";d.style.display="inline-block";d.style.verticalAlign="top";d.style.marginRight="6px";d.style.padding="0 4px 0 4px";d.style.height="30px";d.style.position="relative";d.style.top="0px";"1"==urlParams.sketch&&(d.style.boxShadow="none");for(var e=0;e<b.length;e++)null!=b[e]&&("1"==urlParams.sketch&&(b[e].style.padding="10px 8px",b[e].style.width="30px"),
b[e].style.margin="0px",b[e].style.boxShadow="none",d.appendChild(b[e]));null!=c&&mxUtils.setOpacity(d,c);null!=n.statusContainer&&"1"!=urlParams.sketch?q.insertBefore(d,n.statusContainer):q.appendChild(d);return d}function k(){for(var b=q.firstChild;null!=b;){var c=b.nextSibling;"geMenuItem"!=b.className&&"geItem"!=b.className||b.parentNode.removeChild(b);b=c}t=q.firstChild;e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var b=1E3>e||"1"==urlParams.sketch,k=null;
-b||(k=d("diagram"));if("1"==urlParams.sketch)Z.style.left=58>S.offsetTop-S.offsetHeight/2?"70px":"10px";else if(c=b?d("diagram",null,Editor.drawLogoImage):null,null!=c&&(k=c),g([k,f(mxResources.get("shapes"),n.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),n.actions.get("image"),b?Editor.shapesImage:null),f(mxResources.get("format"),n.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+n.actions.get("formatPanel").shortcut+")",n.actions.get("image"),b?Editor.formatImage:
-null)],b?60:null),c=d("insert",!0,b?da:null),g([c,f(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),b?Editor.trashImage:null)],b?60:null),411<=e&&(g([ka,aa],60),520<=e&&(g([oa,640<=e?f("",Q.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Q,Editor.zoomInImage):null,640<=e?f("",pa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",pa,Editor.zoomOutImage):null],60),720<=e&&(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)))){var l=
+b||(k=d("diagram"));if("1"==urlParams.sketch)aa.style.left=58>S.offsetTop-S.offsetHeight/2?"70px":"10px";else if(c=b?d("diagram",null,Editor.drawLogoImage):null,null!=c&&(k=c),g([k,f(mxResources.get("shapes"),n.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),n.actions.get("image"),b?Editor.shapesImage:null),f(mxResources.get("format"),n.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+n.actions.get("formatPanel").shortcut+")",n.actions.get("image"),b?Editor.formatImage:
+null)],b?60:null),c=d("insert",!0,b?da:null),g([c,f(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),b?Editor.trashImage:null)],b?60:null),411<=e&&(g([ka,Z],60),520<=e&&(g([qa,640<=e?f("",Q.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Q,Editor.zoomInImage):null,640<=e?f("",ra.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",ra,Editor.zoomOutImage):null],60),720<=e&&(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)))){var l=
f("",ja.funct,null,mxResources.get("dark"),ja,Editor.isDarkMode()?Editor.lightImage:Editor.darkImage);l.style.opacity="0.4";n.addListener("darkModeChanged",mxUtils.bind(this,function(){l.style.backgroundImage="url("+(Editor.isDarkMode()?Editor.lightImage:Editor.darkImage)+")"}));null!=n.statusContainer&&"1"!=urlParams.sketch?q.insertBefore(l,n.statusContainer):q.appendChild(l)}null!=k&&(mxEvent.disableContextMenu(k),mxEvent.addGestureListeners(k,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||
-mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&n.appIconClicked(b)}),null,null));c=n.menus.get("language");null!=c&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e&&"1"!=urlParams.sketch?(null==ua&&(c=u.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),c.className="geToolbarButton",c.style.backgroundImage="url("+Editor.globeImage+")",c.style.backgroundPosition="center center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize=
-"24px 24px",c.style.position="absolute",c.style.height="24px",c.style.width="24px",c.style.zIndex="1",c.style.right="8px",c.style.cursor="pointer",c.style.top="1"==urlParams.embed?"12px":"11px",q.appendChild(c),ua=c),n.buttonContainer.style.paddingRight="34px"):(n.buttonContainer.style.paddingRight="4px",null!=ua&&(ua.parentNode.removeChild(ua),ua=null))}G.apply(this,arguments);this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:mxSettings.settings.darkMode);
+mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&n.appIconClicked(b)}),null,null));c=n.menus.get("language");null!=c&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e&&"1"!=urlParams.sketch?(null==va&&(c=u.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),c.className="geToolbarButton",c.style.backgroundImage="url("+Editor.globeImage+")",c.style.backgroundPosition="center center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize=
+"24px 24px",c.style.position="absolute",c.style.height="24px",c.style.width="24px",c.style.zIndex="1",c.style.right="8px",c.style.cursor="pointer",c.style.top="1"==urlParams.embed?"12px":"11px",q.appendChild(c),va=c),n.buttonContainer.style.paddingRight="34px"):(n.buttonContainer.style.paddingRight="4px",null!=va&&(va.parentNode.removeChild(va),va=null))}E.apply(this,arguments);this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:mxSettings.settings.darkMode);
var l=document.createElement("div");l.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";l.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(l);"1"==urlParams.sketch&&this.toggleScratchpad();if("1"!=urlParams.sketch&&1E3<=e||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])c(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&
(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));this.keyHandler.bindAction(75,!0,"toggleShapes",!0);if("1"==urlParams.sketch||1E3<=e)if(b(this,!0),"1"==urlParams.sketch){this.formatWindow.window.setClosable(!1);var m=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){m.apply(this,arguments);this.minimized?(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+
150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=parseInt(this.div.style.left)-150+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(b){mxEvent.getSource(b)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.toggleMinimized()}var n=this,p=n.editor.graph;n.toolbar=this.createToolbar(n.createDiv("geToolbar"));n.defaultLibraryName=mxResources.get("untitledLibrary");
var q=document.createElement("div");q.className="geMenubarContainer";var t=null,u=new Menubar(n,q);n.statusContainer=n.createStatusContainer();n.statusContainer.style.position="relative";n.statusContainer.style.maxWidth="";n.statusContainer.style.marginTop="7px";n.statusContainer.style.marginLeft="6px";n.statusContainer.style.color="gray";n.statusContainer.style.cursor="default";var v=n.hideCurrentMenu;n.hideCurrentMenu=function(){v.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};
var x=n.descriptorChanged;n.descriptorChanged=function(){x.apply(this,arguments);var b=n.getCurrentFile();if(null!=b&&null!=b.getTitle()){var c=b.getMode();"google"==c?c="googleDrive":"github"==c?c="gitHub":"gitlab"==c?c="gitLab":"onedrive"==c&&(c="oneDrive");c=mxResources.get(c);q.setAttribute("title",b.getTitle()+(null!=c?" ("+c+")":""))}else q.removeAttribute("title")};n.setStatusText(n.editor.getStatus());q.appendChild(n.statusContainer);n.buttonContainer=document.createElement("div");n.buttonContainer.style.cssText=
"position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";q.appendChild(n.buttonContainer);n.menubarContainer=n.buttonContainer;n.tabContainer=document.createElement("div");n.tabContainer.className="geTabContainer";n.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";var l=n.diagramContainer.parentNode,y=document.createElement("div");y.style.cssText=
-"position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";n.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";var A=n.menus.get("viewZoom"),da="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,I="1"==urlParams.sketch?document.createElement("div"):null,S="1"==urlParams.sketch?document.createElement("div"):null,Z="1"==urlParams.sketch?document.createElement("div"):null;n.addListener("darkModeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=
+"position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";n.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";var A=n.menus.get("viewZoom"),da="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,K="1"==urlParams.sketch?document.createElement("div"):null,S="1"==urlParams.sketch?document.createElement("div"):null,aa="1"==urlParams.sketch?document.createElement("div"):null;n.addListener("darkModeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=
mxUtils.clone(p.stylesheet.styles),this.sidebar.container.innerHTML="",this.sidebar.palettes={},this.sidebar.init(),"1"==urlParams.sketch&&(this.scratchpad=null,this.toggleScratchpad()));p.refresh();p.refreshBackgroundImage();p.view.validateBackground()}));Graph.touchStyle&&(p.panningHandler.isPanningTrigger=function(b){var c=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(c)&&!p.freehand.isDrawing()||mxEvent.isPopupTrigger(c)&&(null==b.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))});
-if(null!=n.hoverIcons){var ma=n.hoverIcons.update;n.hoverIcons.update=function(){p.freehand.isDrawing()||ma.apply(this,arguments)}}if(null!=p.freehand){var ga=p.freehand.createStyle;p.freehand.createStyle=function(b){return ga.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){S.className="geToolbarContainer";I.className="geToolbarContainer";Z.className="geToolbarContainer";q.className="geToolbarContainer";n.picker=S;var ia=!1;mxEvent.addListener(q,"mouseenter",function(){n.statusContainer.style.display=
+if(null!=n.hoverIcons){var ma=n.hoverIcons.update;n.hoverIcons.update=function(){p.freehand.isDrawing()||ma.apply(this,arguments)}}if(null!=p.freehand){var ga=p.freehand.createStyle;p.freehand.createStyle=function(b){return ga.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){S.className="geToolbarContainer";K.className="geToolbarContainer";aa.className="geToolbarContainer";q.className="geToolbarContainer";n.picker=S;var ia=!1;mxEvent.addListener(q,"mouseenter",function(){n.statusContainer.style.display=
"inline-block"});mxEvent.addListener(q,"mouseleave",function(){ia||(n.statusContainer.style.display="none")});var la=mxUtils.bind(this,function(b){null!=n.notificationBtn&&(null!=b?n.notificationBtn.setAttribute("title",b):n.notificationBtn.removeAttribute("title"))});"1"!=urlParams.embed&&n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus());if(0==n.statusContainer.children.length||1==n.statusContainer.children.length&&null==n.statusContainer.firstChild.getAttribute("class")){null!=
-n.statusContainer.firstChild?la(n.statusContainer.firstChild.getAttribute("title")):la(n.editor.getStatus());var b=n.getCurrentFile(),b=null!=b?b.savingStatusKey:DrawioFile.prototype.savingStatusKey;null!=n.notificationBtn&&n.notificationBtn.getAttribute("title")==mxResources.get(b)+"..."?(n.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(b))+'..."src="'+IMAGE_PATH+'/spin.gif">',n.statusContainer.style.display="inline-block",ia=!0):(n.statusContainer.style.display="none",
-ia=!1)}else n.statusContainer.style.display="inline-block",la(null),ia=!0}));O=d("diagram",null,Editor.drawLogoImage);O.style.boxShadow="none";O.style.opacity="0.4";O.style.padding="6px";O.style.margin="0px";Z.appendChild(O);mxEvent.disableContextMenu(O);mxEvent.addGestureListeners(O,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&this.appIconClicked(b)}),null,null);n.statusContainer.style.position=
+n.statusContainer.firstChild?la(n.statusContainer.firstChild.getAttribute("title")):la(n.editor.getStatus());var b=n.getCurrentFile(),b=null!=b?b.savingStatusKey:DrawioFile.prototype.savingStatusKey;null!=n.notificationBtn&&n.notificationBtn.getAttribute("title")==mxResources.get(b)+"..."?(n.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(b))+'..."src="'+Editor.tailSpin+'">',n.statusContainer.style.display="inline-block",ia=!0):(n.statusContainer.style.display="none",
+ia=!1)}else n.statusContainer.style.display="inline-block",la(null),ia=!0}));O=d("diagram",null,Editor.drawLogoImage);O.style.boxShadow="none";O.style.opacity="0.4";O.style.padding="6px";O.style.margin="0px";aa.appendChild(O);mxEvent.disableContextMenu(O);mxEvent.addGestureListeners(O,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&this.appIconClicked(b)}),null,null);n.statusContainer.style.position=
"";n.statusContainer.style.display="none";n.statusContainer.style.margin="0px";n.statusContainer.style.padding="6px 0px";n.statusContainer.style.maxWidth=Math.min(e-240,280)+"px";n.statusContainer.style.display="inline-block";n.statusContainer.style.textOverflow="ellipsis";n.buttonContainer.style.position="";n.buttonContainer.style.paddingRight="0px";n.buttonContainer.style.display="inline-block";var W=document.createElement("a");W.style.padding="0px";W.style.boxShadow="none";W.className="geMenuItem";
W.style.display="inline-block";W.style.width="40px";W.style.height="12px";W.style.marginBottom="-2px";W.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";W.style.backgroundPosition="top center";W.style.backgroundRepeat="no-repeat";W.setAttribute("title","Minimize");var fa=!1,na=mxUtils.bind(this,function(){S.innerHTML="";if(!fa){var b=function(b,d,e){b=f("",b.funct,null,d,b,e);b.style.width="40px";return c(b,null,"pointer")},c=function(b,c,d){null!=c&&b.setAttribute("title",c);b.style.cursor=
null!=d?d:"default";b.style.margin="2px 0px";S.appendChild(b);mxUtils.br(S);return b};c(n.sidebar.createVertexTemplate("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;",40,20,"Text",mxResources.get("text"),!0,!0,null,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");c(n.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;fontSize=24;pointerEvents=1;"+
-("0"!=urlParams.rough?"sketch=1;jiggle=2;":""),140,160,"",mxResources.get("note"),!0,!0,null,!0),mxResources.get("note"));c(n.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!0,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");c(n.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!0,null,!0),mxResources.get("ellipse"));(function(){var b=new mxCell("",new mxGeometry(0,0,p.defaultEdgeLength,
-0),"edgeStyle=none;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=open;sourcePerimeterSpacing=8;targetPerimeterSpacing=8;fontSize=16;"+("0"!=urlParams.rough?"sketch=1;":""));b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,0),!1);b.geometry.points=[];b.geometry.relative=!0;b.edge=!0;c(n.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,b.geometry.height,mxResources.get("line"),!1,null,!0),mxResources.get("line"));
-b=b.clone();b.style+="shape=flexArrow;rounded=1;startSize=8;endSize=8;";b.geometry.width=p.defaultEdgeLength+20;b.geometry.setTerminalPoint(new mxPoint(0,20),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,20),!1);b=c(n.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,40,mxResources.get("arrow"),!1,null,!0),mxResources.get("arrow"));b.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");b.style.paddingBottom="14px";b.style.marginBottom="14px"})();b(n.actions.get("insertFreehand"),
-mxResources.get("freehand"),Editor.freehandImage);var d=n.actions.get("toggleShapes");b(d,mxResources.get("shapes")+" ("+d.shortcut+")",da);b(n.actions.get("insertTemplate"),mxResources.get("template"),Editor.templateImage)}S.appendChild(W)});mxEvent.addListener(W,"click",mxUtils.bind(this,function(){fa?(mxUtils.setPrefixedStyle(S.style,"transform","translate(0, -50%)"),S.style.padding="8px 6px 4px",S.style.top="50%",S.style.bottom="",S.style.height="",W.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+
-")",W.style.width="40px",W.style.height="12px",W.setAttribute("title","Minimize"),fa=!1,na()):(S.innerHTML="",S.appendChild(W),mxUtils.setPrefixedStyle(S.style,"transform","translate(0, 0)"),S.style.top="",S.style.bottom="12px",S.style.padding="0px",S.style.height="24px",W.style.height="24px",W.style.backgroundImage="url("+Editor.plusImage+")",W.setAttribute("title",mxResources.get("insert")),W.style.width="24px",fa=!0)}));na();n.addListener("darkModeChanged",mxUtils.bind(this,function(){na()}))}else n.editor.addListener("statusChanged",
-mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus())}));if(null!=A){var V=function(b){p.popupMenuHandler.hideMenu();mxEvent.isAltDown(b)?n.actions.get("customZoom").funct():n.actions.get("smartFit").funct()},Q=n.actions.get("zoomIn"),pa=n.actions.get("zoomOut"),X=n.actions.get("resetView"),ea=n.actions.get("fullscreen"),ja=n.actions.get("toggleDarkMode"),ra=n.actions.get("undo"),U=n.actions.get("redo"),ka=f("",ra.funct,null,mxResources.get("undo")+" ("+ra.shortcut+")",ra,Editor.undoImage),
-aa=f("",U.funct,null,mxResources.get("redo")+" ("+U.shortcut+")",U,Editor.redoImage),oa=f("",V,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",X,Editor.zoomFitImage),X=f("",ea.funct,null,mxResources.get("fullscreen"),ea,Editor.fullscreenImage);if(null!=I){var sa=n.actions.get("delete"),ca=f("",sa.funct,null,mxResources.get("delete"),sa,Editor.trashImage);ca.style.opacity="0.1";Z.appendChild(ca);sa.addListener("stateChanged",function(){ca.style.opacity=sa.enabled?"0.4":"0.1"});A=function(){ka.style.display=
-0<n.editor.undoManager.history.length||p.isEditing()?"inline-block":"none";aa.style.display=ka.style.display;ka.style.opacity=ra.enabled?"0.4":"0.1";aa.style.opacity=U.enabled?"0.4":"0.1"};Z.appendChild(ka);Z.appendChild(aa);ra.addListener("stateChanged",A);U.addListener("stateChanged",A);A();null!=urlParams.layers&&(A=n.actions.get("layers"),A=f("",A.funct,null,mxResources.get("layers"),A,Editor.layersImage),A.style.opacity="0.4",I.appendChild(A));null!=urlParams.tags&&(A=n.actions.get("tags"),A=
-f("",A.funct,null,mxResources.get("tags"),A,Editor.tagsImage),A.style.opacity="0.4",I.appendChild(A));A=n.actions.get("outline");A=f("",A.funct,null,mxResources.get("outline"),A,Editor.outlineImage);A.style.opacity="0.4";I.appendChild(A);A=f("",pa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",pa,Editor.zoomOutImage);A.style.opacity="0.4";I.appendChild(A);var O=document.createElement("div");O.innerHTML="100%";O.setAttribute("title",mxResources.get("fitWindow")+"/"+mxResources.get("resetView")+
-" (Enter)");O.style.display="inline-block";O.style.cursor="pointer";O.style.textAlign="center";O.style.whiteSpace="nowrap";O.style.paddingRight="10px";O.style.textDecoration="none";O.style.verticalAlign="top";O.style.padding="6px 0";O.style.fontSize="14px";O.style.width="40px";O.style.opacity="0.4";I.appendChild(O);mxEvent.addListener(O,"click",V);V=f("",Q.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Q,Editor.zoomInImage);V.style.opacity="0.4";I.appendChild(V);var ta=
-f("",ja.funct,null,mxResources.get("dark"),ja,Editor.isDarkMode()?Editor.lightImage:Editor.darkImage);ta.style.opacity="0.4";(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&I.appendChild(ta);n.addListener("darkModeChanged",mxUtils.bind(this,function(){ta.style.backgroundImage="url("+(Editor.isDarkMode()?Editor.lightImage:Editor.darkImage)+")"}));ea.visible&&(X.style.opacity="0.4",I.appendChild(X));var ba=this.createPageMenuTab(!1);ba.style.display="none";ba.style.position="";ba.style.marginLeft=
-"";ba.style.top="";ba.style.left="";ba.style.height="100%";ba.style.lineHeight="";ba.style.borderStyle="none";ba.style.padding="3px 0";ba.style.margin="0px";ba.style.background="";ba.style.border="";ba.style.boxShadow="none";ba.style.verticalAlign="top";ba.firstChild.style.height="100%";ba.firstChild.style.opacity="0.6";ba.firstChild.style.margin="0px";I.appendChild(ba);n.addListener("fileDescriptorChanged",function(){ba.style.display="1"==urlParams.pages||null!=n.pages&&1<n.pages.length?"inline-block":
-"none"});n.tabContainer.style.visibility="hidden";q.style.cssText="position:absolute;right:12px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";Z.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
-I.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";y.appendChild(Z);y.appendChild(I);S.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";y.appendChild(S);window.setTimeout(function(){mxUtils.setPrefixedStyle(S.style,
+("0"!=urlParams.rough?"sketch=1;jiggle=2;":""),140,160,"",mxResources.get("note"),!0,!0,null,!0),mxResources.get("note"));c(n.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!0,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");c(n.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!0,null,!0),mxResources.get("ellipse"));(function(){var b="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;endArrow=open;sourcePerimeterSpacing=8;targetPerimeterSpacing=8;fontSize=16;"+
+("0"!=urlParams.rough?"sketch=1;":""),d=new mxCell("",new mxGeometry(0,0,p.defaultEdgeLength,0),b+"curved=1;rounded=0;");d.geometry.setTerminalPoint(new mxPoint(0,0),!0);d.geometry.setTerminalPoint(new mxPoint(d.geometry.width,0),!1);d.geometry.points=[];d.geometry.relative=!0;d.edge=!0;c(n.sidebar.createEdgeTemplateFromCells([d],d.geometry.width,d.geometry.height,mxResources.get("line"),!1,null,!0),mxResources.get("line"));d=d.clone();d.style=b+"shape=flexArrow;rounded=1;startSize=8;endSize=8;";
+d.geometry.width=p.defaultEdgeLength+20;d.geometry.setTerminalPoint(new mxPoint(0,20),!0);d.geometry.setTerminalPoint(new mxPoint(d.geometry.width,20),!1);b=c(n.sidebar.createEdgeTemplateFromCells([d],d.geometry.width,40,mxResources.get("arrow"),!1,null,!0),mxResources.get("arrow"));b.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");b.style.paddingBottom="14px";b.style.marginBottom="14px"})();b(n.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);
+var d=n.actions.get("toggleShapes");b(d,mxResources.get("shapes")+" ("+d.shortcut+")",da);b(n.actions.get("insertTemplate"),mxResources.get("template"),Editor.templateImage)}S.appendChild(W)});mxEvent.addListener(W,"click",mxUtils.bind(this,function(){fa?(mxUtils.setPrefixedStyle(S.style,"transform","translate(0, -50%)"),S.style.padding="8px 6px 4px",S.style.top="50%",S.style.bottom="",S.style.height="",W.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",W.style.width="40px",W.style.height=
+"12px",W.setAttribute("title","Minimize"),fa=!1,na()):(S.innerHTML="",S.appendChild(W),mxUtils.setPrefixedStyle(S.style,"transform","translate(0, 0)"),S.style.top="",S.style.bottom="12px",S.style.padding="0px",S.style.height="24px",W.style.height="24px",W.style.backgroundImage="url("+Editor.plusImage+")",W.setAttribute("title",mxResources.get("insert")),W.style.width="24px",fa=!0)}));na();n.addListener("darkModeChanged",mxUtils.bind(this,function(){na()}))}else n.editor.addListener("statusChanged",
+mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus())}));if(null!=A){var V=function(b){p.popupMenuHandler.hideMenu();mxEvent.isAltDown(b)?n.actions.get("customZoom").funct():n.actions.get("smartFit").funct()},Q=n.actions.get("zoomIn"),ra=n.actions.get("zoomOut"),X=n.actions.get("resetView"),ea=n.actions.get("fullscreen"),ja=n.actions.get("toggleDarkMode"),sa=n.actions.get("undo"),U=n.actions.get("redo"),ka=f("",sa.funct,null,mxResources.get("undo")+" ("+sa.shortcut+")",sa,Editor.undoImage),
+Z=f("",U.funct,null,mxResources.get("redo")+" ("+U.shortcut+")",U,Editor.redoImage),qa=f("",V,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",X,Editor.zoomFitImage),X=f("",ea.funct,null,mxResources.get("fullscreen"),ea,Editor.fullscreenImage);if(null!=K){var ta=n.actions.get("delete"),ca=f("",ta.funct,null,mxResources.get("delete"),ta,Editor.trashImage);ca.style.opacity="0.1";aa.appendChild(ca);ta.addListener("stateChanged",function(){ca.style.opacity=ta.enabled?"0.4":"0.1"});A=function(){ka.style.display=
+0<n.editor.undoManager.history.length||p.isEditing()?"inline-block":"none";Z.style.display=ka.style.display;ka.style.opacity=sa.enabled?"0.4":"0.1";Z.style.opacity=U.enabled?"0.4":"0.1"};aa.appendChild(ka);aa.appendChild(Z);sa.addListener("stateChanged",A);U.addListener("stateChanged",A);A();null!=urlParams.layers&&(A=n.actions.get("layers"),A=f("",A.funct,null,mxResources.get("layers"),A,Editor.layersImage),A.style.opacity="0.4",K.appendChild(A));null!=urlParams.tags&&(A=n.actions.get("tags"),A=
+f("",A.funct,null,mxResources.get("tags"),A,Editor.tagsImage),A.style.opacity="0.4",K.appendChild(A));A=n.actions.get("outline");A=f("",A.funct,null,mxResources.get("outline"),A,Editor.outlineImage);A.style.opacity="0.4";K.appendChild(A);A=f("",ra.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",ra,Editor.zoomOutImage);A.style.opacity="0.4";K.appendChild(A);var O=document.createElement("div");O.innerHTML="100%";O.setAttribute("title",mxResources.get("fitWindow")+"/"+mxResources.get("resetView")+
+" (Enter)");O.style.display="inline-block";O.style.cursor="pointer";O.style.textAlign="center";O.style.whiteSpace="nowrap";O.style.paddingRight="10px";O.style.textDecoration="none";O.style.verticalAlign="top";O.style.padding="6px 0";O.style.fontSize="14px";O.style.width="40px";O.style.opacity="0.4";K.appendChild(O);mxEvent.addListener(O,"click",V);V=f("",Q.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Q,Editor.zoomInImage);V.style.opacity="0.4";K.appendChild(V);var ua=
+f("",ja.funct,null,mxResources.get("dark"),ja,Editor.isDarkMode()?Editor.lightImage:Editor.darkImage);ua.style.opacity="0.4";(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&K.appendChild(ua);n.addListener("darkModeChanged",mxUtils.bind(this,function(){ua.style.backgroundImage="url("+(Editor.isDarkMode()?Editor.lightImage:Editor.darkImage)+")"}));ea.visible&&(X.style.opacity="0.4",K.appendChild(X));var ba=this.createPageMenuTab(!1);ba.style.display="none";ba.style.position="";ba.style.marginLeft=
+"";ba.style.top="";ba.style.left="";ba.style.height="100%";ba.style.lineHeight="";ba.style.borderStyle="none";ba.style.padding="3px 0";ba.style.margin="0px";ba.style.background="";ba.style.border="";ba.style.boxShadow="none";ba.style.verticalAlign="top";ba.firstChild.style.height="100%";ba.firstChild.style.opacity="0.6";ba.firstChild.style.margin="0px";K.appendChild(ba);n.addListener("fileDescriptorChanged",function(){ba.style.display="1"==urlParams.pages||null!=n.pages&&1<n.pages.length?"inline-block":
+"none"});n.tabContainer.style.visibility="hidden";q.style.cssText="position:absolute;right:12px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";aa.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
+K.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";y.appendChild(aa);y.appendChild(K);S.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";y.appendChild(S);window.setTimeout(function(){mxUtils.setPrefixedStyle(S.style,
"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(y)}else q.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;",this.tabContainer.style.right="70px",O=u.addMenu("100%",A.funct),O.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)"),O.style.whiteSpace="nowrap",O.style.paddingRight="10px",O.style.textDecoration="none",O.style.textDecoration="none",O.style.overflow="hidden",
O.style.visibility="hidden",O.style.textAlign="center",O.style.cursor="pointer",O.style.height=parseInt(n.tabContainerHeight)-1+"px",O.style.lineHeight=parseInt(n.tabContainerHeight)+1+"px",O.style.position="absolute",O.style.display="block",O.style.fontSize="12px",O.style.width="59px",O.style.right="0px",O.style.bottom="0px",O.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")",O.style.backgroundPosition="right 6px center",O.style.backgroundRepeat="no-repeat",y.appendChild(O);ea=mxUtils.bind(this,
-function(){O.innerHTML=Math.round(100*n.editor.graph.view.scale)+"%"});n.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ea);n.editor.addListener("resetGraphView",ea);n.editor.addListener("pageSelected",ea);var xa=n.setGraphEnabled;n.setGraphEnabled=function(){xa.apply(this,arguments);null!=this.tabContainer&&(O.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==I?this.tabContainerHeight+"px":"0px")}}y.appendChild(q);
-y.appendChild(n.diagramContainer);l.appendChild(y);n.updateTabContainer();null==I&&y.appendChild(n.tabContainer);var ua=null;k();mxEvent.addListener(window,"resize",function(){k();null!=n.sidebarWindow&&n.sidebarWindow.window.fit();null!=n.formatWindow&&n.formatWindow.window.fit();null!=n.actions.outlineWindow&&n.actions.outlineWindow.window.fit();null!=n.actions.layersWindow&&n.actions.layersWindow.window.fit();null!=n.menus.tagsWindow&&n.menus.tagsWindow.window.fit();null!=n.menus.findWindow&&n.menus.findWindow.window.fit();
+function(){O.innerHTML=Math.round(100*n.editor.graph.view.scale)+"%"});n.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ea);n.editor.addListener("resetGraphView",ea);n.editor.addListener("pageSelected",ea);var ya=n.setGraphEnabled;n.setGraphEnabled=function(){ya.apply(this,arguments);null!=this.tabContainer&&(O.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==K?this.tabContainerHeight+"px":"0px")}}y.appendChild(q);
+y.appendChild(n.diagramContainer);l.appendChild(y);n.updateTabContainer();null==K&&y.appendChild(n.tabContainer);var va=null;k();mxEvent.addListener(window,"resize",function(){k();null!=n.sidebarWindow&&n.sidebarWindow.window.fit();null!=n.formatWindow&&n.formatWindow.window.fit();null!=n.actions.outlineWindow&&n.actions.outlineWindow.window.fit();null!=n.actions.layersWindow&&n.actions.layersWindow.window.fit();null!=n.menus.tagsWindow&&n.menus.tagsWindow.window.fit();null!=n.menus.findWindow&&n.menus.findWindow.window.fit();
null!=n.menus.findReplaceWindow&&n.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,c,e,k,g,p,t){this.file=b;this.id=c;this.content=e;this.modifiedDate=k;this.createdDate=g;this.isResolved=p;this.user=t;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,c,e,k,g){c()};DrawioComment.prototype.editComment=function(b,c,e){c()};DrawioComment.prototype.deleteComment=function(b,c){b()};DrawioUser=function(b,c,e,k,g){this.id=b;this.email=c;this.displayName=e;this.pictureUrl=k;this.locale=g};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About \naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found \nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#ffffff"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#2a2a2a"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(b,c,e){this.init(b,c,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;
GraphViewer.prototype.autoOrigin=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.forceCenter=!1;GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.allowZoomOut=!0;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;GraphViewer.prototype.responsive=!1;
@@ -3998,19 +4002,19 @@ e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbar
function(){mxUtils.setOpacity(e,0);k=null;g=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";g=null}),100)}),b||200)}),t=mxUtils.bind(this,function(b){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=g&&(window.clearTimeout(g),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,b||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||(t(30),p())}));mxEvent.addListener(e,mxClient.IS_POINTER?
"pointermove":"mousemove",function(b){mxEvent.consume(b)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(b){t(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(b){t(100);mxEvent.consume(b)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||t(30)}));var d=this.graph,f=d.getTolerance();d.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();
this.scrollLeft=d.container.scrollLeft;this.scrollTop=d.container.scrollTop},mouseMove:function(b,c){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-d.container.scrollLeft)<f&&Math.abs(this.scrollTop-d.container.scrollTop)<f&&Math.abs(this.startX-c.getGraphX())<f&&Math.abs(this.startY-c.getGraphY())<f&&(0<parseFloat(e.style.opacity||0)?p():t(30))}})}for(var l=this.toolbarItems,m=0,q=null,n=null,u=null,v=null,y=0;y<l.length;y++){var x=l[y];if("pages"==x){v=c.ownerDocument.createElement("div");
-v.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(v,70);var G=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");G.style.borderRightStyle="none";G.style.paddingLeft="0px";G.style.paddingRight="0px";e.appendChild(v);var C=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
-1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");C.style.paddingLeft="0px";C.style.paddingRight="0px";x=mxUtils.bind(this,function(){v.innerHTML="";mxUtils.write(v,this.currentPage+1+" / "+this.diagrams.length);v.style.display=1<this.diagrams.length?"inline-block":"none";G.style.display=v.style.display;C.style.display=v.style.display});this.addListener("graphChanged",x);x()}else if("zoom"==x)this.zoomEnabled&&(b(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
-mxResources.get("zoomOut")||"Zoom Out"),b(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),b(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==x){if(this.layersEnabled){var E=this.graph.getModel(),J=b(mxUtils.bind(this,function(b){if(null!=q)q.parentNode.removeChild(q),
+v.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(v,70);var E=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");E.style.borderRightStyle="none";E.style.paddingLeft="0px";E.style.paddingRight="0px";e.appendChild(v);var C=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");C.style.paddingLeft="0px";C.style.paddingRight="0px";x=mxUtils.bind(this,function(){v.innerHTML="";mxUtils.write(v,this.currentPage+1+" / "+this.diagrams.length);v.style.display=1<this.diagrams.length?"inline-block":"none";E.style.display=v.style.display;C.style.display=v.style.display});this.addListener("graphChanged",x);x()}else if("zoom"==x)this.zoomEnabled&&(b(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
+mxResources.get("zoomOut")||"Zoom Out"),b(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),b(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==x){if(this.layersEnabled){var F=this.graph.getModel(),I=b(mxUtils.bind(this,function(b){if(null!=q)q.parentNode.removeChild(q),
q=null;else{q=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var b=this.graph.getGraphBounds(),c=this.graph.view;0>b.x||0>b.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:c.translate.clone(),scale:c.scale}):null!=this.graph.originalViewState&&0<b.x/c.scale+this.graph.originalViewState.translate.x-c.translate.x&&0<b.y/c.scale+this.graph.originalViewState.translate.y-c.translate.y&&
-(c.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:c.translate.clone(),scale:c.scale})}}));mxEvent.addListener(q,"mouseleave",function(){q.parentNode.removeChild(q);q=null});b=J.getBoundingClientRect();q.style.width="140px";q.style.padding="2px 0px 2px 0px";q.style.border="1px solid #d0d0d0";q.style.backgroundColor="#eee";q.style.fontFamily=Editor.defaultHtmlFont;q.style.fontSize=
-"11px";q.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(q,80);var c=mxUtils.getDocumentScrollOrigin(document);q.style.left=c.x+b.left-1+"px";q.style.top=c.y+b.bottom-2+"px";document.body.appendChild(q)}}),Editor.layersImage,mxResources.get("layers")||"Layers");E.addListener(mxEvent.CHANGE,function(){J.style.display=1<E.getChildCount(E.root)?"inline-block":"none"});J.style.display=1<E.getChildCount(E.root)?"inline-block":"none"}}else if("tags"==x){if(this.tagsEnabled){var L=b(mxUtils.bind(this,
+(c.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:c.translate.clone(),scale:c.scale})}}));mxEvent.addListener(q,"mouseleave",function(){q.parentNode.removeChild(q);q=null});b=I.getBoundingClientRect();q.style.width="140px";q.style.padding="2px 0px 2px 0px";q.style.border="1px solid #d0d0d0";q.style.backgroundColor="#eee";q.style.fontFamily=Editor.defaultHtmlFont;q.style.fontSize=
+"11px";q.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(q,80);var c=mxUtils.getDocumentScrollOrigin(document);q.style.left=c.x+b.left-1+"px";q.style.top=c.y+b.bottom-2+"px";document.body.appendChild(q)}}),Editor.layersImage,mxResources.get("layers")||"Layers");F.addListener(mxEvent.CHANGE,function(){I.style.display=1<F.getChildCount(F.root)?"inline-block":"none"});I.style.display=1<F.getChildCount(F.root)?"inline-block":"none"}}else if("tags"==x){if(this.tagsEnabled){var L=b(mxUtils.bind(this,
function(b){null==n&&(n=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),n.div.getElementsByTagName("div")[0].style.position="",n.div.style.maxHeight="160px",n.div.style.maxWidth="120px",n.div.style.padding="2px",n.div.style.overflow="auto",n.div.style.height="auto",n.div.style.position="fixed",n.div.style.fontFamily=Editor.defaultHtmlFont,n.div.style.fontSize="11px",n.div.style.backgroundColor="#eee",n.div.style.color="#000",n.div.style.border="1px solid #d0d0d0",n.div.style.zIndex=
-this.toolbarZIndex+1,mxUtils.setOpacity(n.div,80));if(null!=u)u.parentNode.removeChild(u),u=null;else{u=n.div;mxEvent.addListener(u,"mouseleave",function(){u.parentNode.removeChild(u);u=null});b=L.getBoundingClientRect();var c=mxUtils.getDocumentScrollOrigin(document);u.style.left=c.x+b.left-1+"px";u.style.top=c.y+b.bottom-2+"px";document.body.appendChild(u);n.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");E.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){L.style.display=0<
+this.toolbarZIndex+1,mxUtils.setOpacity(n.div,80));if(null!=u)u.parentNode.removeChild(u),u=null;else{u=n.div;mxEvent.addListener(u,"mouseleave",function(){u.parentNode.removeChild(u);u=null});b=L.getBoundingClientRect();var c=mxUtils.getDocumentScrollOrigin(document);u.style.left=c.x+b.left-1+"px";u.style.top=c.y+b.bottom-2+"px";document.body.appendChild(u);n.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");F.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){L.style.display=0<
this.graph.getAllTags().length?"inline-block":"none"}));L.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==x?this.lightboxEnabled&&b(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(x=this.graphConfig["toolbar-buttons"][x],null!=x&&(x.elem=b(null==x.enabled||x.enabled?x.handler:function(){},x.image,x.title,x.enabled)))}null!=this.graph.minimumContainerSize&&
-(this.graph.minimumContainerSize.width=34*m);null!=this.graphConfig.title&&(l=c.ownerDocument.createElement("div"),l.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",l.setAttribute("title",this.graphConfig.title),mxUtils.write(l,this.graphConfig.title),mxUtils.setOpacity(l,70),e.appendChild(l),this.filename=l);this.minToolbarWidth=34*m;var H=c.style.border,K=mxUtils.bind(this,function(){e.style.width=
+(this.graph.minimumContainerSize.width=34*m);null!=this.graphConfig.title&&(l=c.ownerDocument.createElement("div"),l.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",l.setAttribute("title",this.graphConfig.title),mxUtils.write(l,this.graphConfig.title),mxUtils.setOpacity(l,70),e.appendChild(l),this.filename=l);this.minToolbarWidth=34*m;var H=c.style.border,J=mxUtils.bind(this,function(){e.style.width=
"inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,c.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var b=c.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},b={left:b.left-d.left,top:b.top-d.top,bottom:b.bottom-d.top,right:b.right-d.left};e.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?
e.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=b.top+1+"px"):e.style.top=b.top+"px";"1px solid transparent"==H&&(c.style.border="1px solid #d0d0d0");document.body.appendChild(e);var f=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=q&&(q.parentNode.removeChild(q),q=null);c.style.border=H});mxEvent.addListener(document,"mousemove",function(b){for(b=mxEvent.getSource(b);null!=b;){if(b==
-c||b==e||b==q)return;b=b.parentNode}f()});mxEvent.addListener(document.body,"mouseleave",function(b){f()})}else e.style.top=-this.toolbarHeight+"px",c.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(c,"mouseenter",K):K();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&K()})).observe(c)};
+c||b==e||b==q)return;b=b.parentNode}f()});mxEvent.addListener(document.body,"mouseleave",function(b){f()})}else e.style.top=-this.toolbarHeight+"px",c.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(c,"mouseenter",J):J();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&J()})).observe(c)};
GraphViewer.prototype.disableButton=function(b){var c=this.graphConfig["toolbar-buttons"][b];null!=c&&(mxUtils.setOpacity(c.elem,30),mxEvent.removeListener(c.elem,"click",c.handler),mxEvent.addListener(c.elem,"mouseenter",function(){c.elem.style.backgroundColor="#eee"}))};
GraphViewer.prototype.addClickHandler=function(b,c){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,k){if(null==k)for(var g=mxEvent.getSource(e);g!=b.container&&null!=g&&null==k;)"a"==g.nodeName.toLowerCase()&&(k=g.getAttribute("href")),g=g.parentNode;null!=c?null==k||b.isCustomLink(k)?mxEvent.consume(e):b.isExternalProtocol(k)||b.isBlankLink(k)||window.setTimeout(function(){c.destroy()},0):null!=k&&null==c&&b.isCustomLink(k)&&
(mxEvent.isTouchEvent(e)||!mxEvent.isPopupTrigger(e))&&b.customLinkClicked(k)&&(mxUtils.clearSelection(),mxEvent.consume(e))}),mxUtils.bind(this,function(b){null!=c||!this.lightboxClickEnabled||mxEvent.isTouchEvent(b)&&0!=this.toolbarItems.length||this.showLightbox()}))};
@@ -4032,7 +4036,7 @@ GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type=
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,c,e){if(null!=GraphViewer.cachedUrls[b])c(GraphViewer.cachedUrls[b]);else{var k=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;k.open("GET",b);k.onload=function(){c(null!=k.getText?k.getText():k.responseText)};k.onerror=e;k.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(b){return window.setTimeout(b,20)},c=function(e,k){function g(){this.q=[];this.add=function(b){this.q.push(b)};var b,c;this.call=function(){b=0;for(c=this.q.length;b<c;b++)this.q[b].call()}}function p(b,c){return b.currentStyle?b.currentStyle[c]:window.getComputedStyle?window.getComputedStyle(b,null).getPropertyValue(c):b.style[c]}function t(c,d){if(!c.resizedAttached)c.resizedAttached=
new g,c.resizedAttached.add(d);else if(c.resizedAttached){c.resizedAttached.add(d);return}c.resizeSensor=document.createElement("div");c.resizeSensor.className="resize-sensor";c.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";c.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
-c.appendChild(c.resizeSensor);"static"==p(c,"position")&&(c.style.position="relative");var e=c.resizeSensor.childNodes[0],f=e.childNodes[0],k=c.resizeSensor.childNodes[1],l=function(){f.style.width="100000px";f.style.height="100000px";e.scrollLeft=1E5;e.scrollTop=1E5;k.scrollLeft=1E5;k.scrollTop=1E5};l();var m=!1,n=function(){c.resizedAttached&&(m&&(c.resizedAttached.call(),m=!1),b(n))};b(n);var q,t,L,H,K=function(){if((L=c.offsetWidth)!=q||(H=c.offsetHeight)!=t)m=!0,q=L,t=H;l()},B=function(b,c,d){b.attachEvent?
-b.attachEvent("on"+c,d):b.addEventListener(c,d)};B(e,"scroll",K);B(k,"scroll",K)}var d=function(){GraphViewer.resizeSensorEnabled&&k()},f=Object.prototype.toString.call(e),l="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(l)for(var f=0,m=e.length;f<m;f++)t(e[f],d);else t(e,d);this.detach=function(){if(l)for(var b=0,d=e.length;b<d;b++)c.detach(e[b]);else c.detach(e)}};
+c.appendChild(c.resizeSensor);"static"==p(c,"position")&&(c.style.position="relative");var e=c.resizeSensor.childNodes[0],f=e.childNodes[0],k=c.resizeSensor.childNodes[1],l=function(){f.style.width="100000px";f.style.height="100000px";e.scrollLeft=1E5;e.scrollTop=1E5;k.scrollLeft=1E5;k.scrollTop=1E5};l();var m=!1,n=function(){c.resizedAttached&&(m&&(c.resizedAttached.call(),m=!1),b(n))};b(n);var q,t,L,H,J=function(){if((L=c.offsetWidth)!=q||(H=c.offsetHeight)!=t)m=!0,q=L,t=H;l()},B=function(b,c,d){b.attachEvent?
+b.attachEvent("on"+c,d):b.addEventListener(c,d)};B(e,"scroll",J);B(k,"scroll",J)}var d=function(){GraphViewer.resizeSensorEnabled&&k()},f=Object.prototype.toString.call(e),l="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(l)for(var f=0,m=e.length;f<m;f++)t(e[f],d);else t(e,d);this.detach=function(){if(l)for(var b=0,d=e.length;b<d;b++)c.detach(e[b]);else c.detach(e)}};
c.detach=function(b){b.resizeSensor&&(b.removeChild(b.resizeSensor),delete b.resizeSensor,delete b.resizedAttached)};window.ResizeSensor=c})();
(function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();
diff --git a/src/main/webapp/mxgraph/mxClient.js b/src/main/webapp/mxgraph/mxClient.js
index f558e8ae..2591f2f3 100644
--- a/src/main/webapp/mxgraph/mxClient.js
+++ b/src/main/webapp/mxgraph/mxClient.js
@@ -1,4 +1,4 @@
-var mxClient={VERSION:"15.2.7",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+var mxClient={VERSION:"15.2.9",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||
0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_WIN:0<navigator.appVersion.indexOf("Win"),IS_MAC:0<navigator.appVersion.indexOf("Mac"),
@@ -426,8 +426,8 @@ var mxStencilRegistry={stencils:{},addStencil:function(a,b){mxStencilRegistry.st
(function(){function a(a){a=null!=a?a:2;return function(b,c,d,k,l,m,n,p,q,r){c=l*q*1.118;p=m*q*1.118;l*=n+q;m*=n+q;var e=k.clone();e.x-=c;e.y-=p;n=d!=mxConstants.ARROW_CLASSIC&&d!=mxConstants.ARROW_CLASSIC_THIN?1:.75;k.x+=-l*n-c;k.y+=-m*n-p;return function(){b.begin();b.moveTo(e.x,e.y);b.lineTo(e.x-l-m/a,e.y-m+l/a);d!=mxConstants.ARROW_CLASSIC&&d!=mxConstants.ARROW_CLASSIC_THIN||b.lineTo(e.x-3*l/4,e.y-3*m/4);b.lineTo(e.x+m/a-l,e.y-m-l/a);b.close();r?b.fillAndStroke():b.stroke()}}}function b(a){a=
null!=a?a:2;return function(b,c,d,k,l,m,n,p,q,r){c=l*q*1.118;d=m*q*1.118;l*=n+q;m*=n+q;var e=k.clone();e.x-=c;e.y-=d;k.x+=2*-c;k.y+=2*-d;return function(){b.begin();b.moveTo(e.x-l-m/a,e.y-m+l/a);b.lineTo(e.x,e.y);b.lineTo(e.x+m/a-l,e.y-m-l/a);b.stroke()}}}function c(a,b,c,g,k,l,m,n,p,q){n=c==mxConstants.ARROW_DIAMOND?.7071:.9862;b=k*p*n;n*=l*p;k*=m+p;l*=m+p;var d=g.clone();d.x-=b;d.y-=n;g.x+=-k-b;g.y+=-l-n;var e=c==mxConstants.ARROW_DIAMOND?2:3.4;return function(){a.begin();a.moveTo(d.x,d.y);a.lineTo(d.x-
k/2-l/e,d.y+k/e-l/2);a.lineTo(d.x-k,d.y-l);a.lineTo(d.x-k/2+l/e,d.y-l/2-k/e);a.close();q?a.fillAndStroke():a.stroke()}}mxMarker.addMarker("classic",a(2));mxMarker.addMarker("classicThin",a(3));mxMarker.addMarker("block",a(2));mxMarker.addMarker("blockThin",a(3));mxMarker.addMarker("open",b(2));mxMarker.addMarker("openThin",b(3));mxMarker.addMarker("oval",function(a,b,c,g,k,l,m,n,p,q){var d=m/2,e=g.clone();g.x-=k*d;g.y-=l*d;return function(){a.ellipse(e.x-d,e.y-d,m,m);q?a.fillAndStroke():a.stroke()}});
-mxMarker.addMarker("diamond",c);mxMarker.addMarker("diamondThin",c)})();function mxActor(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxActor,mxShape);mxActor.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();this.redrawPath(a,b,c,d,e);a.fillAndStroke()};
-mxActor.prototype.redrawPath=function(a,b,c,d,e){b=d/3;a.moveTo(0,e);a.curveTo(0,3*e/5,0,2*e/5,d/2,2*e/5);a.curveTo(d/2-b,2*e/5,d/2-b,0,d/2,0);a.curveTo(d/2+b,0,d/2+b,2*e/5,d/2,2*e/5);a.curveTo(d,2*e/5,d,3*e/5,d,e);a.close()};function mxCloud(a,b,c,d){mxActor.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxCloud,mxActor);
+mxMarker.addMarker("baseDash",function(a,b,c,g,k,l,m,n,p,q){var d=k*(m+p+1),e=l*(m+p+1);return function(){a.begin();a.moveTo(g.x-e/2,g.y+d/2);a.lineTo(g.x+e/2,g.y-d/2);a.stroke()}});mxMarker.addMarker("diamond",c);mxMarker.addMarker("diamondThin",c)})();function mxActor(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxActor,mxShape);
+mxActor.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();this.redrawPath(a,b,c,d,e);a.fillAndStroke()};mxActor.prototype.redrawPath=function(a,b,c,d,e){b=d/3;a.moveTo(0,e);a.curveTo(0,3*e/5,0,2*e/5,d/2,2*e/5);a.curveTo(d/2-b,2*e/5,d/2-b,0,d/2,0);a.curveTo(d/2+b,0,d/2+b,2*e/5,d/2,2*e/5);a.curveTo(d,2*e/5,d,3*e/5,d,e);a.close()};function mxCloud(a,b,c,d){mxActor.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxCloud,mxActor);
mxCloud.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(.25*d,.25*e);a.curveTo(.05*d,.25*e,0,.5*e,.16*d,.55*e);a.curveTo(0,.66*e,.18*d,.9*e,.31*d,.8*e);a.curveTo(.4*d,e,.7*d,e,.8*d,.8*e);a.curveTo(d,.8*e,d,.6*e,.875*d,.5*e);a.curveTo(d,.3*e,.8*d,.1*e,.625*d,.2*e);a.curveTo(.5*d,.05*e,.3*d,.05*e,.25*d,.25*e);a.close()};function mxRectangleShape(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxRectangleShape,mxShape);
mxRectangleShape.prototype.isHtmlAllowed=function(){var a=!0;null!=this.style&&(a="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));return!this.isRounded&&!this.glass&&0==this.rotation&&(a||null!=this.fill&&this.fill!=mxConstants.NONE)};
mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?f=Math.min(d/2,Math.min(e/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.js
index 44732245..5f9756ec 100644
--- a/src/main/webapp/service-worker.js
+++ b/src/main/webapp/service-worker.js
@@ -1,2 +1,2 @@
-if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let i=Promise.resolve();return r[e]||(i=new Promise((async i=>{if("document"in self){const r=document.createElement("script");r.src=e,document.head.appendChild(r),r.onload=i}else importScripts(e),i()}))),i.then((()=>{if(!r[e])throw new Error(`Module ${e} didn’t register its module`);return r[e]}))},i=(i,r)=>{Promise.all(i.map(e)).then((e=>r(1===e.length?e[0]:e)))},r={require:Promise.resolve(i)};self.define=(i,a,c)=>{r[i]||(r[i]=Promise.resolve().then((()=>{let r={};const s={uri:location.origin+i.slice(1)};return Promise.all(a.map((i=>{switch(i){case"exports":return r;case"module":return s;default:return e(i)}}))).then((e=>{const i=c(...e);return r.default||(r.default=i),r}))})))}}define("./service-worker.js",["./workbox-f163abaa"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"js/app.min.js",revision:"dffd9a8f04a04b4f46693f15dbe20edc"},{url:"js/extensions.min.js",revision:"86e02cae3cde5ed3af4ffd256c6bcf57"},{url:"js/stencils.min.js",revision:"c170a229d8726934c0d6b04c2214a36c"},{url:"js/shapes-14-6-5.min.js",revision:"2a45abd06dfe78e69135e9f87f9b78d3"},{url:"js/math-print.js",revision:"9d98c920695f6c3395da4b68f723e60a"},{url:"index.html",revision:"28ab148081b0ccd22ad2db634d538b6b"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/grapheditor.css",revision:"2628014aa2e769f91fb7cfd2a8ca645f"},{url:"styles/atlas.css",revision:"e8152cda9233d3a3af017422993abfce"},{url:"styles/dark.css",revision:"87d5d01385c5d0f0c4c4f5d0f3532826"},{url:"js/croppie/croppie.min.css",revision:"fc297c9002c79c15a132f13ee3ec427e"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"855dd7894435a4b2886691d653f81d8f"},{url:"connect/jira/editor-1-3-3.html",revision:"a2b0e7267a08a838f3cc404eba831ec0"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"2ce6e99d95113e9ca6b24343cea202e0"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"ba7ece2dfb2833b72f97280d7092f25e"},{url:"connect/jira/viewerPanel.js",revision:"6e9412c359a21b86dc7c5128bf6208d4"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"375a89b2a867264a395f384d00eeba13"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"197ed5837ed27992688fc424699a9a78"},{url:"connect/jira/fullscreen-viewer.js",revision:"4e0775a6c156a803e777870623ac7c3e"},{url:"plugins/connectJira.js",revision:"4cefa13414e0d406550f3c073923080c"},{url:"plugins/cConf-comments.js",revision:"c787357209cff2986dcca567b599e2ef"},{url:"plugins/cConf-1-4-8.js",revision:"ec6e55011746305549024292f46270bd"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"74878fb4834967aa4a68647cab7888c1"},{url:"connect/new_common/cac.js",revision:"3d8c436c566db645fb1e6e6ba9f69bbc"},{url:"connect/gdrive_common/gac.js",revision:"38f1df3ecc4d78290493f47e62202138"},{url:"connect/onedrive_common/ac.js",revision:"293aa21acaf0a3349686f420b2be874a"},{url:"connect/confluence/viewer-init.js",revision:"4a60c6c805cab7bc782f1e52f7818d9f"},{url:"connect/confluence/viewer.js",revision:"8ce5887817b32603d1dcd23a1011989d"},{url:"connect/confluence/viewer-1-4-42.html",revision:"c7b38b3af4eb7a58ab6dc4791216530e"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"8cd74a2fb60bf2e3e86026d66107cf11"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"374099e93482baae432490d9e55e4e24"},{url:"connect/confluence/includeDiagram.html",revision:"538252ed4fed6d5e9f4e53b35954c116"},{url:"connect/confluence/macro-editor.js",revision:"e273a48b8e81faac4530bf1a68d75aa0"},{url:"math/MathJax.js",revision:"b2c103388b71bb3d11cbf9aa45fe9b68"},{url:"math/config/TeX-MML-AM_SVG-full.js",revision:"d5cb8ac04050983170ae4af145bc66ff"},{url:"math/jax/output/SVG/fonts/TeX/fontdata.js",revision:"495e5a410955d1b6178870e605890ede"},{url:"math/jax/element/mml/optable/BasicLatin.js",revision:"cac9b2e71382e62270baa55fab07cc13"},{url:"math/jax/output/SVG/fonts/TeX/Size2/Regular/Main.js",revision:"e3e5e4d5924beed29f0844550b5c8f46"},{url:"math/jax/output/SVG/fonts/TeX/Main/Regular/LetterlikeSymbols.js",revision:"0767cbad7275b53da128e7e5e1109f7c"},{url:"math/jax/output/SVG/fonts/TeX/Main/Regular/GreekAndCoptic.js",revision:"346302a5c5ee00e01c302148c56dbfe3"},{url:"resources/dia.txt",revision:"b27e8770b0fc71f51c97a80bed58ec4e"},{url:"resources/dia_am.txt",revision:"ff59ef2ea422e962065b978f74f1989e"},{url:"resources/dia_ar.txt",revision:"b53a2876e65d205d42c0217216db0a0b"},{url:"resources/dia_bg.txt",revision:"5ae6ea7a2b816b32ded88cb15651dbfc"},{url:"resources/dia_bn.txt",revision:"f8775fef4398d0863d1c95b92f778f14"},{url:"resources/dia_bs.txt",revision:"1a5bbe8e6e02b215c7457d9735ada682"},{url:"resources/dia_ca.txt",revision:"d8ac61cb5b3e5d47f9ce8160c8b2f057"},{url:"resources/dia_cs.txt",revision:"aeaa9d93c19d60a9ab385a21d57f025c"},{url:"resources/dia_da.txt",revision:"5e0221a99a3fdf557b5ccf72965d99b2"},{url:"resources/dia_de.txt",revision:"d3ad299dc8cfbd2a34479edfafce74ad"},{url:"resources/dia_el.txt",revision:"80761a88228f85296bfc029bf5340718"},{url:"resources/dia_eo.txt",revision:"4544b6600298fe72d2d516fd135c54fa"},{url:"resources/dia_es.txt",revision:"863e0e73d4cdf95093461ef0157e13e5"},{url:"resources/dia_et.txt",revision:"3a47c1b462102c60e47e0f7d6e07d379"},{url:"resources/dia_eu.txt",revision:"92c451283a83cae2d83460b1b0aaf1c4"},{url:"resources/dia_fa.txt",revision:"c56a53dac116441fac2a6e6a110b4fcf"},{url:"resources/dia_fi.txt",revision:"fcc968a8202ebe596bb4efa31d5c55b7"},{url:"resources/dia_fil.txt",revision:"0c98b10b2ce7660502fab8f8a09216c0"},{url:"resources/dia_fr.txt",revision:"550ba55018af500d82b2ade74f49d6a6"},{url:"resources/dia_gl.txt",revision:"d9dedee9a17ce0e98cac6a641dbd1b17"},{url:"resources/dia_gu.txt",revision:"6d6d7e768e1d255dcb9f9abf87676787"},{url:"resources/dia_he.txt",revision:"404b9e323e5bbbecb63ea4a58385431a"},{url:"resources/dia_hi.txt",revision:"8c4436fda7e9278685d9d5d6e0942ae9"},{url:"resources/dia_hr.txt",revision:"38cf52a7e23c4e8796d0cbb7ea217f7e"},{url:"resources/dia_hu.txt",revision:"e17887d5e7057c80ec1da14fe7749c52"},{url:"resources/dia_id.txt",revision:"32c8349f2744c3b6023fd17742eb1c2c"},{url:"resources/dia_it.txt",revision:"57eba100f012d139d00543c31060cf04"},{url:"resources/dia_ja.txt",revision:"cbb7bea7bd120272c6dfe0d6f0ca85f4"},{url:"resources/dia_kn.txt",revision:"ca9045d8ab0d3c8448228187c8ba77cd"},{url:"resources/dia_ko.txt",revision:"ea4948e5456ac276658b0071172dee82"},{url:"resources/dia_lt.txt",revision:"05955be58d94abc2707dea99394a60db"},{url:"resources/dia_lv.txt",revision:"47aa1bcdd23457cd5f3026db7a357fc9"},{url:"resources/dia_ml.txt",revision:"5735f8afcd3fb73882147629d044e368"},{url:"resources/dia_mr.txt",revision:"8e891bbae07ac6fbe9038e8d19fb66fd"},{url:"resources/dia_ms.txt",revision:"ea1992800627d8e54c54d54d1078cd50"},{url:"resources/dia_my.txt",revision:"b27e8770b0fc71f51c97a80bed58ec4e"},{url:"resources/dia_nl.txt",revision:"a158a142f848a44f4b9a86b2c71de770"},{url:"resources/dia_no.txt",revision:"a73fe6de8d13ff09b57022c6152de435"},{url:"resources/dia_pl.txt",revision:"a731cde706b7b10c2bb9b8b804ecf99e"},{url:"resources/dia_pt-br.txt",revision:"6d5aef2fa11b45c7e089a78d8f8077d9"},{url:"resources/dia_pt.txt",revision:"e39267e6c115d3dfff18734d9512396a"},{url:"resources/dia_ro.txt",revision:"e2485ba528fffc006ddc16a2bdbba588"},{url:"resources/dia_ru.txt",revision:"4e4dff4df4bb635eab4648a31718bb71"},{url:"resources/dia_si.txt",revision:"b27e8770b0fc71f51c97a80bed58ec4e"},{url:"resources/dia_sk.txt",revision:"aa39fa602751e960c408b51bc4d1e9a3"},{url:"resources/dia_sl.txt",revision:"a1e9ea18592a3520a564da53754435f1"},{url:"resources/dia_sr.txt",revision:"ee7f392d230f3acf9ee64e59912d2240"},{url:"resources/dia_sv.txt",revision:"d1af4adc3abc689e2b2877348fe3a80e"},{url:"resources/dia_sw.txt",revision:"ee11057cc33d2db3915810afa98e4fb8"},{url:"resources/dia_ta.txt",revision:"64633496007987935476811363899867"},{url:"resources/dia_te.txt",revision:"b67de98cc3819f31d6aedc4a8e332d3f"},{url:"resources/dia_th.txt",revision:"bf3564b735dddb73bafa110e1ba4f364"},{url:"resources/dia_tr.txt",revision:"e66e3a8530b0bda46ff6de26598a637b"},{url:"resources/dia_uk.txt",revision:"1ea94afcd9c9383c784ceae2896c8af4"},{url:"resources/dia_vi.txt",revision:"2ea8a953b560713a201dff1d8d3917dd"},{url:"resources/dia_zh-tw.txt",revision:"7a19eef01a4ee231cc05d3b3833bba4f"},{url:"resources/dia_zh.txt",revision:"f609cb57ae40941ae6c8165f89d7aed0"},{url:"favicon.ico",revision:"fab2d88b37c72d83607527573de45281"},{url:"images/manifest.json",revision:"c6236bde53ed79aaaec60a1aca8ee2ef"},{url:"images/logo.png",revision:"89630b64b911ebe0daa3dfe442087cfa"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/default-user.jpg",revision:"2c399696a87c8921f12d2f9e1990cc6e"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"73da7989a23ce9a4be565ec65658a239"},{url:"images/favicon-16x16.png",revision:"1a79d5461a5d2bf21f6652e0ac20d6e5"},{url:"images/favicon-32x32.png",revision:"e3b92da2febe70bad5372f6f3474b034"},{url:"images/android-chrome-196x196.png",revision:"f8c045b2d7b1c719fda64edab04c415c"},{url:"images/android-chrome-512x512.png",revision:"959b5fac2453963ff6d60fb85e4b73fd"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/help.png",revision:"9266c6c3915bd33c243d80037d37bf61"},{url:"images/download.png",revision:"35418dd7bd48d87502c71b578cc6c37f"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/clear.gif",revision:"db13c778e4382e0b55258d0f811d5d70"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/checkmark.gif",revision:"ba764ce62f2bf952df5bbc2bb4d381c5"},{url:"images/hs.png",revision:"fefa1a03d92ebad25c88dca94a0b63db"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"b5b7280ec98671bb6c3847a36bc7ea12"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})}));
+if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let i=Promise.resolve();return r[e]||(i=new Promise((async i=>{if("document"in self){const r=document.createElement("script");r.src=e,document.head.appendChild(r),r.onload=i}else importScripts(e),i()}))),i.then((()=>{if(!r[e])throw new Error(`Module ${e} didn’t register its module`);return r[e]}))},i=(i,r)=>{Promise.all(i.map(e)).then((e=>r(1===e.length?e[0]:e)))},r={require:Promise.resolve(i)};self.define=(i,a,c)=>{r[i]||(r[i]=Promise.resolve().then((()=>{let r={};const s={uri:location.origin+i.slice(1)};return Promise.all(a.map((i=>{switch(i){case"exports":return r;case"module":return s;default:return e(i)}}))).then((e=>{const i=c(...e);return r.default||(r.default=i),r}))})))}}define("./service-worker.js",["./workbox-f163abaa"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"js/app.min.js",revision:"ecad2f9a38da651f4071e346caed6446"},{url:"js/extensions.min.js",revision:"86e02cae3cde5ed3af4ffd256c6bcf57"},{url:"js/stencils.min.js",revision:"c170a229d8726934c0d6b04c2214a36c"},{url:"js/shapes-14-6-5.min.js",revision:"2a45abd06dfe78e69135e9f87f9b78d3"},{url:"js/math-print.js",revision:"9d98c920695f6c3395da4b68f723e60a"},{url:"index.html",revision:"28ab148081b0ccd22ad2db634d538b6b"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/grapheditor.css",revision:"6b64770d730b2848ed0021d766e6b507"},{url:"styles/atlas.css",revision:"e8152cda9233d3a3af017422993abfce"},{url:"styles/dark.css",revision:"87d5d01385c5d0f0c4c4f5d0f3532826"},{url:"js/croppie/croppie.min.css",revision:"fc297c9002c79c15a132f13ee3ec427e"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"108702d7ee32262e3aa466e32c4e1264"},{url:"connect/jira/editor-1-3-3.html",revision:"a2b0e7267a08a838f3cc404eba831ec0"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"2ce6e99d95113e9ca6b24343cea202e0"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"ba7ece2dfb2833b72f97280d7092f25e"},{url:"connect/jira/viewerPanel.js",revision:"6e9412c359a21b86dc7c5128bf6208d4"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"375a89b2a867264a395f384d00eeba13"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"197ed5837ed27992688fc424699a9a78"},{url:"connect/jira/fullscreen-viewer.js",revision:"4e0775a6c156a803e777870623ac7c3e"},{url:"plugins/connectJira.js",revision:"4cefa13414e0d406550f3c073923080c"},{url:"plugins/cConf-comments.js",revision:"c787357209cff2986dcca567b599e2ef"},{url:"plugins/cConf-1-4-8.js",revision:"ec6e55011746305549024292f46270bd"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"74878fb4834967aa4a68647cab7888c1"},{url:"connect/new_common/cac.js",revision:"3d8c436c566db645fb1e6e6ba9f69bbc"},{url:"connect/gdrive_common/gac.js",revision:"38f1df3ecc4d78290493f47e62202138"},{url:"connect/onedrive_common/ac.js",revision:"293aa21acaf0a3349686f420b2be874a"},{url:"connect/confluence/viewer-init.js",revision:"4a60c6c805cab7bc782f1e52f7818d9f"},{url:"connect/confluence/viewer.js",revision:"8ce5887817b32603d1dcd23a1011989d"},{url:"connect/confluence/viewer-1-4-42.html",revision:"c7b38b3af4eb7a58ab6dc4791216530e"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"8cd74a2fb60bf2e3e86026d66107cf11"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"374099e93482baae432490d9e55e4e24"},{url:"connect/confluence/includeDiagram.html",revision:"538252ed4fed6d5e9f4e53b35954c116"},{url:"connect/confluence/macro-editor.js",revision:"e273a48b8e81faac4530bf1a68d75aa0"},{url:"math/MathJax.js",revision:"b2c103388b71bb3d11cbf9aa45fe9b68"},{url:"math/config/TeX-MML-AM_SVG-full.js",revision:"d5cb8ac04050983170ae4af145bc66ff"},{url:"math/jax/output/SVG/fonts/TeX/fontdata.js",revision:"495e5a410955d1b6178870e605890ede"},{url:"math/jax/element/mml/optable/BasicLatin.js",revision:"cac9b2e71382e62270baa55fab07cc13"},{url:"math/jax/output/SVG/fonts/TeX/Size2/Regular/Main.js",revision:"e3e5e4d5924beed29f0844550b5c8f46"},{url:"math/jax/output/SVG/fonts/TeX/Main/Regular/LetterlikeSymbols.js",revision:"0767cbad7275b53da128e7e5e1109f7c"},{url:"math/jax/output/SVG/fonts/TeX/Main/Regular/GreekAndCoptic.js",revision:"346302a5c5ee00e01c302148c56dbfe3"},{url:"resources/dia.txt",revision:"b27e8770b0fc71f51c97a80bed58ec4e"},{url:"resources/dia_am.txt",revision:"ff59ef2ea422e962065b978f74f1989e"},{url:"resources/dia_ar.txt",revision:"b53a2876e65d205d42c0217216db0a0b"},{url:"resources/dia_bg.txt",revision:"5ae6ea7a2b816b32ded88cb15651dbfc"},{url:"resources/dia_bn.txt",revision:"f8775fef4398d0863d1c95b92f778f14"},{url:"resources/dia_bs.txt",revision:"1a5bbe8e6e02b215c7457d9735ada682"},{url:"resources/dia_ca.txt",revision:"d8ac61cb5b3e5d47f9ce8160c8b2f057"},{url:"resources/dia_cs.txt",revision:"aeaa9d93c19d60a9ab385a21d57f025c"},{url:"resources/dia_da.txt",revision:"5e0221a99a3fdf557b5ccf72965d99b2"},{url:"resources/dia_de.txt",revision:"d3ad299dc8cfbd2a34479edfafce74ad"},{url:"resources/dia_el.txt",revision:"80761a88228f85296bfc029bf5340718"},{url:"resources/dia_eo.txt",revision:"4544b6600298fe72d2d516fd135c54fa"},{url:"resources/dia_es.txt",revision:"863e0e73d4cdf95093461ef0157e13e5"},{url:"resources/dia_et.txt",revision:"3a47c1b462102c60e47e0f7d6e07d379"},{url:"resources/dia_eu.txt",revision:"92c451283a83cae2d83460b1b0aaf1c4"},{url:"resources/dia_fa.txt",revision:"c56a53dac116441fac2a6e6a110b4fcf"},{url:"resources/dia_fi.txt",revision:"fcc968a8202ebe596bb4efa31d5c55b7"},{url:"resources/dia_fil.txt",revision:"0c98b10b2ce7660502fab8f8a09216c0"},{url:"resources/dia_fr.txt",revision:"550ba55018af500d82b2ade74f49d6a6"},{url:"resources/dia_gl.txt",revision:"d9dedee9a17ce0e98cac6a641dbd1b17"},{url:"resources/dia_gu.txt",revision:"6d6d7e768e1d255dcb9f9abf87676787"},{url:"resources/dia_he.txt",revision:"404b9e323e5bbbecb63ea4a58385431a"},{url:"resources/dia_hi.txt",revision:"8c4436fda7e9278685d9d5d6e0942ae9"},{url:"resources/dia_hr.txt",revision:"38cf52a7e23c4e8796d0cbb7ea217f7e"},{url:"resources/dia_hu.txt",revision:"e17887d5e7057c80ec1da14fe7749c52"},{url:"resources/dia_id.txt",revision:"32c8349f2744c3b6023fd17742eb1c2c"},{url:"resources/dia_it.txt",revision:"57eba100f012d139d00543c31060cf04"},{url:"resources/dia_ja.txt",revision:"cbb7bea7bd120272c6dfe0d6f0ca85f4"},{url:"resources/dia_kn.txt",revision:"ca9045d8ab0d3c8448228187c8ba77cd"},{url:"resources/dia_ko.txt",revision:"ea4948e5456ac276658b0071172dee82"},{url:"resources/dia_lt.txt",revision:"05955be58d94abc2707dea99394a60db"},{url:"resources/dia_lv.txt",revision:"47aa1bcdd23457cd5f3026db7a357fc9"},{url:"resources/dia_ml.txt",revision:"5735f8afcd3fb73882147629d044e368"},{url:"resources/dia_mr.txt",revision:"8e891bbae07ac6fbe9038e8d19fb66fd"},{url:"resources/dia_ms.txt",revision:"ea1992800627d8e54c54d54d1078cd50"},{url:"resources/dia_my.txt",revision:"b27e8770b0fc71f51c97a80bed58ec4e"},{url:"resources/dia_nl.txt",revision:"a158a142f848a44f4b9a86b2c71de770"},{url:"resources/dia_no.txt",revision:"a73fe6de8d13ff09b57022c6152de435"},{url:"resources/dia_pl.txt",revision:"a731cde706b7b10c2bb9b8b804ecf99e"},{url:"resources/dia_pt-br.txt",revision:"6d5aef2fa11b45c7e089a78d8f8077d9"},{url:"resources/dia_pt.txt",revision:"e39267e6c115d3dfff18734d9512396a"},{url:"resources/dia_ro.txt",revision:"e2485ba528fffc006ddc16a2bdbba588"},{url:"resources/dia_ru.txt",revision:"4e4dff4df4bb635eab4648a31718bb71"},{url:"resources/dia_si.txt",revision:"b27e8770b0fc71f51c97a80bed58ec4e"},{url:"resources/dia_sk.txt",revision:"aa39fa602751e960c408b51bc4d1e9a3"},{url:"resources/dia_sl.txt",revision:"a1e9ea18592a3520a564da53754435f1"},{url:"resources/dia_sr.txt",revision:"ee7f392d230f3acf9ee64e59912d2240"},{url:"resources/dia_sv.txt",revision:"d1af4adc3abc689e2b2877348fe3a80e"},{url:"resources/dia_sw.txt",revision:"ee11057cc33d2db3915810afa98e4fb8"},{url:"resources/dia_ta.txt",revision:"64633496007987935476811363899867"},{url:"resources/dia_te.txt",revision:"b67de98cc3819f31d6aedc4a8e332d3f"},{url:"resources/dia_th.txt",revision:"bf3564b735dddb73bafa110e1ba4f364"},{url:"resources/dia_tr.txt",revision:"e66e3a8530b0bda46ff6de26598a637b"},{url:"resources/dia_uk.txt",revision:"1ea94afcd9c9383c784ceae2896c8af4"},{url:"resources/dia_vi.txt",revision:"2ea8a953b560713a201dff1d8d3917dd"},{url:"resources/dia_zh-tw.txt",revision:"7a19eef01a4ee231cc05d3b3833bba4f"},{url:"resources/dia_zh.txt",revision:"f609cb57ae40941ae6c8165f89d7aed0"},{url:"favicon.ico",revision:"fab2d88b37c72d83607527573de45281"},{url:"images/manifest.json",revision:"c6236bde53ed79aaaec60a1aca8ee2ef"},{url:"images/logo.png",revision:"89630b64b911ebe0daa3dfe442087cfa"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/default-user.jpg",revision:"2c399696a87c8921f12d2f9e1990cc6e"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"73da7989a23ce9a4be565ec65658a239"},{url:"images/favicon-16x16.png",revision:"1a79d5461a5d2bf21f6652e0ac20d6e5"},{url:"images/favicon-32x32.png",revision:"e3b92da2febe70bad5372f6f3474b034"},{url:"images/android-chrome-196x196.png",revision:"f8c045b2d7b1c719fda64edab04c415c"},{url:"images/android-chrome-512x512.png",revision:"959b5fac2453963ff6d60fb85e4b73fd"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/help.png",revision:"9266c6c3915bd33c243d80037d37bf61"},{url:"images/download.png",revision:"35418dd7bd48d87502c71b578cc6c37f"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/clear.gif",revision:"db13c778e4382e0b55258d0f811d5d70"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/checkmark.gif",revision:"ba764ce62f2bf952df5bbc2bb4d381c5"},{url:"images/hs.png",revision:"fefa1a03d92ebad25c88dca94a0b63db"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"b5b7280ec98671bb6c3847a36bc7ea12"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})}));
//# sourceMappingURL=service-worker.js.map
diff --git a/src/main/webapp/service-worker.js.map b/src/main/webapp/service-worker.js.map
index ee23f502..76af574b 100644
--- a/src/main/webapp/service-worker.js.map
+++ b/src/main/webapp/service-worker.js.map
@@ -1 +1 @@
-{"version":3,"file":"service-worker.js","sources":["../../../../../../private/var/folders/cv/_wml09cx4cd5ryt_r7z2tjjm0000gn/T/12ca875201f6a7fd4871dfdaae57ace3/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/usr/local/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.addEventListener('message', (event) => {\n if (event.data && event.data.type === 'SKIP_WAITING') {\n self.skipWaiting();\n }\n});\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"dffd9a8f04a04b4f46693f15dbe20edc\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"86e02cae3cde5ed3af4ffd256c6bcf57\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"c170a229d8726934c0d6b04c2214a36c\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"2a45abd06dfe78e69135e9f87f9b78d3\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"9d98c920695f6c3395da4b68f723e60a\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"28ab148081b0ccd22ad2db634d538b6b\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"2628014aa2e769f91fb7cfd2a8ca645f\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"e8152cda9233d3a3af017422993abfce\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"87d5d01385c5d0f0c4c4f5d0f3532826\"\n },\n {\n \"url\": \"js/croppie/croppie.min.css\",\n \"revision\": \"fc297c9002c79c15a132f13ee3ec427e\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"855dd7894435a4b2886691d653f81d8f\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"a2b0e7267a08a838f3cc404eba831ec0\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"2ce6e99d95113e9ca6b24343cea202e0\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"ba7ece2dfb2833b72f97280d7092f25e\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"6e9412c359a21b86dc7c5128bf6208d4\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"375a89b2a867264a395f384d00eeba13\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"197ed5837ed27992688fc424699a9a78\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"4e0775a6c156a803e777870623ac7c3e\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"4cefa13414e0d406550f3c073923080c\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"c787357209cff2986dcca567b599e2ef\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"ec6e55011746305549024292f46270bd\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"74878fb4834967aa4a68647cab7888c1\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"3d8c436c566db645fb1e6e6ba9f69bbc\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"38f1df3ecc4d78290493f47e62202138\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"293aa21acaf0a3349686f420b2be874a\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"4a60c6c805cab7bc782f1e52f7818d9f\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"8ce5887817b32603d1dcd23a1011989d\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"c7b38b3af4eb7a58ab6dc4791216530e\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"8cd74a2fb60bf2e3e86026d66107cf11\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"374099e93482baae432490d9e55e4e24\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"538252ed4fed6d5e9f4e53b35954c116\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"e273a48b8e81faac4530bf1a68d75aa0\"\n },\n {\n \"url\": \"math/MathJax.js\",\n \"revision\": \"b2c103388b71bb3d11cbf9aa45fe9b68\"\n },\n {\n \"url\": \"math/config/TeX-MML-AM_SVG-full.js\",\n \"revision\": \"d5cb8ac04050983170ae4af145bc66ff\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/fontdata.js\",\n \"revision\": \"495e5a410955d1b6178870e605890ede\"\n },\n {\n \"url\": \"math/jax/element/mml/optable/BasicLatin.js\",\n \"revision\": \"cac9b2e71382e62270baa55fab07cc13\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Size2/Regular/Main.js\",\n \"revision\": \"e3e5e4d5924beed29f0844550b5c8f46\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Main/Regular/LetterlikeSymbols.js\",\n \"revision\": \"0767cbad7275b53da128e7e5e1109f7c\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Main/Regular/GreekAndCoptic.js\",\n \"revision\": \"346302a5c5ee00e01c302148c56dbfe3\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"b27e8770b0fc71f51c97a80bed58ec4e\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"ff59ef2ea422e962065b978f74f1989e\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"b53a2876e65d205d42c0217216db0a0b\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"5ae6ea7a2b816b32ded88cb15651dbfc\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"f8775fef4398d0863d1c95b92f778f14\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"1a5bbe8e6e02b215c7457d9735ada682\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"d8ac61cb5b3e5d47f9ce8160c8b2f057\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"aeaa9d93c19d60a9ab385a21d57f025c\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"5e0221a99a3fdf557b5ccf72965d99b2\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"d3ad299dc8cfbd2a34479edfafce74ad\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"80761a88228f85296bfc029bf5340718\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"4544b6600298fe72d2d516fd135c54fa\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"863e0e73d4cdf95093461ef0157e13e5\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"3a47c1b462102c60e47e0f7d6e07d379\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"92c451283a83cae2d83460b1b0aaf1c4\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"c56a53dac116441fac2a6e6a110b4fcf\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"fcc968a8202ebe596bb4efa31d5c55b7\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"0c98b10b2ce7660502fab8f8a09216c0\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"550ba55018af500d82b2ade74f49d6a6\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"d9dedee9a17ce0e98cac6a641dbd1b17\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"6d6d7e768e1d255dcb9f9abf87676787\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"404b9e323e5bbbecb63ea4a58385431a\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"8c4436fda7e9278685d9d5d6e0942ae9\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"38cf52a7e23c4e8796d0cbb7ea217f7e\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"e17887d5e7057c80ec1da14fe7749c52\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"32c8349f2744c3b6023fd17742eb1c2c\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"57eba100f012d139d00543c31060cf04\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"cbb7bea7bd120272c6dfe0d6f0ca85f4\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"ca9045d8ab0d3c8448228187c8ba77cd\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"ea4948e5456ac276658b0071172dee82\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"05955be58d94abc2707dea99394a60db\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"47aa1bcdd23457cd5f3026db7a357fc9\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"5735f8afcd3fb73882147629d044e368\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"8e891bbae07ac6fbe9038e8d19fb66fd\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"ea1992800627d8e54c54d54d1078cd50\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"b27e8770b0fc71f51c97a80bed58ec4e\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"a158a142f848a44f4b9a86b2c71de770\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"a73fe6de8d13ff09b57022c6152de435\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"a731cde706b7b10c2bb9b8b804ecf99e\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"6d5aef2fa11b45c7e089a78d8f8077d9\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"e39267e6c115d3dfff18734d9512396a\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"e2485ba528fffc006ddc16a2bdbba588\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"4e4dff4df4bb635eab4648a31718bb71\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"b27e8770b0fc71f51c97a80bed58ec4e\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"aa39fa602751e960c408b51bc4d1e9a3\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"a1e9ea18592a3520a564da53754435f1\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"ee7f392d230f3acf9ee64e59912d2240\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"d1af4adc3abc689e2b2877348fe3a80e\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"ee11057cc33d2db3915810afa98e4fb8\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"64633496007987935476811363899867\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"b67de98cc3819f31d6aedc4a8e332d3f\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"bf3564b735dddb73bafa110e1ba4f364\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"e66e3a8530b0bda46ff6de26598a637b\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"1ea94afcd9c9383c784ceae2896c8af4\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"2ea8a953b560713a201dff1d8d3917dd\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"7a19eef01a4ee231cc05d3b3833bba4f\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"f609cb57ae40941ae6c8165f89d7aed0\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"fab2d88b37c72d83607527573de45281\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"c6236bde53ed79aaaec60a1aca8ee2ef\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"89630b64b911ebe0daa3dfe442087cfa\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"73da7989a23ce9a4be565ec65658a239\"\n },\n {\n \"url\": \"images/favicon-16x16.png\",\n \"revision\": \"1a79d5461a5d2bf21f6652e0ac20d6e5\"\n },\n {\n \"url\": \"images/favicon-32x32.png\",\n \"revision\": \"e3b92da2febe70bad5372f6f3474b034\"\n },\n {\n \"url\": \"images/android-chrome-196x196.png\",\n \"revision\": \"f8c045b2d7b1c719fda64edab04c415c\"\n },\n {\n \"url\": \"images/android-chrome-512x512.png\",\n \"revision\": \"959b5fac2453963ff6d60fb85e4b73fd\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/hs.png\",\n \"revision\": \"fefa1a03d92ebad25c88dca94a0b63db\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"b5b7280ec98671bb6c3847a36bc7ea12\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","addEventListener","event","data","type","skipWaiting"],"mappings":"szBAmBAA,KAAKC,iBAAiB,WAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,oCAY2B,CAClC,KACS,yBACK,oCAEd,KACS,gCACK,oCAEd,KACS,8BACK,oCAEd,KACS,mCACK,oCAEd,KACS,4BACK,oCAEd,KACS,sBACK,oCAEd,KACS,qBACK,oCAEd,KACS,kCACK,oCAEd,KACS,4BACK,oCAEd,KACS,2BACK,oCAEd,KACS,sCACK,oCAEd,KACS,yCACK,oCAEd,KACS,mCACK,oCAEd,KACS,mCACK,oCAEd,KACS,0CACK,oCAEd,KACS,gDACK,oCAEd,KACS,oDACK,oCAEd,KACS,uCACK,oCAEd,KACS,oCACK,oCAEd,KACS,kCACK,oCAEd,KACS,kDACK,oCAEd,KACS,6CACK,oCAEd,KACS,kCACK,oCAEd,KACS,qCACK,oCAEd,KACS,kCACK,oCAEd,KACS,oDACK,oCAEd,KACS,qCACK,oCAEd,KACS,wCACK,oCAEd,KACS,yCACK,oCAEd,KACS,6CACK,oCAEd,KACS,wCACK,oCAEd,KACS,iDACK,oCAEd,KACS,qDACK,oCAEd,KACS,sDACK,oCAEd,KACS,kDACK,oCAEd,KACS,8CACK,oCAEd,KACS,2BACK,oCAEd,KACS,8CACK,oCAEd,KACS,qDACK,oCAEd,KACS,sDACK,oCAEd,KACS,+DACK,oCAEd,KACS,2EACK,oCAEd,KACS,wEACK,oCAEd,KACS,6BACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,iCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,mCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,mCACK,oCAEd,KACS,gCACK,oCAEd,KACS,uBACK,oCAEd,KACS,gCACK,oCAEd,KACS,2BACK,oCAEd,KACS,+BACK,oCAEd,KACS,iCACK,oCAEd,KACS,oCACK,oCAEd,KACS,2CACK,oCAEd,KACS,mCACK,oCAEd,KACS,sCACK,oCAEd,KACS,uCACK,oCAEd,KACS,oCACK,oCAEd,KACS,oCACK,oCAEd,KACS,6CACK,oCAEd,KACS,6CACK,oCAEd,KACS,6BACK,oCAEd,KACS,iCACK,oCAEd,KACS,2BACK,oCAEd,KACS,+BACK,oCAEd,KACS,gCACK,oCAEd,KACS,wCACK,oCAEd,KACS,oCACK,oCAEd,KACS,mCACK,oCAEd,KACS,kCACK,oCAEd,KACS,kCACK,oCAEd,KACS,kCACK,oCAEd,KACS,yCACK,oCAEd,KACS,mCACK,oCAEd,KACS,8CACK,oCAEd,KACS,yCACK,oCAEd,KACS,0CACK,oCAEd,KACS,wCACK,oCAEd,KACS,wCACK,oCAEd,KACS,+CACK,oCAEd,KACS,sCACK,oCAEd,KACS,gCACK,oCAEd,KACS,4BACK,oCAEd,KACS,2BACK,oCAEd,KACS,gCACK,oCAEd,KACS,yBACK,oCAEd,KACS,+BACK,oCAEd,KACS,kCACK,oCAEd,KACS,uCACK,oCAEd,KACS,wCACK,oCAEd,KACS,uCACK,oCAEd,KACS,uCACK,oCAEd,KACS,oCACK,oCAEd,KACS,qCACK,oCAEd,KACS,wCACK,oCAEd,KACS,qCACK,oCAEd,KACS,2CACK,oCAEd,KACS,qCACK,oCAEd,KACS,oCACK,qCAEb,6BAC8B,CAAC"} \ No newline at end of file
+{"version":3,"file":"service-worker.js","sources":["../../../../../../private/var/folders/cv/_wml09cx4cd5ryt_r7z2tjjm0000gn/T/d6565e3b5b6389666f8c5eb1fca5775f/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/usr/local/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.addEventListener('message', (event) => {\n if (event.data && event.data.type === 'SKIP_WAITING') {\n self.skipWaiting();\n }\n});\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"ecad2f9a38da651f4071e346caed6446\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"86e02cae3cde5ed3af4ffd256c6bcf57\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"c170a229d8726934c0d6b04c2214a36c\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"2a45abd06dfe78e69135e9f87f9b78d3\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"9d98c920695f6c3395da4b68f723e60a\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"28ab148081b0ccd22ad2db634d538b6b\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"6b64770d730b2848ed0021d766e6b507\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"e8152cda9233d3a3af017422993abfce\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"87d5d01385c5d0f0c4c4f5d0f3532826\"\n },\n {\n \"url\": \"js/croppie/croppie.min.css\",\n \"revision\": \"fc297c9002c79c15a132f13ee3ec427e\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"108702d7ee32262e3aa466e32c4e1264\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"a2b0e7267a08a838f3cc404eba831ec0\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"2ce6e99d95113e9ca6b24343cea202e0\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"ba7ece2dfb2833b72f97280d7092f25e\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"6e9412c359a21b86dc7c5128bf6208d4\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"375a89b2a867264a395f384d00eeba13\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"197ed5837ed27992688fc424699a9a78\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"4e0775a6c156a803e777870623ac7c3e\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"4cefa13414e0d406550f3c073923080c\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"c787357209cff2986dcca567b599e2ef\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"ec6e55011746305549024292f46270bd\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"74878fb4834967aa4a68647cab7888c1\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"3d8c436c566db645fb1e6e6ba9f69bbc\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"38f1df3ecc4d78290493f47e62202138\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"293aa21acaf0a3349686f420b2be874a\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"4a60c6c805cab7bc782f1e52f7818d9f\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"8ce5887817b32603d1dcd23a1011989d\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"c7b38b3af4eb7a58ab6dc4791216530e\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"8cd74a2fb60bf2e3e86026d66107cf11\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"374099e93482baae432490d9e55e4e24\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"538252ed4fed6d5e9f4e53b35954c116\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"e273a48b8e81faac4530bf1a68d75aa0\"\n },\n {\n \"url\": \"math/MathJax.js\",\n \"revision\": \"b2c103388b71bb3d11cbf9aa45fe9b68\"\n },\n {\n \"url\": \"math/config/TeX-MML-AM_SVG-full.js\",\n \"revision\": \"d5cb8ac04050983170ae4af145bc66ff\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/fontdata.js\",\n \"revision\": \"495e5a410955d1b6178870e605890ede\"\n },\n {\n \"url\": \"math/jax/element/mml/optable/BasicLatin.js\",\n \"revision\": \"cac9b2e71382e62270baa55fab07cc13\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Size2/Regular/Main.js\",\n \"revision\": \"e3e5e4d5924beed29f0844550b5c8f46\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Main/Regular/LetterlikeSymbols.js\",\n \"revision\": \"0767cbad7275b53da128e7e5e1109f7c\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Main/Regular/GreekAndCoptic.js\",\n \"revision\": \"346302a5c5ee00e01c302148c56dbfe3\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"b27e8770b0fc71f51c97a80bed58ec4e\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"ff59ef2ea422e962065b978f74f1989e\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"b53a2876e65d205d42c0217216db0a0b\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"5ae6ea7a2b816b32ded88cb15651dbfc\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"f8775fef4398d0863d1c95b92f778f14\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"1a5bbe8e6e02b215c7457d9735ada682\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"d8ac61cb5b3e5d47f9ce8160c8b2f057\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"aeaa9d93c19d60a9ab385a21d57f025c\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"5e0221a99a3fdf557b5ccf72965d99b2\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"d3ad299dc8cfbd2a34479edfafce74ad\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"80761a88228f85296bfc029bf5340718\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"4544b6600298fe72d2d516fd135c54fa\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"863e0e73d4cdf95093461ef0157e13e5\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"3a47c1b462102c60e47e0f7d6e07d379\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"92c451283a83cae2d83460b1b0aaf1c4\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"c56a53dac116441fac2a6e6a110b4fcf\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"fcc968a8202ebe596bb4efa31d5c55b7\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"0c98b10b2ce7660502fab8f8a09216c0\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"550ba55018af500d82b2ade74f49d6a6\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"d9dedee9a17ce0e98cac6a641dbd1b17\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"6d6d7e768e1d255dcb9f9abf87676787\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"404b9e323e5bbbecb63ea4a58385431a\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"8c4436fda7e9278685d9d5d6e0942ae9\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"38cf52a7e23c4e8796d0cbb7ea217f7e\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"e17887d5e7057c80ec1da14fe7749c52\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"32c8349f2744c3b6023fd17742eb1c2c\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"57eba100f012d139d00543c31060cf04\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"cbb7bea7bd120272c6dfe0d6f0ca85f4\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"ca9045d8ab0d3c8448228187c8ba77cd\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"ea4948e5456ac276658b0071172dee82\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"05955be58d94abc2707dea99394a60db\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"47aa1bcdd23457cd5f3026db7a357fc9\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"5735f8afcd3fb73882147629d044e368\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"8e891bbae07ac6fbe9038e8d19fb66fd\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"ea1992800627d8e54c54d54d1078cd50\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"b27e8770b0fc71f51c97a80bed58ec4e\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"a158a142f848a44f4b9a86b2c71de770\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"a73fe6de8d13ff09b57022c6152de435\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"a731cde706b7b10c2bb9b8b804ecf99e\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"6d5aef2fa11b45c7e089a78d8f8077d9\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"e39267e6c115d3dfff18734d9512396a\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"e2485ba528fffc006ddc16a2bdbba588\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"4e4dff4df4bb635eab4648a31718bb71\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"b27e8770b0fc71f51c97a80bed58ec4e\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"aa39fa602751e960c408b51bc4d1e9a3\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"a1e9ea18592a3520a564da53754435f1\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"ee7f392d230f3acf9ee64e59912d2240\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"d1af4adc3abc689e2b2877348fe3a80e\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"ee11057cc33d2db3915810afa98e4fb8\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"64633496007987935476811363899867\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"b67de98cc3819f31d6aedc4a8e332d3f\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"bf3564b735dddb73bafa110e1ba4f364\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"e66e3a8530b0bda46ff6de26598a637b\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"1ea94afcd9c9383c784ceae2896c8af4\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"2ea8a953b560713a201dff1d8d3917dd\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"7a19eef01a4ee231cc05d3b3833bba4f\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"f609cb57ae40941ae6c8165f89d7aed0\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"fab2d88b37c72d83607527573de45281\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"c6236bde53ed79aaaec60a1aca8ee2ef\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"89630b64b911ebe0daa3dfe442087cfa\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"73da7989a23ce9a4be565ec65658a239\"\n },\n {\n \"url\": \"images/favicon-16x16.png\",\n \"revision\": \"1a79d5461a5d2bf21f6652e0ac20d6e5\"\n },\n {\n \"url\": \"images/favicon-32x32.png\",\n \"revision\": \"e3b92da2febe70bad5372f6f3474b034\"\n },\n {\n \"url\": \"images/android-chrome-196x196.png\",\n \"revision\": \"f8c045b2d7b1c719fda64edab04c415c\"\n },\n {\n \"url\": \"images/android-chrome-512x512.png\",\n \"revision\": \"959b5fac2453963ff6d60fb85e4b73fd\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/hs.png\",\n \"revision\": \"fefa1a03d92ebad25c88dca94a0b63db\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"b5b7280ec98671bb6c3847a36bc7ea12\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","addEventListener","event","data","type","skipWaiting"],"mappings":"szBAmBAA,KAAKC,iBAAiB,WAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,oCAY2B,CAClC,KACS,yBACK,oCAEd,KACS,gCACK,oCAEd,KACS,8BACK,oCAEd,KACS,mCACK,oCAEd,KACS,4BACK,oCAEd,KACS,sBACK,oCAEd,KACS,qBACK,oCAEd,KACS,kCACK,oCAEd,KACS,4BACK,oCAEd,KACS,2BACK,oCAEd,KACS,sCACK,oCAEd,KACS,yCACK,oCAEd,KACS,mCACK,oCAEd,KACS,mCACK,oCAEd,KACS,0CACK,oCAEd,KACS,gDACK,oCAEd,KACS,oDACK,oCAEd,KACS,uCACK,oCAEd,KACS,oCACK,oCAEd,KACS,kCACK,oCAEd,KACS,kDACK,oCAEd,KACS,6CACK,oCAEd,KACS,kCACK,oCAEd,KACS,qCACK,oCAEd,KACS,kCACK,oCAEd,KACS,oDACK,oCAEd,KACS,qCACK,oCAEd,KACS,wCACK,oCAEd,KACS,yCACK,oCAEd,KACS,6CACK,oCAEd,KACS,wCACK,oCAEd,KACS,iDACK,oCAEd,KACS,qDACK,oCAEd,KACS,sDACK,oCAEd,KACS,kDACK,oCAEd,KACS,8CACK,oCAEd,KACS,2BACK,oCAEd,KACS,8CACK,oCAEd,KACS,qDACK,oCAEd,KACS,sDACK,oCAEd,KACS,+DACK,oCAEd,KACS,2EACK,oCAEd,KACS,wEACK,oCAEd,KACS,6BACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,iCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,mCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,mCACK,oCAEd,KACS,gCACK,oCAEd,KACS,uBACK,oCAEd,KACS,gCACK,oCAEd,KACS,2BACK,oCAEd,KACS,+BACK,oCAEd,KACS,iCACK,oCAEd,KACS,oCACK,oCAEd,KACS,2CACK,oCAEd,KACS,mCACK,oCAEd,KACS,sCACK,oCAEd,KACS,uCACK,oCAEd,KACS,oCACK,oCAEd,KACS,oCACK,oCAEd,KACS,6CACK,oCAEd,KACS,6CACK,oCAEd,KACS,6BACK,oCAEd,KACS,iCACK,oCAEd,KACS,2BACK,oCAEd,KACS,+BACK,oCAEd,KACS,gCACK,oCAEd,KACS,wCACK,oCAEd,KACS,oCACK,oCAEd,KACS,mCACK,oCAEd,KACS,kCACK,oCAEd,KACS,kCACK,oCAEd,KACS,kCACK,oCAEd,KACS,yCACK,oCAEd,KACS,mCACK,oCAEd,KACS,8CACK,oCAEd,KACS,yCACK,oCAEd,KACS,0CACK,oCAEd,KACS,wCACK,oCAEd,KACS,wCACK,oCAEd,KACS,+CACK,oCAEd,KACS,sCACK,oCAEd,KACS,gCACK,oCAEd,KACS,4BACK,oCAEd,KACS,2BACK,oCAEd,KACS,gCACK,oCAEd,KACS,yBACK,oCAEd,KACS,+BACK,oCAEd,KACS,kCACK,oCAEd,KACS,uCACK,oCAEd,KACS,wCACK,oCAEd,KACS,uCACK,oCAEd,KACS,uCACK,oCAEd,KACS,oCACK,oCAEd,KACS,qCACK,oCAEd,KACS,wCACK,oCAEd,KACS,qCACK,oCAEd,KACS,2CACK,oCAEd,KACS,qCACK,oCAEd,KACS,oCACK,qCAEb,6BAC8B,CAAC"} \ No newline at end of file
diff --git a/src/main/webapp/styles/grapheditor.css b/src/main/webapp/styles/grapheditor.css
index 3659ef7b..4ccd8251 100644
--- a/src/main/webapp/styles/grapheditor.css
+++ b/src/main/webapp/styles/grapheditor.css
@@ -96,8 +96,7 @@
}
.geStatus img {
max-width:16px;
- margin-top:-1px;
- vertical-align:top;
+ vertical-align:bottom;
}
.geStatusAlert {
padding:4px 8px;