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

github.com/jgraph/drawio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaudenz Alder <gaudenz@jgraph.com>2019-11-25 13:35:34 +0300
committerGaudenz Alder <gaudenz@jgraph.com>2019-11-25 13:35:34 +0300
commitf6b84673b0cb5818a58157eb3d18a377a11aa41d (patch)
treeb3f1898f22a4e96b3929660f7f9a799b5092de85
parentcd91500da0d159890e30a3f2b182fc689aa4e93b (diff)
12.3.0 releasev12.3.0
-rw-r--r--ChangeLog5
-rw-r--r--VERSION2
-rw-r--r--etc/mxgraph/mxClient.js19
-rw-r--r--src/main/webapp/cache.manifest2
-rw-r--r--src/main/webapp/export3.html99
-rw-r--r--src/main/webapp/js/app.min.js1932
-rw-r--r--src/main/webapp/js/diagramly/DriveClient.js14
-rw-r--r--src/main/webapp/js/diagramly/Editor.js112
-rw-r--r--src/main/webapp/js/diagramly/EditorUi.js66
-rw-r--r--src/main/webapp/js/diagramly/sidebar/Sidebar.js3
-rw-r--r--src/main/webapp/js/mxgraph/Actions.js24
-rw-r--r--src/main/webapp/js/mxgraph/EditorUi.js46
-rw-r--r--src/main/webapp/js/mxgraph/Menus.js22
-rw-r--r--src/main/webapp/js/viewer.min.js1135
14 files changed, 1795 insertions, 1686 deletions
diff --git a/ChangeLog b/ChangeLog
index 135b72db..f131095d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+25-NOV-2019: 12.3.0
+
+- Fixes client-side math export in Firefox
+- Uses mxGraph 4.0.6 beta 7
+
21-NOV-2019: 12.2.9
- Fixes autosize for font size and style changes
diff --git a/VERSION b/VERSION
index 6cb11629..ce7f9510 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-12.2.9 \ No newline at end of file
+12.3.0 \ No newline at end of file
diff --git a/etc/mxgraph/mxClient.js b/etc/mxgraph/mxClient.js
index 0d5e6d6e..323ce630 100644
--- a/etc/mxgraph/mxClient.js
+++ b/etc/mxgraph/mxClient.js
@@ -331,15 +331,16 @@ mxSvgCanvas2D.prototype.updateText=function(a,b,c,d,e,f,g,k,l,m,n){if(null!=n&&n
"px"));g&&0<c&&(q.style.width=Math.round(c+1)+"px");var t,u=q;null!=u.firstChild&&"DIV"==u.firstChild.nodeName&&(u=u.firstChild);var x=null!=n.mxCachedOffsetWidth?n.mxCachedOffsetWidth:u.offsetWidth;t=x+0;g&&"fill"!=k&&(l&&(t=Math.min(t,c)),q.style.width=Math.round(t+1)+"px");t=null!=n.mxCachedFinalOffsetWidth?n.mxCachedFinalOffsetWidth:u.offsetWidth;g=null!=n.mxCachedFinalOffsetHeight?n.mxCachedFinalOffsetHeight:u.offsetHeight;this.cacheOffsetSize&&(n.mxCachedOffsetWidth=x,n.mxCachedFinalOffsetWidth=
t,n.mxCachedFinalOffsetHeight=g);t+=0;g-=2;l&&(g=Math.min(g,d),t=Math.min(t,c));"width"==k?d=g:"fill"!=k&&(c=t,d=g);g=l=0;e==mxConstants.ALIGN_CENTER?l-=c/2:e==mxConstants.ALIGN_RIGHT&&(l-=c);a+=l;f==mxConstants.ALIGN_MIDDLE?g-=d/2:f==mxConstants.ALIGN_BOTTOM&&(g-=d);"fill"!=k&&mxClient.IS_FF&&mxClient.IS_WIN&&(g-=2);b+=g;e=1!=r.scale?"scale("+r.scale+")":"";0!=r.rotation&&this.rotateHtml?(e+="rotate("+r.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*r.scale,(b+d/2)*r.scale,r.rotation,r.rotationCx,
r.rotationCy),a=b.x-c*r.scale/2,b=b.y-d*r.scale/2):(a*=r.scale,b*=r.scale);0!=m&&(e+="rotate("+m+","+-l+","+-g+")");n.setAttribute("transform","translate("+Math.round(a)+","+Math.round(b)+")"+e);p.setAttribute("width",Math.round(Math.max(1,c)));p.setAttribute("height",Math.round(Math.max(1,d)))}};
-mxSvgCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,q){if(this.textEnabled&&null!=e){p=null!=p?p:0;var r=this.state;a+=r.dx;b+=r.dy;if(this.foEnabled&&"html"==l){var t="vertical-align:top;";n?t+="overflow:hidden;max-height:"+Math.round(d)+"px;max-width:"+Math.round(c)+"px;":"fill"==m?t+="width:"+Math.round(c+1)+"px;height:"+Math.round(d+1)+"px;overflow:hidden;":"width"==m&&(t+="width:"+Math.round(c+1)+"px;",0<d&&(t+="max-height:"+Math.round(d)+"px;overflow:hidden;"));var t=k&&0<c?t+("width:"+
-Math.round(c+1)+"px;white-space:normal;word-wrap:"+mxConstants.WORD_WRAP+";"):t+"white-space:nowrap;",u=this.createElement("g");1>r.alpha&&u.setAttribute("opacity",r.alpha);var x=this.createElement("foreignObject");x.setAttribute("style","overflow:visible;");x.setAttribute("pointer-events",this.pointerEvents?this.pointerEventsValue:"none");t=this.createDiv(e,f,g,t,m,k&&0<c?"normal":null);if(null!=t){null!=q&&t.setAttribute("dir",q);u.appendChild(x);this.root.appendChild(u);var y,A;q=y=2;if(!mxClient.IS_IE||
-9!=document.documentMode&&mxClient.IS_SVG){this.root.ownerDocument!=document?(t.style.visibility="hidden",document.body.appendChild(t)):x.appendChild(t);var z=t;null!=z.firstChild&&"DIV"==z.firstChild.nodeName&&(z=z.firstChild,k&&"break-word"==t.style.wordWrap&&(z.style.width="100%"));v=z.offsetWidth;0==v&&t.parentNode==x&&(t.style.visibility="hidden",document.body.appendChild(t),v=z.offsetWidth);this.cacheOffsetSize&&(u.mxCachedOffsetWidth=v);!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=
-m&&"width"!=m&&(B=t.style.whiteSpace,t.style.whiteSpace="nowrap",v<z.offsetWidth&&(t.style.whiteSpace=B));y=v+y-1;k&&"fill"!=m&&"width"!=m&&(n&&(y=Math.min(y,c)),t.style.width=y+"px");y=z.offsetWidth;A=z.offsetHeight;this.cacheOffsetSize&&(u.mxCachedFinalOffsetWidth=y,u.mxCachedFinalOffsetHeight=A);A-=q;t.parentNode!=x&&(x.appendChild(t),t.style.visibility="")}else{z=document.createElement("div");z.style.cssText=t.getAttribute("style");z.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";z.style.position=
-"absolute";z.style.visibility="hidden";A=document.createElement("div");A.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";A.style.wordWrap=mxConstants.WORD_WRAP;A.innerHTML=mxUtils.isNode(e)?e.outerHTML:e;z.appendChild(A);document.body.appendChild(z);8!=document.documentMode&&9!=document.documentMode&&null!=r.fontBorderColor&&(y+=2,q+=2);if(k&&0<c){var v=A.offsetWidth;padDx=0;if(!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=m){var B=z.style.whiteSpace;A.style.whiteSpace="nowrap";
-v<A.offsetWidth&&(z.style.whiteSpace=B)}n&&(v=Math.min(v,c));z.style.width=v+"px";y=A.offsetWidth+y+padDx;A=A.offsetHeight+q;z.style.display="inline-block";z.style.position="";z.style.visibility="";z.style.width=y+"px";t.setAttribute("style",z.style.cssText)}else y=A.offsetWidth+y,A=A.offsetHeight+q;z.parentNode.removeChild(z);x.appendChild(t)}n&&(A=Math.min(A,d),y=Math.min(y,c));"width"==m?d=A:"fill"!=m&&(c=y,d=A);1>r.alpha&&u.setAttribute("opacity",r.alpha);q=t=0;f==mxConstants.ALIGN_CENTER?t-=
-c/2:f==mxConstants.ALIGN_RIGHT&&(t-=c);a+=t;g==mxConstants.ALIGN_MIDDLE?q-=d/2:g==mxConstants.ALIGN_BOTTOM&&(q-=d);"fill"!=m&&mxClient.IS_FF&&mxClient.IS_WIN&&(q-=2);b+=q;z=1!=r.scale?"scale("+r.scale+")":"";0!=r.rotation&&this.rotateHtml?(z+="rotate("+r.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*r.scale,(b+d/2)*r.scale,r.rotation,r.rotationCx,r.rotationCy),a=b.x-c*r.scale/2,b=b.y-d*r.scale/2):(a*=r.scale,b*=r.scale);0!=p&&(z+="rotate("+p+","+-t+","+-q+")");u.setAttribute("transform",
-"translate("+(Math.round(a)+this.foOffset)+","+(Math.round(b)+this.foOffset)+")"+z);x.setAttribute("width",Math.round(Math.max(1,c)));x.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(x,a,b,c,d,e,f,g,k,l,m,n,p),null!=a&&(x.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),c.appendChild(x),c.appendChild(a),u.appendChild(c)))}}else this.plainText(a,b,c,d,e,f,g,k,m,n,p,
-q)}};mxSvgCanvas2D.prototype.createClip=function(a,b,c,d){a=Math.round(a);b=Math.round(b);c=Math.round(c);d=Math.round(d);for(var e="mx-clip-"+a+"-"+b+"-"+c+"-"+d,f=0,g=e+"-"+f;null!=document.getElementById(g);)g=e+"-"+ ++f;clip=this.createElement("clipPath");clip.setAttribute("id",g);e=this.createElement("rect");e.setAttribute("x",a);e.setAttribute("y",b);e.setAttribute("width",c);e.setAttribute("height",d);clip.appendChild(e);return clip};
+mxSvgCanvas2D.prototype.addForeignObject=function(a,b,c,d,e,f,g,k,l,m,n,p,q,r,t){var u=this.state;q=this.createElement("g");1>u.alpha&&q.setAttribute("opacity",u.alpha);var x=this.createElement("foreignObject");x.setAttribute("style","overflow:visible;");x.setAttribute("pointer-events",this.pointerEvents?this.pointerEventsValue:"none");q.appendChild(x);t.appendChild(q);var y,A;t=y=2;if(!mxClient.IS_IE||9!=document.documentMode&&mxClient.IS_SVG){this.root.ownerDocument!=document?(r.style.visibility=
+"hidden",document.body.appendChild(r)):x.appendChild(r);var z=r;null!=z.firstChild&&"DIV"==z.firstChild.nodeName&&(z=z.firstChild,k&&"break-word"==r.style.wordWrap&&(z.style.width="100%"));v=z.offsetWidth;0==v&&r.parentNode==x&&(r.style.visibility="hidden",document.body.appendChild(r),v=z.offsetWidth);this.cacheOffsetSize&&(q.mxCachedOffsetWidth=v);!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=m&&"width"!=m&&(B=r.style.whiteSpace,r.style.whiteSpace="nowrap",v<z.offsetWidth&&(r.style.whiteSpace=
+B));y=v+y-1;k&&"fill"!=m&&"width"!=m&&(n&&(y=Math.min(y,c)),r.style.width=y+"px");y=z.offsetWidth;A=z.offsetHeight;this.cacheOffsetSize&&(q.mxCachedFinalOffsetWidth=y,q.mxCachedFinalOffsetHeight=A);A-=t;r.parentNode!=x&&(x.appendChild(r),r.style.visibility="")}else{z=document.createElement("div");z.style.cssText=r.getAttribute("style");z.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";z.style.position="absolute";z.style.visibility="hidden";A=document.createElement("div");A.style.display=
+mxClient.IS_QUIRKS?"inline":"inline-block";A.style.wordWrap=mxConstants.WORD_WRAP;A.innerHTML=mxUtils.isNode(e)?e.outerHTML:e;z.appendChild(A);document.body.appendChild(z);8!=document.documentMode&&9!=document.documentMode&&null!=u.fontBorderColor&&(y+=2,t+=2);if(k&&0<c){var v=A.offsetWidth;padDx=0;if(!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=m){var B=z.style.whiteSpace;A.style.whiteSpace="nowrap";v<A.offsetWidth&&(z.style.whiteSpace=B)}n&&(v=Math.min(v,c));z.style.width=v+"px";y=A.offsetWidth+
+y+padDx;A=A.offsetHeight+t;z.style.display="inline-block";z.style.position="";z.style.visibility="";z.style.width=y+"px";r.setAttribute("style",z.style.cssText)}else y=A.offsetWidth+y,A=A.offsetHeight+t;z.parentNode.removeChild(z);x.appendChild(r)}n&&(A=Math.min(A,d),y=Math.min(y,c));"width"==m?d=A:"fill"!=m&&(c=y,d=A);1>u.alpha&&q.setAttribute("opacity",u.alpha);t=r=0;f==mxConstants.ALIGN_CENTER?r-=c/2:f==mxConstants.ALIGN_RIGHT&&(r-=c);a+=r;g==mxConstants.ALIGN_MIDDLE?t-=d/2:g==mxConstants.ALIGN_BOTTOM&&
+(t-=d);"fill"!=m&&mxClient.IS_FF&&mxClient.IS_WIN&&(t-=2);b+=t;z=1!=u.scale?"scale("+u.scale+")":"";0!=u.rotation&&this.rotateHtml?(z+="rotate("+u.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*u.scale,(b+d/2)*u.scale,u.rotation,u.rotationCx,u.rotationCy),a=b.x-c*u.scale/2,b=b.y-d*u.scale/2):(a*=u.scale,b*=u.scale);0!=p&&(z+="rotate("+p+","+-r+","+-t+")");q.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(b)+this.foOffset)+")"+z);x.setAttribute("width",
+Math.round(Math.max(1,c)));x.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(x,a,b,c,d,e,f,g,k,l,m,n,p),null!=a&&(x.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),c.appendChild(x),c.appendChild(a),q.appendChild(c)))};
+mxSvgCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,q){if(this.textEnabled&&null!=e){p=null!=p?p:0;var r=this.state;a+=r.dx;b+=r.dy;this.foEnabled&&"html"==l?(r="vertical-align:top;",n?r+="overflow:hidden;max-height:"+Math.round(d)+"px;max-width:"+Math.round(c)+"px;":"fill"==m?r+="width:"+Math.round(c+1)+"px;height:"+Math.round(d+1)+"px;overflow:hidden;":"width"==m&&(r+="width:"+Math.round(c+1)+"px;",0<d&&(r+="max-height:"+Math.round(d)+"px;overflow:hidden;")),r=k&&0<c?r+("width:"+Math.round(c+
+1)+"px;white-space:normal;word-wrap:"+mxConstants.WORD_WRAP+";"):r+"white-space:nowrap;",r=this.createDiv(e,f,g,r,m,k&&0<c?"normal":null),null!=r&&(null!=q&&r.setAttribute("dir",q),this.addForeignObject(a,b,c,d,e,f,g,k,l,m,n,p,q,r,this.root))):this.plainText(a,b,c,d,e,f,g,k,m,n,p,q)}};
+mxSvgCanvas2D.prototype.createClip=function(a,b,c,d){a=Math.round(a);b=Math.round(b);c=Math.round(c);d=Math.round(d);for(var e="mx-clip-"+a+"-"+b+"-"+c+"-"+d,f=0,g=e+"-"+f;null!=document.getElementById(g);)g=e+"-"+ ++f;clip=this.createElement("clipPath");clip.setAttribute("id",g);e=this.createElement("rect");e.setAttribute("x",a);e.setAttribute("y",b);e.setAttribute("width",c);e.setAttribute("height",d);clip.appendChild(e);return clip};
mxSvgCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,k,l,m,n,p){n=null!=n?n:0;k=this.state;var q=k.fontSize,r=this.createElement("g"),t=k.transform||"";this.updateFont(r);0!=n&&(t+="rotate("+n+","+this.format(a*k.scale)+","+this.format(b*k.scale)+")");null!=p&&r.setAttribute("direction",p);m&&0<c&&0<d&&(p=a,n=b,f==mxConstants.ALIGN_CENTER?p-=c/2:f==mxConstants.ALIGN_RIGHT&&(p-=c),"fill"!=l&&(g==mxConstants.ALIGN_MIDDLE?n-=d/2:g==mxConstants.ALIGN_BOTTOM&&(n-=d)),n=this.createClip(p*k.scale-2,
n*k.scale-2,c*k.scale+4,d*k.scale+4),null!=this.defs?this.defs.appendChild(n):this.root.appendChild(n),mxClient.IS_CHROMEAPP||mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE||this.root.ownerDocument!=document?r.setAttribute("clip-path","url(#"+n.getAttribute("id")+")"):(p=this.getBaseUrl().replace(/([\(\)])/g,"\\$1"),r.setAttribute("clip-path","url("+p+"#"+n.getAttribute("id")+")")));n=f==mxConstants.ALIGN_RIGHT?"end":f==mxConstants.ALIGN_CENTER?"middle":"start";"start"!=n&&r.setAttribute("text-anchor",
n);this.styleEnabled&&q==mxConstants.DEFAULT_FONTSIZE||r.setAttribute("font-size",q*k.scale+"px");0<t.length&&r.setAttribute("transform",t);1>k.alpha&&r.setAttribute("opacity",k.alpha);t=e.split("\n");p=Math.round(q*mxConstants.LINE_HEIGHT);var u=q+(t.length-1)*p;n=b+q-1;g==mxConstants.ALIGN_MIDDLE?"fill"==l?n-=d/2:(m=(this.matchHtmlAlignment&&m&&0<d?Math.min(u,d):u)/2,n-=m+1):g==mxConstants.ALIGN_BOTTOM&&("fill"==l?n-=d:(m=this.matchHtmlAlignment&&m&&0<d?Math.min(u,d):u,n-=m+2));for(m=0;m<t.length;m++)0<
diff --git a/src/main/webapp/cache.manifest b/src/main/webapp/cache.manifest
index 7bcf67a8..f0029bfd 100644
--- a/src/main/webapp/cache.manifest
+++ b/src/main/webapp/cache.manifest
@@ -1,7 +1,7 @@
CACHE MANIFEST
# THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 11/21/2019 10:50 PM
+# 11/25/2019 11:19 AM
app.html
index.html?offline=1
diff --git a/src/main/webapp/export3.html b/src/main/webapp/export3.html
index fa040742..48a5d51b 100644
--- a/src/main/webapp/export3.html
+++ b/src/main/webapp/export3.html
@@ -225,65 +225,66 @@
// Waits for MathJax.Hub to become available to register
// wait counter callback asynchronously after math render
- var editorDoMathJaxRender = Editor.doMathJaxRender;
+ // FIXME: Transforms ignored
+// var editorDoMathJaxRender = Editor.doMathJaxRender;
- Editor.doMathJaxRender = function(container)
- {
- editorDoMathJaxRender.apply(this, arguments);
+// Editor.doMathJaxRender = function(container)
+// {
+// editorDoMathJaxRender.apply(this, arguments);
- window.setTimeout(function()
- {
- window.MathJax.Hub.Queue(function ()
- {
- // Wraps all text labels in SVG foreignObjects to avoid
- // Chrome changing offset for textboxes near page border
- var pages = document.querySelectorAll('[id^=mxPage]');
+// window.setTimeout(function()
+// {
+// window.MathJax.Hub.Queue(function ()
+// {
+// // Wraps all text labels in SVG foreignObjects to avoid
+// // Chrome changing offset for textboxes near page border
+// var pages = document.querySelectorAll('[id^=mxPage]');
- for (var i = 0; i < pages.length; i++)
- {
- var page = pages[i];
- var svg = page.getElementsByTagName('svg')[0];
- var divs = page.getElementsByTagName('div');
- var snap = [];
+// for (var i = 0; i < pages.length; i++)
+// {
+// var page = pages[i];
+// var svg = page.getElementsByTagName('svg')[0];
+// var divs = page.getElementsByTagName('div');
+// var snap = [];
- for (var j = 0; j < divs.length; j++)
- {
- if (divs[j].parentNode == svg.parentNode)
- {
- snap.push(divs[j]);
- }
- }
+// for (var j = 0; j < divs.length; j++)
+// {
+// if (divs[j].parentNode == svg.parentNode)
+// {
+// snap.push(divs[j]);
+// }
+// }
- var top = svg.parentNode.getBoundingClientRect();
+// var top = svg.parentNode.getBoundingClientRect();
- for (var j = 0; j < snap.length; j++)
- {
- if (snap[j].parentNode == svg.parentNode)
- {
- var fo = svg.ownerDocument.createElementNS(mxConstants.NS_SVG, 'foreignObject');
- var rect = snap[j].getBoundingClientRect();
+// for (var j = 0; j < snap.length; j++)
+// {
+// if (snap[j].parentNode == svg.parentNode)
+// {
+// var fo = svg.ownerDocument.createElementNS(mxConstants.NS_SVG, 'foreignObject');
+// var rect = snap[j].getBoundingClientRect();
- // Sets position on foreignObject
- fo.setAttribute('x', rect.x);
- fo.setAttribute('y', rect.y - top.y);
- fo.setAttribute('width', rect.width);
- fo.setAttribute('height', rect.height);
+// // Sets position on foreignObject
+// fo.setAttribute('x', rect.x);
+// fo.setAttribute('y', rect.y - top.y);
+// fo.setAttribute('width', rect.width);
+// fo.setAttribute('height', rect.height);
- // Resets position on inner DIV
- snap[j].style.top = '0px';
- snap[j].style.left = '0px';
- snap[j].style.transform = '';
+// // Resets position on inner DIV
+// snap[j].style.top = '0px';
+// snap[j].style.left = '0px';
+// snap[j].style.transform = '';
- fo.appendChild(snap[j]);
- svg.appendChild(fo);
- }
- }
- }
+// fo.appendChild(snap[j]);
+// svg.appendChild(fo);
+// }
+// }
+// }
- decrementWaitCounter();
- });
- }, 0);
- };
+// decrementWaitCounter();
+// });
+// }, 0);
+// };
// Adds async MathJax rendering task
function renderMath(elt)
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index 37ffd052..935ebdd8 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -473,15 +473,16 @@ mxSvgCanvas2D.prototype.updateText=function(a,b,c,d,e,f,g,k,l,m,n){if(null!=n&&n
"px"));g&&0<c&&(q.style.width=Math.round(c+1)+"px");var t,u=q;null!=u.firstChild&&"DIV"==u.firstChild.nodeName&&(u=u.firstChild);var x=null!=n.mxCachedOffsetWidth?n.mxCachedOffsetWidth:u.offsetWidth;t=x+0;g&&"fill"!=k&&(l&&(t=Math.min(t,c)),q.style.width=Math.round(t+1)+"px");t=null!=n.mxCachedFinalOffsetWidth?n.mxCachedFinalOffsetWidth:u.offsetWidth;g=null!=n.mxCachedFinalOffsetHeight?n.mxCachedFinalOffsetHeight:u.offsetHeight;this.cacheOffsetSize&&(n.mxCachedOffsetWidth=x,n.mxCachedFinalOffsetWidth=
t,n.mxCachedFinalOffsetHeight=g);t+=0;g-=2;l&&(g=Math.min(g,d),t=Math.min(t,c));"width"==k?d=g:"fill"!=k&&(c=t,d=g);g=l=0;e==mxConstants.ALIGN_CENTER?l-=c/2:e==mxConstants.ALIGN_RIGHT&&(l-=c);a+=l;f==mxConstants.ALIGN_MIDDLE?g-=d/2:f==mxConstants.ALIGN_BOTTOM&&(g-=d);"fill"!=k&&mxClient.IS_FF&&mxClient.IS_WIN&&(g-=2);b+=g;e=1!=r.scale?"scale("+r.scale+")":"";0!=r.rotation&&this.rotateHtml?(e+="rotate("+r.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*r.scale,(b+d/2)*r.scale,r.rotation,r.rotationCx,
r.rotationCy),a=b.x-c*r.scale/2,b=b.y-d*r.scale/2):(a*=r.scale,b*=r.scale);0!=m&&(e+="rotate("+m+","+-l+","+-g+")");n.setAttribute("transform","translate("+Math.round(a)+","+Math.round(b)+")"+e);p.setAttribute("width",Math.round(Math.max(1,c)));p.setAttribute("height",Math.round(Math.max(1,d)))}};
-mxSvgCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,q){if(this.textEnabled&&null!=e){p=null!=p?p:0;var r=this.state;a+=r.dx;b+=r.dy;if(this.foEnabled&&"html"==l){var t="vertical-align:top;";n?t+="overflow:hidden;max-height:"+Math.round(d)+"px;max-width:"+Math.round(c)+"px;":"fill"==m?t+="width:"+Math.round(c+1)+"px;height:"+Math.round(d+1)+"px;overflow:hidden;":"width"==m&&(t+="width:"+Math.round(c+1)+"px;",0<d&&(t+="max-height:"+Math.round(d)+"px;overflow:hidden;"));var t=k&&0<c?t+("width:"+
-Math.round(c+1)+"px;white-space:normal;word-wrap:"+mxConstants.WORD_WRAP+";"):t+"white-space:nowrap;",u=this.createElement("g");1>r.alpha&&u.setAttribute("opacity",r.alpha);var x=this.createElement("foreignObject");x.setAttribute("style","overflow:visible;");x.setAttribute("pointer-events",this.pointerEvents?this.pointerEventsValue:"none");t=this.createDiv(e,f,g,t,m,k&&0<c?"normal":null);if(null!=t){null!=q&&t.setAttribute("dir",q);u.appendChild(x);this.root.appendChild(u);var y,A;q=y=2;if(!mxClient.IS_IE||
-9!=document.documentMode&&mxClient.IS_SVG){this.root.ownerDocument!=document?(t.style.visibility="hidden",document.body.appendChild(t)):x.appendChild(t);var z=t;null!=z.firstChild&&"DIV"==z.firstChild.nodeName&&(z=z.firstChild,k&&"break-word"==t.style.wordWrap&&(z.style.width="100%"));v=z.offsetWidth;0==v&&t.parentNode==x&&(t.style.visibility="hidden",document.body.appendChild(t),v=z.offsetWidth);this.cacheOffsetSize&&(u.mxCachedOffsetWidth=v);!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=
-m&&"width"!=m&&(B=t.style.whiteSpace,t.style.whiteSpace="nowrap",v<z.offsetWidth&&(t.style.whiteSpace=B));y=v+y-1;k&&"fill"!=m&&"width"!=m&&(n&&(y=Math.min(y,c)),t.style.width=y+"px");y=z.offsetWidth;A=z.offsetHeight;this.cacheOffsetSize&&(u.mxCachedFinalOffsetWidth=y,u.mxCachedFinalOffsetHeight=A);A-=q;t.parentNode!=x&&(x.appendChild(t),t.style.visibility="")}else{z=document.createElement("div");z.style.cssText=t.getAttribute("style");z.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";z.style.position=
-"absolute";z.style.visibility="hidden";A=document.createElement("div");A.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";A.style.wordWrap=mxConstants.WORD_WRAP;A.innerHTML=mxUtils.isNode(e)?e.outerHTML:e;z.appendChild(A);document.body.appendChild(z);8!=document.documentMode&&9!=document.documentMode&&null!=r.fontBorderColor&&(y+=2,q+=2);if(k&&0<c){var v=A.offsetWidth;padDx=0;if(!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=m){var B=z.style.whiteSpace;A.style.whiteSpace="nowrap";
-v<A.offsetWidth&&(z.style.whiteSpace=B)}n&&(v=Math.min(v,c));z.style.width=v+"px";y=A.offsetWidth+y+padDx;A=A.offsetHeight+q;z.style.display="inline-block";z.style.position="";z.style.visibility="";z.style.width=y+"px";t.setAttribute("style",z.style.cssText)}else y=A.offsetWidth+y,A=A.offsetHeight+q;z.parentNode.removeChild(z);x.appendChild(t)}n&&(A=Math.min(A,d),y=Math.min(y,c));"width"==m?d=A:"fill"!=m&&(c=y,d=A);1>r.alpha&&u.setAttribute("opacity",r.alpha);q=t=0;f==mxConstants.ALIGN_CENTER?t-=
-c/2:f==mxConstants.ALIGN_RIGHT&&(t-=c);a+=t;g==mxConstants.ALIGN_MIDDLE?q-=d/2:g==mxConstants.ALIGN_BOTTOM&&(q-=d);"fill"!=m&&mxClient.IS_FF&&mxClient.IS_WIN&&(q-=2);b+=q;z=1!=r.scale?"scale("+r.scale+")":"";0!=r.rotation&&this.rotateHtml?(z+="rotate("+r.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*r.scale,(b+d/2)*r.scale,r.rotation,r.rotationCx,r.rotationCy),a=b.x-c*r.scale/2,b=b.y-d*r.scale/2):(a*=r.scale,b*=r.scale);0!=p&&(z+="rotate("+p+","+-t+","+-q+")");u.setAttribute("transform",
-"translate("+(Math.round(a)+this.foOffset)+","+(Math.round(b)+this.foOffset)+")"+z);x.setAttribute("width",Math.round(Math.max(1,c)));x.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(x,a,b,c,d,e,f,g,k,l,m,n,p),null!=a&&(x.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),c.appendChild(x),c.appendChild(a),u.appendChild(c)))}}else this.plainText(a,b,c,d,e,f,g,k,m,n,p,
-q)}};mxSvgCanvas2D.prototype.createClip=function(a,b,c,d){a=Math.round(a);b=Math.round(b);c=Math.round(c);d=Math.round(d);for(var e="mx-clip-"+a+"-"+b+"-"+c+"-"+d,f=0,g=e+"-"+f;null!=document.getElementById(g);)g=e+"-"+ ++f;clip=this.createElement("clipPath");clip.setAttribute("id",g);e=this.createElement("rect");e.setAttribute("x",a);e.setAttribute("y",b);e.setAttribute("width",c);e.setAttribute("height",d);clip.appendChild(e);return clip};
+mxSvgCanvas2D.prototype.addForeignObject=function(a,b,c,d,e,f,g,k,l,m,n,p,q,r,t){var u=this.state;q=this.createElement("g");1>u.alpha&&q.setAttribute("opacity",u.alpha);var x=this.createElement("foreignObject");x.setAttribute("style","overflow:visible;");x.setAttribute("pointer-events",this.pointerEvents?this.pointerEventsValue:"none");q.appendChild(x);t.appendChild(q);var y,A;t=y=2;if(!mxClient.IS_IE||9!=document.documentMode&&mxClient.IS_SVG){this.root.ownerDocument!=document?(r.style.visibility=
+"hidden",document.body.appendChild(r)):x.appendChild(r);var z=r;null!=z.firstChild&&"DIV"==z.firstChild.nodeName&&(z=z.firstChild,k&&"break-word"==r.style.wordWrap&&(z.style.width="100%"));v=z.offsetWidth;0==v&&r.parentNode==x&&(r.style.visibility="hidden",document.body.appendChild(r),v=z.offsetWidth);this.cacheOffsetSize&&(q.mxCachedOffsetWidth=v);!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=m&&"width"!=m&&(B=r.style.whiteSpace,r.style.whiteSpace="nowrap",v<z.offsetWidth&&(r.style.whiteSpace=
+B));y=v+y-1;k&&"fill"!=m&&"width"!=m&&(n&&(y=Math.min(y,c)),r.style.width=y+"px");y=z.offsetWidth;A=z.offsetHeight;this.cacheOffsetSize&&(q.mxCachedFinalOffsetWidth=y,q.mxCachedFinalOffsetHeight=A);A-=t;r.parentNode!=x&&(x.appendChild(r),r.style.visibility="")}else{z=document.createElement("div");z.style.cssText=r.getAttribute("style");z.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";z.style.position="absolute";z.style.visibility="hidden";A=document.createElement("div");A.style.display=
+mxClient.IS_QUIRKS?"inline":"inline-block";A.style.wordWrap=mxConstants.WORD_WRAP;A.innerHTML=mxUtils.isNode(e)?e.outerHTML:e;z.appendChild(A);document.body.appendChild(z);8!=document.documentMode&&9!=document.documentMode&&null!=u.fontBorderColor&&(y+=2,t+=2);if(k&&0<c){var v=A.offsetWidth;padDx=0;if(!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=m){var B=z.style.whiteSpace;A.style.whiteSpace="nowrap";v<A.offsetWidth&&(z.style.whiteSpace=B)}n&&(v=Math.min(v,c));z.style.width=v+"px";y=A.offsetWidth+
+y+padDx;A=A.offsetHeight+t;z.style.display="inline-block";z.style.position="";z.style.visibility="";z.style.width=y+"px";r.setAttribute("style",z.style.cssText)}else y=A.offsetWidth+y,A=A.offsetHeight+t;z.parentNode.removeChild(z);x.appendChild(r)}n&&(A=Math.min(A,d),y=Math.min(y,c));"width"==m?d=A:"fill"!=m&&(c=y,d=A);1>u.alpha&&q.setAttribute("opacity",u.alpha);t=r=0;f==mxConstants.ALIGN_CENTER?r-=c/2:f==mxConstants.ALIGN_RIGHT&&(r-=c);a+=r;g==mxConstants.ALIGN_MIDDLE?t-=d/2:g==mxConstants.ALIGN_BOTTOM&&
+(t-=d);"fill"!=m&&mxClient.IS_FF&&mxClient.IS_WIN&&(t-=2);b+=t;z=1!=u.scale?"scale("+u.scale+")":"";0!=u.rotation&&this.rotateHtml?(z+="rotate("+u.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*u.scale,(b+d/2)*u.scale,u.rotation,u.rotationCx,u.rotationCy),a=b.x-c*u.scale/2,b=b.y-d*u.scale/2):(a*=u.scale,b*=u.scale);0!=p&&(z+="rotate("+p+","+-r+","+-t+")");q.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(b)+this.foOffset)+")"+z);x.setAttribute("width",
+Math.round(Math.max(1,c)));x.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(x,a,b,c,d,e,f,g,k,l,m,n,p),null!=a&&(x.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),c.appendChild(x),c.appendChild(a),q.appendChild(c)))};
+mxSvgCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,q){if(this.textEnabled&&null!=e){p=null!=p?p:0;var r=this.state;a+=r.dx;b+=r.dy;this.foEnabled&&"html"==l?(r="vertical-align:top;",n?r+="overflow:hidden;max-height:"+Math.round(d)+"px;max-width:"+Math.round(c)+"px;":"fill"==m?r+="width:"+Math.round(c+1)+"px;height:"+Math.round(d+1)+"px;overflow:hidden;":"width"==m&&(r+="width:"+Math.round(c+1)+"px;",0<d&&(r+="max-height:"+Math.round(d)+"px;overflow:hidden;")),r=k&&0<c?r+("width:"+Math.round(c+
+1)+"px;white-space:normal;word-wrap:"+mxConstants.WORD_WRAP+";"):r+"white-space:nowrap;",r=this.createDiv(e,f,g,r,m,k&&0<c?"normal":null),null!=r&&(null!=q&&r.setAttribute("dir",q),this.addForeignObject(a,b,c,d,e,f,g,k,l,m,n,p,q,r,this.root))):this.plainText(a,b,c,d,e,f,g,k,m,n,p,q)}};
+mxSvgCanvas2D.prototype.createClip=function(a,b,c,d){a=Math.round(a);b=Math.round(b);c=Math.round(c);d=Math.round(d);for(var e="mx-clip-"+a+"-"+b+"-"+c+"-"+d,f=0,g=e+"-"+f;null!=document.getElementById(g);)g=e+"-"+ ++f;clip=this.createElement("clipPath");clip.setAttribute("id",g);e=this.createElement("rect");e.setAttribute("x",a);e.setAttribute("y",b);e.setAttribute("width",c);e.setAttribute("height",d);clip.appendChild(e);return clip};
mxSvgCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,k,l,m,n,p){n=null!=n?n:0;k=this.state;var q=k.fontSize,r=this.createElement("g"),t=k.transform||"";this.updateFont(r);0!=n&&(t+="rotate("+n+","+this.format(a*k.scale)+","+this.format(b*k.scale)+")");null!=p&&r.setAttribute("direction",p);m&&0<c&&0<d&&(p=a,n=b,f==mxConstants.ALIGN_CENTER?p-=c/2:f==mxConstants.ALIGN_RIGHT&&(p-=c),"fill"!=l&&(g==mxConstants.ALIGN_MIDDLE?n-=d/2:g==mxConstants.ALIGN_BOTTOM&&(n-=d)),n=this.createClip(p*k.scale-2,
n*k.scale-2,c*k.scale+4,d*k.scale+4),null!=this.defs?this.defs.appendChild(n):this.root.appendChild(n),mxClient.IS_CHROMEAPP||mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE||this.root.ownerDocument!=document?r.setAttribute("clip-path","url(#"+n.getAttribute("id")+")"):(p=this.getBaseUrl().replace(/([\(\)])/g,"\\$1"),r.setAttribute("clip-path","url("+p+"#"+n.getAttribute("id")+")")));n=f==mxConstants.ALIGN_RIGHT?"end":f==mxConstants.ALIGN_CENTER?"middle":"start";"start"!=n&&r.setAttribute("text-anchor",
n);this.styleEnabled&&q==mxConstants.DEFAULT_FONTSIZE||r.setAttribute("font-size",q*k.scale+"px");0<t.length&&r.setAttribute("transform",t);1>k.alpha&&r.setAttribute("opacity",k.alpha);t=e.split("\n");p=Math.round(q*mxConstants.LINE_HEIGHT);var u=q+(t.length-1)*p;n=b+q-1;g==mxConstants.ALIGN_MIDDLE?"fill"==l?n-=d/2:(m=(this.matchHtmlAlignment&&m&&0<d?Math.min(u,d):u)/2,n-=m+1):g==mxConstants.ALIGN_BOTTOM&&("fill"==l?n-=d:(m=this.matchHtmlAlignment&&m&&0<d?Math.min(u,d):u,n-=m+2));for(m=0;m<t.length;m++)0<
@@ -2130,9 +2131,9 @@ null!=v.toolbar)){var d=c.fontFamily;"'"==d.charAt(0)&&(d=d.substring(1));"'"==d
b){u.apply(this,arguments);q()};b.container.setAttribute("tabindex","0");b.container.style.cursor="default";if(window.self===window.top&&null!=b.container.parentNode)try{b.container.focus()}catch(E){}var w=b.fireMouseEvent;b.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();w.apply(this,arguments)};b.popupMenuHandler.autoExpand=!0;null!=this.menus&&(b.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));mxEvent.addGestureListeners(document,
mxUtils.bind(this,function(a){b.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var r="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),y="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){try{var c=b.view.getState(a);if(null!=c){var d=a.clone();d.style="";var e=b.getCellStyle(d);a=[];var d=[],f;for(f in c.style)e[f]!=c.style[f]&&(a.push(c.style[f]),
d.push(f));for(var g=b.getModel().getStyle(c.cell),h=null!=g?g.split(";"):[],g=0;g<h.length;g++){var k=h[g],l=k.indexOf("=");if(0<=l){f=k.substring(0,l);var m=k.substring(l+1);null!=e[f]&&"none"==m&&(a.push(m),d.push(f))}}b.getModel().isEdge(c.cell)?b.currentEdgeStyle={}:b.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",d,"values",a,"cells",[c.cell]))}}catch(K){this.handleError(K)}};this.clearDefaultStyle=function(){b.currentEdgeStyle=mxUtils.clone(b.defaultEdgeStyle);
-b.currentVertexStyle=mxUtils.clone(b.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var x=["fontFamily","fontSize","fontColor"],D="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),A=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],x,["opacity"],["align"],["html"]];for(a=0;a<A.length;a++)for(c=
-0;c<A[a].length;c++)r.push(A[a][c]);for(a=0;a<y.length;a++)0>mxUtils.indexOf(r,y[a])&&r.push(y[a]);var C=function(a,c){var d=b.getModel();d.beginUpdate();try{if(c)for(var e=d.isEdge(k),f=e?b.currentEdgeStyle:b.currentVertexStyle,e=["fontSize","fontFamily","fontColor"],g=0;g<e.length;g++){var h=f[e[g]];null!=h&&b.setCellStyles(e[g],h,a)}else for(h=0;h<a.length;h++){for(var k=a[h],l=d.getStyle(k),m=null!=l?l.split(";"):[],n=r.slice(),g=0;g<m.length;g++){var p=m[g],v=p.indexOf("=");if(0<=v){var q=p.substring(0,
-v),z=mxUtils.indexOf(n,q);0<=z&&n.splice(z,1);for(var Q=0;Q<A.length;Q++){var P=A[Q];if(0<=mxUtils.indexOf(P,q))for(var T=0;T<P.length;T++){var da=mxUtils.indexOf(n,P[T]);0<=da&&n.splice(da,1)}}}}for(var f=(e=d.isEdge(k))?b.currentEdgeStyle:b.currentVertexStyle,V=d.getStyle(k),g=0;g<n.length;g++){var q=n[g],u=f[q];null==u||"shape"==q&&!e||e&&!(0>mxUtils.indexOf(y,q))||(V=mxUtils.setStyle(V,q,u))}d.setStyle(k,V)}}finally{d.endUpdate()}};b.addListener("cellsInserted",function(a,b){C(b.getProperty("cells"))});
+b.currentVertexStyle=mxUtils.clone(b.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var x=["fontFamily","fontSize","fontColor"],D="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),z=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],x,["opacity"],["align"],["html"]];for(a=0;a<z.length;a++)for(c=
+0;c<z[a].length;c++)r.push(z[a][c]);for(a=0;a<y.length;a++)0>mxUtils.indexOf(r,y[a])&&r.push(y[a]);var C=function(a,c){var d=b.getModel();d.beginUpdate();try{if(c)for(var e=d.isEdge(k),f=e?b.currentEdgeStyle:b.currentVertexStyle,e=["fontSize","fontFamily","fontColor"],g=0;g<e.length;g++){var h=f[e[g]];null!=h&&b.setCellStyles(e[g],h,a)}else for(h=0;h<a.length;h++){for(var k=a[h],l=d.getStyle(k),m=null!=l?l.split(";"):[],n=r.slice(),g=0;g<m.length;g++){var p=m[g],v=p.indexOf("=");if(0<=v){var q=p.substring(0,
+v),A=mxUtils.indexOf(n,q);0<=A&&n.splice(A,1);for(var Q=0;Q<z.length;Q++){var P=z[Q];if(0<=mxUtils.indexOf(P,q))for(var T=0;T<P.length;T++){var da=mxUtils.indexOf(n,P[T]);0<=da&&n.splice(da,1)}}}}for(var f=(e=d.isEdge(k))?b.currentEdgeStyle:b.currentVertexStyle,V=d.getStyle(k),g=0;g<n.length;g++){var q=n[g],u=f[q];null==u||"shape"==q&&!e||e&&!(0>mxUtils.indexOf(y,q))||(V=mxUtils.setStyle(V,q,u))}d.setStyle(k,V)}}finally{d.endUpdate()}};b.addListener("cellsInserted",function(a,b){C(b.getProperty("cells"))});
b.addListener("textInserted",function(a,b){C(b.getProperty("cells"),!0)});b.connectionHandler.addListener(mxEvent.CONNECT,function(a,b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));C(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var d=c.getProperty("cells"),e=!1,f=!1;if(0<d.length)for(var g=0;g<d.length&&(e=b.getModel().isVertex(d[g])||e,!(f=b.getModel().isEdge(d[g])||f)||!e);g++);else f=e=!0;for(var d=c.getProperty("keys"),
h=c.getProperty("values"),g=0;g<d.length;g++){var k=0<=mxUtils.indexOf(x,d[g]);if("strokeColor"!=d[g]||null!=h[g]&&"none"!=h[g])if(0<=mxUtils.indexOf(y,d[g]))f||0<=mxUtils.indexOf(D,d[g])?null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]:e&&0<=mxUtils.indexOf(r,d[g])&&(null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g]);else if(0<=mxUtils.indexOf(r,d[g])){if(e||k)null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g];if(f||k||
0<=mxUtils.indexOf(D,d[g]))null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]}}null!=this.toolbar&&(this.toolbar.setFontName(b.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(b.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==b.currentEdgeStyle.edgeStyle&&"1"==b.currentEdgeStyle.curved?"geSprite geSprite-curved":
@@ -2178,11 +2179,13 @@ t(30),v())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"po
t(30)}));var y=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<y&&Math.abs(this.scrollTop-a.container.scrollTop)<y&&Math.abs(this.startX-c.getGraphX())<y&&Math.abs(this.startY-c.getGraphY())<
y&&(0<parseFloat(d.chromelessToolbar.style.opacity||0)?v():t(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var x=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}x.apply(this,arguments)};if(!a.isViewer()){var D=a.sizeDidChange;a.sizeDidChange=
function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),c=this.getPagePadding(),d=this.getPageSize(),e=Math.ceil(2*c.x+b.width*d.width),f=Math.ceil(2*c.y+b.height*d.height),g=a.minimumGraphSize;if(null==g||g.width!=e||g.height!=f)a.minimumGraphSize=new mxRectangle(0,0,e,f);e=c.x-b.x*d.width;c=c.y-b.y*d.height;this.autoTranslate||this.view.translate.x==e&&this.view.translate.y==c?D.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=
-b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(e,c),a.container.scrollLeft+=Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var A=null;a.lazyZoom=function(b){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);b?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=
-(this.view.scale+.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*
-this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var b=mxUtils.getOffset(a.container),e=0,f=0;null!=A&&(e=a.container.offsetWidth/2-A.x+b.x,f=a.container.offsetHeight/2-A.y+b.y);b=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=b&&(null!=c&&d.chromelessResize(!1,null,e*(this.cumulativeZoomFactor-1),f*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==e&&0==f||(a.container.scrollLeft-=e*(this.cumulativeZoomFactor-
-1),a.container.scrollTop-=f*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),this.lazyZoomDelay)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c){if((null==this.dialogs||0==this.dialogs.length)&&a.isZoomWheelEvent(b))for(var d=mxEvent.getSource(b);null!=d;){if(d==a.container)return A=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b)),a.lazyZoom(c),mxEvent.consume(b),!1;d=d.parentNode}}),a.container)};
-EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};
+b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(e,c),a.container.scrollLeft+=Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var z=null,C=a.view.getDrawPane(),E=a.view.getBackgroundPane();a.lazyZoom=function(b,e){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);
+b?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);
+if("fast"==urlParams.zoom){var f=e?a.container.scrollWidth/2:z.x+a.container.scrollLeft-a.container.offsetLeft,g=e?a.container.scrollHeight/2:z.y+a.container.scrollTop-a.container.offsetTop;C.setAttribute("transform-origin",f+" "+g);C.setAttribute("transform","scale("+this.cumulativeZoomFactor+")");E.setAttribute("transform-origin",f+" "+g);E.setAttribute("transform","scale("+this.cumulativeZoomFactor+")");g=a.view.backgroundPageShape.node;mxUtils.setPrefixedStyle(g.style,"transform-origin",e?"50%":
+z.x+a.container.offsetLeft-g.offsetLeft+"px "+e?"50%":z.y-g.offsetTop+"px");mxUtils.setPrefixedStyle(g.style,"transform","scale("+this.cumulativeZoomFactor+")");a.view.getOverlayPane().style.opacity="0";a.view.getDecoratorPane().style.opacity="0";console.log("here",this.cumulativeZoomFactor,f,g.offsetLeft,g.offsetWidth)}this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){"fast"==
+urlParams.zoom&&(C.removeAttribute("transform-origin"),C.removeAttribute("transform"),E.removeAttribute("transform-origin"),E.removeAttribute("transform"),a.view.getOverlayPane().style.opacity="",a.view.getDecoratorPane().style.opacity="",mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null));var b=mxUtils.getOffset(a.container),e=0,g=0;null!=z&&(e=a.container.offsetWidth/2-z.x+b.x,g=
+a.container.offsetHeight/2-z.y+b.y);b=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=b&&(null!=c&&d.chromelessResize(!1,null,e*(this.cumulativeZoomFactor-1),g*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==e&&0==g||(a.container.scrollLeft-=e*(this.cumulativeZoomFactor-1),a.container.scrollTop-=g*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),"fast"==urlParams.zoom?500:this.lazyZoomDelay)};mxEvent.addMouseWheelListener(mxUtils.bind(this,
+function(b,c){if((null==this.dialogs||0==this.dialogs.length)&&a.isZoomWheelEvent(b))for(var d=mxEvent.getSource(b);null!=d;){if(d==a.container)return z=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b)),a.lazyZoom(c),mxEvent.consume(b),!1;d=d.parentNode}}),a.container)};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};
EditorUi.prototype.createTemporaryGraph=function(a){a=new Graph(document.createElement("div"),null,null,a);a.resetViewOnRootChange=!1;a.setConnectable(!1);a.gridEnabled=!1;a.autoScroll=!1;a.setTooltips(!1);a.setEnabled(!1);a.container.style.visibility="hidden";a.container.style.position="absolute";a.container.style.overflow="hidden";a.container.style.height="1px";a.container.style.width="1px";return a};
EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){null!=this.format&&(this.formatWidth=a||0<this.formatWidth?0:240,this.formatContainer.style.display=a||0<this.formatWidth?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var c=urlParams.border,d=60;null!=c&&(d=parseInt(c));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(d,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))};
@@ -2246,8 +2249,8 @@ EditorUi.prototype.showDataDialog=function(a){null!=a&&(a=new EditDataDialog(thi
EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var c=mxUtils.prompt(mxResources.get("backgroundImage"),"");if(null!=c&&0<c.length){var d=new Image;d.onload=function(){a(new mxImage(c,d.width,d.height))};d.onerror=function(){a(null);mxUtils.alert(mxResources.get("fileNotFound"))};d.src=c}else a(null)};
EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,c,d){mxUtils.confirm(a)?null!=c&&c():null!=d&&d()};
EditorUi.prototype.createOutline=function(a){var c=new mxOutline(this.editor.graph);c.border=20;mxEvent.addListener(window,"resize",function(){c.update()});this.addListener("pageFormatChanged",function(){c.update()});return c};EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize"};
-EditorUi.prototype.createKeyHandler=function(a){function c(a,c,d){h.push(function(){if(!b.isSelectionEmpty()&&b.isEnabled())if(c=null!=c?c:1,d){b.getModel().beginUpdate();try{for(var e=b.getSelectionCells(),f=0;f<e.length;f++)if(b.getModel().isVertex(e[f])&&b.isCellResizable(e[f])){var g=b.getCellGeometry(e[f]);null!=g&&(g=g.clone(),37==a?g.width=Math.max(0,g.width-c):38==a?g.height=Math.max(0,g.height-c):39==a?g.width+=c:40==a&&(g.height+=c),b.getModel().setGeometry(e[f],g))}}finally{b.getModel().endUpdate()}}else e=
-b.getSelectionCell(),f=b.model.getParent(e),g=null,1==b.getSelectionCount()&&b.model.isVertex(e)&&null!=b.layoutManager&&!b.isCellLocked(e)&&(g=b.layoutManager.getLayout(f)),null!=g&&g.constructor==mxStackLayout?(g=f.getIndex(e),37==a||38==a?b.model.add(f,e,Math.max(0,g-1)):39!=a&&40!=a||b.model.add(f,e,Math.min(b.model.getChildCount(f),g+1))):(f=e=0,37==a?e=-c:38==a?f=-c:39==a?e=c:40==a&&(f=c),b.moveCells(b.getMovableCells(b.getSelectionCells()),e,f))});null!=g&&window.clearTimeout(g);g=window.setTimeout(function(){if(0<
+EditorUi.prototype.createKeyHandler=function(a){function c(a,c,d){h.push(function(){if(!b.isSelectionEmpty()&&b.isEnabled())if(c=null!=c?c:1,d){b.getModel().beginUpdate();try{for(var e=b.getSelectionCells(),g=0;g<e.length;g++)if(b.getModel().isVertex(e[g])&&b.isCellResizable(e[g])){var f=b.getCellGeometry(e[g]);null!=f&&(f=f.clone(),37==a?f.width=Math.max(0,f.width-c):38==a?f.height=Math.max(0,f.height-c):39==a?f.width+=c:40==a&&(f.height+=c),b.getModel().setGeometry(e[g],f))}}finally{b.getModel().endUpdate()}}else e=
+b.getSelectionCell(),g=b.model.getParent(e),f=null,1==b.getSelectionCount()&&b.model.isVertex(e)&&null!=b.layoutManager&&!b.isCellLocked(e)&&(f=b.layoutManager.getLayout(g)),null!=f&&f.constructor==mxStackLayout?(f=g.getIndex(e),37==a||38==a?b.model.add(g,e,Math.max(0,f-1)):39!=a&&40!=a||b.model.add(g,e,Math.min(b.model.getChildCount(g),f+1))):(g=e=0,37==a?e=-c:38==a?g=-c:39==a?e=c:40==a&&(g=c),b.moveCells(b.getMovableCells(b.getSelectionCells()),e,g))});null!=g&&window.clearTimeout(g);g=window.setTimeout(function(){if(0<
h.length){b.getModel().beginUpdate();try{for(var a=0;a<h.length;a++)h[a]();h=[]}finally{b.getModel().endUpdate()}b.scrollCellToVisible(b.getSelectionCell())}},200)}var d=this,b=this.editor.graph,f=new mxKeyHandler(b),e=f.isEventIgnored;f.isEventIgnored=function(a){return(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&
!mxClient.IS_SF)&&e.apply(this,arguments)};f.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==d.dialogs||0==d.dialogs.length)};f.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var h=[],g=null,k={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},l=f.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(b.isEnabled()){if(mxEvent.isShiftDown(a)&&
mxEvent.isAltDown(a)){var e=d.actions.get(d.altShiftActions[a.keyCode]);if(null!=e)return e.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){b.selectParentCell()}:function(){b.selectChildCell()};if(null!=k[a.keyCode]&&!b.isSelectionEmpty())if(!this.isControlDown(a)&&mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(b.model.isVertex(b.getSelectionCell()))return function(){var c=b.connectVertex(b.getSelectionCell(),k[a.keyCode],b.defaultEdgeLength,a,!0);null!=c&&0<
@@ -2290,7 +2293,7 @@ b.style.cursor="default";var f=document.createElement("input");f.setAttribute("p
mxResources.get("search"));e.style.position="relative";e.style.left="-18px";mxClient.IS_QUIRKS?(f.style.height="28px",e.style.top="-4px"):e.style.top="1px";e.style.background="url('"+this.editorUi.editor.transparentImage+"')";var h;b.appendChild(e);d.appendChild(b);var g=document.createElement("center"),k=mxUtils.button(mxResources.get("moreResults"),function(){h()});k.style.display="none";k.style.lineHeight="normal";k.style.marginTop="4px";k.style.marginBottom="8px";g.style.paddingTop="4px";g.style.paddingBottom=
"4px";g.appendChild(k);d.appendChild(g);var l="",m=!1,n=!1,p=0,q={},v=12,t=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var a=d.firstChild;null!=a;){var c=a.nextSibling;a!=b&&a!=g&&a.parentNode.removeChild(a);a=c}});mxEvent.addListener(e,"click",function(){e.getAttribute("src")==Dialog.prototype.closeImage&&(e.setAttribute("src",Sidebar.prototype.searchImage),e.setAttribute("title",mxResources.get("search")),k.style.display="none",l=f.value="",t());f.focus()});h=mxUtils.bind(this,
function(){v=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=f.value){if(null!=g.parentNode&&(l!=f.value&&(t(),l=f.value,q={},n=!1,p=0),!m&&!n)){k.setAttribute("disabled","true");k.style.display="";k.style.cursor="wait";k.innerHTML=mxResources.get("loading")+"...";m=!0;var a={};this.currentSearch=a;this.searchEntries(l,v,p,mxUtils.bind(this,function(b,c,e,f){if(this.currentSearch==a){b=null!=b?b:[];m=!1;p++;this.insertSearchHint(d,l,v,p,b,c,e,f);
-0==b.length&&1==p&&(l="");null!=g.parentNode&&g.parentNode.removeChild(g);for(c=0;c<b.length;c++)try{var h=b[c]();null==q[h.innerHTML]&&(q[h.innerHTML]="1",d.appendChild(h))}catch(A){}e?(k.removeAttribute("disabled"),k.innerHTML=mxResources.get("moreResults")):(k.innerHTML=mxResources.get("reset"),k.style.display="none",n=!0);k.style.cursor="";d.appendChild(g)}}),mxUtils.bind(this,function(){k.style.cursor=""}))}}else t(),l=f.value="",q={},k.style.display="none",n=!1,f.focus()});mxEvent.addListener(f,
+0==b.length&&1==p&&(l="");null!=g.parentNode&&g.parentNode.removeChild(g);for(c=0;c<b.length;c++)try{var h=b[c]();null==q[h.innerHTML]&&(q[h.innerHTML]="1",d.appendChild(h))}catch(z){}e?(k.removeAttribute("disabled"),k.innerHTML=mxResources.get("moreResults")):(k.innerHTML=mxResources.get("reset"),k.style.display="none",n=!0);k.style.cursor="";d.appendChild(g)}}),mxUtils.bind(this,function(){k.style.cursor=""}))}}else t(),l=f.value="",q={},k.style.display="none",n=!1,f.focus()});mxEvent.addListener(f,
"keydown",mxUtils.bind(this,function(a){13==a.keyCode&&(h(),mxEvent.consume(a))}));mxEvent.addListener(f,"keyup",mxUtils.bind(this,function(a){""==f.value?(e.setAttribute("src",Sidebar.prototype.searchImage),e.setAttribute("title",mxResources.get("search"))):(e.setAttribute("src",Dialog.prototype.closeImage),e.setAttribute("title",mxResources.get("reset")));""==f.value?(n=!0,k.style.display="none"):f.value!=l?(k.style.display="none",n=!1):m||(k.style.display=n?"none":"")}));mxEvent.addListener(f,
"mousedown",function(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=!0});mxEvent.addListener(f,"selectstart",function(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=!0});a=document.createElement("div");a.appendChild(d);this.container.appendChild(a);this.palettes.search=[c,a]};
Sidebar.prototype.insertSearchHint=function(a,c,d,b,f,e,h,g){0==f.length&&1==b&&(d=document.createElement("div"),d.className="geTitle",d.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(d,mxResources.get("noResultsFor",[c])),a.appendChild(d))};
@@ -2426,7 +2429,7 @@ Sidebar.prototype.createDragSource=function(a,c,d,b,f){function e(a,b){var c;mxC
"inline":"inline-block"):(c=mxUtils.createImage(a.src),c.style.width=a.width+"px",c.style.height=a.height+"px");null!=b&&c.setAttribute("title",b);mxUtils.setOpacity(c,a==this.refreshTarget?30:20);c.style.position="absolute";c.style.cursor="crosshair";return c}function h(a,b,c,d){null!=d.parentNode&&(mxUtils.contains(c,a,b)?(mxUtils.setOpacity(d,100),F=d):mxUtils.setOpacity(d,d==C?30:20));return c}for(var g=this.editorUi,k=g.editor.graph,l=null,m=null,n=this,p=0;p<b.length&&(null==m&&this.editorUi.editor.graph.model.isVertex(b[p])?
m=p:null==l&&this.editorUi.editor.graph.model.isEdge(b[p])&&null==this.editorUi.editor.graph.model.getTerminal(b[p],!0)&&(l=p),null==m||null==l);p++);var q=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(a,d,e,g,f){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=b&&null!=w&&F==C){var h=a.isCellSelected(w.cell)?a.getSelectionCells():[w.cell],h=this.updateShapes(a.model.isEdge(w.cell)?b[0]:b[m],h);a.setSelectionCells(h)}else null!=b&&null!=F&&null!=
t&&F!=C?(h=a.model.isEdge(t.cell)||null==l?m:l,a.setSelectionCells(this.dropAndConnect(t.cell,b,I,h,d))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(a.view.getState(a.getSelectionCell()))}),d,0,0,k.autoscroll,!0,!0);k.addListener(mxEvent.ESCAPE,function(a,b){q.isActive()&&q.reset()});var v=q.mouseDown;q.mouseDown=function(a){mxEvent.isPopupTrigger(a)||mxEvent.isMultiTouchEvent(a)||(k.stopEditing(),v.apply(this,arguments))};var t=null,u=null,w=null,r=!1,
-y=e(this.triangleUp,mxResources.get("connect")),x=e(this.triangleRight,mxResources.get("connect")),D=e(this.triangleDown,mxResources.get("connect")),A=e(this.triangleLeft,mxResources.get("connect")),C=e(this.refreshTarget,mxResources.get("replace")),E=null,H=e(this.roundDrop),L=e(this.roundDrop),I=mxConstants.DIRECTION_NORTH,F=null,J=q.createPreviewElement;q.createPreviewElement=function(a){var b=J.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents="none");this.previewElementWidth=b.style.width;
+y=e(this.triangleUp,mxResources.get("connect")),x=e(this.triangleRight,mxResources.get("connect")),D=e(this.triangleDown,mxResources.get("connect")),z=e(this.triangleLeft,mxResources.get("connect")),C=e(this.refreshTarget,mxResources.get("replace")),E=null,H=e(this.roundDrop),L=e(this.roundDrop),I=mxConstants.DIRECTION_NORTH,F=null,J=q.createPreviewElement;q.createPreviewElement=function(a){var b=J.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents="none");this.previewElementWidth=b.style.width;
this.previewElementHeight=b.style.height;return b};var O=q.dragEnter;q.dragEnter=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("none");O.apply(this,arguments)};var S=q.dragExit;q.dragExit=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("");S.apply(this,arguments)};q.dragOver=function(a,c){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=F&&this.currentGuide.hide();if(null!=this.previewElement){var d=a.view;if(null!=w&&F==C)this.previewElement.style.display=
a.model.isEdge(w.cell)?"none":"",this.previewElement.style.left=w.x+"px",this.previewElement.style.top=w.y+"px",this.previewElement.style.width=w.width+"px",this.previewElement.style.height=w.height+"px";else if(null!=t&&null!=F){var e=a.model.isEdge(t.cell)||null==l?m:l,g=n.getDropAndConnectGeometry(t.cell,b[e],I,b),h=a.model.isEdge(t.cell)?null:a.getCellGeometry(t.cell),k=a.getCellGeometry(b[e]),p=a.model.getParent(t.cell),v=d.translate.x*d.scale,u=d.translate.y*d.scale;null!=h&&!h.relative&&a.model.isVertex(p)&&
p!=d.currentRoot&&(u=d.getState(p),v=u.x,u=u.y);h=k.x;k=k.y;a.model.isEdge(b[e])&&(k=h=0);this.previewElement.style.left=(g.x-h)*d.scale+v+"px";this.previewElement.style.top=(g.y-k)*d.scale+u+"px";1==b.length&&(this.previewElement.style.width=g.width*d.scale+"px",this.previewElement.style.height=g.height*d.scale+"px");this.previewElement.style.display=""}else null!=q.currentHighlight.state&&a.model.isEdge(q.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-
@@ -2434,16 +2437,16 @@ f.width*d.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.p
this.graph.getModel().getParent(g);this.graph.getModel().isVertex(f)&&this.graph.isCellConnectable(f)&&(g=f)}a.isCellLocked(g)&&(g=null);var k=a.view.getState(g),f=F=null;K!=k?(K=k,R=(new Date).getTime(),G=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=k&&(this.updateThread=window.setTimeout(function(){null==F&&(K=k,q.getDropTarget(a,c,d,e))},this.dropTargetDelay+10))):G=(new Date).getTime()-R;if(2500>G&&null!=k&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE)!=
mxUtils.getValue(M,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(k.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(M,mxConstants.STYLE_SHAPE)||1500<G||a.model.isEdge(k.cell))&&G>this.dropTargetDelay&&(a.model.isVertex(k.cell)&&null!=m||a.model.isEdge(k.cell)&&a.model.isEdge(b[0]))){w=
k;var l=a.model.isEdge(k.cell)?a.view.getPoint(k):new mxPoint(k.getCenterX(),k.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);C.style.left=Math.floor(l.x)+"px";C.style.top=Math.floor(l.y)+"px";null==E&&(a.container.appendChild(C),E=C.parentNode);h(c,d,l,C)}else null==w||!mxUtils.contains(w,c,d)||1500<G&&!mxEvent.isShiftDown(e)?(w=null,null!=E&&(C.parentNode.removeChild(C),E=null)):null!=w&&null!=E&&
-(l=a.model.isEdge(w.cell)?a.view.getPoint(w):new mxPoint(w.getCenterX(),w.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),h(c,d,l,C));if(r&&null!=t&&!mxEvent.isAltDown(e)&&null==F){f=mxRectangle.fromRectangle(t);if(a.model.isEdge(t.cell)){var z=t.absolutePoints;null!=H.parentNode&&(l=z[0],f.add(h(c,d,new mxRectangle(l.x-this.roundDrop.width/2,l.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),
-H)));null!=L.parentNode&&(z=z[z.length-1],f.add(h(c,d,new mxRectangle(z.x-this.roundDrop.width/2,z.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),L)))}else l=mxRectangle.fromRectangle(t),null!=t.shape&&null!=t.shape.boundingBox&&(l=mxRectangle.fromRectangle(t.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),z=this.graph.selectionCellsHandler.getHandler(t.cell),null!=z&&(l.x-=z.horizontalOffset/2,l.y-=z.verticalOffset/2,l.width+=z.horizontalOffset,
-l.height+=z.verticalOffset,null!=z.rotationShape&&null!=z.rotationShape.node&&"hidden"!=z.rotationShape.node.style.visibility&&"none"!=z.rotationShape.node.style.display&&null!=z.rotationShape.boundingBox&&l.add(z.rotationShape.boundingBox)),f.add(h(c,d,new mxRectangle(t.getCenterX()-this.triangleUp.width/2,l.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),y)),f.add(h(c,d,new mxRectangle(l.x+l.width,t.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),
-x)),f.add(h(c,d,new mxRectangle(t.getCenterX()-this.triangleDown.width/2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),D)),f.add(h(c,d,new mxRectangle(l.x-this.triangleLeft.width,t.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),A));null!=f&&f.grow(10)}I=mxConstants.DIRECTION_NORTH;F==x?I=mxConstants.DIRECTION_EAST:F==D||F==L?I=mxConstants.DIRECTION_SOUTH:F==A&&(I=mxConstants.DIRECTION_WEST);null!=w&&F==C&&(k=w);l=(null==m||a.isCellConnectable(b[m]))&&
-(a.model.isEdge(g)&&null!=m||a.model.isVertex(g)&&a.isCellConnectable(g));if(null!=t&&5E3<=G||t!=k&&(null==f||!mxUtils.contains(f,c,d)||500<G&&null==F&&l))if(r=!1,t=5E3>G&&G>this.dropTargetDelay||a.model.isEdge(g)?k:null,null!=t&&l){f=[H,L,y,x,D,A];for(l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);a.model.isEdge(g)?(z=k.absolutePoints,null!=z&&(l=z[0],z=z[z.length-1],f=a.tolerance,new mxRectangle(c-f,d-f,2*f,2*f),H.style.left=Math.floor(l.x-this.roundDrop.width/2)+"px",
-H.style.top=Math.floor(l.y-this.roundDrop.height/2)+"px",L.style.left=Math.floor(z.x-this.roundDrop.width/2)+"px",L.style.top=Math.floor(z.y-this.roundDrop.height/2)+"px",null==a.model.getTerminal(g,!0)&&a.container.appendChild(H),null==a.model.getTerminal(g,!1)&&a.container.appendChild(L))):(l=mxRectangle.fromRectangle(k),null!=k.shape&&null!=k.shape.boundingBox&&(l=mxRectangle.fromRectangle(k.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),z=this.graph.selectionCellsHandler.getHandler(k.cell),
-null!=z&&(l.x-=z.horizontalOffset/2,l.y-=z.verticalOffset/2,l.width+=z.horizontalOffset,l.height+=z.verticalOffset,null!=z.rotationShape&&null!=z.rotationShape.node&&"hidden"!=z.rotationShape.node.style.visibility&&"none"!=z.rotationShape.node.style.display&&null!=z.rotationShape.boundingBox&&l.add(z.rotationShape.boundingBox)),y.style.left=Math.floor(k.getCenterX()-this.triangleUp.width/2)+"px",y.style.top=Math.floor(l.y-this.triangleUp.height)+"px",x.style.left=Math.floor(l.x+l.width)+"px",x.style.top=
-Math.floor(k.getCenterY()-this.triangleRight.height/2)+"px",D.style.left=y.style.left,D.style.top=Math.floor(l.y+l.height)+"px",A.style.left=Math.floor(l.x-this.triangleLeft.width)+"px",A.style.top=x.style.top,"eastwest"!=k.style.portConstraint&&(a.container.appendChild(y),a.container.appendChild(D)),a.container.appendChild(x),a.container.appendChild(A));null!=k&&(u=a.selectionCellsHandler.getHandler(k.cell),null!=u&&null!=u.setHandlesVisible&&u.setHandlesVisible(!1));r=!0}else for(f=[H,L,y,x,D,A],
+(l=a.model.isEdge(w.cell)?a.view.getPoint(w):new mxPoint(w.getCenterX(),w.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),h(c,d,l,C));if(r&&null!=t&&!mxEvent.isAltDown(e)&&null==F){f=mxRectangle.fromRectangle(t);if(a.model.isEdge(t.cell)){var A=t.absolutePoints;null!=H.parentNode&&(l=A[0],f.add(h(c,d,new mxRectangle(l.x-this.roundDrop.width/2,l.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),
+H)));null!=L.parentNode&&(A=A[A.length-1],f.add(h(c,d,new mxRectangle(A.x-this.roundDrop.width/2,A.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),L)))}else l=mxRectangle.fromRectangle(t),null!=t.shape&&null!=t.shape.boundingBox&&(l=mxRectangle.fromRectangle(t.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),A=this.graph.selectionCellsHandler.getHandler(t.cell),null!=A&&(l.x-=A.horizontalOffset/2,l.y-=A.verticalOffset/2,l.width+=A.horizontalOffset,
+l.height+=A.verticalOffset,null!=A.rotationShape&&null!=A.rotationShape.node&&"hidden"!=A.rotationShape.node.style.visibility&&"none"!=A.rotationShape.node.style.display&&null!=A.rotationShape.boundingBox&&l.add(A.rotationShape.boundingBox)),f.add(h(c,d,new mxRectangle(t.getCenterX()-this.triangleUp.width/2,l.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),y)),f.add(h(c,d,new mxRectangle(l.x+l.width,t.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),
+x)),f.add(h(c,d,new mxRectangle(t.getCenterX()-this.triangleDown.width/2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),D)),f.add(h(c,d,new mxRectangle(l.x-this.triangleLeft.width,t.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),z));null!=f&&f.grow(10)}I=mxConstants.DIRECTION_NORTH;F==x?I=mxConstants.DIRECTION_EAST:F==D||F==L?I=mxConstants.DIRECTION_SOUTH:F==z&&(I=mxConstants.DIRECTION_WEST);null!=w&&F==C&&(k=w);l=(null==m||a.isCellConnectable(b[m]))&&
+(a.model.isEdge(g)&&null!=m||a.model.isVertex(g)&&a.isCellConnectable(g));if(null!=t&&5E3<=G||t!=k&&(null==f||!mxUtils.contains(f,c,d)||500<G&&null==F&&l))if(r=!1,t=5E3>G&&G>this.dropTargetDelay||a.model.isEdge(g)?k:null,null!=t&&l){f=[H,L,y,x,D,z];for(l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);a.model.isEdge(g)?(A=k.absolutePoints,null!=A&&(l=A[0],A=A[A.length-1],f=a.tolerance,new mxRectangle(c-f,d-f,2*f,2*f),H.style.left=Math.floor(l.x-this.roundDrop.width/2)+"px",
+H.style.top=Math.floor(l.y-this.roundDrop.height/2)+"px",L.style.left=Math.floor(A.x-this.roundDrop.width/2)+"px",L.style.top=Math.floor(A.y-this.roundDrop.height/2)+"px",null==a.model.getTerminal(g,!0)&&a.container.appendChild(H),null==a.model.getTerminal(g,!1)&&a.container.appendChild(L))):(l=mxRectangle.fromRectangle(k),null!=k.shape&&null!=k.shape.boundingBox&&(l=mxRectangle.fromRectangle(k.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),A=this.graph.selectionCellsHandler.getHandler(k.cell),
+null!=A&&(l.x-=A.horizontalOffset/2,l.y-=A.verticalOffset/2,l.width+=A.horizontalOffset,l.height+=A.verticalOffset,null!=A.rotationShape&&null!=A.rotationShape.node&&"hidden"!=A.rotationShape.node.style.visibility&&"none"!=A.rotationShape.node.style.display&&null!=A.rotationShape.boundingBox&&l.add(A.rotationShape.boundingBox)),y.style.left=Math.floor(k.getCenterX()-this.triangleUp.width/2)+"px",y.style.top=Math.floor(l.y-this.triangleUp.height)+"px",x.style.left=Math.floor(l.x+l.width)+"px",x.style.top=
+Math.floor(k.getCenterY()-this.triangleRight.height/2)+"px",D.style.left=y.style.left,D.style.top=Math.floor(l.y+l.height)+"px",z.style.left=Math.floor(l.x-this.triangleLeft.width)+"px",z.style.top=x.style.top,"eastwest"!=k.style.portConstraint&&(a.container.appendChild(y),a.container.appendChild(D)),a.container.appendChild(x),a.container.appendChild(z));null!=k&&(u=a.selectionCellsHandler.getHandler(k.cell),null!=u&&null!=u.setHandlesVisible&&u.setHandlesVisible(!1));r=!0}else for(f=[H,L,y,x,D,z],
l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);r||null==u||u.setHandlesVisible(!0);g=mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)||null!=w&&F==C?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);f=a.getModel();if(null!=g&&(null!=F||!a.isSplitTarget(g,b,e))){for(;null!=g&&!a.isValidDropTarget(g,b,e)&&f.isVertex(f.getParent(g));)g=f.getParent(g);if(a.view.currentRoot==g||!a.isValidRoot(g)&&0==a.getModel().getChildCount(g)||a.isCellLocked(g)||f.isEdge(g))g=
-null}return g});q.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var a=[H,L,C,y,x,D,A],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=t&&null!=u&&u.reset();F=E=w=t=u=null};return q};
+null}return g});q.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var a=[H,L,C,y,x,D,z],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=t&&null!=u&&u.reset();F=E=w=t=u=null};return q};
Sidebar.prototype.itemClicked=function(a,c,d,b){b=this.editorUi.editor.graph;b.container.focus();if(mxEvent.isAltDown(d)&&1==b.getSelectionCount()&&b.model.isVertex(b.getSelectionCell())){c=null;for(var f=0;f<a.length&&null==c;f++)b.model.isVertex(a[f])&&(c=f);null!=c&&(b.setSelectionCells(this.dropAndConnect(b.getSelectionCell(),a,mxEvent.isMetaDown(d)||mxEvent.isControlDown(d)?mxEvent.isShiftDown(d)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(d)?mxConstants.DIRECTION_EAST:
mxConstants.DIRECTION_SOUTH,c,d)),b.scrollCellToVisible(b.getSelectionCell()))}else if(mxEvent.isShiftDown(d)&&!b.isSelectionEmpty())this.updateShapes(a[0],b.getSelectionCells()),b.scrollCellToVisible(b.getSelectionCell());else{a=b.getFreeInsertPoint();if(mxEvent.isAltDown(d)){var f=b.getGraphBounds(),e=b.view.translate,h=b.view.scale;a.x=f.x/h-e.x+f.width/h+b.gridSize;a.y=f.y/h-e.y}c.drop(b,d,null,a.x,a.y,!0);null!=this.editorUi.hoverIcons&&(mxEvent.isTouchEvent(d)||mxEvent.isPenEvent(d))&&this.editorUi.hoverIcons.update(b.view.getState(b.getSelectionCell()))}};
Sidebar.prototype.addClickHandler=function(a,c,d){var b=c.mouseDown,f=c.mouseMove,e=c.mouseUp,h=this.editorUi.editor.graph.tolerance,g=null,k=this;c.mouseDown=function(c){b.apply(this,arguments);g=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));null!=this.dragElement&&(this.dragElement.style.display="none",mxUtils.setOpacity(a,50))};c.mouseMove=function(b){null!=this.dragElement&&"none"==this.dragElement.style.display&&null!=g&&(Math.abs(g.x-mxEvent.getClientX(b))>h||Math.abs(g.y-mxEvent.getClientY(b))>
@@ -2484,8 +2487,8 @@ this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect
mxEvent.isTouchEvent(a.getEvent())};var y=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(y=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=y)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var x=this.click;this.click=
function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!b||a.isConsumed())return x.apply(this,arguments);var c=b?a.sourceState.cell:a.getCell();null!=c&&(c=this.getLinkForCell(c),null!=c&&(this.isCustomLink(c)?this.customLinkClicked(c):this.openLink(c)));this.isEnabled()&&b&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var b=null==a.state&&null!=a.sourceState&&
this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(b?a.sourceState.cell:a.getCell())};var D=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return D.apply(this,arguments)};this.selectRegion=function(a,b){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};this.getAllCells=function(a,b,c,d,e,g){g=null!=g?g:[];
-if(0<c||0<d){var f=this.getModel(),h=a+c,k=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=f.getRoot()));if(null!=e)for(var l=f.getChildCount(e),m=0;m<l;m++){var n=f.getChildAt(e,m),p=this.view.getState(n);if(null!=p&&this.isCellVisible(n)&&"1"!=mxUtils.getValue(p.style,"locked","0")){var z=mxUtils.getValue(p.style,mxConstants.STYLE_ROTATION)||0;0!=z&&(p=mxUtils.getBoundingBox(p,z));(f.isEdge(n)||f.isVertex(n))&&p.x>=a&&p.y+p.height<=k&&p.y>=b&&p.x+p.width<=h&&g.push(n);this.getAllCells(a,b,c,d,
-n,g)}}}return g};var A=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:A.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var C=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=
+if(0<c||0<d){var f=this.getModel(),h=a+c,k=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=f.getRoot()));if(null!=e)for(var l=f.getChildCount(e),m=0;m<l;m++){var n=f.getChildAt(e,m),p=this.view.getState(n);if(null!=p&&this.isCellVisible(n)&&"1"!=mxUtils.getValue(p.style,"locked","0")){var A=mxUtils.getValue(p.style,mxConstants.STYLE_ROTATION)||0;0!=A&&(p=mxUtils.getBoundingBox(p,A));(f.isEdge(n)||f.isVertex(n))&&p.x>=a&&p.y+p.height<=k&&p.y>=b&&p.x+p.width<=h&&g.push(n);this.getAllCells(a,b,c,d,
+n,g)}}}return g};var z=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:z.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var C=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=
b.getProperty("event").getState();C=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)),p.start(c.x,c.y)):null!=C?this.addSelectionCells(C):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);
C=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,b){return b&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&
this.initTouch();var E=this.updateMouseEvent;this.updateMouseEvent=function(a){a=E.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;
@@ -2588,11 +2591,11 @@ HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstra
(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var c=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,b){b=null!=b?b:!0;var d=this.getState(a);null!=d&&b&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&!d.invalid&&this.updateLineJumps(d)&&this.graph.cellRenderer.redraw(d,!1,this.isRendering());d=c.apply(this,
arguments);null!=d&&b&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(d);return d};var d=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return d.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var b=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){b.apply(this,arguments);this.graph.model.isEdge(a.cell)&&
1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=a.routedPoints,d=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(b,c,e){var g=new mxPoint(c,e);g.type=b;d.push(g);g=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==g||g.type!=b||g.x!=c||g.y!=e},g=.5*this.scale,c=!1,d=[],f=0;f<b.length-1;f++){for(var h=
-b[f+1],k=b[f],w=[],r=b[f+2];f<b.length-2&&mxUtils.ptSegDistSq(k.x,k.y,r.x,r.y,h.x,h.y)<1*this.scale*this.scale;)h=r,f++,r=b[f+2];for(var c=e(0,k.x,k.y)||c,y=0;y<this.validEdges.length;y++){var x=this.validEdges[y],D=x.absolutePoints;if(null!=D&&mxUtils.intersects(a,x)&&"1"!=x.style.noJump)for(x=0;x<D.length-1;x++){for(var A=D[x+1],C=D[x],r=D[x+2];x<D.length-2&&mxUtils.ptSegDistSq(C.x,C.y,r.x,r.y,A.x,A.y)<1*this.scale*this.scale;)A=r,x++,r=D[x+2];r=mxUtils.intersection(k.x,k.y,h.x,h.y,C.x,C.y,A.x,
-A.y);if(null!=r&&(Math.abs(r.x-k.x)>g||Math.abs(r.y-k.y)>g)&&(Math.abs(r.x-h.x)>g||Math.abs(r.y-h.y)>g)&&(Math.abs(r.x-C.x)>g||Math.abs(r.y-C.y)>g)&&(Math.abs(r.x-A.x)>g||Math.abs(r.y-A.y)>g)){A=r.x-k.x;C=r.y-k.y;r={distSq:A*A+C*C,x:r.x,y:r.y};for(A=0;A<w.length;A++)if(w[A].distSq>r.distSq){w.splice(A,0,r);r=null;break}null==r||0!=w.length&&w[w.length-1].x===r.x&&w[w.length-1].y===r.y||w.push(r)}}}for(x=0;x<w.length;x++)c=e(1,w[x].x,w[x].y)||c}r=b[b.length-1];c=e(0,r.x,r.y)||c}a.routedPoints=d;return c}return!1};
+b[f+1],k=b[f],w=[],r=b[f+2];f<b.length-2&&mxUtils.ptSegDistSq(k.x,k.y,r.x,r.y,h.x,h.y)<1*this.scale*this.scale;)h=r,f++,r=b[f+2];for(var c=e(0,k.x,k.y)||c,y=0;y<this.validEdges.length;y++){var x=this.validEdges[y],D=x.absolutePoints;if(null!=D&&mxUtils.intersects(a,x)&&"1"!=x.style.noJump)for(x=0;x<D.length-1;x++){for(var z=D[x+1],C=D[x],r=D[x+2];x<D.length-2&&mxUtils.ptSegDistSq(C.x,C.y,r.x,r.y,z.x,z.y)<1*this.scale*this.scale;)z=r,x++,r=D[x+2];r=mxUtils.intersection(k.x,k.y,h.x,h.y,C.x,C.y,z.x,
+z.y);if(null!=r&&(Math.abs(r.x-k.x)>g||Math.abs(r.y-k.y)>g)&&(Math.abs(r.x-h.x)>g||Math.abs(r.y-h.y)>g)&&(Math.abs(r.x-C.x)>g||Math.abs(r.y-C.y)>g)&&(Math.abs(r.x-z.x)>g||Math.abs(r.y-z.y)>g)){z=r.x-k.x;C=r.y-k.y;r={distSq:z*z+C*C,x:r.x,y:r.y};for(z=0;z<w.length;z++)if(w[z].distSq>r.distSq){w.splice(z,0,r);r=null;break}null==r||0!=w.length&&w[w.length-1].x===r.x&&w[w.length-1].y===r.y||w.push(r)}}}for(x=0;x<w.length;x++)c=e(1,w[x].x,w[x].y)||c}r=b[b.length-1];c=e(0,r.x,r.y)||c}a.routedPoints=d;return c}return!1};
var f=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)f.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,
-"jumpStyle","none"),h,k=!0,l=null,m=null;h=[];var r=null;a.begin();for(var y=0;y<this.state.routedPoints.length;y++){var x=this.state.routedPoints[y],D=new mxPoint(x.x/this.scale,x.y/this.scale);0==y?D=b[0]:y==this.state.routedPoints.length-1&&(D=b[b.length-1]);var A=!1;if(null!=l&&1==x.type){var C=this.state.routedPoints[y+1],x=C.x/this.scale-D.x,C=C.y/this.scale-D.y,x=x*x+C*C;null==r&&(r=new mxPoint(D.x-l.x,D.y-l.y),m=Math.sqrt(r.x*r.x+r.y*r.y),0<m?(r.x=r.x*e/m,r.y=r.y*e/m):r=null);x>e*e&&0<m&&
-(x=l.x-D.x,C=l.y-D.y,x=x*x+C*C,x>e*e&&(A=new mxPoint(D.x-r.x,D.y-r.y),x=new mxPoint(D.x+r.x,D.y+r.y),h.push(A),this.addPoints(a,h,c,d,!1,null,k),h=0>Math.round(r.x)||0==Math.round(r.x)&&0>=Math.round(r.y)?1:-1,k=!1,"sharp"==g?(a.lineTo(A.x-r.y*h,A.y+r.x*h),a.lineTo(x.x-r.y*h,x.y+r.x*h),a.lineTo(x.x,x.y)):"arc"==g?(h*=1.3,a.curveTo(A.x-r.y*h,A.y+r.x*h,x.x-r.y*h,x.y+r.x*h,x.x,x.y)):(a.moveTo(x.x,x.y),k=!0),h=[x],A=!0))}else r=null;A||(h.push(D),l=D)}this.addPoints(a,h,c,d,!1,null,k);a.stroke()}};var e=
+"jumpStyle","none"),h,k=!0,l=null,m=null;h=[];var r=null;a.begin();for(var y=0;y<this.state.routedPoints.length;y++){var x=this.state.routedPoints[y],D=new mxPoint(x.x/this.scale,x.y/this.scale);0==y?D=b[0]:y==this.state.routedPoints.length-1&&(D=b[b.length-1]);var z=!1;if(null!=l&&1==x.type){var C=this.state.routedPoints[y+1],x=C.x/this.scale-D.x,C=C.y/this.scale-D.y,x=x*x+C*C;null==r&&(r=new mxPoint(D.x-l.x,D.y-l.y),m=Math.sqrt(r.x*r.x+r.y*r.y),0<m?(r.x=r.x*e/m,r.y=r.y*e/m):r=null);x>e*e&&0<m&&
+(x=l.x-D.x,C=l.y-D.y,x=x*x+C*C,x>e*e&&(z=new mxPoint(D.x-r.x,D.y-r.y),x=new mxPoint(D.x+r.x,D.y+r.y),h.push(z),this.addPoints(a,h,c,d,!1,null,k),h=0>Math.round(r.x)||0==Math.round(r.x)&&0>=Math.round(r.y)?1:-1,k=!1,"sharp"==g?(a.lineTo(z.x-r.y*h,z.y+r.x*h),a.lineTo(x.x-r.y*h,x.y+r.x*h),a.lineTo(x.x,x.y)):"arc"==g?(h*=1.3,a.curveTo(z.x-r.y*h,z.y+r.x*h,x.x-r.y*h,x.y+r.x*h,x.x,x.y)):(a.moveTo(x.x,x.y),k=!0),h=[x],z=!0))}else r=null;z||(h.push(D),l=D)}this.addPoints(a,h,c,d,!1,null,k);a.stroke()}};var e=
mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)e.apply(this,arguments);else{b=this.getTerminalPort(a,b,d);var g=this.getNextPoint(a,c,d),f=this.graph.isOrthogonal(a),h=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),k=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=h)var l=Math.cos(-h),m=Math.sin(-h),g=mxUtils.getRotatedPoint(g,l,m,k);
l=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);l+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);g=this.getPerimeterPoint(b,g,0==h&&f,l);0!=h&&(l=Math.cos(h),m=Math.sin(h),g=mxUtils.getRotatedPoint(g,l,m,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,d,g),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,d,e){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);d=c=null;if(null!=a)for(var g=
0;g<a.length;g++){var f=this.graph.getConnectionPoint(b,a[g]);if(null!=f){var h=(f.x-e.x)*(f.x-e.x)+(f.y-e.y)*(f.y-e.y);if(null==d||h<d)c=f,d=h}}null!=c&&(e=c)}return e};var h=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,b,c){var d=h.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=c.state&&(d=c.state.view.graph.replacePlaceholders(c.state.cell,d));return d};var g=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=
@@ -2623,7 +2626,7 @@ d,e);if(null!=c)return c;if(null!=a.shape.stencil&&null!=a.shape.stencil.constra
b,[a]))}};Graph.prototype.isValidRoot=function(a){for(var b=this.model.getChildCount(a),c=0,d=0;d<b;d++){var e=this.model.getChildAt(a,d);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||c++)}return 0<c||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(b,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(b,
"dropTarget","1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var b=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(b&&null!=a&&null!=this.layoutManager){var c=this.model.getParent(a);null!=c&&(c=this.layoutManager.getLayout(c),null!=c&&c.constructor==mxStackLayout&&(b=!1))}return b};Graph.prototype.getPreferredSizeForCell=function(a){var b=
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){var b=this.getModel(),c=[];b.beginUpdate();try{for(var d=0;d<a.length;d++){var e=a[d];if(b.isEdge(e)){var g=b.getTerminal(e,!0),f=b.getTerminal(e,!1);b.setTerminal(e,f,!0);b.setTerminal(e,g,!1);var h=b.getGeometry(e);if(null!=h){h=h.clone();null!=h.points&&h.points.reverse();var k=
-h.getTerminalPoint(!0),l=h.getTerminalPoint(!1);h.setTerminalPoint(k,!1);h.setTerminalPoint(l,!0);b.setGeometry(e,h);var z=this.view.getState(e),m=this.view.getState(g),n=this.view.getState(f);if(null!=z){var p=null!=m?this.getConnectionConstraint(z,m,!0):null,q=null!=n?this.getConnectionConstraint(z,n,!1):null;this.setConnectionConstraint(e,g,!0,q);this.setConnectionConstraint(e,f,!1,p)}c.push(e)}}else if(b.isVertex(e)&&(h=this.getCellGeometry(e),null!=h)){h=h.clone();h.x+=h.width/2-h.height/2;h.y+=
+h.getTerminalPoint(!0),l=h.getTerminalPoint(!1);h.setTerminalPoint(k,!1);h.setTerminalPoint(l,!0);b.setGeometry(e,h);var A=this.view.getState(e),m=this.view.getState(g),n=this.view.getState(f);if(null!=A){var p=null!=m?this.getConnectionConstraint(A,m,!0):null,q=null!=n?this.getConnectionConstraint(A,n,!1):null;this.setConnectionConstraint(e,g,!0,q);this.setConnectionConstraint(e,f,!1,p)}c.push(e)}}else if(b.isVertex(e)&&(h=this.getCellGeometry(e),null!=h)){h=h.clone();h.x+=h.width/2-h.height/2;h.y+=
h.height/2-h.width/2;var v=h.width;h.width=h.height;h.height=v;b.setGeometry(e,h);var r=this.view.getState(e);if(null!=r){var t=r.style[mxConstants.STYLE_DIRECTION]||"east";"east"==t?t="south":"south"==t?t="west":"west"==t?t="north":"north"==t&&(t="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,t,[e])}c.push(e)}}}finally{b.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;
a=a.nextSibling}return!1};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var b=this.model.getDescendants(a.cell);if(0<b.length)for(var c=0;c<b.length;c++){var d=this.view.getState(b[c]);null!=d&&null!=d.shape&&null!=d.shape.stencil&&this.stencilHasPlaceholders(d.shape.stencil)?this.removeStateForCell(b[c]):this.isReplacePlaceholders(b[c])&&this.view.invalidate(b[c],
!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){for(var c=a.getElementsByTagName("*"),d=0;d<c.length;d++)b(c[d])};Graph.prototype.updateLabelElements=function(a,b,c){a=null!=a?a:this.getSelectionCells();for(var d=document.createElement("div"),
@@ -2650,12 +2653,12 @@ document.execCommand("createlink",!1,mxUtils.trim(a));b=this.cellEditor.textarea
this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return 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,g=0;g<b.length;g++)if(this.getModel().isVertex(b[g])){var f=this.view.getState(b[g]);if(null!=f){var h=a?f.getCenterX():f.getCenterY(),d=null!=d?Math.max(d,h):h,e=null!=e?Math.min(e,h):h;c.push(f)}}if(2<
c.length){c.sort(function(b,c){return a?b.x-c.x:b.y-c.y});f=this.view.translate;h=this.view.scale;e=e/h-(a?f.x:f.y);d=d/h-(a?f.x:f.y);this.getModel().beginUpdate();try{for(var k=(d-e)/(c.length-1),d=e,g=1;g<c.length-1;g++){var l=this.view.getState(this.model.getParent(c[g].cell)),m=this.getCellGeometry(c[g].cell),d=d+k;null!=m&&null!=l&&(m=m.clone(),a?m.x=Math.round(d-m.width/2)-l.origin.x:m.y=Math.round(d-m.height/2)-l.origin.y,this.getModel().setGeometry(c[g].cell,m))}}finally{this.getModel().endUpdate()}}}return b};
Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,c,d,e,g,f,h,k,l){var m=this.useCssTransforms;m&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{b=null!=b?b:1;c=null!=c?c:0;e=null!=e?e:!0;g=null!=g?g:
-!0;f=null!=f?f:!0;var n=g||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==n)throw Error(mxResources.get("drawingEmpty"));var z=this.view.scale,p=mxUtils.createXmlDocument(),q=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=a&&(null!=q.style?q.style.backgroundColor=a:q.setAttribute("style","background-color:"+a));null==p.createElementNS?(q.setAttribute("xmlns",mxConstants.NS_SVG),q.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):
-q.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/z;var v=Math.max(1,Math.ceil(n.width*a)+2*c)+(l?5:0),Q=Math.max(1,Math.ceil(n.height*a)+2*c)+(l?5:0);q.setAttribute("version","1.1");q.setAttribute("width",v+"px");q.setAttribute("height",Q+"px");q.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+v+" "+Q);p.appendChild(q);var t=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"g"):p.createElement("g");q.appendChild(t);var r=this.createSvgCanvas(t);
-r.foOffset=e?-.5:0;r.textOffset=e?-.5:0;r.imageOffset=e?-.5:0;r.translate(Math.floor((c/b-n.x)/z),Math.floor((c/b-n.y)/z));var P=document.createElement("textarea"),u=r.createAlternateContent;r.createAlternateContent=function(a,b,c,d,e,g,f,h,k,l,m,n,p){var z=this.state;if(null!=this.foAltText&&(0==d||0!=z.fontSize&&g.length<5*d/z.fontSize)){var q=this.createElement("text");q.setAttribute("x",Math.round(d/2));q.setAttribute("y",Math.round((e+z.fontSize)/2));q.setAttribute("fill",z.fontColor||"black");
-q.setAttribute("text-anchor","middle");q.setAttribute("font-size",Math.round(z.fontSize)+"px");q.setAttribute("font-family",z.fontFamily);(z.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&q.setAttribute("font-weight","bold");(z.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&q.setAttribute("font-style","italic");(z.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&q.setAttribute("text-decoration","underline");try{return P.innerHTML=g,q.textContent=P.value,q}catch(fa){return u.apply(this,
-arguments)}}else return u.apply(this,arguments)};var x=this.backgroundImage;if(null!=x){b=z/b;var w=this.view.translate,D=new mxRectangle(w.x*b,w.y*b,x.width*b,x.height*b);mxUtils.intersects(n,D)&&r.image(w.x,w.y,x.width,x.height,x.src,!0)}r.scale(a);r.textEnabled=f;h=null!=h?h:this.createSvgImageExport();var A=h.drawCellState,ba=h.getLinkForCellState;h.getLinkForCellState=function(a,b){var c=ba.apply(this,arguments);return null==c||a.view.graph.isCustomLink(c)?null:c};h.drawCellState=function(a,
-b){for(var c=a.view.graph,d=c.isCellSelected(a.cell),e=c.model.getParent(a.cell);!g&&!d&&null!=e;)d=c.isCellSelected(e),e=c.model.getParent(e);(g||d)&&A.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),r);this.updateSvgLinks(q,k,!0);return q}finally{m&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.updateSvgLinks=function(a,b,c){a=a.getElementsByTagName("a");for(var d=0;d<a.length;d++){var e=a[d].getAttribute("href");null==e&&(e=
+!0;f=null!=f?f:!0;var n=g||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==n)throw Error(mxResources.get("drawingEmpty"));var A=this.view.scale,p=mxUtils.createXmlDocument(),q=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=a&&(null!=q.style?q.style.backgroundColor=a:q.setAttribute("style","background-color:"+a));null==p.createElementNS?(q.setAttribute("xmlns",mxConstants.NS_SVG),q.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):
+q.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/A;var v=Math.max(1,Math.ceil(n.width*a)+2*c)+(l?5:0),Q=Math.max(1,Math.ceil(n.height*a)+2*c)+(l?5:0);q.setAttribute("version","1.1");q.setAttribute("width",v+"px");q.setAttribute("height",Q+"px");q.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+v+" "+Q);p.appendChild(q);var t=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"g"):p.createElement("g");q.appendChild(t);var r=this.createSvgCanvas(t);
+r.foOffset=e?-.5:0;r.textOffset=e?-.5:0;r.imageOffset=e?-.5:0;r.translate(Math.floor((c/b-n.x)/A),Math.floor((c/b-n.y)/A));var P=document.createElement("textarea"),u=r.createAlternateContent;r.createAlternateContent=function(a,b,c,d,e,g,f,h,k,l,m,n,p){var A=this.state;if(null!=this.foAltText&&(0==d||0!=A.fontSize&&g.length<5*d/A.fontSize)){var q=this.createElement("text");q.setAttribute("x",Math.round(d/2));q.setAttribute("y",Math.round((e+A.fontSize)/2));q.setAttribute("fill",A.fontColor||"black");
+q.setAttribute("text-anchor","middle");q.setAttribute("font-size",Math.round(A.fontSize)+"px");q.setAttribute("font-family",A.fontFamily);(A.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&q.setAttribute("font-weight","bold");(A.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&q.setAttribute("font-style","italic");(A.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&q.setAttribute("text-decoration","underline");try{return P.innerHTML=g,q.textContent=P.value,q}catch(fa){return u.apply(this,
+arguments)}}else return u.apply(this,arguments)};var x=this.backgroundImage;if(null!=x){b=A/b;var w=this.view.translate,D=new mxRectangle(w.x*b,w.y*b,x.width*b,x.height*b);mxUtils.intersects(n,D)&&r.image(w.x,w.y,x.width,x.height,x.src,!0)}r.scale(a);r.textEnabled=f;h=null!=h?h:this.createSvgImageExport();var z=h.drawCellState,ba=h.getLinkForCellState;h.getLinkForCellState=function(a,b){var c=ba.apply(this,arguments);return null==c||a.view.graph.isCustomLink(c)?null:c};h.drawCellState=function(a,
+b){for(var c=a.view.graph,d=c.isCellSelected(a.cell),e=c.model.getParent(a.cell);!g&&!d&&null!=e;)d=c.isCellSelected(e),e=c.model.getParent(e);(g||d)&&z.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),r);this.updateSvgLinks(q,k,!0);return q}finally{m&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.updateSvgLinks=function(a,b,c){a=a.getElementsByTagName("a");for(var d=0;d<a.length;d++){var e=a[d].getAttribute("href");null==e&&(e=
a[d].getAttribute("xlink:href"));null!=e&&(null!=b&&/^https?:\/\//.test(e)?a[d].setAttribute("target",b):c&&this.isCustomLink(e)&&a[d].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=!0;return a};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());
return a};Graph.prototype.getParentByName=function(a,b,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.getParentByNames=function(a,b,c){for(;null!=a&&!(0<=mxUtils.indexOf(b,a.nodeName));){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=document.selection)&&
"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select())};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=c.rows[0].cells,e=0,g=0;g<d.length;g++)var f=d[g].getAttribute("colspan"),e=e+(null!=f?parseInt(f):1);c=c.insertRow(b);for(g=0;g<e;g++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=
@@ -2682,7 +2685,7 @@ h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&t
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";mxClient.IS_VML?this.textarea.style.zoom=c:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+c+","+c+")")}else this.textarea.style.height="",this.textarea.style.overflow="",m.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 n=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();n.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(z){}};var p=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(p.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var c=
+"").replace(/\n/g,"")};var n=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();n.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(A){}};var p=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(p.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var c=
mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==b&&c==mxConstants.NONE&&d==mxConstants.NONE&&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)};var q=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,g){mxEvent.isAltDown(g)&&(e=null);q.apply(this,arguments)};mxGraphView.prototype.formatUnitText=
function(a){return a?c(a,this.unit):a};mxGraphHandler.prototype.updateHint=function(b){if(null!=this.shape){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.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/
@@ -2710,8 +2713,8 @@ new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(g,
this.update(d,c),this.isSpaceEvent(b)?(d=this.x+this.width,c=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=c-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor=
"white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+
"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),b.consume()}};var r=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),
-this.secondDiv=null);r.apply(this,arguments)};var y=(new Date).getTime(),x=0,D=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){D.apply(this,arguments);c!=this.currentTerminalState?(y=(new Date).getTime(),x=0):x=(new Date).getTime()-y;this.currentTerminalState=c};var A=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&
-2E3<x||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&A.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,b){var c=null!=a&&0==a,d=this.state.getVisibleTerminalState(c),e=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,
+this.secondDiv=null);r.apply(this,arguments)};var y=(new Date).getTime(),x=0,D=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){D.apply(this,arguments);c!=this.currentTerminalState?(y=(new Date).getTime(),x=0):x=(new Date).getTime()-y;this.currentTerminalState=c};var z=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&
+2E3<x||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&z.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,b){var c=null!=a&&0==a,d=this.state.getVisibleTerminalState(c),e=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,
d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=!1,c;c=mxConstants.HANDLE_SIZE;this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var C=mxVertexHandler.prototype.createSizerShape;
mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return C.apply(this,arguments)};var E=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),
null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return E.apply(this,arguments)};var H=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=H.apply(this,arguments),b=[],c=0;c<a.length;c++)"1"!=mxUtils.getValue(a[c].style,"part","0")&&b.push(a[c]);return b};var L=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),
@@ -2827,8 +2830,8 @@ TextFormatPanel.prototype.addFont=function(a){function c(a,b){mxClient.IS_IE&&(m
[mxConstants.ALIGN_LEFT])),n),v=this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),b.cellEditor.isContentEditing()?function(a){b.cellEditor.alignText(mxConstants.ALIGN_CENTER,a)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),n),t=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),b.cellEditor.isContentEditing()?function(a){b.cellEditor.alignText(mxConstants.ALIGN_RIGHT,a)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],
[mxConstants.ALIGN_RIGHT])),n);this.styleButtons([q,v,t]);if(b.cellEditor.isContentEditing()){var u=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},g);this.styleButtons([u]);u.firstChild.style.background="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjR2MjRIMFYweiIvPjwvZGVmcz48Y2xpcFBhdGggaWQ9ImIiPjx1c2UgeGxpbms6aHJlZj0iI2EiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9jbGlwUGF0aD48cGF0aCBjbGlwLXBhdGg9InVybCgjYikiIGZpbGw9IiMwMTAxMDEiIGQ9Ik03LjI0IDguNzVjLS4yNi0uNDgtLjM5LTEuMDMtLjM5LTEuNjcgMC0uNjEuMTMtMS4xNi40LTEuNjcuMjYtLjUuNjMtLjkzIDEuMTEtMS4yOS40OC0uMzUgMS4wNS0uNjMgMS43LS44My42Ni0uMTkgMS4zOS0uMjkgMi4xOC0uMjkuODEgMCAxLjU0LjExIDIuMjEuMzQuNjYuMjIgMS4yMy41NCAxLjY5Ljk0LjQ3LjQuODMuODggMS4wOCAxLjQzLjI1LjU1LjM4IDEuMTUuMzggMS44MWgtMy4wMWMwLS4zMS0uMDUtLjU5LS4xNS0uODUtLjA5LS4yNy0uMjQtLjQ5LS40NC0uNjgtLjItLjE5LS40NS0uMzMtLjc1LS40NC0uMy0uMS0uNjYtLjE2LTEuMDYtLjE2LS4zOSAwLS43NC4wNC0xLjAzLjEzLS4yOS4wOS0uNTMuMjEtLjcyLjM2LS4xOS4xNi0uMzQuMzQtLjQ0LjU1LS4xLjIxLS4xNS40My0uMTUuNjYgMCAuNDguMjUuODguNzQgMS4yMS4zOC4yNS43Ny40OCAxLjQxLjdINy4zOWMtLjA1LS4wOC0uMTEtLjE3LS4xNS0uMjV6TTIxIDEydi0ySDN2Mmg5LjYyYy4xOC4wNy40LjE0LjU1LjIuMzcuMTcuNjYuMzQuODcuNTEuMjEuMTcuMzUuMzYuNDMuNTcuMDcuMi4xMS40My4xMS42OSAwIC4yMy0uMDUuNDUtLjE0LjY2LS4wOS4yLS4yMy4zOC0uNDIuNTMtLjE5LjE1LS40Mi4yNi0uNzEuMzUtLjI5LjA4LS42My4xMy0xLjAxLjEzLS40MyAwLS44My0uMDQtMS4xOC0uMTNzLS42Ni0uMjMtLjkxLS40MmMtLjI1LS4xOS0uNDUtLjQ0LS41OS0uNzUtLjE0LS4zMS0uMjUtLjc2LS4yNS0xLjIxSDYuNGMwIC41NS4wOCAxLjEzLjI0IDEuNTguMTYuNDUuMzcuODUuNjUgMS4yMS4yOC4zNS42LjY2Ljk4LjkyLjM3LjI2Ljc4LjQ4IDEuMjIuNjUuNDQuMTcuOS4zIDEuMzguMzkuNDguMDguOTYuMTMgMS40NC4xMy44IDAgMS41My0uMDkgMi4xOC0uMjhzMS4yMS0uNDUgMS42Ny0uNzljLjQ2LS4zNC44Mi0uNzcgMS4wNy0xLjI3cy4zOC0xLjA3LjM4LTEuNzFjMC0uNi0uMS0xLjE0LS4zMS0xLjYxLS4wNS0uMTEtLjExLS4yMy0uMTctLjMzSDIxeiIvPjwvc3ZnPg==)";
u.firstChild.style.backgroundPosition="2px 2px";u.firstChild.style.backgroundSize="18px 18px";this.styleButtons([u])}var w=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),n),r=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),n),y=this.editorUi.toolbar.addButton("geSprite-bottom",
-mxResources.get("bottom"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),n);this.styleButtons([w,r,y]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(n);var x,D,A,C,E,H,L;b.cellEditor.isContentEditing()?(w.style.display="none",r.style.display="none",y.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,x=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},n),D=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},n)]),x.style.marginLeft="9px",p=n.cloneNode(!1),p.style.paddingTop="4px",n=[this.editorUi.toolbar.addButton("geSprite-orderedlist",
+mxResources.get("bottom"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),n);this.styleButtons([w,r,y]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(n);var x,D,z,C,E,H,L;b.cellEditor.isContentEditing()?(w.style.display="none",r.style.display="none",y.style.display="none",m.style.display="none",z=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==z.style.opacity&&document.execCommand("justifyfull",
+!1,null)},n),z.style.marginRight="9px",z.style.opacity=1,this.styleButtons([z,x=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},n),D=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},n)]),x.style.marginLeft="9px",p=n.cloneNode(!1),p.style.paddingTop="4px",n=[this.editorUi.toolbar.addButton("geSprite-orderedlist",
mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent",
!1,null)},p),this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){b.cellEditor.toggleViewMode()},p)],this.styleButtons(n),n[n.length-2].style.marginLeft="9px",mxClient.IS_QUIRKS&&(mxUtils.br(a),p.style.height="40"),a.appendChild(p)):(l[2].style.marginRight="9px",t.style.marginRight="9px");n=e.cloneNode(!1);n.style.marginLeft=
"0px";n.style.paddingTop="8px";n.style.paddingBottom="4px";n.style.fontWeight="normal";mxUtils.write(n,mxResources.get("position"));var I=document.createElement("select");I.style.position="absolute";I.style.right="20px";I.style.width="97px";I.style.marginTop="-2px";for(var u="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),F={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,
@@ -2840,8 +2843,8 @@ a.appendChild(u),mxEvent.addListener(O,"change",function(a){b.setCellStyles(mxCo
1,999," pt",function(a){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=function(c,e){null!=b.cellEditor.textarea&&c!=b.cellEditor.textarea&&b.cellEditor.textarea.contains(c)&&(e||d.containsNode(c,!0))&&("FONT"==c.nodeName?(c.removeAttribute("size"),c.style.fontSize=a+"px"):mxUtils.getCurrentStyle(c).fontSize!=a+"px"&&(mxUtils.getCurrentStyle(c.parentNode).fontSize!=a+"px"?c.style.fontSize=a+"px":c.style.fontSize=""))},d=window.getSelection(),e=0<d.rangeCount?d.getRangeAt(0).commonAncestorContainer:
b.cellEditor.textarea;e!=b.cellEditor.textarea&&e.nodeType==mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",!1,"1");e!=b.cellEditor.textarea&&(e=e.parentNode);if(null!=e&&e.nodeType==mxConstants.NODETYPE_ELEMENT){var g=e.getElementsByTagName("*");c(e);for(e=0;e<g.length;e++)c(g[e])}G.value=a+" pt"}else if(window.getSelection||document.selection)if(c=function(a,b){for(;null!=b;){if(b===a)return!0;b=b.parentNode}return!1},g=null,document.selection?g=document.selection.createRange().parentElement():
(d=window.getSelection(),0<d.rangeCount&&(g=d.getRangeAt(0).commonAncestorContainer)),null!=g&&c(b.cellEditor.textarea,g))for(K=a,document.execCommand("fontSize",!1,"4"),g=b.cellEditor.textarea.getElementsByTagName("font"),e=0;e<g.length;e++)if("4"==g[e].getAttribute("size")){g[e].removeAttribute("size");g[e].style.fontSize=K+"px";window.setTimeout(function(){G.value=K+" pt";K=null},0);break}},!0),n=this.createStepper(G,n,1,10,!0,Menus.prototype.defaultFontSize);n.style.display=G.style.display;n.style.marginTop=
-"4px";mxClient.IS_QUIRKS||(n.style.right="20px");g.appendChild(n);g=k.getElementsByTagName("div")[0];g.style.cssFloat="right";var M=null,ba="#ffffff",Y=null,z="#000000",Q=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return ba},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){M=a},destroy:function(){M=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),
-mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff",null,function(a){b.updateLabelElements(b.getSelectionCells(),function(a){a.style.backgroundColor=null})});Q.style.fontWeight="bold";var P=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");P.style.fontWeight="bold";g=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return z},function(a){if(mxClient.IS_FF){for(var c=b.cellEditor.textarea.getElementsByTagName("font"),
+"4px";mxClient.IS_QUIRKS||(n.style.right="20px");g.appendChild(n);g=k.getElementsByTagName("div")[0];g.style.cssFloat="right";var M=null,ba="#ffffff",Y=null,A="#000000",Q=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return ba},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){M=a},destroy:function(){M=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),
+mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff",null,function(a){b.updateLabelElements(b.getSelectionCells(),function(a){a.style.backgroundColor=null})});Q.style.fontWeight="bold";var P=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");P.style.fontWeight="bold";g=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return A},function(a){if(mxClient.IS_FF){for(var c=b.cellEditor.textarea.getElementsByTagName("font"),
d=[],e=0;e<c.length;e++)d.push({node:c[e],color:c[e].getAttribute("color")});document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent");a=b.cellEditor.textarea.getElementsByTagName("font");for(e=0;e<a.length;e++)if(e>=d.length||a[e]!=d[e].node||a[e]==d[e].node&&a[e].getAttribute("color")!=d[e].color){d=a[e].firstChild;if(null!=d&&"A"==d.nodeName&&null==d.nextSibling&&null!=d.firstChild){a[e].parentNode.insertBefore(d,a[e]);for(c=d.firstChild;null!=c;){var g=c.nextSibling;a[e].appendChild(c);
c=g}d.appendChild(a[e])}break}}else document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},"#000000",{install:function(a){Y=a},destroy:function(){Y=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(a){Q.style.display=null==a||a==mxConstants.NONE?"none":"";P.style.display=Q.style.display},function(a){null==a||a==mxConstants.NONE?b.setCellStyles(mxConstants.STYLE_NOLABEL,"1",b.getSelectionCells()):b.setCellStyles(mxConstants.STYLE_NOLABEL,
null,b.getSelectionCells());b.updateLabelElements(b.getSelectionCells(),function(a){a.removeAttribute("color");a.style.color=null})});g.style.fontWeight="bold";h.appendChild(g);h.appendChild(Q);b.cellEditor.isContentEditing()||h.appendChild(P);a.appendChild(h);h=this.createPanel();h.style.paddingTop="2px";h.style.paddingBottom="4px";g=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0);g.style.fontWeight="bold";f.containsLabel||f.autoSize||
@@ -2867,10 +2870,10 @@ Z)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Z.v
mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");V=this.installInputHandler(ha,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(G,X);this.addKeyHandler(ga,X);this.addKeyHandler(ca,X);this.addKeyHandler(aa,X);this.addKeyHandler(Z,X);this.addKeyHandler(ha,X);b.getModel().addListener(mxEvent.CHANGE,X);this.listeners.push({destroy:function(){b.getModel().removeListener(X)}});X();if(b.cellEditor.isContentEditing()){var la=!1,e=function(){la||(la=!0,window.setTimeout(function(){for(var a=
b.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;if(null!=a){var d=function(a,b){if(null!=a&&null!=b){if(a==b)return!0;if(a.length>b.length+1)return a.substring(a.length-b.length-1,a.length)=="-"+b}return!1},e=function(c){if(null!=b.getParentByName(a,c,b.cellEditor.textarea))return!0;for(var d=a;null!=d&&1==d.childNodes.length;)if(d=d.childNodes[0],d.nodeName==c)return!0;return!1},g=function(a){a=null!=a?a.fontSize:null;return null!=a&&"px"==a.substring(a.length-
2)?parseFloat(a):mxConstants.DEFAULT_FONTSIZE},h=function(a,b,c){return null!=c.style&&null!=b?(b=b.lineHeight,null!=c.style.lineHeight&&"%"==c.style.lineHeight.substring(c.style.lineHeight.length-1)?parseInt(c.style.lineHeight)/100:"px"==b.substring(b.length-2)?parseFloat(b)/a:parseInt(b)):""};a==b.cellEditor.textarea&&1==b.cellEditor.textarea.children.length&&b.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=b.cellEditor.textarea.firstChild);var m=mxUtils.getCurrentStyle(a),
-n=g(m),p=h(n,m,a),r=a.getElementsByTagName("*");if(0<r.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var u=window.getSelection(),w=0;w<r.length;w++)if(u.containsNode(r[w],!0)){temp=mxUtils.getCurrentStyle(r[w]);var n=Math.max(g(temp),n),y=h(n,temp,r[w]);if(y!=p||isNaN(y))p=""}null!=m&&(c(l[0],"bold"==m.fontWeight||400<m.fontWeight||e("B")||e("STRONG")),c(l[1],"italic"==m.fontStyle||e("I")||e("EM")),c(l[2],e("U")),c(D,e("SUP")),c(x,e("SUB")),b.cellEditor.isTableSelected()?(c(A,
-d(m.textAlign,"justify")),c(q,d(m.textAlign,"left")),c(v,d(m.textAlign,"center")),c(t,d(m.textAlign,"right"))):(e=b.cellEditor.align||mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),d(m.textAlign,"justify")?(c(A,d(m.textAlign,"justify")),c(q,!1),c(v,!1),c(t,!1)):(c(A,!1),c(q,e==mxConstants.ALIGN_LEFT),c(v,e==mxConstants.ALIGN_CENTER),c(t,e==mxConstants.ALIGN_RIGHT))),E=b.getParentByName(a,"TABLE",b.cellEditor.textarea),L=null==E?null:b.getParentByName(a,"TR",E),H=null==
+n=g(m),p=h(n,m,a),r=a.getElementsByTagName("*");if(0<r.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var u=window.getSelection(),w=0;w<r.length;w++)if(u.containsNode(r[w],!0)){temp=mxUtils.getCurrentStyle(r[w]);var n=Math.max(g(temp),n),y=h(n,temp,r[w]);if(y!=p||isNaN(y))p=""}null!=m&&(c(l[0],"bold"==m.fontWeight||400<m.fontWeight||e("B")||e("STRONG")),c(l[1],"italic"==m.fontStyle||e("I")||e("EM")),c(l[2],e("U")),c(D,e("SUP")),c(x,e("SUB")),b.cellEditor.isTableSelected()?(c(z,
+d(m.textAlign,"justify")),c(q,d(m.textAlign,"left")),c(v,d(m.textAlign,"center")),c(t,d(m.textAlign,"right"))):(e=b.cellEditor.align||mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),d(m.textAlign,"justify")?(c(z,d(m.textAlign,"justify")),c(q,!1),c(v,!1),c(t,!1)):(c(z,!1),c(q,e==mxConstants.ALIGN_LEFT),c(v,e==mxConstants.ALIGN_CENTER),c(t,e==mxConstants.ALIGN_RIGHT))),E=b.getParentByName(a,"TABLE",b.cellEditor.textarea),L=null==E?null:b.getParentByName(a,"TR",E),H=null==
E?null:b.getParentByNames(a,["TD","TH"],E),C.style.display=null!=E?"":"none",document.activeElement!=G&&("FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=K?(a.removeAttribute("size"),a.style.fontSize=K+" pt",K=null):G.value=isNaN(n)?"":n+" pt",y=parseFloat(p),isNaN(y)?ia.value="100 %":ia.value=Math.round(100*y)+" %"),d=m.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+
-("0"+Number(d).toString(16)).substr(-2)}),n=m.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),null!=Y&&(z="#"==d.charAt(0)?d:"#000000",Y(z,!0)),null!=M&&(ba="#"==n.charAt(0)?n:null,M(ba,!0)),null!=k.firstChild&&(m=m.fontFamily,"'"==m.charAt(0)&&(m=m.substring(1)),"'"==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1)),'"'==
+("0"+Number(d).toString(16)).substr(-2)}),n=m.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),null!=Y&&(A="#"==d.charAt(0)?d:"#000000",Y(A,!0)),null!=M&&(ba="#"==n.charAt(0)?n:null,M(ba,!0)),null!=k.firstChild&&(m=m.fontFamily,"'"==m.charAt(0)&&(m=m.substring(1)),"'"==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1)),'"'==
m.charAt(0)&&(m=m.substring(1)),'"'==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1)),k.firstChild.nodeValue=m))}la=!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(b.cellEditor.textarea,"DOMSubtreeModified",e);mxEvent.addListener(b.cellEditor.textarea,"input",e);mxEvent.addListener(b.cellEditor.textarea,"touchend",e);mxEvent.addListener(b.cellEditor.textarea,"mouseup",e);mxEvent.addListener(b.cellEditor.textarea,"keyup",e);this.listeners.push({destroy:function(){}});
e()}return a};StyleFormatPanel=function(a,c,d){BaseFormatPanel.call(this,a,c,d);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);StyleFormatPanel.prototype.defaultStrokeColor="black";
StyleFormatPanel.prototype.init=function(){var a=this.format.getSelectionState();a.containsLabel||(a.containsImage&&1==a.vertices.length&&"image"==a.style.shape&&null!=a.style.image&&"data:image/svg+xml;"==a.style.image.substring(0,19)&&this.container.appendChild(this.addSvgStyles(this.createPanel())),a.containsImage&&"image"!=a.style.shape||this.container.appendChild(this.addFill(this.createPanel())),this.container.appendChild(this.addStroke(this.createPanel())),this.container.appendChild(this.addLineJumps(this.createPanel())),
@@ -2915,7 +2918,7 @@ null,!1),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"],["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),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERone",0],"geIcon geSprite geSprite-starterone",null,!1),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(k,"geSprite-endclassic",mxResources.get("lineend"),!1,mxUtils.bind(this,function(a){if("connector"==e.style.shape||"flexArrow"==e.style.shape||
+[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"))}})),z=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-endclassic",mxResources.get("lineend"),!1,mxUtils.bind(this,function(a){if("connector"==e.style.shape||"flexArrow"==e.style.shape||
"filledEdge"==e.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"==e.style.shape||"filledEdge"==e.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"],
@@ -2926,9 +2929,9 @@ mxResources.get("classic")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstant
0],"geIcon geSprite geSprite-enddiamondtrans",null,!1).setAttribute("title",mxResources.get("diamond")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,0],"geIcon geSprite geSprite-endthindiamondtrans",null,!1).setAttribute("title",mxResources.get("diamondThin")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["dash",0],"geIcon geSprite geSprite-enddash",null,!1),this.editorUi.menus.edgeStyleChange(a,
"",[mxConstants.STYLE_ENDARROW,"endFill"],["cross",0],"geIcon geSprite geSprite-endcross",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circlePlus",0],"geIcon geSprite geSprite-endcircleplus",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circle",1],"geIcon geSprite geSprite-endcircle",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERone",0],"geIcon geSprite geSprite-enderone",
null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],"geIcon geSprite geSprite-enderonetoone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],"geIcon geSprite geSprite-endermany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],"geIcon geSprite geSprite-enderonetomany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,
-"endFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-enderoneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-endermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(t,8);this.addArrow(x);this.addArrow(D);this.addArrow(A);r=this.addArrow(l,
+"endFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-enderoneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-endermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(t,8);this.addArrow(x);this.addArrow(D);this.addArrow(z);r=this.addArrow(l,
9);r.className="geIcon";r.style.width="84px";y=this.addArrow(m,9);y.className="geIcon";y.style.width="22px";var C=document.createElement("div");C.style.width="85px";C.style.height="1px";C.style.borderBottom="1px solid "+this.defaultStrokeColor;C.style.marginBottom="9px";r.appendChild(C);var E=document.createElement("div");E.style.width="23px";E.style.height="1px";E.style.borderBottom="1px solid "+this.defaultStrokeColor;E.style.marginBottom="9px";y.appendChild(E);l.style.height="15px";m.style.height=
-"15px";t.style.height="15px";x.style.height="17px";D.style.marginLeft="3px";D.style.height="17px";A.style.marginLeft="3px";A.style.height="17px";a.appendChild(h);a.appendChild(v);a.appendChild(p);l=p.cloneNode(!1);l.style.paddingBottom="6px";l.style.paddingTop="4px";l.style.fontWeight="normal";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="2px";m.style.fontWeight="normal";m.style.width="76px";mxUtils.write(m,mxResources.get("lineend"));
+"15px";t.style.height="15px";x.style.height="17px";D.style.marginLeft="3px";D.style.height="17px";z.style.marginLeft="3px";z.style.height="17px";a.appendChild(h);a.appendChild(v);a.appendChild(p);l=p.cloneNode(!1);l.style.paddingBottom="6px";l.style.paddingTop="4px";l.style.fontWeight="normal";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="2px";m.style.fontWeight="normal";m.style.width="76px";mxUtils.write(m,mxResources.get("lineend"));
l.appendChild(m);var H,L,I=this.addUnitInput(l,"pt",74,33,function(){H.apply(this,arguments)}),F=this.addUnitInput(l,"pt",20,33,function(){L.apply(this,arguments)});mxUtils.br(l);r=document.createElement("div");r.style.height="8px";l.appendChild(r);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));l.appendChild(m);var J,O,S=this.addUnitInput(l,"pt",74,33,function(){J.apply(this,arguments)}),R=this.addUnitInput(l,"pt",20,33,function(){O.apply(this,arguments)});mxUtils.br(l);this.addLabel(l,
mxResources.get("spacing"),74,50);this.addLabel(l,mxResources.get("size"),20,50);mxUtils.br(l);h=h.cloneNode(!1);h.style.fontWeight="normal";h.style.position="relative";h.style.paddingLeft="16px";h.style.marginBottom="2px";h.style.marginTop="6px";h.style.borderWidth="0px";h.style.paddingBottom="18px";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="1px";m.style.fontWeight="normal";m.style.width="120px";mxUtils.write(m,
mxResources.get("perimeter"));h.appendChild(m);var G,K=this.addUnitInput(h,"pt",20,41,function(){G.apply(this,arguments)});e.edges.length==f.getSelectionCount()?(a.appendChild(k),mxClient.IS_QUIRKS&&(mxUtils.br(a),mxUtils.br(a)),a.appendChild(l)):e.vertices.length==f.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(h));var M=mxUtils.bind(this,function(a,c,d){function h(a,c,d,g){d=d.getElementsByTagName("div")[0];d.className=b.getCssClassForMarker(g,e.style.shape,a,c);"geSprite geSprite-noarrow"==
@@ -2937,7 +2940,7 @@ w)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),w.value=
this.defaultStrokeColor:C.style.borderBottom="1px dotted "+this.defaultStrokeColor:C.style.borderBottom="1px solid "+this.defaultStrokeColor;E.style.borderBottom=C.style.borderBottom;a=x.getElementsByTagName("div")[0];c=mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(e.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(c=null);"orthogonalEdgeStyle"==c&&"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?a.className="geSprite geSprite-curved":a.className="straight"==c||
"none"==c||null==c?"geSprite geSprite-straight":"entityRelationEdgeStyle"==c?"geSprite geSprite-entity":"elbowEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal";t.getElementsByTagName("div")[0].className="link"==
e.style.shape?"geSprite geSprite-linkedge":"flexArrow"==e.style.shape?"geSprite geSprite-arrow":"arrow"==e.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection";e.edges.length==f.getSelectionCount()?(v.style.display="",p.style.display="none"):(v.style.display="none",p.style.display="");a=h(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,"startFill","1"),D,"start");c=h(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style,
-"endFill","1"),A,"end");"arrow"==e.style.shape?(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-endblocktrans"):"link"==e.style.shape&&(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-noarrow");mxUtils.setOpacity(x,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape&&"filledEdge"!=e.style.shape?(mxUtils.setOpacity(D,30),mxUtils.setOpacity(A,30)):(mxUtils.setOpacity(D,100),mxUtils.setOpacity(A,100));if(d||document.activeElement!=
+"endFill","1"),z,"end");"arrow"==e.style.shape?(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-endblocktrans"):"link"==e.style.shape&&(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-noarrow");mxUtils.setOpacity(x,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape&&"filledEdge"!=e.style.shape?(mxUtils.setOpacity(D,30),mxUtils.setOpacity(z,30)):(mxUtils.setOpacity(D,100),mxUtils.setOpacity(z,100));if(d||document.activeElement!=
R)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),R.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=S)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),S.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=F)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),F.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=S)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,
0)),I.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=K)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),K.value=isNaN(a)?"":a+" pt"});O=this.installInputHandler(R,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");J=this.installInputHandler(S,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");L=this.installInputHandler(F,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");H=this.installInputHandler(I,mxConstants.STYLE_TARGET_PERIMETER_SPACING,
0,-999,999," pt");G=this.installInputHandler(K,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(u,M);this.addKeyHandler(R,M);this.addKeyHandler(S,M);this.addKeyHandler(F,M);this.addKeyHandler(I,M);this.addKeyHandler(K,M);f.getModel().addListener(mxEvent.CHANGE,M);this.listeners.push({destroy:function(){f.getModel().removeListener(M)}});M();return a};
@@ -2967,8 +2970,8 @@ function(){b.set(d.pageFormat)});var f=function(){b.set(d.pageFormat)};c.addList
DiagramFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("editData"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editData").funct()}));c.setAttribute("title",mxResources.get("editData")+" ("+this.editorUi.actions.get("editData").shortcut+")");c.style.width="202px";c.style.marginBottom="2px";a.appendChild(c);mxUtils.br(a);c=mxUtils.button(mxResources.get("clearDefaultStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("clearDefaultStyle").funct()}));
c.setAttribute("title",mxResources.get("clearDefaultStyle")+" ("+this.editorUi.actions.get("clearDefaultStyle").shortcut+")");c.style.width="202px";a.appendChild(c);return a};DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(){mxCylinder.call(this)}function c(){mxActor.call(this)}function d(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function e(){mxActor.call(this)}function h(){mxCylinder.call(this)}function g(){mxActor.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function p(){mxActor.call(this)}function q(){mxActor.call(this)}function v(a,b){this.canvas=
a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,v.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,v.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,v.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,v.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,v.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,v.prototype.arcTo)}function t(){mxRectangleShape.call(this)}function u(){mxRectangleShape.call(this)}function w(){mxActor.call(this)}function r(){mxActor.call(this)}function y(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function D(){mxRectangleShape.call(this)}function A(){mxCylinder.call(this)}function C(){mxShape.call(this)}function E(){mxShape.call(this)}
-function H(){mxEllipse.call(this)}function L(){mxShape.call(this)}function I(){mxShape.call(this)}function F(){mxRectangleShape.call(this)}function J(){mxShape.call(this)}function O(){mxShape.call(this)}function S(){mxShape.call(this)}function R(){mxShape.call(this)}function G(){mxShape.call(this)}function K(){mxCylinder.call(this)}function M(){mxDoubleEllipse.call(this)}function ba(){mxDoubleEllipse.call(this)}function Y(){mxArrowConnector.call(this);this.spacing=0}function z(){mxArrowConnector.call(this);
+this.canvas.curveTo=mxUtils.bind(this,v.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,v.prototype.arcTo)}function t(){mxRectangleShape.call(this)}function u(){mxRectangleShape.call(this)}function w(){mxActor.call(this)}function r(){mxActor.call(this)}function y(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function D(){mxRectangleShape.call(this)}function z(){mxCylinder.call(this)}function C(){mxShape.call(this)}function E(){mxShape.call(this)}
+function H(){mxEllipse.call(this)}function L(){mxShape.call(this)}function I(){mxShape.call(this)}function F(){mxRectangleShape.call(this)}function J(){mxShape.call(this)}function O(){mxShape.call(this)}function S(){mxShape.call(this)}function R(){mxShape.call(this)}function G(){mxShape.call(this)}function K(){mxCylinder.call(this)}function M(){mxDoubleEllipse.call(this)}function ba(){mxDoubleEllipse.call(this)}function Y(){mxArrowConnector.call(this);this.spacing=0}function A(){mxArrowConnector.call(this);
this.spacing=0}function Q(){mxActor.call(this)}function P(){mxRectangleShape.call(this)}function T(){mxActor.call(this)}function da(){mxActor.call(this)}function V(){mxActor.call(this)}function U(){mxActor.call(this)}function ka(){mxActor.call(this)}function ca(){mxActor.call(this)}function ga(){mxActor.call(this)}function ha(){mxActor.call(this)}function Z(){mxActor.call(this)}function aa(){mxActor.call(this)}function ea(){mxEllipse.call(this)}function ia(){mxEllipse.call(this)}function X(){mxEllipse.call(this)}
function la(){mxRhombus.call(this)}function W(){mxEllipse.call(this)}function Aa(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function ta(){mxEllipse.call(this)}function va(){mxActor.call(this)}function oa(){mxActor.call(this)}function pa(){mxActor.call(this)}function na(){mxConnector.call(this)}function Ia(a,b,c,d,e,g,f,h,k,l){f+=k;var B=d.clone();d.x-=e*(2*f+k);d.y-=g*(2*f+k);e*=f+k;g*=f+k;return function(){a.ellipse(B.x-e-f,B.y-g-f,2*f,2*f);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,
mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,b,c,d,e){var g=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),f=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-g,0);a.lineTo(d,
@@ -3006,8 +3009,8 @@ b,c,d,e){var g=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+g);a.lineTo(b+d/2,
b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){Fa.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var g=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=g;c+=g;d-=2*g;e-=2*g;0<d&&0<e&&(a.setShadow(!1),Fa.apply(this,[a,b,c,d,e]))}};mxUtils.extend(D,mxRectangleShape);D.prototype.isHtmlAllowed=function(){return!1};D.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,
this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};D.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var g=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=g;c+=g;d-=2*g;e-=2*g;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var g=0,f;do{f=mxCellRenderer.defaultShapes[this.style["symbol"+
g]];if(null!=f){var h=this.style["symbol"+g+"Align"],B=this.style["symbol"+g+"VerticalAlign"],k=this.style["symbol"+g+"Width"],l=this.style["symbol"+g+"Height"],wa=this.style["symbol"+g+"Spacing"]||0,Ea=this.style["symbol"+g+"VSpacing"]||wa,m=this.style["symbol"+g+"ArcSpacing"];null!=m&&(m*=this.getArcSize(d+this.strokewidth,e+this.strokewidth),wa+=m,Ea+=m);var m=b,sa=c,m=h==mxConstants.ALIGN_CENTER?m+(d-k)/2:h==mxConstants.ALIGN_RIGHT?m+(d-k-wa):m+wa,sa=B==mxConstants.ALIGN_MIDDLE?sa+(e-l)/2:B==
-mxConstants.ALIGN_BOTTOM?sa+(e-l-Ea):sa+Ea;a.save();h=new f;h.style=this.style;f.prototype.paintVertexShape.call(h,a,m,sa,k,l);a.restore()}g++}while(null!=f)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",D);mxUtils.extend(A,mxCylinder);A.prototype.redrawPath=function(a,b,c,d,e,g){g?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.registerShape("message",
-A);mxUtils.extend(C,mxShape);C.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",C);mxUtils.extend(E,mxShape);E.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};E.prototype.paintBackground=
+mxConstants.ALIGN_BOTTOM?sa+(e-l-Ea):sa+Ea;a.save();h=new f;h.style=this.style;f.prototype.paintVertexShape.call(h,a,m,sa,k,l);a.restore()}g++}while(null!=f)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",D);mxUtils.extend(z,mxCylinder);z.prototype.redrawPath=function(a,b,c,d,e,g){g?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.registerShape("message",
+z);mxUtils.extend(C,mxShape);C.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",C);mxUtils.extend(E,mxShape);E.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};E.prototype.paintBackground=
function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",E);mxUtils.extend(H,mxEllipse);H.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",
H);mxUtils.extend(L,mxShape);L.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",L);mxUtils.extend(I,mxShape);I.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};I.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,
e/8,d,7*e/8);a.fillAndStroke()};I.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",I);mxUtils.extend(F,mxRectangleShape);F.prototype.size=40;F.prototype.isHtmlAllowed=function(){return!1};F.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)};F.prototype.paintBackground=
@@ -3031,8 +3034,8 @@ h?B.y=c.y:B.x=c.x);return mxUtils.getPerimeterPoint(f,B,c)};mxStyleRegistry.putV
function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",R);mxUtils.extend(G,mxShape);G.prototype.inset=2;G.prototype.paintBackground=function(a,b,c,d,e){var g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.ellipse(0,g,d-2*g,e-2*g);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",
G);mxUtils.extend(K,mxCylinder);K.prototype.jettyWidth=32;K.prototype.jettyHeight=12;K.prototype.redrawPath=function(a,b,c,d,e,g){var f=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=f/2;var f=c+f/2,h=.3*e-b/2,k=.7*e-b/2;g?(a.moveTo(c,h),a.lineTo(f,h),a.lineTo(f,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(f,k),a.lineTo(f,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),
a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.registerShape("component",K);mxUtils.extend(M,mxDoubleEllipse);M.prototype.outerStroke=!0;M.prototype.paintVertexShape=function(a,b,c,d,e){var g=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+g,c+g,d-2*g,e-2*g),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.registerShape("endState",M);
-mxUtils.extend(ba,M);ba.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ba);mxUtils.extend(Y,mxArrowConnector);Y.prototype.defaultWidth=4;Y.prototype.isOpenEnded=function(){return!0};Y.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Y.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Y);mxUtils.extend(z,mxArrowConnector);z.prototype.defaultWidth=10;z.prototype.defaultArrowWidth=
-20;z.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};z.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};z.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",z);mxUtils.extend(Q,mxActor);Q.prototype.size=30;Q.prototype.isRoundable=
+mxUtils.extend(ba,M);ba.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ba);mxUtils.extend(Y,mxArrowConnector);Y.prototype.defaultWidth=4;Y.prototype.isOpenEnded=function(){return!0};Y.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Y.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Y);mxUtils.extend(A,mxArrowConnector);A.prototype.defaultWidth=10;A.prototype.defaultArrowWidth=
+20;A.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};A.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};A.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",A);mxUtils.extend(Q,mxActor);Q.prototype.size=30;Q.prototype.isRoundable=
function(){return!0};Q.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("manualInput",Q);mxUtils.extend(P,mxRectangleShape);P.prototype.dx=20;P.prototype.dy=20;P.prototype.isHtmlAllowed=function(){return!1};
P.prototype.paintForeground=function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var g=0;if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.max(g,Math.min(d*f,e*f));f=Math.max(g,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));g=Math.max(g,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+g);a.lineTo(b+d,c+g);a.end();a.stroke();
a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",P);mxUtils.extend(T,mxActor);T.prototype.dx=20;T.prototype.dy=20;T.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
@@ -3159,15 +3162,15 @@ mxUtils.bind(this,function(b){a.cellEditor.restoreSelection(q);null!=b&&a.insert
null!=f&&b.isWrapping(d)?(f=f.clone(),f.height=e.text.boundingBox.height/b.view.scale,b.getModel().setGeometry(d,f)):b.updateCellSize(d)}}}finally{b.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=b.getView().getState(b.getSelectionCell());if(null!=a){b.stopEditing();a="1"==a.style.html?null:"1";b.getModel().beginUpdate();try{for(var d=b.getSelectionCells(),e=0;e<d.length;e++)if(state=b.getView().getState(d[e]),null!=state){var f=mxUtils.getValue(state.style,
"html","0");if("1"==f&&null==a){var h=b.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(h=h.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var p=document.createElement("div");p.innerHTML=h;h=mxUtils.extractTextWithWhitespace(p.childNodes);b.cellLabelChanged(state.cell,h);b.setCellStyles("html",a,[d[e]])}else"0"==f&&"1"==a&&(h=mxUtils.htmlEntities(b.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(h=h.replace(/\n/g,"<br/>")),b.cellLabelChanged(state.cell,
b.sanitizeHtml(h)),b.setCellStyles("html",a,[d[e]]))}c.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=a?a:"0"],"cells",d))}finally{b.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=b.getView().getState(b.getSelectionCell()),c="wrap";b.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(c=null);b.setCellStyles(mxConstants.STYLE_WHITE_SPACE,c)});this.addAction("rotation",function(){var a="0",d=b.getView().getState(b.getSelectionCell());
-null!=d&&(a=d.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(c,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&b.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");c.showDialog(a.container,375,80,!0,!0);a.init()});this.addAction("resetView",function(){b.zoomTo(1);c.resetScrollbars()},null,null,Editor.ctrlKey+"+H");this.addAction("zoomIn",function(a){b.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");
-this.addAction("zoomOut",function(a){b.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var a=b.isSelectionEmpty()?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),c=b.view.translate,d=b.view.scale;a.width/=d;a.height/=d;a.x=a.x/d-c.x;a.y=a.y/d-c.y;var d=b.container.clientWidth-10,e=b.container.clientHeight-10,f=Math.floor(20*Math.min(d/a.width,e/a.height))/20;b.zoomTo(f);mxUtils.hasScrollbars(b.container)&&(b.container.scrollTop=
-(a.y+c.y)*f-Math.max((e-a.height*f)/2+5,0),b.container.scrollLeft=(a.x+c.x)*f-Math.max((d-a.width*f)/2+5,0))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){b.pageVisible||this.get("pageView").funct();var a=b.pageFormat,c=b.pageScale;b.zoomTo(Math.floor(20*Math.min((b.container.clientWidth-10)/a.width/c,(b.container.clientHeight-10)/a.height/c))/20);mxUtils.hasScrollbars(b.container)&&(a=b.getPagePadding(),b.container.scrollTop=a.y*b.view.scale-1,b.container.scrollLeft=
-Math.min(a.x*b.view.scale,(b.container.scrollWidth-b.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){b.pageVisible||this.get("pageView").funct();var a=b.pageFormat,c=b.pageScale;b.zoomTo(Math.floor(20*Math.min((b.container.clientWidth-10)/(2*a.width)/c,(b.container.clientHeight-10)/a.height/c))/20);mxUtils.hasScrollbars(b.container)&&(a=b.getPagePadding(),b.container.scrollTop=Math.min(a.y,(b.container.scrollHeight-b.container.clientHeight)/
-2),b.container.scrollLeft=Math.min(a.x,(b.container.scrollWidth-b.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){b.pageVisible||this.get("pageView").funct();b.zoomTo(Math.floor(20*(b.container.clientWidth-10)/b.pageFormat.width/b.pageScale)/20);if(mxUtils.hasScrollbars(b.container)){var a=b.getPagePadding();b.container.scrollLeft=Math.min(a.x*b.view.scale,(b.container.scrollWidth-b.container.clientWidth)/2)}}));this.put("customZoom",
-new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*b.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&b.zoomTo(a/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*b.pageScale),
-mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&c.setPageScale(a/100)}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var e=null,e=this.addAction("grid",function(){b.setGridEnabled(!b.isGridEnabled());c.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");e.setToggleAction(!0);e.setSelectedCallback(function(){return b.isGridEnabled()});e.setEnabled(!1);e=this.addAction("guides",
-function(){b.graphHandler.guidesEnabled=!b.graphHandler.guidesEnabled;c.fireEvent(new mxEventObject("guidesEnabledChanged"))});e.setToggleAction(!0);e.setSelectedCallback(function(){return b.graphHandler.guidesEnabled});e.setEnabled(!1);e=this.addAction("tooltips",function(){b.tooltipHandler.setEnabled(!b.tooltipHandler.isEnabled())});e.setToggleAction(!0);e.setSelectedCallback(function(){return b.tooltipHandler.isEnabled()});e=this.addAction("collapseExpand",function(){var a=new ChangePageSetup(c);
-a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!b.foldingEnabled;b.model.execute(a)});e.setToggleAction(!0);e.setSelectedCallback(function(){return b.foldingEnabled});e.isEnabled=f;e=this.addAction("scrollbars",function(){c.setScrollbars(!c.hasScrollbars())});e.setToggleAction(!0);e.setSelectedCallback(function(){return b.scrollbars});e=this.addAction("pageView",mxUtils.bind(this,function(){c.setPageVisible(!b.pageVisible)}));e.setToggleAction(!0);e.setSelectedCallback(function(){return b.pageVisible});
+null!=d&&(a=d.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(c,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&b.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");c.showDialog(a.container,375,80,!0,!0);a.init()});this.addAction("resetView",function(){b.zoomTo(1);c.resetScrollbars()},null,null,Editor.ctrlKey+"+H");this.addAction("zoomIn",function(a){"fast"==urlParams.zoom?b.lazyZoom(!0,!0):b.zoomIn()},null,
+null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(a){"fast"==urlParams.zoom?b.lazyZoom(!1,!0):b.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var a=b.isSelectionEmpty()?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),c=b.view.translate,d=b.view.scale;a.width/=d;a.height/=d;a.x=a.x/d-c.x;a.y=a.y/d-c.y;var d=b.container.clientWidth-10,e=b.container.clientHeight-10,f=Math.floor(20*Math.min(d/a.width,
+e/a.height))/20;b.zoomTo(f);mxUtils.hasScrollbars(b.container)&&(b.container.scrollTop=(a.y+c.y)*f-Math.max((e-a.height*f)/2+5,0),b.container.scrollLeft=(a.x+c.x)*f-Math.max((d-a.width*f)/2+5,0))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){b.pageVisible||this.get("pageView").funct();var a=b.pageFormat,c=b.pageScale;b.zoomTo(Math.floor(20*Math.min((b.container.clientWidth-10)/a.width/c,(b.container.clientHeight-10)/a.height/c))/20);mxUtils.hasScrollbars(b.container)&&
+(a=b.getPagePadding(),b.container.scrollTop=a.y*b.view.scale-1,b.container.scrollLeft=Math.min(a.x*b.view.scale,(b.container.scrollWidth-b.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){b.pageVisible||this.get("pageView").funct();var a=b.pageFormat,c=b.pageScale;b.zoomTo(Math.floor(20*Math.min((b.container.clientWidth-10)/(2*a.width)/c,(b.container.clientHeight-10)/a.height/c))/20);mxUtils.hasScrollbars(b.container)&&(a=b.getPagePadding(),
+b.container.scrollTop=Math.min(a.y,(b.container.scrollHeight-b.container.clientHeight)/2),b.container.scrollLeft=Math.min(a.x,(b.container.scrollWidth-b.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){b.pageVisible||this.get("pageView").funct();b.zoomTo(Math.floor(20*(b.container.clientWidth-10)/b.pageFormat.width/b.pageScale)/20);if(mxUtils.hasScrollbars(b.container)){var a=b.getPagePadding();b.container.scrollLeft=Math.min(a.x*
+b.view.scale,(b.container.scrollWidth-b.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*b.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&b.zoomTo(a/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,
+function(){var a=new FilenameDialog(this.editorUi,parseInt(100*b.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&c.setPageScale(a/100)}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var e=null,e=this.addAction("grid",function(){b.setGridEnabled(!b.isGridEnabled());c.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");e.setToggleAction(!0);e.setSelectedCallback(function(){return b.isGridEnabled()});
+e.setEnabled(!1);e=this.addAction("guides",function(){b.graphHandler.guidesEnabled=!b.graphHandler.guidesEnabled;c.fireEvent(new mxEventObject("guidesEnabledChanged"))});e.setToggleAction(!0);e.setSelectedCallback(function(){return b.graphHandler.guidesEnabled});e.setEnabled(!1);e=this.addAction("tooltips",function(){b.tooltipHandler.setEnabled(!b.tooltipHandler.isEnabled())});e.setToggleAction(!0);e.setSelectedCallback(function(){return b.tooltipHandler.isEnabled()});e=this.addAction("collapseExpand",
+function(){var a=new ChangePageSetup(c);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!b.foldingEnabled;b.model.execute(a)});e.setToggleAction(!0);e.setSelectedCallback(function(){return b.foldingEnabled});e.isEnabled=f;e=this.addAction("scrollbars",function(){c.setScrollbars(!c.hasScrollbars())});e.setToggleAction(!0);e.setSelectedCallback(function(){return b.scrollbars});e=this.addAction("pageView",mxUtils.bind(this,function(){c.setPageVisible(!b.pageVisible)}));e.setToggleAction(!0);e.setSelectedCallback(function(){return b.pageVisible});
e=this.addAction("connectionArrows",function(){b.connectionArrowsEnabled=!b.connectionArrowsEnabled;c.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");e.setToggleAction(!0);e.setSelectedCallback(function(){return b.connectionArrowsEnabled});e=this.addAction("connectionPoints",function(){b.setConnectable(!b.connectionHandler.isEnabled());c.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");e.setToggleAction(!0);e.setSelectedCallback(function(){return b.connectionHandler.isEnabled()});
e=this.addAction("copyConnect",function(){b.connectionHandler.setCreateTarget(!b.connectionHandler.isCreateTarget());c.fireEvent(new mxEventObject("copyConnectChanged"))});e.setToggleAction(!0);e.setSelectedCallback(function(){return b.connectionHandler.isCreateTarget()});e.isEnabled=f;e=this.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});e.setToggleAction(!0);e.setSelectedCallback(function(){return c.editor.autosave});e.isEnabled=f;e.visible=!1;this.addAction("help",function(){var a=
"";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);b.openLink(RESOURCES_PATH+"/help"+a+".html")});var h=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){h||(c.showDialog((new AboutDialog(c)).container,320,280,!0,!0,function(){h=!1}),h=!0)},null,null,"F1"));e=mxUtils.bind(this,function(a,c,d,e){return this.addAction(a,function(){if(null!=d&&b.cellEditor.isContentEditing())d();else{b.stopEditing(!1);b.getModel().beginUpdate();try{var a=
@@ -3204,9 +3207,9 @@ null,mxUtils.bind(this,function(){this.customFontSizes=[]}),b);c.addSeparator(b)
b);c.addItem(mxResources.get("middle"),null,function(){a.alignCells(mxConstants.ALIGN_MIDDLE)},b);c.addItem(mxResources.get("bottomAlign"),null,function(){a.alignCells(mxConstants.ALIGN_BOTTOM)},b)})));this.put("distribute",new Menu(mxUtils.bind(this,function(c,b){c.addItem(mxResources.get("horizontal"),null,function(){a.distributeCells(!0)},b);c.addItem(mxResources.get("vertical"),null,function(){a.distributeCells(!1)},b)})));this.put("layout",new Menu(mxUtils.bind(this,function(c,b){var d=mxUtils.bind(this,
function(a,b){var c=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),function(a){b(parseFloat(a))},mxResources.get("spacing"));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()});c.addItem(mxResources.get("horizontalFlow"),null,mxUtils.bind(this,function(){var b=new mxHierarchicalLayout(a,mxConstants.DIRECTION_WEST);this.editorUi.executeLayout(function(){var c=a.getSelectionCells();b.execute(a.getDefaultParent(),0==c.length?null:c)},!0)}),b);c.addItem(mxResources.get("verticalFlow"),
null,mxUtils.bind(this,function(){var b=new mxHierarchicalLayout(a,mxConstants.DIRECTION_NORTH);this.editorUi.executeLayout(function(){var c=a.getSelectionCells();b.execute(a.getDefaultParent(),0==c.length?null:c)},!0)}),b);c.addSeparator(b);c.addItem(mxResources.get("horizontalTree"),null,mxUtils.bind(this,function(){var b=a.getSelectionCell(),c=null;null==b||0==a.getModel().getChildCount(b)?0==a.getModel().getEdgeCount(b)&&(c=a.findTreeRoots(a.getDefaultParent())):c=a.findTreeRoots(b);null!=c&&
-0<c.length&&(b=c[0]);if(null!=b){var f=new mxCompactTreeLayout(a,!0);f.edgeRouting=!1;f.levelDistance=30;d(f.levelDistance,mxUtils.bind(this,function(c){f.levelDistance=c;this.editorUi.executeLayout(function(){f.execute(a.getDefaultParent(),b)},!0)}))}}),b);c.addItem(mxResources.get("verticalTree"),null,mxUtils.bind(this,function(){var b=a.getSelectionCell(),c=null;null==b||0==a.getModel().getChildCount(b)?0==a.getModel().getEdgeCount(b)&&(c=a.findTreeRoots(a.getDefaultParent())):c=a.findTreeRoots(b);
-null!=c&&0<c.length&&(b=c[0]);if(null!=b){var f=new mxCompactTreeLayout(a,!1);f.edgeRouting=!1;f.levelDistance=30;d(f.levelDistance,mxUtils.bind(this,function(c){f.levelDistance=c;this.editorUi.executeLayout(function(){f.execute(a.getDefaultParent(),b)},!0)}))}}),b);c.addItem(mxResources.get("radialTree"),null,mxUtils.bind(this,function(){var b=a.getSelectionCell(),c=null;null==b||0==a.getModel().getChildCount(b)?0==a.getModel().getEdgeCount(b)&&(c=a.findTreeRoots(a.getDefaultParent())):c=a.findTreeRoots(b);
-null!=c&&0<c.length&&(b=c[0]);if(null!=b){var f=new mxRadialTreeLayout(a,!1);f.levelDistance=80;f.autoRadius=!0;d(f.levelDistance,mxUtils.bind(this,function(c){f.levelDistance=c;this.editorUi.executeLayout(function(){f.execute(a.getDefaultParent(),b);a.isSelectionEmpty()||(b=a.getModel().getParent(b),a.getModel().isVertex(b)&&a.updateGroupBounds([b],2*a.gridSize,!0))},!0)}))}}),b);c.addSeparator(b);c.addItem(mxResources.get("organic"),null,mxUtils.bind(this,function(){var b=new mxFastOrganicLayout(a);
+0<c.length&&(b=c[0]);if(null!=b){var g=new mxCompactTreeLayout(a,!0);g.edgeRouting=!1;g.levelDistance=30;d(g.levelDistance,mxUtils.bind(this,function(c){g.levelDistance=c;this.editorUi.executeLayout(function(){g.execute(a.getDefaultParent(),b)},!0)}))}}),b);c.addItem(mxResources.get("verticalTree"),null,mxUtils.bind(this,function(){var b=a.getSelectionCell(),c=null;null==b||0==a.getModel().getChildCount(b)?0==a.getModel().getEdgeCount(b)&&(c=a.findTreeRoots(a.getDefaultParent())):c=a.findTreeRoots(b);
+null!=c&&0<c.length&&(b=c[0]);if(null!=b){var g=new mxCompactTreeLayout(a,!1);g.edgeRouting=!1;g.levelDistance=30;d(g.levelDistance,mxUtils.bind(this,function(c){g.levelDistance=c;this.editorUi.executeLayout(function(){g.execute(a.getDefaultParent(),b)},!0)}))}}),b);c.addItem(mxResources.get("radialTree"),null,mxUtils.bind(this,function(){var b=a.getSelectionCell(),c=null;null==b||0==a.getModel().getChildCount(b)?0==a.getModel().getEdgeCount(b)&&(c=a.findTreeRoots(a.getDefaultParent())):c=a.findTreeRoots(b);
+null!=c&&0<c.length&&(b=c[0]);if(null!=b){var g=new mxRadialTreeLayout(a,!1);g.levelDistance=80;g.autoRadius=!0;d(g.levelDistance,mxUtils.bind(this,function(c){g.levelDistance=c;this.editorUi.executeLayout(function(){g.execute(a.getDefaultParent(),b);a.isSelectionEmpty()||(b=a.getModel().getParent(b),a.getModel().isVertex(b)&&a.updateGroupBounds([b],2*a.gridSize,!0))},!0)}))}}),b);c.addSeparator(b);c.addItem(mxResources.get("organic"),null,mxUtils.bind(this,function(){var b=new mxFastOrganicLayout(a);
d(b.forceConstant,mxUtils.bind(this,function(c){b.forceConstant=c;this.editorUi.executeLayout(function(){var c=a.getSelectionCell();if(null==c||0==a.getModel().getChildCount(c))c=a.getDefaultParent();b.execute(c);a.getModel().isVertex(c)&&a.updateGroupBounds([c],2*a.gridSize,!0)},!0)}))}),b);c.addItem(mxResources.get("circle"),null,mxUtils.bind(this,function(){var b=new mxCircleLayout(a);this.editorUi.executeLayout(function(){var c=a.getSelectionCell();if(null==c||0==a.getModel().getChildCount(c))c=
a.getDefaultParent();b.execute(c);a.getModel().isVertex(c)&&a.updateGroupBounds([c],2*a.gridSize,!0)},!0)}),b)})));this.put("navigation",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"home - exitGroup enterGroup - expand collapse - collapsible".split(" "),b)})));this.put("arrange",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["toFront","toBack","-"],b);this.addSubmenu("direction",a,b);this.addMenuItems(a,["turn","-"],b);this.addSubmenu("align",a,b);this.addSubmenu("distribute",
a,b);a.addSeparator(b);this.addSubmenu("navigation",a,b);this.addSubmenu("insert",a,b);this.addSubmenu("layout",a,b);this.addMenuItems(a,"- group ungroup removeFromGroup - clearWaypoints autosize".split(" "),b)}))).isEnabled=c;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["insertLink","insertImage"],b)})));this.put("view",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,(null!=this.editorUi.format?["formatPanel"]:[]).concat("outline layers - pageView pageScale - scrollbars tooltips - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),
@@ -3221,7 +3224,8 @@ h.sectionRowIndex+2),m=Math.min(20,c.cellIndex+2),n=f.rows.length;n<l;n++)for(va
"blue":"white";mxEvent.consume(a)}})};
Menus.prototype.edgeStyleChange=function(a,c,d,b,f,e,h){return a.addItem(c,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph;a.stopEditing(!1);a.getModel().beginUpdate();try{for(var c=a.getSelectionCells(),e=[],f=0;f<c.length;f++){var n=c[f];if(a.getModel().isEdge(n)){if(h){var p=a.getCellGeometry(n);null!=p&&(p=p.clone(),p.points=null,a.getModel().setGeometry(n,p))}for(var q=0;q<d.length;q++)a.setCellStyles(d[q],b[q],[n]);e.push(n)}}this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",
d,"values",b,"cells",e))}finally{a.getModel().endUpdate()}}),e,f)};Menus.prototype.styleChange=function(a,c,d,b,f,e,h,g){var k=this.createStyleChangeFunction(d,b);return a.addItem(c,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph;null!=h&&a.cellEditor.isContentEditing()?h():k(g)}),e,f)};
-Menus.prototype.createStyleChangeFunction=function(a,c){return mxUtils.bind(this,function(d){var b=this.editorUi.editor.graph;b.stopEditing(!1);b.getModel().beginUpdate();try{for(var f=0;f<a.length;f++)b.setCellStyles(a[f],c[f]),a[f]==mxConstants.STYLE_ALIGN&&b.updateLabelElements(b.getSelectionCells(),function(a){a.removeAttribute("align");a.style.textAlign=null});null!=d&&d();this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",a,"values",c,"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}})};
+Menus.prototype.createStyleChangeFunction=function(a,c){return mxUtils.bind(this,function(d){var b=this.editorUi.editor.graph;b.stopEditing(!1);b.getModel().beginUpdate();try{for(var f=b.getSelectionCells(),e=0;e<a.length;e++)if(b.setCellStyles(a[e],c[e],f),a[e]==mxConstants.STYLE_ALIGN&&b.updateLabelElements(f,function(a){a.removeAttribute("align");a.style.textAlign=null}),a[e]==mxConstants.STYLE_FONTFAMILY)for(e=0;e<f.length;e++)0==b.model.getChildCount(f[e])&&b.autoSizeCell(f[e],!1);null!=d&&d();
+this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",a,"values",c,"cells",f))}finally{b.getModel().endUpdate()}})};
Menus.prototype.promptChange=function(a,c,d,b,f,e,h,g,k){return a.addItem(c,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph,c=b,e=a.getView().getState(a.getSelectionCell());null!=e&&(c=e.style[f]||c);c=new FilenameDialog(this.editorUi,c,mxResources.get("apply"),mxUtils.bind(this,function(b){if(null!=b&&0<b.length){a.getModel().beginUpdate();try{a.stopEditing(!1),a.setCellStyles(f,b)}finally{a.getModel().endUpdate()}null!=g&&g(b)}}),mxResources.get("enterValue")+(0<d.length?" "+
d:""));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}),e,k,h)};
Menus.prototype.pickColor=function(a,c,d){var b=this.editorUi.editor.graph,f=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));if(null!=c&&b.cellEditor.isContentEditing()){var e=b.cellEditor.saveSelection();a=new ColorDialog(this.editorUi,d||"000000",mxUtils.bind(this,function(a){b.cellEditor.restoreSelection(e);document.execCommand(c,!1,a!=mxConstants.NONE?a:"transparent")}),function(){b.cellEditor.restoreSelection(e)});this.editorUi.showDialog(a.container,
@@ -3337,7 +3341,7 @@ c):null,q=function(a,b){var c=document.createElement("div");c.style.position="re
h.appendChild(g.table);v=document.createElement("div");v.style.boxSizing="border-box";v.style.paddingRight="160px";v.style.whiteSpace="nowrap";v.style.marginTop="6px";v.style.width="100%";var w=document.createElement("input");w.setAttribute("placeholder",mxResources.get("enterPropertyName"));w.setAttribute("type","text");w.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");w.style.boxSizing="border-box";w.style.marginLeft="2px";w.style.width="100%";v.appendChild(w);h.appendChild(v);b.appendChild(h);
var r=mxUtils.button(mxResources.get("addProperty"),function(){var a=w.value;if(0<a.length&&"label"!=a&&"placeholders"!=a&&0>a.indexOf(":"))try{var b=mxUtils.indexOf(l,a);if(0<=b&&null!=m[b])m[b].focus();else{e.cloneNode(!1).setAttribute(a,"");0<=b&&(l.splice(b,1),m.splice(b,1));l.push(a);var c=g.addTextarea(a+":","",2);c.style.width="100%";m.push(c);q(c,a);c.focus()}r.setAttribute("disabled","disabled");w.value=""}catch(C){mxUtils.alert(C)}else mxUtils.alert(mxResources.get("invalidName"))});this.init=
function(){0<m.length?m[0].focus():w.focus()};r.setAttribute("title",mxResources.get("addProperty"));r.setAttribute("disabled","disabled");r.style.textOverflow="ellipsis";r.style.position="absolute";r.style.overflow="hidden";r.style.width="144px";r.style.right="0px";r.className="geBtn";v.appendChild(r);h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});h.className="geBtn";v=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);
-e=e.cloneNode(!0);for(var b=!1,d=0;d<l.length;d++)null==m[d]?e.removeAttribute(l[d]):(e.setAttribute(l[d],m[d].value),b=b||"placeholder"==l[d]&&"1"==e.getAttribute("placeholders"));b&&e.removeAttribute("label");f.getModel().setValue(c,e)}catch(A){mxUtils.alert(A)}});v.className="geBtn gePrimaryBtn";mxEvent.addListener(w,"keyup",d);mxEvent.addListener(w,"change",d);k=document.createElement("div");k.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(c)||
+e=e.cloneNode(!0);for(var b=!1,d=0;d<l.length;d++)null==m[d]?e.removeAttribute(l[d]):(e.setAttribute(l[d],m[d].value),b=b||"placeholder"==l[d]&&"1"==e.getAttribute("placeholders"));b&&e.removeAttribute("label");f.getModel().setValue(c,e)}catch(z){mxUtils.alert(z)}});v.className="geBtn gePrimaryBtn";mxEvent.addListener(w,"keyup",d);mxEvent.addListener(w,"change",d);k=document.createElement("div");k.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(c)||
a.editor.graph.getModel().isEdge(c)){t=document.createElement("span");t.style.marginRight="10px";u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginRight="6px";"1"==e.getAttribute("placeholders")&&(u.setAttribute("checked","checked"),u.defaultChecked=!0);mxEvent.addListener(u,"click",function(){"1"==e.getAttribute("placeholders")?e.removeAttribute("placeholders"):e.setAttribute("placeholders","1")});t.appendChild(u);mxUtils.write(t,mxResources.get("placeholders"));if(null!=
EditDataDialog.placeholderHelpLink){u=document.createElement("a");u.setAttribute("href",EditDataDialog.placeholderHelpLink);u.setAttribute("title",mxResources.get("help"));u.setAttribute("target","_blank");u.style.marginLeft="8px";u.style.cursor="help";var y=document.createElement("img");mxUtils.setOpacity(y,50);y.style.height="16px";y.style.width="16px";y.setAttribute("border","0");y.setAttribute("valign","middle");y.style.marginTop=mxClient.IS_IE11?"0px":"-4px";y.setAttribute("src",Editor.helpImage);
u.appendChild(y);t.appendChild(u)}k.appendChild(t)}a.editor.cancelFirst?(k.appendChild(h),k.appendChild(v)):(k.appendChild(v),k.appendChild(h));b.appendChild(k);this.container=b};EditDataDialog.getDisplayIdForCell=function(a,c){var d=null;null!=a.editor.graph.getModel().getParent(c)&&(d=c.getId());return d};EditDataDialog.placeholderHelpLink=null;
@@ -3390,28 +3394,28 @@ Sidebar.prototype.insertSearchHint;Sidebar.prototype.insertSearchHint=function(d
document.createElement("a");k.setAttribute("href","https://youtu.be/Z0D96ZikMkc");k.setAttribute("target","_blank");k.className="geTitle";k.style.cssText="background-color:#ffd350;border-radius:6px;color:black;border:1px solid black !important;text-align:center;white-space:normal;padding:6px 0px 6px 0px !important;margin:4px 4px 8px 2px;";mxUtils.write(k,f);f=document.createElement("img");f.setAttribute("src",Dialog.prototype.closeImage);f.setAttribute("title",mxResources.get("hide"));f.className=
"geDialogClose";f.style.position="relative";f.style.cursor="default";f.style.top="1px";f.style.right="0px";mxEvent.addListener(f,"click",mxUtils.bind(this,function(a){k.parentNode.removeChild(k);this.hideSearchHint=!0;mxEvent.consume(a)}));k.appendChild(f);d.appendChild(k);this.hideSearchHint=!0}}a.apply(this,arguments)};Sidebar.prototype.togglePalettes=function(a,d){this.showPalettes(a,d)};Sidebar.prototype.togglePalette=function(a){this.showPalette(a)};Sidebar.prototype.showPalettes=function(a,
d,c){for(var b=0;b<d.length;b++)this.showPalette(a+d[b],c)};Sidebar.prototype.showPalette=function(a,d){var c=this.palettes[a];if(null!=c)for(var b=null!=d?d?"block":"none":"none"==c[0].style.display?"block":"none",e=0;e<c.length;e++)c[e].style.display=b};Sidebar.prototype.isEntryVisible=function(a){for(var d=0;d<this.configuration.length;d++)if(this.configuration[d].id==a){var c=this.palettes[null!=this.configuration[d].libs?(this.configuration[d].prefix||"")+this.configuration[d].libs[0]:a];if(null!=
-c)return"none"!=c[0].style.display;break}if(null!=this.customEntries)for(d=0;d<this.customEntries.length;d++)for(var c=this.customEntries[d],b=0;b<c.entries.length;b++){var e=c.entries[b];if(e.id==a){if(null!=e.libs&&0<e.libs.length&&(c=this.palettes[e.id+".0"],null!=c))return"none"!=c[0].style.display;break}}return!1};Sidebar.prototype.showEntries=function(a,d,c){this.libs=null!=a&&(c||0<a.length)?a:null!=urlParams.libs&&0<urlParams.libs.length?decodeURIComponent(urlParams.libs):null!=mxSettings?
-mxSettings.getLibraries():this.defaultEntries;c=this.libs.split(";");for(var b=0;b<c.length;b++)c[b]=this.libAliases[c[b]]||c[b];for(b=0;b<this.configuration.length;b++)"search"!=this.configuration[b].id&&this.showPalettes(this.configuration[b].prefix||"",this.configuration[b].libs||[this.configuration[b].id],0<=mxUtils.indexOf(c,this.configuration[b].id));if(null!=this.customEntries)for(b=0;b<this.customEntries.length;b++)for(var e=this.customEntries[b],f=0;f<e.entries.length;f++){var g=e.entries[f];
-if(null!=g.libs&&0<g.libs.length){for(var h=[],n=0;n<g.libs.length;n++)h.push(g.id+"."+n);this.showPalettes("",h,0<=mxUtils.indexOf(c,g.id))}}d&&(mxSettings.setLibraries(a),mxSettings.save())};Sidebar.prototype.init=function(){this.entries=[{title:mxResources.get("standard"),entries:[{title:mxResources.get("general"),id:"general",image:IMAGE_PATH+"/sidebar-general.png"},{title:mxResources.get("basic"),id:"basic",image:IMAGE_PATH+"/sidebar-basic.png"},{title:mxResources.get("arrows"),id:"arrows2",
-image:IMAGE_PATH+"/sidebar-arrows2.png"},{title:mxResources.get("clipart"),id:"clipart",image:IMAGE_PATH+"/sidebar-clipart.png"},{title:mxResources.get("flowchart"),id:"flowchart",image:IMAGE_PATH+"/sidebar-flowchart.png"}]},{title:mxResources.get("software"),entries:[{title:"Active Directory",id:"active_directory",image:IMAGE_PATH+"/sidebar-active_directory.png"},{title:mxResources.get("android"),id:"android",image:IMAGE_PATH+"/sidebar-android.png"},{title:"Atlassian",id:"atlassian",image:IMAGE_PATH+
-"/sidebar-atlassian.png"},{title:mxResources.get("bootstrap"),id:"bootstrap",image:IMAGE_PATH+"/sidebar-bootstrap.png"},{title:"Data Flow Diagram",id:"dfd",image:IMAGE_PATH+"/sidebar-dfd.png"},{title:mxResources.get("entityRelation"),id:"er",image:IMAGE_PATH+"/sidebar-er.png"},{title:mxResources.get("ios"),id:"ios",image:IMAGE_PATH+"/sidebar-ios.png"},{title:mxResources.get("mockups"),id:"mockups",image:IMAGE_PATH+"/sidebar-mockups.png"},{title:"Sitemap",id:"sitemap",image:IMAGE_PATH+"/sidebar-sitemap.png"},
-{title:mxResources.get("uml"),id:"uml",image:IMAGE_PATH+"/sidebar-uml.png"}]},{title:mxResources.get("networking"),entries:[{title:"Allied Telesis",id:"allied_telesis",image:IMAGE_PATH+"/sidebar-allied_telesis.png"},{title:"AWS17",id:"aws3",image:IMAGE_PATH+"/sidebar-aws3.png"},{title:"AWS18",id:"aws4b",image:IMAGE_PATH+"/sidebar-aws4.png"},{title:"AWS19",id:"aws4",image:IMAGE_PATH+"/sidebar-aws4.png"},{title:mxResources.get("aws3d"),id:"aws3d",image:IMAGE_PATH+"/sidebar-aws3d.png"},{title:mxResources.get("azure"),
-id:"azure",image:IMAGE_PATH+"/sidebar-azure.png"},{title:"Cloud & Enterprise",id:"mscae",image:IMAGE_PATH+"/sidebar-mscae.png"},{title:mxResources.get("cisco"),id:"cisco",image:IMAGE_PATH+"/sidebar-cisco.png"},{title:"Cisco Safe",id:"cisco_safe",image:IMAGE_PATH+"/sidebar-cisco_safe.png"},{title:"Cumulus",id:"cumulus",image:IMAGE_PATH+"/sidebar-cumulus.png"},{title:"Citrix",id:"citrix",image:IMAGE_PATH+"/sidebar-citrix.png"},{title:"Google Cloud Platform",id:"gcp2",image:IMAGE_PATH+"/sidebar-gcp2.png"},
-{title:"IBM",id:"ibm",image:IMAGE_PATH+"/sidebar-ibm.png"},{title:"Kubernetes",id:"kubernetes",image:IMAGE_PATH+"/sidebar-kubernetes.png"},{title:"Network",id:"network",image:IMAGE_PATH+"/sidebar-network.png"},{title:"Office",id:"office",image:IMAGE_PATH+"/sidebar-office.png"},{title:mxResources.get("rack"),id:"rack",image:IMAGE_PATH+"/sidebar-rack.png"},{title:"Veeam",id:"veeam",image:IMAGE_PATH+"/sidebar-veeam.png"},{title:"VMware",id:"vvd",image:IMAGE_PATH+"/sidebar-vvd.png"}]},{title:mxResources.get("business"),
-entries:[{title:"ArchiMate 3.0",id:"archimate3",image:IMAGE_PATH+"/sidebar-archimate3.png"},{title:mxResources.get("archiMate21"),id:"archimate",image:IMAGE_PATH+"/sidebar-archimate.png"},{title:mxResources.get("bpmn"),id:"bpmn",image:IMAGE_PATH+"/sidebar-bpmn.png"},{title:mxResources.get("leanMapping"),id:"lean_mapping",image:IMAGE_PATH+"/sidebar-leanmapping.png"},{title:mxResources.get("sysml"),id:"sysml",image:IMAGE_PATH+"/sidebar-sysml.png"}]},{title:mxResources.get("other"),entries:[{title:mxResources.get("cabinets"),
-id:"cabinets",image:IMAGE_PATH+"/sidebar-cabinets.png"},{title:"Infographic",id:"infographic",image:IMAGE_PATH+"/sidebar-infographic.png"},{title:mxResources.get("eip"),id:"eip",image:IMAGE_PATH+"/sidebar-eip.png"},{title:mxResources.get("electrical"),id:"electrical",image:IMAGE_PATH+"/sidebar-electrical.png"},{title:mxResources.get("floorplans"),id:"floorplan",image:IMAGE_PATH+"/sidebar-floorplans.png"},{title:mxResources.get("gmdl"),id:"gmdl",image:IMAGE_PATH+"/sidebar-gmdl.png"},{title:mxResources.get("procEng"),
-id:"pid",image:IMAGE_PATH+"/sidebar-pid.png"},{title:"Web Icons",id:"webicons",image:IMAGE_PATH+"/sidebar-webIcons.png"},{title:mxResources.get("signs"),id:"signs",image:IMAGE_PATH+"/sidebar-signs.png"}]}];this.addStencilsToIndex=!1;this.shapetags={};null!=this.tagIndex&&(this.addTagIndex(Graph.decompress(this.tagIndex)),this.tagIndex=null);this.initPalettes()};"1"==urlParams.savesidebar&&(Sidebar.prototype.addFoldingHandler=function(a,d,c){var b=!1;if(!mxClient.IS_IE||8<=document.documentMode)a.style.backgroundImage=
-"none"==d.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')";a.style.backgroundRepeat="no-repeat";a.style.backgroundPosition="0% 50%";var e=document.createElement("button");e.style.marginLeft="4px";mxUtils.write(e,"Save");mxEvent.addListener(a,"click",mxUtils.bind(this,function(f){if("BUTTON"==mxEvent.getSource(f).nodeName){f=a.cloneNode(!0);f.style.backgroundImage="";f.style.textDecoration="none";f.style.fontWeight="bold";f.style.fontSize="14px";f.style.color="rgb(80, 80, 80)";
-f.style.width="456px";f.style.backgroundColor="#ffffff";f.style.paddingLeft="6px";var g=f.getElementsByTagName("button")[0];g.parentNode.removeChild(g);var h=d.cloneNode(!0);h.style.backgroundColor="#ffffff";h.style.borderColor="transparent";h.style.width="456px";f=(new DOMParser).parseFromString('<body style="background:#ffffff;font-family:Helvetica,Arial;">'+f.outerHTML+h.outerHTML+"</body>","text/html");this.editorUi.convertImages(f.documentElement,mxUtils.bind(this,function(a){var d='<!DOCTYPE html><html><head><link rel="stylesheet" type="text/css" href="https://www.draw.io/styles/grapheditor.css"></head>'+
-mxUtils.getXml(a)+"</html>";h.style.position="absolute";window.document.body.appendChild(h);var c=h.clientHeight+18;h.parentNode.removeChild(h);this.editorUi.confirm("Image data created",mxUtils.bind(this,function(){(new mxXmlRequest(EXPORT_URL,"w=456&h="+c+"&html="+encodeURIComponent(Graph.compress(d)))).simulate(document,"_blank")}),null,mxResources.get("save"),mxResources.get("cancel"))}))}else{if("none"==d.style.display){if(b)a.appendChild(e);else if(b=!0,null!=c){null!=e.parentNode&&e.parentNode.removeChild(e);
-a.style.cursor="wait";var k=a.innerHTML;a.innerHTML=mxResources.get("loading")+"...";window.setTimeout(function(){c(d);a.style.cursor="";a.innerHTML=k;a.appendChild(e)},0)}else a.appendChild(e);a.style.backgroundImage="url('"+this.expandedImage+"')";d.style.display="block"}else a.style.backgroundImage="url('"+this.collapsedImage+"')",d.style.display="none",null!=e.parentNode&&e.parentNode.removeChild(e);mxEvent.consume(f)}}))});Sidebar.prototype.extractShapeStyle=function(a){if(null!=a&&"shape="==
-a.substring(0,6)){var d=a.indexOf(";");0>d&&(d=a.length);return a.substring(6,d)}return null};var b=Sidebar.prototype.getTagsForStencil;Sidebar.prototype.getTagsForStencil=function(a,d,c){var e=b.apply(this,arguments);null!=this.shapetags&&(a=a.toLowerCase(),d=d.toLowerCase(),null!=this.shapetags[a]&&e.push(this.shapetags[a]),d=a+"."+d,null!=this.shapetags[d]&&e.push(this.shapetags[d]));return e};Sidebar.prototype.addTagIndex=function(a){a=a.split("\n");for(var d=0;d<a.length;d++)if(null!=a[d]){var c=
-a[d].split("\t");if(1<c.length){var b=c[0].toLowerCase().replace(" ","_"),c=mxUtils.trim(c.slice(1,c.length).join(" ").toLowerCase());0<c.length&&(this.shapetags[b]=c)}}};Sidebar.prototype.addSearchFileData=function(a){if(null!=a){a=a.getElementsByTagName("shape");for(var d=0;d<a.length;d++){var c=a[d].getAttribute("style"),b=this.extractShapeStyle(c);if(null!=c&&null!=b){var e=b.lastIndexOf(".");if(0<e){var f=b.substring(0,e),b=b.substring(e+1,b.length),e=this.getTagsForStencil(f,b,a[d].getAttribute("tags"));
-if(null!=e){var q=c.indexOf(";"),c="shape="+f+"."+b.toLowerCase()+";"+(0>q?"":c.substring(q+1));this.createVertexTemplateEntry(c,parseInt(a[d].getAttribute("w")),parseInt(a[d].getAttribute("h")),"",b.replace(/_/g," "),null,null,this.filterTags(e.join(" ")))}}}}}};Sidebar.prototype.initPalettes=function(){var a=GRAPH_IMAGE_PATH,d=STENCIL_PATH,c=this.signs,b=this.rack,e=this.pids,m=this.cisco,q=this.sysml,r=this.eip,n=this.gmdl;"1"==urlParams.createindex&&(mxLog.show(),mxLog.textarea.value="");this.addSearchPalette(!0);
-if(null!=this.customEntries)for(var p=0;p<this.customEntries.length;p++)for(var u=this.customEntries[p],t=0;t<u.entries.length;t++)for(var y=u.entries[t],x=0;x<y.libs.length;x++)mxUtils.bind(this,function(a){this.addPalette(y.id+"."+x,this.editorUi.getResource(a.title),!1,mxUtils.bind(this,function(d,c){var b=mxUtils.bind(this,function(a){this.addEntries(a);this.editorUi.addLibraryEntries(a,d)}),e=mxUtils.bind(this,function(a){d.innerHTML="";var c=document.createElement("div");c.style.color="rgb(179, 179, 179)";
-c.style.textAlign="center";c.style.paddingTop="6px";mxUtils.write(c,a);d.appendChild(c)});if(a.data)b(a.data);else{d.style.display="none";c.innerHTML="";mxUtils.write(c,mxResources.get("loading")+"...");var f=a.url;this.editorUi.editor.isCorsEnabledForUrl(f)||(f=PROXY_URL+"?url="+encodeURIComponent(f));this.editorUi.loadUrl(f,mxUtils.bind(this,function(f){d.style.display="block";c.innerHTML="";mxUtils.write(c,this.editorUi.getResource(a.title));try{var g=mxUtils.parseXml(f);if("mxlibrary"==g.documentElement.nodeName){var h=
-JSON.parse(mxUtils.getTextContent(g.documentElement));b(h)}else e(mxResources.get("notALibraryFile"))}catch(B){e(mxResources.get("error")+": "+B.message)}}))}}))})(y.libs[x]);this.addGeneralPalette(null==this.customEntries);this.addMiscPalette(!1);this.addAdvancedPalette(!1);this.addBasicPalette();this.addStencilPalette("arrows",mxResources.get("arrows"),d+"/arrows.xml",";html=1;"+mxConstants.STYLE_VERTICAL_LABEL_POSITION+"=bottom;"+mxConstants.STYLE_VERTICAL_ALIGN+"=top;"+mxConstants.STYLE_STROKEWIDTH+
-"=2;strokeColor=#000000;");this.addArrows2Palette();this.addImagePalette("computer","Clipart / Computer",a+"/lib/clip_art/computers/","_128x128.png","Antivirus Data_Filtering Database Database_Add Database_Minus Database_Move_Stack Database_Remove Fujitsu_Tablet Harddrive IBM_Tablet iMac iPad Laptop MacBook Mainframe Monitor Monitor_Tower Monitor_Tower_Behind Netbook Network Network_2 Printer Printer_Commercial Secure_System Server Server_Rack Server_Rack_Empty Server_Rack_Partial Server_Tower Software Stylus Touch USB_Hub Virtual_Application Virtual_Machine Virus Workstation".split(" "),
+c)return"none"!=c[0].style.display;break}if(null!=this.customEntries)for(d=0;d<this.customEntries.length;d++)for(var c=this.customEntries[d],b=0;b<c.entries.length;b++){var e=c.entries[b];if(e.id==a){if(null!=e.libs&&0<e.libs.length&&(c=this.palettes[e.id+".0"],null!=c))return"none"!=c[0].style.display;break}}return!1};Sidebar.prototype.showEntries=function(a,d,c){this.libs=null!=a&&(c||0<a.length)?a:null!=urlParams.libs&&0<urlParams.libs.length?decodeURIComponent(urlParams.libs):null!=mxSettings&&
+null!=mxSettings.settings?mxSettings.getLibraries():this.defaultEntries;c=this.libs.split(";");for(var b=0;b<c.length;b++)c[b]=this.libAliases[c[b]]||c[b];for(b=0;b<this.configuration.length;b++)"search"!=this.configuration[b].id&&this.showPalettes(this.configuration[b].prefix||"",this.configuration[b].libs||[this.configuration[b].id],0<=mxUtils.indexOf(c,this.configuration[b].id));if(null!=this.customEntries)for(b=0;b<this.customEntries.length;b++)for(var e=this.customEntries[b],f=0;f<e.entries.length;f++){var g=
+e.entries[f];if(null!=g.libs&&0<g.libs.length){for(var h=[],n=0;n<g.libs.length;n++)h.push(g.id+"."+n);this.showPalettes("",h,0<=mxUtils.indexOf(c,g.id))}}d&&(mxSettings.setLibraries(a),mxSettings.save())};Sidebar.prototype.init=function(){this.entries=[{title:mxResources.get("standard"),entries:[{title:mxResources.get("general"),id:"general",image:IMAGE_PATH+"/sidebar-general.png"},{title:mxResources.get("basic"),id:"basic",image:IMAGE_PATH+"/sidebar-basic.png"},{title:mxResources.get("arrows"),
+id:"arrows2",image:IMAGE_PATH+"/sidebar-arrows2.png"},{title:mxResources.get("clipart"),id:"clipart",image:IMAGE_PATH+"/sidebar-clipart.png"},{title:mxResources.get("flowchart"),id:"flowchart",image:IMAGE_PATH+"/sidebar-flowchart.png"}]},{title:mxResources.get("software"),entries:[{title:"Active Directory",id:"active_directory",image:IMAGE_PATH+"/sidebar-active_directory.png"},{title:mxResources.get("android"),id:"android",image:IMAGE_PATH+"/sidebar-android.png"},{title:"Atlassian",id:"atlassian",
+image:IMAGE_PATH+"/sidebar-atlassian.png"},{title:mxResources.get("bootstrap"),id:"bootstrap",image:IMAGE_PATH+"/sidebar-bootstrap.png"},{title:"Data Flow Diagram",id:"dfd",image:IMAGE_PATH+"/sidebar-dfd.png"},{title:mxResources.get("entityRelation"),id:"er",image:IMAGE_PATH+"/sidebar-er.png"},{title:mxResources.get("ios"),id:"ios",image:IMAGE_PATH+"/sidebar-ios.png"},{title:mxResources.get("mockups"),id:"mockups",image:IMAGE_PATH+"/sidebar-mockups.png"},{title:"Sitemap",id:"sitemap",image:IMAGE_PATH+
+"/sidebar-sitemap.png"},{title:mxResources.get("uml"),id:"uml",image:IMAGE_PATH+"/sidebar-uml.png"}]},{title:mxResources.get("networking"),entries:[{title:"Allied Telesis",id:"allied_telesis",image:IMAGE_PATH+"/sidebar-allied_telesis.png"},{title:"AWS17",id:"aws3",image:IMAGE_PATH+"/sidebar-aws3.png"},{title:"AWS18",id:"aws4b",image:IMAGE_PATH+"/sidebar-aws4.png"},{title:"AWS19",id:"aws4",image:IMAGE_PATH+"/sidebar-aws4.png"},{title:mxResources.get("aws3d"),id:"aws3d",image:IMAGE_PATH+"/sidebar-aws3d.png"},
+{title:mxResources.get("azure"),id:"azure",image:IMAGE_PATH+"/sidebar-azure.png"},{title:"Cloud & Enterprise",id:"mscae",image:IMAGE_PATH+"/sidebar-mscae.png"},{title:mxResources.get("cisco"),id:"cisco",image:IMAGE_PATH+"/sidebar-cisco.png"},{title:"Cisco Safe",id:"cisco_safe",image:IMAGE_PATH+"/sidebar-cisco_safe.png"},{title:"Cumulus",id:"cumulus",image:IMAGE_PATH+"/sidebar-cumulus.png"},{title:"Citrix",id:"citrix",image:IMAGE_PATH+"/sidebar-citrix.png"},{title:"Google Cloud Platform",id:"gcp2",
+image:IMAGE_PATH+"/sidebar-gcp2.png"},{title:"IBM",id:"ibm",image:IMAGE_PATH+"/sidebar-ibm.png"},{title:"Kubernetes",id:"kubernetes",image:IMAGE_PATH+"/sidebar-kubernetes.png"},{title:"Network",id:"network",image:IMAGE_PATH+"/sidebar-network.png"},{title:"Office",id:"office",image:IMAGE_PATH+"/sidebar-office.png"},{title:mxResources.get("rack"),id:"rack",image:IMAGE_PATH+"/sidebar-rack.png"},{title:"Veeam",id:"veeam",image:IMAGE_PATH+"/sidebar-veeam.png"},{title:"VMware",id:"vvd",image:IMAGE_PATH+
+"/sidebar-vvd.png"}]},{title:mxResources.get("business"),entries:[{title:"ArchiMate 3.0",id:"archimate3",image:IMAGE_PATH+"/sidebar-archimate3.png"},{title:mxResources.get("archiMate21"),id:"archimate",image:IMAGE_PATH+"/sidebar-archimate.png"},{title:mxResources.get("bpmn"),id:"bpmn",image:IMAGE_PATH+"/sidebar-bpmn.png"},{title:mxResources.get("leanMapping"),id:"lean_mapping",image:IMAGE_PATH+"/sidebar-leanmapping.png"},{title:mxResources.get("sysml"),id:"sysml",image:IMAGE_PATH+"/sidebar-sysml.png"}]},
+{title:mxResources.get("other"),entries:[{title:mxResources.get("cabinets"),id:"cabinets",image:IMAGE_PATH+"/sidebar-cabinets.png"},{title:"Infographic",id:"infographic",image:IMAGE_PATH+"/sidebar-infographic.png"},{title:mxResources.get("eip"),id:"eip",image:IMAGE_PATH+"/sidebar-eip.png"},{title:mxResources.get("electrical"),id:"electrical",image:IMAGE_PATH+"/sidebar-electrical.png"},{title:mxResources.get("floorplans"),id:"floorplan",image:IMAGE_PATH+"/sidebar-floorplans.png"},{title:mxResources.get("gmdl"),
+id:"gmdl",image:IMAGE_PATH+"/sidebar-gmdl.png"},{title:mxResources.get("procEng"),id:"pid",image:IMAGE_PATH+"/sidebar-pid.png"},{title:"Web Icons",id:"webicons",image:IMAGE_PATH+"/sidebar-webIcons.png"},{title:mxResources.get("signs"),id:"signs",image:IMAGE_PATH+"/sidebar-signs.png"}]}];this.addStencilsToIndex=!1;this.shapetags={};null!=this.tagIndex&&(this.addTagIndex(Graph.decompress(this.tagIndex)),this.tagIndex=null);this.initPalettes()};"1"==urlParams.savesidebar&&(Sidebar.prototype.addFoldingHandler=
+function(a,d,c){var b=!1;if(!mxClient.IS_IE||8<=document.documentMode)a.style.backgroundImage="none"==d.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')";a.style.backgroundRepeat="no-repeat";a.style.backgroundPosition="0% 50%";var e=document.createElement("button");e.style.marginLeft="4px";mxUtils.write(e,"Save");mxEvent.addListener(a,"click",mxUtils.bind(this,function(f){if("BUTTON"==mxEvent.getSource(f).nodeName){f=a.cloneNode(!0);f.style.backgroundImage="";f.style.textDecoration=
+"none";f.style.fontWeight="bold";f.style.fontSize="14px";f.style.color="rgb(80, 80, 80)";f.style.width="456px";f.style.backgroundColor="#ffffff";f.style.paddingLeft="6px";var g=f.getElementsByTagName("button")[0];g.parentNode.removeChild(g);var h=d.cloneNode(!0);h.style.backgroundColor="#ffffff";h.style.borderColor="transparent";h.style.width="456px";f=(new DOMParser).parseFromString('<body style="background:#ffffff;font-family:Helvetica,Arial;">'+f.outerHTML+h.outerHTML+"</body>","text/html");this.editorUi.convertImages(f.documentElement,
+mxUtils.bind(this,function(a){var d='<!DOCTYPE html><html><head><link rel="stylesheet" type="text/css" href="https://www.draw.io/styles/grapheditor.css"></head>'+mxUtils.getXml(a)+"</html>";h.style.position="absolute";window.document.body.appendChild(h);var c=h.clientHeight+18;h.parentNode.removeChild(h);this.editorUi.confirm("Image data created",mxUtils.bind(this,function(){(new mxXmlRequest(EXPORT_URL,"w=456&h="+c+"&html="+encodeURIComponent(Graph.compress(d)))).simulate(document,"_blank")}),null,
+mxResources.get("save"),mxResources.get("cancel"))}))}else{if("none"==d.style.display){if(b)a.appendChild(e);else if(b=!0,null!=c){null!=e.parentNode&&e.parentNode.removeChild(e);a.style.cursor="wait";var k=a.innerHTML;a.innerHTML=mxResources.get("loading")+"...";window.setTimeout(function(){c(d);a.style.cursor="";a.innerHTML=k;a.appendChild(e)},0)}else a.appendChild(e);a.style.backgroundImage="url('"+this.expandedImage+"')";d.style.display="block"}else a.style.backgroundImage="url('"+this.collapsedImage+
+"')",d.style.display="none",null!=e.parentNode&&e.parentNode.removeChild(e);mxEvent.consume(f)}}))});Sidebar.prototype.extractShapeStyle=function(a){if(null!=a&&"shape="==a.substring(0,6)){var d=a.indexOf(";");0>d&&(d=a.length);return a.substring(6,d)}return null};var b=Sidebar.prototype.getTagsForStencil;Sidebar.prototype.getTagsForStencil=function(a,d,c){var e=b.apply(this,arguments);null!=this.shapetags&&(a=a.toLowerCase(),d=d.toLowerCase(),null!=this.shapetags[a]&&e.push(this.shapetags[a]),d=
+a+"."+d,null!=this.shapetags[d]&&e.push(this.shapetags[d]));return e};Sidebar.prototype.addTagIndex=function(a){a=a.split("\n");for(var d=0;d<a.length;d++)if(null!=a[d]){var c=a[d].split("\t");if(1<c.length){var b=c[0].toLowerCase().replace(" ","_"),c=mxUtils.trim(c.slice(1,c.length).join(" ").toLowerCase());0<c.length&&(this.shapetags[b]=c)}}};Sidebar.prototype.addSearchFileData=function(a){if(null!=a){a=a.getElementsByTagName("shape");for(var d=0;d<a.length;d++){var c=a[d].getAttribute("style"),
+b=this.extractShapeStyle(c);if(null!=c&&null!=b){var e=b.lastIndexOf(".");if(0<e){var f=b.substring(0,e),b=b.substring(e+1,b.length),e=this.getTagsForStencil(f,b,a[d].getAttribute("tags"));if(null!=e){var q=c.indexOf(";"),c="shape="+f+"."+b.toLowerCase()+";"+(0>q?"":c.substring(q+1));this.createVertexTemplateEntry(c,parseInt(a[d].getAttribute("w")),parseInt(a[d].getAttribute("h")),"",b.replace(/_/g," "),null,null,this.filterTags(e.join(" ")))}}}}}};Sidebar.prototype.initPalettes=function(){var a=
+GRAPH_IMAGE_PATH,d=STENCIL_PATH,c=this.signs,b=this.rack,e=this.pids,m=this.cisco,q=this.sysml,r=this.eip,n=this.gmdl;"1"==urlParams.createindex&&(mxLog.show(),mxLog.textarea.value="");this.addSearchPalette(!0);if(null!=this.customEntries)for(var p=0;p<this.customEntries.length;p++)for(var u=this.customEntries[p],t=0;t<u.entries.length;t++)for(var y=u.entries[t],x=0;x<y.libs.length;x++)mxUtils.bind(this,function(a){this.addPalette(y.id+"."+x,this.editorUi.getResource(a.title),!1,mxUtils.bind(this,
+function(d,c){var b=mxUtils.bind(this,function(a){this.addEntries(a);this.editorUi.addLibraryEntries(a,d)}),e=mxUtils.bind(this,function(a){d.innerHTML="";var c=document.createElement("div");c.style.color="rgb(179, 179, 179)";c.style.textAlign="center";c.style.paddingTop="6px";mxUtils.write(c,a);d.appendChild(c)});if(a.data)b(a.data);else{d.style.display="none";c.innerHTML="";mxUtils.write(c,mxResources.get("loading")+"...");var f=a.url;this.editorUi.editor.isCorsEnabledForUrl(f)||(f=PROXY_URL+"?url="+
+encodeURIComponent(f));this.editorUi.loadUrl(f,mxUtils.bind(this,function(f){d.style.display="block";c.innerHTML="";mxUtils.write(c,this.editorUi.getResource(a.title));try{var g=mxUtils.parseXml(f);if("mxlibrary"==g.documentElement.nodeName){var h=JSON.parse(mxUtils.getTextContent(g.documentElement));b(h)}else e(mxResources.get("notALibraryFile"))}catch(B){e(mxResources.get("error")+": "+B.message)}}))}}))})(y.libs[x]);this.addGeneralPalette(null==this.customEntries);this.addMiscPalette(!1);this.addAdvancedPalette(!1);
+this.addBasicPalette();this.addStencilPalette("arrows",mxResources.get("arrows"),d+"/arrows.xml",";html=1;"+mxConstants.STYLE_VERTICAL_LABEL_POSITION+"=bottom;"+mxConstants.STYLE_VERTICAL_ALIGN+"=top;"+mxConstants.STYLE_STROKEWIDTH+"=2;strokeColor=#000000;");this.addArrows2Palette();this.addImagePalette("computer","Clipart / Computer",a+"/lib/clip_art/computers/","_128x128.png","Antivirus Data_Filtering Database Database_Add Database_Minus Database_Move_Stack Database_Remove Fujitsu_Tablet Harddrive IBM_Tablet iMac iPad Laptop MacBook Mainframe Monitor Monitor_Tower Monitor_Tower_Behind Netbook Network Network_2 Printer Printer_Commercial Secure_System Server Server_Rack Server_Rack_Empty Server_Rack_Partial Server_Tower Software Stylus Touch USB_Hub Virtual_Application Virtual_Machine Virus Workstation".split(" "),
"Antivirus;Data Filtering;Database;Database Add;Database Minus;Database Move Stack;Database Remove;Fujitsu Tablet;Harddrive;IBMTablet;iMac;iPad;Laptop;MacBook;Mainframe;Monitor;Monitor Tower;Monitor Tower Behind;Netbook;Network;Network 2;Printer;Printer Commercial;Secure System;Server;Server Rack;Server Rack Empty;Server Rack Partial;Server Tower;Software;Stylus;Touch;USB Hub;Virtual Application;Virtual Machine;Virus;Workstation".split(";"));this.addImagePalette("finance","Clipart / Finance",a+"/lib/clip_art/finance/",
"_128x128.png","Arrow_Down Arrow_Up Coins Credit_Card Dollar Graph Pie_Chart Piggy_Bank Safe Shopping_Cart Stock_Down Stock_Up".split(" "),"Arrow_Down;Arrow Up;Coins;Credit Card;Dollar;Graph;Pie Chart;Piggy Bank;Safe;Shopping Basket;Stock Down;Stock Up".split(";"));this.addImagePalette("clipart","Clipart / Various",a+"/lib/clip_art/general/","_128x128.png","Battery_0 Battery_100 Battery_50 Battery_75 Battery_allstates Bluetooth Earth_globe Empty_Folder Full_Folder Gear Keys Lock Mouse_Pointer Plug Ships_Wheel Star Tire".split(" "),
"Battery 0%;Battery 100%;Battery 50%;Battery 75%;Battery;Bluetooth;Globe;Empty Folder;Full Folder;Gear;Keys;Lock;Mousepointer;Plug;Ships Wheel;Star;Tire".split(";"));this.addImagePalette("networking","Clipart / Networking",a+"/lib/clip_art/networking/","_128x128.png","Bridge Certificate Certificate_Off Cloud Cloud_Computer Cloud_Computer_Private Cloud_Rack Cloud_Rack_Private Cloud_Server Cloud_Server_Private Cloud_Storage Concentrator Email Firewall_02 Firewall Firewall-page1 Ip_Camera Modem power_distribution_unit Print_Server Print_Server_Wireless Repeater Router Router_Icon Switch UPS Wireless_Router Wireless_Router_N".split(" "),
@@ -7773,24 +7777,24 @@ DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E
DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.reportEnabled=!0;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};
DrawioFile.prototype.synchronizeFile=function(a,c){this.savingFile?null!=c&&c({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,c):this.updateFile(a,c)};
DrawioFile.prototype.updateFile=function(a,c,d,b){null!=d&&d()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():this.getLatestVersion(mxUtils.bind(this,function(g){try{null!=d&&d()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():null!=g?this.mergeFile(g,a,c,b):this.reloadFile(a,c))}catch(e){null!=c&&c(e)}}),c))};
-DrawioFile.prototype.mergeFile=function(a,c,d,b){var g=!0;try{this.stats.fileMerged++;var e=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),k=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=k&&0<k.length){this.shadowPages=k;this.backupPatch=this.isModified()?this.ui.diffPages(e,this.ui.pages):null;var l=[this.ui.diffPages(null!=b?b:e,this.shadowPages)];if(!this.ignorePatches(l)){var n=this.ui.patchPages(e,
-l[0]);b={};var q=this.ui.getHashValueForPages(n,b),e={},f=this.ui.getHashValueForPages(this.shadowPages,e);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",l,"checksum",f==q,q);if(null!=q&&q!=f){var m=this.compressReportData(this.getAnonymizedXmlForPages(k)),p=this.compressReportData(this.getAnonymizedXmlForPages(n)),u=this.ui.hashValue(a.getCurrentEtag()),v=this.ui.hashValue(this.getCurrentEtag());this.checksumError(d,l,"Shadow Details: "+JSON.stringify(b)+
-"\nChecksum: "+q+"\nCurrent: "+f+"\nCurrent Details: "+JSON.stringify(e)+"\nFrom: "+u+"\nTo: "+v+"\n\nFile Data:\n"+m+"\nPatched Shadow:\n"+p,null,"mergeFile");return}this.patch(l,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(y){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
-null!=d&&d(y);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,y);else{var t=this.getCurrentUser(),x=null!=t?t.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,y)}}catch(D){}}};
+DrawioFile.prototype.mergeFile=function(a,c,d,b){var g=!0;try{this.stats.fileMerged++;var e=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),k=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=k&&0<k.length){this.shadowPages=k;this.backupPatch=this.isModified()?this.ui.diffPages(e,this.ui.pages):null;var n=[this.ui.diffPages(null!=b?b:e,this.shadowPages)];if(!this.ignorePatches(n)){var m=this.ui.patchPages(e,
+n[0]);b={};var t=this.ui.getHashValueForPages(m,b),e={},f=this.ui.getHashValueForPages(this.shadowPages,e);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",n,"checksum",f==t,t);if(null!=t&&t!=f){var l=this.compressReportData(this.getAnonymizedXmlForPages(k)),p=this.compressReportData(this.getAnonymizedXmlForPages(m)),u=this.ui.hashValue(a.getCurrentEtag()),v=this.ui.hashValue(this.getCurrentEtag());this.checksumError(d,n,"Shadow Details: "+JSON.stringify(b)+
+"\nChecksum: "+t+"\nCurrent: "+f+"\nCurrent Details: "+JSON.stringify(e)+"\nFrom: "+u+"\nTo: "+v+"\n\nFile Data:\n"+l+"\nPatched Shadow:\n"+p,null,"mergeFile");return}this.patch(n,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(y){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+null!=d&&d(y);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,y);else{var q=this.getCurrentUser(),x=null!=q?q.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,y)}}catch(D){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var c=new mxCodec(mxUtils.createXmlDocument()),d=c.document.createElement("mxfile");if(null!=a)for(var b=0;b<a.length;b++){var g=c.encode(new mxGraphModel(a[b].root));"1"!=urlParams.dev&&(g=this.ui.anonymizeNode(g,!0));g.setAttribute("id",a[b].getId());a[b].viewState&&this.ui.editor.graph.saveViewState(a[b].viewState,g,!0);d.appendChild(g)}return mxUtils.getPrettyXml(d)};
DrawioFile.prototype.compressReportData=function(a,c,d){c=null!=c?c:1E4;null!=d&&null!=a&&a.length>d?a=a.substring(0,d)+"[...]":null!=a&&a.length>c&&(a=Graph.compress(a)+"\n");return a};
DrawioFile.prototype.checksumError=function(a,c,d,b,g){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=c)for(a=0;a<c.length;a++)this.ui.anonymizePatch(c[a]);var e=mxUtils.bind(this,function(a){var b=this.compressReportData(JSON.stringify(c,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
-25E3):"n/a";this.sendErrorReport("Checksum Error in "+g+" "+this.getHash(),(null!=d?d:"")+"\n\nPatches:\n"+b+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==b?e(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==b?e(a):e(null)}),function(){})}else{var k=this.getCurrentUser(),l=null!=k?k.id:"unknown";EditorUi.logError("Checksum Error in "+g+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+l+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
-try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:g,label:"user_"+l+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(n){}}}catch(n){}};
-DrawioFile.prototype.sendErrorReport=function(a,c,d,b){try{var g=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),e=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),k=this.getCurrentUser(),l=null!=k?this.ui.hashValue(k.id):"unknown",n=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",q=this.getTitle(),f=q.lastIndexOf("."),k="xml";0<f&&(k=q.substring(f));var m=null!=d?d.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
-":\n\nBrowser="+navigator.userAgent+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+k+")\nUser="+l+n+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=c?"\n\n"+c:"")+
-(null!=d?"\n\nError: "+d.message:"")+"\n\nStack:\n"+m+"\n\nShadow:\n"+g+"\n\nData:\n"+e,b)}catch(p){}};
+25E3):"n/a";this.sendErrorReport("Checksum Error in "+g+" "+this.getHash(),(null!=d?d:"")+"\n\nPatches:\n"+b+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==b?e(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==b?e(a):e(null)}),function(){})}else{var k=this.getCurrentUser(),n=null!=k?k.id:"unknown";EditorUi.logError("Checksum Error in "+g+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+n+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
+try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:g,label:"user_"+n+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(m){}}}catch(m){}};
+DrawioFile.prototype.sendErrorReport=function(a,c,d,b){try{var g=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),e=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),k=this.getCurrentUser(),n=null!=k?this.ui.hashValue(k.id):"unknown",m=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",t=this.getTitle(),f=t.lastIndexOf("."),k="xml";0<f&&(k=t.substring(f));var l=null!=d?d.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
+":\n\nBrowser="+navigator.userAgent+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+k+")\nUser="+n+m+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=c?"\n\n"+c:"")+
+(null!=d?"\n\nError: "+d.message:"")+"\n\nStack:\n"+l+"\n\nShadow:\n"+g+"\n\nData:\n"+e,b)}catch(p){}};
DrawioFile.prototype.reloadFile=function(a,c){try{this.ui.spinner.stop();var d=mxUtils.bind(this,function(){this.stats.fileReloaded++;this.reportEnabled=!1;var b=this.ui.editor.graph.getViewState(),c=this.ui.editor.graph.getSelectionCells(),d=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(d,b,c);null!=this.backupPatch&&this.patch([this.backupPatch]);var e=this.ui.getCurrentFile();null!=e&&(e.stats=
this.stats);null!=a&&a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()}catch(b){null!=c&&c(b)}};DrawioFile.prototype.copyFile=function(a,c){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(a){for(var c=!0,d=0;d<a.length&&c;d++)c=c&&0==Object.keys(a[d]).length;return c};
-DrawioFile.prototype.patch=function(a,c){var d=this.ui.editor.undoManager,b=d.history.slice(),g=d.indexOfNextAdd,e=this.ui.editor.graph;e.container.style.visibility="hidden";var k=this.changeListenerEnabled;this.changeListenerEnabled=!1;var l=e.foldingEnabled,n=e.mathEnabled,q=e.cellRenderer.redraw;e.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());q.apply(this,arguments)};e.model.beginUpdate();try{for(var f=
-0;f<a.length;f++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[f],!0,c,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{e.container.style.visibility="";e.model.endUpdate();e.cellRenderer.redraw=q;this.changeListenerEnabled=k;d.history=b;d.indexOfNextAdd=g;d.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)n!=
-e.mathEnabled?(this.ui.editor.updateGraphComponents(),e.refresh()):(l!=e.foldingEnabled?e.view.revalidate():e.view.validate(),e.sizeDidChange());this.ui.updateTabContainer()}};
+DrawioFile.prototype.patch=function(a,c){var d=this.ui.editor.undoManager,b=d.history.slice(),g=d.indexOfNextAdd,e=this.ui.editor.graph;e.container.style.visibility="hidden";var k=this.changeListenerEnabled;this.changeListenerEnabled=!1;var n=e.foldingEnabled,m=e.mathEnabled,t=e.cellRenderer.redraw;e.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());t.apply(this,arguments)};e.model.beginUpdate();try{for(var f=
+0;f<a.length;f++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[f],!0,c,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{e.container.style.visibility="";e.model.endUpdate();e.cellRenderer.redraw=t;this.changeListenerEnabled=k;d.history=b;d.indexOfNextAdd=g;d.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)m!=
+e.mathEnabled?(this.ui.editor.updateGraphComponents(),e.refresh()):(n!=e.foldingEnabled?e.view.revalidate():e.view.validate(),e.sizeDidChange());this.ui.updateTabContainer()}};
DrawioFile.prototype.save=function(a,c,d,b,g,e){try{if(this.isEditable())if(!g&&this.invalidChecksum)if(null!=d)d({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=c&&c();else if(null!=d)d({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(k){if(null!=d)d(k);else throw k;}};
DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed()))};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var a=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=a?"false"!=a:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(a,c,d){};DrawioFile.prototype.saveFile=function(a,c,d,b){};
DrawioFile.prototype.getPublicUrl=function(a){a(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,c,d){};
@@ -7824,7 +7828,7 @@ this.synchronizeFile(d,b)}),this.getErrorMessage(a))};DrawioFile.prototype.getEr
DrawioFile.prototype.fileChanged=function(){this.lastChanged=new Date;this.setModified(!0);this.isAutosave()?(this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=
this.lastChanged)}),mxUtils.bind(this,function(a){this.handleFileError(a)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus())};
DrawioFile.prototype.fileSaved=function(a,c,d,b){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=d&&d()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),c,d,b,a)}catch(k){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=b&&b(k);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,k);else{var g=
-this.getCurrentUser(),e=null!=g?g.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),e,k)}}catch(l){}}};
+this.getCurrentUser(),e=null!=g?g.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),e,k)}}catch(n){}}};
DrawioFile.prototype.autosave=function(a,c,d,b){null==this.lastAutosave&&(this.lastAutosave=Date.now());a=Date.now()-this.lastAutosave<c?a:0;this.clearAutosave();var g=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==g&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=d&&d(a)}),mxUtils.bind(this,
function(a){null!=b&&b(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=d&&d(null)}),a);this.autosaveThread=g};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
@@ -7841,24 +7845,24 @@ StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,argum
StorageLibrary.prototype.isRenamable=function(a,c,d){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(a,c,d){DrawioFile.call(this,a,c);this.title=d;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(a,c,d){RemoteFile.call(this,a,c,d.title);this.libObj=d};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(a,c,d){};
RemoteLibrary.prototype.saveAs=function(a,c,d){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(a,c,d){StorageFile.call(this,a,c,d);a=d;c=a.lastIndexOf("/");0<=c&&(a=a.substring(c+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,c,d){return!1};UrlLibrary.prototype.saveAs=function(a,c,d){};UrlLibrary.prototype.open=function(){};/*
mxClient.IS_IOS || */
-var StorageDialog=function(a,c,d){function b(b,p,t,e,g,k){function z(){mxEvent.addListener(A,"click",null!=k?k:function(){t!=App.MODE_GOOGLE||a.isDriveDomain()?t==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(t,n.checked);c()})):t==App.MODE_ONEDRIVE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.oneDrive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(t,n.checked);
-c()})):(a.setMode(t,n.checked),c()):window.location.hostname=DriveClient.prototype.newAppHostname})}++q>d&&(mxUtils.br(f),q=0);var A=document.createElement("a");A.style.overflow="hidden";A.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";A.className="geBaseButton";A.style.boxSizing="border-box";A.style.fontSize="11px";A.style.position="relative";A.style.margin="4px";A.style.marginTop="2px";A.style.padding="8px 10px 12px 10px";A.style.width="88px";A.style.height=StorageDialog.extended?"50px":
+var StorageDialog=function(a,c,d){function b(b,p,q,e,g,k){function z(){mxEvent.addListener(A,"click",null!=k?k:function(){q!=App.MODE_GOOGLE||a.isDriveDomain()?q==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(q,m.checked);c()})):q==App.MODE_ONEDRIVE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.oneDrive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(q,m.checked);
+c()})):(a.setMode(q,m.checked),c()):window.location.hostname=DriveClient.prototype.newAppHostname})}++t>d&&(mxUtils.br(f),t=0);var A=document.createElement("a");A.style.overflow="hidden";A.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";A.className="geBaseButton";A.style.boxSizing="border-box";A.style.fontSize="11px";A.style.position="relative";A.style.margin="4px";A.style.marginTop="2px";A.style.padding="8px 10px 12px 10px";A.style.width="88px";A.style.height=StorageDialog.extended?"50px":
"100px";A.style.whiteSpace="nowrap";A.setAttribute("title",p);mxClient.IS_QUIRKS&&(A.style.cssFloat="left",A.style.zoom="1");var u=document.createElement("div");u.style.textOverflow="ellipsis";u.style.overflow="hidden";if(null!=b){var v=document.createElement("img");v.setAttribute("src",b);v.setAttribute("border","0");v.setAttribute("align","absmiddle");v.style.width=StorageDialog.extended?"24px":"60px";v.style.height=StorageDialog.extended?"24px":"60px";v.style.paddingBottom=StorageDialog.extended?
"4px":"6px";A.appendChild(v)}else u.style.paddingTop="5px",u.style.whiteSpace="normal",mxClient.IS_IOS?(A.style.padding="0px 10px 20px 10px",A.style.top="6px"):mxClient.IS_FF&&(u.style.paddingTop="0px",u.style.marginTop="-2px");StorageDialog.extended&&(A.style.paddingTop="4px",A.style.marginBottom="0px",u.display="inline-block",2==d&&(v.style.width="38px",v.style.height="38px",A.style.width="80px",A.style.height="68px"));A.appendChild(u);mxUtils.write(u,p);if(null!=g)for(b=0;b<g.length;b++)mxUtils.br(u),
-mxUtils.write(u,g[b]);if(null!=e&&null==a[e]){v.style.visibility="hidden";mxUtils.setOpacity(u,10);var B=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});B.spin(A);var l=window.setTimeout(function(){null==a[e]&&(B.stop(),A.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(b,f){null!=a[e]&&f.getProperty("client")==a[e]&&(window.clearTimeout(l),mxUtils.setOpacity(u,
-100),v.style.visibility="",B.stop(),z(),"drive"==e&&null!=m.parentNode&&m.parentNode.removeChild(m))}))}else z();f.appendChild(A)}d=null!=d?d:2;var g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";g.style.paddingTop="0px";g.style.paddingBottom="20px";var e=a.addLanguageMenu(g,!0);null!=e&&(e.style.bottom=parseInt("28px")-3+"px");if(!a.isOffline()&&1<a.getServiceCount()){e=document.createElement("a");e.setAttribute("href","https://about.draw.io/support/");e.setAttribute("title",
+mxUtils.write(u,g[b]);if(null!=e&&null==a[e]){v.style.visibility="hidden";mxUtils.setOpacity(u,10);var B=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});B.spin(A);var n=window.setTimeout(function(){null==a[e]&&(B.stop(),A.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(b,f){null!=a[e]&&f.getProperty("client")==a[e]&&(window.clearTimeout(n),mxUtils.setOpacity(u,
+100),v.style.visibility="",B.stop(),z(),"drive"==e&&null!=l.parentNode&&l.parentNode.removeChild(l))}))}else z();f.appendChild(A)}d=null!=d?d:2;var g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";g.style.paddingTop="0px";g.style.paddingBottom="20px";var e=a.addLanguageMenu(g,!0);null!=e&&(e.style.bottom=parseInt("28px")-3+"px");if(!a.isOffline()&&1<a.getServiceCount()){e=document.createElement("a");e.setAttribute("href","https://about.draw.io/support/");e.setAttribute("title",
mxResources.get("help"));e.setAttribute("target","_blank");e.style.position="absolute";e.style.userSelect="none";e.style.textDecoration="none";e.style.cursor="pointer";e.style.fontSize="12px";e.style.bottom="28px";e.style.left="26px";e.style.color="gray";var k=document.createElement("img");mxUtils.setOpacity(k,50);k.style.height="16px";k.style.width="16px";k.setAttribute("border","0");k.setAttribute("valign","bottom");k.setAttribute("src",Editor.helpImage);k.style.marginRight="2px";e.appendChild(k);
-mxUtils.write(e,mxResources.get("help"));g.appendChild(e)}var l=document.createElement("div");l.style.position="absolute";l.style.cursor="pointer";l.style.fontSize="12px";l.style.bottom="28px";l.style.color="gray";l.style.userSelect="none";mxUtils.write(l,mxResources.get("decideLater"));mxUtils.setPrefixedStyle(l.style,"transform","translate(-50%,0)");l.style.left="50%";a.isOfflineApp()&&(l.style.bottom="28px");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)l.style.marginLeft=
--Math.round(l.clientWidth/2)+"px"};g.appendChild(l);mxEvent.addListener(l,"click",function(){a.hideDialog();var b=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=b});e=document.createElement("div");mxClient.IS_QUIRKS&&(e.style.whiteSpace="nowrap",e.style.cssFloat="left");e.style.border="1px solid #d3d3d3";e.style.borderWidth="1px 0px 1px 0px";e.style.padding="12px 0px 12px 0px";var n=document.createElement("input");n.setAttribute("type",
-"checkbox");n.setAttribute("checked","checked");n.defaultChecked=!0;var q=0,f=document.createElement("div");f.style.paddingTop="2px";e.appendChild(f);var m=document.createElement("p"),k=document.createElement("p");k.style.fontSize="16pt";k.style.padding="0px";k.style.paddingTop="4px";k.style.paddingBottom="16px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,mxResources.get("saveDiagramsTo")+":");g.appendChild(k);var p=function(){q=0;"function"===typeof window.DriveClient&&b(IMAGE_PATH+
+mxUtils.write(e,mxResources.get("help"));g.appendChild(e)}var n=document.createElement("div");n.style.position="absolute";n.style.cursor="pointer";n.style.fontSize="12px";n.style.bottom="28px";n.style.color="gray";n.style.userSelect="none";mxUtils.write(n,mxResources.get("decideLater"));mxUtils.setPrefixedStyle(n.style,"transform","translate(-50%,0)");n.style.left="50%";a.isOfflineApp()&&(n.style.bottom="28px");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)n.style.marginLeft=
+-Math.round(n.clientWidth/2)+"px"};g.appendChild(n);mxEvent.addListener(n,"click",function(){a.hideDialog();var b=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=b});e=document.createElement("div");mxClient.IS_QUIRKS&&(e.style.whiteSpace="nowrap",e.style.cssFloat="left");e.style.border="1px solid #d3d3d3";e.style.borderWidth="1px 0px 1px 0px";e.style.padding="12px 0px 12px 0px";var m=document.createElement("input");m.setAttribute("type",
+"checkbox");m.setAttribute("checked","checked");m.defaultChecked=!0;var t=0,f=document.createElement("div");f.style.paddingTop="2px";e.appendChild(f);var l=document.createElement("p"),k=document.createElement("p");k.style.fontSize="16pt";k.style.padding="0px";k.style.paddingTop="4px";k.style.paddingBottom="16px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,mxResources.get("saveDiagramsTo")+":");g.appendChild(k);var p=function(){t=0;"function"===typeof window.DriveClient&&b(IMAGE_PATH+
"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&b(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");b(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||b(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);StorageDialog.extended&&("function"===typeof window.DropboxClient&&
b(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox"),null!=a.gitHub&&b(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub"),null!=a.gitLab&&b(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab"))};g.appendChild(e);p();k=document.createElement("p");k.style.marginTop="8px";k.style.marginBottom="6px";var u=document.createElement("div");u.style.marginBottom="10px";if(!a.isOfflineApp()){var v=document.createElement("a");
-v.style.color="gray";v.style.fontSize="12px";v.style.cursor="pointer";v.style.userSelect="none";mxUtils.write(v,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");u.appendChild(v);k.appendChild(u);mxEvent.addListener(v,"click",function(a){f.innerHTML="";v.innerHTML="";StorageDialog.extended=!StorageDialog.extended;p();mxUtils.write(v,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");mxEvent.consume(a)})}k.appendChild(n);var t=
-document.createElement("span");t.style.color="gray";t.style.fontSize="12px";t.style.userSelect="none";mxUtils.write(t," "+mxResources.get("rememberThisSetting"));k.appendChild(t);mxUtils.br(k);u=a.getRecent();if(!a.isOfflineApp()&&null!=u&&0<u.length){var x=document.createElement("select");x.style.marginTop="8px";x.style.maxWidth="170px";var y=document.createElement("option");y.setAttribute("value","");y.setAttribute("selected","selected");y.style.textAlign="center";mxUtils.write(y,mxResources.get("openRecent")+
+v.style.color="gray";v.style.fontSize="12px";v.style.cursor="pointer";v.style.userSelect="none";mxUtils.write(v,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");u.appendChild(v);k.appendChild(u);mxEvent.addListener(v,"click",function(a){f.innerHTML="";v.innerHTML="";StorageDialog.extended=!StorageDialog.extended;p();mxUtils.write(v,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");mxEvent.consume(a)})}k.appendChild(m);var q=
+document.createElement("span");q.style.color="gray";q.style.fontSize="12px";q.style.userSelect="none";mxUtils.write(q," "+mxResources.get("rememberThisSetting"));k.appendChild(q);mxUtils.br(k);u=a.getRecent();if(!a.isOfflineApp()&&null!=u&&0<u.length){var x=document.createElement("select");x.style.marginTop="8px";x.style.maxWidth="170px";var y=document.createElement("option");y.setAttribute("value","");y.setAttribute("selected","selected");y.style.textAlign="center";mxUtils.write(y,mxResources.get("openRecent")+
"...");x.appendChild(y);for(y=0;y<u.length;y++)(function(a){var b=a.mode;b==App.MODE_GOOGLE?b="googleDrive":b==App.MODE_ONEDRIVE&&(b="oneDrive");var f=document.createElement("option");f.setAttribute("value",a.id);mxUtils.write(f,a.title+" ("+mxResources.get(b)+")");x.appendChild(f)})(u[y]);k.appendChild(x);mxEvent.addListener(x,"change",function(b){""!=x.value&&a.loadFile(x.value)})}else k.style.marginTop="20px",e.style.padding="30px 0px 26px 0px";Graph.fileSupport&&(u=document.createElement("div"),
u.style.marginBottom="10px",u.style.padding="18px 0px 6px 0px",y=document.createElement("a"),y.style.cursor="pointer",y.style.fontSize="12px",y.style.color="gray",y.style.userSelect="none",mxUtils.write(y,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(y,"click",function(){if(null==a.storageFileInputElt){var b=document.createElement("input");b.setAttribute("type",
-"file");mxEvent.addListener(b,"change",function(){null!=b.files&&(a.hideDialog(),a.openFiles(b.files,!0),b.type="",b.type="file",b.value="")});b.style.display="none";document.body.appendChild(b);a.storageFileInputElt=b}a.storageFileInputElt.click()}),u.appendChild(y),k.appendChild(u),e.style.paddingBottom="4px");e.appendChild(k);mxEvent.addListener(t,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=
-document.documentMode)&&window.setTimeout(function(){null==a.drive&&(m.style.padding="8px",m.style.fontSize="9pt",m.style.marginTop="-14px",m.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",g.appendChild(m))},5E3);this.container=g};
+"file");mxEvent.addListener(b,"change",function(){null!=b.files&&(a.hideDialog(),a.openFiles(b.files,!0),b.type="",b.type="file",b.value="")});b.style.display="none";document.body.appendChild(b);a.storageFileInputElt=b}a.storageFileInputElt.click()}),u.appendChild(y),k.appendChild(u),e.style.paddingBottom="4px");e.appendChild(k);mxEvent.addListener(q,"click",function(a){m.checked=!m.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=
+document.documentMode)&&window.setTimeout(function(){null==a.drive&&(l.style.padding="8px",l.style.fontSize="9pt",l.style.marginTop="-14px",l.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",g.appendChild(l))},5E3);this.container=g};
StorageDialog.extended=!1;
var SplashDialog=function(a){var c=document.createElement("div");c.style.textAlign="center";var d=a.addLanguageMenu(c,!0);null!=d&&(d.style.bottom="19px");d=null;d=a.getServiceCount();if(!a.isOffline()&&1<d){d=document.createElement("a");d.setAttribute("href","https://about.draw.io/support/");d.setAttribute("title",mxResources.get("help"));d.setAttribute("target","_blank");d.style.position="absolute";d.style.fontSize="12px";d.style.textDecoration="none";d.style.cursor="pointer";d.style.bottom="22px";
d.style.left="26px";d.style.color="gray";var b=document.createElement("img");mxUtils.setOpacity(b,50);b.style.height="16px";b.style.width="16px";b.setAttribute("border","0");b.setAttribute("valign","bottom");b.setAttribute("src",Editor.helpImage);b.style.marginRight="2px";d.appendChild(b);mxUtils.write(d,mxResources.get("help"));c.appendChild(d)}d=document.createElement("p");d.style.fontSize="16pt";d.style.padding="0px";d.style.paddingTop="2px";d.style.margin="0px";d.style.color="gray";b=document.createElement("img");
@@ -7867,287 +7871,287 @@ b.setAttribute("border","0");b.setAttribute("align","absmiddle");b.style.width="
mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(e.style.padding="42px 0px 56px 0px",k.style.marginBottom="12px"):(d.appendChild(b),mxUtils.write(d,g),c.appendChild(d),e.style.border="1px solid #d3d3d3",e.style.borderWidth="1px 0px 1px 0px",e.style.padding="18px 0px 24px 0px",k.style.marginBottom="8px");mxClient.IS_QUIRKS&&(e.style.whiteSpace="nowrap",e.style.cssFloat="left");mxClient.IS_QUIRKS&&(k.style.width="340px");mxUtils.write(k,mxResources.get("createNewDiagram"));mxEvent.addListener(k,"click",
function(){a.hideDialog();a.actions.get("new").funct()});e.appendChild(k);mxUtils.br(e);k=document.createElement("button");k.className="geBigButton";k.style.marginBottom="22px";k.style.fontSize="18px";k.style.padding="10px";k.style.width="340px";mxClient.IS_QUIRKS&&(k.style.width="340px");mxUtils.write(k,mxResources.get("openExistingDiagram"));mxEvent.addListener(k,"click",function(){a.actions.get("open").funct()});e.appendChild(k);a.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):a.mode==App.MODE_DROPBOX?
mxResources.get("dropbox"):a.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?mxResources.get("github"):a.mode==App.MODE_GITLAB?mxResources.get("gitlab"):a.mode==App.MODE_TRELLO?mxResources.get("trello"):a.mode==App.MODE_DEVICE?mxResources.get("device"):a.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var d=function(b){k.style.marginBottom="24px";var f=document.createElement("a");f.setAttribute("href","javascript:void(0)");
-f.style.display="inline-block";f.style.marginTop="6px";mxUtils.write(f,mxResources.get("signOut"));k.style.marginBottom="16px";e.style.paddingBottom="18px";mxEvent.addListener(f,"click",function(){a.confirm(mxResources.get("areYouSure"),function(){b()})});e.appendChild(f)},l=null!=a.drive?a.drive.getUsersList():[];if(a.mode==App.MODE_GOOGLE&&0<l.length){d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+":");k.style.marginBottom="16px";e.style.paddingBottom=
-"18px";e.appendChild(d);var n=document.createElement("select");n.style.marginLeft="4px";n.style.width="200px";for(d=0;d<l.length;d++)b=document.createElement("option"),mxUtils.write(b,l[d].displayName),b.value=d,n.appendChild(b),b=document.createElement("option"),b.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(b,"<"+l[d].email+">"),b.setAttribute("disabled","disabled"),n.appendChild(b);b=document.createElement("option");mxUtils.write(b,mxResources.get("addAccount"));b.value=l.length;n.appendChild(b);
-mxEvent.addListener(n,"change",function(){var b=n.value,f=l.length!=b;f&&a.drive.setUser(l[b]);a.drive.authorize(f,function(){a.setMode(App.MODE_GOOGLE);a.hideDialog();a.showSplash()},function(b){a.handleError(b,null,function(){a.hideDialog();a.showSplash()})},!0)});e.appendChild(n)}else a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?d(function(){a.oneDrive.logout()}):a.mode==App.MODE_GITHUB&&null!=a.gitHub?d(function(){a.gitHub.logout();a.openLink("https://www.github.com/logout")}):a.mode==App.MODE_GITLAB&&
+f.style.display="inline-block";f.style.marginTop="6px";mxUtils.write(f,mxResources.get("signOut"));k.style.marginBottom="16px";e.style.paddingBottom="18px";mxEvent.addListener(f,"click",function(){a.confirm(mxResources.get("areYouSure"),function(){b()})});e.appendChild(f)},n=null!=a.drive?a.drive.getUsersList():[];if(a.mode==App.MODE_GOOGLE&&0<n.length){d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+":");k.style.marginBottom="16px";e.style.paddingBottom=
+"18px";e.appendChild(d);var m=document.createElement("select");m.style.marginLeft="4px";m.style.width="200px";for(d=0;d<n.length;d++)b=document.createElement("option"),mxUtils.write(b,n[d].displayName),b.value=d,m.appendChild(b),b=document.createElement("option"),b.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(b,"<"+n[d].email+">"),b.setAttribute("disabled","disabled"),m.appendChild(b);b=document.createElement("option");mxUtils.write(b,mxResources.get("addAccount"));b.value=n.length;m.appendChild(b);
+mxEvent.addListener(m,"change",function(){var b=m.value,f=n.length!=b;f&&a.drive.setUser(n[b]);a.drive.authorize(f,function(){a.setMode(App.MODE_GOOGLE);a.hideDialog();a.showSplash()},function(b){a.handleError(b,null,function(){a.hideDialog();a.showSplash()})},!0)});e.appendChild(m)}else a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?d(function(){a.oneDrive.logout()}):a.mode==App.MODE_GITHUB&&null!=a.gitHub?d(function(){a.gitHub.logout();a.openLink("https://www.github.com/logout")}):a.mode==App.MODE_GITLAB&&
null!=a.gitLab?d(function(){a.gitLab.logout();a.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):a.mode==App.MODE_TRELLO&&null!=a.trello?a.trello.isAuthorized()&&d(function(){a.trello.logout()}):a.mode==App.MODE_DROPBOX&&null!=a.dropbox&&d(function(){a.dropbox.logout();a.openLink("https://www.dropbox.com/logout")});mxUtils.br(e);d=document.createElement("a");d.setAttribute("href","javascript:void(0)");d.style.display="inline-block";d.style.marginTop="8px";mxUtils.write(d,mxResources.get("changeStorage"));
mxEvent.addListener(d,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)});e.appendChild(d)}c.appendChild(e);this.container=c},EmbedDialog=function(a,c,d,b,g,e){b=document.createElement("div");var k=/^https?:\/\//.test(c)||/^mailto:\/\//.test(c);null!=e?mxUtils.write(b,e):mxUtils.write(b,mxResources.get(5E5>c.length?k?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(b);e=document.createElement("div");e.style.position="absolute";e.style.top="30px";e.style.right="30px";
-e.style.color="gray";mxUtils.write(e,a.formatFileSize(c.length));b.appendChild(e);var l=document.createElement("textarea");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.fontFamily="monospace";l.style.wordBreak="break-all";l.style.marginTop="10px";l.style.resize="none";l.style.height="150px";l.style.width="440px";l.style.border="1px solid gray";l.value=mxResources.get("updatingDocument");
-b.appendChild(l);mxUtils.br(b);this.init=function(){window.setTimeout(function(){5E5>c.length?(l.value=c,l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)):(l.setAttribute("readonly","true"),l.value=c.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};e=document.createElement("div");e.style.position="absolute";e.style.bottom="36px";e.style.right="32px";var n=null;!EmbedDialog.showPreviewOption||
-mxClient.IS_CHROMEAPP&&!k||navigator.standalone||!(k||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(n=mxUtils.button(mxResources.get(5E5>c.length?"preview":"openInNewWindow"),function(){var b=5E5>c.length?l.value:c;if(null!=g)g(b);else if(k)try{var f=a.openLink(b);null!=f&&(null==d||0<d)&&window.setTimeout(mxUtils.bind(this,function(){null!=f&&null!=f.location.href&&f.location.href.substring(0,8)!=b.substring(0,8)&&(f.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),
-d||500)}catch(v){a.handleError({message:v.message||mxResources.get("drawingTooLarge")})}else{var e=window.open(),e=null!=e?e.document:null;null!=e?(e.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+c+"</body></html>"),e.close()):a.handleError({message:mxResources.get("errorUpdatingPreview")})}}),n.className="geBtn",e.appendChild(n));if(!k||7500<c.length){var q=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();
-a.saveData("embed.txt","txt",c,"text/plain")});q.className="geBtn";e.appendChild(q)}if(k&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>c.length){var f=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(l.value);a.openLink(b)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),q=document.createElement("img");q.setAttribute("src",Editor.facebookImage);q.setAttribute("width","18");q.setAttribute("height","18");q.setAttribute("border",
-"0");f.appendChild(q);f.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");f.style.verticalAlign="bottom";f.style.paddingTop="4px";f.style.minWidth="46px";f.className="geBtn";e.appendChild(f)}7168>c.length&&(f=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(l.value);a.openLink(b)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),
-q=document.createElement("img"),q.setAttribute("src",Editor.tweetImage),q.setAttribute("width","18"),q.setAttribute("height","18"),q.setAttribute("border","0"),q.style.marginBottom="5px",f.appendChild(q),f.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),f.style.verticalAlign="bottom",f.style.paddingTop="4px",f.style.minWidth="46px",f.className="geBtn",e.appendChild(f))}q=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.appendChild(q);f=mxUtils.button(mxResources.get("copy"),
-function(){l.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>c.length?mxClient.IS_SF||null!=document.documentMode?q.className="geBtn gePrimaryBtn":(e.appendChild(f),f.className="geBtn gePrimaryBtn",q.className="geBtn"):(e.appendChild(n),q.className="geBtn",n.className="geBtn gePrimaryBtn");b.appendChild(e);this.container=b};
+e.style.color="gray";mxUtils.write(e,a.formatFileSize(c.length));b.appendChild(e);var n=document.createElement("textarea");n.setAttribute("autocomplete","off");n.setAttribute("autocorrect","off");n.setAttribute("autocapitalize","off");n.setAttribute("spellcheck","false");n.style.fontFamily="monospace";n.style.wordBreak="break-all";n.style.marginTop="10px";n.style.resize="none";n.style.height="150px";n.style.width="440px";n.style.border="1px solid gray";n.value=mxResources.get("updatingDocument");
+b.appendChild(n);mxUtils.br(b);this.init=function(){window.setTimeout(function(){5E5>c.length?(n.value=c,n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)):(n.setAttribute("readonly","true"),n.value=c.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};e=document.createElement("div");e.style.position="absolute";e.style.bottom="36px";e.style.right="32px";var m=null;!EmbedDialog.showPreviewOption||
+mxClient.IS_CHROMEAPP&&!k||navigator.standalone||!(k||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(m=mxUtils.button(mxResources.get(5E5>c.length?"preview":"openInNewWindow"),function(){var b=5E5>c.length?n.value:c;if(null!=g)g(b);else if(k)try{var f=a.openLink(b);null!=f&&(null==d||0<d)&&window.setTimeout(mxUtils.bind(this,function(){null!=f&&null!=f.location.href&&f.location.href.substring(0,8)!=b.substring(0,8)&&(f.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),
+d||500)}catch(v){a.handleError({message:v.message||mxResources.get("drawingTooLarge")})}else{var e=window.open(),e=null!=e?e.document:null;null!=e?(e.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+c+"</body></html>"),e.close()):a.handleError({message:mxResources.get("errorUpdatingPreview")})}}),m.className="geBtn",e.appendChild(m));if(!k||7500<c.length){var t=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();
+a.saveData("embed.txt","txt",c,"text/plain")});t.className="geBtn";e.appendChild(t)}if(k&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>c.length){var f=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(n.value);a.openLink(b)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),t=document.createElement("img");t.setAttribute("src",Editor.facebookImage);t.setAttribute("width","18");t.setAttribute("height","18");t.setAttribute("border",
+"0");f.appendChild(t);f.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");f.style.verticalAlign="bottom";f.style.paddingTop="4px";f.style.minWidth="46px";f.className="geBtn";e.appendChild(f)}7168>c.length&&(f=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(n.value);a.openLink(b)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),
+t=document.createElement("img"),t.setAttribute("src",Editor.tweetImage),t.setAttribute("width","18"),t.setAttribute("height","18"),t.setAttribute("border","0"),t.style.marginBottom="5px",f.appendChild(t),f.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),f.style.verticalAlign="bottom",f.style.paddingTop="4px",f.style.minWidth="46px",f.className="geBtn",e.appendChild(f))}t=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.appendChild(t);f=mxUtils.button(mxResources.get("copy"),
+function(){n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>c.length?mxClient.IS_SF||null!=document.documentMode?t.className="geBtn gePrimaryBtn":(e.appendChild(f),f.className="geBtn gePrimaryBtn",t.className="geBtn"):(e.appendChild(m),t.className="geBtn",m.className="geBtn gePrimaryBtn");b.appendChild(e);this.container=b};
EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(a,c){function d(){var a=null!=C&&null!=C.getTitle()?C.getTitle():this.defaultFilename;if(z.checked&&""!=p.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(p.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<B.length&&(b+="&s="+B);""!=u.value&&"0"!=u.value&&(b+="&border="+u.value);""!=m.value&&(b+="&height="+m.value);b+="&pan="+(v.checked?"1":"0");b+="&zoom="+(t.checked?"1":"0");b+="&fit="+(I.checked?"1":"0");
-b+="&resize="+(D.checked?"1":"0");b+="&x0="+Number(f.value);b+="&y0="+n;g.mathEnabled&&(b+="&math=1");y.checked?b+="&edit=_blank":x.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));q.value=b}else C.constructor==DriveFile||C.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=p.value?b+=encodeURIComponent(mxUtils.htmlEntities(p.value))+"&type=3":(b+=C.getHash().substring(1),b=C.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=
-a&&(b+="&title="+encodeURIComponent(a)),""!=m.value&&(a=parseInt(m.value)+parseInt(f.value),b+="&height="+a),q.value=b):q.value=""}var b=document.createElement("div"),g=a.editor.graph,e=g.getGraphBounds(),k=g.view.scale,l=Math.floor(e.x/k-g.view.translate.x),n=Math.floor(e.y/k-g.view.translate.y);mxUtils.write(b,mxResources.get("googleGadget")+":");mxUtils.br(b);var q=document.createElement("input");q.setAttribute("type","text");q.style.marginBottom="8px";q.style.marginTop="2px";q.style.width="410px";
-b.appendChild(q);mxUtils.br(b);this.init=function(){q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};mxUtils.write(b,mxResources.get("top")+":");var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","4");f.style.marginRight="16px";f.style.marginLeft="4px";f.value=l;b.appendChild(f);mxUtils.write(b,mxResources.get("height")+":");var m=document.createElement("input");m.setAttribute("type",
-"text");m.setAttribute("size","4");m.style.marginLeft="4px";m.value=Math.ceil(e.height/k);b.appendChild(m);mxUtils.br(b);e=document.createElement("hr");e.setAttribute("size","1");e.style.marginBottom="16px";e.style.marginTop="16px";b.appendChild(e);mxUtils.write(b,mxResources.get("publicDiagramUrl")+":");mxUtils.br(b);var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","28");p.style.marginBottom="8px";p.style.marginTop="2px";p.style.width="410px";p.value=c||"";
-b.appendChild(p);mxUtils.br(b);mxUtils.write(b,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.setAttribute("size","3");u.style.marginBottom="8px";u.style.marginLeft="4px";u.value="0";b.appendChild(u);mxUtils.br(b);var v=document.createElement("input");v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="16px";b.appendChild(v);mxUtils.write(b,mxResources.get("pan")+" ");var t=document.createElement("input");
-t.setAttribute("type","checkbox");t.setAttribute("checked","checked");t.defaultChecked=!0;t.style.marginLeft="8px";b.appendChild(t);mxUtils.write(b,mxResources.get("zoom")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";x.setAttribute("title",window.location.href);b.appendChild(x);mxUtils.write(b,mxResources.get("edit")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";b.appendChild(y);mxUtils.write(b,
+var GoogleSitesDialog=function(a,c){function d(){var a=null!=C&&null!=C.getTitle()?C.getTitle():this.defaultFilename;if(z.checked&&""!=p.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(p.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<B.length&&(b+="&s="+B);""!=u.value&&"0"!=u.value&&(b+="&border="+u.value);""!=l.value&&(b+="&height="+l.value);b+="&pan="+(v.checked?"1":"0");b+="&zoom="+(q.checked?"1":"0");b+="&fit="+(I.checked?"1":"0");
+b+="&resize="+(D.checked?"1":"0");b+="&x0="+Number(f.value);b+="&y0="+m;g.mathEnabled&&(b+="&math=1");y.checked?b+="&edit=_blank":x.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));t.value=b}else C.constructor==DriveFile||C.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=p.value?b+=encodeURIComponent(mxUtils.htmlEntities(p.value))+"&type=3":(b+=C.getHash().substring(1),b=C.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=
+a&&(b+="&title="+encodeURIComponent(a)),""!=l.value&&(a=parseInt(l.value)+parseInt(f.value),b+="&height="+a),t.value=b):t.value=""}var b=document.createElement("div"),g=a.editor.graph,e=g.getGraphBounds(),k=g.view.scale,n=Math.floor(e.x/k-g.view.translate.x),m=Math.floor(e.y/k-g.view.translate.y);mxUtils.write(b,mxResources.get("googleGadget")+":");mxUtils.br(b);var t=document.createElement("input");t.setAttribute("type","text");t.style.marginBottom="8px";t.style.marginTop="2px";t.style.width="410px";
+b.appendChild(t);mxUtils.br(b);this.init=function(){t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};mxUtils.write(b,mxResources.get("top")+":");var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","4");f.style.marginRight="16px";f.style.marginLeft="4px";f.value=n;b.appendChild(f);mxUtils.write(b,mxResources.get("height")+":");var l=document.createElement("input");l.setAttribute("type",
+"text");l.setAttribute("size","4");l.style.marginLeft="4px";l.value=Math.ceil(e.height/k);b.appendChild(l);mxUtils.br(b);e=document.createElement("hr");e.setAttribute("size","1");e.style.marginBottom="16px";e.style.marginTop="16px";b.appendChild(e);mxUtils.write(b,mxResources.get("publicDiagramUrl")+":");mxUtils.br(b);var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","28");p.style.marginBottom="8px";p.style.marginTop="2px";p.style.width="410px";p.value=c||"";
+b.appendChild(p);mxUtils.br(b);mxUtils.write(b,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.setAttribute("size","3");u.style.marginBottom="8px";u.style.marginLeft="4px";u.value="0";b.appendChild(u);mxUtils.br(b);var v=document.createElement("input");v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="16px";b.appendChild(v);mxUtils.write(b,mxResources.get("pan")+" ");var q=document.createElement("input");
+q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="8px";b.appendChild(q);mxUtils.write(b,mxResources.get("zoom")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";x.setAttribute("title",window.location.href);b.appendChild(x);mxUtils.write(b,mxResources.get("edit")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";b.appendChild(y);mxUtils.write(b,
mxResources.get("asNew")+" ");mxUtils.br(b);var D=document.createElement("input");D.setAttribute("type","checkbox");D.setAttribute("checked","checked");D.defaultChecked=!0;D.style.marginLeft="16px";b.appendChild(D);mxUtils.write(b,mxResources.get("resize")+" ");var I=document.createElement("input");I.setAttribute("type","checkbox");I.style.marginLeft="8px";b.appendChild(I);mxUtils.write(b,mxResources.get("fit")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft=
-"8px";b.appendChild(z);mxUtils.write(b,mxResources.get("embed")+" ");var B=a.getBasenames().join(";"),C=a.getCurrentFile();mxEvent.addListener(v,"change",d);mxEvent.addListener(t,"change",d);mxEvent.addListener(D,"change",d);mxEvent.addListener(I,"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(y,"change",d);mxEvent.addListener(z,"change",d);mxEvent.addListener(m,"change",d);mxEvent.addListener(f,"change",d);mxEvent.addListener(u,"change",d);mxEvent.addListener(p,"change",d);d();
-mxEvent.addListener(q,"click",function(){q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)});e=document.createElement("div");e.style.paddingTop="12px";e.style.textAlign="right";k=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.className="geBtn gePrimaryBtn";e.appendChild(k);b.appendChild(e);this.container=b},CreateGraphDialog=function(a,c,d){var b=document.createElement("div");b.style.textAlign=
+"8px";b.appendChild(z);mxUtils.write(b,mxResources.get("embed")+" ");var B=a.getBasenames().join(";"),C=a.getCurrentFile();mxEvent.addListener(v,"change",d);mxEvent.addListener(q,"change",d);mxEvent.addListener(D,"change",d);mxEvent.addListener(I,"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(y,"change",d);mxEvent.addListener(z,"change",d);mxEvent.addListener(l,"change",d);mxEvent.addListener(f,"change",d);mxEvent.addListener(u,"change",d);mxEvent.addListener(p,"change",d);d();
+mxEvent.addListener(t,"click",function(){t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)});e=document.createElement("div");e.style.paddingTop="12px";e.style.textAlign="right";k=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.className="geBtn gePrimaryBtn";e.appendChild(k);b.appendChild(e);this.container=b},CreateGraphDialog=function(a,c,d){var b=document.createElement("div");b.style.textAlign=
"right";this.init=function(){var c=document.createElement("div");c.style.position="relative";c.style.border="1px solid gray";c.style.width="100%";c.style.height="360px";c.style.overflow="hidden";c.style.marginBottom="16px";mxEvent.disableContextMenu(c);b.appendChild(c);var e=new Graph(c);e.setCellsCloneable(!0);e.setPanning(!0);e.setAllowDanglingEdges(!1);e.connectionHandler.select=!1;e.view.setTranslate(20,20);e.border=20;e.panningHandler.useLeftButtonForPanning=!0;var k="curved=1;";e.cellRenderer.installCellOverlayListeners=
function(a,b,c){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(c.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(c){b.fireEvent(new mxEventObject("pointerdown","event",c,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(c.node,"touchstart",function(c){b.fireEvent(new mxEventObject("pointerdown","event",c,"state",a))})};e.getAllConnectionConstraints=function(){return null};e.connectionHandler.marker.highlight.keepOnTop=
-!1;e.connectionHandler.createEdgeState=function(a){a=e.createEdge(null,null,null,null,null,k);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var l=e.getDefaultParent(),n=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,c){e.connectionHandler.reset();e.clearSelection();var f=e.getCellGeometry(a),d;m(function(){d=e.insertVertex(l,null,"Entry",f.x,f.y,80,30,"rounded=1;");n(d);e.view.refresh(d);
-e.insertEdge(l,null,"",a,d,k)},function(){e.scrollCellToVisible(d)})});b.addListener("pointerdown",function(a,b){var c=b.getProperty("event"),f=b.getProperty("state");e.popupMenuHandler.hideMenu();e.stopEditing(!1);var d=mxUtils.convertPoint(e.container,mxEvent.getClientX(c),mxEvent.getClientY(c));e.connectionHandler.start(f,d.x,d.y);e.isMouseDown=!0;e.isMouseTrigger=mxEvent.isMouseEvent(c);mxEvent.consume(c)});e.addCellOverlay(a,b)});e.getModel().beginUpdate();var q;try{q=e.insertVertex(l,null,"Start",
-0,0,80,30,"ellipse"),n(q)}finally{e.getModel().endUpdate()}var f;"horizontalTree"==d?(f=new mxCompactTreeLayout(e),f.edgeRouting=!1,f.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==d?(f=new mxCompactTreeLayout(e,!1),f.edgeRouting=!1,f.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==d?(f=new mxRadialTreeLayout(e,!1),f.edgeRouting=!1,f.levelDistance=80):"verticalFlow"==d?f=new mxHierarchicalLayout(e,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-d?f=new mxHierarchicalLayout(e,mxConstants.DIRECTION_WEST):"organic"==d?(f=new mxFastOrganicLayout(e,!1),f.forceConstant=80):"circle"==d&&(f=new mxCircleLayout(e));if(null!=f){var m=function(a,b){e.getModel().beginUpdate();try{null!=a&&a(),f.execute(e.getDefaultParent(),q)}catch(D){throw D;}finally{var c=new mxMorphing(e);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){e.getModel().endUpdate();null!=b&&b()}));c.startAnimation()}},p=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
-function(a,b,c,f,d){p.apply(this,arguments);m()};e.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);m()};e.connectionHandler.addListener(mxEvent.CONNECT,function(){m()})}var u=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=c.parentNode&&(e.destroy(),c.parentNode.removeChild(c));a.hideDialog()})});u.className="geBtn";a.editor.cancelFirst&&b.appendChild(u);var v=mxUtils.button(mxResources.get("insert"),function(){e.clearCellOverlays();
+!1;e.connectionHandler.createEdgeState=function(a){a=e.createEdge(null,null,null,null,null,k);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var n=e.getDefaultParent(),m=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,c){e.connectionHandler.reset();e.clearSelection();var f=e.getCellGeometry(a),d;l(function(){d=e.insertVertex(n,null,"Entry",f.x,f.y,80,30,"rounded=1;");m(d);e.view.refresh(d);
+e.insertEdge(n,null,"",a,d,k)},function(){e.scrollCellToVisible(d)})});b.addListener("pointerdown",function(a,b){var c=b.getProperty("event"),f=b.getProperty("state");e.popupMenuHandler.hideMenu();e.stopEditing(!1);var d=mxUtils.convertPoint(e.container,mxEvent.getClientX(c),mxEvent.getClientY(c));e.connectionHandler.start(f,d.x,d.y);e.isMouseDown=!0;e.isMouseTrigger=mxEvent.isMouseEvent(c);mxEvent.consume(c)});e.addCellOverlay(a,b)});e.getModel().beginUpdate();var t;try{t=e.insertVertex(n,null,"Start",
+0,0,80,30,"ellipse"),m(t)}finally{e.getModel().endUpdate()}var f;"horizontalTree"==d?(f=new mxCompactTreeLayout(e),f.edgeRouting=!1,f.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==d?(f=new mxCompactTreeLayout(e,!1),f.edgeRouting=!1,f.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==d?(f=new mxRadialTreeLayout(e,!1),f.edgeRouting=!1,f.levelDistance=80):"verticalFlow"==d?f=new mxHierarchicalLayout(e,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
+d?f=new mxHierarchicalLayout(e,mxConstants.DIRECTION_WEST):"organic"==d?(f=new mxFastOrganicLayout(e,!1),f.forceConstant=80):"circle"==d&&(f=new mxCircleLayout(e));if(null!=f){var l=function(a,b){e.getModel().beginUpdate();try{null!=a&&a(),f.execute(e.getDefaultParent(),t)}catch(D){throw D;}finally{var c=new mxMorphing(e);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){e.getModel().endUpdate();null!=b&&b()}));c.startAnimation()}},p=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
+function(a,b,c,f,d){p.apply(this,arguments);l()};e.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);l()};e.connectionHandler.addListener(mxEvent.CONNECT,function(){l()})}var u=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=c.parentNode&&(e.destroy(),c.parentNode.removeChild(c));a.hideDialog()})});u.className="geBtn";a.editor.cancelFirst&&b.appendChild(u);var v=mxUtils.button(mxResources.get("insert"),function(){e.clearCellOverlays();
var b=a.editor.graph.getFreeInsertPoint(),b=a.editor.graph.importCells(e.getModel().getChildren(e.getDefaultParent()),b.x,b.y),f=a.editor.graph.view,d=f.getBounds(b);d.x-=f.translate.x;d.y-=f.translate.y;a.editor.graph.scrollRectToVisible(d);a.editor.graph.setSelectionCells(b);null!=c.parentNode&&(e.destroy(),c.parentNode.removeChild(c));a.hideDialog()});b.appendChild(v);v.className="geBtn gePrimaryBtn";a.editor.cancelFirst||b.appendChild(u)};this.container=b};
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":
IMAGE_PATH+"/handle-connect.png",26,26);
var BackgroundImageDialog=function(a,c){var d=document.createElement("div");d.style.whiteSpace="nowrap";var b=document.createElement("h2");mxUtils.write(b,mxResources.get("backgroundImage"));b.style.marginTop="0px";d.appendChild(b);mxUtils.write(d,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(d);var b=a.editor.graph.backgroundImage,g=document.createElement("input");g.setAttribute("type","text");g.style.marginTop="4px";g.style.marginBottom="4px";g.style.width="350px";g.value=
-null!=b?b.src:"";var e=!1,k=function(){e||""==g.value||a.isOffline()?(l.value="",n.value=""):a.loadImage(mxUtils.trim(g.value),function(a){l.value=a.width;n.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));g.value="";l.value="";n.value=""})};this.init=function(){g.focus();if(Graph.fileSupport){g.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=d.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=
-c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(f){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxBackgroundSize,function(a,b,c,f,d,m){g.value=a;k()},function(){},
-function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0,a.maxBackgroundBytes,a.maxBackgroundBytes);else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var f=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(f)&&(g.value=decodeURIComponent(f),k())}b.stopPropagation();b.preventDefault()}),!1)}};d.appendChild(g);mxUtils.br(d);mxUtils.br(d);mxUtils.write(d,mxResources.get("width")+":");var l=document.createElement("input");
-l.setAttribute("type","text");l.style.width="60px";l.style.marginLeft="4px";l.style.marginRight="16px";l.value=null!=b?b.width:"";d.appendChild(l);mxUtils.write(d,mxResources.get("height")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="16px";n.value=null!=b?b.height:"";d.appendChild(n);b=mxUtils.button(mxResources.get("reset"),function(){g.value="";l.value="";n.value="";e=!1});mxEvent.addListener(b,"mousedown",
-function(){e=!0});mxEvent.addListener(b,"touchstart",function(){e=!0});b.className="geBtn";b.width="100";d.appendChild(b);mxUtils.br(d);mxEvent.addListener(g,"change",k);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(g.value=a.url,k()));g.focus()};b=document.createElement("div");b.style.marginTop="40px";b.style.textAlign="right";var q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
-q.className="geBtn";a.editor.cancelFirst&&b.appendChild(q);if(!a.isOffline()&&"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top){var f=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)});
+null!=b?b.src:"";var e=!1,k=function(){e||""==g.value||a.isOffline()?(n.value="",m.value=""):a.loadImage(mxUtils.trim(g.value),function(a){n.value=a.width;m.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));g.value="";n.value="";m.value=""})};this.init=function(){g.focus();if(Graph.fileSupport){g.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=d.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=
+c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(f){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxBackgroundSize,function(a,b,c,f,d,l){g.value=a;k()},function(){},
+function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0,a.maxBackgroundBytes,a.maxBackgroundBytes);else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var f=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(f)&&(g.value=decodeURIComponent(f),k())}b.stopPropagation();b.preventDefault()}),!1)}};d.appendChild(g);mxUtils.br(d);mxUtils.br(d);mxUtils.write(d,mxResources.get("width")+":");var n=document.createElement("input");
+n.setAttribute("type","text");n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="16px";n.value=null!=b?b.width:"";d.appendChild(n);mxUtils.write(d,mxResources.get("height")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="16px";m.value=null!=b?b.height:"";d.appendChild(m);b=mxUtils.button(mxResources.get("reset"),function(){g.value="";n.value="";m.value="";e=!1});mxEvent.addListener(b,"mousedown",
+function(){e=!0});mxEvent.addListener(b,"touchstart",function(){e=!0});b.className="geBtn";b.width="100";d.appendChild(b);mxUtils.br(d);mxEvent.addListener(g,"change",k);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(g.value=a.url,k()));g.focus()};b=document.createElement("div");b.style.marginTop="40px";b.style.textAlign="right";var t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
+t.className="geBtn";a.editor.cancelFirst&&b.appendChild(t);if(!a.isOffline()&&"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top){var f=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)});
f.className="geBtn";b.appendChild(f);null!=a.drive&&"1"==urlParams.photos&&(f=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(a.drive.token).addView(google.picker.ViewId.PHOTO_UPLOAD);a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),
-f.className="geBtn",b.appendChild(f))}f=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c(""!=g.value?new mxImage(mxUtils.trim(g.value),l.value,n.value):null)});f.className="geBtn gePrimaryBtn";b.appendChild(f);a.editor.cancelFirst||b.appendChild(q);d.appendChild(b);this.container=d},ParseDialog=function(a,c,d){function b(b,c){var f=b.split("\n");if("plantUmlPng"==c||"plantUmlSvg"==c||"plantUmlTxt"==c){if(a.spinner.spin(document.body,mxResources.get("inserting"))){var d=a.editor.graph,
-m="plantUmlTxt"==c?"txt":"plantUmlPng"==c?"png":"svg";a.generatePlantUmlImage(b,m,function(f,c,p){a.spinner.stop();var g=null;d.getModel().beginUpdate();try{g="txt"==m?a.insertAsPreText(f,e.x,e.y):d.insertVertex(null,null,null,e.x,e.y,c,p,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(f)+";"),d.setAttributeForCell(g,"plantUmlData",JSON.stringify({data:b,format:m}))}finally{d.getModel().endUpdate()}null!=g&&(d.setSelectionCell(g),d.scrollCellToVisible(g))},
+f.className="geBtn",b.appendChild(f))}f=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c(""!=g.value?new mxImage(mxUtils.trim(g.value),n.value,m.value):null)});f.className="geBtn gePrimaryBtn";b.appendChild(f);a.editor.cancelFirst||b.appendChild(t);d.appendChild(b);this.container=d},ParseDialog=function(a,c,d){function b(b,c){var f=b.split("\n");if("plantUmlPng"==c||"plantUmlSvg"==c||"plantUmlTxt"==c){if(a.spinner.spin(document.body,mxResources.get("inserting"))){var d=a.editor.graph,
+l="plantUmlTxt"==c?"txt":"plantUmlPng"==c?"png":"svg";a.generatePlantUmlImage(b,l,function(f,c,p){a.spinner.stop();var g=null;d.getModel().beginUpdate();try{g="txt"==l?a.insertAsPreText(f,e.x,e.y):d.insertVertex(null,null,null,e.x,e.y,c,p,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(f)+";"),d.setAttributeForCell(g,"plantUmlData",JSON.stringify({data:b,format:l}))}finally{d.getModel().endUpdate()}null!=g&&(d.setSelectionCell(g),d.scrollCellToVisible(g))},
function(b){a.handleError(b)})}}else if("table"==c){for(var p=null,g=[],k=0,z=0;z<f.length;z++){var u=mxUtils.trim(f[z]);if("create table"==u.substring(0,12).toLowerCase())u=mxUtils.trim(u.substring(12)),"("==u.charAt(u.length-1)&&(u=u.substring(0,u.lastIndexOf(" "))),p=new mxCell(u,new mxGeometry(k,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;"),
-p.vertex=!0,g.push(p),u=a.editor.graph.getPreferredSizeForCell(A),null!=u&&(p.geometry.width=u.width+10);else if(null!=p&&")"==u.charAt(0))k+=p.geometry.width+40,p=null;else if("("!=u&&null!=p&&(u=u.substring(0,","==u.charAt(u.length-1)?u.length-1:u.length),"primary key"!=u.substring(0,11).toLowerCase())){var l=u.toLowerCase().indexOf("primary key"),u=u.replace(/primary key/i,""),A=new mxCell(u,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;");
-A.vertex=!0;u=sb.cloneCell(A,0<l?"PK":"");u.connectable=!1;u.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;";u.geometry.width=30;u.geometry.height=26;A.insert(u);u=a.editor.graph.getPreferredSizeForCell(A);null!=u&&p.geometry.width<u.width+10&&(p.geometry.width=Math.min(220,u.width+10));p.insert(A);p.geometry.height+=26}}0<g.length&&(d=a.editor.graph,
+p.vertex=!0,g.push(p),u=a.editor.graph.getPreferredSizeForCell(A),null!=u&&(p.geometry.width=u.width+10);else if(null!=p&&")"==u.charAt(0))k+=p.geometry.width+40,p=null;else if("("!=u&&null!=p&&(u=u.substring(0,","==u.charAt(u.length-1)?u.length-1:u.length),"primary key"!=u.substring(0,11).toLowerCase())){var n=u.toLowerCase().indexOf("primary key"),u=u.replace(/primary key/i,""),A=new mxCell(u,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;");
+A.vertex=!0;u=sb.cloneCell(A,0<n?"PK":"");u.connectable=!1;u.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;";u.geometry.width=30;u.geometry.height=26;A.insert(u);u=a.editor.graph.getPreferredSizeForCell(A);null!=u&&p.geometry.width<u.width+10&&(p.geometry.width=Math.min(220,u.width+10));p.insert(A);p.geometry.height+=26}}0<g.length&&(d=a.editor.graph,
z=d.view,f=d.getGraphBounds(),d.setSelectionCells(d.importCells(g,Math.ceil(Math.max(0,f.x/z.scale-z.translate.x)+4*d.gridSize),Math.ceil(Math.max(0,(f.y+f.height)/z.scale-z.translate.y)+4*d.gridSize))),d.scrollCellToVisible(d.getSelectionCell()))}else if("list"==c){if(0<f.length){d=a.editor.graph;A=null;g=[];for(z=p=0;z<f.length;z++)";"!=f[z].charAt(0)&&(0==f[z].length?A=null:null==A?(A=new mxCell(f[z],new mxGeometry(p,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),
A.vertex=!0,g.push(A),u=d.getPreferredSizeForCell(A),null!=u&&A.geometry.width<u.width+10&&(A.geometry.width=u.width+10),p+=A.geometry.width+40):"--"==f[z]?(u=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),u.vertex=!0,A.geometry.height+=u.geometry.height,A.insert(u)):0<f[z].length&&(k=new mxCell(f[z],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
k.vertex=!0,u=d.getPreferredSizeForCell(k),null!=u&&k.geometry.width<u.width&&(k.geometry.width=u.width),A.geometry.width=Math.max(A.geometry.width,k.geometry.width),A.geometry.height+=k.geometry.height,A.insert(k)));if(0<g.length){d.getModel().beginUpdate();try{g=d.importCells(g,e.x,e.y);u=[];for(z=0;z<g.length;z++)u.push(g[z]),u=u.concat(g[z].children);d.fireEvent(new mxEventObject("cellsInserted","cells",u))}finally{d.getModel().endUpdate()}d.setSelectionCells(g);d.scrollCellToVisible(d.getSelectionCell())}}}else{for(var A=
-function(a){var b=n[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,n[a]=b,g.push(b));return b},n={},g=[],z=0;z<f.length;z++)if(";"!=f[z].charAt(0)){var q=f[z].split("->");if(2<=q.length){var l=A(q[0]),J=A(q[q.length-1]),q=new mxCell(2<q.length?q[1]:"",new mxGeometry);q.edge=!0;l.insertEdge(q,!0);J.insertEdge(q,!1);g.push(q)}}if(0<g.length){f=document.createElement("div");f.style.visibility="hidden";document.body.appendChild(f);d=new Graph(f);d.getModel().beginUpdate();
+function(a){var b=m[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,m[a]=b,g.push(b));return b},m={},g=[],z=0;z<f.length;z++)if(";"!=f[z].charAt(0)){var F=f[z].split("->");if(2<=F.length){var n=A(F[0]),t=A(F[F.length-1]),F=new mxCell(2<F.length?F[1]:"",new mxGeometry);F.edge=!0;n.insertEdge(F,!0);t.insertEdge(F,!1);g.push(F)}}if(0<g.length){f=document.createElement("div");f.style.visibility="hidden";document.body.appendChild(f);d=new Graph(f);d.getModel().beginUpdate();
try{g=d.importCells(g);for(z=0;z<g.length;z++)d.getModel().isVertex(g[z])&&(u=d.getPreferredSizeForCell(g[z]),g[z].geometry.width=Math.max(g[z].geometry.width,u.width),g[z].geometry.height=Math.max(g[z].geometry.height,u.height));p=new mxFastOrganicLayout(d);p.disableEdgeStyle=!1;p.forceConstant=120;p.execute(d.getDefaultParent());k=new mxParallelEdgeLayout(d);k.spacing=20;k.execute(d.getDefaultParent())}finally{d.getModel().endUpdate()}d.clearCellOverlays();u=[];a.editor.graph.getModel().beginUpdate();
-try{u=a.editor.graph.importCells(d.getModel().getChildren(d.getDefaultParent()),e.x,e.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",u))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(u);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());d.destroy();f.parentNode.removeChild(f)}}}function g(){return"list"==l.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":
-"table"==l.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==l.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":
-"plantUmlSvg"==l.value||"plantUmlTxt"==l.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var e=a.editor.graph.getFreeInsertPoint();c=document.createElement("div");c.style.textAlign="right";var k=document.createElement("textarea");k.style.resize="none";k.style.width="100%";k.style.height=
-"354px";k.style.marginBottom="16px";var l=document.createElement("select");"formatSql"==d&&(l.style.display="none");var n=document.createElement("option");n.setAttribute("value","list");mxUtils.write(n,mxResources.get("list"));"plantUml"!=d&&l.appendChild(n);null!=d&&"fromText"!=d||n.setAttribute("selected","selected");n=document.createElement("option");n.setAttribute("value","table");mxUtils.write(n,mxResources.get("formatSql"));"formatSql"==d&&(l.appendChild(n),n.setAttribute("selected","selected"));
-n=document.createElement("option");n.setAttribute("value","diagram");mxUtils.write(n,mxResources.get("diagram"));"plantUml"!=d&&l.appendChild(n);n=document.createElement("option");n.setAttribute("value","plantUmlSvg");mxUtils.write(n,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==d&&n.setAttribute("selected","selected");var q=document.createElement("option");q.setAttribute("value","plantUmlPng");mxUtils.write(q,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+
-")");var f=document.createElement("option");f.setAttribute("value","plantUmlTxt");mxUtils.write(f,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==d&&(l.appendChild(n),l.appendChild(q),l.appendChild(f));var m=g();k.value=m;c.appendChild(k);this.init=function(){k.focus()};Graph.fileSupport&&(k.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),k.addEventListener("drop",function(a){a.stopPropagation();
-a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];var b=new FileReader;b.onload=function(a){k.value=a.target.result};b.readAsText(a)}},!1));c.appendChild(l);mxEvent.addListener(l,"change",function(){var a=g();if(0==k.value.length||k.value==m)m=a,k.value=m});d=mxUtils.button(mxResources.get("close"),function(){k.value==m?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});d.className="geBtn";a.editor.cancelFirst&&c.appendChild(d);n=mxUtils.button(mxResources.get("insert"),
-function(){a.hideDialog();b(k.value,l.value)});c.appendChild(n);n.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(d);this.container=c},NewDialog=function(a,c,d,b,g,e,k,l,n,q,f,m,p,u,v,t,x){function y(){var a=!0;if(null!=S)for(;J<S.length&&(a||0!=mxUtils.mod(J,30));)a=S[J++],z(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick,a.preview,a.noImg,a.clibs),a=!1}function D(){if(U)d||a.hideDialog(),u(U,Z,F.value);else if(b)d||a.hideDialog(),b(ca,F.value);
-else{var f=F.value;null!=f&&0<f.length&&a.pickFolder(a.mode,function(b){a.createFile(f,ca,null!=X&&0<X.length?X:null,null,function(){a.hideDialog()},null,b,null,null!=ga&&0<ga.length?ga:null)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function I(a,b,f,c,d,m){null!=ea&&(ea.style.backgroundColor="transparent",ea.style.border="1px solid transparent");E.removeAttribute("disabled");ca=b;X=f;ga=m;ea=a;U=c;Z=d;ea.style.backgroundColor=l;ea.style.border=n}function z(b,f,c,d,m,
-p,g,e,t,k,z){var A=document.createElement("div");A.className="geTemplate";A.style.height=aa+"px";A.style.width=fa+"px";null!=d&&0<d.length&&A.setAttribute("title",d);if(null!=p)A.style.backgroundImage="url("+p+")",A.style.backgroundSize="contain",A.style.backgroundPosition="center center",A.style.backgroundRepeat="no-repeat",mxEvent.addListener(A,"click",function(a){I(A,null,null,b,g,z)}),mxEvent.addListener(A,"dblclick",function(a){D()});else if(!k&&null!=b&&0<b.length){c=t||TEMPLATE_PATH+"/"+b.substring(0,
+try{u=a.editor.graph.importCells(d.getModel().getChildren(d.getDefaultParent()),e.x,e.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",u))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(u);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());d.destroy();f.parentNode.removeChild(f)}}}function g(){return"list"==n.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":
+"table"==n.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==n.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":
+"plantUmlSvg"==n.value||"plantUmlTxt"==n.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var e=a.editor.graph.getFreeInsertPoint();c=document.createElement("div");c.style.textAlign="right";var k=document.createElement("textarea");k.style.resize="none";k.style.width="100%";k.style.height=
+"354px";k.style.marginBottom="16px";var n=document.createElement("select");"formatSql"==d&&(n.style.display="none");var m=document.createElement("option");m.setAttribute("value","list");mxUtils.write(m,mxResources.get("list"));"plantUml"!=d&&n.appendChild(m);null!=d&&"fromText"!=d||m.setAttribute("selected","selected");m=document.createElement("option");m.setAttribute("value","table");mxUtils.write(m,mxResources.get("formatSql"));"formatSql"==d&&(n.appendChild(m),m.setAttribute("selected","selected"));
+m=document.createElement("option");m.setAttribute("value","diagram");mxUtils.write(m,mxResources.get("diagram"));"plantUml"!=d&&n.appendChild(m);m=document.createElement("option");m.setAttribute("value","plantUmlSvg");mxUtils.write(m,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==d&&m.setAttribute("selected","selected");var t=document.createElement("option");t.setAttribute("value","plantUmlPng");mxUtils.write(t,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+
+")");var f=document.createElement("option");f.setAttribute("value","plantUmlTxt");mxUtils.write(f,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==d&&(n.appendChild(m),n.appendChild(t),n.appendChild(f));var l=g();k.value=l;c.appendChild(k);this.init=function(){k.focus()};Graph.fileSupport&&(k.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),k.addEventListener("drop",function(a){a.stopPropagation();
+a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];var b=new FileReader;b.onload=function(a){k.value=a.target.result};b.readAsText(a)}},!1));c.appendChild(n);mxEvent.addListener(n,"change",function(){var a=g();if(0==k.value.length||k.value==l)l=a,k.value=l});d=mxUtils.button(mxResources.get("close"),function(){k.value==l?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});d.className="geBtn";a.editor.cancelFirst&&c.appendChild(d);m=mxUtils.button(mxResources.get("insert"),
+function(){a.hideDialog();b(k.value,n.value)});c.appendChild(m);m.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(d);this.container=c},NewDialog=function(a,c,d,b,g,e,k,n,m,t,f,l,p,u,v,q,x){function y(){var a=!0;if(null!=S)for(;J<S.length&&(a||0!=mxUtils.mod(J,30));)a=S[J++],z(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick,a.preview,a.noImg,a.clibs),a=!1}function D(){if(U)d||a.hideDialog(),u(U,Z,F.value);else if(b)d||a.hideDialog(),b(ca,F.value);
+else{var f=F.value;null!=f&&0<f.length&&a.pickFolder(a.mode,function(b){a.createFile(f,ca,null!=X&&0<X.length?X:null,null,function(){a.hideDialog()},null,b,null,null!=ga&&0<ga.length?ga:null)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function I(a,b,f,c,d,l){null!=ea&&(ea.style.backgroundColor="transparent",ea.style.border="1px solid transparent");E.removeAttribute("disabled");ca=b;X=f;ga=l;ea=a;U=c;Z=d;ea.style.backgroundColor=n;ea.style.border=m}function z(b,f,c,d,l,
+p,g,e,q,k,z){var A=document.createElement("div");A.className="geTemplate";A.style.height=aa+"px";A.style.width=fa+"px";null!=d&&0<d.length&&A.setAttribute("title",d);if(null!=p)A.style.backgroundImage="url("+p+")",A.style.backgroundSize="contain",A.style.backgroundPosition="center center",A.style.backgroundRepeat="no-repeat",mxEvent.addListener(A,"click",function(a){I(A,null,null,b,g,z)}),mxEvent.addListener(A,"dblclick",function(a){D()});else if(!k&&null!=b&&0<b.length){c=q||TEMPLATE_PATH+"/"+b.substring(0,
b.length-4)+".png";A.style.backgroundImage="url("+c+")";A.style.backgroundPosition="center center";A.style.backgroundRepeat="no-repeat";var u=!1;mxEvent.addListener(A,"click",function(c){E.setAttribute("disabled","disabled");A.style.backgroundColor="transparent";A.style.border="1px solid transparent";c=b;c=/^https?:\/\//.test(c)&&!a.editor.isCorsEnabledForUrl(c)?PROXY_URL+"?url="+encodeURIComponent(c):TEMPLATE_PATH+"/"+c;H.spin(P);mxUtils.get(c,mxUtils.bind(this,function(a){H.stop();200<=a.getStatus()&&
-299>=a.getStatus()&&(I(A,a.getText(),f,null,null,z),u&&D())}))});mxEvent.addListener(A,"dblclick",function(a){u=!0})}else A.innerHTML='<table width="100%" height="100%" style="line-height:1em;word-break: break-all;"><tr><td align="center" valign="middle">'+mxResources.get(c,null,c)+"</td></tr></table>",m&&I(A),null!=e?mxEvent.addListener(A,"click",e):(mxEvent.addListener(A,"click",function(a){I(A,null,null,b,g)}),mxEvent.addListener(A,"dblclick",function(a){D()}));P.appendChild(A)}function B(){W&&
+299>=a.getStatus()&&(I(A,a.getText(),f,null,null,z),u&&D())}))});mxEvent.addListener(A,"dblclick",function(a){u=!0})}else A.innerHTML='<table width="100%" height="100%" style="line-height:1em;word-break: break-all;"><tr><td align="center" valign="middle">'+mxResources.get(c,null,c)+"</td></tr></table>",l&&I(A),null!=e?mxEvent.addListener(A,"click",e):(mxEvent.addListener(A,"click",function(a){I(A,null,null,b,g)}),mxEvent.addListener(A,"dblclick",function(a){D()}));P.appendChild(A)}function B(){W&&
(W=!1,mxEvent.addListener(P,"scroll",function(a){P.scrollTop+P.clientHeight>=P.scrollHeight&&(y(),mxEvent.consume(a))}));var a=null;if(0<da){var b=document.createElement("div");b.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(b,mxResources.get("custom"));ba.appendChild(b);for(var c in O){var f=document.createElement("div"),b=c,d=O[c];18<b.length&&(b=b.substring(0,18)+"&hellip;");f.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";
-f.setAttribute("title",b+" ("+d.length+")");mxUtils.write(f,f.getAttribute("title"));null!=q&&(f.style.padding=q);ba.appendChild(f);(function(b,c){mxEvent.addListener(f,"click",function(){a!=c&&(a.style.backgroundColor="",a=c,a.style.backgroundColor=k,P.scrollTop=0,P.innerHTML="",J=0,S=O[b],R=null,y())})})(c,f)}b=document.createElement("div");b.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(b,"draw.io");ba.appendChild(b)}for(c in Q)f=document.createElement("div"),
-b=mxResources.get(c),d=Q[c],null==b&&(b=c.substring(0,1).toUpperCase()+c.substring(1)),18<b.length&&(b=b.substring(0,18)+"&hellip;"),f.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;",f.setAttribute("title",b+" ("+d.length+")"),mxUtils.write(f,f.getAttribute("title")),null!=q&&(f.style.padding=q),ba.appendChild(f),null==a&&0<d.length&&(a=f,a.style.backgroundColor=k,S=d),function(b,c){mxEvent.addListener(f,"click",
-function(){a!=c&&(a.style.backgroundColor="",a=c,a.style.backgroundColor=k,P.scrollTop=0,P.innerHTML="",J=0,S=Q[b],R=null,y())})}(c,f);y()}d=null!=d?d:!0;g=null!=g?g:!1;k=null!=k?k:"#ebf2f9";l=null!=l?l:"#e6eff8";n=null!=n?n:"1px solid #ccd9ea";f=null!=f?f:EditorUi.templateFile;var C=document.createElement("div");C.style.height="100%";var A=document.createElement("div");A.style.whiteSpace="nowrap";A.style.height="46px";d&&C.appendChild(A);var G=document.createElement("img");G.setAttribute("border",
+f.setAttribute("title",b+" ("+d.length+")");mxUtils.write(f,f.getAttribute("title"));null!=t&&(f.style.padding=t);ba.appendChild(f);(function(b,c){mxEvent.addListener(f,"click",function(){a!=c&&(a.style.backgroundColor="",a=c,a.style.backgroundColor=k,P.scrollTop=0,P.innerHTML="",J=0,S=O[b],R=null,y())})})(c,f)}b=document.createElement("div");b.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(b,"draw.io");ba.appendChild(b)}for(c in Q)f=document.createElement("div"),
+b=mxResources.get(c),d=Q[c],null==b&&(b=c.substring(0,1).toUpperCase()+c.substring(1)),18<b.length&&(b=b.substring(0,18)+"&hellip;"),f.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;",f.setAttribute("title",b+" ("+d.length+")"),mxUtils.write(f,f.getAttribute("title")),null!=t&&(f.style.padding=t),ba.appendChild(f),null==a&&0<d.length&&(a=f,a.style.backgroundColor=k,S=d),function(b,c){mxEvent.addListener(f,"click",
+function(){a!=c&&(a.style.backgroundColor="",a=c,a.style.backgroundColor=k,P.scrollTop=0,P.innerHTML="",J=0,S=Q[b],R=null,y())})}(c,f);y()}d=null!=d?d:!0;g=null!=g?g:!1;k=null!=k?k:"#ebf2f9";n=null!=n?n:"#e6eff8";m=null!=m?m:"1px solid #ccd9ea";f=null!=f?f:EditorUi.templateFile;var C=document.createElement("div");C.style.height="100%";var A=document.createElement("div");A.style.whiteSpace="nowrap";A.style.height="46px";d&&C.appendChild(A);var G=document.createElement("img");G.setAttribute("border",
"0");G.setAttribute("align","absmiddle");G.style.width="40px";G.style.height="40px";G.style.marginRight="10px";G.style.paddingBottom="4px";G.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?
IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!c&&d&&A.appendChild(G);d&&mxUtils.write(A,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");G=".drawio";a.mode==App.MODE_GOOGLE&&null!=a.drive?G=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?G=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?G=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?G=a.gitHub.extension:
a.mode==App.MODE_GITLAB&&null!=a.gitLab?G=a.gitLab.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(G=a.trello.extension);var F=document.createElement("input");F.setAttribute("value",a.defaultFilename+G);F.style.marginLeft="10px";F.style.width=c?"220px":"430px";this.init=function(){d&&(F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?F.select():document.execCommand("selectAll",!1,null))};d&&(A.appendChild(F),null!=a.editor.fileExtensions&&(G=FilenameDialog.createTypeHint(a,
-F,a.editor.fileExtensions),G.style.marginTop="12px",A.appendChild(G)));var A=!1,J=0,H=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),E=mxUtils.button(t||mxResources.get("create"),function(){E.setAttribute("disabled","disabled");D();E.removeAttribute("disabled")});E.className="geBtn gePrimaryBtn";if(m||p){var K=[],R=null,N=null,Y=null,T=function(a){E.setAttribute("disabled","disabled");for(var b=0;b<K.length;b++)K[b].className=
-b==a?"geBtn gePrimaryBtn":"geBtn"},A=!0;t=document.createElement("div");t.style.whiteSpace="nowrap";t.style.height="30px";C.appendChild(t);G=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ba.style.display="";P.style.left="160px";T(0);P.scrollTop=0;P.innerHTML="";J=0;R!=S&&(S=R,Q=N,da=Y,ba.innerHTML="",B(),R=null)});K.push(G);t.appendChild(G);var L=function(a){ba.style.display="none";P.style.left="30px";T(a?-1:1);null==R&&(R=S);P.scrollTop=0;P.innerHTML="";H.spin(P);var b=
-function(a,b,c){J=0;H.stop();S=a;c=c||{};var f=0,d;for(d in c)f+=c[d].length;if(b)P.innerHTML=b;else if(0==a.length&&0==f)P.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(P.innerHTML="",0<f){ba.style.display="";P.style.left="160px";ba.innerHTML="";da=0;Q={"draw.io":a};for(d in c)Q[d]=c[d];B()}else y()};a?p(V.value,b):m(b)};m&&(G=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){L()}),t.appendChild(G),K.push(G));if(p){G=document.createElement("span");
-G.style.marginLeft="10px";G.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");t.appendChild(G);var V=document.createElement("input");V.style.marginRight="10px";V.style.marginLeft="10px";V.style.width="220px";mxEvent.addListener(V,"keypress",function(a){13==a.keyCode&&L(!0)});t.appendChild(V);G=mxUtils.button(mxResources.get("search"),function(){L(!0)});G.className="geBtn";t.appendChild(G)}T(0)}var X=null,ga=null,ca=null,ea=null,U=null,Z=null,P=document.createElement("div");P.style.border=
+F,a.editor.fileExtensions),G.style.marginTop="12px",A.appendChild(G)));var A=!1,J=0,H=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),E=mxUtils.button(q||mxResources.get("create"),function(){E.setAttribute("disabled","disabled");D();E.removeAttribute("disabled")});E.className="geBtn gePrimaryBtn";if(l||p){var K=[],R=null,N=null,Y=null,T=function(a){E.setAttribute("disabled","disabled");for(var b=0;b<K.length;b++)K[b].className=
+b==a?"geBtn gePrimaryBtn":"geBtn"},A=!0;q=document.createElement("div");q.style.whiteSpace="nowrap";q.style.height="30px";C.appendChild(q);G=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ba.style.display="";P.style.left="160px";T(0);P.scrollTop=0;P.innerHTML="";J=0;R!=S&&(S=R,Q=N,da=Y,ba.innerHTML="",B(),R=null)});K.push(G);q.appendChild(G);var L=function(a){ba.style.display="none";P.style.left="30px";T(a?-1:1);null==R&&(R=S);P.scrollTop=0;P.innerHTML="";H.spin(P);var b=
+function(a,b,c){J=0;H.stop();S=a;c=c||{};var f=0,d;for(d in c)f+=c[d].length;if(b)P.innerHTML=b;else if(0==a.length&&0==f)P.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(P.innerHTML="",0<f){ba.style.display="";P.style.left="160px";ba.innerHTML="";da=0;Q={"draw.io":a};for(d in c)Q[d]=c[d];B()}else y()};a?p(V.value,b):l(b)};l&&(G=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){L()}),q.appendChild(G),K.push(G));if(p){G=document.createElement("span");
+G.style.marginLeft="10px";G.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");q.appendChild(G);var V=document.createElement("input");V.style.marginRight="10px";V.style.marginLeft="10px";V.style.width="220px";mxEvent.addListener(V,"keypress",function(a){13==a.keyCode&&L(!0)});q.appendChild(V);G=mxUtils.button(mxResources.get("search"),function(){L(!0)});G.className="geBtn";q.appendChild(G)}T(0)}var X=null,ga=null,ca=null,ea=null,U=null,Z=null,P=document.createElement("div");P.style.border=
"1px solid #d3d3d3";P.style.position="absolute";P.style.left="160px";P.style.right="34px";A=(d?72:40)+(A?30:0);P.style.top=A+"px";P.style.bottom="68px";P.style.margin="6px 0 0 -1px";P.style.padding="6px";P.style.overflow="auto";var ba=document.createElement("div");ba.style.cssText="position:absolute;left:30px;width:128px;top:"+A+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var aa=140,fa=140,Q={},O={},da=0,W=!0;Q.basic=[{title:"blankDiagram",select:!0}];var S=Q.basic;if(!c){var ia=
-function(){mxUtils.get(M,function(a){if(!ma){ma=!0;a=a.getXml().documentElement.firstChild;for(var b={};null!=a;){if("undefined"!==typeof a.getAttribute)if("clibs"==a.nodeName){for(var c=a.getAttribute("name"),f=a.getElementsByTagName("add"),d=[],m=0;m<f.length;m++)d.push(encodeURIComponent(mxUtils.getTextContent(f[m])));null!=c&&0<d.length&&(b[c]=d.join(";"))}else c=a.getAttribute("url"),null!=c&&(f=a.getAttribute("section"),null==f&&(f=c.indexOf("/"),f=c.substring(0,f)),c=Q[f],null==c&&(c=[],Q[f]=
+function(){mxUtils.get(M,function(a){if(!ma){ma=!0;a=a.getXml().documentElement.firstChild;for(var b={};null!=a;){if("undefined"!==typeof a.getAttribute)if("clibs"==a.nodeName){for(var c=a.getAttribute("name"),f=a.getElementsByTagName("add"),d=[],l=0;l<f.length;l++)d.push(encodeURIComponent(mxUtils.getTextContent(f[l])));null!=c&&0<d.length&&(b[c]=d.join(";"))}else c=a.getAttribute("url"),null!=c&&(f=a.getAttribute("section"),null==f&&(f=c.indexOf("/"),f=c.substring(0,f)),c=Q[f],null==c&&(c=[],Q[f]=
c),f=a.getAttribute("clibs"),null!=b[f]&&(f=b[f]),c.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),preview:a.getAttribute("preview"),clibs:f}));a=a.nextSibling}H.stop();B()}})};C.appendChild(ba);C.appendChild(P);var ma=!1,M=f;/^https?:\/\//.test(M)&&!a.editor.isCorsEnabledForUrl(M)&&(M=PROXY_URL+"?url="+encodeURIComponent(M));H.spin(P);null!=x?x(function(a,b){O=a;Y=da=b;ia()},ia):ia();N=Q}mxEvent.addListener(F,"keypress",function(b){a.dialog.container.firstChild==
C&&13==b.keyCode&&D()});f=document.createElement("div");f.style.marginTop=c?"4px":"16px";f.style.textAlign="right";f.style.position="absolute";f.style.left="40px";f.style.bottom="24px";f.style.right="40px";c||a.isOffline()||!d||null!=b||g||(x=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),x.className="geBtn",f.appendChild(x));x=mxUtils.button(mxResources.get("cancel"),function(){null!=e&&e();a.hideDialog(!0)});x.className=
"geBtn";!a.editor.cancelFirst||g&&null==e||f.appendChild(x);c||"1"==urlParams.embed||g||(c=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(F.value)+"&create="+encodeURIComponent(b)),null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}),
c.className="geBtn",f.appendChild(c));Graph.fileSupport&&v&&(v=mxUtils.button(mxResources.get("import"),function(){if(null==a.newDlgFileInputElt){var b=document.createElement("input");b.setAttribute("multiple","multiple");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(c){a.openFiles(b.files,!0);b.value=""});b.style.display="none";document.body.appendChild(b);a.newDlgFileInputElt=b}a.newDlgFileInputElt.click()}),v.className="geBtn",f.appendChild(v));f.appendChild(E);a.editor.cancelFirst||
-null!=b||g&&null==e||f.appendChild(x);C.appendChild(f);this.container=C},CreateDialog=function(a,c,d,b,g,e,k,l,n,q,f,m,p,u,v,t,x){function y(b,f,d,p){function g(){mxEvent.addListener(e,"click",function(){var b=d;if(k){var f=z.value,m=f.lastIndexOf(".");if(0>c.lastIndexOf(".")&&0>m){var b=null!=b?b:A.value,p="";b==App.MODE_GOOGLE?p=a.drive.extension:b==App.MODE_GITHUB?p=a.gitHub.extension:b==App.MODE_GITLAB?p=a.gitLab.extension:b==App.MODE_TRELLO?p=a.trello.extension:b==App.MODE_DROPBOX?p=a.dropbox.extension:
-b==App.MODE_ONEDRIVE?p=a.oneDrive.extension:b==App.MODE_DEVICE&&(p=".drawio");0<=m&&(f=f.substring(0,m));z.value=f+p}}D(d)})}var e=document.createElement("a");e.style.overflow="hidden";var t=document.createElement("img");t.src=b;t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.width="60px";t.style.height="60px";t.style.paddingBottom="6px";e.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";e.className="geBaseButton";e.style.position="relative";e.style.margin="4px";e.style.padding=
-"8px 8px 10px 8px";e.style.whiteSpace="nowrap";e.appendChild(t);mxClient.IS_QUIRKS&&(e.style.cssFloat="left",e.style.zoom="1");e.style.color="gray";e.style.fontSize="11px";var u=document.createElement("div");e.appendChild(u);mxUtils.write(u,f);if(null!=p&&null==a[p]){t.style.visibility="hidden";mxUtils.setOpacity(u,10);var v=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});v.spin(e);var l=window.setTimeout(function(){null==
-a[p]&&(v.stop(),e.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[p]&&(window.clearTimeout(l),mxUtils.setOpacity(u,100),t.style.visibility="",v.stop(),g())}))}else g();B.appendChild(e);++C==m&&(mxUtils.br(B),C=0)}function D(b){var f=z.value;if(null==b||null!=f&&0<f.length)x&&a.hideDialog(),d(f,b,z)}k=null!=k?k:!0;l=null!=l?l:!0;m=null!=m?m:4;x=null!=x?x:!0;e=document.createElement("div");e.style.whiteSpace="nowrap";null==b&&a.addLanguageMenu(e);var I=
+null!=b||g&&null==e||f.appendChild(x);C.appendChild(f);this.container=C},CreateDialog=function(a,c,d,b,g,e,k,n,m,t,f,l,p,u,v,q,x){function y(b,f,d,p){function g(){mxEvent.addListener(e,"click",function(){var b=d;if(k){var f=z.value,l=f.lastIndexOf(".");if(0>c.lastIndexOf(".")&&0>l){var b=null!=b?b:A.value,p="";b==App.MODE_GOOGLE?p=a.drive.extension:b==App.MODE_GITHUB?p=a.gitHub.extension:b==App.MODE_GITLAB?p=a.gitLab.extension:b==App.MODE_TRELLO?p=a.trello.extension:b==App.MODE_DROPBOX?p=a.dropbox.extension:
+b==App.MODE_ONEDRIVE?p=a.oneDrive.extension:b==App.MODE_DEVICE&&(p=".drawio");0<=l&&(f=f.substring(0,l));z.value=f+p}}D(d)})}var e=document.createElement("a");e.style.overflow="hidden";var q=document.createElement("img");q.src=b;q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.style.width="60px";q.style.height="60px";q.style.paddingBottom="6px";e.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";e.className="geBaseButton";e.style.position="relative";e.style.margin="4px";e.style.padding=
+"8px 8px 10px 8px";e.style.whiteSpace="nowrap";e.appendChild(q);mxClient.IS_QUIRKS&&(e.style.cssFloat="left",e.style.zoom="1");e.style.color="gray";e.style.fontSize="11px";var u=document.createElement("div");e.appendChild(u);mxUtils.write(u,f);if(null!=p&&null==a[p]){q.style.visibility="hidden";mxUtils.setOpacity(u,10);var v=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});v.spin(e);var n=window.setTimeout(function(){null==
+a[p]&&(v.stop(),e.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[p]&&(window.clearTimeout(n),mxUtils.setOpacity(u,100),q.style.visibility="",v.stop(),g())}))}else g();B.appendChild(e);++C==l&&(mxUtils.br(B),C=0)}function D(b){var f=z.value;if(null==b||null!=f&&0<f.length)x&&a.hideDialog(),d(f,b,z)}k=null!=k?k:!0;n=null!=n?n:!0;l=null!=l?l:4;x=null!=x?x:!0;e=document.createElement("div");e.style.whiteSpace="nowrap";null==b&&a.addLanguageMenu(e);var I=
document.createElement("h2");mxUtils.write(I,g||mxResources.get("create"));I.style.marginTop="0px";I.style.marginBottom="24px";e.appendChild(I);mxUtils.write(e,mxResources.get("filename")+":");var z=document.createElement("input");z.setAttribute("value",c);z.style.width="280px";z.style.marginLeft="10px";z.style.marginBottom="20px";z.style.maxWidth="70%";this.init=function(){z.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?z.select():document.execCommand("selectAll",
-!1,null)};e.appendChild(z);null!=t&&e.appendChild(FilenameDialog.createTypeHint(a,z,t));null!=p&&null!=u&&"image/"==u.substring(0,6)&&(z.style.width="160px",g=null,"image/svg+xml"==u&&mxClient.IS_SVG?(g=document.createElement("div"),g.innerHTML=mxUtils.trim(p),p=g.getElementsByTagName("svg")[0],u=parseInt(p.getAttribute("width")),v=parseInt(p.getAttribute("height")),p.setAttribute("viewBox","0 0 "+u+" "+v),p.setAttribute("width","120px"),p.setAttribute("height","80px")):(g=document.createElement("img"),
-g.setAttribute("src","data:"+u+(v?";base64,":";utf8,")+p)),g.style.position="absolute",g.style.top="70px",g.style.right="100px",g.style.maxWidth="120px",g.style.maxHeight="80px",mxUtils.setPrefixedStyle(g.style,"transform","translate(50%,-50%)"),e.appendChild(g),n&&Editor.popupsAllowed&&(g.style.cursor="pointer",mxEvent.addListener(g,"click",function(){D("_blank")})));mxUtils.br(e);var B=document.createElement("div");B.style.textAlign="center";var C=0;B.style.marginTop="6px";e.appendChild(B);var A=
+!1,null)};e.appendChild(z);null!=q&&e.appendChild(FilenameDialog.createTypeHint(a,z,q));null!=p&&null!=u&&"image/"==u.substring(0,6)&&(z.style.width="160px",g=null,"image/svg+xml"==u&&mxClient.IS_SVG?(g=document.createElement("div"),g.innerHTML=mxUtils.trim(p),p=g.getElementsByTagName("svg")[0],u=parseInt(p.getAttribute("width")),v=parseInt(p.getAttribute("height")),p.setAttribute("viewBox","0 0 "+u+" "+v),p.setAttribute("width","120px"),p.setAttribute("height","80px")):(g=document.createElement("img"),
+g.setAttribute("src","data:"+u+(v?";base64,":";utf8,")+p)),g.style.position="absolute",g.style.top="70px",g.style.right="100px",g.style.maxWidth="120px",g.style.maxHeight="80px",mxUtils.setPrefixedStyle(g.style,"transform","translate(50%,-50%)"),e.appendChild(g),m&&Editor.popupsAllowed&&(g.style.cursor="pointer",mxEvent.addListener(g,"click",function(){D("_blank")})));mxUtils.br(e);var B=document.createElement("div");B.style.textAlign="center";var C=0;B.style.marginTop="6px";e.appendChild(B);var A=
document.createElement("select");A.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(p,mxResources.get("googleDrive")),A.appendChild(p),y(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(p,
mxResources.get("oneDrive")),A.appendChild(p),a.mode==App.MODE_ONEDRIVE&&p.setAttribute("selected","selected"),y(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(p,mxResources.get("dropbox")),A.appendChild(p),a.mode==App.MODE_DROPBOX&&p.setAttribute("selected","selected"),y(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),
App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_GITHUB),mxUtils.write(p,mxResources.get("github")),A.appendChild(p),y(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.gitLab&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_GITLAB),mxUtils.write(p,mxResources.get("gitlab")),A.appendChild(p),y(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),
"function"===typeof window.TrelloClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_TRELLO),mxUtils.write(p,mxResources.get("trello")),A.appendChild(p),y(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));Editor.useLocalStorage&&"device"!=urlParams.storage&&null==a.getCurrentFile()||(p=document.createElement("option"),p.setAttribute("value",App.MODE_DEVICE),mxUtils.write(p,mxResources.get("device")),A.appendChild(p),a.mode!=App.MODE_DEVICE&&
-l||p.setAttribute("selected","selected"),f&&y(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE));l&&isLocalStorage&&"0"!=urlParams.browser&&(l=document.createElement("option"),l.setAttribute("value",App.MODE_BROWSER),mxUtils.write(l,mxResources.get("browser")),A.appendChild(l),a.mode==App.MODE_BROWSER&&l.setAttribute("selected","selected"),y(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));l=document.createElement("div");l.style.marginTop=
-"26px";l.style.textAlign="center";null!=q&&(f=mxUtils.button(mxResources.get("help"),function(){a.openLink(q)}),f.className="geBtn",l.appendChild(f));f=mxUtils.button(mxResources.get("cancel"),function(){null!=b?b():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});f.className="geBtn";a.editor.cancelFirst&&l.appendChild(f);null==b&&(p=mxUtils.button(mxResources.get("decideLater"),function(){D(null)}),p.className="geBtn",l.appendChild(p));n&&Editor.popupsAllowed&&
-(n=mxUtils.button(mxResources.get("openInNewWindow"),function(){D("_blank")}),n.className="geBtn",l.appendChild(n));CreateDialog.showDownloadButton&&(n=mxUtils.button(mxResources.get("download"),function(){D("download")}),n.className="geBtn",l.appendChild(n));a.editor.cancelFirst||l.appendChild(f);mxEvent.addListener(z,"keypress",function(b){13==b.keyCode?D(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});e.appendChild(l);this.container=e};
+n||p.setAttribute("selected","selected"),f&&y(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE));n&&isLocalStorage&&"0"!=urlParams.browser&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_BROWSER),mxUtils.write(n,mxResources.get("browser")),A.appendChild(n),a.mode==App.MODE_BROWSER&&n.setAttribute("selected","selected"),y(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));n=document.createElement("div");n.style.marginTop=
+"26px";n.style.textAlign="center";null!=t&&(f=mxUtils.button(mxResources.get("help"),function(){a.openLink(t)}),f.className="geBtn",n.appendChild(f));f=mxUtils.button(mxResources.get("cancel"),function(){null!=b?b():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});f.className="geBtn";a.editor.cancelFirst&&n.appendChild(f);null==b&&(p=mxUtils.button(mxResources.get("decideLater"),function(){D(null)}),p.className="geBtn",n.appendChild(p));m&&Editor.popupsAllowed&&
+(m=mxUtils.button(mxResources.get("openInNewWindow"),function(){D("_blank")}),m.className="geBtn",n.appendChild(m));CreateDialog.showDownloadButton&&(m=mxUtils.button(mxResources.get("download"),function(){D("download")}),m.className="geBtn",n.appendChild(m));a.editor.cancelFirst||n.appendChild(f);mxEvent.addListener(z,"keypress",function(b){13==b.keyCode?D(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});e.appendChild(n);this.container=e};
CreateDialog.showDownloadButton=!0;
-var PopupDialog=function(a,c,d,b,g){g=null!=g?g:!0;var e=document.createElement("div");e.style.textAlign="left";mxUtils.write(e,mxResources.get("fileOpenLocation"));mxUtils.br(e);mxUtils.br(e);var k=mxUtils.button(mxResources.get("openInThisWindow"),function(){g&&a.hideDialog();null!=b&&b()});k.className="geBtn";k.style.marginBottom="8px";k.style.width="280px";e.appendChild(k);mxUtils.br(e);var l=mxUtils.button(mxResources.get("openInNewWindow"),function(){g&&a.hideDialog();null!=d&&d();a.openLink(c,
-null,!0)});l.className="geBtn gePrimaryBtn";l.style.width=k.style.width;e.appendChild(l);mxUtils.br(e);mxUtils.br(e);mxUtils.write(e,mxResources.get("allowPopups"));this.container=e},ImageDialog=function(a,c,d,b,g,e){e=null!=e?e:!0;var k=a.editor.graph,l=document.createElement("div");mxUtils.write(l,c);c=document.createElement("div");c.className="geTitle";c.style.backgroundColor="transparent";c.style.borderColor="transparent";c.style.whiteSpace="nowrap";c.style.textOverflow="clip";c.style.cursor=
-"default";mxClient.IS_VML||(c.style.paddingRight="20px");var n=document.createElement("input");n.setAttribute("value",d);n.setAttribute("type","text");n.setAttribute("spellcheck","false");n.setAttribute("autocorrect","off");n.setAttribute("autocomplete","off");n.setAttribute("autocapitalize","off");n.style.marginTop="6px";n.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";n.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";n.style.backgroundRepeat="no-repeat";
-n.style.backgroundPosition="100% 50%";n.style.paddingRight="14px";d=document.createElement("div");d.setAttribute("title",mxResources.get("reset"));d.style.position="relative";d.style.left="-16px";d.style.width="12px";d.style.height="14px";d.style.cursor="pointer";d.style.display=mxClient.IS_VML?"inline":"inline-block";d.style.top=(mxClient.IS_VML?0:3)+"px";d.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(d,"click",function(){n.value="";n.focus()});c.appendChild(n);c.appendChild(d);
-l.appendChild(c);var q=function(f,c,d,m){var p="data:"==f.substring(0,5);!a.isOffline()||p&&"undefined"===typeof chrome?0<f.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(f,function(p){a.spinner.stop();a.hideDialog();var g=!1===m?1:null!=c&&null!=d?Math.max(c/p.width,d/p.height):Math.min(1,Math.min(520/p.width,520/p.height));e&&(f=a.convertDataUri(f));b(f,Math.round(Number(p.width)*g),Math.round(Number(p.height)*g))},function(){a.spinner.stop();b(null);a.showError(mxResources.get("error"),
-mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),b(f)):(f=a.convertDataUri(f),c=null==c?120:c,d=null==d?100:d,a.hideDialog(),b(f,c,d))},f=function(f,c){if(null!=f){var d=g?null:k.getModel().getGeometry(k.getSelectionCell());null!=d?q(f,d.width,d.height,c):q(f,null,null,c)}else a.hideDialog(),b(null)};this.init=function(){n.focus();if(Graph.fileSupport){n.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=l.parentNode,c=null;mxEvent.addListener(b,"dragleave",
-function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(f){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,function(a,b,c,d,m,p,e,g){f(a,
+var PopupDialog=function(a,c,d,b,g){g=null!=g?g:!0;var e=document.createElement("div");e.style.textAlign="left";mxUtils.write(e,mxResources.get("fileOpenLocation"));mxUtils.br(e);mxUtils.br(e);var k=mxUtils.button(mxResources.get("openInThisWindow"),function(){g&&a.hideDialog();null!=b&&b()});k.className="geBtn";k.style.marginBottom="8px";k.style.width="280px";e.appendChild(k);mxUtils.br(e);var n=mxUtils.button(mxResources.get("openInNewWindow"),function(){g&&a.hideDialog();null!=d&&d();a.openLink(c,
+null,!0)});n.className="geBtn gePrimaryBtn";n.style.width=k.style.width;e.appendChild(n);mxUtils.br(e);mxUtils.br(e);mxUtils.write(e,mxResources.get("allowPopups"));this.container=e},ImageDialog=function(a,c,d,b,g,e){e=null!=e?e:!0;var k=a.editor.graph,n=document.createElement("div");mxUtils.write(n,c);c=document.createElement("div");c.className="geTitle";c.style.backgroundColor="transparent";c.style.borderColor="transparent";c.style.whiteSpace="nowrap";c.style.textOverflow="clip";c.style.cursor=
+"default";mxClient.IS_VML||(c.style.paddingRight="20px");var m=document.createElement("input");m.setAttribute("value",d);m.setAttribute("type","text");m.setAttribute("spellcheck","false");m.setAttribute("autocorrect","off");m.setAttribute("autocomplete","off");m.setAttribute("autocapitalize","off");m.style.marginTop="6px";m.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";m.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";m.style.backgroundRepeat="no-repeat";
+m.style.backgroundPosition="100% 50%";m.style.paddingRight="14px";d=document.createElement("div");d.setAttribute("title",mxResources.get("reset"));d.style.position="relative";d.style.left="-16px";d.style.width="12px";d.style.height="14px";d.style.cursor="pointer";d.style.display=mxClient.IS_VML?"inline":"inline-block";d.style.top=(mxClient.IS_VML?0:3)+"px";d.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(d,"click",function(){m.value="";m.focus()});c.appendChild(m);c.appendChild(d);
+n.appendChild(c);var t=function(f,c,d,l){var p="data:"==f.substring(0,5);!a.isOffline()||p&&"undefined"===typeof chrome?0<f.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(f,function(p){a.spinner.stop();a.hideDialog();var g=!1===l?1:null!=c&&null!=d?Math.max(c/p.width,d/p.height):Math.min(1,Math.min(520/p.width,520/p.height));e&&(f=a.convertDataUri(f));b(f,Math.round(Number(p.width)*g),Math.round(Number(p.height)*g))},function(){a.spinner.stop();b(null);a.showError(mxResources.get("error"),
+mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),b(f)):(f=a.convertDataUri(f),c=null==c?120:c,d=null==d?100:d,a.hideDialog(),b(f,c,d))},f=function(f,c){if(null!=f){var d=g?null:k.getModel().getGeometry(k.getSelectionCell());null!=d?t(f,d.width,d.height,c):t(f,null,null,c)}else a.hideDialog(),b(null)};this.init=function(){m.focus();if(Graph.fileSupport){m.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=n.parentNode,c=null;mxEvent.addListener(b,"dragleave",
+function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(f){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,function(a,b,c,d,l,p,e,g){f(a,
g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(d)&&f(decodeURIComponent(d))}b.stopPropagation();b.preventDefault()}),!1)}};d=document.createElement("div");d.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";d.style.textAlign="center";c=mxUtils.button(mxResources.get("cancel"),
-function(){a.spinner.stop();a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&d.appendChild(c);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(n.value=a.url));n.focus()};if(Graph.fileSupport){if(null==a.imgDlgFileInputElt){var m=document.createElement("input");m.setAttribute("multiple","multiple");m.setAttribute("type","file");mxEvent.addListener(m,"change",function(b){null!=
-m.files&&(a.importFiles(m.files,0,0,a.maxImageSize,function(a,b,c,d,m,p){f(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0),m.type="",m.type="file",m.value="")});m.style.display="none";document.body.appendChild(m);a.imgDlgFileInputElt=m}var p=mxUtils.button(mxResources.get("open"),function(){a.imgDlgFileInputElt.click()});p.className="geBtn";d.appendChild(p)}document.createElement("canvas").getContext&&"data:image/"==n.value.substring(0,
-11)&&"data:image/svg"!=n.value.substring(0,14)&&(p=mxUtils.button(mxResources.get("crop"),function(){var b=new CropImageDialog(a,n.value,function(a){n.value=a});a.showDialog(b.container,200,200,!0,!0);b.init()}),p.className="geBtn",d.appendChild(p));"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top&&(p=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);
+function(){a.spinner.stop();a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&d.appendChild(c);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(m.value=a.url));m.focus()};if(Graph.fileSupport){if(null==a.imgDlgFileInputElt){var l=document.createElement("input");l.setAttribute("multiple","multiple");l.setAttribute("type","file");mxEvent.addListener(l,"change",function(b){null!=
+l.files&&(a.importFiles(l.files,0,0,a.maxImageSize,function(a,b,c,d,l,p){f(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0),l.type="",l.type="file",l.value="")});l.style.display="none";document.body.appendChild(l);a.imgDlgFileInputElt=l}var p=mxUtils.button(mxResources.get("open"),function(){a.imgDlgFileInputElt.click()});p.className="geBtn";d.appendChild(p)}document.createElement("canvas").getContext&&"data:image/"==m.value.substring(0,
+11)&&"data:image/svg"!=m.value.substring(0,14)&&(p=mxUtils.button(mxResources.get("crop"),function(){var b=new CropImageDialog(a,m.value,function(a){m.value=a});a.showDialog(b.container,200,200,!0,!0);b.init()}),p.className="geBtn",d.appendChild(p));"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top&&(p=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);
a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)}),p.className="geBtn",d.appendChild(p),null!=a.drive&&"1"==urlParams.photos&&(p=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(a.drive.token).addView(google.picker.ViewId.PHOTO_UPLOAD);
-a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),p.className="geBtn",d.appendChild(p)));mxEvent.addListener(n,"keypress",function(a){13==a.keyCode&&f(n.value)});p=mxUtils.button(mxResources.get("apply"),function(){f(n.value)});p.className="geBtn gePrimaryBtn";d.appendChild(p);a.editor.cancelFirst||d.appendChild(c);Graph.fileSupport&&(d.style.marginTop="120px",l.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",l.style.backgroundPosition=
-"center 65%",l.style.backgroundRepeat="no-repeat",c=document.createElement("div"),c.style.position="absolute",c.style.width="420px",c.style.top="58%",c.style.textAlign="center",c.style.fontSize="18px",c.style.color="#a0c3ff",mxUtils.write(c,mxResources.get("dragImagesHere")),l.appendChild(c));l.appendChild(d);this.container=l},LinkDialog=function(a,c,d,b,g){function e(a,b,f){f=mxUtils.button("",f);f.className="geBtn";f.setAttribute("title",b);b=document.createElement("img");b.style.height="26px";
-b.style.width="26px";b.setAttribute("src",a);f.style.minWidth="42px";f.style.verticalAlign="middle";f.appendChild(b);x.appendChild(f)}var k=document.createElement("div");mxUtils.write(k,mxResources.get("editLink")+":");var l=document.createElement("div");l.className="geTitle";l.style.backgroundColor="transparent";l.style.borderColor="transparent";l.style.whiteSpace="nowrap";l.style.textOverflow="clip";l.style.cursor="default";mxClient.IS_VML||(l.style.paddingRight="20px");var n=document.createElement("input");
-n.setAttribute("placeholder",mxResources.get("dragUrlsHere"));n.setAttribute("type","text");n.style.marginTop="6px";n.style.width="100%";n.style.boxSizing="border-box";n.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";n.style.backgroundRepeat="no-repeat";n.style.backgroundPosition="100% 50%";n.style.paddingRight="14px";var q=document.createElement("div");q.setAttribute("title",mxResources.get("reset"));q.style.position="relative";q.style.left="-16px";q.style.width="12px";q.style.height=
-"14px";q.style.cursor="pointer";q.style.display=mxClient.IS_VML?"inline":"inline-block";q.style.top=(mxClient.IS_VML?0:3)+"px";q.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(q,"click",function(){n.value="";n.focus()});var f=document.createElement("input");f.style.cssText="margin-right:8px;margin-bottom:8px;";f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","current-linkdialog");var m=document.createElement("input");m.style.cssText="margin-right:8px;margin-bottom:8px;";
-m.setAttribute("value","url");m.setAttribute("type","radio");m.setAttribute("name","current-linkdialog");var p=document.createElement("select");p.style.width="100%";if(g&&null!=a.pages){null!=c&&"data:page/id,"==c.substring(0,13)?(m.setAttribute("checked","checked"),m.defaultChecked=!0):(n.setAttribute("value",c),f.setAttribute("checked","checked"),f.defaultChecked=!0);l.appendChild(f);l.appendChild(n);l.appendChild(q);mxUtils.br(l);l.appendChild(m);g=!1;for(q=0;q<a.pages.length;q++){var u=document.createElement("option");
-mxUtils.write(u,a.pages[q].getName()||mxResources.get("pageWithNumber",[q+1]));u.setAttribute("value","data:page/id,"+a.pages[q].getId());c==u.getAttribute("value")&&(u.setAttribute("selected","selected"),g=!0);p.appendChild(u)}if(!g&&m.checked){var v=document.createElement("option");mxUtils.write(v,mxResources.get("pageNotFound"));v.setAttribute("disabled","disabled");v.setAttribute("selected","selected");v.setAttribute("value","pageNotFound");p.appendChild(v);mxEvent.addListener(p,"change",function(){null==
-v.parentNode||v.selected||v.parentNode.removeChild(v)})}l.appendChild(p)}else n.setAttribute("value",c),l.appendChild(n),l.appendChild(q);k.appendChild(l);var t=mxUtils.button(d,function(){a.hideDialog();b(m.checked?"pageNotFound"!==p.value?p.value:c:n.value,LinkDialog.selectedDocs)});t.style.verticalAlign="middle";t.className="geBtn gePrimaryBtn";this.init=function(){m.checked?p.focus():(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",
-!1,null));mxEvent.addListener(p,"focus",function(){f.removeAttribute("checked");m.setAttribute("checked","checked");m.checked=!0});mxEvent.addListener(n,"focus",function(){m.removeAttribute("checked");f.setAttribute("checked","checked");f.checked=!0});if(Graph.fileSupport){var b=k.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(f){null==
-c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(n.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),f.setAttribute("checked","checked"),f.checked=!0,t.click());a.stopPropagation();a.preventDefault()}),!1)}};var x=document.createElement("div");x.style.marginTop=
+a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),p.className="geBtn",d.appendChild(p)));mxEvent.addListener(m,"keypress",function(a){13==a.keyCode&&f(m.value)});p=mxUtils.button(mxResources.get("apply"),function(){f(m.value)});p.className="geBtn gePrimaryBtn";d.appendChild(p);a.editor.cancelFirst||d.appendChild(c);Graph.fileSupport&&(d.style.marginTop="120px",n.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",n.style.backgroundPosition=
+"center 65%",n.style.backgroundRepeat="no-repeat",c=document.createElement("div"),c.style.position="absolute",c.style.width="420px",c.style.top="58%",c.style.textAlign="center",c.style.fontSize="18px",c.style.color="#a0c3ff",mxUtils.write(c,mxResources.get("dragImagesHere")),n.appendChild(c));n.appendChild(d);this.container=n},LinkDialog=function(a,c,d,b,g){function e(a,b,f){f=mxUtils.button("",f);f.className="geBtn";f.setAttribute("title",b);b=document.createElement("img");b.style.height="26px";
+b.style.width="26px";b.setAttribute("src",a);f.style.minWidth="42px";f.style.verticalAlign="middle";f.appendChild(b);x.appendChild(f)}var k=document.createElement("div");mxUtils.write(k,mxResources.get("editLink")+":");var n=document.createElement("div");n.className="geTitle";n.style.backgroundColor="transparent";n.style.borderColor="transparent";n.style.whiteSpace="nowrap";n.style.textOverflow="clip";n.style.cursor="default";mxClient.IS_VML||(n.style.paddingRight="20px");var m=document.createElement("input");
+m.setAttribute("placeholder",mxResources.get("dragUrlsHere"));m.setAttribute("type","text");m.style.marginTop="6px";m.style.width="100%";m.style.boxSizing="border-box";m.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";m.style.backgroundRepeat="no-repeat";m.style.backgroundPosition="100% 50%";m.style.paddingRight="14px";var t=document.createElement("div");t.setAttribute("title",mxResources.get("reset"));t.style.position="relative";t.style.left="-16px";t.style.width="12px";t.style.height=
+"14px";t.style.cursor="pointer";t.style.display=mxClient.IS_VML?"inline":"inline-block";t.style.top=(mxClient.IS_VML?0:3)+"px";t.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(t,"click",function(){m.value="";m.focus()});var f=document.createElement("input");f.style.cssText="margin-right:8px;margin-bottom:8px;";f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","current-linkdialog");var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";
+l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","current-linkdialog");var p=document.createElement("select");p.style.width="100%";if(g&&null!=a.pages){null!=c&&"data:page/id,"==c.substring(0,13)?(l.setAttribute("checked","checked"),l.defaultChecked=!0):(m.setAttribute("value",c),f.setAttribute("checked","checked"),f.defaultChecked=!0);n.appendChild(f);n.appendChild(m);n.appendChild(t);mxUtils.br(n);n.appendChild(l);g=!1;for(t=0;t<a.pages.length;t++){var u=document.createElement("option");
+mxUtils.write(u,a.pages[t].getName()||mxResources.get("pageWithNumber",[t+1]));u.setAttribute("value","data:page/id,"+a.pages[t].getId());c==u.getAttribute("value")&&(u.setAttribute("selected","selected"),g=!0);p.appendChild(u)}if(!g&&l.checked){var v=document.createElement("option");mxUtils.write(v,mxResources.get("pageNotFound"));v.setAttribute("disabled","disabled");v.setAttribute("selected","selected");v.setAttribute("value","pageNotFound");p.appendChild(v);mxEvent.addListener(p,"change",function(){null==
+v.parentNode||v.selected||v.parentNode.removeChild(v)})}n.appendChild(p)}else m.setAttribute("value",c),n.appendChild(m),n.appendChild(t);k.appendChild(n);var q=mxUtils.button(d,function(){a.hideDialog();b(l.checked?"pageNotFound"!==p.value?p.value:c:m.value,LinkDialog.selectedDocs)});q.style.verticalAlign="middle";q.className="geBtn gePrimaryBtn";this.init=function(){l.checked?p.focus():(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",
+!1,null));mxEvent.addListener(p,"focus",function(){f.removeAttribute("checked");l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(m,"focus",function(){l.removeAttribute("checked");f.setAttribute("checked","checked");f.checked=!0});if(Graph.fileSupport){var b=k.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(f){null==
+c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(m.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),f.setAttribute("checked","checked"),f.checked=!0,q.click());a.stopPropagation();a.preventDefault()}),!1)}};var x=document.createElement("div");x.style.marginTop=
"20px";x.style.textAlign="center";d=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/solution/articles/16000080137")});d.style.verticalAlign="middle";d.className="geBtn";x.appendChild(d);a.isOffline()&&!mxClient.IS_CHROMEAPP&&(d.style.display="none");d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.style.verticalAlign="middle";d.className="geBtn";a.editor.cancelFirst&&x.appendChild(d);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==
-google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var b=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||null!=a.docs[0].mimeType&&"application/vnd.jgraph."==a.docs[0].mimeType.substring(0,23)?b="https://www.draw.io/#G"+a.docs[0].id:"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(b="https://drive.google.com/#folders/"+a.docs[0].id);n.value=b;n.focus()}else LinkDialog.selectedDocs=null;n.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&
+google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var b=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||null!=a.docs[0].mimeType&&"application/vnd.jgraph."==a.docs[0].mimeType.substring(0,23)?b="https://www.draw.io/#G"+a.docs[0].id:"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(b="https://drive.google.com/#folders/"+a.docs[0].id);m.value=b;m.focus()}else LinkDialog.selectedDocs=null;m.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&
e(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.linkPicker){var b=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),f=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),c=(new google.picker.DocsView).setIncludeFolders(!0).setEnableTeamDrives(!0).setSelectFolderEnabled(!0),
b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(a.drive.token).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(b).addView(f).addView(c).addView(google.picker.ViewId.RECENTLY_PICKED).addView(google.picker.ViewId.IMAGE_SEARCH).addView(google.picker.ViewId.VIDEO_SEARCH).addView(google.picker.ViewId.MAPS);"1"==urlParams.photos&&b.addView(google.picker.ViewId.PHOTO_UPLOAD);a.linkPicker=b.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.linkPicker.setVisible(!0)}))});
-"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&e(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){n.value=a[0].link;n.focus()}})});null!=a.oneDrive&&e(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,b){n.value=b.value[0].webUrl;n.focus()})});null!=a.gitHub&&e(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=
-a){a=a.split("/");var b=a[0],f=a[1],c=a[2];a=a.slice(3,a.length).join("/");n.value="https://github.com/"+b+"/"+f+"/blob/"+c+"/"+a;n.focus()}})});null!=a.gitLab&&e(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){a.gitLab.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],f=a[1],c=a[2];a=a.slice(3,a.length).join("/");n.value=DRAWIO_GITLAB_URL+"/"+b+"/"+f+"/blob/"+c+"/"+a;n.focus()}})});mxEvent.addListener(n,"keypress",function(f){13==f.keyCode&&(a.hideDialog(),b(m.checked?
-p.value:n.value,LinkDialog.selectedDocs))});x.appendChild(t);a.editor.cancelFirst||x.appendChild(d);k.appendChild(x);this.container=k},AboutDialog=function(a){var c=document.createElement("div");c.style.marginTop="6px";c.setAttribute("align","center");var d=document.createElement("img");d.style.border="0px";mxClient.IS_SVG?(d.setAttribute("width","164"),d.setAttribute("height","221"),d.style.width="164px",d.style.height="221px",d.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")):(d.setAttribute("width",
+"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&e(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){m.value=a[0].link;m.focus()}})});null!=a.oneDrive&&e(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,b){m.value=b.value[0].webUrl;m.focus()})});null!=a.gitHub&&e(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=
+a){a=a.split("/");var b=a[0],f=a[1],c=a[2];a=a.slice(3,a.length).join("/");m.value="https://github.com/"+b+"/"+f+"/blob/"+c+"/"+a;m.focus()}})});null!=a.gitLab&&e(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){a.gitLab.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],f=a[1],c=a[2];a=a.slice(3,a.length).join("/");m.value=DRAWIO_GITLAB_URL+"/"+b+"/"+f+"/blob/"+c+"/"+a;m.focus()}})});mxEvent.addListener(m,"keypress",function(f){13==f.keyCode&&(a.hideDialog(),b(l.checked?
+p.value:m.value,LinkDialog.selectedDocs))});x.appendChild(q);a.editor.cancelFirst||x.appendChild(d);k.appendChild(x);this.container=k},AboutDialog=function(a){var c=document.createElement("div");c.style.marginTop="6px";c.setAttribute("align","center");var d=document.createElement("img");d.style.border="0px";mxClient.IS_SVG?(d.setAttribute("width","164"),d.setAttribute("height","221"),d.style.width="164px",d.style.height="221px",d.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")):(d.setAttribute("width",
"176"),d.setAttribute("height","219"),d.style.width="170px",d.style.height="219px",d.setAttribute("src",IMAGE_PATH+"/logo-flat.png"));"dark"==uiTheme&&(d.style.filter="grayscale(100%) invert(100%)");c.appendChild(d);mxUtils.br(c);var d="dark"==uiTheme?"#cccccc":"#505050",b=document.createElement("small");b.innerHTML="v "+EditorUi.VERSION;b.style.color=d;c.appendChild(b);mxUtils.br(c);mxUtils.br(c);b=document.createElement("small");b.style.color=d;b.innerHTML='&copy; 2005-2019 <a href="https://about.draw.io/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';
c.appendChild(b);mxEvent.addListener(c,"click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container=c},FeedbackDialog=function(a){var c=document.createElement("div"),d=document.createElement("div");mxUtils.write(d,mxResources.get("sendYourFeedbackToDrawIo"));d.style.fontSize="18px";d.style.marginBottom="18px";c.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");c.appendChild(d);var b=document.createElement("input");
-b.setAttribute("type","text");b.style.marginTop="6px";b.style.width="600px";var g=mxUtils.button(mxResources.get("sendMessage"),function(){var c=n.value+(k.checked?"\nDiagram:\n"+mxUtils.getXml(a.getXmlFileData()):"")+"\nBrowser:\n"+navigator.userAgent;c.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(b.value)+
+b.setAttribute("type","text");b.style.marginTop="6px";b.style.width="600px";var g=mxUtils.button(mxResources.get("sendMessage"),function(){var c=m.value+(k.checked?"\nDiagram:\n"+mxUtils.getXml(a.getXmlFileData()):"")+"\nBrowser:\n"+navigator.userAgent;c.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(b.value)+
"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+c),function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});g.className="geBtn gePrimaryBtn";g.setAttribute("disabled","disabled");var e=/^(([^<>()[\]\\.,;:\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(b,"change",function(){0<b.value.length&&0<e.test(b.value)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")});mxEvent.addListener(b,"keyup",function(){0<b.value.length&&e.test(b.value)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")});c.appendChild(b);this.init=function(){b.focus()};var k=document.createElement("input");k.setAttribute("type","checkbox");k.setAttribute("checked","checked");k.defaultChecked=!0;d=document.createElement("p");d.style.marginTop=
-"14px";d.appendChild(k);var l=document.createElement("span");mxUtils.write(l," "+mxResources.get("includeCopyOfMyDiagram"));d.appendChild(l);mxEvent.addListener(l,"click",function(a){k.checked=!k.checked;mxEvent.consume(a)});c.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("feedback"));c.appendChild(d);var n=document.createElement("textarea");n.style.resize="none";n.style.width="600px";n.style.height="140px";n.style.marginTop="6px";n.setAttribute("placeholder",mxResources.get("comments"));
-c.appendChild(n);d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right";l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";a.editor.cancelFirst?(d.appendChild(l),d.appendChild(g)):(d.appendChild(g),d.appendChild(l));c.appendChild(d);this.container=c};FeedbackDialog.maxAttachmentSize=1E6;
+"14px";d.appendChild(k);var n=document.createElement("span");mxUtils.write(n," "+mxResources.get("includeCopyOfMyDiagram"));d.appendChild(n);mxEvent.addListener(n,"click",function(a){k.checked=!k.checked;mxEvent.consume(a)});c.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("feedback"));c.appendChild(d);var m=document.createElement("textarea");m.style.resize="none";m.style.width="600px";m.style.height="140px";m.style.marginTop="6px";m.setAttribute("placeholder",mxResources.get("comments"));
+c.appendChild(m);d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right";n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst?(d.appendChild(n),d.appendChild(g)):(d.appendChild(g),d.appendChild(n));c.appendChild(d);this.container=c};FeedbackDialog.maxAttachmentSize=1E6;
var RevisionDialog=function(a,c,d){var b=document.createElement("div"),g=document.createElement("h3");g.style.marginTop="0px";mxUtils.write(g,mxResources.get("revisionHistory"));b.appendChild(g);var e=document.createElement("div");e.style.position="absolute";e.style.overflow="auto";e.style.width="170px";e.style.height="378px";b.appendChild(e);var k=document.createElement("div");k.style.position="absolute";k.style.border="1px solid lightGray";k.style.left="199px";k.style.width="470px";k.style.height=
-"376px";k.style.overflow="hidden";mxEvent.disableContextMenu(k);b.appendChild(k);var l=new Graph(k);l.setTooltips(!1);l.setEnabled(!1);l.setPanning(!0);l.panningHandler.ignoreCell=!0;l.panningHandler.useLeftButtonForPanning=!0;l.minFitScale=null;l.maxFitScale=null;l.centerZoom=!0;var n=0,q=null,f=0,m=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==a&&null!=q&&null!=q[f]?q[f].getAttribute("name"):"pagenumber"==a?f+1:"pagecount"==a?null!=q?q.length:1:m.apply(this,arguments)};l.getLinkForCell=
-function(){return null};Editor.MathJaxRender&&l.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,f){a.editor.graph.mathEnabled&&Editor.MathJaxRender(l.container)}));var p=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),u=a.getCurrentFile(),v=null,t=null,x=null,y=null,D=mxUtils.button("",function(){null!=x&&l.zoomIn()});D.className="geSprite geSprite-zoomin";
-D.setAttribute("title",mxResources.get("zoomIn"));D.style.outline="none";D.style.border="none";D.style.margin="2px";D.setAttribute("disabled","disabled");mxUtils.setOpacity(D,20);var I=mxUtils.button("",function(){null!=x&&l.zoomOut()});I.className="geSprite geSprite-zoomout";I.setAttribute("title",mxResources.get("zoomOut"));I.style.outline="none";I.style.border="none";I.style.margin="2px";I.setAttribute("disabled","disabled");mxUtils.setOpacity(I,20);var z=mxUtils.button("",function(){null!=x&&
-(l.maxFitScale=8,l.fit(8),l.center())});z.className="geSprite geSprite-fit";z.setAttribute("title",mxResources.get("fit"));z.style.outline="none";z.style.border="none";z.style.margin="2px";z.setAttribute("disabled","disabled");mxUtils.setOpacity(z,20);var B=mxUtils.button("",function(){null!=x&&(l.zoomActual(),l.center())});B.className="geSprite geSprite-actualsize";B.setAttribute("title",mxResources.get("actualSize"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled",
+"376px";k.style.overflow="hidden";mxEvent.disableContextMenu(k);b.appendChild(k);var n=new Graph(k);n.setTooltips(!1);n.setEnabled(!1);n.setPanning(!0);n.panningHandler.ignoreCell=!0;n.panningHandler.useLeftButtonForPanning=!0;n.minFitScale=null;n.maxFitScale=null;n.centerZoom=!0;var m=0,t=null,f=0,l=n.getGlobalVariable;n.getGlobalVariable=function(a){return"page"==a&&null!=t&&null!=t[f]?t[f].getAttribute("name"):"pagenumber"==a?f+1:"pagecount"==a?null!=t?t.length:1:l.apply(this,arguments)};n.getLinkForCell=
+function(){return null};Editor.MathJaxRender&&n.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,f){a.editor.graph.mathEnabled&&Editor.MathJaxRender(n.container)}));var p=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),u=a.getCurrentFile(),v=null,q=null,x=null,y=null,D=mxUtils.button("",function(){null!=x&&n.zoomIn()});D.className="geSprite geSprite-zoomin";
+D.setAttribute("title",mxResources.get("zoomIn"));D.style.outline="none";D.style.border="none";D.style.margin="2px";D.setAttribute("disabled","disabled");mxUtils.setOpacity(D,20);var I=mxUtils.button("",function(){null!=x&&n.zoomOut()});I.className="geSprite geSprite-zoomout";I.setAttribute("title",mxResources.get("zoomOut"));I.style.outline="none";I.style.border="none";I.style.margin="2px";I.setAttribute("disabled","disabled");mxUtils.setOpacity(I,20);var z=mxUtils.button("",function(){null!=x&&
+(n.maxFitScale=8,n.fit(8),n.center())});z.className="geSprite geSprite-fit";z.setAttribute("title",mxResources.get("fit"));z.style.outline="none";z.style.border="none";z.style.margin="2px";z.setAttribute("disabled","disabled");mxUtils.setOpacity(z,20);var B=mxUtils.button("",function(){null!=x&&(n.zoomActual(),n.center())});B.className="geSprite geSprite-actualsize";B.setAttribute("title",mxResources.get("actualSize"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled",
"disabled");mxUtils.setOpacity(B,20);var C=document.createElement("div");C.style.position="absolute";C.style.textAlign="right";C.style.color="gray";C.style.marginTop="10px";C.style.backgroundColor="transparent";C.style.top="440px";C.style.right="32px";C.style.maxWidth="380px";C.style.cursor="default";var A=mxUtils.button(mxResources.get("download"),function(){if(null!=x){var b=mxUtils.getXml(x.documentElement),f=a.getBaseFilename()+".drawio";a.isLocalFileSave()?a.saveLocalFile(b,f,"text/xml"):(b=
"undefined"===typeof pako?"&xml="+encodeURIComponent(b):"&data="+encodeURIComponent(Graph.compress(b)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(f)+"&format=xml"+b)).simulate(document,"_blank"))}});A.className="geBtn";A.setAttribute("disabled","disabled");var G=mxUtils.button(mxResources.get("restore"),function(){null!=x&&null!=y&&a.confirm(mxResources.get("areYouSure"),function(){null!=d?d(y):a.spinner.spin(document.body,mxResources.get("restoring"))&&u.save(!0,function(b){a.spinner.stop();
a.replaceFileData(y);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});G.className="geBtn";G.setAttribute("disabled","disabled");var F=document.createElement("select");F.setAttribute("disabled","disabled");F.style.maxWidth="80px";F.style.position="relative";F.style.top="-2px";F.style.verticalAlign="bottom";F.style.marginRight="6px";F.style.display="none";var J=null;mxEvent.addListener(F,"change",function(a){null!=
-J&&(J(a),mxEvent.consume(a))});var H=mxUtils.button(mxResources.get("edit"),function(){null!=x&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(x.documentElement)),a.openLink(a.getUrl(),null,!0))});H.className="geBtn";H.setAttribute("disabled","disabled");null!=d&&(H.style.display="none");var E=mxUtils.button(mxResources.get("show"),function(){null!=t&&a.openLink(t.getUrl(F.selectedIndex))});E.className="geBtn gePrimaryBtn";E.setAttribute("disabled",
+J&&(J(a),mxEvent.consume(a))});var H=mxUtils.button(mxResources.get("edit"),function(){null!=x&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(x.documentElement)),a.openLink(a.getUrl(),null,!0))});H.className="geBtn";H.setAttribute("disabled","disabled");null!=d&&(H.style.display="none");var E=mxUtils.button(mxResources.get("show"),function(){null!=q&&a.openLink(q.getUrl(F.selectedIndex))});E.className="geBtn gePrimaryBtn";E.setAttribute("disabled",
"disabled");null!=d&&(E.style.display="none",G.className="geBtn gePrimaryBtn");g=document.createElement("div");g.style.position="absolute";g.style.top="482px";g.style.width="640px";g.style.textAlign="right";var K=document.createElement("div");K.className="geToolbarContainer";K.style.backgroundColor="transparent";K.style.padding="2px";K.style.border="none";K.style.left="199px";K.style.top="442px";var R=null;if(null!=c&&0<c.length){k.style.cursor="move";var N=document.createElement("table");N.style.border=
-"1px solid lightGray";N.style.borderCollapse="collapse";N.style.borderSpacing="0px";N.style.width="100%";var Y=document.createElement("tbody"),T=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(n=mxUtils.indexOf(a.pages,a.currentPage));for(var L=c.length-1;0<=L;L--){var V=function(b){var d=new Date(b.modifiedDate),m=null;if(0<=d.getTime()){var e=function(c){p.stop();var e=mxUtils.parseXml(c),g=a.editor.extractGraphModel(e.documentElement,!0);if(null!=g){var t=function(a){null!=a&&(a=
-v(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(a))).documentElement));return a},v=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";k.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,l.getModel());l.maxFitScale=1;l.fit(8);l.center();return a};F.style.display="none";F.innerHTML="";x=e;y=c;q=parseSelectFunction=null;f=0;if("mxfile"==g.nodeName){e=g.getElementsByTagName("diagram");q=[];for(c=0;c<e.length;c++)q.push(e[c]);f=Math.min(n,
-q.length-1);0<q.length&&t(q[f]);if(1<q.length)for(F.removeAttribute("disabled"),F.style.display="",c=0;c<q.length;c++)e=document.createElement("option"),mxUtils.write(e,q[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),e.setAttribute("value",c),c==f&&e.setAttribute("selected","selected"),F.appendChild(e);J=function(){try{var b=parseInt(F.value);f=n=b;t(q[b])}catch(O){F.value=n,a.handleError(O)}}}else v(g);c=b.lastModifyingUserName;null!=c&&20<c.length&&(c=c.substring(0,20)+"...");
-C.innerHTML="";mxUtils.write(C,(null!=c?c+" ":"")+d.toLocaleDateString()+" "+d.toLocaleTimeString());C.setAttribute("title",m.getAttribute("title"));D.removeAttribute("disabled");I.removeAttribute("disabled");z.removeAttribute("disabled");B.removeAttribute("disabled");null!=u&&u.isRestricted()||(a.editor.graph.isEnabled()&&G.removeAttribute("disabled"),A.removeAttribute("disabled"),E.removeAttribute("disabled"),H.removeAttribute("disabled"));mxUtils.setOpacity(D,60);mxUtils.setOpacity(I,60);mxUtils.setOpacity(z,
-60);mxUtils.setOpacity(B,60)}else F.style.display="none",F.innerHTML="",C.innerHTML="",mxUtils.write(C,mxResources.get("errorLoadingFile"))},m=document.createElement("tr");m.style.borderBottom="1px solid lightGray";m.style.fontSize="12px";m.style.cursor="pointer";var g=document.createElement("td");g.style.padding="6px";g.style.whiteSpace="nowrap";b==c[c.length-1]?mxUtils.write(g,mxResources.get("current")):d.toDateString()===T?mxUtils.write(g,d.toLocaleTimeString()):mxUtils.write(g,d.toLocaleDateString()+
-" "+d.toLocaleTimeString());m.appendChild(g);m.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+(null!=b.fileSize?" "+a.formatFileSize(parseInt(b.fileSize)):"")+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(m,"click",function(a){t!=b&&(p.stop(),null!=v&&(v.style.backgroundColor=""),t=b,v=m,v.style.backgroundColor="#ebf2f9",y=x=null,C.removeAttribute("title"),C.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+"..."),k.style.backgroundColor=
-"#ffffff",l.getModel().clear(),G.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),mxUtils.setOpacity(D,20),mxUtils.setOpacity(I,20),mxUtils.setOpacity(z,20),mxUtils.setOpacity(B,20),p.spin(k),b.getXml(function(a){if(t==
-b)try{e(a)}catch(ba){C.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+ba.message)}},function(a){p.stop();F.style.display="none";F.innerHTML="";C.innerHTML="";mxUtils.write(C,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(m,"dblclick",function(a){E.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);Y.appendChild(m)}return m}(c[L]);null!=V&&L==c.length-1&&(R=V)}N.appendChild(Y);
+"1px solid lightGray";N.style.borderCollapse="collapse";N.style.borderSpacing="0px";N.style.width="100%";var Y=document.createElement("tbody"),T=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(m=mxUtils.indexOf(a.pages,a.currentPage));for(var L=c.length-1;0<=L;L--){var V=function(b){var d=new Date(b.modifiedDate),l=null;if(0<=d.getTime()){var e=function(c){p.stop();var e=mxUtils.parseXml(c),g=a.editor.extractGraphModel(e.documentElement,!0);if(null!=g){var q=function(a){null!=a&&(a=
+v(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(a))).documentElement));return a},v=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";k.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,n.getModel());n.maxFitScale=1;n.fit(8);n.center();return a};F.style.display="none";F.innerHTML="";x=e;y=c;t=parseSelectFunction=null;f=0;if("mxfile"==g.nodeName){e=g.getElementsByTagName("diagram");t=[];for(c=0;c<e.length;c++)t.push(e[c]);f=Math.min(m,
+t.length-1);0<t.length&&q(t[f]);if(1<t.length)for(F.removeAttribute("disabled"),F.style.display="",c=0;c<t.length;c++)e=document.createElement("option"),mxUtils.write(e,t[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),e.setAttribute("value",c),c==f&&e.setAttribute("selected","selected"),F.appendChild(e);J=function(){try{var b=parseInt(F.value);f=m=b;q(t[b])}catch(O){F.value=m,a.handleError(O)}}}else v(g);c=b.lastModifyingUserName;null!=c&&20<c.length&&(c=c.substring(0,20)+"...");
+C.innerHTML="";mxUtils.write(C,(null!=c?c+" ":"")+d.toLocaleDateString()+" "+d.toLocaleTimeString());C.setAttribute("title",l.getAttribute("title"));D.removeAttribute("disabled");I.removeAttribute("disabled");z.removeAttribute("disabled");B.removeAttribute("disabled");null!=u&&u.isRestricted()||(a.editor.graph.isEnabled()&&G.removeAttribute("disabled"),A.removeAttribute("disabled"),E.removeAttribute("disabled"),H.removeAttribute("disabled"));mxUtils.setOpacity(D,60);mxUtils.setOpacity(I,60);mxUtils.setOpacity(z,
+60);mxUtils.setOpacity(B,60)}else F.style.display="none",F.innerHTML="",C.innerHTML="",mxUtils.write(C,mxResources.get("errorLoadingFile"))},l=document.createElement("tr");l.style.borderBottom="1px solid lightGray";l.style.fontSize="12px";l.style.cursor="pointer";var g=document.createElement("td");g.style.padding="6px";g.style.whiteSpace="nowrap";b==c[c.length-1]?mxUtils.write(g,mxResources.get("current")):d.toDateString()===T?mxUtils.write(g,d.toLocaleTimeString()):mxUtils.write(g,d.toLocaleDateString()+
+" "+d.toLocaleTimeString());l.appendChild(g);l.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+(null!=b.fileSize?" "+a.formatFileSize(parseInt(b.fileSize)):"")+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(l,"click",function(a){q!=b&&(p.stop(),null!=v&&(v.style.backgroundColor=""),q=b,v=l,v.style.backgroundColor="#ebf2f9",y=x=null,C.removeAttribute("title"),C.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+"..."),k.style.backgroundColor=
+"#ffffff",n.getModel().clear(),G.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),mxUtils.setOpacity(D,20),mxUtils.setOpacity(I,20),mxUtils.setOpacity(z,20),mxUtils.setOpacity(B,20),p.spin(k),b.getXml(function(a){if(q==
+b)try{e(a)}catch(ba){C.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+ba.message)}},function(a){p.stop();F.style.display="none";F.innerHTML="";C.innerHTML="";mxUtils.write(C,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(l,"dblclick",function(a){E.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);Y.appendChild(l)}return l}(c[L]);null!=V&&L==c.length-1&&(R=V)}N.appendChild(Y);
e.appendChild(N)}else null==u||null==a.drive&&u.constructor==window.DriveFile||null==a.dropbox&&u.constructor==window.DropboxFile?(k.style.display="none",K.style.display="none",mxUtils.write(e,mxResources.get("notAvailable"))):(k.style.display="none",K.style.display="none",mxUtils.write(e,mxResources.get("noRevisions")));this.init=function(){null!=R&&R.click()};e=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.className="geBtn";K.appendChild(F);K.appendChild(D);K.appendChild(I);
-K.appendChild(B);K.appendChild(z);a.editor.cancelFirst?(g.appendChild(e),g.appendChild(A),g.appendChild(H),g.appendChild(G),g.appendChild(E)):(g.appendChild(A),g.appendChild(H),g.appendChild(G),g.appendChild(E),g.appendChild(e));b.appendChild(g);b.appendChild(K);b.appendChild(C);this.container=b},DraftDialog=function(a,c,d,b,g,e,k,l){var n=document.createElement("div"),q=document.createElement("div");q.style.marginTop="0px";q.style.whiteSpace="nowrap";q.style.overflow="auto";mxUtils.write(q,c);n.appendChild(q);
-var f=document.createElement("div");f.style.position="absolute";f.style.border="1px solid lightGray";f.style.marginTop="10px";f.style.width="640px";f.style.top="46px";f.style.bottom="74px";f.style.overflow="hidden";mxEvent.disableContextMenu(f);n.appendChild(f);var m=new Graph(f);m.setEnabled(!1);m.setPanning(!0);m.panningHandler.ignoreCell=!0;m.panningHandler.useLeftButtonForPanning=!0;m.minFitScale=null;m.maxFitScale=null;m.centerZoom=!0;c=mxUtils.parseXml(d);var p=a.editor.extractGraphModel(c.documentElement,
-!0),u=0,v=null,t=m.getGlobalVariable;m.getGlobalVariable=function(a){return"page"==a&&null!=v&&null!=v[u]?v[u].getAttribute("name"):"pagenumber"==a?u+1:"pagecount"==a?null!=v?v.length:1:t.apply(this,arguments)};m.getLinkForCell=function(){return null};c=mxUtils.button("",function(){m.zoomIn()});c.className="geSprite geSprite-zoomin";c.setAttribute("title",mxResources.get("zoomIn"));c.style.outline="none";c.style.border="none";c.style.margin="2px";mxUtils.setOpacity(c,60);d=mxUtils.button("",function(){m.zoomOut()});
-d.className="geSprite geSprite-zoomout";d.setAttribute("title",mxResources.get("zoomOut"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);q=mxUtils.button("",function(){m.maxFitScale=8;m.fit(8);m.center()});q.className="geSprite geSprite-fit";q.setAttribute("title",mxResources.get("fit"));q.style.outline="none";q.style.border="none";q.style.margin="2px";mxUtils.setOpacity(q,60);var x=mxUtils.button("",function(){m.zoomActual();m.center()});x.className="geSprite geSprite-actualsize";
+K.appendChild(B);K.appendChild(z);a.editor.cancelFirst?(g.appendChild(e),g.appendChild(A),g.appendChild(H),g.appendChild(G),g.appendChild(E)):(g.appendChild(A),g.appendChild(H),g.appendChild(G),g.appendChild(E),g.appendChild(e));b.appendChild(g);b.appendChild(K);b.appendChild(C);this.container=b},DraftDialog=function(a,c,d,b,g,e,k,n){var m=document.createElement("div"),t=document.createElement("div");t.style.marginTop="0px";t.style.whiteSpace="nowrap";t.style.overflow="auto";mxUtils.write(t,c);m.appendChild(t);
+var f=document.createElement("div");f.style.position="absolute";f.style.border="1px solid lightGray";f.style.marginTop="10px";f.style.width="640px";f.style.top="46px";f.style.bottom="74px";f.style.overflow="hidden";mxEvent.disableContextMenu(f);m.appendChild(f);var l=new Graph(f);l.setEnabled(!1);l.setPanning(!0);l.panningHandler.ignoreCell=!0;l.panningHandler.useLeftButtonForPanning=!0;l.minFitScale=null;l.maxFitScale=null;l.centerZoom=!0;c=mxUtils.parseXml(d);var p=a.editor.extractGraphModel(c.documentElement,
+!0),u=0,v=null,q=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==a&&null!=v&&null!=v[u]?v[u].getAttribute("name"):"pagenumber"==a?u+1:"pagecount"==a?null!=v?v.length:1:q.apply(this,arguments)};l.getLinkForCell=function(){return null};c=mxUtils.button("",function(){l.zoomIn()});c.className="geSprite geSprite-zoomin";c.setAttribute("title",mxResources.get("zoomIn"));c.style.outline="none";c.style.border="none";c.style.margin="2px";mxUtils.setOpacity(c,60);d=mxUtils.button("",function(){l.zoomOut()});
+d.className="geSprite geSprite-zoomout";d.setAttribute("title",mxResources.get("zoomOut"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);t=mxUtils.button("",function(){l.maxFitScale=8;l.fit(8);l.center()});t.className="geSprite geSprite-fit";t.setAttribute("title",mxResources.get("fit"));t.style.outline="none";t.style.border="none";t.style.margin="2px";mxUtils.setOpacity(t,60);var x=mxUtils.button("",function(){l.zoomActual();l.center()});x.className="geSprite geSprite-actualsize";
x.setAttribute("title",mxResources.get("actualSize"));x.style.outline="none";x.style.border="none";x.style.margin="2px";mxUtils.setOpacity(x,60);g=mxUtils.button(k||mxResources.get("discard"),g);g.className="geBtn";var y=document.createElement("select");y.style.maxWidth="80px";y.style.position="relative";y.style.top="-2px";y.style.verticalAlign="bottom";y.style.marginRight="6px";y.style.display="none";b=mxUtils.button(e||mxResources.get("edit"),b);b.className="geBtn gePrimaryBtn";e=document.createElement("div");
-e.style.position="absolute";e.style.bottom="30px";e.style.width="640px";e.style.textAlign="right";k=document.createElement("div");k.className="geToolbarContainer";k.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function a(a){if(null!=a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";f.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,m.getModel());
-m.maxFitScale=1;m.fit(8);m.center()}}function b(b){null!=b&&(b=a(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(b))).documentElement));return b}mxEvent.addListener(y,"change",function(a){u=parseInt(y.value);b(v[u]);mxEvent.consume(a)});if("mxfile"==p.nodeName){var c=p.getElementsByTagName("diagram");v=[];for(var d=0;d<c.length;d++)v.push(c[d]);0<v.length&&b(v[u]);if(1<v.length)for(y.style.display="",d=0;d<v.length;d++)c=document.createElement("option"),mxUtils.write(c,v[d].getAttribute("name")||
-mxResources.get("pageWithNumber",[d+1])),c.setAttribute("value",d),d==u&&c.setAttribute("selected","selected"),y.appendChild(c)}else a(p)};k.appendChild(y);k.appendChild(c);k.appendChild(d);k.appendChild(x);k.appendChild(q);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";l=null!=l?mxUtils.button(mxResources.get("ignore"),l):null;null!=l&&(l.className="geBtn");a.editor.cancelFirst?(e.appendChild(c),null!=l&&e.appendChild(l),e.appendChild(g),e.appendChild(b)):
-(e.appendChild(b),e.appendChild(g),null!=l&&e.appendChild(l),e.appendChild(c));n.appendChild(e);n.appendChild(k);this.container=n},FindWindow=function(a,c,d,b,g){function e(a,b,c){if("object"===typeof b.value&&null!=b.value.attributes){b=b.value.attributes;for(var f=0;f<b.length;f++)if("label"!=b[f].nodeName){var d=mxUtils.trim(b[f].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&d.substring(0,c.length)===c||null!=a&&a.test(d))return!0}}return!1}function k(){var a=n.model.getDescendants(n.model.getRoot()),
-b=p.value.toLowerCase(),c=u.checked?new RegExp(b):null,d=null;q!=b&&(q=b,f=null);var m=null==f;if(0<b.length)for(var g=0;g<a.length;g++){var k=n.view.getState(a[g]);if(null!=k&&null!=k.cell.value&&(m||null==d)&&(n.model.isVertex(k.cell)||n.model.isEdge(k.cell))&&(n.isHtmlLabel(k.cell)?(t.innerHTML=n.getLabel(k.cell),label=mxUtils.extractTextWithWhitespace([t])):label=n.getLabel(k.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==c&&(label.substring(0,b.length)===
-b||e(c,k.cell,b))||null!=c&&(c.test(label)||e(c,k.cell,b))))if(m){d=k;break}else null==d&&(d=k);m=m||k==f}null!=d?(f=d,n.scrollCellToVisible(f.cell),n.isEnabled()?n.setSelectionCell(f.cell):n.highlightCell(f.cell)):n.isEnabled()&&n.clearSelection();return 0==b.length||null!=d}var l=a.actions.get("find"),n=a.editor.graph,q=null,f=null,m=document.createElement("div");m.style.userSelect="none";m.style.overflow="hidden";m.style.padding="10px";m.style.height="100%";var p=document.createElement("input");
-p.setAttribute("placeholder",mxResources.get("find"));p.setAttribute("type","text");p.style.marginTop="4px";p.style.marginBottom="6px";p.style.width="200px";p.style.fontSize="12px";p.style.borderRadius="4px";p.style.padding="6px";m.appendChild(p);mxUtils.br(m);var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginRight="4px";m.appendChild(u);mxUtils.write(m,mxResources.get("regularExpression"));var v=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000088250");
-v.style.position="relative";v.style.marginLeft="6px";v.style.top="-1px";m.appendChild(v);var t=document.createElement("div");mxUtils.br(m);v=mxUtils.button(mxResources.get("reset"),function(){p.value="";p.style.backgroundColor="";q=f=null;p.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.marginTop="6px";v.style.marginRight="4px";v.className="geBtn";m.appendChild(v);v=mxUtils.button(mxResources.get("find"),function(){try{p.style.backgroundColor=k()?"":"#ffcfcf"}catch(y){a.handleError(y)}});
-v.setAttribute("title",mxResources.get("find")+" (Enter)");v.style.marginTop="6px";v.className="geBtn gePrimaryBtn";m.appendChild(v);mxEvent.addListener(p,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)l.funct();else if(q!=p.value.toLowerCase()||13==a.keyCode)try{p.style.backgroundColor=k()?"":"#ffcfcf"}catch(D){p.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(m,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&
-(l.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),m,c,d,b,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):n.container.focus()}));this.window.setLocation=
+e.style.position="absolute";e.style.bottom="30px";e.style.width="640px";e.style.textAlign="right";k=document.createElement("div");k.className="geToolbarContainer";k.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function a(a){if(null!=a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";f.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,l.getModel());
+l.maxFitScale=1;l.fit(8);l.center()}}function b(b){null!=b&&(b=a(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(b))).documentElement));return b}mxEvent.addListener(y,"change",function(a){u=parseInt(y.value);b(v[u]);mxEvent.consume(a)});if("mxfile"==p.nodeName){var c=p.getElementsByTagName("diagram");v=[];for(var d=0;d<c.length;d++)v.push(c[d]);0<v.length&&b(v[u]);if(1<v.length)for(y.style.display="",d=0;d<v.length;d++)c=document.createElement("option"),mxUtils.write(c,v[d].getAttribute("name")||
+mxResources.get("pageWithNumber",[d+1])),c.setAttribute("value",d),d==u&&c.setAttribute("selected","selected"),y.appendChild(c)}else a(p)};k.appendChild(y);k.appendChild(c);k.appendChild(d);k.appendChild(x);k.appendChild(t);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";n=null!=n?mxUtils.button(mxResources.get("ignore"),n):null;null!=n&&(n.className="geBtn");a.editor.cancelFirst?(e.appendChild(c),null!=n&&e.appendChild(n),e.appendChild(g),e.appendChild(b)):
+(e.appendChild(b),e.appendChild(g),null!=n&&e.appendChild(n),e.appendChild(c));m.appendChild(e);m.appendChild(k);this.container=m},FindWindow=function(a,c,d,b,g){function e(a,b,c){if("object"===typeof b.value&&null!=b.value.attributes){b=b.value.attributes;for(var f=0;f<b.length;f++)if("label"!=b[f].nodeName){var d=mxUtils.trim(b[f].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&d.substring(0,c.length)===c||null!=a&&a.test(d))return!0}}return!1}function k(){var a=m.model.getDescendants(m.model.getRoot()),
+b=p.value.toLowerCase(),c=u.checked?new RegExp(b):null,d=null;t!=b&&(t=b,f=null);var l=null==f;if(0<b.length)for(var g=0;g<a.length;g++){var k=m.view.getState(a[g]);if(null!=k&&null!=k.cell.value&&(l||null==d)&&(m.model.isVertex(k.cell)||m.model.isEdge(k.cell))&&(m.isHtmlLabel(k.cell)?(q.innerHTML=m.getLabel(k.cell),label=mxUtils.extractTextWithWhitespace([q])):label=m.getLabel(k.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==c&&(label.substring(0,b.length)===
+b||e(c,k.cell,b))||null!=c&&(c.test(label)||e(c,k.cell,b))))if(l){d=k;break}else null==d&&(d=k);l=l||k==f}null!=d?(f=d,m.scrollCellToVisible(f.cell),m.isEnabled()?m.setSelectionCell(f.cell):m.highlightCell(f.cell)):m.isEnabled()&&m.clearSelection();return 0==b.length||null!=d}var n=a.actions.get("find"),m=a.editor.graph,t=null,f=null,l=document.createElement("div");l.style.userSelect="none";l.style.overflow="hidden";l.style.padding="10px";l.style.height="100%";var p=document.createElement("input");
+p.setAttribute("placeholder",mxResources.get("find"));p.setAttribute("type","text");p.style.marginTop="4px";p.style.marginBottom="6px";p.style.width="200px";p.style.fontSize="12px";p.style.borderRadius="4px";p.style.padding="6px";l.appendChild(p);mxUtils.br(l);var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginRight="4px";l.appendChild(u);mxUtils.write(l,mxResources.get("regularExpression"));var v=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000088250");
+v.style.position="relative";v.style.marginLeft="6px";v.style.top="-1px";l.appendChild(v);var q=document.createElement("div");mxUtils.br(l);v=mxUtils.button(mxResources.get("reset"),function(){p.value="";p.style.backgroundColor="";t=f=null;p.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.marginTop="6px";v.style.marginRight="4px";v.className="geBtn";l.appendChild(v);v=mxUtils.button(mxResources.get("find"),function(){try{p.style.backgroundColor=k()?"":"#ffcfcf"}catch(y){a.handleError(y)}});
+v.setAttribute("title",mxResources.get("find")+" (Enter)");v.style.marginTop="6px";v.className="geBtn gePrimaryBtn";l.appendChild(v);mxEvent.addListener(p,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)n.funct();else if(t!=p.value.toLowerCase()||13==a.keyCode)try{p.style.backgroundColor=k()?"":"#ffcfcf"}catch(D){p.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(l,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&
+(n.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),l,c,d,b,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):m.container.focus()}));this.window.setLocation=
function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var x=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,
"resize",x);this.destroy=function(){mxEvent.removeListener(window,"resize",x);this.window.destroy()}},FreehandWindow=function(a,c,d,b,g){var e=a.editor.graph;a=document.createElement("div");a.style.userSelect="none";a.style.overflow="hidden";a.style.height="100%";var k=mxUtils.button(mxResources.get("startDrawing"),function(){e.freehand.isDrawing()&&e.freehand.stopDrawing();e.freehand.startDrawing()});k.setAttribute("title",mxResources.get("startDrawing"));k.style.marginTop="8px";k.style.marginRight=
-"4px";k.style.width="160px";k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.textAlign="center";k.className="geBtn gePrimaryBtn";a.appendChild(k);var l=k.cloneNode(!1);mxUtils.write(l,mxResources.get("stopDrawing"));l.setAttribute("title",mxResources.get("stopDrawing"));l.style.marginTop="4px";mxEvent.addListener(l,"click",function(){e.freehand.stopDrawing()});a.appendChild(l);this.window=new mxWindow(mxResources.get("freehand"),a,c,d,b,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
-this.window.setResizable(!1);this.window.setClosable(!0);e.addListener("freehandStateChanged",mxUtils.bind(this,function(){l.className="geBtn"+(e.freehand.isDrawing()?" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){e.freehand.isDrawing()&&e.freehand.stopDrawing()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;
-a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var n=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",n);this.destroy=function(){mxEvent.removeListener(window,"resize",n);this.window.destroy()}},
-TagsWindow=function(a,c,d,b,g){var e=a.editor.graph,k="tags",l=document.createElement("div");l.style.userSelect="none";l.style.overflow="hidden";l.style.padding="10px";l.style.height="100%";var n=document.createElement("input");n.setAttribute("placeholder",mxResources.get("allTags"));n.setAttribute("type","text");n.style.marginTop="4px";n.style.width="260px";n.style.fontSize="12px";n.style.borderRadius="4px";n.style.padding="6px";l.appendChild(n);if(!a.isOffline()||mxClient.IS_CHROMEAPP){n.style.width=
-"240px";var q=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");q.firstChild.style.marginBottom="6px";q.style.marginLeft="6px";l.appendChild(q)}mxEvent.addListener(n,"dblclick",function(){var b=new FilenameDialog(a,k,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(k=a)}),mxResources.get("enterPropertyName"));a.showDialog(b.container,300,80,!0,!0);b.init()});n.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(l);
-q=mxUtils.button(mxResources.get("hide"),function(){var a=e.getCellsForTags(n.value.split(" "),void 0,k,!0);e.setCellsVisible(a,!1)});q.setAttribute("title",mxResources.get("hide"));q.style.marginTop="8px";q.style.marginRight="4px";q.className="geBtn";l.appendChild(q);q=mxUtils.button(mxResources.get("show"),function(){var a=e.getCellsForTags(n.value.split(" "),void 0,k,!0);e.setCellsVisible(a,!0);if(e.isEnabled()){for(var b=[],c=0;c<a.length;c++)(e.model.isVertex(a[c])||e.model.isEdge(a[c]))&&b.push(a[c]);
-e.setSelectionCells(b)}else for(c=0;c<a.length;c++)e.highlightCell(a[c])});q.setAttribute("title",mxResources.get("show"));q.style.marginTop="8px";q.style.marginRight="4px";q.className="geBtn";l.appendChild(q);var f=a.actions.get("tags"),q=mxUtils.button(mxResources.get("close"),function(){f.funct()});q.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");q.style.marginTop="8px";q.className="geBtn gePrimaryBtn";l.appendChild(q);mxEvent.addListener(n,"keyup",function(a){13!=a.keyCode&&27!=
-a.keyCode||f.funct()});this.window=new mxWindow(mxResources.get("tags"),l,c,d,b,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)):e.container.focus()}));this.window.setLocation=function(a,
-b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var m=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,
-"resize",m);this.destroy=function(){mxEvent.removeListener(window,"resize",m);this.window.destroy()}},AuthDialog=function(a,c,d,b){var g=document.createElement("div");g.style.textAlign="center";var e=document.createElement("p");e.style.fontSize="16pt";e.style.padding="0px";e.style.margin="0px";e.style.color="gray";mxUtils.write(e,mxResources.get("authorizationRequired"));var k="Unknown",l=document.createElement("img");l.setAttribute("border","0");l.setAttribute("align","absmiddle");l.style.marginRight=
-"10px";c==a.drive?(k=mxResources.get("googleDrive"),l.src=IMAGE_PATH+"/google-drive-logo-white.svg"):c==a.dropbox?(k=mxResources.get("dropbox"),l.src=IMAGE_PATH+"/dropbox-logo-white.svg"):c==a.oneDrive?(k=mxResources.get("oneDrive"),l.src=IMAGE_PATH+"/onedrive-logo-white.svg"):c==a.gitHub?(k=mxResources.get("github"),l.src=IMAGE_PATH+"/github-logo-white.svg"):c==a.gitLab?(k=mxResources.get("gitlab"),l.src=IMAGE_PATH+"/gitlab-logo.svg",l.style.width="32px"):c==a.trello&&(k=mxResources.get("trello"),
-l.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[k]));var n=document.createElement("input");n.setAttribute("type","checkbox");k=mxUtils.button(mxResources.get("authorize"),function(){b(n.checked)});k.insertBefore(l,k.firstChild);k.style.marginTop="6px";k.className="geBigButton";k.style.fontSize="18px";k.style.padding="14px";g.appendChild(e);g.appendChild(a);g.appendChild(k);d&&(d=document.createElement("p"),d.style.marginTop=
-"20px",d.appendChild(n),e=document.createElement("span"),mxUtils.write(e," "+mxResources.get("rememberMe")),d.appendChild(e),g.appendChild(d),n.checked=!0,n.defaultChecked=!0,mxEvent.addListener(e,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)}));this.container=g},MoreShapesDialog=function(a,c,d){d=null!=d?d:a.sidebar.entries;var b=document.createElement("div"),g=[];if(null!=a.sidebar.customEntries)for(var e=0;e<a.sidebar.customEntries.length;e++){for(var k=a.sidebar.customEntries[e],
-l={title:a.getResource(k.title),entries:[]},n=0;n<k.entries.length;n++){var q=k.entries[n];l.entries.push({id:q.id,title:a.getResource(q.title),desc:a.getResource(q.desc),image:q.preview})}g.push(l)}for(e=0;e<d.length;e++)if(null==a.sidebar.enabledLibraries)g.push(d[e]);else{l={title:d[e].title,entries:[]};for(n=0;n<d[e].entries.length;n++)0<=mxUtils.indexOf(a.sidebar.enabledLibraries,d[e].entries[n].id)&&l.entries.push(d[e].entries[n]);0<l.entries.length&&g.push(l)}d=g;if(c){n=mxUtils.bind(this,
+"4px";k.style.width="160px";k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.textAlign="center";k.className="geBtn gePrimaryBtn";a.appendChild(k);var n=k.cloneNode(!1);mxUtils.write(n,mxResources.get("stopDrawing"));n.setAttribute("title",mxResources.get("stopDrawing"));n.style.marginTop="4px";mxEvent.addListener(n,"click",function(){e.freehand.stopDrawing()});a.appendChild(n);this.window=new mxWindow(mxResources.get("freehand"),a,c,d,b,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
+this.window.setResizable(!1);this.window.setClosable(!0);e.addListener("freehandStateChanged",mxUtils.bind(this,function(){n.className="geBtn"+(e.freehand.isDrawing()?" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){e.freehand.isDrawing()&&e.freehand.stopDrawing()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;
+a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var m=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",m);this.destroy=function(){mxEvent.removeListener(window,"resize",m);this.window.destroy()}},
+TagsWindow=function(a,c,d,b,g){var e=a.editor.graph,k="tags",n=document.createElement("div");n.style.userSelect="none";n.style.overflow="hidden";n.style.padding="10px";n.style.height="100%";var m=document.createElement("input");m.setAttribute("placeholder",mxResources.get("allTags"));m.setAttribute("type","text");m.style.marginTop="4px";m.style.width="260px";m.style.fontSize="12px";m.style.borderRadius="4px";m.style.padding="6px";n.appendChild(m);if(!a.isOffline()||mxClient.IS_CHROMEAPP){m.style.width=
+"240px";var t=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");t.firstChild.style.marginBottom="6px";t.style.marginLeft="6px";n.appendChild(t)}mxEvent.addListener(m,"dblclick",function(){var b=new FilenameDialog(a,k,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(k=a)}),mxResources.get("enterPropertyName"));a.showDialog(b.container,300,80,!0,!0);b.init()});m.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(n);
+t=mxUtils.button(mxResources.get("hide"),function(){var a=e.getCellsForTags(m.value.split(" "),void 0,k,!0);e.setCellsVisible(a,!1)});t.setAttribute("title",mxResources.get("hide"));t.style.marginTop="8px";t.style.marginRight="4px";t.className="geBtn";n.appendChild(t);t=mxUtils.button(mxResources.get("show"),function(){var a=e.getCellsForTags(m.value.split(" "),void 0,k,!0);e.setCellsVisible(a,!0);if(e.isEnabled()){for(var b=[],c=0;c<a.length;c++)(e.model.isVertex(a[c])||e.model.isEdge(a[c]))&&b.push(a[c]);
+e.setSelectionCells(b)}else for(c=0;c<a.length;c++)e.highlightCell(a[c])});t.setAttribute("title",mxResources.get("show"));t.style.marginTop="8px";t.style.marginRight="4px";t.className="geBtn";n.appendChild(t);var f=a.actions.get("tags"),t=mxUtils.button(mxResources.get("close"),function(){f.funct()});t.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");t.style.marginTop="8px";t.className="geBtn gePrimaryBtn";n.appendChild(t);mxEvent.addListener(m,"keyup",function(a){13!=a.keyCode&&27!=
+a.keyCode||f.funct()});this.window=new mxWindow(mxResources.get("tags"),n,c,d,b,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):e.container.focus()}));this.window.setLocation=function(a,
+b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var l=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,
+"resize",l);this.destroy=function(){mxEvent.removeListener(window,"resize",l);this.window.destroy()}},AuthDialog=function(a,c,d,b){var g=document.createElement("div");g.style.textAlign="center";var e=document.createElement("p");e.style.fontSize="16pt";e.style.padding="0px";e.style.margin="0px";e.style.color="gray";mxUtils.write(e,mxResources.get("authorizationRequired"));var k="Unknown",n=document.createElement("img");n.setAttribute("border","0");n.setAttribute("align","absmiddle");n.style.marginRight=
+"10px";c==a.drive?(k=mxResources.get("googleDrive"),n.src=IMAGE_PATH+"/google-drive-logo-white.svg"):c==a.dropbox?(k=mxResources.get("dropbox"),n.src=IMAGE_PATH+"/dropbox-logo-white.svg"):c==a.oneDrive?(k=mxResources.get("oneDrive"),n.src=IMAGE_PATH+"/onedrive-logo-white.svg"):c==a.gitHub?(k=mxResources.get("github"),n.src=IMAGE_PATH+"/github-logo-white.svg"):c==a.gitLab?(k=mxResources.get("gitlab"),n.src=IMAGE_PATH+"/gitlab-logo.svg",n.style.width="32px"):c==a.trello&&(k=mxResources.get("trello"),
+n.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[k]));var m=document.createElement("input");m.setAttribute("type","checkbox");k=mxUtils.button(mxResources.get("authorize"),function(){b(m.checked)});k.insertBefore(n,k.firstChild);k.style.marginTop="6px";k.className="geBigButton";k.style.fontSize="18px";k.style.padding="14px";g.appendChild(e);g.appendChild(a);g.appendChild(k);d&&(d=document.createElement("p"),d.style.marginTop=
+"20px",d.appendChild(m),e=document.createElement("span"),mxUtils.write(e," "+mxResources.get("rememberMe")),d.appendChild(e),g.appendChild(d),m.checked=!0,m.defaultChecked=!0,mxEvent.addListener(e,"click",function(a){m.checked=!m.checked;mxEvent.consume(a)}));this.container=g},MoreShapesDialog=function(a,c,d){d=null!=d?d:a.sidebar.entries;var b=document.createElement("div"),g=[];if(null!=a.sidebar.customEntries)for(var e=0;e<a.sidebar.customEntries.length;e++){for(var k=a.sidebar.customEntries[e],
+n={title:a.getResource(k.title),entries:[]},m=0;m<k.entries.length;m++){var t=k.entries[m];n.entries.push({id:t.id,title:a.getResource(t.title),desc:a.getResource(t.desc),image:t.preview})}g.push(n)}for(e=0;e<d.length;e++)if(null==a.sidebar.enabledLibraries)g.push(d[e]);else{n={title:d[e].title,entries:[]};for(m=0;m<d[e].entries.length;m++)0<=mxUtils.indexOf(a.sidebar.enabledLibraries,d[e].entries[m].id)&&n.entries.push(d[e].entries[m]);0<n.entries.length&&g.push(n)}d=g;if(c){m=mxUtils.bind(this,
function(b){for(var c=0;c<b.length;c++)(function(b){var d=v.cloneNode(!1);d.style.fontWeight="bold";d.style.backgroundColor="dark"==uiTheme?"#505759":"#e5e5e5";d.style.padding="6px 0px 6px 20px";mxUtils.write(d,b.title);f.appendChild(d);for(var e=0;e<b.entries.length;e++)(function(b){var d=v.cloneNode(!1);d.style.cursor="pointer";d.style.padding="4px 0px 4px 20px";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.setAttribute("title",b.title+" ("+b.id+")");var g=
-document.createElement("input");g.setAttribute("type","checkbox");g.checked=a.sidebar.isEntryVisible(b.id);g.defaultChecked=g.checked;d.appendChild(g);mxUtils.write(d," "+b.title);f.appendChild(d);var k=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName){m.style.textAlign="center";m.style.padding="0px";m.style.color="";m.innerHTML="";if(null!=b.desc){var c=document.createElement("pre");c.style.boxSizing="border-box";c.style.fontFamily="inherit";c.style.margin="20px";c.style.right="0px";
-c.style.textAlign="left";mxUtils.write(c,b.desc);m.appendChild(c)}null!=b.imageCallback?b.imageCallback(m):null!=b.image?m.innerHTML+='<img border="0" src="'+b.image+'"/>':null==b.desc&&(m.style.padding="20px",m.style.color="rgb(179, 179, 179)",mxUtils.write(m,mxResources.get("noPreview")));null!=p&&(p.style.backgroundColor="");p=d;p.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9";null!=a&&mxEvent.consume(a)}};mxEvent.addListener(d,"click",k);mxEvent.addListener(d,"dblclick",function(a){g.checked=
-!g.checked;mxEvent.consume(a)});u.push(function(){return g.checked?b.id:null});0==c&&0==e&&k()})(b.entries[e])})(b[c])});e=document.createElement("div");e.className="geDialogTitle";mxUtils.write(e,mxResources.get("shapes"));e.style.position="absolute";e.style.top="0px";e.style.left="0px";e.style.lineHeight="40px";e.style.height="40px";e.style.right="0px";mxClient.IS_QUIRKS&&(e.style.width="718px");var f=document.createElement("div"),m=document.createElement("div");f.style.position="absolute";f.style.top=
-"40px";f.style.left="0px";f.style.width="202px";f.style.bottom="60px";f.style.overflow="auto";mxClient.IS_QUIRKS&&(f.style.height="437px",f.style.marginTop="1px");m.style.position="absolute";m.style.left="202px";m.style.right="0px";m.style.top="40px";m.style.bottom="60px";m.style.overflow="auto";m.style.borderLeft="1px solid rgb(211, 211, 211)";m.style.textAlign="center";mxClient.IS_QUIRKS&&(m.style.width=parseInt(e.style.width)-202+"px",m.style.height=f.style.height,m.style.marginTop=f.style.marginTop);
-var p=null,u=[],v=document.createElement("div");v.style.position="relative";v.style.left="0px";v.style.right="0px";n(d);b.style.padding="30px";b.appendChild(e);b.appendChild(f);b.appendChild(m);d=document.createElement("div");d.className="geDialogFooter";d.style.position="absolute";d.style.paddingRight="16px";d.style.color="gray";d.style.left="0px";d.style.right="0px";d.style.bottom="0px";d.style.height="60px";d.style.lineHeight="52px";mxClient.IS_QUIRKS&&(d.style.width=e.style.width,d.style.paddingTop=
-"12px");var t=document.createElement("input");t.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)e=document.createElement("span"),e.style.paddingRight="20px",e.appendChild(t),mxUtils.write(e," "+mxResources.get("rememberThisSetting")),t.checked=!0,t.defaultChecked=!0,mxEvent.addListener(e,"click",function(a){mxEvent.getSource(a)!=t&&(t.checked=!t.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(e.style.position="relative",e.style.top="-6px"),d.appendChild(e);e=mxUtils.button(mxResources.get("cancel"),
-function(){a.hideDialog()});e.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],c=0;c<u.length;c++){var f=u[c].apply(this,arguments);null!=f&&b.push(f)}a.sidebar.showEntries(b.join(";"),t.checked,!0)});n.className="geBtn gePrimaryBtn"}else{var x=document.createElement("table"),e=document.createElement("tbody");b.style.height="100%";b.style.overflow="auto";n=document.createElement("tr");x.style.width="100%";c=document.createElement("td");var g=document.createElement("td"),
-k=document.createElement("td"),y=mxUtils.bind(this,function(b,c,f){var d=document.createElement("input");d.type="checkbox";x.appendChild(d);d.checked=a.sidebar.isEntryVisible(f);var m=document.createElement("span");mxUtils.write(m,c);c=document.createElement("div");c.style.display="block";c.appendChild(d);c.appendChild(m);mxEvent.addListener(m,"click",function(a){d.checked=!d.checked;mxEvent.consume(a)});b.appendChild(c);return function(){return d.checked?f:null}});n.appendChild(c);n.appendChild(g);
-n.appendChild(k);e.appendChild(n);x.appendChild(e);for(var u=[],D=0,e=0;e<d.length;e++)for(n=0;n<d[e].entries.length;n++)D++;for(var I=[c,g,k],z=0,e=0;e<d.length;e++)(function(a){for(var b=0;b<a.entries.length;b++){var c=a.entries[b];u.push(y(I[Math.floor(z/(D/3))],c.title,c.id));z++}})(d[e]);b.appendChild(x);d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="center";t=document.createElement("input");isLocalStorage&&(t.setAttribute("type","checkbox"),t.checked=!0,t.defaultChecked=
-!0,d.appendChild(t),e=document.createElement("span"),mxUtils.write(e," "+mxResources.get("rememberThisSetting")),d.appendChild(e),mxEvent.addListener(e,"click",function(a){t.checked=!t.checked;mxEvent.consume(a)}));b.appendChild(d);e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],c=0;c<u.length;c++){var f=u[c].apply(this,arguments);null!=f&&b.push(f)}a.sidebar.showEntries(0<b.length?
-b.join(";"):"",t.checked);a.hideDialog()});n.className="geBtn gePrimaryBtn";d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right"}a.editor.cancelFirst?(d.appendChild(e),d.appendChild(n)):(d.appendChild(n),d.appendChild(e));b.appendChild(d);this.container=b},PluginsDialog=function(a){function c(){if(0==g.length)b.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{b.innerHTML="";for(var f=0;f<g.length;f++){var d=document.createElement("span");d.style.whiteSpace=
+document.createElement("input");g.setAttribute("type","checkbox");g.checked=a.sidebar.isEntryVisible(b.id);g.defaultChecked=g.checked;d.appendChild(g);mxUtils.write(d," "+b.title);f.appendChild(d);var k=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName){l.style.textAlign="center";l.style.padding="0px";l.style.color="";l.innerHTML="";if(null!=b.desc){var c=document.createElement("pre");c.style.boxSizing="border-box";c.style.fontFamily="inherit";c.style.margin="20px";c.style.right="0px";
+c.style.textAlign="left";mxUtils.write(c,b.desc);l.appendChild(c)}null!=b.imageCallback?b.imageCallback(l):null!=b.image?l.innerHTML+='<img border="0" src="'+b.image+'"/>':null==b.desc&&(l.style.padding="20px",l.style.color="rgb(179, 179, 179)",mxUtils.write(l,mxResources.get("noPreview")));null!=p&&(p.style.backgroundColor="");p=d;p.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9";null!=a&&mxEvent.consume(a)}};mxEvent.addListener(d,"click",k);mxEvent.addListener(d,"dblclick",function(a){g.checked=
+!g.checked;mxEvent.consume(a)});u.push(function(){return g.checked?b.id:null});0==c&&0==e&&k()})(b.entries[e])})(b[c])});e=document.createElement("div");e.className="geDialogTitle";mxUtils.write(e,mxResources.get("shapes"));e.style.position="absolute";e.style.top="0px";e.style.left="0px";e.style.lineHeight="40px";e.style.height="40px";e.style.right="0px";mxClient.IS_QUIRKS&&(e.style.width="718px");var f=document.createElement("div"),l=document.createElement("div");f.style.position="absolute";f.style.top=
+"40px";f.style.left="0px";f.style.width="202px";f.style.bottom="60px";f.style.overflow="auto";mxClient.IS_QUIRKS&&(f.style.height="437px",f.style.marginTop="1px");l.style.position="absolute";l.style.left="202px";l.style.right="0px";l.style.top="40px";l.style.bottom="60px";l.style.overflow="auto";l.style.borderLeft="1px solid rgb(211, 211, 211)";l.style.textAlign="center";mxClient.IS_QUIRKS&&(l.style.width=parseInt(e.style.width)-202+"px",l.style.height=f.style.height,l.style.marginTop=f.style.marginTop);
+var p=null,u=[],v=document.createElement("div");v.style.position="relative";v.style.left="0px";v.style.right="0px";m(d);b.style.padding="30px";b.appendChild(e);b.appendChild(f);b.appendChild(l);d=document.createElement("div");d.className="geDialogFooter";d.style.position="absolute";d.style.paddingRight="16px";d.style.color="gray";d.style.left="0px";d.style.right="0px";d.style.bottom="0px";d.style.height="60px";d.style.lineHeight="52px";mxClient.IS_QUIRKS&&(d.style.width=e.style.width,d.style.paddingTop=
+"12px");var q=document.createElement("input");q.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)e=document.createElement("span"),e.style.paddingRight="20px",e.appendChild(q),mxUtils.write(e," "+mxResources.get("rememberThisSetting")),q.checked=!0,q.defaultChecked=!0,mxEvent.addListener(e,"click",function(a){mxEvent.getSource(a)!=q&&(q.checked=!q.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(e.style.position="relative",e.style.top="-6px"),d.appendChild(e);e=mxUtils.button(mxResources.get("cancel"),
+function(){a.hideDialog()});e.className="geBtn";m=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],c=0;c<u.length;c++){var f=u[c].apply(this,arguments);null!=f&&b.push(f)}a.sidebar.showEntries(b.join(";"),q.checked,!0)});m.className="geBtn gePrimaryBtn"}else{var x=document.createElement("table"),e=document.createElement("tbody");b.style.height="100%";b.style.overflow="auto";m=document.createElement("tr");x.style.width="100%";c=document.createElement("td");var g=document.createElement("td"),
+k=document.createElement("td"),y=mxUtils.bind(this,function(b,c,f){var d=document.createElement("input");d.type="checkbox";x.appendChild(d);d.checked=a.sidebar.isEntryVisible(f);var l=document.createElement("span");mxUtils.write(l,c);c=document.createElement("div");c.style.display="block";c.appendChild(d);c.appendChild(l);mxEvent.addListener(l,"click",function(a){d.checked=!d.checked;mxEvent.consume(a)});b.appendChild(c);return function(){return d.checked?f:null}});m.appendChild(c);m.appendChild(g);
+m.appendChild(k);e.appendChild(m);x.appendChild(e);for(var u=[],D=0,e=0;e<d.length;e++)for(m=0;m<d[e].entries.length;m++)D++;for(var I=[c,g,k],z=0,e=0;e<d.length;e++)(function(a){for(var b=0;b<a.entries.length;b++){var c=a.entries[b];u.push(y(I[Math.floor(z/(D/3))],c.title,c.id));z++}})(d[e]);b.appendChild(x);d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="center";q=document.createElement("input");isLocalStorage&&(q.setAttribute("type","checkbox"),q.checked=!0,q.defaultChecked=
+!0,d.appendChild(q),e=document.createElement("span"),mxUtils.write(e," "+mxResources.get("rememberThisSetting")),d.appendChild(e),mxEvent.addListener(e,"click",function(a){q.checked=!q.checked;mxEvent.consume(a)}));b.appendChild(d);e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";m=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],c=0;c<u.length;c++){var f=u[c].apply(this,arguments);null!=f&&b.push(f)}a.sidebar.showEntries(0<b.length?
+b.join(";"):"",q.checked);a.hideDialog()});m.className="geBtn gePrimaryBtn";d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right"}a.editor.cancelFirst?(d.appendChild(e),d.appendChild(m)):(d.appendChild(m),d.appendChild(e));b.appendChild(d);this.container=b},PluginsDialog=function(a){function c(){if(0==g.length)b.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{b.innerHTML="";for(var f=0;f<g.length;f++){var d=document.createElement("span");d.style.whiteSpace=
"nowrap";var p=document.createElement("span");p.className="geSprite geSprite-delete";p.style.position="relative";p.style.cursor="pointer";p.style.top="5px";p.style.marginRight="4px";p.style.display="inline-block";d.appendChild(p);mxUtils.write(d,g[f]);b.appendChild(d);mxUtils.br(b);mxEvent.addListener(p,"click",function(b){return function(){a.confirm(mxResources.get("delete")+' "'+g[b]+'"?',function(){g.splice(b,1);c()})}}(f))}}}var d=document.createElement("div"),b=document.createElement("div");
b.style.height="120px";b.style.overflow="auto";var g=mxSettings.getPlugins().slice();d.appendChild(b);c();var e=mxUtils.button(mxResources.get("add"),function(){var b="",d=urlParams.p;if(null!=d&&0<d.length){for(var p=d.split(";"),d=0;d<p.length;d++){var e=App.pluginRegistry[p[d]];null!=e&&(b+=e+";")}";"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1))}b=new FilenameDialog(a,b,mxResources.get("add"),function(a){if(null!=a&&0<a.length){p=a.split(";");for(a=0;a<p.length;a++){var b=p[a],f=App.pluginRegistry[b];
-null!=f&&(b=f);0<b.length&&0>mxUtils.indexOf(g,b)&&g.push(b)}c()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");a.showDialog(b.container,300,80,!0,!0);b.init()});e.className="geBtn";var k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";var l=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(g);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});l.className="geBtn gePrimaryBtn";var n=
-document.createElement("div");n.style.marginTop="14px";n.style.textAlign="right";var q=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});q.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(q.style.display="none");n.appendChild(q);a.editor.cancelFirst?(n.appendChild(k),n.appendChild(e),n.appendChild(l)):(n.appendChild(e),n.appendChild(l),n.appendChild(k));d.appendChild(n);this.container=d},CropImageDialog=function(a,
-c,d){var b=document.createElement("div"),g=document.createElement("table"),e=document.createElement("tbody"),k=document.createElement("tr"),l=document.createElement("td");l.style.whiteSpace="nowrap";l.setAttribute("colspan","2");mxUtils.write(l,mxResources.get("loading")+"...");k.appendChild(l);e.appendChild(k);var k=document.createElement("tr"),n=document.createElement("td"),q=document.createElement("td");g.style.paddingLeft="6px";mxUtils.write(n,mxResources.get("left")+":");var f=document.createElement("input");
-f.setAttribute("type","text");f.style.width="100px";f.value="0";this.init=function(){f.focus();f.select()};q.appendChild(f);k.appendChild(n);k.appendChild(q);e.appendChild(k);k=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("top")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="100px";m.value="0";q.appendChild(m);k.appendChild(n);k.appendChild(q);e.appendChild(k);k=document.createElement("tr");
-n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("right")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value="0";q.appendChild(p);k.appendChild(n);k.appendChild(q);e.appendChild(k);k=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("bottom")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";
-u.value="0";q.appendChild(u);k.appendChild(n);k.appendChild(q);e.appendChild(k);k=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("circle")+":");k.appendChild(n);var v=document.createElement("input");v.setAttribute("type","checkbox");q.appendChild(v);k.appendChild(q);e.appendChild(k);g.appendChild(e);b.appendChild(g);g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";var t=new Image,
-x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=document.createElement("canvas"),c=b.getContext("2d"),e=t.width,g=t.height,k=parseInt(f.value),l=parseInt(m.value),e=Math.max(1,e-k-parseInt(p.value)),g=Math.max(1,g-l-parseInt(u.value));b.width=e;b.height=g;v.checked&&(c.fillStyle="#000000",c.arc(e/2,g/2,Math.min(e/2,g/2),0,2*Math.PI),c.fill(),c.globalCompositeOperation="source-in");c.drawImage(t,k,l,e,g,0,0,e,g);d(b.toDataURL())});x.className="geBtn gePrimaryBtn";x.setAttribute("disabled",
-"disabled");t.onload=function(){x.removeAttribute("disabled");l.innerHTML="";mxUtils.write(l,mxResources.get("width")+": "+t.width+" "+mxResources.get("height")+": "+t.height)};t.src=c;mxEvent.addListener(b,"keypress",function(a){13==a.keyCode&&x.click()});c=document.createElement("div");c.style.marginTop="20px";c.style.textAlign="right";a.editor.cancelFirst?(c.appendChild(g),c.appendChild(x)):(c.appendChild(x),c.appendChild(g));b.appendChild(c);this.container=b},EditGeometryDialog=function(a,c){var d=
-a.editor.graph,b=1==c.length?d.getCellGeometry(c[0]):null,g=document.createElement("div"),e=document.createElement("table"),k=document.createElement("tbody"),l=document.createElement("tr"),n=document.createElement("td"),q=document.createElement("td");e.style.paddingLeft="6px";mxUtils.write(n,mxResources.get("relative")+":");var f=document.createElement("input");f.setAttribute("type","checkbox");null!=b&&b.relative&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);this.init=function(){f.focus()};
-q.appendChild(f);l.appendChild(n);l.appendChild(q);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("left")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="100px";m.value=null!=b?b.x:"";q.appendChild(m);l.appendChild(n);l.appendChild(q);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("top")+
-":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=b?b.y:"";q.appendChild(p);l.appendChild(n);l.appendChild(q);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("dx")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=b&&null!=b.offset?b.offset.x:"";q.appendChild(u);l.appendChild(n);l.appendChild(q);
-k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("dy")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=b&&null!=b.offset?b.offset.y:"";q.appendChild(v);l.appendChild(n);l.appendChild(q);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("width")+":");var t=
-document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=b?b.width:"";q.appendChild(t);l.appendChild(n);l.appendChild(q);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("height")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=null!=b?b.height:"";q.appendChild(x);l.appendChild(n);l.appendChild(q);k.appendChild(l);
-l=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("rotation")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="100px";y.value=1==c.length?mxUtils.getValue(d.getCellStyle(c[0]),mxConstants.STYLE_ROTATION,0):"";q.appendChild(y);l.appendChild(n);l.appendChild(q);k.appendChild(l);e.appendChild(k);g.appendChild(e);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className=
-"geBtn";var D=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.getModel().beginUpdate();try{for(var b=0;b<c.length;b++){var e=d.getCellGeometry(c[b]);null!=e&&(e=e.clone(),d.isCellMovable(c[b])&&(e.relative=f.checked,0<mxUtils.trim(m.value).length&&(e.x=Number(m.value)),0<mxUtils.trim(p.value).length&&(e.y=Number(p.value)),0<mxUtils.trim(u.value).length&&(null==e.offset&&(e.offset=new mxPoint),e.offset.x=Number(u.value)),0<mxUtils.trim(v.value).length&&(null==e.offset&&(e.offset=
-new mxPoint),e.offset.y=Number(v.value))),d.isCellResizable(c[b])&&(0<mxUtils.trim(t.value).length&&(e.width=Number(t.value)),0<mxUtils.trim(x.value).length&&(e.height=Number(x.value))),d.getModel().setGeometry(c[b],e));0<mxUtils.trim(y.value).length&&d.setCellStyles(mxConstants.STYLE_ROTATION,Number(y.value),[c[b]])}}finally{d.getModel().endUpdate()}});D.className="geBtn gePrimaryBtn";mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&D.click()});e=document.createElement("div");e.style.marginTop=
-"20px";e.style.textAlign="right";a.editor.cancelFirst?(e.appendChild(b),e.appendChild(D)):(e.appendChild(D),e.appendChild(b));g.appendChild(e);this.container=g},LibraryDialog=function(a,c,d,b,g,e){function k(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=u;)a=a.parentNode;var b=null;if(null!=a)for(var c=u.firstChild,b=0;null!=c&&c!=a;)c=c.nextSibling,b++;return b}function l(b,c,d,m,p,e,g,n,B){try{if(a.spinner.stop(),null==c||"image/"==c.substring(0,6))if(null==b&&null!=
-g||null==t[b]){var A=function(){H.innerHTML="";H.style.cursor="pointer";H.style.whiteSpace="nowrap";H.style.textOverflow="ellipsis";mxUtils.write(H,null!=K.title&&0<K.title.length?K.title:mxResources.get("untitled"));H.style.color=null==K.title||0==K.title.length?"#d0d0d0":""};u.style.backgroundImage="";v.style.display="none";var y=p,C=e;if(p>a.maxImageSize||e>a.maxImageSize){var G=Math.min(1,Math.min(a.maxImageSize/Math.max(1,p)),a.maxImageSize/Math.max(1,e));p*=G;e*=G}y>C?(C=Math.round(100*C/y),
-y=100):(y=Math.round(100*y/C),C=100);var E=document.createElement("div");E.setAttribute("draggable","true");E.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";E.style.position="relative";E.style.cursor="move";mxUtils.setPrefixedStyle(E.style,"transition","transform .1s ease-in-out");if(null!=b){var q=document.createElement("img");q.setAttribute("src",I.convert(b));q.style.width=y+"px";q.style.height=C+"px";q.style.margin="10px";q.style.paddingBottom=Math.floor((100-C)/2)+"px";q.style.paddingLeft=
-Math.floor((100-y)/2)+"px";E.appendChild(q)}else if(null!=g){var J=a.stringToCells(Graph.decompress(g.xml));0<J.length&&(a.sidebar.createThumb(J,100,100,E,null,!0,!1),E.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",E.firstChild.style.cursor="")}var F=document.createElement("img");F.setAttribute("src",Editor.closeImage);F.setAttribute("border","0");F.setAttribute("title",mxResources.get("delete"));F.setAttribute("align","top");F.style.paddingTop="4px";F.style.position="absolute";
-F.style.marginLeft="-12px";F.style.zIndex="1";F.style.cursor="pointer";mxEvent.addListener(F,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,c){mxEvent.addListener(F,"click",function(d){t[b]=null;for(var m=0;m<f.length;m++)if(null!=f[m].data&&f[m].data==b||null!=f[m].xml&&null!=c&&f[m].xml==c.xml){f.splice(m,1);break}E.parentNode.removeChild(a);0==f.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(d)});mxEvent.addListener(F,"dblclick",
-function(a){mxEvent.consume(a)})})(E,b,g);E.appendChild(F);E.style.marginBottom="30px";var H=document.createElement("div");H.style.position="absolute";H.style.boxSizing="border-box";H.style.bottom="-18px";H.style.left="10px";H.style.right="10px";H.style.backgroundColor="#ffffff";H.style.overflow="hidden";H.style.textAlign="center";var K=null;null!=b?(K={data:b,w:p,h:e,title:B},null!=n&&(K.aspect=n),t[b]=q,f.push(K)):null!=g&&(g.aspect="fixed",f.push(g),K=g);mxEvent.addListener(H,"keydown",function(a){13==
-a.keyCode&&null!=D&&(D(),D=null,mxEvent.consume(a))});A();E.appendChild(H);mxEvent.addListener(H,"mousedown",function(a){"true"!=H.getAttribute("contentEditable")&&mxEvent.consume(a)});J=function(b){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var c=new FilenameDialog(a,K.title||"",mxResources.get("ok"),function(a){null!=a&&(K.title=a,A())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();mxEvent.consume(b)}else if("true"!=
-H.getAttribute("contentEditable")){null!=D&&(D(),D=null);if(null==K.title||0==K.title.length)H.innerHTML="";H.style.textOverflow="";H.style.whiteSpace="";H.style.cursor="text";H.style.color="";H.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(H.style,"user-select","text");H.focus();document.execCommand("selectAll",!1,null);D=function(){H.removeAttribute("contentEditable");H.style.cursor="pointer";K.title=H.innerHTML;A()};mxEvent.consume(b)}};mxEvent.addListener(H,"click",J);mxEvent.addListener(E,
-"dblclick",J);u.appendChild(E);mxEvent.addListener(E,"dragstart",function(a){null==b&&null!=g&&(F.style.visibility="hidden",H.style.visibility="hidden");mxClient.IS_FF&&null!=g.xml&&a.dataTransfer.setData("Text",g.xml);x=k(a);mxClient.IS_GC&&(E.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(E.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(E,30);F.style.visibility="";H.style.visibility=""},0)});mxEvent.addListener(E,"dragend",function(a){"hidden"==F.style.visibility&&
-(F.style.visibility="",H.style.visibility="");x=null;mxUtils.setOpacity(E,100);mxUtils.setPrefixedStyle(E.style,"transform",null)})}else z||(z=!0,a.handleError({message:mxResources.get("fileExists")}));else{p=!1;try{if(y=mxUtils.parseXml(b),"mxlibrary"==y.documentElement.nodeName){C=JSON.parse(mxUtils.getTextContent(y.documentElement));if(null!=C&&0<C.length)for(var N=0;N<C.length;N++)null!=C[N].xml?l(null,null,0,0,0,0,C[N]):l(C[N].data,null,0,0,C[N].w,C[N].h,null,"fixed",C[N].title);p=!0}else if("mxfile"==
-y.documentElement.nodeName){for(var R=y.documentElement.getElementsByTagName("diagram"),N=0;N<R.length;N++){var C=mxUtils.getTextContent(R[N]),J=a.stringToCells(Graph.decompress(C)),aa=a.editor.graph.getBoundingBoxFromGeometry(J);l(null,null,0,0,0,0,{xml:C,w:aa.width,h:aa.height})}p=!0}}catch(fa){}p||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(fa){}return null}function n(a){a.dataTransfer.dropEffect=null!=x?"move":"copy";a.stopPropagation();a.preventDefault()}
-function q(b){b.stopPropagation();b.preventDefault();z=!1;y=k(b);if(null!=x)null!=y&&y<u.children.length?(f.splice(y>x?y-1:y,0,f.splice(x,1)[0]),u.insertBefore(u.children[x],u.children[y])):(f.push(f.splice(x,1)[0]),u.appendChild(u.children[x]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,B(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(c)||
-/(\.png)($|\?)/i.test(c)||/(\.gif)($|\?)/i.test(c)||/(\.svg)($|\?)/i.test(c))&&a.loadImage(c,function(a){l(c,null,0,0,a.width,a.height);u.scrollTop=u.scrollHeight})}b.stopPropagation();b.preventDefault()}var f=[];d=document.createElement("div");d.style.height="100%";var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.height="40px";d.appendChild(m);mxUtils.write(m,mxResources.get("filename")+":");null==c&&(c=a.defaultLibraryName+".xml");var p=document.createElement("input");p.setAttribute("value",
-c);p.style.marginRight="20px";p.style.marginLeft="10px";p.style.width="500px";null==g||g.isRenamable()||p.setAttribute("disabled","true");this.init=function(){if(null==g||g.isRenamable())p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};m.appendChild(p);var u=document.createElement("div");u.style.borderWidth="1px 0px 1px 0px";u.style.borderColor="#d3d3d3";u.style.borderStyle="solid";u.style.marginTop="6px";
-u.style.overflow="auto";u.style.height="340px";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";0==f.length&&Graph.fileSupport&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var v=document.createElement("div");v.style.position="absolute";v.style.width="640px";v.style.top="260px";v.style.textAlign="center";v.style.fontSize="22px";v.style.color="#a0c3ff";mxUtils.write(v,mxResources.get("dragImagesHere"));d.appendChild(v);var t={},x=null,y=null,D=null;
-c=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=D&&(D(),D=null,mxEvent.consume(a))};mxEvent.addListener(u,"mousedown",c);mxEvent.addListener(u,"pointerdown",c);mxEvent.addListener(u,"touchstart",c);var I=new mxUrlConverter,z=!1;if(null!=b)for(c=0;c<b.length;c++)m=b[c],l(m.data,null,0,0,m.w,m.h,m,m.aspect,m.title);mxEvent.addListener(u,"dragleave",function(a){v.style.cursor="";for(var b=mxEvent.getSource(a);null!=b;){if(b==u||b==v){a.stopPropagation();a.preventDefault();
-break}b=b.parentNode}});var B=function(b){return function(c,f,d,m,p,e,g,k,t){null!=t&&(/(\.vsdx)($|\?)/i.test(t.name)||/(\.vssx)($|\?)/i.test(t.name))?a.importVisio(t,mxUtils.bind(this,function(a){l(a,f,d,m,p,e,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," "))})):null!=t&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,t.name)?a.parseFile(t,mxUtils.bind(this,function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=c.status&&(l(c.responseText,
-f,d,m,p,e,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(l(c,f,d,m,p,e,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",n);mxEvent.addListener(u,"drop",q);mxEvent.addListener(v,"dragover",n);mxEvent.addListener(v,"drop",q);d.appendChild(u);b=document.createElement("div");b.style.textAlign="right";b.style.marginTop="20px";
-c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.setAttribute("id","btnCancel");c.className="geBtn";a.editor.cancelFirst&&b.appendChild(c);m=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(f),c=p.value;/(\.xml)$/i.test(c)||(c+=".xml");a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,"_blank")});m.setAttribute("id",
-"btnDownload");m.className="geBtn";b.appendChild(m);if(Graph.fileSupport){if(null==a.libDlgFileInputElt){var C=document.createElement("input");C.setAttribute("multiple","multiple");C.setAttribute("type","file");mxEvent.addListener(C,"change",function(b){z=!1;a.importFiles(C.files,0,0,a.maxImageSize,function(a,c,f,d,m,p,e,g,k){null!=C.files&&(B(b)(a,c,f,d,m,p,e,g,k),C.type="",C.type="file",C.value="")});u.scrollTop=u.scrollHeight});C.style.display="none";document.body.appendChild(C);a.libDlgFileInputElt=
-C}m=mxUtils.button(mxResources.get("import"),function(){null!=D&&(D(),D=null);a.libDlgFileInputElt.click()});m.setAttribute("id","btnAddImage");m.className="geBtn";b.appendChild(m)}m=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=D&&(D(),D=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){z=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var f=a.indexOf(",");0<f&&(a=a.substring(0,f)+";base64,"+a.substring(f+1))}l(a,null,0,0,b,c);u.scrollTop=u.scrollHeight}})});
-m.setAttribute("id","btnAddImageUrl");m.className="geBtn";b.appendChild(m);this.saveBtnClickHandler=function(b,c,f,d){a.saveLibrary(b,c,f,d)};m=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=D&&(D(),D=null);this.saveBtnClickHandler(p.value,f,g,e)}));m.setAttribute("id","btnSave");m.className="geBtn gePrimaryBtn";b.appendChild(m);a.editor.cancelFirst||b.appendChild(c);d.appendChild(b);this.container=d},EditShapeDialog=function(a,c,d,b,g){b=null!=b?b:300;g=null!=g?g:120;var e,
-k,l=document.createElement("table"),n=document.createElement("tbody");l.style.cellPadding="4px";e=document.createElement("tr");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";mxUtils.write(k,d);e.appendChild(k);n.appendChild(e);e=document.createElement("tr");k=document.createElement("td");var q=document.createElement("textarea");q.style.outline="none";q.style.resize="none";q.style.width=b-200+"px";q.style.height=g+"px";this.textarea=q;this.init=function(){q.focus();
-q.scrollTop=0};k.appendChild(q);e.appendChild(k);k=document.createElement("td");d=document.createElement("div");d.style.position="relative";d.style.border="1px solid gray";d.style.top="6px";d.style.width="200px";d.style.height=g+4+"px";d.style.overflow="hidden";d.style.marginBottom="16px";mxEvent.disableContextMenu(d);k.appendChild(d);var f=new Graph(d);f.setEnabled(!1);var m=a.editor.graph.cloneCell(c);f.addCells([m]);d=f.view.getState(m);var p="";null!=d.shape&&null!=d.shape.stencil&&(p=mxUtils.getPrettyXml(d.shape.stencil.desc));
-mxUtils.write(q,p||"");d=f.getGraphBounds();g=Math.min(160/d.width,(g-40)/d.height);f.view.scaleAndTranslate(g,20/g-d.x,20/g-d.y);e.appendChild(k);n.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.setAttribute("colspan","2");k.style.paddingTop="2px";k.style.whiteSpace="nowrap";k.setAttribute("align","right");a.isOffline()||(g=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),g.className="geBtn",
-k.appendChild(g));g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&k.appendChild(g);var u=function(b,c,f){var d=q.value,m=mxUtils.parseXml(d),d=mxUtils.getPrettyXml(m.documentElement),m=m.documentElement.getElementsByTagName("parsererror");if(null!=m&&0<m.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(f&&a.hideDialog(),m=!b.model.contains(c),!f||m||d!=p){d=Graph.compress(d);
-b.getModel().beginUpdate();try{if(m){var e=a.editor.graph.getFreeInsertPoint();c.geometry.x=e.x;c.geometry.y=e.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+d+")",[c])}catch(z){throw z;}finally{b.getModel().endUpdate()}m&&(b.setSelectionCell(c),b.scrollCellToVisible(c))}};d=mxUtils.button(mxResources.get("preview"),function(){u(f,m,!1)});d.className="geBtn";k.appendChild(d);d=mxUtils.button(mxResources.get("apply"),function(){u(a.editor.graph,c,!0)});d.className="geBtn gePrimaryBtn";
-k.appendChild(d);a.editor.cancelFirst||k.appendChild(g);e.appendChild(k);n.appendChild(e);l.appendChild(n);this.container=l},CustomDialog=function(a,c,d,b,g,e,k,l){var n=document.createElement("div");n.appendChild(c);c=document.createElement("div");c.style.marginTop="16px";c.style.textAlign="center";null!=k&&c.appendChild(k);a.isOffline()||null==e||(k=mxUtils.button(mxResources.get("help"),function(){a.openLink(e)}),k.className="geBtn",c.appendChild(k));k=mxUtils.button(mxResources.get("cancel"),
-function(){a.hideDialog();null!=b&&b()});k.className="geBtn";l&&(k.style.display="none");a.editor.cancelFirst&&c.appendChild(k);g=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d()});c.appendChild(g);g.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(k);n.appendChild(c);this.cancelBtn=k;this.okButton=g;this.container=n},TemplatesDialog=function(){var a='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" placeholder="'+
+null!=f&&(b=f);0<b.length&&0>mxUtils.indexOf(g,b)&&g.push(b)}c()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");a.showDialog(b.container,300,80,!0,!0);b.init()});e.className="geBtn";var k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";var n=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(g);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});n.className="geBtn gePrimaryBtn";var m=
+document.createElement("div");m.style.marginTop="14px";m.style.textAlign="right";var t=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});t.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(t.style.display="none");m.appendChild(t);a.editor.cancelFirst?(m.appendChild(k),m.appendChild(e),m.appendChild(n)):(m.appendChild(e),m.appendChild(n),m.appendChild(k));d.appendChild(m);this.container=d},CropImageDialog=function(a,
+c,d){var b=document.createElement("div"),g=document.createElement("table"),e=document.createElement("tbody"),k=document.createElement("tr"),n=document.createElement("td");n.style.whiteSpace="nowrap";n.setAttribute("colspan","2");mxUtils.write(n,mxResources.get("loading")+"...");k.appendChild(n);e.appendChild(k);var k=document.createElement("tr"),m=document.createElement("td"),t=document.createElement("td");g.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("left")+":");var f=document.createElement("input");
+f.setAttribute("type","text");f.style.width="100px";f.value="0";this.init=function(){f.focus();f.select()};t.appendChild(f);k.appendChild(m);k.appendChild(t);e.appendChild(k);k=document.createElement("tr");m=document.createElement("td");t=document.createElement("td");mxUtils.write(m,mxResources.get("top")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value="0";t.appendChild(l);k.appendChild(m);k.appendChild(t);e.appendChild(k);k=document.createElement("tr");
+m=document.createElement("td");t=document.createElement("td");mxUtils.write(m,mxResources.get("right")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value="0";t.appendChild(p);k.appendChild(m);k.appendChild(t);e.appendChild(k);k=document.createElement("tr");m=document.createElement("td");t=document.createElement("td");mxUtils.write(m,mxResources.get("bottom")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";
+u.value="0";t.appendChild(u);k.appendChild(m);k.appendChild(t);e.appendChild(k);k=document.createElement("tr");m=document.createElement("td");t=document.createElement("td");mxUtils.write(m,mxResources.get("circle")+":");k.appendChild(m);var v=document.createElement("input");v.setAttribute("type","checkbox");t.appendChild(v);k.appendChild(t);e.appendChild(k);g.appendChild(e);b.appendChild(g);g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";var q=new Image,
+x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=document.createElement("canvas"),c=b.getContext("2d"),e=q.width,g=q.height,k=parseInt(f.value),n=parseInt(l.value),e=Math.max(1,e-k-parseInt(p.value)),g=Math.max(1,g-n-parseInt(u.value));b.width=e;b.height=g;v.checked&&(c.fillStyle="#000000",c.arc(e/2,g/2,Math.min(e/2,g/2),0,2*Math.PI),c.fill(),c.globalCompositeOperation="source-in");c.drawImage(q,k,n,e,g,0,0,e,g);d(b.toDataURL())});x.className="geBtn gePrimaryBtn";x.setAttribute("disabled",
+"disabled");q.onload=function(){x.removeAttribute("disabled");n.innerHTML="";mxUtils.write(n,mxResources.get("width")+": "+q.width+" "+mxResources.get("height")+": "+q.height)};q.src=c;mxEvent.addListener(b,"keypress",function(a){13==a.keyCode&&x.click()});c=document.createElement("div");c.style.marginTop="20px";c.style.textAlign="right";a.editor.cancelFirst?(c.appendChild(g),c.appendChild(x)):(c.appendChild(x),c.appendChild(g));b.appendChild(c);this.container=b},EditGeometryDialog=function(a,c){var d=
+a.editor.graph,b=1==c.length?d.getCellGeometry(c[0]):null,g=document.createElement("div"),e=document.createElement("table"),k=document.createElement("tbody"),n=document.createElement("tr"),m=document.createElement("td"),t=document.createElement("td");e.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("relative")+":");var f=document.createElement("input");f.setAttribute("type","checkbox");null!=b&&b.relative&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);this.init=function(){f.focus()};
+t.appendChild(f);n.appendChild(m);n.appendChild(t);k.appendChild(n);n=document.createElement("tr");m=document.createElement("td");t=document.createElement("td");mxUtils.write(m,mxResources.get("left")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value=null!=b?b.x:"";t.appendChild(l);n.appendChild(m);n.appendChild(t);k.appendChild(n);n=document.createElement("tr");m=document.createElement("td");t=document.createElement("td");mxUtils.write(m,mxResources.get("top")+
+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=b?b.y:"";t.appendChild(p);n.appendChild(m);n.appendChild(t);k.appendChild(n);n=document.createElement("tr");m=document.createElement("td");t=document.createElement("td");mxUtils.write(m,mxResources.get("dx")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=b&&null!=b.offset?b.offset.x:"";t.appendChild(u);n.appendChild(m);n.appendChild(t);
+k.appendChild(n);n=document.createElement("tr");m=document.createElement("td");t=document.createElement("td");mxUtils.write(m,mxResources.get("dy")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=b&&null!=b.offset?b.offset.y:"";t.appendChild(v);n.appendChild(m);n.appendChild(t);k.appendChild(n);n=document.createElement("tr");m=document.createElement("td");t=document.createElement("td");mxUtils.write(m,mxResources.get("width")+":");var q=
+document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=b?b.width:"";t.appendChild(q);n.appendChild(m);n.appendChild(t);k.appendChild(n);n=document.createElement("tr");m=document.createElement("td");t=document.createElement("td");mxUtils.write(m,mxResources.get("height")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=null!=b?b.height:"";t.appendChild(x);n.appendChild(m);n.appendChild(t);k.appendChild(n);
+n=document.createElement("tr");m=document.createElement("td");t=document.createElement("td");mxUtils.write(m,mxResources.get("rotation")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="100px";y.value=1==c.length?mxUtils.getValue(d.getCellStyle(c[0]),mxConstants.STYLE_ROTATION,0):"";t.appendChild(y);n.appendChild(m);n.appendChild(t);k.appendChild(n);e.appendChild(k);g.appendChild(e);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className=
+"geBtn";var D=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.getModel().beginUpdate();try{for(var b=0;b<c.length;b++){var e=d.getCellGeometry(c[b]);null!=e&&(e=e.clone(),d.isCellMovable(c[b])&&(e.relative=f.checked,0<mxUtils.trim(l.value).length&&(e.x=Number(l.value)),0<mxUtils.trim(p.value).length&&(e.y=Number(p.value)),0<mxUtils.trim(u.value).length&&(null==e.offset&&(e.offset=new mxPoint),e.offset.x=Number(u.value)),0<mxUtils.trim(v.value).length&&(null==e.offset&&(e.offset=
+new mxPoint),e.offset.y=Number(v.value))),d.isCellResizable(c[b])&&(0<mxUtils.trim(q.value).length&&(e.width=Number(q.value)),0<mxUtils.trim(x.value).length&&(e.height=Number(x.value))),d.getModel().setGeometry(c[b],e));0<mxUtils.trim(y.value).length&&d.setCellStyles(mxConstants.STYLE_ROTATION,Number(y.value),[c[b]])}}finally{d.getModel().endUpdate()}});D.className="geBtn gePrimaryBtn";mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&D.click()});e=document.createElement("div");e.style.marginTop=
+"20px";e.style.textAlign="right";a.editor.cancelFirst?(e.appendChild(b),e.appendChild(D)):(e.appendChild(D),e.appendChild(b));g.appendChild(e);this.container=g},LibraryDialog=function(a,c,d,b,g,e){function k(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=u;)a=a.parentNode;var b=null;if(null!=a)for(var c=u.firstChild,b=0;null!=c&&c!=a;)c=c.nextSibling,b++;return b}function n(b,c,d,l,p,e,g,m,B){try{if(a.spinner.stop(),null==c||"image/"==c.substring(0,6))if(null==b&&null!=
+g||null==q[b]){var A=function(){H.innerHTML="";H.style.cursor="pointer";H.style.whiteSpace="nowrap";H.style.textOverflow="ellipsis";mxUtils.write(H,null!=K.title&&0<K.title.length?K.title:mxResources.get("untitled"));H.style.color=null==K.title||0==K.title.length?"#d0d0d0":""};u.style.backgroundImage="";v.style.display="none";var y=p,C=e;if(p>a.maxImageSize||e>a.maxImageSize){var G=Math.min(1,Math.min(a.maxImageSize/Math.max(1,p)),a.maxImageSize/Math.max(1,e));p*=G;e*=G}y>C?(C=Math.round(100*C/y),
+y=100):(y=Math.round(100*y/C),C=100);var E=document.createElement("div");E.setAttribute("draggable","true");E.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";E.style.position="relative";E.style.cursor="move";mxUtils.setPrefixedStyle(E.style,"transition","transform .1s ease-in-out");if(null!=b){var t=document.createElement("img");t.setAttribute("src",I.convert(b));t.style.width=y+"px";t.style.height=C+"px";t.style.margin="10px";t.style.paddingBottom=Math.floor((100-C)/2)+"px";t.style.paddingLeft=
+Math.floor((100-y)/2)+"px";E.appendChild(t)}else if(null!=g){var F=a.stringToCells(Graph.decompress(g.xml));0<F.length&&(a.sidebar.createThumb(F,100,100,E,null,!0,!1),E.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",E.firstChild.style.cursor="")}var J=document.createElement("img");J.setAttribute("src",Editor.closeImage);J.setAttribute("border","0");J.setAttribute("title",mxResources.get("delete"));J.setAttribute("align","top");J.style.paddingTop="4px";J.style.position="absolute";
+J.style.marginLeft="-12px";J.style.zIndex="1";J.style.cursor="pointer";mxEvent.addListener(J,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,c){mxEvent.addListener(J,"click",function(d){q[b]=null;for(var l=0;l<f.length;l++)if(null!=f[l].data&&f[l].data==b||null!=f[l].xml&&null!=c&&f[l].xml==c.xml){f.splice(l,1);break}E.parentNode.removeChild(a);0==f.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(d)});mxEvent.addListener(J,"dblclick",
+function(a){mxEvent.consume(a)})})(E,b,g);E.appendChild(J);E.style.marginBottom="30px";var H=document.createElement("div");H.style.position="absolute";H.style.boxSizing="border-box";H.style.bottom="-18px";H.style.left="10px";H.style.right="10px";H.style.backgroundColor="#ffffff";H.style.overflow="hidden";H.style.textAlign="center";var K=null;null!=b?(K={data:b,w:p,h:e,title:B},null!=m&&(K.aspect=m),q[b]=t,f.push(K)):null!=g&&(g.aspect="fixed",f.push(g),K=g);mxEvent.addListener(H,"keydown",function(a){13==
+a.keyCode&&null!=D&&(D(),D=null,mxEvent.consume(a))});A();E.appendChild(H);mxEvent.addListener(H,"mousedown",function(a){"true"!=H.getAttribute("contentEditable")&&mxEvent.consume(a)});F=function(b){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var c=new FilenameDialog(a,K.title||"",mxResources.get("ok"),function(a){null!=a&&(K.title=a,A())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();mxEvent.consume(b)}else if("true"!=
+H.getAttribute("contentEditable")){null!=D&&(D(),D=null);if(null==K.title||0==K.title.length)H.innerHTML="";H.style.textOverflow="";H.style.whiteSpace="";H.style.cursor="text";H.style.color="";H.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(H.style,"user-select","text");H.focus();document.execCommand("selectAll",!1,null);D=function(){H.removeAttribute("contentEditable");H.style.cursor="pointer";K.title=H.innerHTML;A()};mxEvent.consume(b)}};mxEvent.addListener(H,"click",F);mxEvent.addListener(E,
+"dblclick",F);u.appendChild(E);mxEvent.addListener(E,"dragstart",function(a){null==b&&null!=g&&(J.style.visibility="hidden",H.style.visibility="hidden");mxClient.IS_FF&&null!=g.xml&&a.dataTransfer.setData("Text",g.xml);x=k(a);mxClient.IS_GC&&(E.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(E.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(E,30);J.style.visibility="";H.style.visibility=""},0)});mxEvent.addListener(E,"dragend",function(a){"hidden"==J.style.visibility&&
+(J.style.visibility="",H.style.visibility="");x=null;mxUtils.setOpacity(E,100);mxUtils.setPrefixedStyle(E.style,"transform",null)})}else z||(z=!0,a.handleError({message:mxResources.get("fileExists")}));else{p=!1;try{if(y=mxUtils.parseXml(b),"mxlibrary"==y.documentElement.nodeName){C=JSON.parse(mxUtils.getTextContent(y.documentElement));if(null!=C&&0<C.length)for(var N=0;N<C.length;N++)null!=C[N].xml?n(null,null,0,0,0,0,C[N]):n(C[N].data,null,0,0,C[N].w,C[N].h,null,"fixed",C[N].title);p=!0}else if("mxfile"==
+y.documentElement.nodeName){for(var R=y.documentElement.getElementsByTagName("diagram"),N=0;N<R.length;N++){var C=mxUtils.getTextContent(R[N]),F=a.stringToCells(Graph.decompress(C)),aa=a.editor.graph.getBoundingBoxFromGeometry(F);n(null,null,0,0,0,0,{xml:C,w:aa.width,h:aa.height})}p=!0}}catch(fa){}p||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(fa){}return null}function m(a){a.dataTransfer.dropEffect=null!=x?"move":"copy";a.stopPropagation();a.preventDefault()}
+function t(b){b.stopPropagation();b.preventDefault();z=!1;y=k(b);if(null!=x)null!=y&&y<u.children.length?(f.splice(y>x?y-1:y,0,f.splice(x,1)[0]),u.insertBefore(u.children[x],u.children[y])):(f.push(f.splice(x,1)[0]),u.appendChild(u.children[x]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,B(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(c)||
+/(\.png)($|\?)/i.test(c)||/(\.gif)($|\?)/i.test(c)||/(\.svg)($|\?)/i.test(c))&&a.loadImage(c,function(a){n(c,null,0,0,a.width,a.height);u.scrollTop=u.scrollHeight})}b.stopPropagation();b.preventDefault()}var f=[];d=document.createElement("div");d.style.height="100%";var l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.height="40px";d.appendChild(l);mxUtils.write(l,mxResources.get("filename")+":");null==c&&(c=a.defaultLibraryName+".xml");var p=document.createElement("input");p.setAttribute("value",
+c);p.style.marginRight="20px";p.style.marginLeft="10px";p.style.width="500px";null==g||g.isRenamable()||p.setAttribute("disabled","true");this.init=function(){if(null==g||g.isRenamable())p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};l.appendChild(p);var u=document.createElement("div");u.style.borderWidth="1px 0px 1px 0px";u.style.borderColor="#d3d3d3";u.style.borderStyle="solid";u.style.marginTop="6px";
+u.style.overflow="auto";u.style.height="340px";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";0==f.length&&Graph.fileSupport&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var v=document.createElement("div");v.style.position="absolute";v.style.width="640px";v.style.top="260px";v.style.textAlign="center";v.style.fontSize="22px";v.style.color="#a0c3ff";mxUtils.write(v,mxResources.get("dragImagesHere"));d.appendChild(v);var q={},x=null,y=null,D=null;
+c=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=D&&(D(),D=null,mxEvent.consume(a))};mxEvent.addListener(u,"mousedown",c);mxEvent.addListener(u,"pointerdown",c);mxEvent.addListener(u,"touchstart",c);var I=new mxUrlConverter,z=!1;if(null!=b)for(c=0;c<b.length;c++)l=b[c],n(l.data,null,0,0,l.w,l.h,l,l.aspect,l.title);mxEvent.addListener(u,"dragleave",function(a){v.style.cursor="";for(var b=mxEvent.getSource(a);null!=b;){if(b==u||b==v){a.stopPropagation();a.preventDefault();
+break}b=b.parentNode}});var B=function(b){return function(c,f,d,l,p,e,g,k,q){null!=q&&(/(\.vsdx)($|\?)/i.test(q.name)||/(\.vssx)($|\?)/i.test(q.name))?a.importVisio(q,mxUtils.bind(this,function(a){n(a,f,d,l,p,e,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," "))})):null!=q&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,q.name)?a.parseFile(q,mxUtils.bind(this,function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=c.status&&(n(c.responseText,
+f,d,l,p,e,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(n(c,f,d,l,p,e,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",m);mxEvent.addListener(u,"drop",t);mxEvent.addListener(v,"dragover",m);mxEvent.addListener(v,"drop",t);d.appendChild(u);b=document.createElement("div");b.style.textAlign="right";b.style.marginTop="20px";
+c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.setAttribute("id","btnCancel");c.className="geBtn";a.editor.cancelFirst&&b.appendChild(c);l=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(f),c=p.value;/(\.xml)$/i.test(c)||(c+=".xml");a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,"_blank")});l.setAttribute("id",
+"btnDownload");l.className="geBtn";b.appendChild(l);if(Graph.fileSupport){if(null==a.libDlgFileInputElt){var C=document.createElement("input");C.setAttribute("multiple","multiple");C.setAttribute("type","file");mxEvent.addListener(C,"change",function(b){z=!1;a.importFiles(C.files,0,0,a.maxImageSize,function(a,c,f,d,l,p,e,g,k){null!=C.files&&(B(b)(a,c,f,d,l,p,e,g,k),C.type="",C.type="file",C.value="")});u.scrollTop=u.scrollHeight});C.style.display="none";document.body.appendChild(C);a.libDlgFileInputElt=
+C}l=mxUtils.button(mxResources.get("import"),function(){null!=D&&(D(),D=null);a.libDlgFileInputElt.click()});l.setAttribute("id","btnAddImage");l.className="geBtn";b.appendChild(l)}l=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=D&&(D(),D=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){z=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var f=a.indexOf(",");0<f&&(a=a.substring(0,f)+";base64,"+a.substring(f+1))}n(a,null,0,0,b,c);u.scrollTop=u.scrollHeight}})});
+l.setAttribute("id","btnAddImageUrl");l.className="geBtn";b.appendChild(l);this.saveBtnClickHandler=function(b,c,f,d){a.saveLibrary(b,c,f,d)};l=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=D&&(D(),D=null);this.saveBtnClickHandler(p.value,f,g,e)}));l.setAttribute("id","btnSave");l.className="geBtn gePrimaryBtn";b.appendChild(l);a.editor.cancelFirst||b.appendChild(c);d.appendChild(b);this.container=d},EditShapeDialog=function(a,c,d,b,g){b=null!=b?b:300;g=null!=g?g:120;var e,
+k,n=document.createElement("table"),m=document.createElement("tbody");n.style.cellPadding="4px";e=document.createElement("tr");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";mxUtils.write(k,d);e.appendChild(k);m.appendChild(e);e=document.createElement("tr");k=document.createElement("td");var t=document.createElement("textarea");t.style.outline="none";t.style.resize="none";t.style.width=b-200+"px";t.style.height=g+"px";this.textarea=t;this.init=function(){t.focus();
+t.scrollTop=0};k.appendChild(t);e.appendChild(k);k=document.createElement("td");d=document.createElement("div");d.style.position="relative";d.style.border="1px solid gray";d.style.top="6px";d.style.width="200px";d.style.height=g+4+"px";d.style.overflow="hidden";d.style.marginBottom="16px";mxEvent.disableContextMenu(d);k.appendChild(d);var f=new Graph(d);f.setEnabled(!1);var l=a.editor.graph.cloneCell(c);f.addCells([l]);d=f.view.getState(l);var p="";null!=d.shape&&null!=d.shape.stencil&&(p=mxUtils.getPrettyXml(d.shape.stencil.desc));
+mxUtils.write(t,p||"");d=f.getGraphBounds();g=Math.min(160/d.width,(g-40)/d.height);f.view.scaleAndTranslate(g,20/g-d.x,20/g-d.y);e.appendChild(k);m.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.setAttribute("colspan","2");k.style.paddingTop="2px";k.style.whiteSpace="nowrap";k.setAttribute("align","right");a.isOffline()||(g=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),g.className="geBtn",
+k.appendChild(g));g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&k.appendChild(g);var u=function(b,c,f){var d=t.value,l=mxUtils.parseXml(d),d=mxUtils.getPrettyXml(l.documentElement),l=l.documentElement.getElementsByTagName("parsererror");if(null!=l&&0<l.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(f&&a.hideDialog(),l=!b.model.contains(c),!f||l||d!=p){d=Graph.compress(d);
+b.getModel().beginUpdate();try{if(l){var e=a.editor.graph.getFreeInsertPoint();c.geometry.x=e.x;c.geometry.y=e.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+d+")",[c])}catch(z){throw z;}finally{b.getModel().endUpdate()}l&&(b.setSelectionCell(c),b.scrollCellToVisible(c))}};d=mxUtils.button(mxResources.get("preview"),function(){u(f,l,!1)});d.className="geBtn";k.appendChild(d);d=mxUtils.button(mxResources.get("apply"),function(){u(a.editor.graph,c,!0)});d.className="geBtn gePrimaryBtn";
+k.appendChild(d);a.editor.cancelFirst||k.appendChild(g);e.appendChild(k);m.appendChild(e);n.appendChild(m);this.container=n},CustomDialog=function(a,c,d,b,g,e,k,n){var m=document.createElement("div");m.appendChild(c);c=document.createElement("div");c.style.marginTop="16px";c.style.textAlign="center";null!=k&&c.appendChild(k);a.isOffline()||null==e||(k=mxUtils.button(mxResources.get("help"),function(){a.openLink(e)}),k.className="geBtn",c.appendChild(k));k=mxUtils.button(mxResources.get("cancel"),
+function(){a.hideDialog();null!=b&&b()});k.className="geBtn";n&&(k.style.display="none");a.editor.cancelFirst&&c.appendChild(k);g=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d()});c.appendChild(g);g.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(k);m.appendChild(c);this.cancelBtn=k;this.okButton=g;this.container=m},TemplatesDialog=function(){var a='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" placeholder="'+
mxResources.get("search",null,"Search")+'"></div><div class="geTemplatesList"><div class="geTempDlgNewDiagramlbl">'+mxResources.get("newDiagram",null,"New Diagram")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+mxResources.get("templates",null,"Templates")+'</div></div><div class="geTempDlgContent"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+mxResources.get("newDiagram",null,"New Diagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+
mxResources.get("showAll",null,"+ Show all")+'</div></div></div><div class="geTempDlgDiagramsList"><div class="geTempDlgDiagramsListHeader"><div class="geTempDlgDiagramsListTitle"></div><div class="geTempDlgDiagramsListBtns"><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge" data-id="myDiagramsBtn"><img src="/images/my-diagrams.svg" class="geTempDlgMyDiagramsBtnImg"> <span>'+mxResources.get("myDiagrams",null,"My diagrams")+'</span></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge geTempDlgRadioBtnActive" data-id="allDiagramsBtn"><img src="/images/all-diagrams-sel.svg" class="geTempDlgAllDiagramsBtnImg"> <span>'+
mxResources.get("allDiagrams",null,"All diagrams")+'</span></div><div class="geTempDlgSpacer"> </div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall geTempDlgRadioBtnActive" data-id="tilesBtn"><img src="/images/tiles-sel.svg" class="geTempDlgTilesBtnImg"></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall" data-id="listBtn"><img src="/images/list.svg" class="geTempDlgListBtnImg"></div></div></div><div class="geTempDlgDiagramsTiles"></div></div></div><br style="clear:both;"/><div class="geTempDlgFooter"><span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">&#x1F6C8; '+
mxResources.get("linkToDiagramHint",null,"Add a link to this diagram. The diagram can only be edited from the page that owns it.")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram",null,"Link to Diagram")+'</button><div class="geTempDlgCreateBtn">'+mxResources.get("create",null,"Create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel",null,"Cancel")+"</div></div>",c=document.createElement("div");c.innerHTML=a;c.className="geTemplateDlg";
var a=window.innerWidth,d=window.innerHeight,b=987,g=712;.9*a<b&&(b=Math.max(.9*a,600),c.style.width=b+"px");.9*d<g&&(g=Math.max(.9*d,300),c.style.height=g+"px");this.width=b;this.height=g;this.container=c};
-TemplatesDialog.prototype.init=function(a,c,d,b,g,e,k,l,n,q){function f(){null!=G&&(G.style.fontWeight="normal",G.style.textDecoration="none",G=null)}function m(a,b,c,f,d,m,p){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";B.querySelector(".geTempDlgRadioBtn[data-id="+f+"]").className="geTempDlgRadioBtn "+(p?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");B.querySelector("."+b).src="/images/"+c+"-sel.svg";B.querySelector("."+d).src="/images/"+
-m+".svg";return!0}function p(a){function b(a){X.removeChild(f);B.removeChild(c);X.scrollTop=m}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var c=document.createElement("div");c.className="geTempDlgDialogMask";B.appendChild(c);var f=document.createElement("div");f.className="geTempDlgDiagramPreviewBox";var d=document.createElement("img");d.src=a;f.appendChild(d);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
-a.setAttribute("title",mxResources.get("close"));f.appendChild(a);var m=X.scrollTop;mxEvent.addListener(a,"click",b);mxEvent.addListener(c,"click",b);X.appendChild(f);X.scrollTop=0;f.style.lineHeight=f.clientHeight+"px"}function u(a,b,c){if(null!=F){for(var f=F.className.split(" "),d=0;d<f.length;d++)if(-1<f[d].indexOf("Active")){f.splice(d,1);break}F.className=f.join(" ")}null!=a?(F=a,F.className+=" "+b,J=c,U.className="geTempDlgCreateBtn"):(J=F=null,U.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
-function v(b){if(null!=J){var f=J;J=null;U.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";f.isExternal?(1==b?q(f.url,f,"nameInput.value"):n(f.url,f,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+f.url,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(c(b.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function t(a){a=a?"":"none";for(var b=B.querySelectorAll(".geTempDlgLinkToDiagram"),c=0;c<b.length;c++)b[c].style.display=
-a}function x(a,b,c){function f(){U.innerHTML=b?mxUtils.htmlEntities(mxResources.get("create")):mxUtils.htmlEntities(mxResources.get("copy"));t(!b)}T.innerHTML="";u();R=a;var d=null;if(c){d=document.createElement("table");d.className="geTempDlgDiagramsListGrid";var m=document.createElement("tr"),e=document.createElement("th");e.style.width="50%";e.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram",null,"Diagram"));m.appendChild(e);e=document.createElement("th");e.style.width="25%";e.innerHTML=
-mxUtils.htmlEntities(mxResources.get("changedBy",null,"Changed By"));m.appendChild(e);e=document.createElement("th");e.style.width="25%";e.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn",null,"Last modified on"));m.appendChild(e);d.appendChild(m);T.appendChild(d)}for(m=0;m<a.length;m++){a[m].isExternal=!b;var g=a[m].url,e=mxUtils.htmlEntities(a[m].title),k=a[m].tooltip||a[m].title,z=a[m].imgUrl,A=mxUtils.htmlEntities(a[m].changedBy||""),l=mxUtils.htmlEntities(a[m].lastModifiedOn||
-"");z||(z=TEMPLATE_PATH+"/"+g.substring(0,g.length-4)+".png");g=c?50:15;null!=e&&e.length>g&&(e=e.substring(0,g)+"&hellip;");if(c){var n=document.createElement("tr"),z=document.createElement("td"),B=document.createElement("img");B.src="/images/icon-search.svg";B.className="geTempDlgDiagramListPreviewBtn";B.setAttribute("title",mxResources.get("preview"));z.appendChild(B);k=document.createElement("span");k.className="geTempDlgDiagramTitle";k.innerHTML=e;z.appendChild(k);n.appendChild(z);z=document.createElement("td");
-z.innerHTML=A;n.appendChild(z);z=document.createElement("td");z.innerHTML=l;n.appendChild(z);d.appendChild(n);null==F&&(f(),u(n,"geTempDlgDiagramsListGridActive",a[m]));(function(a,b){mxEvent.addListener(n,"click",function(){F!=b&&(f(),u(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(n,"dblclick",v);mxEvent.addListener(B,"click",function(){p(a)})})(a[m],n)}else{var x=document.createElement("div");x.className="geTempDlgDiagramTile";x.setAttribute("title",k);null==F&&(f(),u(x,"geTempDlgDiagramTileActive",
-a[m]));A=document.createElement("div");A.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var y=document.createElement("img");y.style.display="none";(function(a,b){y.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};y.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(y,A);y.src=z;A.appendChild(y);x.appendChild(A);A=document.createElement("div");A.className="geTempDlgDiagramTileLbl";A.innerHTML=null!=e?e:"";x.appendChild(A);
-B=document.createElement("img");B.src="/images/icon-search.svg";B.className="geTempDlgDiagramPreviewBtn";B.setAttribute("title",mxResources.get("preview"));x.appendChild(B);(function(a,b){mxEvent.addListener(x,"click",function(){F!=b&&(f(),u(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(x,"dblclick",v);mxEvent.addListener(B,"click",function(){p(a)})})(a[m],x);T.appendChild(x)}}}function y(a,b){ea.innerHTML="";u();for(var c=!b&&5<a.length?5:a.length,f=0;f<c;f++){var d=a[f];d.isCategory=
-!0;var m=document.createElement("div"),p=mxResources.get(d.title);null==p&&(p=d.title.substring(0,1).toUpperCase()+d.title.substring(1));m.className="geTempDlgNewDiagramCatItem";m.setAttribute("title",p);p=mxUtils.htmlEntities(p);15<p.length&&(p=p.substring(0,15)+"&hellip;");null==F&&(U.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),t(),u(m,"geTempDlgNewDiagramCatItemActive",d));var e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemImg";var g=document.createElement("img");
-g.src=NEW_DIAGRAM_CATS_PATH+"/"+d.img;e.appendChild(g);m.appendChild(e);e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemLbl";e.innerHTML=p;m.appendChild(e);ea.appendChild(m);(function(a,b){mxEvent.addListener(m,"click",function(){F!=b&&(U.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),t(),u(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(m,"dblclick",v)})(d,m)}Y.style.display=5>a.length?"none":""}function D(a){var b=B.querySelector(".geTemplatesList"),
-c;for(c in a){var f=document.createElement("div"),d=mxResources.get(c),m=a[c];null==d&&(d=c.substring(0,1).toUpperCase()+c.substring(1));f.className="geTemplateCatLink";f.setAttribute("title",d+" ("+m.length+")");d=mxUtils.htmlEntities(d);15<d.length&&(d=d.substring(0,15)+"&hellip;");f.innerHTML=d+" ("+m.length+")";b.appendChild(f);(function(b,c,d){mxEvent.addListener(f,"click",function(){G!=d&&(null!=G?(G.style.fontWeight="normal",G.style.textDecoration="none"):(ca.style.display="none",ga.style.minHeight=
+TemplatesDialog.prototype.init=function(a,c,d,b,g,e,k,n,m,t){function f(){null!=G&&(G.style.fontWeight="normal",G.style.textDecoration="none",G=null)}function l(a,b,c,f,d,l,p){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";B.querySelector(".geTempDlgRadioBtn[data-id="+f+"]").className="geTempDlgRadioBtn "+(p?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");B.querySelector("."+b).src="/images/"+c+"-sel.svg";B.querySelector("."+d).src="/images/"+
+l+".svg";return!0}function p(a){function b(a){X.removeChild(f);B.removeChild(c);X.scrollTop=l}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var c=document.createElement("div");c.className="geTempDlgDialogMask";B.appendChild(c);var f=document.createElement("div");f.className="geTempDlgDiagramPreviewBox";var d=document.createElement("img");d.src=a;f.appendChild(d);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
+a.setAttribute("title",mxResources.get("close"));f.appendChild(a);var l=X.scrollTop;mxEvent.addListener(a,"click",b);mxEvent.addListener(c,"click",b);X.appendChild(f);X.scrollTop=0;f.style.lineHeight=f.clientHeight+"px"}function u(a,b,c){if(null!=F){for(var f=F.className.split(" "),d=0;d<f.length;d++)if(-1<f[d].indexOf("Active")){f.splice(d,1);break}F.className=f.join(" ")}null!=a?(F=a,F.className+=" "+b,J=c,U.className="geTempDlgCreateBtn"):(J=F=null,U.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
+function v(b){if(null!=J){var f=J;J=null;U.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";f.isExternal?(1==b?t(f.url,f,"nameInput.value"):m(f.url,f,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+f.url,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(c(b.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function q(a){a=a?"":"none";for(var b=B.querySelectorAll(".geTempDlgLinkToDiagram"),c=0;c<b.length;c++)b[c].style.display=
+a}function x(a,b,c){function f(){U.innerHTML=b?mxUtils.htmlEntities(mxResources.get("create")):mxUtils.htmlEntities(mxResources.get("copy"));q(!b)}T.innerHTML="";u();R=a;var d=null;if(c){d=document.createElement("table");d.className="geTempDlgDiagramsListGrid";var l=document.createElement("tr"),e=document.createElement("th");e.style.width="50%";e.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram",null,"Diagram"));l.appendChild(e);e=document.createElement("th");e.style.width="25%";e.innerHTML=
+mxUtils.htmlEntities(mxResources.get("changedBy",null,"Changed By"));l.appendChild(e);e=document.createElement("th");e.style.width="25%";e.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn",null,"Last modified on"));l.appendChild(e);d.appendChild(l);T.appendChild(d)}for(l=0;l<a.length;l++){a[l].isExternal=!b;var g=a[l].url,e=mxUtils.htmlEntities(a[l].title),k=a[l].tooltip||a[l].title,z=a[l].imgUrl,A=mxUtils.htmlEntities(a[l].changedBy||""),n=mxUtils.htmlEntities(a[l].lastModifiedOn||
+"");z||(z=TEMPLATE_PATH+"/"+g.substring(0,g.length-4)+".png");g=c?50:15;null!=e&&e.length>g&&(e=e.substring(0,g)+"&hellip;");if(c){var m=document.createElement("tr"),z=document.createElement("td"),B=document.createElement("img");B.src="/images/icon-search.svg";B.className="geTempDlgDiagramListPreviewBtn";B.setAttribute("title",mxResources.get("preview"));z.appendChild(B);k=document.createElement("span");k.className="geTempDlgDiagramTitle";k.innerHTML=e;z.appendChild(k);m.appendChild(z);z=document.createElement("td");
+z.innerHTML=A;m.appendChild(z);z=document.createElement("td");z.innerHTML=n;m.appendChild(z);d.appendChild(m);null==F&&(f(),u(m,"geTempDlgDiagramsListGridActive",a[l]));(function(a,b){mxEvent.addListener(m,"click",function(){F!=b&&(f(),u(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(m,"dblclick",v);mxEvent.addListener(B,"click",function(){p(a)})})(a[l],m)}else{var x=document.createElement("div");x.className="geTempDlgDiagramTile";x.setAttribute("title",k);null==F&&(f(),u(x,"geTempDlgDiagramTileActive",
+a[l]));A=document.createElement("div");A.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var y=document.createElement("img");y.style.display="none";(function(a,b){y.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};y.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(y,A);y.src=z;A.appendChild(y);x.appendChild(A);A=document.createElement("div");A.className="geTempDlgDiagramTileLbl";A.innerHTML=null!=e?e:"";x.appendChild(A);
+B=document.createElement("img");B.src="/images/icon-search.svg";B.className="geTempDlgDiagramPreviewBtn";B.setAttribute("title",mxResources.get("preview"));x.appendChild(B);(function(a,b){mxEvent.addListener(x,"click",function(){F!=b&&(f(),u(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(x,"dblclick",v);mxEvent.addListener(B,"click",function(){p(a)})})(a[l],x);T.appendChild(x)}}}function y(a,b){ea.innerHTML="";u();for(var c=!b&&5<a.length?5:a.length,f=0;f<c;f++){var d=a[f];d.isCategory=
+!0;var l=document.createElement("div"),p=mxResources.get(d.title);null==p&&(p=d.title.substring(0,1).toUpperCase()+d.title.substring(1));l.className="geTempDlgNewDiagramCatItem";l.setAttribute("title",p);p=mxUtils.htmlEntities(p);15<p.length&&(p=p.substring(0,15)+"&hellip;");null==F&&(U.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),q(),u(l,"geTempDlgNewDiagramCatItemActive",d));var e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemImg";var g=document.createElement("img");
+g.src=NEW_DIAGRAM_CATS_PATH+"/"+d.img;e.appendChild(g);l.appendChild(e);e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemLbl";e.innerHTML=p;l.appendChild(e);ea.appendChild(l);(function(a,b){mxEvent.addListener(l,"click",function(){F!=b&&(U.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),q(),u(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(l,"dblclick",v)})(d,l)}Y.style.display=5>a.length?"none":""}function D(a){var b=B.querySelector(".geTemplatesList"),
+c;for(c in a){var f=document.createElement("div"),d=mxResources.get(c),l=a[c];null==d&&(d=c.substring(0,1).toUpperCase()+c.substring(1));f.className="geTemplateCatLink";f.setAttribute("title",d+" ("+l.length+")");d=mxUtils.htmlEntities(d);15<d.length&&(d=d.substring(0,15)+"&hellip;");f.innerHTML=d+" ("+l.length+")";b.appendChild(f);(function(b,c,d){mxEvent.addListener(f,"click",function(){G!=d&&(null!=G?(G.style.fontWeight="normal",G.style.textDecoration="none"):(ca.style.display="none",ga.style.minHeight=
"100%"),G=d,G.style.fontWeight="bold",G.style.textDecoration="underline",X.scrollTop=0,C&&(A=!0),L.innerHTML=c,V.style.display="none",x(a[b],!0))})})(c,d,f)}}function I(a){k&&(X.scrollTop=0,T.innerHTML="",Z.spin(T),A=!1,C=!0,L.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag",null,"Recent Diagrams")),N=null,k(O,a?null:e))}function z(a){f();X.scrollTop=0;T.innerHTML="";Z.spin(T);A=!1;C=!0;da=null;L.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults",null,"Search Results"))+' "'+
-mxUtils.htmlEntities(a)+'"';l(a,O,E?null:e);N=a}b=null!=b?b:TEMPLATE_PATH+"/index.xml";g=null!=g?g:NEW_DIAGRAM_CATS_PATH+"/index.xml";var B=this.container,C=!1,A=!1,G=null,F=null,J=null,H=!1,E=!0,K=!1,R=[],N,Y=B.querySelector(".geTempDlgShowAllBtn"),T=B.querySelector(".geTempDlgDiagramsTiles"),L=B.querySelector(".geTempDlgDiagramsListTitle"),V=B.querySelector(".geTempDlgDiagramsListBtns"),X=B.querySelector(".geTempDlgContent"),ga=B.querySelector(".geTempDlgDiagramsList"),ca=B.querySelector(".geTempDlgNewDiagramCat"),
-ea=B.querySelector(".geTempDlgNewDiagramCatList"),U=B.querySelector(".geTempDlgCreateBtn"),Z=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(B.querySelector(".geTempDlgNewDiagramlbl"),"click",function(){f();ca.style.display="";ga.style.minHeight="calc(100% - 280px)";I(E)});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){m(this,"geTempDlgAllDiagramsBtnImg",
-"all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(E=!0,null==N?I(E):z(N))});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){m(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(E=!1,null==N?I(E):z(N))});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){m(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg",
-"tiles",!1)&&(K=!0,x(R,!1,K))});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){m(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(K=!1,x(R,!1,K))});mxEvent.addListener(Y,"click",function(){H?(ca.style.height="280px",ea.style.height="190px",Y.innerHTML=mxUtils.htmlEntities(mxResources.get("showAll",null,"+ Show all")),y(fa)):(ca.style.height="440px",ea.style.height="355px",Y.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess",
+mxUtils.htmlEntities(a)+'"';n(a,O,E?null:e);N=a}b=null!=b?b:TEMPLATE_PATH+"/index.xml";g=null!=g?g:NEW_DIAGRAM_CATS_PATH+"/index.xml";var B=this.container,C=!1,A=!1,G=null,F=null,J=null,H=!1,E=!0,K=!1,R=[],N,Y=B.querySelector(".geTempDlgShowAllBtn"),T=B.querySelector(".geTempDlgDiagramsTiles"),L=B.querySelector(".geTempDlgDiagramsListTitle"),V=B.querySelector(".geTempDlgDiagramsListBtns"),X=B.querySelector(".geTempDlgContent"),ga=B.querySelector(".geTempDlgDiagramsList"),ca=B.querySelector(".geTempDlgNewDiagramCat"),
+ea=B.querySelector(".geTempDlgNewDiagramCatList"),U=B.querySelector(".geTempDlgCreateBtn"),Z=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(B.querySelector(".geTempDlgNewDiagramlbl"),"click",function(){f();ca.style.display="";ga.style.minHeight="calc(100% - 280px)";I(E)});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){l(this,"geTempDlgAllDiagramsBtnImg",
+"all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(E=!0,null==N?I(E):z(N))});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){l(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(E=!1,null==N?I(E):z(N))});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){l(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg",
+"tiles",!1)&&(K=!0,x(R,!1,K))});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){l(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(K=!1,x(R,!1,K))});mxEvent.addListener(Y,"click",function(){H?(ca.style.height="280px",ea.style.height="190px",Y.innerHTML=mxUtils.htmlEntities(mxResources.get("showAll",null,"+ Show all")),y(fa)):(ca.style.height="440px",ea.style.height="355px",Y.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess",
null,"- Show less")),y(fa,!0));H=!H});var P=!1,ba=!1,aa={},fa=[],Q=1;mxUtils.get(b,function(a){if(!P){P=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var c=b.indexOf("/"),b=b.substring(0,c),c=aa[b];null==c&&(Q++,c=[],aa[b]=c);c.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),clibs:a.getAttribute("clibs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),imgUrl:a.getAttribute("imgUrl")})}}a=
a.nextSibling}D(aa)}});mxUtils.get(g,function(a){if(!ba){ba=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&fa.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),clibs:a.getAttribute("clibs"),title:a.getAttribute("title")}),a=a.nextSibling;y(fa)}});var O=function(a,b){V.style.display="";Z.stop();C=!1;A?A=!1:b?T.innerHTML=b:0==a.length?T.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found")):
-x(a,!1,K)};I(E);var da=null;l&&mxEvent.addListener(B.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var b=this;null!=da&&clearTimeout(da);13==a.keyCode?z(b.value):da=setTimeout(function(){z(b.value)},500)});mxEvent.addListener(U,"click",v);mxEvent.addListener(B.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){v(!0)});mxEvent.addListener(B.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=d&&d();a.hideDialog(!0)})};
-var BtnDialog=function(a,c,d,b){var g=document.createElement("div");g.style.textAlign="center";var e=document.createElement("p");e.style.fontSize="16pt";e.style.padding="0px";e.style.margin="0px";e.style.color="gray";mxUtils.write(e,mxResources.get("done"));var k="Unknown",l=document.createElement("img");l.setAttribute("border","0");l.setAttribute("align","absmiddle");l.style.marginRight="10px";c==a.drive?(k=mxResources.get("googleDrive"),l.src=IMAGE_PATH+"/google-drive-logo-white.svg"):c==a.dropbox?
-(k=mxResources.get("dropbox"),l.src=IMAGE_PATH+"/dropbox-logo-white.svg"):c==a.oneDrive?(k=mxResources.get("oneDrive"),l.src=IMAGE_PATH+"/onedrive-logo-white.svg"):c==a.gitHub?(k=mxResources.get("github"),l.src=IMAGE_PATH+"/github-logo-white.svg"):c==a.gitLab?(k=mxResources.get("gitlab"),l.src=IMAGE_PATH+"/gitlab-logo.svg"):c==a.trello&&(k=mxResources.get("trello"),l.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizedIn",[k],"You are now authorized in {1}"));
-d=mxUtils.button(d,b);d.insertBefore(l,d.firstChild);d.style.marginTop="6px";d.className="geBigButton";d.style.fontSize="18px";d.style.padding="14px";g.appendChild(e);g.appendChild(a);g.appendChild(d);this.container=g},FontDialog=function(a,c,d,b,g){function e(a){this.style.border="";13==a.keyCode&&D.click()}var k,l,n,q=document.createElement("table"),f=document.createElement("tbody");q.style.marginTop="8px";k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.whiteSpace=
-"nowrap";l.style.fontSize="10pt";l.style.fontWeight="bold";var m=document.createElement("input");m.style.cssText="margin-right:8px;margin-bottom:8px;";m.setAttribute("value","sysfonts");m.setAttribute("type","radio");m.setAttribute("name","current-fontdialog");m.setAttribute("id","fontdialog-sysfonts");l.appendChild(m);n=document.createElement("label");n.setAttribute("for","fontdialog-sysfonts");mxUtils.write(n,mxResources.get("sysFonts",null,"System Fonts"));l.appendChild(n);k.appendChild(l);f.appendChild(k);
-k=document.createElement("tr");l=document.createElement("td");l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.width="120px";l.style.paddingLeft="15px";mxUtils.write(l,mxResources.get("fontname",null,"Font Name")+":");k.appendChild(l);var p=document.createElement("input");"s"==b&&p.setAttribute("value",c);p.style.marginLeft="4px";p.style.width="250px";p.className="dlg_fontName_s";l=document.createElement("td");l.appendChild(p);k.appendChild(l);f.appendChild(k);k=document.createElement("tr");
-l=document.createElement("td");l.colSpan=2;l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.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");l.appendChild(u);n=document.createElement("label");n.setAttribute("for","fontdialog-googlefonts");mxUtils.write(n,mxResources.get("googleFonts",
-null,"Google Fonts"));l.appendChild(n);k.appendChild(l);f.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.width="120px";l.style.paddingLeft="15px";mxUtils.write(l,mxResources.get("fontname",null,"Font Name")+":");k.appendChild(l);var v=document.createElement("input");"g"==b&&v.setAttribute("value",c);v.style.marginLeft="4px";v.style.width="250px";v.className="dlg_fontName_g";l=document.createElement("td");l.appendChild(v);
-k.appendChild(l);f.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.fontWeight="bold";var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","webfonts");t.setAttribute("type","radio");t.setAttribute("name","current-fontdialog");t.setAttribute("id","fontdialog-webfonts");l.appendChild(t);n=document.createElement("label");n.setAttribute("for",
-"fontdialog-webfonts");mxUtils.write(n,mxResources.get("webfonts",null,"Web Fonts"));l.appendChild(n);k.appendChild(l);f.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.width="120px";l.style.paddingLeft="15px";mxUtils.write(l,mxResources.get("fontname",null,"Font Name")+":");k.appendChild(l);var x=document.createElement("input");"w"==b&&x.setAttribute("value",c);x.style.marginLeft="4px";x.style.width="250px";
-x.className="dlg_fontName_w";l=document.createElement("td");l.appendChild(x);k.appendChild(l);f.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.width="120px";l.style.paddingLeft="15px";mxUtils.write(l,mxResources.get("fontUrl",null,"Font URL")+":");k.appendChild(l);var y=document.createElement("input");y.setAttribute("value",d||"");y.style.marginLeft="4px";y.style.width="250px";y.className="dlg_fontUrl";l=document.createElement("td");
-l.appendChild(y);k.appendChild(l);f.appendChild(k);this.init=function(){var a=p;"g"==b?a=v:"w"==b&&(a=x);a.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?a.select():document.execCommand("selectAll",!1,null)};k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="20px";l.style.whiteSpace="nowrap";l.setAttribute("align","right");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&
-l.appendChild(c);var D=mxUtils.button(mxResources.get("apply"),function(){var b,c,f;m.checked?(b=p.value,f="s"):u.checked?(b=v.value,c=Editor.GOOGLE_FONTS+encodeURIComponent(b).replace(/%20/g,"+"),f="g"):t.checked&&(b=x.value,c=y.value,f="w");var d;d=c;var e=f,k=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==b||0==b.length?(q.querySelector(".dlg_fontName_"+e).style.border="1px solid red",d=!1):"w"!=e||k.test(d)?d=!0:(q.querySelector(".dlg_fontUrl").style.border=
-"1px solid red",d=!1);d&&(g(b,c,f),a.hideDialog())});D.className="geBtn gePrimaryBtn";mxEvent.addListener(p,"keypress",e);mxEvent.addListener(v,"keypress",e);mxEvent.addListener(x,"keypress",e);mxEvent.addListener(y,"keypress",e);mxEvent.addListener(p,"focus",function(){m.setAttribute("checked","checked");m.checked=!0});mxEvent.addListener(v,"focus",function(){u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(x,"focus",function(){t.setAttribute("checked","checked");t.checked=
-!0});mxEvent.addListener(y,"focus",function(){t.setAttribute("checked","checked");t.checked=!0});l.appendChild(D);a.editor.cancelFirst||l.appendChild(c);k.appendChild(l);f.appendChild(k);q.appendChild(f);this.container=q};
+x(a,!1,K)};I(E);var da=null;n&&mxEvent.addListener(B.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var b=this;null!=da&&clearTimeout(da);13==a.keyCode?z(b.value):da=setTimeout(function(){z(b.value)},500)});mxEvent.addListener(U,"click",v);mxEvent.addListener(B.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){v(!0)});mxEvent.addListener(B.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=d&&d();a.hideDialog(!0)})};
+var BtnDialog=function(a,c,d,b){var g=document.createElement("div");g.style.textAlign="center";var e=document.createElement("p");e.style.fontSize="16pt";e.style.padding="0px";e.style.margin="0px";e.style.color="gray";mxUtils.write(e,mxResources.get("done"));var k="Unknown",n=document.createElement("img");n.setAttribute("border","0");n.setAttribute("align","absmiddle");n.style.marginRight="10px";c==a.drive?(k=mxResources.get("googleDrive"),n.src=IMAGE_PATH+"/google-drive-logo-white.svg"):c==a.dropbox?
+(k=mxResources.get("dropbox"),n.src=IMAGE_PATH+"/dropbox-logo-white.svg"):c==a.oneDrive?(k=mxResources.get("oneDrive"),n.src=IMAGE_PATH+"/onedrive-logo-white.svg"):c==a.gitHub?(k=mxResources.get("github"),n.src=IMAGE_PATH+"/github-logo-white.svg"):c==a.gitLab?(k=mxResources.get("gitlab"),n.src=IMAGE_PATH+"/gitlab-logo.svg"):c==a.trello&&(k=mxResources.get("trello"),n.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizedIn",[k],"You are now authorized in {1}"));
+d=mxUtils.button(d,b);d.insertBefore(n,d.firstChild);d.style.marginTop="6px";d.className="geBigButton";d.style.fontSize="18px";d.style.padding="14px";g.appendChild(e);g.appendChild(a);g.appendChild(d);this.container=g},FontDialog=function(a,c,d,b,g){function e(a){this.style.border="";13==a.keyCode&&D.click()}var k,n,m,t=document.createElement("table"),f=document.createElement("tbody");t.style.marginTop="8px";k=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.whiteSpace=
+"nowrap";n.style.fontSize="10pt";n.style.fontWeight="bold";var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";l.setAttribute("value","sysfonts");l.setAttribute("type","radio");l.setAttribute("name","current-fontdialog");l.setAttribute("id","fontdialog-sysfonts");n.appendChild(l);m=document.createElement("label");m.setAttribute("for","fontdialog-sysfonts");mxUtils.write(m,mxResources.get("sysFonts",null,"System Fonts"));n.appendChild(m);k.appendChild(n);f.appendChild(k);
+k=document.createElement("tr");n=document.createElement("td");n.style.whiteSpace="nowrap";n.style.fontSize="10pt";n.style.width="120px";n.style.paddingLeft="15px";mxUtils.write(n,mxResources.get("fontname",null,"Font Name")+":");k.appendChild(n);var p=document.createElement("input");"s"==b&&p.setAttribute("value",c);p.style.marginLeft="4px";p.style.width="250px";p.className="dlg_fontName_s";n=document.createElement("td");n.appendChild(p);k.appendChild(n);f.appendChild(k);k=document.createElement("tr");
+n=document.createElement("td");n.colSpan=2;n.style.whiteSpace="nowrap";n.style.fontSize="10pt";n.style.fontWeight="bold";var u=document.createElement("input");u.style.cssText="margin-right:8px;margin-bottom:8px;";u.setAttribute("value","googlefonts");u.setAttribute("type","radio");u.setAttribute("name","current-fontdialog");u.setAttribute("id","fontdialog-googlefonts");n.appendChild(u);m=document.createElement("label");m.setAttribute("for","fontdialog-googlefonts");mxUtils.write(m,mxResources.get("googleFonts",
+null,"Google Fonts"));n.appendChild(m);k.appendChild(n);f.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.style.whiteSpace="nowrap";n.style.fontSize="10pt";n.style.width="120px";n.style.paddingLeft="15px";mxUtils.write(n,mxResources.get("fontname",null,"Font Name")+":");k.appendChild(n);var v=document.createElement("input");"g"==b&&v.setAttribute("value",c);v.style.marginLeft="4px";v.style.width="250px";v.className="dlg_fontName_g";n=document.createElement("td");n.appendChild(v);
+k.appendChild(n);f.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.whiteSpace="nowrap";n.style.fontSize="10pt";n.style.fontWeight="bold";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","webfonts");q.setAttribute("type","radio");q.setAttribute("name","current-fontdialog");q.setAttribute("id","fontdialog-webfonts");n.appendChild(q);m=document.createElement("label");m.setAttribute("for",
+"fontdialog-webfonts");mxUtils.write(m,mxResources.get("webfonts",null,"Web Fonts"));n.appendChild(m);k.appendChild(n);f.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.style.whiteSpace="nowrap";n.style.fontSize="10pt";n.style.width="120px";n.style.paddingLeft="15px";mxUtils.write(n,mxResources.get("fontname",null,"Font Name")+":");k.appendChild(n);var x=document.createElement("input");"w"==b&&x.setAttribute("value",c);x.style.marginLeft="4px";x.style.width="250px";
+x.className="dlg_fontName_w";n=document.createElement("td");n.appendChild(x);k.appendChild(n);f.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.style.whiteSpace="nowrap";n.style.fontSize="10pt";n.style.width="120px";n.style.paddingLeft="15px";mxUtils.write(n,mxResources.get("fontUrl",null,"Font URL")+":");k.appendChild(n);var y=document.createElement("input");y.setAttribute("value",d||"");y.style.marginLeft="4px";y.style.width="250px";y.className="dlg_fontUrl";n=document.createElement("td");
+n.appendChild(y);k.appendChild(n);f.appendChild(k);this.init=function(){var a=p;"g"==b?a=v:"w"==b&&(a=x);a.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?a.select():document.execCommand("selectAll",!1,null)};k=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.paddingTop="20px";n.style.whiteSpace="nowrap";n.setAttribute("align","right");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&
+n.appendChild(c);var D=mxUtils.button(mxResources.get("apply"),function(){var b,c,f;l.checked?(b=p.value,f="s"):u.checked?(b=v.value,c=Editor.GOOGLE_FONTS+encodeURIComponent(b).replace(/%20/g,"+"),f="g"):q.checked&&(b=x.value,c=y.value,f="w");var d;d=c;var e=f,k=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==b||0==b.length?(t.querySelector(".dlg_fontName_"+e).style.border="1px solid red",d=!1):"w"!=e||k.test(d)?d=!0:(t.querySelector(".dlg_fontUrl").style.border=
+"1px solid red",d=!1);d&&(g(b,c,f),a.hideDialog())});D.className="geBtn gePrimaryBtn";mxEvent.addListener(p,"keypress",e);mxEvent.addListener(v,"keypress",e);mxEvent.addListener(x,"keypress",e);mxEvent.addListener(y,"keypress",e);mxEvent.addListener(p,"focus",function(){l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(v,"focus",function(){u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(x,"focus",function(){q.setAttribute("checked","checked");q.checked=
+!0});mxEvent.addListener(y,"focus",function(){q.setAttribute("checked","checked");q.checked=!0});n.appendChild(D);a.editor.cancelFirst||n.appendChild(c);k.appendChild(n);f.appendChild(k);t.appendChild(f);this.container=t};
function AspectDialog(a,c,d,b,g){this.aspect={pageId:c||a.pages[0].getId(),layerIds:d||[]};c=document.createElement("div");var e=document.createElement("h5");e.style.margin="0 0 10px";mxUtils.write(e,mxResources.get("pages"));c.appendChild(e);d=document.createElement("div");d.className="geAspectDlgList";c.appendChild(d);e=document.createElement("h5");e.style.margin="0 0 10px";mxUtils.write(e,mxResources.get("layers"));c.appendChild(e);e=document.createElement("div");e.className="geAspectDlgList";
c.appendChild(e);this.pagesContainer=d;this.layersContainer=e;this.ui=a;d=document.createElement("div");d.style.marginTop="16px";d.style.textAlign="center";e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});e.className="geBtn";a.editor.cancelFirst&&d.appendChild(e);var k=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){a.hideDialog();b({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));d.appendChild(k);k.className="geBtn gePrimaryBtn";
a.editor.cancelFirst||d.appendChild(e);k.setAttribute("disabled","disabled");this.okBtn=k;c.appendChild(d);this.container=c}AspectDialog.prototype.init=function(){for(var a=0;a<this.ui.pages.length;a++){var c=this.ui.updatePageRoot(this.ui.pages[a]);this.createPageItem(c.getId(),c.getName(),c.node,c.root)}};
@@ -8206,72 +8210,72 @@ Editor.MathJaxRender(this.graph.container)}))};var f=document.getElementsByTagNa
return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0,23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.blob.core.windows.net\//.test(a)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};Editor.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,
c=this;a.convert=function(f){if(null!=f){var d="http://"==f.substring(0,7)||"https://"==f.substring(0,8);d&&!navigator.onLine?f=EditorUi.prototype.svgBrokenImage.src:!d||f.substring(0,a.baseUrl.length)==a.baseUrl||EditorUi.prototype.crossOriginImages&&c.isCorsEnabledForUrl(f)?"chrome-extension://"==f.substring(0,19)||mxClient.IS_CHROMEAPP||(f=b.apply(this,arguments)):f=PROXY_URL+"?url="+encodeURIComponent(f)}return f};return a};Editor.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+
btoa(unescape(encodeURIComponent(a)))};Editor.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b(EditorUi.prototype.svgBrokenImage.src)});else{var c=new Image;EditorUi.prototype.crossOriginImages&&(c.crossOrigin="anonymous");c.onload=function(){var a=document.createElement("canvas"),f=a.getContext("2d");a.height=c.height;a.width=c.width;f.drawImage(c,0,0);try{b(a.toDataURL())}catch(E){b(EditorUi.prototype.svgBrokenImage.src)}};
-c.onerror=function(){b(EditorUi.prototype.svgBrokenImage.src)};c.src=a}};Editor.prototype.convertImages=function(a,b,c,f){null==f&&(f=this.createImageUrlConverter());var d=0,m=c||{};c=mxUtils.bind(this,function(c,p){for(var e=a.getElementsByTagName(c),g=0;g<e.length;g++)mxUtils.bind(this,function(c){var e=f.convert(c.getAttribute(p));if(null!=e&&"data:"!=e.substring(0,5)){var g=m[e];null==g?(d++,this.convertImageToDataUri(e,function(f){null!=f&&(m[e]=f,c.setAttribute(p,f));d--;0==d&&b(a)})):c.setAttribute(p,
-g)}else null!=e&&c.setAttribute(p,e)})(e[g])});c("image","xlink:href");c("img","src");0==d&&b(a)};Editor.prototype.base64Encode=function(a){for(var b="",c=0,f=a.length,d,m,p;c<f;){d=a.charCodeAt(c++)&255;if(c==f){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4);b+="==";break}m=a.charCodeAt(c++);if(c==f){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>
-2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(m&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((m&15)<<2);b+="=";break}p=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(m&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((m&15)<<2|(p&192)>>6);
-b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(p&63)}return b};Editor.prototype.loadUrl=function(a,b,c,f,d,m){try{var p=f||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);d=null!=d?d:!0;var e=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var f=a.getText();if(p){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=
-mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var f=Array(a.length),d=0;d<a.length;d++)f[d]=String.fromCharCode(a[d]);f=f.join("")}m=null!=m?m:"data:image/png;base64,";f=m+this.base64Encode(f)}b(f)}}else null!=c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},p,this.timeout,function(){d&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:e})})});e()}catch(N){null!=c&&c(N)}};Editor.prototype.loadFonts=function(a){if(null!=this.fontCss&&null==this.resolvedFontCss){var b=
-function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},c=this.fontCss.split("url("),f=0,d={},m=mxUtils.bind(this,function(){if(0==f){for(var m=[c[0]],p=1;p<c.length;p++){var e=c[p].indexOf(")");m.push('url("');m.push(d[b(c[p].substring(0,e))]);m.push('"'+c[p].substring(e))}this.resolvedFontCss=m.join("");a()}});if(0<c.length)for(var p=1;p<c.length;p++){var e=c[p].indexOf(")"),g=null,k=c[p].indexOf("format(",e);0<k&&(g=b(c[p].substring(k+7,c[p].indexOf(")",
+c.onerror=function(){b(EditorUi.prototype.svgBrokenImage.src)};c.src=a}};Editor.prototype.convertImages=function(a,b,c,f){null==f&&(f=this.createImageUrlConverter());var d=0,l=c||{};c=mxUtils.bind(this,function(c,p){for(var e=a.getElementsByTagName(c),g=0;g<e.length;g++)mxUtils.bind(this,function(c){var e=f.convert(c.getAttribute(p));if(null!=e&&"data:"!=e.substring(0,5)){var g=l[e];null==g?(d++,this.convertImageToDataUri(e,function(f){null!=f&&(l[e]=f,c.setAttribute(p,f));d--;0==d&&b(a)})):c.setAttribute(p,
+g)}else null!=e&&c.setAttribute(p,e)})(e[g])});c("image","xlink:href");c("img","src");0==d&&b(a)};Editor.prototype.base64Encode=function(a){for(var b="",c=0,f=a.length,d,l,p;c<f;){d=a.charCodeAt(c++)&255;if(c==f){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4);b+="==";break}l=a.charCodeAt(c++);if(c==f){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>
+2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(l&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2);b+="=";break}p=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(l&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2|(p&192)>>6);
+b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(p&63)}return b};Editor.prototype.loadUrl=function(a,b,c,f,d,l){try{var p=f||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);d=null!=d?d:!0;var e=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var f=a.getText();if(p){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=
+mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var f=Array(a.length),d=0;d<a.length;d++)f[d]=String.fromCharCode(a[d]);f=f.join("")}l=null!=l?l:"data:image/png;base64,";f=l+this.base64Encode(f)}b(f)}}else null!=c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},p,this.timeout,function(){d&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:e})})});e()}catch(N){null!=c&&c(N)}};Editor.prototype.loadFonts=function(a){if(null!=this.fontCss&&null==this.resolvedFontCss){var b=
+function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},c=this.fontCss.split("url("),f=0,d={},l=mxUtils.bind(this,function(){if(0==f){for(var l=[c[0]],p=1;p<c.length;p++){var e=c[p].indexOf(")");l.push('url("');l.push(d[b(c[p].substring(0,e))]);l.push('"'+c[p].substring(e))}this.resolvedFontCss=l.join("");a()}});if(0<c.length)for(var p=1;p<c.length;p++){var e=c[p].indexOf(")"),g=null,k=c[p].indexOf("format(",e);0<k&&(g=b(c[p].substring(k+7,c[p].indexOf(")",
k))));mxUtils.bind(this,function(a){if(null==d[a]){d[a]=a;f++;var b="application/x-font-ttf";if("svg"==g||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==g||"embedded-opentype"==g||/(\.otf)($|\?)/i.test(a))b="application/x-font-opentype";else if("woff"==g||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==g||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==g||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==g||/(\.sfnt)($|\?)/i.test(a))b=
-"application/font-sfnt";var c=a;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(c,mxUtils.bind(this,function(b){d[a]=b;f--;m()}),mxUtils.bind(this,function(a){f--;m()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[p].substring(0,e)),g)}}else a()};Editor.prototype.addMathCss=function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var b=document.getElementsByTagName("style"),c=0;c<b.length;c++)0<mxUtils.getTextContent(b[c]).indexOf("MathJax")&&
-a[0].appendChild(b[c].cloneNode(!0))};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||(null==this.graph.extFonts||0==this.graph.extFonts.length)&&this.useCanvasForExport};Editor.prototype.exportToCanvas=function(a,b,c,f,d,m,p,e,g,k,t,z,u,l){m=null!=m?m:!0;z=null!=z?z:this.graph;u=null!=u?u:0;var n=g?null:z.background;n==mxConstants.NONE&&(n=null);null==n&&(n=f);null==n&&0==g&&(n=this.graph.defaultPageBackgroundColor);this.convertImages(z.getSvg(n,null,null,l,null,null!=
-p?p:!0,null,null,null,k),mxUtils.bind(this,function(c){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var p=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),k=parseInt(c.getAttribute("height"));e=null!=e?e:1;null!=b&&(e=m?Math.min(1,Math.min(3*b/(4*k),b/g)):b/g);g=Math.ceil(e*g)+2*u;k=Math.ceil(e*k)+2*u;p.setAttribute("width",g);p.setAttribute("height",k);var t=p.getContext("2d");null!=n&&(t.beginPath(),t.rect(0,0,g,k),t.fillStyle=n,t.fill());t.scale(e,e);mxClient.IS_SF?
-window.setTimeout(function(){t.drawImage(f,u/e,u/e);a(p)},0):(t.drawImage(f,u/e,u/e),a(p))}catch(fa){null!=d&&d(fa)}});f.onerror=function(a){null!=d&&d(a)};try{k&&this.graph.addSvgShadow(c);var p=mxUtils.bind(this,function(){if(null!=this.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}z.mathEnabled&&this.addMathCss(c);f.src=this.createSvgDataUri(mxUtils.getXml(c))});this.loadFonts(p)}catch(Z){null!=
-d&&d(Z)}}),c,t)};Editor.prototype.writeGraphModelToPng=function(a,b,c,f,d){function m(a,b){var c=g;g+=b;return a.substring(c,g)}function p(a){a=m(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function e(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var g=0;if(m(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(m(a,4),
-"IHDR"!=m(a,4))null!=d&&d();else{m(a,17);d=a.substring(0,g);do{var k=p(a);if("IDAT"==m(a,4)){d=a.substring(0,g-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+f;f=4294967295;f=EditorUi.prototype.updateCRC(f,b,0,4);f=EditorUi.prototype.updateCRC(f,c,0,c.length);d+=e(c.length)+b+c+e(f^4294967295);d+=a.substring(g-8,a.length);break}d+=a.substring(g-8,g-4+k);m(a,k);m(a,4)}while(k);return"data:image/png;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink=
-"https://desk.draw.io/support/solutions/articles/16000091426";var g=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var e=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){e.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,b){var c=null;null!=a.editor.graph.getModel().getParent(b)?
-c=b.getId():null!=a.currentPage&&(c=a.currentPage.getId());return c});if(null!=window.StyleFormatPanel){var k=Format.prototype.init;Format.prototype.init=function(){k.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var l=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?l.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=
-this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var n=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=n.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var b=this.editorUi,c=b.editor.graph,f=this.createOption(mxResources.get("shadow"),function(){return c.shadowVisible},function(a){var f=new ChangePageSetup(b);
-f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=a;c.model.execute(f)},{install:function(a){this.listener=function(){a(c.shadowVisible)};b.addListener("shadowVisibleChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});Editor.shadowOptionEnabled||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));a.appendChild(f)}return a};var q=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=q.apply(this,
-arguments);var b=this.editorUi,c=b.editor.graph;if(c.isEnabled()){var f=b.getCurrentFile();if(null!=f&&f.isAutosaveOptional()){var d=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a);b.editor.autosave&&f.isModified()&&f.fileChanged()},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}});a.appendChild(d)}}if(this.isMathOptionVisible()&&
-c.isEnabled()&&"undefined"!==typeof MathJax){d=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return c.mathEnabled},function(a){b.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(c.mathEnabled)};b.addListener("mathEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});d.style.paddingTop="5px";a.appendChild(d);var m=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");
-m.style.position="relative";m.style.marginLeft="6px";m.style.top="2px";d.appendChild(m)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=
-[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",
-dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
-{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",
-type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",
-type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
-{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",
-min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},
-{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",
-min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0},{name:"imageAlign",
-dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",type:"float",min:0,defVal:24},{name:"arcSize",
-dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=
-[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,
-max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",
-defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=
-[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",
-font:"#ffffff"},{fill:"#aa00ff",stroke:"#7700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#ffffff"},{fill:"#f0a30a",stroke:"#BD7000",font:"#ffffff"},{fill:"#e3c800",stroke:"#B09500",font:"#ffffff"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},
-{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",
-stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=
-null;StyleFormatPanel.prototype.findCommonProperties=function(a,b,c){if(null!=b){var f=function(a){if(null!=a)if(c)for(var f=0;f<a.length;f++)b[a[f].name]=a[f];else for(var d in b){for(var m=!1,f=0;f<a.length;f++)if(a[f].name==d&&a[f].type==b[d].type){m=!0;break}m||delete b[d]}},d=this.editorUi.editor.graph.view.getState(a);null!=d&&null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,
-Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),f(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(E){}}};var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments);if(Editor.enableCustomProperties){for(var b=
-{},c=a.vertices,d=a.edges,m=0;m<c.length;m++)this.findCommonProperties(c[m],b,0==m);for(m=0;m<d.length;m++)this.findCommonProperties(d[m],b,0==c.length&&0==m);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(),b,a))}};var m=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));
-b.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";b.style.marginRight="2px";a.appendChild(b);b=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b);
-mxUtils.br(a);return m.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,b,c){function f(a,b,c,f){z.getModel().beginUpdate();try{var d=[],m=[];if(null!=c.index){for(var p=[],e=c.parentRow.nextSibling;e&&e.getAttribute("data-pName")==a;)p.push(e.getAttribute("data-pValue")),e=e.nextSibling;c.index<p.length?null!=f?p.splice(f,1):p[c.index]=b:p.push(b);null!=c.size&&p.length>c.size&&(p=p.slice(0,c.size));b=p.join(",");null!=c.countProperty&&
-(z.setCellStyles(c.countProperty,p.length,z.getSelectionCells()),d.push(c.countProperty),m.push(p.length))}z.setCellStyles(a,b,z.getSelectionCells());d.push(a);m.push(b);if(null!=c.dependentProps)for(a=0;a<c.dependentProps.length;a++){var g=c.dependentPropsDefVal[a],k=c.dependentPropsVals[a];if(k.length>b)k=k.slice(0,b);else for(var u=k.length;u<b;u++)k.push(g);k=k.join(",");z.setCellStyles(c.dependentProps[a],k,z.getSelectionCells());d.push(c.dependentProps[a]);m.push(k)}if("function"==typeof c.onChange)c.onChange(z,
-b);t.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",m,"cells",z.getSelectionCells()))}finally{z.getModel().endUpdate()}}function d(b,c,f){var d=mxUtils.getOffset(a,!0),m=mxUtils.getOffset(b,!0);c.style.position="absolute";c.style.left=m.x-d.x+"px";c.style.top=m.y-d.y+"px";c.style.width=b.offsetWidth+"px";c.style.height=b.offsetHeight-(f?4:0)+"px";c.style.zIndex=5}function m(a,b,c){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px";
-d.style.border="1px solid black";d.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(t,function(m){this.editorUi.pickColor(b,function(b){d.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+"')":b;f(a,b,c)});mxEvent.consume(m)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function p(a,b,c,d,m,p,e){null!=b&&(b=b.split(","),u.push({name:a,values:b,type:c,defVal:d,countProperty:m,
-parentRow:p,isDeletable:!0,flipBkg:e}));btn=mxUtils.button("+",mxUtils.bind(t,function(b){for(var g=p,t=0;null!=g.nextSibling;)if(g.nextSibling.getAttribute("data-pName")==a)g=g.nextSibling,t++;else break;var z={type:c,parentRow:p,index:t,isDeletable:!0,defVal:d,countProperty:m},t=k(a,"",z,0==t%2,e);f(a,d,z);g.parentNode.insertBefore(t,g.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function e(a,b,c,f,d,m,p){if(0<d){var e=Array(d);
-b=null!=b?b.split(","):[];for(var g=0;g<d;g++)e[g]=null!=b[g]?b[g]:null!=f?f:"";u.push({name:a,values:e,type:c,defVal:f,parentRow:m,flipBkg:p,size:d})}return document.createElement("div")}function g(a,b,c){var d=document.createElement("input");d.type="checkbox";d.checked="1"==b;mxEvent.addListener(d,"change",function(){f(a,d.checked?"1":"0",c)});return d}function k(b,c,k,z,u){var n=k.dispName,l=k.type,v=document.createElement("tr");v.className="gePropRow"+(u?"Dark":"")+(z?"Alt":"")+" gePropNonHeaderRow";
-v.setAttribute("data-pName",b);v.setAttribute("data-pValue",c);z=!1;null!=k.index&&(v.setAttribute("data-index",k.index),n=(null!=n?n:"")+"["+k.index+"]",z=!0);var B=document.createElement("td");B.className="gePropRowCell";B.innerHTML=mxUtils.htmlEntities(mxResources.get(n,null,n));z&&(B.style.textAlign="right");v.appendChild(B);B=document.createElement("td");B.className="gePropRowCell";if("color"==l)B.appendChild(m(b,c,k));else if("bool"==l||"boolean"==l)B.appendChild(g(b,c,k));else if("enum"==l){var x=
-k.enumList;for(u=0;u<x.length;u++)if(n=x[u],n.val==c){B.innerHTML=mxUtils.htmlEntities(mxResources.get(n.dispName,null,n.dispName));break}mxEvent.addListener(B,"click",mxUtils.bind(t,function(){var m=document.createElement("select");d(B,m);for(var p=0;p<x.length;p++){var e=x[p],g=document.createElement("option");g.value=mxUtils.htmlEntities(e.val);g.innerHTML=mxUtils.htmlEntities(mxResources.get(e.dispName,null,e.dispName));m.appendChild(g)}m.value=c;a.appendChild(m);mxEvent.addListener(m,"change",
-function(){var a=mxUtils.htmlEntities(m.value);f(b,a,k)});m.focus();mxEvent.addListener(m,"blur",function(){a.removeChild(m)})}))}else"dynamicArr"==l?B.appendChild(p(b,c,k.subType,k.subDefVal,k.countProperty,v,u)):"staticArr"==l?B.appendChild(e(b,c,k.subType,k.subDefVal,k.size,v,u)):(B.innerHTML=c,mxEvent.addListener(B,"click",mxUtils.bind(t,function(){function m(){var a=p.value,a=0==a.length&&"string"!=l?0:a;k.allowAuto&&("auto"==a.trim().toLowerCase()?(a="auto",l="string"):(a=parseFloat(a),a=isNaN(a)?
-0:a));null!=k.min&&a<k.min?a=k.min:null!=k.max&&a>k.max&&(a=k.max);a=mxUtils.htmlEntities(("int"==l?parseInt(a):a)+"");f(b,a,k)}var p=document.createElement("input");d(B,p,!0);p.value=c;p.className="gePropEditor";"int"!=l&&"float"!=l||k.allowAuto||(p.type="number",p.step="int"==l?"1":"any",null!=k.min&&(p.min=parseFloat(k.min)),null!=k.max&&(p.max=parseFloat(k.max)));a.appendChild(p);mxEvent.addListener(p,"keypress",function(a){13==a.keyCode&&m()});p.focus();mxEvent.addListener(p,"blur",function(){m()})})));
-k.isDeletable&&(u=mxUtils.button("-",mxUtils.bind(t,function(a){f(b,"",k,k.index);mxEvent.consume(a)})),u.style.height="16px",u.style.width="25px",u.style["float"]="right",u.className="geColorBtn",B.appendChild(u));v.appendChild(B);return v}var t=this,z=this.editorUi.editor.graph,u=[];a.style.position="relative";a.style.padding="0";var l=document.createElement("table");l.style.whiteSpace="nowrap";l.style.width="100%";var n=document.createElement("tr");n.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"));n.style.cursor="pointer";var x=function(){var b=l.querySelectorAll(".gePropNonHeaderRow"),c;if(t.editorUi.propertiesCollapsed){B.src=Sidebar.prototype.collapsedImage;c="none";for(var f=a.childNodes.length-1;0<=f;f--)try{var d=a.childNodes[f],m=d.nodeName.toUpperCase();"INPUT"!=m&&"SELECT"!=m||a.removeChild(d)}catch(ka){}}else B.src=
-Sidebar.prototype.expandedImage,c="";for(f=0;f<b.length;f++)b[f].style.display=c};mxEvent.addListener(n,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;x()});n.appendChild(v);v=document.createElement("th");v.className="gePropHeaderCell";v.innerHTML=mxResources.get("value");n.appendChild(v);l.appendChild(n);var y=!1,A=!1,C;for(C in b)if(n=b[C],"function"!=typeof n.isVisible||n.isVisible(c,this)){var D=null!=c.style[C]?mxUtils.htmlEntities(c.style[C]+""):n.defVal;if("separator"==
-n.type)A=!A;else{if("staticArr"==n.type)n.size=parseInt(c.style[n.sizeProperty]||b[n.sizeProperty].defVal)||0;else if(null!=n.dependentProps){for(var q=n.dependentProps,I=[],G=[],v=0;v<q.length;v++){var F=c.style[q[v]];G.push(b[q[v]].subDefVal);I.push(null!=F?F.split(","):[])}n.dependentPropsDefVal=G;n.dependentPropsVals=I}l.appendChild(k(C,D,n,y,A));y=!y}}for(v=0;v<u.length;v++)for(n=u[v],b=n.parentRow,c=0;c<n.values.length;c++)C=k(n.name,n.values[c],{type:n.type,parentRow:n.parentRow,isDeletable:n.isDeletable,
-index:c,defVal:n.defVal,countProperty:n.countProperty,size:n.size},0==c%2,n.flipBkg),b.parentNode.insertBefore(C,b.nextSibling),b=C;a.appendChild(l);x();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){f.getModel().beginUpdate();try{var c=f.getSelectionCells();for(b=0;b<c.length;b++){for(var d=f.getModel().getStyle(c[b]),p=0;p<m.length;p++)d=mxUtils.removeStylename(d,m[p]);var e=f.getModel().isVertex(c[b])?f.defaultVertexStyle:
-f.defaultEdgeStyle;null!=a?(d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(e,mxConstants.STYLE_GRADIENTCOLOR,null)),d=""==a.fill?mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR,null)),d=""==a.stroke?mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(e,mxConstants.STYLE_STROKECOLOR,
-null)),f.getModel().isVertex(c[b])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(e,mxConstants.STYLE_FONTCOLOR,null)))):(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR,"#ffffff")),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(e,mxConstants.STYLE_STROKECOLOR,"#000000")),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(e,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(c[b])&&
-(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(e,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(c[b],d)}}finally{f.getModel().endUpdate()}});b.className="geStyleButton";b.style.width="36px";b.style.height="30px";b.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":
-b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?b.style.background="url('"+Dialog.prototype.noColorImage+"')":b.style.backgroundColor=""==a.fill?mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"):a.fill||mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"),b.style.border=a.stroke==mxConstants.NONE?"1px solid transparent":""==a.stroke?"1px solid "+
-mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"):"1px solid "+(a.stroke||mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"));else{var c=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),p=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");b.style.backgroundColor=c;b.style.border="1px solid "+p}d.appendChild(b)}d.innerHTML="";for(var c=
-0;c<a.length;c++)0<c&&0==mxUtils.mod(c,4)&&mxUtils.br(d),b(a[c])}function c(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var f=this.editorUi.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d);var m="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");
-null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var p=document.createElement("div");p.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+"application/font-sfnt";var c=a;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(c,mxUtils.bind(this,function(b){d[a]=b;f--;l()}),mxUtils.bind(this,function(a){f--;l()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[p].substring(0,e)),g)}}else a()};Editor.prototype.addMathCss=function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var b=document.getElementsByTagName("style"),c=0;c<b.length;c++)0<mxUtils.getTextContent(b[c]).indexOf("MathJax")&&
+a[0].appendChild(b[c].cloneNode(!0))};Editor.prototype.addFontCss=function(a){var b=a.getElementsByTagName("defs");null!=this.fontCss&&null!=b&&0<b.length&&(a=a.ownerDocument,a=null!=a.createElementNS?a.createElementNS(mxConstants.NS_SVG,"style"):a.createElement("style"),a.setAttribute("type","text/css"),mxUtils.setTextContent(a,this.fontCss),b[0][0].appendChild(a))};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||(null==this.graph.extFonts||0==this.graph.extFonts.length)&&
+this.useCanvasForExport};Editor.prototype.exportToCanvas=function(a,b,c,f,d,l,p,e,g,k,q,z,u,n){l=null!=l?l:!0;z=null!=z?z:this.graph;u=null!=u?u:0;var m=g?null:z.background;m==mxConstants.NONE&&(m=null);null==m&&(m=f);null==m&&0==g&&(m=this.graph.defaultPageBackgroundColor);this.convertImages(z.getSvg(m,null,null,n,null,null!=p?p:!0,null,null,null,k),mxUtils.bind(this,function(c){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var p=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),
+k=parseInt(c.getAttribute("height"));e=null!=e?e:1;null!=b&&(e=l?Math.min(1,Math.min(3*b/(4*k),b/g)):b/g);g=Math.ceil(e*g)+2*u;k=Math.ceil(e*k)+2*u;p.setAttribute("width",g);p.setAttribute("height",k);var q=p.getContext("2d");null!=m&&(q.beginPath(),q.rect(0,0,g,k),q.fillStyle=m,q.fill());q.scale(e,e);mxClient.IS_SF?window.setTimeout(function(){q.drawImage(f,u/e,u/e);a(p)},0):(q.drawImage(f,u/e,u/e),a(p))}catch(fa){null!=d&&d(fa)}});f.onerror=function(a){null!=d&&d(a)};try{k&&this.graph.addSvgShadow(c);
+var p=mxUtils.bind(this,function(){if(null!=this.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}z.mathEnabled&&this.addMathCss(c);f.src=this.createSvgDataUri(mxUtils.getXml(c))});this.loadFonts(p)}catch(Z){null!=d&&d(Z)}}),c,q)};Editor.prototype.writeGraphModelToPng=function(a,b,c,f,d){function l(a,b){var c=g;g+=b;return a.substring(c,g)}function p(a){a=l(a,4);return a.charCodeAt(3)+
+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function e(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var g=0;if(l(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(l(a,4),"IHDR"!=l(a,4))null!=d&&d();else{l(a,17);d=a.substring(0,g);do{var k=p(a);if("IDAT"==l(a,4)){d=a.substring(0,g-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):
+"")+f;f=4294967295;f=EditorUi.prototype.updateCRC(f,b,0,4);f=EditorUi.prototype.updateCRC(f,c,0,c.length);d+=e(c.length)+b+c+e(f^4294967295);d+=a.substring(g-8,a.length);break}d+=a.substring(g-8,g-4+k);l(a,k);l(a,4)}while(k);return"data:image/png;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";var g=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){g.apply(this,
+arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var e=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){e.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,b){var c=null;null!=a.editor.graph.getModel().getParent(b)?c=b.getId():null!=a.currentPage&&(c=a.currentPage.getId());return c});if(null!=window.StyleFormatPanel){var k=Format.prototype.init;
+Format.prototype.init=function(){k.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var n=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?n.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=
+function(a){return!1};var m=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=m.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var b=this.editorUi,c=b.editor.graph,f=this.createOption(mxResources.get("shadow"),function(){return c.shadowVisible},function(a){var f=new ChangePageSetup(b);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=a;c.model.execute(f)},{install:function(a){this.listener=function(){a(c.shadowVisible)};
+b.addListener("shadowVisibleChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});Editor.shadowOptionEnabled||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));a.appendChild(f)}return a};var t=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=t.apply(this,arguments);var b=this.editorUi,c=b.editor.graph;if(c.isEnabled()){var f=b.getCurrentFile();if(null!=f&&f.isAutosaveOptional()){var d=
+this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a);b.editor.autosave&&f.isModified()&&f.fileChanged()},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}});a.appendChild(d)}}if(this.isMathOptionVisible()&&c.isEnabled()&&"undefined"!==typeof MathJax){d=this.createOption(mxResources.get("mathematicalTypesetting"),
+function(){return c.mathEnabled},function(a){b.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(c.mathEnabled)};b.addListener("mathEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});d.style.paddingTop="5px";a.appendChild(d);var l=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");l.style.position="relative";l.style.marginLeft="6px";l.style.top="2px";d.appendChild(l)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=
+[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",
+dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",
+type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",
+dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=
+[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=
+[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=
+[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",
+type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",
+type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=
+[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",
+dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=
+[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",
+min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",
+min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=[{name:"dx",dispName:"Width1",
+type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=
+[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},
+{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#aa00ff",stroke:"#7700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#ffffff"},{fill:"#f0a30a",stroke:"#BD7000",font:"#ffffff"},{fill:"#e3c800",
+stroke:"#B09500",font:"#ffffff"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},
+{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",
+stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(a,b,c){if(null!=b){var f=function(a){if(null!=a)if(c)for(var f=0;f<a.length;f++)b[a[f].name]=a[f];else for(var d in b){for(var l=!1,f=0;f<a.length;f++)if(a[f].name==d&&a[f].type==b[d].type){l=!0;break}l||delete b[d]}},d=this.editorUi.editor.graph.view.getState(a);null!=d&&
+null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),f(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(E){}}};var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=
+this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments);if(Editor.enableCustomProperties){for(var b={},c=a.vertices,d=a.edges,l=0;l<c.length;l++)this.findCommonProperties(c[l],b,0==l);for(l=0;l<d.length;l++)this.findCommonProperties(d[l],b,0==c.length&&0==l);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(),
+b,a))}};var l=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));b.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";b.style.marginRight="2px";a.appendChild(b);b=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,
+function(a){this.editorUi.actions.get("pasteStyle").funct()}));b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b);mxUtils.br(a);return l.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,b,c){function f(a,b,c,f){z.getModel().beginUpdate();try{var d=[],l=[];if(null!=c.index){for(var p=[],e=c.parentRow.nextSibling;e&&
+e.getAttribute("data-pName")==a;)p.push(e.getAttribute("data-pValue")),e=e.nextSibling;c.index<p.length?null!=f?p.splice(f,1):p[c.index]=b:p.push(b);null!=c.size&&p.length>c.size&&(p=p.slice(0,c.size));b=p.join(",");null!=c.countProperty&&(z.setCellStyles(c.countProperty,p.length,z.getSelectionCells()),d.push(c.countProperty),l.push(p.length))}z.setCellStyles(a,b,z.getSelectionCells());d.push(a);l.push(b);if(null!=c.dependentProps)for(a=0;a<c.dependentProps.length;a++){var g=c.dependentPropsDefVal[a],
+k=c.dependentPropsVals[a];if(k.length>b)k=k.slice(0,b);else for(var u=k.length;u<b;u++)k.push(g);k=k.join(",");z.setCellStyles(c.dependentProps[a],k,z.getSelectionCells());d.push(c.dependentProps[a]);l.push(k)}if("function"==typeof c.onChange)c.onChange(z,b);q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",l,"cells",z.getSelectionCells()))}finally{z.getModel().endUpdate()}}function d(b,c,f){var d=mxUtils.getOffset(a,!0),l=mxUtils.getOffset(b,!0);c.style.position="absolute";
+c.style.left=l.x-d.x+"px";c.style.top=l.y-d.y+"px";c.style.width=b.offsetWidth+"px";c.style.height=b.offsetHeight-(f?4:0)+"px";c.style.zIndex=5}function l(a,b,c){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(q,function(l){this.editorUi.pickColor(b,function(b){d.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+
+"')":b;f(a,b,c)});mxEvent.consume(l)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function p(a,b,c,d,l,p,e){null!=b&&(b=b.split(","),u.push({name:a,values:b,type:c,defVal:d,countProperty:l,parentRow:p,isDeletable:!0,flipBkg:e}));btn=mxUtils.button("+",mxUtils.bind(q,function(b){for(var g=p,q=0;null!=g.nextSibling;)if(g.nextSibling.getAttribute("data-pName")==a)g=g.nextSibling,q++;else break;var z={type:c,parentRow:p,index:q,isDeletable:!0,
+defVal:d,countProperty:l},q=k(a,"",z,0==q%2,e);f(a,d,z);g.parentNode.insertBefore(q,g.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function e(a,b,c,f,d,l,p){if(0<d){var e=Array(d);b=null!=b?b.split(","):[];for(var g=0;g<d;g++)e[g]=null!=b[g]?b[g]:null!=f?f:"";u.push({name:a,values:e,type:c,defVal:f,parentRow:l,flipBkg:p,size:d})}return document.createElement("div")}function g(a,b,c){var d=document.createElement("input");d.type=
+"checkbox";d.checked="1"==b;mxEvent.addListener(d,"change",function(){f(a,d.checked?"1":"0",c)});return d}function k(b,c,k,z,u){var m=k.dispName,n=k.type,v=document.createElement("tr");v.className="gePropRow"+(u?"Dark":"")+(z?"Alt":"")+" gePropNonHeaderRow";v.setAttribute("data-pName",b);v.setAttribute("data-pValue",c);z=!1;null!=k.index&&(v.setAttribute("data-index",k.index),m=(null!=m?m:"")+"["+k.index+"]",z=!0);var B=document.createElement("td");B.className="gePropRowCell";B.innerHTML=mxUtils.htmlEntities(mxResources.get(m,
+null,m));z&&(B.style.textAlign="right");v.appendChild(B);B=document.createElement("td");B.className="gePropRowCell";if("color"==n)B.appendChild(l(b,c,k));else if("bool"==n||"boolean"==n)B.appendChild(g(b,c,k));else if("enum"==n){var x=k.enumList;for(u=0;u<x.length;u++)if(m=x[u],m.val==c){B.innerHTML=mxUtils.htmlEntities(mxResources.get(m.dispName,null,m.dispName));break}mxEvent.addListener(B,"click",mxUtils.bind(q,function(){var l=document.createElement("select");d(B,l);for(var p=0;p<x.length;p++){var e=
+x[p],g=document.createElement("option");g.value=mxUtils.htmlEntities(e.val);g.innerHTML=mxUtils.htmlEntities(mxResources.get(e.dispName,null,e.dispName));l.appendChild(g)}l.value=c;a.appendChild(l);mxEvent.addListener(l,"change",function(){var a=mxUtils.htmlEntities(l.value);f(b,a,k)});l.focus();mxEvent.addListener(l,"blur",function(){a.removeChild(l)})}))}else"dynamicArr"==n?B.appendChild(p(b,c,k.subType,k.subDefVal,k.countProperty,v,u)):"staticArr"==n?B.appendChild(e(b,c,k.subType,k.subDefVal,k.size,
+v,u)):(B.innerHTML=c,mxEvent.addListener(B,"click",mxUtils.bind(q,function(){function l(){var a=p.value,a=0==a.length&&"string"!=n?0:a;k.allowAuto&&("auto"==a.trim().toLowerCase()?(a="auto",n="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=k.min&&a<k.min?a=k.min:null!=k.max&&a>k.max&&(a=k.max);a=mxUtils.htmlEntities(("int"==n?parseInt(a):a)+"");f(b,a,k)}var p=document.createElement("input");d(B,p,!0);p.value=c;p.className="gePropEditor";"int"!=n&&"float"!=n||k.allowAuto||(p.type="number",p.step=
+"int"==n?"1":"any",null!=k.min&&(p.min=parseFloat(k.min)),null!=k.max&&(p.max=parseFloat(k.max)));a.appendChild(p);mxEvent.addListener(p,"keypress",function(a){13==a.keyCode&&l()});p.focus();mxEvent.addListener(p,"blur",function(){l()})})));k.isDeletable&&(u=mxUtils.button("-",mxUtils.bind(q,function(a){f(b,"",k,k.index);mxEvent.consume(a)})),u.style.height="16px",u.style.width="25px",u.style["float"]="right",u.className="geColorBtn",B.appendChild(u));v.appendChild(B);return v}var q=this,z=this.editorUi.editor.graph,
+u=[];a.style.position="relative";a.style.padding="0";var n=document.createElement("table");n.style.whiteSpace="nowrap";n.style.width="100%";var m=document.createElement("tr");m.className="gePropHeader";var v=document.createElement("th");v.className="gePropHeaderCell";var B=document.createElement("img");B.src=Sidebar.prototype.expandedImage;v.appendChild(B);mxUtils.write(v,mxResources.get("property"));m.style.cursor="pointer";var x=function(){var b=n.querySelectorAll(".gePropNonHeaderRow"),c;if(q.editorUi.propertiesCollapsed){B.src=
+Sidebar.prototype.collapsedImage;c="none";for(var f=a.childNodes.length-1;0<=f;f--)try{var d=a.childNodes[f],l=d.nodeName.toUpperCase();"INPUT"!=l&&"SELECT"!=l||a.removeChild(d)}catch(ka){}}else B.src=Sidebar.prototype.expandedImage,c="";for(f=0;f<b.length;f++)b[f].style.display=c};mxEvent.addListener(m,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;x()});m.appendChild(v);v=document.createElement("th");v.className="gePropHeaderCell";v.innerHTML=mxResources.get("value");
+m.appendChild(v);n.appendChild(m);var y=!1,A=!1,C;for(C in b)if(m=b[C],"function"!=typeof m.isVisible||m.isVisible(c,this)){var D=null!=c.style[C]?mxUtils.htmlEntities(c.style[C]+""):m.defVal;if("separator"==m.type)A=!A;else{if("staticArr"==m.type)m.size=parseInt(c.style[m.sizeProperty]||b[m.sizeProperty].defVal)||0;else if(null!=m.dependentProps){for(var t=m.dependentProps,I=[],G=[],v=0;v<t.length;v++){var F=c.style[t[v]];G.push(b[t[v]].subDefVal);I.push(null!=F?F.split(","):[])}m.dependentPropsDefVal=
+G;m.dependentPropsVals=I}n.appendChild(k(C,D,m,y,A));y=!y}}for(v=0;v<u.length;v++)for(m=u[v],b=m.parentRow,c=0;c<m.values.length;c++)C=k(m.name,m.values[c],{type:m.type,parentRow:m.parentRow,isDeletable:m.isDeletable,index:c,defVal:m.defVal,countProperty:m.countProperty,size:m.size},0==c%2,m.flipBkg),b.parentNode.insertBefore(C,b.nextSibling),b=C;a.appendChild(n);x();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){f.getModel().beginUpdate();
+try{var c=f.getSelectionCells();for(b=0;b<c.length;b++){for(var d=f.getModel().getStyle(c[b]),p=0;p<l.length;p++)d=mxUtils.removeStylename(d,l[p]);var e=f.getModel().isVertex(c[b])?f.defaultVertexStyle:f.defaultEdgeStyle;null!=a?(d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(e,mxConstants.STYLE_GRADIENTCOLOR,null)),d=""==a.fill?mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR,
+null)),d=""==a.stroke?mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(e,mxConstants.STYLE_STROKECOLOR,null)),f.getModel().isVertex(c[b])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(e,mxConstants.STYLE_FONTCOLOR,null)))):(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR,"#ffffff")),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(e,
+mxConstants.STYLE_STROKECOLOR,"#000000")),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(e,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(c[b])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(e,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(c[b],d)}}finally{f.getModel().endUpdate()}});b.className="geStyleButton";b.style.width="36px";b.style.height="30px";b.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&
+(mxClient.IS_QUIRKS||10>document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?b.style.background="url('"+Dialog.prototype.noColorImage+"')":b.style.backgroundColor=""==a.fill?mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"):a.fill||mxUtils.getValue(f.defaultVertexStyle,
+mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"),b.style.border=a.stroke==mxConstants.NONE?"1px solid transparent":""==a.stroke?"1px solid "+mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"):"1px solid "+(a.stroke||mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"));else{var c=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),p=mxUtils.getValue(f.defaultVertexStyle,
+mxConstants.STYLE_STROKECOLOR,"#000000");b.style.backgroundColor=c;b.style.border="1px solid "+p}d.appendChild(b)}d.innerHTML="";for(var c=0;c<a.length;c++)0<c&&0==mxUtils.mod(c,4)&&mxUtils.br(d),b(a[c])}function c(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var f=this.editorUi.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight="20px";
+a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d);var l="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var p=document.createElement("div");p.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));var e=document.createElement("div");e.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
1<this.defaultColorSchemes.length&&(a.appendChild(p),a.appendChild(e));mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));c(p);c(e);b(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),c=null;1==this.editorUi.editor.graph.getSelectionCount()&&
(c=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),c.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),c.style.width="202px",c.style.marginBottom="2px",a.appendChild(c));var f=this.editorUi.editor.graph,d=f.view.getState(f.getSelectionCell());1==f.getSelectionCount()&&null!=d&&null!=d.shape&&null!=d.shape.stencil?(b=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
@@ -8283,144 +8287,144 @@ this.layoutManager.getLayout=function(a){var b=this.graph.getCellStyle(a);if(nul
b.childLayout)return c=new mxTableLayout(this.graph),c.rows=b.tableRows||2,c.columns=b.tableColumns||2,c.colPercentages=b.colPercentages,c.rowPercentages=b.rowPercentages,c.equalColumns="1"==mxUtils.getValue(b,"equalColumns",c.colPercentages?"0":"1"),c.equalRows="1"==mxUtils.getValue(b,"equalRows",c.rowPercentages?"0":"1"),c.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),c.border=b.tableBorder||c.border,c.marginLeft=b.marginLeft||0,c.marginRight=b.marginRight||0,c.marginTop=b.marginTop||
0,c.marginBottom=b.marginBottom||0,c.autoAddCol="1"==mxUtils.getValue(b,"autoAddCol","0"),c.autoAddRow="1"==mxUtils.getValue(b,"autoAddRow",c.autoAddCol?"0":"1"),c.colWidths=b.colWidths||"100",c.rowHeights=b.rowHeights||"50",c}return f.apply(this,arguments)};this.updateGlobalUrlVariables()};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));
if(null!=a)for(var b in a)this.globalVars[b]=a[b]}catch(F){null!=window.console&&console.log("Error in vars URL parameter: "+F)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var u=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var b=u.apply(this,arguments);null==b&&null!=this.globalVars&&(b=this.globalVars[a]);return b};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=
-this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var v=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,b,c,f,d,m,p,e,g,k,t){var z=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&&(z=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var u=v.apply(this,arguments);if(t&&null!=this.extFonts&&0<this.extFonts.length){var n=
-u.ownerDocument,l=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"style"):n.createElement("style");null!=n.setAttributeNS?l.setAttributeNS("type","text/css"):l.setAttribute("type","text/css");for(var B="",x=0;x<this.extFonts.length;x++)var y=this.extFonts[x].name,C=this.extFonts[x].url,B=0==C.indexOf(Editor.GOOGLE_FONTS)?B+("@import url("+C+");"):B+('@font-face {font-family: "'+y+'";src: url("'+C+'");}');l.appendChild(n.createTextNode(B));u.getElementsByTagName("defs")[0].appendChild(l)}null!=
-z&&(this.stylesheet=z,this.refresh());return u};var t=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=t.apply(this,arguments);if(this.mathEnabled){var b=this.container.getBoundingClientRect(),c=this.container.scrollTop-b.y,f=this.container.scrollLeft-b.x,d=a.drawText;a.drawText=function(a,b){if(null!=a.text&&null!=a.text.node&&null==a.text.node.ownerSVGElement){var m=a.text.node.style.transform;a.text.node.style.transform="";var p=a.text.node.getBoundingClientRect(),
-e=a.text.node.cloneNode(!0);a.text.node.style.transform=m;e.style.transformOrigin="";for(var g=e.getElementsByTagName("math");0<g.length;)g[0].parentNode.removeChild(g[0]);var g=b.state.scale*a.text.scale,k=(p.x+f)/a.text.scale+b.state.dx,t=(p.y+c)/a.text.scale+b.state.dy,z=p.width,p=p.height,u=b.root.ownerDocument.createElementNS(mxConstants.NS_SVG,"foreignObject");u.setAttribute("x",k*g);u.setAttribute("y",t*g);u.setAttribute("width",z);u.setAttribute("height",p);e.style.top="0px";e.style.left=
-"0px";var n=a.text.getTextRotation(),l=a.text.margin.x,v=a.text.margin.y,m=(2*p*v-p*g*v)/g,m="translate("+b.format((2*z*l-z*g*l)/g)+","+b.format(m)+")";0!=n&&(m+=" rotate("+n+")");u.setAttribute("transform-origin",b.format((k-l*z)*g)+" "+b.format((t-v*p)*g));u.setAttribute("transform",m+" scale("+g+")");u.appendChild(e);b.root.ownerSVGElement.appendChild(u)}else d.apply(this,arguments)}}return a};var x=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return x.apply(this,
-arguments)&&!mxClient.IS_SF};var y=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){y.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
-this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var D=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=
-function(){D.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions)){for(var b=0;b<a.actions.length;b++){var c=a.actions[b];if(null!=c.open)if(this.isCustomLink(c.open)){if(!this.customLinkClicked(c.open))return}else this.openLink(c.open)}this.model.beginUpdate();try{for(b=0;b<a.actions.length;b++)c=a.actions[b],null!=c.toggle&&this.toggleCells(this.getCellsForAction(c.toggle,
-!0)),null!=c.show&&this.setCellsVisible(this.getCellsForAction(c.show,!0),!0),null!=c.hide&&this.setCellsVisible(this.getCellsForAction(c.hide,!0),!1)}finally{this.model.endUpdate()}for(b=0;b<a.actions.length;b++){var c=a.actions[b],f=[];null!=c.select&&this.isEnabled()&&(f=this.getCellsForAction(c.select),this.setSelectionCells(f));null!=c.highlight&&(f=this.getCellsForAction(c.highlight),this.highlightCells(f,c.highlight.color,c.highlight.duration,c.highlight.opacity));null!=c.scroll&&(f=this.getCellsForAction(c.scroll));
-0<f.length&&this.scrollCellToVisible(f[0])}}};Graph.prototype.updateCustomLinksForCell=function(a,b){var c=this.getLinkForCell(b);null!=c&&"data:action/json,"==c.substring(0,17)&&this.setLinkForCell(b,this.updateCustomLink(a,c));if(this.isHtmlLabel(b)){var f=document.createElement("div");f.innerHTML=this.getLabel(b);for(var d=f.getElementsByTagName("a"),m=!1,p=0;p<d.length;p++)c=d[p].getAttribute("href"),null!=c&&"data:action/json,"==c.substring(0,17)&&(d[p].setAttribute("href",this.updateCustomLink(a,
-c)),m=!0);m&&this.labelChanged(b,f.innerHTML)}};Graph.prototype.updateCustomLink=function(a,b){if("data:action/json,"==b.substring(0,17))try{var c=JSON.parse(b.substring(17));null!=c.actions&&(this.updateCustomLinkActions(a,c.actions),b="data:action/json,"+JSON.stringify(c))}catch(J){}return b};Graph.prototype.updateCustomLinkActions=function(a,b){for(var c=0;c<b.length;c++){var f=b[c];this.updateCustomLinkAction(a,f.toggle);this.updateCustomLinkAction(a,f.show);this.updateCustomLinkAction(a,f.hide);
-this.updateCustomLinkAction(a,f.select);this.updateCustomLinkAction(a,f.highlight);this.updateCustomLinkAction(a,f.scroll)}};Graph.prototype.updateCustomLinkAction=function(a,b){if(null!=b&&null!=b.cells){for(var c=[],f=0;f<b.cells.length;f++)if("*"==b.cells[f])c.push(b.cells[f]);else{var d=a[b.cells[f]];null!=d?""!=d&&c.push(d):c.push(b.cells[f])}b.cells=c}};Graph.prototype.getCellsForAction=function(a,b){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,null,null,b))};Graph.prototype.getCellsById=
-function(a){var b=[];if(null!=a)for(var c=0;c<a.length;c++)if("*"==a[c])var f=this.getDefaultParent(),b=b.concat(this.model.filterDescendants(function(a){return a!=f},f));else{var d=this.model.getCell(a[c]);null!=d&&b.push(d)}return b};Graph.prototype.getCellsForTags=function(a,b,c,f){var d=[];if(null!=a){b=null!=b?b:this.model.getDescendants(this.model.getRoot());c=null!=c?c:"tags";for(var m=0,p={},e=0;e<a.length;e++)0<a[e].length&&(p[a[e].toLowerCase()]=!0,m++);for(e=0;e<b.length;e++)if(f&&this.model.getParent(b[e])==
-this.model.root||this.model.isVertex(b[e])||this.model.isEdge(b[e])){var g=null!=b[e].value&&"object"==typeof b[e].value?mxUtils.trim(b[e].value.getAttribute(c)||""):"",k=!1;if(0<g.length){if(g=g.toLowerCase().split(" "),g.length>=a.length){for(var t=k=0;t<g.length&&k<m;t++)null!=p[g[t]]&&k++;k=k==m}}else k=0==a.length;k&&d.push(b[e])}}return d};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],!this.model.isVisible(a[b]))}finally{this.model.endUpdate()}};
-Graph.prototype.setCellsVisible=function(a,b){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],b)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(a,b,c,f){for(var d=0;d<a.length;d++)this.highlightCell(a[d],b,c,f)};Graph.prototype.highlightCell=function(a,b,c,f){b=null!=b?b:mxConstants.DEFAULT_VALID_COLOR;c=null!=c?c:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),m=new mxCellHighlight(this,
-b,d,!1);null!=f&&(m.opacity=f);m.highlight(a);window.setTimeout(function(){null!=m.shape&&(mxUtils.setPrefixedStyle(m.shape.node.style,"transition","all 1200ms ease-in-out"),m.shape.node.style.opacity=0);window.setTimeout(function(){m.destroy()},1200)},c)}};Graph.prototype.addSvgShadow=function(a,b,c){c=null!=c?c:!1;var f=a.ownerDocument,d=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");d.setAttribute("id",this.shadowId);var m=null!=f.createElementNS?
-f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");m.setAttribute("in","SourceAlpha");m.setAttribute("stdDeviation",this.svgShadowBlur);m.setAttribute("result","blur");d.appendChild(m);m=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):f.createElement("feOffset");m.setAttribute("in","blur");m.setAttribute("dx",this.svgShadowSize);m.setAttribute("dy",this.svgShadowSize);m.setAttribute("result","offsetBlur");d.appendChild(m);m=null!=f.createElementNS?
-f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");m.setAttribute("flood-color",this.svgShadowColor);m.setAttribute("flood-opacity",this.svgShadowOpacity);m.setAttribute("result","offsetColor");d.appendChild(m);m=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feComposite"):f.createElement("feComposite");m.setAttribute("in","offsetColor");m.setAttribute("in2","offsetBlur");m.setAttribute("operator","in");m.setAttribute("result","offsetBlur");d.appendChild(m);
-m=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");m.setAttribute("in","SourceGraphic");m.setAttribute("in2","offsetBlur");d.appendChild(m);m=a.getElementsByTagName("defs");0==m.length?(f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),null!=a.firstChild?a.insertBefore(f,a.firstChild):a.appendChild(f)):f=m[0];f.appendChild(d);c||(b=null!=b?b:a.getElementsByTagName("g")[0],null!=b&&(b.setAttribute("filter",
-"url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6),b=a.getAttribute("viewBox"),null!=b&&0<b.length&&(b=b.split(" "),3<b.length&&(w=parseFloat(b[2])+6,h=parseFloat(b[3])+6,a.setAttribute("viewBox",b[0]+" "+b[1]+" "+w+" "+h))))));return d};Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter",
-"url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),b,c=0;do b=this.model.getChildAt(this.model.root,c);while(c++<a&&"1"==mxUtils.getValue(this.getCellStyle(b),"locked","0"));null!=b&&this.setDefaultParent(b)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];
-mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+"/kubernetes.xml"];mxStencilRegistry.libraries.flowchart=
-[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=
-[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/transmission"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]=
-[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/abstract"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries.infographic=[SHAPES_PATH+"/mxInfographic.js"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=
-[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=
-[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];
-mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=
-[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];
-mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var I=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,f,d,m,p,e,g,k){if(null!=c&&null==mxMarker.markers[c]){var t=this.getPackageForType(c);null!=t&&mxStencilRegistry.getStencil(t)}return I.apply(this,arguments)};PrintDialog.prototype.create=
-function(a,b){function c(){n.value=Math.max(1,Math.min(e,Math.max(parseInt(n.value),parseInt(u.value))));u.value=Math.max(1,Math.min(e,Math.min(parseInt(n.value),parseInt(u.value))))}function f(b){function c(b,c,m){var p=b.useCssTransforms,e=b.currentTranslate,g=b.currentScale,k=b.view.translate,t=b.view.scale;b.useCssTransforms&&(b.useCssTransforms=!1,b.currentTranslate=new mxPoint(0,0),b.currentScale=1,b.view.translate=new mxPoint(0,0),b.view.scale=1);var z=b.getGraphBounds(),u=0,n=0,l=ma.get(),
-v=1/b.pageScale,y=x.checked;if(y)var v=parseInt(S.value),C=parseInt(ia.value),v=Math.min(l.height*C/(z.height/b.view.scale),l.width*v/(z.width/b.view.scale));else v=parseInt(B.value)/(100*b.pageScale),isNaN(v)&&(f=1/b.pageScale,B.value="100 %");l=mxRectangle.fromRectangle(l);l.width=Math.ceil(l.width*f);l.height=Math.ceil(l.height*f);v*=f;!y&&b.pageVisible?(z=b.getPageLayout(),u-=z.x*l.width,n-=z.y*l.height):y=!0;if(null==c){c=PrintDialog.createPrintPreview(b,v,l,0,u,n,y);c.pageSelector=!1;c.mathEnabled=
-!1;u=a.getCurrentFile();null!=u&&(c.title=u.getTitle());var D=c.writeHead;c.writeHead=function(b){D.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"))};if("undefined"!==typeof MathJax){var q=c.renderPage;c.renderPage=function(a,b,c,f,d,m){var p=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var e=q.apply(this,arguments);mxClient.NO_FO=p;this.graph.mathEnabled?
-this.mathEnabled=this.mathEnabled||!0:e.className="geDisableMathJax";return e}}u=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(u=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());c.open(null,null,m,!0);null!=u&&(d.stylesheet=u,d.refresh())}else{l=b.background;if(null==l||""==l||l==mxConstants.NONE)l="#ffffff";c.backgroundColor=l;c.autoOrigin=y;c.appendGraph(b,v,u,n,m,!0)}p&&(b.useCssTransforms=p,b.currentTranslate=e,b.currentScale=g,b.view.translate=k,b.view.scale=t);return c}
-var f=parseInt(M.value)/100;isNaN(f)&&(f=1,M.value="100 %");var f=.75*f,m=u.value,p=n.value,e=!t.checked,k=null;e&&(e=m==g&&p==g);if(!e&&null!=a.pages&&a.pages.length){var z=0,e=a.pages.length-1;t.checked||(z=parseInt(m)-1,e=parseInt(p)-1);for(var l=z;l<=e;l++){var v=a.pages[l],m=v==a.currentPage?d:null;if(null==m){var m=a.createTemporaryGraph(d.getStylesheet()),p=!0,z=!1,y=null,C=null;null==v.viewState&&null==v.root&&a.updatePageRoot(v);null!=v.viewState&&(p=v.viewState.pageVisible,z=v.viewState.mathEnabled,
-y=v.viewState.background,C=v.viewState.backgroundImage);m.background=y;m.backgroundImage=null!=C?new mxImage(C.src,C.width,C.height):null;m.pageVisible=p;m.mathEnabled=z;var D=m.getGlobalVariable;m.getGlobalVariable=function(b){return"page"==b?v.getName():"pagenumber"==b?l+1:"pagecount"==b?null!=a.pages?a.pages.length:1:D.apply(this,arguments)};document.body.appendChild(m.container);a.updatePageRoot(v);m.model.setRoot(v.root)}k=c(m,k,l!=e);m!=d&&m.container.parentNode.removeChild(m.container)}}else k=
-c(d);null==k?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(k.mathEnabled&&(e=k.wnd.document,e.writeln('<script type="text/x-mathjax-config">'),e.writeln("MathJax.Hub.Config({"),e.writeln("showMathMenu: false,"),e.writeln('messageStyle: "none",'),e.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),e.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),e.writeln('"HTML-CSS": {'),e.writeln("imageFont: null"),e.writeln("},"),e.writeln("TeX: {"),
-e.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),e.writeln("},"),e.writeln("tex2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("},"),e.writeln("asciimath2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("}"),e.writeln("});"),b&&(e.writeln("MathJax.Hub.Queue(function () {"),e.writeln("window.print();"),e.writeln("});")),e.writeln("\x3c/script>"),e.writeln('<script type="text/javascript" src="'+DRAW_MATH_URL+'/MathJax.js">\x3c/script>')),
-k.closeDocument(),!k.mathEnabled&&b&&PrintDialog.printPreview(k))}var d=a.editor.graph,m=document.createElement("div"),p=document.createElement("h3");p.style.width="100%";p.style.textAlign="center";p.style.marginTop="0px";mxUtils.write(p,b||mxResources.get("print"));m.appendChild(p);var e=1,g=1,k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";
-t.setAttribute("value","all");t.setAttribute("type","radio");t.setAttribute("name","pages-printdialog");k.appendChild(t);p=document.createElement("span");mxUtils.write(p,mxResources.get("printAllPages"));k.appendChild(p);mxUtils.br(k);var z=t.cloneNode(!0);t.setAttribute("checked","checked");z.setAttribute("value","range");k.appendChild(z);p=document.createElement("span");mxUtils.write(p,mxResources.get("pages")+":");k.appendChild(p);var u=document.createElement("input");u.style.cssText="margin:0 8px 0 8px;";
-u.setAttribute("value","1");u.setAttribute("type","number");u.setAttribute("min","1");u.style.width="50px";k.appendChild(u);p=document.createElement("span");mxUtils.write(p,mxResources.get("to"));k.appendChild(p);var n=u.cloneNode(!0);k.appendChild(n);mxEvent.addListener(u,"focus",function(){z.checked=!0});mxEvent.addListener(n,"focus",function(){z.checked=!0});mxEvent.addListener(u,"change",c);mxEvent.addListener(n,"change",c);if(null!=a.pages&&(e=a.pages.length,null!=a.currentPage))for(p=0;p<a.pages.length;p++)if(a.currentPage==
-a.pages[p]){g=p+1;u.value=g;n.value=g;break}u.setAttribute("max",e);n.setAttribute("max",e);1<e&&m.appendChild(k);var l=document.createElement("div");l.style.marginBottom="10px";var v=document.createElement("input");v.style.marginRight="8px";v.setAttribute("value","adjust");v.setAttribute("type","radio");v.setAttribute("name","printZoom");l.appendChild(v);p=document.createElement("span");mxUtils.write(p,mxResources.get("adjustTo"));l.appendChild(p);var B=document.createElement("input");B.style.cssText=
-"margin:0 8px 0 8px;";B.setAttribute("value","100 %");B.style.width="50px";l.appendChild(B);mxEvent.addListener(B,"focus",function(){v.checked=!0});m.appendChild(l);var k=k.cloneNode(!1),x=v.cloneNode(!0);x.setAttribute("value","fit");v.setAttribute("checked","checked");p=document.createElement("div");p.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";p.appendChild(x);k.appendChild(p);l=document.createElement("table");l.style.display="inline-block";var y=document.createElement("tbody"),
-C=document.createElement("tr"),D=C.cloneNode(!0),q=document.createElement("td"),A=q.cloneNode(!0),I=q.cloneNode(!0),G=q.cloneNode(!0),da=q.cloneNode(!0),W=q.cloneNode(!0);q.style.textAlign="right";G.style.textAlign="right";mxUtils.write(q,mxResources.get("fitTo"));var S=document.createElement("input");S.style.cssText="margin:0 8px 0 8px;";S.setAttribute("value","1");S.setAttribute("min","1");S.setAttribute("type","number");S.style.width="40px";A.appendChild(S);p=document.createElement("span");mxUtils.write(p,
-mxResources.get("fitToSheetsAcross"));I.appendChild(p);mxUtils.write(G,mxResources.get("fitToBy"));var ia=S.cloneNode(!0);da.appendChild(ia);mxEvent.addListener(S,"focus",function(){x.checked=!0});mxEvent.addListener(ia,"focus",function(){x.checked=!0});p=document.createElement("span");mxUtils.write(p,mxResources.get("fitToSheetsDown"));W.appendChild(p);C.appendChild(q);C.appendChild(A);C.appendChild(I);D.appendChild(G);D.appendChild(da);D.appendChild(W);y.appendChild(C);y.appendChild(D);l.appendChild(y);
-k.appendChild(l);m.appendChild(k);k=document.createElement("div");p=document.createElement("div");p.style.fontWeight="bold";p.style.marginBottom="12px";mxUtils.write(p,mxResources.get("paperSize"));k.appendChild(p);p=document.createElement("div");p.style.marginBottom="12px";var ma=PageSetupDialog.addPageFormatPanel(p,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);k.appendChild(p);p=document.createElement("span");mxUtils.write(p,mxResources.get("pageScale"));k.appendChild(p);
-var M=document.createElement("input");M.style.cssText="margin:0 8px 0 8px;";M.setAttribute("value","100 %");M.style.width="60px";k.appendChild(M);m.appendChild(k);p=document.createElement("div");p.style.cssText="text-align:right;margin:48px 0 0 0;";k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&p.appendChild(k);a.isOffline()||(l=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
-l.className="geBtn",p.appendChild(l));PrintDialog.previewEnabled&&(l=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),l.className="geBtn",p.appendChild(l));l=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});l.className="geBtn gePrimaryBtn";p.appendChild(l);a.editor.cancelFirst||p.appendChild(k);m.appendChild(p);this.container=m};var z=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
-this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(z.apply(this,arguments),null!=this.mathEnabled&&
-this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var B=document.createElement("canvas"),C=new Image;C.onload=function(){try{B.getContext("2d").drawImage(C,0,0);var a=B.toDataURL("image/png");Editor.prototype.useCanvasForExport=
-null!=a&&6<a.length}catch(G){}};C.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(A){}})();
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,d,b){b.ui=a.ui;return d};a.afterDecode=function(a,d,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="12.2.9";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost="https://www.draw.io";EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";
+this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var v=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,b,c,f,d,l,p,e,g,k,q){var z=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&&(z=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var u=v.apply(this,arguments);if(q&&null!=this.extFonts&&0<this.extFonts.length){var m=
+u.ownerDocument,n=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"style"):m.createElement("style");null!=m.setAttributeNS?n.setAttributeNS("type","text/css"):n.setAttribute("type","text/css");for(var B="",x=0;x<this.extFonts.length;x++)var y=this.extFonts[x].name,C=this.extFonts[x].url,B=0==C.indexOf(Editor.GOOGLE_FONTS)?B+("@import url("+C+");"):B+('@font-face {font-family: "'+y+'";src: url("'+C+'");}');n.appendChild(m.createTextNode(B));u.getElementsByTagName("defs")[0].appendChild(n)}null!=
+z&&(this.stylesheet=z,this.refresh());return u};var q=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=q.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var b=a.drawText;a.drawText=function(a,c){if(null!=c.addForeignObject&&null!=a.text&&a.text.checkBounds()&&null!=a.text.node&&null==a.text.node.ownerSVGElement){c.save();var f=a.text.node.cloneNode(!0);f.style.transformOrigin="";f.style.transform="";f.style.top="0px";f.style.left=
+"0px";for(var d=f.getElementsByTagName("math");0<d.length;)d[0].parentNode.removeChild(d[0]);var l=a.text.scale,d=a.text.bounds.x/l,p=a.text.bounds.y/l,e=a.text.bounds.width/l,l=a.text.bounds.height/l;a.text.updateTransform(c,d,p,e,l);a.text.configureCanvas(c,d,p,e,l);var g=mxUtils.isNode(a.text.value)||a.text.dialect==mxConstants.DIALECT_STRICTHTML,k=g||c instanceof mxVmlCanvas2D?"html":"",q=a.text.value;g||"html"!=k||(q=mxUtils.htmlEntities(q,!1));"html"!=k||mxUtils.isNode(a.text.value)||(q=mxUtils.replaceTrailingNewlines(q,
+"<div><br></div>"));var q=!mxUtils.isNode(a.text.value)&&a.text.replaceLinefeeds&&"html"==k?q.replace(/\n/g,"<br/>"):q,z=a.text.textDirection;z!=mxConstants.TEXT_DIRECTION_AUTO||g||(z=a.text.getAutoDirection());z!=mxConstants.TEXT_DIRECTION_LTR&&z!=mxConstants.TEXT_DIRECTION_RTL&&(z=null);c.addForeignObject(d+c.state.dx,p+c.state.dy,e,l,q,a.text.align,a.text.valign,a.text.wrap,k,a.text.overflow,a.text.clipped,a.text.getTextRotation(),z,f,c.root.ownerSVGElement);c.restore()}else b.apply(this,arguments)}}return a};
+var x=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return x.apply(this,arguments)&&!mxClient.IS_SF};var y=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){y.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?
+null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,
+a.ownerSVGElement))}};var D=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){D.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions)){for(var b=0;b<a.actions.length;b++){var c=a.actions[b];if(null!=c.open)if(this.isCustomLink(c.open)){if(!this.customLinkClicked(c.open))return}else this.openLink(c.open)}this.model.beginUpdate();try{for(b=
+0;b<a.actions.length;b++)c=a.actions[b],null!=c.toggle&&this.toggleCells(this.getCellsForAction(c.toggle,!0)),null!=c.show&&this.setCellsVisible(this.getCellsForAction(c.show,!0),!0),null!=c.hide&&this.setCellsVisible(this.getCellsForAction(c.hide,!0),!1)}finally{this.model.endUpdate()}for(b=0;b<a.actions.length;b++){var c=a.actions[b],f=[];null!=c.select&&this.isEnabled()&&(f=this.getCellsForAction(c.select),this.setSelectionCells(f));null!=c.highlight&&(f=this.getCellsForAction(c.highlight),this.highlightCells(f,
+c.highlight.color,c.highlight.duration,c.highlight.opacity));null!=c.scroll&&(f=this.getCellsForAction(c.scroll));0<f.length&&this.scrollCellToVisible(f[0])}}};Graph.prototype.updateCustomLinksForCell=function(a,b){var c=this.getLinkForCell(b);null!=c&&"data:action/json,"==c.substring(0,17)&&this.setLinkForCell(b,this.updateCustomLink(a,c));if(this.isHtmlLabel(b)){var f=document.createElement("div");f.innerHTML=this.getLabel(b);for(var d=f.getElementsByTagName("a"),l=!1,p=0;p<d.length;p++)c=d[p].getAttribute("href"),
+null!=c&&"data:action/json,"==c.substring(0,17)&&(d[p].setAttribute("href",this.updateCustomLink(a,c)),l=!0);l&&this.labelChanged(b,f.innerHTML)}};Graph.prototype.updateCustomLink=function(a,b){if("data:action/json,"==b.substring(0,17))try{var c=JSON.parse(b.substring(17));null!=c.actions&&(this.updateCustomLinkActions(a,c.actions),b="data:action/json,"+JSON.stringify(c))}catch(J){}return b};Graph.prototype.updateCustomLinkActions=function(a,b){for(var c=0;c<b.length;c++){var f=b[c];this.updateCustomLinkAction(a,
+f.toggle);this.updateCustomLinkAction(a,f.show);this.updateCustomLinkAction(a,f.hide);this.updateCustomLinkAction(a,f.select);this.updateCustomLinkAction(a,f.highlight);this.updateCustomLinkAction(a,f.scroll)}};Graph.prototype.updateCustomLinkAction=function(a,b){if(null!=b&&null!=b.cells){for(var c=[],f=0;f<b.cells.length;f++)if("*"==b.cells[f])c.push(b.cells[f]);else{var d=a[b.cells[f]];null!=d?""!=d&&c.push(d):c.push(b.cells[f])}b.cells=c}};Graph.prototype.getCellsForAction=function(a,b){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,
+null,null,b))};Graph.prototype.getCellsById=function(a){var b=[];if(null!=a)for(var c=0;c<a.length;c++)if("*"==a[c])var f=this.getDefaultParent(),b=b.concat(this.model.filterDescendants(function(a){return a!=f},f));else{var d=this.model.getCell(a[c]);null!=d&&b.push(d)}return b};Graph.prototype.getCellsForTags=function(a,b,c,f){var d=[];if(null!=a){b=null!=b?b:this.model.getDescendants(this.model.getRoot());c=null!=c?c:"tags";for(var l=0,p={},e=0;e<a.length;e++)0<a[e].length&&(p[a[e].toLowerCase()]=
+!0,l++);for(e=0;e<b.length;e++)if(f&&this.model.getParent(b[e])==this.model.root||this.model.isVertex(b[e])||this.model.isEdge(b[e])){var g=null!=b[e].value&&"object"==typeof b[e].value?mxUtils.trim(b[e].value.getAttribute(c)||""):"",k=!1;if(0<g.length){if(g=g.toLowerCase().split(" "),g.length>=a.length){for(var q=k=0;q<g.length&&k<l;q++)null!=p[g[q]]&&k++;k=k==l}}else k=0==a.length;k&&d.push(b[e])}}return d};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],
+!this.model.isVisible(a[b]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,b){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],b)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(a,b,c,f){for(var d=0;d<a.length;d++)this.highlightCell(a[d],b,c,f)};Graph.prototype.highlightCell=function(a,b,c,f){b=null!=b?b:mxConstants.DEFAULT_VALID_COLOR;c=null!=c?c:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,
+mxConstants.STYLE_STROKEWIDTH,1)+4),l=new mxCellHighlight(this,b,d,!1);null!=f&&(l.opacity=f);l.highlight(a);window.setTimeout(function(){null!=l.shape&&(mxUtils.setPrefixedStyle(l.shape.node.style,"transition","all 1200ms ease-in-out"),l.shape.node.style.opacity=0);window.setTimeout(function(){l.destroy()},1200)},c)}};Graph.prototype.addSvgShadow=function(a,b,c){c=null!=c?c:!1;var f=a.ownerDocument,d=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");
+d.setAttribute("id",this.shadowId);var l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");l.setAttribute("in","SourceAlpha");l.setAttribute("stdDeviation",this.svgShadowBlur);l.setAttribute("result","blur");d.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):f.createElement("feOffset");l.setAttribute("in","blur");l.setAttribute("dx",this.svgShadowSize);l.setAttribute("dy",this.svgShadowSize);l.setAttribute("result",
+"offsetBlur");d.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");l.setAttribute("flood-color",this.svgShadowColor);l.setAttribute("flood-opacity",this.svgShadowOpacity);l.setAttribute("result","offsetColor");d.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feComposite"):f.createElement("feComposite");l.setAttribute("in","offsetColor");l.setAttribute("in2","offsetBlur");l.setAttribute("operator","in");
+l.setAttribute("result","offsetBlur");d.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");l.setAttribute("in","SourceGraphic");l.setAttribute("in2","offsetBlur");d.appendChild(l);l=a.getElementsByTagName("defs");0==l.length?(f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),null!=a.firstChild?a.insertBefore(f,a.firstChild):a.appendChild(f)):f=l[0];f.appendChild(d);c||(b=null!=b?b:a.getElementsByTagName("g")[0],
+null!=b&&(b.setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6),b=a.getAttribute("viewBox"),null!=b&&0<b.length&&(b=b.split(" "),3<b.length&&(w=parseFloat(b[2])+6,h=parseFloat(b[3])+6,a.setAttribute("viewBox",b[0]+" "+b[1]+" "+w+" "+h))))));return d};Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=
+a)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),b,c=0;do b=this.model.getChildAt(this.model.root,c);while(c++<a&&"1"==mxUtils.getValue(this.getCellStyle(b),"locked","0"));null!=b&&this.setDefaultParent(b)}};mxStencilRegistry.libraries.mockup=
+[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+
+"/kubernetes.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+
+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/transmission"]=
+[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/abstract"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries.infographic=[SHAPES_PATH+"/mxInfographic.js"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=
+[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=
+[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",
+STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];
+mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=
+[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var I=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,f,d,l,p,e,g,k){if(null!=c&&null==mxMarker.markers[c]){var q=
+this.getPackageForType(c);null!=q&&mxStencilRegistry.getStencil(q)}return I.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function c(){m.value=Math.max(1,Math.min(e,Math.max(parseInt(m.value),parseInt(u.value))));u.value=Math.max(1,Math.min(e,Math.min(parseInt(m.value),parseInt(u.value))))}function f(b){function c(b,c,l){var p=b.useCssTransforms,e=b.currentTranslate,g=b.currentScale,k=b.view.translate,q=b.view.scale;b.useCssTransforms&&(b.useCssTransforms=!1,b.currentTranslate=
+new mxPoint(0,0),b.currentScale=1,b.view.translate=new mxPoint(0,0),b.view.scale=1);var z=b.getGraphBounds(),u=0,m=0,n=ma.get(),v=1/b.pageScale,y=x.checked;if(y)var v=parseInt(S.value),C=parseInt(ia.value),v=Math.min(n.height*C/(z.height/b.view.scale),n.width*v/(z.width/b.view.scale));else v=parseInt(B.value)/(100*b.pageScale),isNaN(v)&&(f=1/b.pageScale,B.value="100 %");n=mxRectangle.fromRectangle(n);n.width=Math.ceil(n.width*f);n.height=Math.ceil(n.height*f);v*=f;!y&&b.pageVisible?(z=b.getPageLayout(),
+u-=z.x*n.width,m-=z.y*n.height):y=!0;if(null==c){c=PrintDialog.createPrintPreview(b,v,n,0,u,m,y);c.pageSelector=!1;c.mathEnabled=!1;u=a.getCurrentFile();null!=u&&(c.title=u.getTitle());var D=c.writeHead;c.writeHead=function(b){D.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"))};if("undefined"!==typeof MathJax){var t=c.renderPage;c.renderPage=function(a,b,c,f,d,l){var p=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&
+!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var e=t.apply(this,arguments);mxClient.NO_FO=p;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:e.className="geDisableMathJax";return e}}u=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(u=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());c.open(null,null,l,!0);null!=u&&(d.stylesheet=u,d.refresh())}else{n=b.background;if(null==n||""==n||n==mxConstants.NONE)n="#ffffff";c.backgroundColor=n;c.autoOrigin=y;
+c.appendGraph(b,v,u,m,l,!0)}p&&(b.useCssTransforms=p,b.currentTranslate=e,b.currentScale=g,b.view.translate=k,b.view.scale=q);return c}var f=parseInt(M.value)/100;isNaN(f)&&(f=1,M.value="100 %");var f=.75*f,l=u.value,p=m.value,e=!q.checked,k=null;e&&(e=l==g&&p==g);if(!e&&null!=a.pages&&a.pages.length){var z=0,e=a.pages.length-1;q.checked||(z=parseInt(l)-1,e=parseInt(p)-1);for(var n=z;n<=e;n++){var v=a.pages[n],l=v==a.currentPage?d:null;if(null==l){var l=a.createTemporaryGraph(d.getStylesheet()),p=
+!0,z=!1,y=null,C=null;null==v.viewState&&null==v.root&&a.updatePageRoot(v);null!=v.viewState&&(p=v.viewState.pageVisible,z=v.viewState.mathEnabled,y=v.viewState.background,C=v.viewState.backgroundImage);l.background=y;l.backgroundImage=null!=C?new mxImage(C.src,C.width,C.height):null;l.pageVisible=p;l.mathEnabled=z;var D=l.getGlobalVariable;l.getGlobalVariable=function(b){return"page"==b?v.getName():"pagenumber"==b?n+1:"pagecount"==b?null!=a.pages?a.pages.length:1:D.apply(this,arguments)};document.body.appendChild(l.container);
+a.updatePageRoot(v);l.model.setRoot(v.root)}k=c(l,k,n!=e);l!=d&&l.container.parentNode.removeChild(l.container)}}else k=c(d);null==k?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(k.mathEnabled&&(e=k.wnd.document,e.writeln('<script type="text/x-mathjax-config">'),e.writeln("MathJax.Hub.Config({"),e.writeln("showMathMenu: false,"),e.writeln('messageStyle: "none",'),e.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),e.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),
+e.writeln('"HTML-CSS": {'),e.writeln("imageFont: null"),e.writeln("},"),e.writeln("TeX: {"),e.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),e.writeln("},"),e.writeln("tex2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("},"),e.writeln("asciimath2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("}"),e.writeln("});"),b&&(e.writeln("MathJax.Hub.Queue(function () {"),e.writeln("window.print();"),e.writeln("});")),e.writeln("\x3c/script>"),
+e.writeln('<script type="text/javascript" src="'+DRAW_MATH_URL+'/MathJax.js">\x3c/script>')),k.closeDocument(),!k.mathEnabled&&b&&PrintDialog.printPreview(k))}var d=a.editor.graph,l=document.createElement("div"),p=document.createElement("h3");p.style.width="100%";p.style.textAlign="center";p.style.marginTop="0px";mxUtils.write(p,b||mxResources.get("print"));l.appendChild(p);var e=1,g=1,k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";
+var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");k.appendChild(q);p=document.createElement("span");mxUtils.write(p,mxResources.get("printAllPages"));k.appendChild(p);mxUtils.br(k);var z=q.cloneNode(!0);q.setAttribute("checked","checked");z.setAttribute("value","range");k.appendChild(z);p=document.createElement("span");mxUtils.write(p,mxResources.get("pages")+
+":");k.appendChild(p);var u=document.createElement("input");u.style.cssText="margin:0 8px 0 8px;";u.setAttribute("value","1");u.setAttribute("type","number");u.setAttribute("min","1");u.style.width="50px";k.appendChild(u);p=document.createElement("span");mxUtils.write(p,mxResources.get("to"));k.appendChild(p);var m=u.cloneNode(!0);k.appendChild(m);mxEvent.addListener(u,"focus",function(){z.checked=!0});mxEvent.addListener(m,"focus",function(){z.checked=!0});mxEvent.addListener(u,"change",c);mxEvent.addListener(m,
+"change",c);if(null!=a.pages&&(e=a.pages.length,null!=a.currentPage))for(p=0;p<a.pages.length;p++)if(a.currentPage==a.pages[p]){g=p+1;u.value=g;m.value=g;break}u.setAttribute("max",e);m.setAttribute("max",e);1<e&&l.appendChild(k);var n=document.createElement("div");n.style.marginBottom="10px";var v=document.createElement("input");v.style.marginRight="8px";v.setAttribute("value","adjust");v.setAttribute("type","radio");v.setAttribute("name","printZoom");n.appendChild(v);p=document.createElement("span");
+mxUtils.write(p,mxResources.get("adjustTo"));n.appendChild(p);var B=document.createElement("input");B.style.cssText="margin:0 8px 0 8px;";B.setAttribute("value","100 %");B.style.width="50px";n.appendChild(B);mxEvent.addListener(B,"focus",function(){v.checked=!0});l.appendChild(n);var k=k.cloneNode(!1),x=v.cloneNode(!0);x.setAttribute("value","fit");v.setAttribute("checked","checked");p=document.createElement("div");p.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";
+p.appendChild(x);k.appendChild(p);n=document.createElement("table");n.style.display="inline-block";var y=document.createElement("tbody"),C=document.createElement("tr"),D=C.cloneNode(!0),t=document.createElement("td"),A=t.cloneNode(!0),I=t.cloneNode(!0),G=t.cloneNode(!0),da=t.cloneNode(!0),W=t.cloneNode(!0);t.style.textAlign="right";G.style.textAlign="right";mxUtils.write(t,mxResources.get("fitTo"));var S=document.createElement("input");S.style.cssText="margin:0 8px 0 8px;";S.setAttribute("value",
+"1");S.setAttribute("min","1");S.setAttribute("type","number");S.style.width="40px";A.appendChild(S);p=document.createElement("span");mxUtils.write(p,mxResources.get("fitToSheetsAcross"));I.appendChild(p);mxUtils.write(G,mxResources.get("fitToBy"));var ia=S.cloneNode(!0);da.appendChild(ia);mxEvent.addListener(S,"focus",function(){x.checked=!0});mxEvent.addListener(ia,"focus",function(){x.checked=!0});p=document.createElement("span");mxUtils.write(p,mxResources.get("fitToSheetsDown"));W.appendChild(p);
+C.appendChild(t);C.appendChild(A);C.appendChild(I);D.appendChild(G);D.appendChild(da);D.appendChild(W);y.appendChild(C);y.appendChild(D);n.appendChild(y);k.appendChild(n);l.appendChild(k);k=document.createElement("div");p=document.createElement("div");p.style.fontWeight="bold";p.style.marginBottom="12px";mxUtils.write(p,mxResources.get("paperSize"));k.appendChild(p);p=document.createElement("div");p.style.marginBottom="12px";var ma=PageSetupDialog.addPageFormatPanel(p,"printdialog",a.editor.graph.pageFormat||
+mxConstants.PAGE_FORMAT_A4_PORTRAIT);k.appendChild(p);p=document.createElement("span");mxUtils.write(p,mxResources.get("pageScale"));k.appendChild(p);var M=document.createElement("input");M.style.cssText="margin:0 8px 0 8px;";M.setAttribute("value","100 %");M.style.width="60px";k.appendChild(M);l.appendChild(k);p=document.createElement("div");p.style.cssText="text-align:right;margin:48px 0 0 0;";k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&
+p.appendChild(k);a.isOffline()||(n=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),n.className="geBtn",p.appendChild(n));PrintDialog.previewEnabled&&(n=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),n.className="geBtn",p.appendChild(n));n=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});n.className="geBtn gePrimaryBtn";p.appendChild(n);
+a.editor.cancelFirst||p.appendChild(k);l.appendChild(p);this.container=l};var z=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=
+this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(z.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var B=
+document.createElement("canvas"),C=new Image;C.onload=function(){try{B.getContext("2d").drawImage(C,0,0);var a=B.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(G){}};C.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(A){}})();
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,d,b){b.ui=a.ui;return d};a.afterDecode=function(a,d,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="12.3.0";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost="https://www.draw.io";EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";
EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":"https://rt.draw.io/cache";Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.logError=function(a,b,c,d,e){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,
-c,d,e);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var f=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",m=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";e=null!=e?e:Error(a);(new Image).src=m+"/log?severity="+f+"&v="+encodeURIComponent(EditorUi.VERSION)+
+c,d,e);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var f=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",l=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";e=null!=e?e:Error(a);(new Image).src=l+"/log?severity="+f+"&v="+encodeURIComponent(EditorUi.VERSION)+
"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=e&&null!=e.stack?"&stack="+encodeURIComponent(e.stack):"")}}catch(y){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=
a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(p){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length>b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(p){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var a=
-[(new Date).toISOString()],b=0;b<arguments.length;b++)a.push(arguments[b]);console.log.apply(console,a)}}catch(p){}};EditorUi.parsePng=function(a,b,c){function f(a,b){var c=m;m+=b;return a.substring(c,m)}function d(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var m=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(f(a,4),"IHDR"!=f(a,4))null!=c&&c();else{f(a,17);do{c=d(a);var p=f(a,4);if(null!=b&&
-b(m-8,p,c))break;value=f(a,c);f(a,4);if("IEND"==p)break}while(c)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle=
+[(new Date).toISOString()],b=0;b<arguments.length;b++)a.push(arguments[b]);console.log.apply(console,a)}}catch(p){}};EditorUi.parsePng=function(a,b,c){function f(a,b){var c=l;l+=b;return a.substring(c,l)}function d(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var l=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(f(a,4),"IHDR"!=f(a,4))null!=c&&c();else{f(a,17);do{c=d(a);var p=f(a,4);if(null!=b&&
+b(l-8,p,c))break;value=f(a,c);f(a,4);if("IEND"==p)break}while(c)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle=
"shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";EditorUi.prototype.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');
EditorUi.prototype.crossOriginImages=!mxClient.IS_IE;EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
-!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(v){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(t){}};c.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(v){}try{b=
+!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(v){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(q){}};c.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(v){}try{b=
document.createElement("canvas");b.width=b.height=1;var d=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==d.match("image/jpeg")}catch(v){}})();EditorUi.prototype.openLink=function(a,b,c){return this.editor.graph.openLink(a,b,c)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);null!=c&&c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);
b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isAppCache=function(){return"1"==urlParams.appcache||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(a){return this.isOfflineApp()||
-!navigator.onLine||!a&&"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,c){c=null!=c?c:24;var f=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),d=f.spin;f.spin=function(c,m){var p=!1;this.active||(d.call(this,c),this.active=!0,null!=m&&(p=document.createElement("div"),p.style.position="absolute",p.style.whiteSpace="nowrap",p.style.background="#4B4243",
-p.style.color="white",p.style.fontFamily="Helvetica, Arial",p.style.fontSize="9pt",p.style.padding="6px",p.style.paddingLeft="10px",p.style.paddingRight="10px",p.style.zIndex=2E9,p.style.left=Math.max(0,a)+"px",p.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(p.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(p.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=m.substring(m.length-3,m.length)&&"!"!=
-m.charAt(m.length-1)&&(m+="..."),p.innerHTML=m,c.appendChild(p),f.status=p,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(p.style.left=Math.round(Math.max(0,a-p.offsetWidth/2))+"px",p.style.top=Math.round(Math.max(0,b+70-p.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,m)}));this.stop();return a}),p=!0);return p};var m=f.stop;f.stop=function(){m.call(this);this.active=!1;null!=
+!navigator.onLine||!a&&"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,c){c=null!=c?c:24;var f=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),d=f.spin;f.spin=function(c,l){var p=!1;this.active||(d.call(this,c),this.active=!0,null!=l&&(p=document.createElement("div"),p.style.position="absolute",p.style.whiteSpace="nowrap",p.style.background="#4B4243",
+p.style.color="white",p.style.fontFamily="Helvetica, Arial",p.style.fontSize="9pt",p.style.padding="6px",p.style.paddingLeft="10px",p.style.paddingRight="10px",p.style.zIndex=2E9,p.style.left=Math.max(0,a)+"px",p.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(p.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(p.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=l.substring(l.length-3,l.length)&&"!"!=
+l.charAt(l.length-1)&&(l+="..."),p.innerHTML=l,c.appendChild(p),f.status=p,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(p.style.left=Math.round(Math.max(0,a-p.offsetWidth/2))+"px",p.style.top=Math.round(Math.max(0,b+70-p.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,l)}));this.stop();return a}),p=!0);return p};var l=f.stop;f.stop=function(){l.call(this);this.active=!1;null!=
f.status&&(f.status.parentNode.removeChild(f.status),f.status=null)};f.pause=function(){return function(){}};return f};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(u){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&
177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3)};EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;
EditorUi.prototype.extractGraphModelFromHtml=function(b){var c=a.apply(this,arguments);if(null==c)try{var d=b.indexOf("&lt;mxfile ");if(0<=d){var f=b.lastIndexOf("&lt;/mxfile&gt;");f>d&&(c=b.substring(d,f+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var e=mxUtils.parseXml(b),g=this.editor.extractGraphModel(e.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),c=null!=g?mxUtils.getXml(g):""}catch(x){}return c};EditorUi.prototype.validateFileData=
function(a){if(null!=a&&0<a.length){var b=a.indexOf('<meta charset="utf-8">');0<=b&&(a=a.slice(0,b)+'<meta charset="utf-8"/>'+a.slice(b+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a){b=this.editor.graph;b.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");
if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var f=d.length-1;0<=f;f--){var e=this.updatePageRoot(new DiagramPage(d[f]));null==e.getName()&&e.setName(mxResources.get("pageWithNumber",[f+1]));b.model.execute(new ChangePage(this,e,0==f?e:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),
-this.currentPage.setName(mxResources.get("pageWithNumber",[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(f=0;f<c.length;f++)b.model.execute(new ChangePage(this,c[f],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,d,e,g,k,l,n,q,z){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;n=null!=n?n:!0;var f,m=null;null==
-c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?f="_blank":m=f=d;if(null==a)return"";var p=a;if("mxfile"!=p.nodeName.toLowerCase()){if(z){var t=a.ownerDocument.createElement("diagram");t.setAttribute("id",Editor.guid());t.appendChild(a)}else{t=Graph.zapGremlins(mxUtils.getXml(a));p=Graph.compress(t);if(Graph.decompress(p)!=t)return t;t=a.ownerDocument.createElement("diagram");t.setAttribute("id",Editor.guid());mxUtils.setTextContent(t,p)}p=a.ownerDocument.createElement("mxfile");p.appendChild(t)}q?
+this.currentPage.setName(mxResources.get("pageWithNumber",[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(f=0;f<c.length;f++)b.model.execute(new ChangePage(this,c[f],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,d,e,g,k,n,m,t,z){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;m=null!=m?m:!0;var f,l=null;null==
+c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?f="_blank":l=f=d;if(null==a)return"";var p=a;if("mxfile"!=p.nodeName.toLowerCase()){if(z){var q=a.ownerDocument.createElement("diagram");q.setAttribute("id",Editor.guid());q.appendChild(a)}else{q=Graph.zapGremlins(mxUtils.getXml(a));p=Graph.compress(q);if(Graph.decompress(p)!=q)return q;q=a.ownerDocument.createElement("diagram");q.setAttribute("id",Editor.guid());mxUtils.setTextContent(q,p)}p=a.ownerDocument.createElement("mxfile");p.appendChild(q)}t?
(p=p.cloneNode(!0),p.removeAttribute("modified"),p.removeAttribute("host"),p.removeAttribute("agent"),p.removeAttribute("etag"),p.removeAttribute("userAgent"),p.removeAttribute("version"),p.removeAttribute("editor"),p.removeAttribute("type")):(p.removeAttribute("userAgent"),p.removeAttribute("version"),p.removeAttribute("editor"),p.removeAttribute("pages"),p.removeAttribute("type"),mxClient.IS_CHROMEAPP?p.setAttribute("host","Chrome"):EditorUi.isElectronApp?p.setAttribute("host","Electron"):p.setAttribute("host",
-window.location.hostname),p.setAttribute("modified",(new Date).toISOString()),p.setAttribute("agent",navigator.userAgent),p.setAttribute("version",EditorUi.VERSION),p.setAttribute("etag",Editor.guid()),a=null!=c?c.getMode():this.mode,null!=a&&p.setAttribute("type",a),null!=this.pages&&p.setAttribute("pages",this.pages.length));z=z?mxUtils.getPrettyXml(p):mxUtils.getXml(p);if(!g&&!e&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))z=this.getHtml2(mxUtils.getXml(p),b,null!=c?c.getTitle():null,f,m);else if(g||
-!e&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(d=null),z=this.getEmbeddedSvg(z,b,d,null,l,n,m);return z};EditorUi.prototype.getXmlFileData=function(a,b,c){a=null!=a?a:!0;b=null!=b?b:!1;c=null!=c?c:!Editor.compressXml;var d=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&c?(b=mxUtils.trim(mxUtils.getTextContent(a)),
+window.location.hostname),p.setAttribute("modified",(new Date).toISOString()),p.setAttribute("agent",navigator.userAgent),p.setAttribute("version",EditorUi.VERSION),p.setAttribute("etag",Editor.guid()),a=null!=c?c.getMode():this.mode,null!=a&&p.setAttribute("type",a),null!=this.pages&&p.setAttribute("pages",this.pages.length));z=z?mxUtils.getPrettyXml(p):mxUtils.getXml(p);if(!g&&!e&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))z=this.getHtml2(mxUtils.getXml(p),b,null!=c?c.getTitle():null,f,l);else if(g||
+!e&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(d=null),z=this.getEmbeddedSvg(z,b,d,null,n,m,l);return z};EditorUi.prototype.getXmlFileData=function(a,b,c){a=null!=a?a:!0;b=null!=b?b:!1;c=null!=c?c:!Editor.compressXml;var d=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&c?(b=mxUtils.trim(mxUtils.getTextContent(a)),
a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):null==b||c?a=a.cloneNode(!0):(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));d.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(d)),d=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){if(this.currentPage!=this.pages[b]&&this.pages[b].needsUpdate){var f=
(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root));this.editor.graph.saveViewState(this.pages[b].viewState,f);EditorUi.removeChildNodes(this.pages[b].node);mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(f));delete this.pages[b].needsUpdate}a(this.pages[b].node)}return d};EditorUi.prototype.anonymizeString=function(a,b){for(var c=[],d=0;d<a.length;d++){var f=a.charAt(d);0<=EditorUi.ignoredAnonymizedChars.indexOf(f)?c.push(f):isNaN(parseInt(f))?f.toLowerCase()!=
f?c.push(String.fromCharCode(65+Math.round(25*Math.random()))):f.toUpperCase()!=f?c.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(f)?c.push(" "):c.push("?"):c.push(b?"0":Math.round(9*Math.random()))}return c.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var b=0;b<a[EditorUi.DIFF_INSERT].length;b++)try{var c=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][b].data).documentElement.cloneNode(!1);null!=c.getAttribute("name")&&c.setAttribute("name",
-this.anonymizeString(c.getAttribute("name")));a[EditorUi.DIFF_INSERT][b].data=mxUtils.getXml(c)}catch(t){a[EditorUi.DIFF_INSERT][b].data=t.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]){var f=a[EditorUi.DIFF_UPDATE][d];null!=f.name&&(f.name=this.anonymizeString(f.name));null!=f.cells&&(b=mxUtils.bind(this,function(a){var b=f.cells[a];if(null!=b){for(var c in b)null!=b[c].value&&(b[c].value="["+b[c].value.length+"]"),null!=b[c].xmlValue&&(b[c].xmlValue="["+b[c].xmlValue.length+
+this.anonymizeString(c.getAttribute("name")));a[EditorUi.DIFF_INSERT][b].data=mxUtils.getXml(c)}catch(q){a[EditorUi.DIFF_INSERT][b].data=q.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]){var f=a[EditorUi.DIFF_UPDATE][d];null!=f.name&&(f.name=this.anonymizeString(f.name));null!=f.cells&&(b=mxUtils.bind(this,function(a){var b=f.cells[a];if(null!=b){for(var c in b)null!=b[c].value&&(b[c].value="["+b[c].value.length+"]"),null!=b[c].xmlValue&&(b[c].xmlValue="["+b[c].xmlValue.length+
"]"),null!=b[c].style&&(b[c].style="["+b[c].style.length+"]"),0==Object.keys(b[c]).length&&delete b[c];0==Object.keys(b).length&&delete f.cells[a]}}),b(EditorUi.DIFF_INSERT),b(EditorUi.DIFF_UPDATE),0==Object.keys(f.cells).length&&delete f.cells);0==Object.keys(f).length&&delete a[EditorUi.DIFF_UPDATE][d]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var c=0;c<a.attributes.length;c++)"as"!=
a.attributes[c].name&&a.setAttribute(a.attributes[c].name,this.anonymizeString(a.attributes[c].value,b));if(null!=a.childNodes)for(c=0;c<a.childNodes.length;c++)this.anonymizeAttributes(a.childNodes[c],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var c=a.getElementsByTagName("mxCell"),d=0;d<c.length;d++)null!=c[d].getAttribute("value")&&c[d].setAttribute("value","["+c[d].getAttribute("value").length+"]"),null!=c[d].getAttribute("xmlValue")&&c[d].setAttribute("xmlValue","["+c[d].getAttribute("xmlValue").length+
"]"),null!=c[d].getAttribute("style")&&c[d].setAttribute("style","["+c[d].getAttribute("style").length+"]"),null!=c[d].parentNode&&"root"!=c[d].parentNode.nodeName&&null!=c[d].parentNode.parentNode&&(c[d].setAttribute("id",c[d].parentNode.getAttribute("id")),c[d].parentNode.parentNode.replaceChild(c[d],c[d].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var b=this.getCurrentFile();null!=b&&(b.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&b.invalidChecksum?
b.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(b.clearAutosave(),this.editor.setStatus(""),a?b.reloadFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)})):b.synchronizeFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,c,d,e,g,k,
-l,n,q){e=null!=e?e:!0;g=null!=g?g:!1;var f=this.editor.graph;if(b||!a&&null!=n&&/(\.svg)$/i.test(n.getTitle()))if(q=!1,null!=this.pages&&this.currentPage!=this.pages[0]){var m=f.getGlobalVariable,f=this.createTemporaryGraph(f.getStylesheet()),p=this.pages[0];f.getGlobalVariable=function(a){return"page"==a?p.getName():"pagenumber"==a?1:m.apply(this,arguments)};document.body.appendChild(f.container);f.model.setRoot(p.root)}k=null!=k?k:this.getXmlFileData(e,g,q);n=null!=n?n:this.getCurrentFile();a=this.createFileData(k,
-f,n,window.location.href,a,b,c,d,e,l,q);f!=this.editor.graph&&f.container.parentNode.removeChild(f.container);return a};EditorUi.prototype.getHtml=function(a,b,c,d,e,g){g=null!=g?g:!0;var f=null,m=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var f=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),p=b.view.scale;g=Math.floor(f.x/p-b.view.translate.x);p=Math.floor(f.y/p-b.view.translate.y);f=b.background;null==e&&(b=this.getBasenames().join(";"),0<b.length&&(m=EditorUi.drawHost+
+n,m,t){e=null!=e?e:!0;g=null!=g?g:!1;var f=this.editor.graph;if(b||!a&&null!=m&&/(\.svg)$/i.test(m.getTitle()))if(t=!1,null!=this.pages&&this.currentPage!=this.pages[0]){var l=f.getGlobalVariable,f=this.createTemporaryGraph(f.getStylesheet()),p=this.pages[0];f.getGlobalVariable=function(a){return"page"==a?p.getName():"pagenumber"==a?1:l.apply(this,arguments)};document.body.appendChild(f.container);f.model.setRoot(p.root)}k=null!=k?k:this.getXmlFileData(e,g,t);m=null!=m?m:this.getCurrentFile();a=this.createFileData(k,
+f,m,window.location.href,a,b,c,d,e,n,t);f!=this.editor.graph&&f.container.parentNode.removeChild(f.container);return a};EditorUi.prototype.getHtml=function(a,b,c,d,e,g){g=null!=g?g:!0;var f=null,l=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var f=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),p=b.view.scale;g=Math.floor(f.x/p-b.view.translate.x);p=Math.floor(f.y/p-b.view.translate.y);f=b.background;null==e&&(b=this.getBasenames().join(";"),0<b.length&&(l=EditorUi.drawHost+
"/embed.js?s="+b));a.setAttribute("x0",g);a.setAttribute("y0",p)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=d&&a.setAttribute("edit",d));null!=e&&(e=e.replace(/&/g,"&amp;"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";d=Graph.compress(a);Graph.decompress(d)!=a&&(d=encodeURIComponent(a));return(null==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
"")+"<!DOCTYPE html>\n<html"+(null!=e?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==e?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=e?'<meta http-equiv="refresh" content="0;URL=\''+e+"'\"/>\n":"")+"</head>\n<body"+(null==e&&null!=f&&f!=mxConstants.NONE?' style="background-color:'+f+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+d+
-"</div>\n</div>\n"+(null==e?'<script type="text/javascript" src="'+m+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+e+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,c,d,e){b=EditorUi.drawHost+"/js/viewer.min.js";null!=e&&(e=e.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(a),
+"</div>\n</div>\n"+(null==e?'<script type="text/javascript" src="'+l+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+e+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,c,d,e){b=EditorUi.drawHost+"/js/viewer.min.js";null!=e&&(e=e.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(a),
toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=e?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==e?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=e?'<meta http-equiv="refresh" content="0;URL=\''+e+"'\"/>\n":
"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==e?'<script type="text/javascript" src="'+b+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+e+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=
this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=Editor.extractParserError(a,mxResources.get("invalidOrMissingFile"));if(b)throw Error(b);b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a&&"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<b.length||1==b.length&&b[0].hasAttribute("name"))){var c=null;this.fileNode=a;this.pages=[];for(var d=0;d<b.length;d++)null==
b[d].getAttribute("id")&&b[d].setAttribute("id",d),a=new DiagramPage(b[d]),null==a.getName()&&a.setName(mxResources.get("pageWithNumber",[d+1])),this.pages.push(a),null!=urlParams["page-id"]&&a.getId()==urlParams["page-id"]&&(c=a);this.currentPage=null!=c?c:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),
this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var f=urlParams["layer-ids"].split(" ");a={};for(d=0;d<f.length;d++)a[f[d]]=!0;for(var e=this.editor.graph.getModel(),g=e.getChildren(e.root),d=0;d<g.length;d++){var k=g[d];e.setVisible(k,a[k.id]||!1)}}catch(D){}};EditorUi.prototype.getBaseFilename=function(a){var b=
-this.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(b)||/(\.html)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.png)$/i.test(b)||/(\.drawio)$/i.test(b))b=b.substring(0,b.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(b=b+"-"+this.currentPage.getName());return b};EditorUi.prototype.downloadFile=function(a,b,c,d,e,g,k,l,n,q){try{d=
-null!=d?d:this.editor.graph.isSelectionEmpty();var f=this.getBaseFilename(!e),m=f+"."+a;if("xml"==a){var p='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,d,e,null,null,null,b);this.saveData(m,a,p,"text/xml")}else if("html"==a)p=this.getHtml2(this.getFileData(!0),this.editor.graph,f),this.saveData(m,a,p,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?m=f+".png":"jpeg"==a&&(m=f+".jpg"),this.saveRequest(m,
-a,mxUtils.bind(this,function(b,c){try{var f=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var m=this.createDownloadRequest(b,a,d,c,k,e,l,n,q);this.editor.graph.pageVisible=f;return m}catch(N){this.handleError(N)}}));else{var t=null,u=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(t)}))});if("svg"==
-a){var v=this.editor.graph.background;if(k||v==mxConstants.NONE)v=null;var y=this.editor.graph.getSvg(v,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(y);this.convertImages(y,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();u('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else m=f+".svg",t=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();
-u(a)}),d)}}catch(H){this.handleError(H)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d,e,g,k,l,n){var f=this.editor.graph,m=f.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==g?!1:"xmlpng"!=b);var p="",t="";if(m.width*m.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};m="0";"pdf"==b&&0==g&&(t="&allPages=1");if("xmlpng"==b&&(m="1",b="png",null!=this.pages&&null!=this.currentPage))for(g=0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){p=
-"&from="+g;break}g=f.background;"png"==b&&e?g=mxConstants.NONE:e||null!=g&&g!=mxConstants.NONE||(g="#ffffff");e={globalVars:f.getExportVariables()};n&&(e.grid={size:f.gridSize,steps:f.view.gridSteps,color:f.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+p+t+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+d+"&embedXml="+m+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(e))+(null!=k?"&scale="+k:"")+(null!=l?"&border="+
-l:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,c){var d=window.location.hash,f=mxUtils.bind(this,function(c){var f=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<f.length&&(f+="\n"),f+=c);c=new LocalFile(this,"csv"!=a.format&&0<f.length?f:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return d};this.fileLoaded(c);"csv"==a.format&&this.importCsv(f,mxUtils.bind(this,
-function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var m=null!=a.interval?parseInt(a.interval):6E4,p=null,e=mxUtils.bind(this,function(){var b=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){b===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),g()):this.handleError({message:mxResources.get("error")+
-" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),g=mxUtils.bind(this,function(){window.clearTimeout(p);p=window.setTimeout(e,m)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){g();e()}));g();e()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var m=a.url;/^https?:\/\//.test(m)&&!this.editor.isCorsEnabledForUrl(m)&&(m=PROXY_URL+"?url="+encodeURIComponent(m));this.loadUrl(m,mxUtils.bind(this,function(a){f(a)}),mxUtils.bind(this,function(a){null!=c&&
+this.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(b)||/(\.html)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.png)$/i.test(b)||/(\.drawio)$/i.test(b))b=b.substring(0,b.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(b=b+"-"+this.currentPage.getName());return b};EditorUi.prototype.downloadFile=function(a,b,c,d,e,g,k,n,m,t){try{d=
+null!=d?d:this.editor.graph.isSelectionEmpty();var f=this.getBaseFilename(!e),l=f+"."+a;if("xml"==a){var p='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,d,e,null,null,null,b);this.saveData(l,a,p,"text/xml")}else if("html"==a)p=this.getHtml2(this.getFileData(!0),this.editor.graph,f),this.saveData(l,a,p,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?l=f+".png":"jpeg"==a&&(l=f+".jpg"),this.saveRequest(l,
+a,mxUtils.bind(this,function(b,c){try{var f=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var l=this.createDownloadRequest(b,a,d,c,k,e,n,m,t);this.editor.graph.pageVisible=f;return l}catch(N){this.handleError(N)}}));else{var q=null,u=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(l,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(q)}))});if("svg"==
+a){var v=this.editor.graph.background;if(k||v==mxConstants.NONE)v=null;var y=this.editor.graph.getSvg(v,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(y);this.convertImages(y,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();u('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else l=f+".svg",q=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();
+u(a)}),d)}}catch(H){this.handleError(H)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d,e,g,k,n,m){var f=this.editor.graph,l=f.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==g?!1:"xmlpng"!=b);var p="",q="";if(l.width*l.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};l="0";"pdf"==b&&0==g&&(q="&allPages=1");if("xmlpng"==b&&(l="1",b="png",null!=this.pages&&null!=this.currentPage))for(g=0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){p=
+"&from="+g;break}g=f.background;"png"==b&&e?g=mxConstants.NONE:e||null!=g&&g!=mxConstants.NONE||(g="#ffffff");e={globalVars:f.getExportVariables()};m&&(e.grid={size:f.gridSize,steps:f.view.gridSteps,color:f.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+p+q+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+d+"&embedXml="+l+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(e))+(null!=k?"&scale="+k:"")+(null!=n?"&border="+
+n:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,c){var d=window.location.hash,f=mxUtils.bind(this,function(c){var f=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<f.length&&(f+="\n"),f+=c);c=new LocalFile(this,"csv"!=a.format&&0<f.length?f:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return d};this.fileLoaded(c);"csv"==a.format&&this.importCsv(f,mxUtils.bind(this,
+function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var l=null!=a.interval?parseInt(a.interval):6E4,p=null,e=mxUtils.bind(this,function(){var b=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){b===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),g()):this.handleError({message:mxResources.get("error")+
+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),g=mxUtils.bind(this,function(){window.clearTimeout(p);p=window.setTimeout(e,l)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){g();e()}));g();e()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var l=a.url;/^https?:\/\//.test(l)&&!this.editor.isCorsEnabledForUrl(l)&&(l=PROXY_URL+"?url="+encodeURIComponent(l));this.loadUrl(l,mxUtils.bind(this,function(a){f(a)}),mxUtils.bind(this,function(a){null!=c&&
c(a)}))}else f("")};EditorUi.prototype.updateDiagram=function(a){function b(a){var b=new mxCellOverlay(a.image||f.warningImage,a.tooltip,a.align,a.valign,a.offset);b.addListener(mxEvent.CLICK,function(b,c){d.alert(a.tooltip)});return b}var c=null,d=this;if(null!=a&&0<a.length&&(c=mxUtils.parseXml(a),a=null!=c?c.documentElement:null,null!=a&&"updates"==a.nodeName)){var f=this.editor.graph,e=f.getModel();e.beginUpdate();var g=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var k=e.getCell(a.getAttribute("id"));
-if(null!=k){try{var l=a.getAttribute("value");if(null!=l){var n=mxUtils.parseXml(l).documentElement;if(null!=n)if("1"==n.getAttribute("replace-value"))e.setValue(k,n);else for(var z=n.attributes,B=0;B<z.length;B++)f.setAttributeForCell(k,z[B].nodeName,0<z[B].nodeValue.length?z[B].nodeValue:null)}}catch(K){null!=window.console&&console.log("Error in value for "+k.id+": "+K)}try{var C=a.getAttribute("style");null!=C&&f.model.setStyle(k,C)}catch(K){null!=window.console&&console.log("Error in style for "+
-k.id+": "+K)}try{var q=a.getAttribute("icon");if(null!=q){var G=0<q.length?JSON.parse(q):null;null!=G&&G.append||f.removeCellOverlays(k);null!=G&&f.addCellOverlay(k,b(G))}}catch(K){null!=window.console&&console.log("Error in icon for "+k.id+": "+K)}try{var F=a.getAttribute("geometry");if(null!=F){var F=JSON.parse(F),J=f.getCellGeometry(k);if(null!=J){J=J.clone();for(key in F){var H=parseFloat(F[key]);"dx"==key?J.x+=H:"dy"==key?J.y+=H:"dw"==key?J.width+=H:"dh"==key?J.height+=H:J[key]=parseFloat(F[key])}f.model.setGeometry(k,
+if(null!=k){try{var n=a.getAttribute("value");if(null!=n){var m=mxUtils.parseXml(n).documentElement;if(null!=m)if("1"==m.getAttribute("replace-value"))e.setValue(k,m);else for(var z=m.attributes,B=0;B<z.length;B++)f.setAttributeForCell(k,z[B].nodeName,0<z[B].nodeValue.length?z[B].nodeValue:null)}}catch(K){null!=window.console&&console.log("Error in value for "+k.id+": "+K)}try{var C=a.getAttribute("style");null!=C&&f.model.setStyle(k,C)}catch(K){null!=window.console&&console.log("Error in style for "+
+k.id+": "+K)}try{var t=a.getAttribute("icon");if(null!=t){var G=0<t.length?JSON.parse(t):null;null!=G&&G.append||f.removeCellOverlays(k);null!=G&&f.addCellOverlay(k,b(G))}}catch(K){null!=window.console&&console.log("Error in icon for "+k.id+": "+K)}try{var F=a.getAttribute("geometry");if(null!=F){var F=JSON.parse(F),J=f.getCellGeometry(k);if(null!=J){J=J.clone();for(key in F){var H=parseFloat(F[key]);"dx"==key?J.x+=H:"dy"==key?J.y+=H:"dw"==key?J.width+=H:"dh"==key?J.height+=H:J[key]=parseFloat(F[key])}f.model.setGeometry(k,
J)}}}catch(K){null!=window.console&&console.log("Error in icon for "+k.id+": "+K)}}}else if("model"==a.nodeName){for(var E=a.firstChild;null!=E&&E.nodeType!=mxConstants.NODETYPE_ELEMENT;)E=E.nextSibling;null!=E&&(new mxCodec(a.firstChild)).decode(E,e)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(f.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))f.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==
-a.nodeName&&(g=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{e.endUpdate()}null!=g&&this.chromelessResize&&this.chromelessResize(!0,g)}return c};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,d="",f=c.lastIndexOf(".");0<=f&&(d=c.substring(f),c=c.substring(0,f));if(b)var m=new Date,f=m.getFullYear(),e=m.getMonth()+1,g=m.getDate(),k=m.getHours(),l=m.getMinutes(),m=m.getSeconds(),c=
-c+(" "+(f+"-"+e+"-"+g+"-"+k+"-"+l+"-"+m));return c=mxResources.get("copyOf",[c])+d};EditorUi.prototype.fileLoaded=function(a,b){var c=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var d=!1;this.hideDialog();null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var f=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();
+a.nodeName&&(g=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{e.endUpdate()}null!=g&&this.chromelessResize&&this.chromelessResize(!0,g)}return c};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,d="",f=c.lastIndexOf(".");0<=f&&(d=c.substring(f),c=c.substring(0,f));if(b)var l=new Date,f=l.getFullYear(),e=l.getMonth()+1,g=l.getDate(),k=l.getHours(),m=l.getMinutes(),l=l.getSeconds(),c=
+c+(" "+(f+"-"+e+"-"+g+"-"+k+"-"+m+"-"+l));return c=mxResources.get("copyOf",[c])+d};EditorUi.prototype.fileLoaded=function(a,b){var c=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var d=!1;this.hideDialog();null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var f=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();
this.editor.undoManager.clear();this.setBackgroundImage(null);!b&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();b||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(a);a.addListener("descriptorChanged",
this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+
mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));d=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+
a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(x){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(x){}}catch(x){this.fileLoadedError=x;null!=window.console&&(console.error(x),console.log("error in fileLoaded:",a,x));if(EditorUi.enableLogging&&
-!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=x&&null!=x.message?":err:"+encodeURIComponent(x.message):"")+(null!=x&&null!=x.stack?"&stack="+encodeURIComponent(x.stack):"")}catch(y){}var m=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):
-null!=c?this.fileLoaded(c):f()});b?m():this.handleError(x,mxResources.get("errorLoadingFile"),m,!0)}else f();return d};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,d=new mxGraphModel,f=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var m=0;m<a.length;m++){this.updatePageRoot(a[m]);var e=a[m].node.cloneNode(!1);e.removeAttribute("name");d.root=a[m].root;var g=f.encode(d);this.editor.graph.saveViewState(a[m].viewState,g,!0);g.removeAttribute("pageWidth");
+!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=x&&null!=x.message?":err:"+encodeURIComponent(x.message):"")+(null!=x&&null!=x.stack?"&stack="+encodeURIComponent(x.stack):"")}catch(y){}var l=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):
+null!=c?this.fileLoaded(c):f()});b?l():this.handleError(x,mxResources.get("errorLoadingFile"),l,!0)}else f();return d};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,d=new mxGraphModel,f=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var l=0;l<a.length;l++){this.updatePageRoot(a[l]);var e=a[l].node.cloneNode(!1);e.removeAttribute("name");d.root=a[l].root;var g=f.encode(d);this.editor.graph.saveViewState(a[l].viewState,g,!0);g.removeAttribute("pageWidth");
g.removeAttribute("pageHeight");e.appendChild(g);null!=b&&(b.eltCount+=e.getElementsByTagName("*").length,b.nodeCount+=e.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(e,function(a,b,c,d){return!d||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||"x"!=b&&"y"!=b&&"width"!=b&&"height"!=b?d&&"mxCell"==a.nodeName&&"previous"==b?null:c:Math.round(c)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,c){var d=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===
-typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(d^=this.hashValue(a.nodeName,b,c));if(null!=a.attributes){null!=c&&(c.attrCount+=a.attributes.length);for(var f=0;f<a.attributes.length;f++){var m=a.attributes[f].name,e=null!=b?b(a,m,a.attributes[f].value,!0):a.attributes[f].value;null!=e&&(d^=this.hashValue(m,b,c)+this.hashValue(e,b,c))}}if(null!=a.childNodes)for(f=0;f<a.childNodes.length;f++)d=(d<<5)-d+this.hashValue(a.childNodes[f],b,c)<<0}else if(null!=a&&"function"!==
+typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(d^=this.hashValue(a.nodeName,b,c));if(null!=a.attributes){null!=c&&(c.attrCount+=a.attributes.length);for(var f=0;f<a.attributes.length;f++){var l=a.attributes[f].name,e=null!=b?b(a,l,a.attributes[f].value,!0):a.attributes[f].value;null!=e&&(d^=this.hashValue(l,b,c)+this.hashValue(e,b,c))}}if(null!=a.childNodes)for(f=0;f<a.childNodes.length;f++)d=(d<<5)-d+this.hashValue(a.childNodes[f],b,c)<<0}else if(null!=a&&"function"!==
typeof a){a=String(a);b=0;null!=c&&(c.byteCount+=a.length);for(f=0;f<a.length;f++)b=(b<<5)-b+a.charCodeAt(f)<<0;d^=b}return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,d,e,g,k){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",
mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var b=mxUtils.createXmlDocument(),c=b.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(a));b.appendChild(c);return mxUtils.getXml(b)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),
".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var b=this.sidebar.palettes[a];if(null!=b){for(var c=0;c<b.length;c++)b[c].parentNode.removeChild(b[c]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var b=this.sidebar.container;if(null==a){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(a=c[c.length-1].nextSibling)}a=null!=a?a:b.firstChild.nextSibling.nextSibling;
var c=b.lastChild,d=c.previousSibling;b.insertBefore(c,a);b.insertBefore(d,c)};EditorUi.prototype.loadLibrary=function(a){var b=mxUtils.parseXml(a.getData());if("mxlibrary"==b.documentElement.nodeName){var c=JSON.parse(mxUtils.getTextContent(b.documentElement));this.libraryLoaded(a,c,b.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c){if(null!=
-this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=null,m=mxUtils.bind(this,function(b,c){0==b.length&&a.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f)):this.addLibraryEntries(b,c)});null!=this.sidebar&&
-null!=b&&this.sidebar.addEntries(b);c=null!=c&&0<c.length?c:a.getTitle();var e=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){m(b,a)}));this.repositionLibrary(d);var p=e.parentNode.previousSibling;c=p.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&p.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var g=document.createElement("div");g.style.position="absolute";g.style.right="0px";g.style.top="0px";g.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||
+this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=null,l=mxUtils.bind(this,function(b,c){0==b.length&&a.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f)):this.addLibraryEntries(b,c)});null!=this.sidebar&&
+null!=b&&this.sidebar.addEntries(b);c=null!=c&&0<c.length?c:a.getTitle();var e=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){l(b,a)}));this.repositionLibrary(d);var p=e.parentNode.previousSibling;c=p.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&p.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var g=document.createElement("div");g.style.position="absolute";g.style.right="0px";g.style.top="0px";g.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||
(g.style.backgroundColor="inherit");p.style.position="relative";var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.closeImage);k.setAttribute("title",mxResources.get("close"));k.setAttribute("valign","absmiddle");k.setAttribute("border","0");k.style.margin="0 3px";var z=null;if(".scratchpad"!=a.title||this.closableScratchpad)g.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});
-null!=z?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var l=this.editor.graph,n=null,q=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),e,b,a,a.getMode());mxEvent.consume(c)}),G=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=n&&null!=n.parentNode&&n.parentNode.removeChild(n),n=k.cloneNode(!1),n.setAttribute("src",Editor.spinImage),n.setAttribute("title",
+null!=z?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var m=this.editor.graph,n=null,t=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),e,b,a,a.getMode());mxEvent.consume(c)}),G=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=n&&null!=n.parentNode&&n.parentNode.removeChild(n),n=k.cloneNode(!1),n.setAttribute("src",Editor.spinImage),n.setAttribute("title",
mxResources.get("saving")),n.style.cursor="default",n.style.marginRight="2px",n.style.marginTop="-2px",g.insertBefore(n,g.firstChild),p.style.paddingRight=18*g.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=n&&null!=n.parentNode&&(n.parentNode.removeChild(n),p.style.paddingRight=18*g.childNodes.length+"px")})):null==z&&(z=k.cloneNode(!1),z.setAttribute("src",IMAGE_PATH+"/download.png"),z.setAttribute("title",mxResources.get("save")),g.insertBefore(z,g.firstChild),
-mxEvent.addListener(z,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==z||a.isModified()||(p.style.paddingRight=18*g.childNodes.length+"px",z.parentNode.removeChild(z),z=null)});mxEvent.consume(c)})),p.style.paddingRight=18*g.childNodes.length+"px")}),F=mxUtils.bind(this,function(a,c,d,m){a=l.cloneCells(mxUtils.sortCells(l.model.getTopmostCells(a)));for(var p=0;p<a.length;p++){var g=l.getCellGeometry(a[p]);null!=g&&
-g.translate(-c.x,-c.y)}e.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,m||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=m&&(a.title=m);b.push(a);G(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),J=mxUtils.bind(this,function(a){if(l.isSelectionEmpty())l.getRubberband().isActive()?(l.getRubberband().execute(a),l.getRubberband().reset()):this.showError(mxResources.get("error"),
-mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=l.getSelectionCells(),c=l.view.getBounds(b),d=l.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=l.view.translate.x;c.y-=l.view.translate.y;F(b,c)}mxEvent.consume(a)});mxEvent.addGestureListeners(e,function(){},mxUtils.bind(this,function(a){l.isMouseDown&&null!=l.panningManager&&null!=l.graphHandler.shape&&(l.graphHandler.shape.node.style.visibility="hidden",e.style.backgroundColor="#f1f3f4",e.style.cursor="copy",l.panningManager.stop(),
-l.autoScroll=!1,null!=l.graphHandler.guide&&l.graphHandler.guide.setVisible(!1),null!=l.graphHandler.hint&&(l.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){l.isMouseDown&&null!=l.panningManager&&null!=l.graphHandler&&(e.style.backgroundColor="",e.style.cursor="default",this.sidebar.showTooltips=!0,l.panningManager.stop(),l.graphHandler.reset(),l.isMouseDown=!1,l.autoScroll=!0,J(a),mxEvent.consume(a))}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,
-function(a){l.isMouseDown&&null!=l.graphHandler.shape&&(l.graphHandler.shape.node.style.visibility="visible",e.style.backgroundColor="",e.style.cursor="",l.autoScroll=!0,null!=l.graphHandler.guide&&l.graphHandler.guide.setVisible(!0),null!=l.graphHandler.hint&&(l.graphHandler.hint.style.visibility="visible"))}));Graph.fileSupport&&(mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(a){e.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";e.style.cursor="copy";this.sidebar.hideTooltip();
-a.stopPropagation();a.preventDefault()})),mxEvent.addListener(e,"drop",mxUtils.bind(this,function(a){e.style.cursor="";e.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,p,g,k,t,z,l,n){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,k,t),c)],c[0].vertex=!0,F(c,new mxRectangle(0,
-0,k,t),a,mxEvent.isAltDown(a)?null:z.substring(0,z.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var u=!1,B=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var p=mxUtils.parseXml(c);if("mxlibrary"==p.documentElement.nodeName)try{var g=JSON.parse(mxUtils.getTextContent(p.documentElement));m(g,e);b=b.concat(g);G(a);this.spinner.stop();u=!0}catch(Q){}else if("mxfile"==p.documentElement.nodeName)try{for(var k=p.documentElement.getElementsByTagName("diagram"),
-p=0;p<k.length;p++){var t=this.stringToCells(Editor.getDiagramNodeXml(k[p])),z=this.editor.graph.getBoundingBoxFromGeometry(t);F(t,new mxRectangle(0,0,z.width,z.height),a)}u=!0}catch(Q){null!=window.console&&console.log("error in drop handler:",Q)}}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=n&&null!=z&&(/(\.v(dx|sdx?))($|\?)/i.test(z)||/(\.vs(x|sx?))($|\?)/i.test(z))?
+mxEvent.addListener(z,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==z||a.isModified()||(p.style.paddingRight=18*g.childNodes.length+"px",z.parentNode.removeChild(z),z=null)});mxEvent.consume(c)})),p.style.paddingRight=18*g.childNodes.length+"px")}),F=mxUtils.bind(this,function(a,c,d,l){a=m.cloneCells(mxUtils.sortCells(m.model.getTopmostCells(a)));for(var p=0;p<a.length;p++){var g=m.getCellGeometry(a[p]);null!=g&&
+g.translate(-c.x,-c.y)}e.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,l||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=l&&(a.title=l);b.push(a);G(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),J=mxUtils.bind(this,function(a){if(m.isSelectionEmpty())m.getRubberband().isActive()?(m.getRubberband().execute(a),m.getRubberband().reset()):this.showError(mxResources.get("error"),
+mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=m.getSelectionCells(),c=m.view.getBounds(b),d=m.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=m.view.translate.x;c.y-=m.view.translate.y;F(b,c)}mxEvent.consume(a)});mxEvent.addGestureListeners(e,function(){},mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.panningManager&&null!=m.graphHandler.shape&&(m.graphHandler.shape.node.style.visibility="hidden",e.style.backgroundColor="#f1f3f4",e.style.cursor="copy",m.panningManager.stop(),
+m.autoScroll=!1,null!=m.graphHandler.guide&&m.graphHandler.guide.setVisible(!1),null!=m.graphHandler.hint&&(m.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.panningManager&&null!=m.graphHandler&&(e.style.backgroundColor="",e.style.cursor="default",this.sidebar.showTooltips=!0,m.panningManager.stop(),m.graphHandler.reset(),m.isMouseDown=!1,m.autoScroll=!0,J(a),mxEvent.consume(a))}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,
+function(a){m.isMouseDown&&null!=m.graphHandler.shape&&(m.graphHandler.shape.node.style.visibility="visible",e.style.backgroundColor="",e.style.cursor="",m.autoScroll=!0,null!=m.graphHandler.guide&&m.graphHandler.guide.setVisible(!0),null!=m.graphHandler.hint&&(m.graphHandler.hint.style.visibility="visible"))}));Graph.fileSupport&&(mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(a){e.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";e.style.cursor="copy";this.sidebar.hideTooltip();
+a.stopPropagation();a.preventDefault()})),mxEvent.addListener(e,"drop",mxUtils.bind(this,function(a){e.style.cursor="";e.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,p,g,k,q,z,m,n){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,k,q),c)],c[0].vertex=!0,F(c,new mxRectangle(0,
+0,k,q),a,mxEvent.isAltDown(a)?null:z.substring(0,z.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var u=!1,B=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var p=mxUtils.parseXml(c);if("mxlibrary"==p.documentElement.nodeName)try{var g=JSON.parse(mxUtils.getTextContent(p.documentElement));l(g,e);b=b.concat(g);G(a);this.spinner.stop();u=!0}catch(Q){}else if("mxfile"==p.documentElement.nodeName)try{for(var k=p.documentElement.getElementsByTagName("diagram"),
+p=0;p<k.length;p++){var q=this.stringToCells(Editor.getDiagramNodeXml(k[p])),z=this.editor.graph.getBoundingBoxFromGeometry(q);F(q,new mxRectangle(0,0,z.width,z.height),a)}u=!0}catch(Q){null!=window.console&&console.log("error in drop handler:",Q)}}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=n&&null!=z&&(/(\.v(dx|sdx?))($|\?)/i.test(z)||/(\.vs(x|sx?))($|\?)/i.test(z))?
this.importVisio(n,function(a){B(a,"text/xml")},null,z):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,z)&&null!=n?this.parseFile(n,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?B(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):B(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(e,"dragleave",
-function(a){e.style.cursor="";e.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));k=k.cloneNode(!1);k.setAttribute("src",Editor.editImage);k.setAttribute("title",mxResources.get("edit"));g.insertBefore(k,g.firstChild);mxEvent.addListener(k,"click",q);mxEvent.addListener(e,"dblclick",function(a){mxEvent.getSource(a)==e&&q(a)});c=k.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));g.insertBefore(c,g.firstChild);mxEvent.addListener(c,
+function(a){e.style.cursor="";e.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));k=k.cloneNode(!1);k.setAttribute("src",Editor.editImage);k.setAttribute("title",mxResources.get("edit"));g.insertBefore(k,g.firstChild);mxEvent.addListener(k,"click",t);mxEvent.addListener(e,"dblclick",function(a){mxEvent.getSource(a)==e&&t(a)});c=k.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));g.insertBefore(c,g.firstChild);mxEvent.addListener(c,
"click",J);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),g.insertBefore(c,g.firstChild))}p.appendChild(g);p.style.paddingRight=18*g.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=
-function(a,b){for(var c=0;c<a.length;c++){var d=a[c],f=d.data;if(null!=f){var f=this.convertDataUri(f),m="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(m+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(m+"image="+f,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(f=this.stringToCells(Graph.decompress(d.xml)),0<f.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(f,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=
+function(a,b){for(var c=0;c<a.length;c++){var d=a[c],f=d.data;if(null!=f){var f=this.convertDataUri(f),l="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(l+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(l+"image="+f,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(f=this.stringToCells(Graph.decompress(d.xml)),0<f.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(f,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=
function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.offline||EditorUi.isElectronApp||("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.createFooter=function(){return document.getElementById("geFooter")});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?
"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",Format.prototype.inactiveTabBackgroundColor=
"black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",
@@ -8429,109 +8433,109 @@ Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAM
!0;this.editor.graph.model.execute(a)});var b=new BackgroundImageDialog(this,mxUtils.bind(this,function(b){a(b)}));this.showDialog(b.container,360,200,!0,!0);b.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,d,e){a=new LibraryDialog(this,a,b,c,d,e);this.showDialog(a.container,640,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var c=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var b=
c.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&b.refresh()}));return b};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position="absolute";a.style.overflow="hidden";var b=document.createElement("a");b.className="geTitle";b.style.color="#DF6C0C";b.style.fontWeight="bold";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML=
'<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c,d,e,g){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},
-m=null!=a&&null!=a.error?a.error:a;if(null!=m||null!=b){var p=mxUtils.htmlEntities(mxResources.get("unknownError")),k=mxResources.get("ok"),t=null;b=null!=b?b:mxResources.get("error");if(null!=m){null!=m.retry&&(k=mxResources.get("cancel"),t=function(){f();m.retry()});if(404==m.code||404==m.status||403==m.code){var p=403==m.code?null!=m.message?mxUtils.htmlEntities(m.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=e?e:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+
-(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":"")),l=null!=g?g:window.location.hash;if(null!=l&&("#G"==l.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==l.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==m.code||404==m.status)){l="#U"==l.substring(0,2)?l.substring(45,
-l.lastIndexOf("%26ex")):l.substring(2);this.showError(b,p,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+l);this.handleError(a,b,c,d,e)}),t,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){f.innerHTML="";for(var a=0;a<b.length;a++){var c=document.createElement("option");mxUtils.write(c,b[a].displayName);c.value=a;f.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";
+l=null!=a&&null!=a.error?a.error:a;if(null!=l||null!=b){var p=mxUtils.htmlEntities(mxResources.get("unknownError")),k=mxResources.get("ok"),q=null;b=null!=b?b:mxResources.get("error");if(null!=l){null!=l.retry&&(k=mxResources.get("cancel"),q=function(){f();l.retry()});if(404==l.code||404==l.status||403==l.code){var p=403==l.code?null!=l.message?mxUtils.htmlEntities(l.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=e?e:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+
+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":"")),m=null!=g?g:window.location.hash;if(null!=m&&("#G"==m.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==m.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==l.code||404==l.status)){m="#U"==m.substring(0,2)?m.substring(45,
+m.lastIndexOf("%26ex")):m.substring(2);this.showError(b,p,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+m);this.handleError(a,b,c,d,e)}),q,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){f.innerHTML="";for(var a=0;a<b.length;a++){var c=document.createElement("option");mxUtils.write(c,b[a].displayName);c.value=a;f.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";
mxUtils.write(c,"<"+b[a].email+">");c.setAttribute("disabled","disabled");f.appendChild(c)}c=document.createElement("option");mxUtils.write(c,mxResources.get("addAccount"));c.value=b.length;f.appendChild(c)}var b=this.drive.getUsersList(),c=document.createElement("div"),d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+": ");c.appendChild(d);var f=document.createElement("select");f.style.width="200px";a();mxEvent.addListener(f,"change",mxUtils.bind(this,
-function(){var c=f.value,d=b.length!=c;d&&this.drive.setUser(b[c]);this.drive.authorize(d,mxUtils.bind(this,function(){d||(b=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),!0)}));c.appendChild(f);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(c.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=c&&c()}),480,150);return}}null!=m.message?
-p=mxUtils.htmlEntities(m.message):null!=m.response&&null!=m.response.error?p=mxUtils.htmlEntities(m.response.error):"undefined"!==typeof window.App&&(m.code==App.ERROR_TIMEOUT?p=mxUtils.htmlEntities(mxResources.get("timeout")):m.code==App.ERROR_BUSY&&(p=mxUtils.htmlEntities(mxResources.get("busy"))))}var n=g=null;null!=m&&null!=m.helpLink&&(g=mxResources.get("help"),n=mxUtils.bind(this,function(){return this.editor.graph.openLink(m.helpLink)}));this.showError(b,p,k,c,t,null,null,g,n,null,null,null,
-d?c:null)}else null!=c&&c()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,c,d,e,g){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},m=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){f();null!=b&&b()},function(){f();null!=c&&c()},d,e,null,null,null,null,m);this.showDialog(a.container,340,46+
-m,!0,g);a.init()};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,c,d){var f=a.toDataURL("image/"+c);if(6>=f.length||
-f==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(f=this.writeGraphModelToPng(f,"tEXt","mxfile",encodeURIComponent(b)));0<d&&(f=this.writeGraphModelToPng(f,"pHYs","dpi",d));return f};EditorUi.prototype.saveCanvas=function(a,b,c,d,e){var f="jpeg"==c?"jpg":c;d=this.getBaseFilename(d)+"."+f;a=this.createImageDataUri(a,b,c,e);this.saveData(d,f,a.substring(a.lastIndexOf(",")+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&
-(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width="600px";c.textarea.style.height="380px";this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",
-!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,c,d,e){if(window.Blob&&navigator.msSaveOrOpenBlob)a=d?this.base64ToBlob(a,c):new Blob([a],{type:c}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else{var f=document.createElement("a"),m=!mxClient.IS_SF&&0>navigator.userAgent.indexOf("PaleMoon/")&&"undefined"!==typeof f.download;
-if(mxClient.IS_GC)var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),m=65==(g?parseInt(g[2],10):!1)?!1:m;if(m||this.isOffline()){f.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));m?f.download=b:f.setAttribute("target","_blank");document.body.appendChild(f);try{window.setTimeout(function(){URL.revokeObjectURL(f.href)},0),f.click(),f.parentNode.removeChild(f)}catch(D){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=
-function(a,b,c,d,e,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=e?"&format="+e:"")+(null!=g?"&base64="+g:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),e=Array(f),m=0;m<f;++m){for(var g=1024*m,k=Math.min(g+1024,d),l=Array(k-g),z=0;g<k;++z,++g)l[z]=c[g].charCodeAt(0);e[m]=new Uint8Array(l)}return new Blob(e,{type:b})};
-EditorUi.prototype.saveLocalFile=function(a,b,c,d,e,g,k){g=null!=g?g:!1;k=null!=k?k:"vsdx"!=e&&(!mxClient.IS_IOS||!navigator.standalone);e=this.getServiceCount(g);isLocalStorage&&e++;var f=4>=e?2:6<e?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,f){try{if("_blank"==f)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var e=window.open("about:blank");null==e?mxUtils.popup(a,!0):(e.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),e.document.close())}else this.openInNewWindow(a,
-c,d);else f==App.MODE_DEVICE||"download"==f?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(f,mxUtils.bind(this,function(e){try{this.exportFile(a,b,c,d,f,e)}catch(C){this.handleError(C)}}))}catch(B){this.handleError(B)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,k,null,1<e,f,a,c,d);g=this.isServices(e)?e>f?390:270:160;this.showDialog(b.container,400,g,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,
-b,c){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var d=window.open("about:blank");null==d||null==d.document?mxUtils.popup(a,!0):("image/svg+xml"==b?d.document.write("<html>"+a+"</html>"):d.document.write('<html><img style="max-width:100%;" src="data:'+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),d.document.close())}else d=window.open("data:"+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null!=d&&null!=d.document||
-mxUtils.popup(a,!0)};var d=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var b=a(mxUtils.bind(this,function(a){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 d=b.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=
-d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=d.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height=
-"auto";this.exportDialog.style.padding="10px";var b=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",b);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(b.substring(b.indexOf(",")+1),"image/png",!0);
-c.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",c);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}d.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,c,d,e){this.isLocalFileSave()?this.saveLocalFile(c,a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,f){return this.createEchoRequest(c,
-a,d,e,b,f)}),c,e,d)};EditorUi.prototype.saveRequest=function(a,b,c,d,e,g,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var f=this.getServiceCount(!1);isLocalStorage&&f++;var m=4>=f?2:6<f?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,f){if("_blank"==f||null!=a&&0<a.length){var e=c("_blank"==f?null:a,f==App.MODE_DEVICE||"download"==f||null==f||"_blank"==f?"0":"1");null!=e&&(f==App.MODE_DEVICE||"download"==f||"_blank"==f?e.simulate(document,"_blank"):this.pickFolder(f,mxUtils.bind(this,
-function(c){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+b;if(null!=d)try{this.exportFile(d,a,g,!0,f,c)}catch(A){this.handleError(A)}else this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=e.getStatus()&&299>=e.getStatus())try{this.exportFile(e.getText(),a,g,!0,f,c)}catch(A){this.handleError(A)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),
-mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,k,null,1<f,m,d,g,e);f=this.isServices(f)?4<f?390:270:160;this.showDialog(a.container,380,f,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,d,e,g){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,
-e,g,k,l,n,q){if(this.spinner.spin(document.body,mxResources.get("export")))try{var f=this.editor.graph.isSelectionEmpty();c=null!=c?c:f;var m=b?null:this.editor.graph.background;m==mxConstants.NONE&&(m=null);null==m&&0==b&&(m="#ffffff");var p=this.editor.graph.getSvg(m,a,k,l,null,c,null,null,"blank"==q?"_blank":"self"==q?"_top":null,null,!0);d&&this.editor.graph.addSvgShadow(p);var t=this.getBaseFilename()+".svg",u=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,
-null,null,null,c,n,null,null,null,!1));if(null!=this.editor.fontCss){var b=a.ownerDocument,b=null!=b.createElementNS?b.createElementNS(mxConstants.NS_SVG,"style"):b.createElement("style");b.setAttribute("type","text/css");mxUtils.setTextContent(b,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(b)}var d='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||
-d.length<=MAX_REQUEST_SIZE?this.saveData(t,"svg",d,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.editor.graph.mathEnabled&&this.editor.addMathCss(p);g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(p,u,this.thumbImageCache)):u(p)}catch(F){this.handleError(F)}};EditorUi.prototype.addRadiobox=function(a,b,c,d,e,g,k){return this.addCheckbox(a,c,d,e,g,k,!0,b)};EditorUi.prototype.addCheckbox=
-function(a,b,c,d,e,g,k,l){g=null!=g?g:!0;var f=document.createElement("input");f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type",k?"radio":"checkbox");k="geCheckbox-"+Editor.guid();f.id=k;null!=l&&f.setAttribute("name",l);c&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);d&&f.setAttribute("disabled","disabled");g&&(a.appendChild(f),c=document.createElement("label"),mxUtils.write(c,b),c.setAttribute("for",k),a.appendChild(c),e||mxUtils.br(a));return f};EditorUi.prototype.addEditButton=
-function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),f="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(f=window.location.href);var e=document.createElement("select");e.style.width="120px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));e.appendChild(d);d=document.createElement("option");
-d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");e.appendChild(d);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,function(){if("custom"==e.value){var a=new FilenameDialog(this,f,mxResources.get("ok"),function(a){null!=a?f=a:e.value="blank"},mxResources.get("url"),null,null,null,null,function(){e.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||
-b.checked)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":f:null},getEditInput:function(){return c},getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){m.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+
-Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));d.appendChild(f);f=document.createElement("option");
-f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));d.appendChild(f);b&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(f));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",m=null,m=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();m.style.padding=
-mxClient.IS_FF?"4px 2px 4px 2px":"4px";m.style.marginLeft="4px";m.style.height="22px";m.style.width="22px";m.style.position="relative";m.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";m.className="geColorBtn";a.appendChild(m);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,g,k,l){var f=this.getCurrentFile(),m=[];d&&(m.push("lightbox=1"),"auto"!=a&&m.push("target="+
-a),null!=b&&b!=mxConstants.NONE&&m.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=e&&0<e.length&&m.push("edit="+encodeURIComponent(e)),g&&m.push("layers=1"),this.editor.graph.foldingEnabled&&m.push("nav=1"));c&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&m.push("page-id="+this.currentPage.getId());a=!0;null!=k?c="#U"+encodeURIComponent(k):(f=this.getCurrentFile(),l||null==f||f.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,
-null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+f.getHash(),a=!1));a&&null!=f&&null!=f.getTitle()&&f.getTitle()!=this.defaultFilename&&m.push("title="+encodeURIComponent(f.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host+"/")+(0<m.length?"?"+m.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,g,k,l,n,q,z){this.getBasenames();
-var f={};""!=e&&e!=mxConstants.NONE&&(f.highlight=e);"auto"!==d&&(f.target=d);n||(f.lightbox=!1);f.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(f.zoom=c/100);c=[];k&&(c.push("pages"),f.resize=!0,null!=this.pages&&null!=this.currentPage&&(f.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),f.resize=!0);l&&c.push("layers");0<c.length&&(n&&c.push("lightbox"),f.toolbar=c.join(" "));null!=q&&0<q.length&&(f.edit=q);null!=a?f.url=a:f.xml=this.getFileData(!0,
-null,null,null,null,!k);b='<div class="mxgraph" style="'+(g?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(f))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";z(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+
-"/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,d){var f=document.createElement("div");f.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("html"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(e);var m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var g=document.createElement("input");g.style.cssText=
-"margin-right:8px;margin-top:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","type-embedhtmldialog");e=g.cloneNode(!0);e.setAttribute("value","copy");m.appendChild(e);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));m.appendChild(k);mxUtils.br(m);m.appendChild(g);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));m.appendChild(k);var p=this.getCurrentFile();
-null==c&&null!=p&&p.constructor==window.DriveFile&&(k=document.createElement("a"),k.style.paddingLeft="12px",k.style.color="gray",k.setAttribute("href","javascript:void(0);"),mxUtils.write(k,mxResources.get("share")),m.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(p.getId())})));e.setAttribute("checked","checked");null==c&&g.setAttribute("disabled","disabled");f.appendChild(m);var l=this.addLinkSection(f),n=this.addCheckbox(f,
-mxResources.get("zoom"),!0,null,!0);mxUtils.write(f,":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.style.marginRight="12px";u.value="100%";f.appendChild(u);var q=this.addCheckbox(f,mxResources.get("fit"),!0),m=null!=this.pages&&1<this.pages.length,G=G=this.addCheckbox(f,mxResources.get("allPages"),m,!m),F=this.addCheckbox(f,mxResources.get("layers"),!0),J=this.addCheckbox(f,mxResources.get("lightbox"),
-!0),H=this.addEditButton(f,J),E=H.getEditInput();E.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled");E.checked&&J.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,f,mxUtils.bind(this,function(){d(g.checked?c:null,n.checked,u.value,l.getTarget(),l.getColor(),q.checked,G.checked,F.checked,J.checked,H.getLink())}),null,a,
-b);this.showDialog(a.container,340,384,!0,!0);e.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,g){var f=document.createElement("div");f.style.whiteSpace="nowrap";var m=document.createElement("h3");mxUtils.write(m,a||mxResources.get("link"));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(m);var k=this.getCurrentFile(),m="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=k&&k.constructor==window.DriveFile&&
-!b){a=80;var m="https://desk.draw.io/support/solutions/articles/16000039384",p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var l=document.createElement("div");l.style.whiteSpace="normal";mxUtils.write(l,mxResources.get("linkAccountRequired"));p.appendChild(l);l=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(k.getId())}));l.style.marginTop=
-"12px";l.className="geBtn";p.appendChild(l);f.appendChild(p);l=document.createElement("a");l.style.paddingLeft="12px";l.style.color="gray";l.style.fontSize="11px";l.setAttribute("href","javascript:void(0);");mxUtils.write(l,mxResources.get("check"));p.appendChild(l);mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,
-mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var n=null,t=null;if(null!=c||null!=d)a+=30,mxUtils.write(f,mxResources.get("width")+":"),n=document.createElement("input"),n.setAttribute("type","text"),n.style.marginRight="16px",n.style.width="50px",n.style.marginLeft="6px",n.style.marginRight="16px",n.style.marginBottom="10px",n.value="100%",f.appendChild(n),mxUtils.write(f,mxResources.get("height")+":"),
-t=document.createElement("input"),t.setAttribute("type","text"),t.style.width="50px",t.style.marginLeft="6px",t.style.marginBottom="10px",t.value=d+"px",f.appendChild(t),mxUtils.br(f);var u=this.addLinkSection(f,g);c=null!=this.pages&&1<this.pages.length;var v=null;if(null==k||k.constructor!=window.DriveFile||b)v=this.addCheckbox(f,mxResources.get("allPages"),c,!c);var q=this.addCheckbox(f,mxResources.get("lightbox"),!0),J=this.addEditButton(f,q),H=J.getEditInput(),E=this.addCheckbox(f,mxResources.get("layers"),
-!0);E.style.marginLeft=H.style.marginLeft;E.style.marginBottom="16px";E.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?(E.removeAttribute("disabled"),H.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"));H.checked&&q.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,function(){e(u.getTarget(),u.getColor(),null==v?
-!0:v.checked,q.checked,J.getLink(),E.checked,null!=n?n.value:null,null!=t?t.value:null)}),null,mxResources.get("create"),m);this.showDialog(b.container,340,254+a,!0,!0);null!=n?(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)):u.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var m=document.createElement("h3");mxUtils.write(m,
-mxResources.get("image"));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(e?"10":"4")+"px";f.appendChild(m);if(e){mxUtils.write(f,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";f.appendChild(g);mxUtils.write(f,mxResources.get("borderWidth")+":");var k=document.createElement("input");k.setAttribute("type",
-"text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.value=this.lastExportBorder||"0";f.appendChild(k);mxUtils.br(f)}var p=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),l=d?null:this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),!0),m=this.editor.graph,n=d?null:this.addCheckbox(f,mxResources.get("transparentBackground"),m.background==mxConstants.NONE||null==m.background);null!=n&&(n.style.marginBottom="16px");a=
-new CustomDialog(this,f,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,b=parseInt(k.value)||0;c(!p.checked,null!=l?l.checked:!1,null!=n?n.checked:!1,a,b)}),null,a,b);this.showDialog(a.container,300,(e?25:0)+(d?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,g,k,l){k=null!=k?k:!0;var f=document.createElement("div");f.style.whiteSpace="nowrap";var m=this.editor.graph,p="jpeg"==l?196:300,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
-f.appendChild(n);mxUtils.write(f,mxResources.get("zoom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight="12px";t.value=this.lastExportZoom||"100%";f.appendChild(t);mxUtils.write(f,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.value=this.lastExportBorder||
-"0";f.appendChild(u);mxUtils.br(f);var q=this.addCheckbox(f,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=l),v=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,m.isSelectionEmpty()),y=document.createElement("input");y.style.marginTop="16px";y.style.marginRight="8px";y.style.marginLeft="24px";y.setAttribute("disabled","disabled");y.setAttribute("type","checkbox");g&&(f.appendChild(y),mxUtils.write(f,mxResources.get("crop")),mxUtils.br(f),p+=26,mxEvent.addListener(v,"change",function(){v.checked?
-y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}));m.isSelectionEmpty()||(y.setAttribute("checked","checked"),y.defaultChecked=!0);var x=this.addCheckbox(f,mxResources.get("shadow"),m.shadowVisible),E=document.createElement("input");E.style.marginTop="16px";E.style.marginRight="8px";E.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||E.setAttribute("disabled","disabled");b&&(f.appendChild(E),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f),p+=
-26);var K=null;if("png"==l||"jpeg"==l)K=this.addCheckbox(f,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),p+=26;var R=this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=l),N=null!=this.pages&&1<this.pages.length,Y=this.addCheckbox(f,N?mxResources.get("allPages"):"",N,!N,null,"jpeg"!=l);Y.style.marginLeft="24px";Y.style.marginBottom="16px";N||(Y.style.display="none");mxEvent.addListener(R,"change",function(){R.checked&&N?Y.removeAttribute("disabled"):
-Y.setAttribute("disabled","disabled")});k&&N||Y.setAttribute("disabled","disabled");var T=document.createElement("select");T.style.maxWidth="260px";T.style.marginLeft="8px";T.style.marginRight="10px";T.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));T.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));T.appendChild(a);a=document.createElement("option");
-a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));T.appendChild(a);"svg"==l&&(mxUtils.write(f,mxResources.get("links")+":"),f.appendChild(T),mxUtils.br(f),mxUtils.br(f),p+=26);c=new CustomDialog(this,f,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=t.value;e(t.value,q.checked,!v.checked,x.checked,R.checked,E.checked,u.value,y.checked,!Y.checked,T.value,null!=K?K.checked:null)}),null,c,d);this.showDialog(c.container,340,p,!0,!0,null,
-null,null,null,!0);t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var m=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(g)}var k=this.addCheckbox(f,mxResources.get("fit"),
-!0),p=this.addCheckbox(f,mxResources.get("shadow"),m.shadowVisible&&d,!d),l=this.addCheckbox(f,c),n=this.addCheckbox(f,mxResources.get("lightbox"),!0),u=this.addEditButton(f,n),q=u.getEditInput(),v=1<m.model.getChildCount(m.model.getRoot()),F=this.addCheckbox(f,mxResources.get("layers"),v,!v);F.style.marginLeft=q.style.marginLeft;F.style.marginBottom="12px";F.style.marginTop="8px";mxEvent.addListener(n,"change",function(){n.checked?(v&&F.removeAttribute("disabled"),q.removeAttribute("disabled")):
-(F.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"));q.checked&&n.checked?u.getEditSelect().removeAttribute("disabled"):u.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(k.checked,p.checked,l.checked,n.checked,u.getLink(),F.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,g,k,l){function f(b){var f=" ",p="";d&&(f=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.drawHost+"/?client=1&lightbox=1"+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");var l="";c&&(l=' width="'+Math.round(m.width)+'" height="'+Math.round(m.height)+'"');k('<img src="'+b+'"'+l+(""!=p?' style="'+p+'"':"")+f+"/>")}var m=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");f(a)}),null,null,null,
-mxUtils.bind(this,function(a){l({message:mxResources.get("unknownError")})}),null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),m.width*m.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var p="";c&&(p="&w="+Math.round(2*m.width)+"&h="+Math.round(2*m.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+p+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?f("data:image/png;base64,"+n.getText()):l({message:mxResources.get("unknownError")})}))}else l({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,g,k){var f=this.editor.graph.getSvg(),m=f.getElementsByTagName("a");if(null!=m)for(var p=0;p<m.length;p++){var l=m[p].getAttribute("href");null!=l&&"#"==l.charAt(0)&&"_blank"==m[p].getAttribute("target")&&m[p].removeAttribute("target")}d&&f.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(f);if(c){var n=" ",t="";d&&(n="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.drawHost+"/?client=1&lightbox=1"+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",t+="cursor:pointer;");a&&(t+="max-width:100%;");this.convertImages(f,mxUtils.bind(this,function(a){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=t?' style="'+t+'"':"")+n+"/>")}))}else t="",d&&(f.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.drawHost+"/?client=1&lightbox=1"+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),a&&(a=parseInt(f.getAttribute("width")),b=parseInt(f.getAttribute("height")),f.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),t+="max-width:100%;max-height:"+b+"px;",f.removeAttribute("height")),""!=t&&f.setAttribute("style",t),k(mxUtils.getXml(f))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");
-b=Math.floor(a/2592E3);if(1<b)return b+" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==a.nodeName){var d=a.getElementsByTagName("diagram");if(0<d.length){var c=
-d[0],f=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:f.apply(this,arguments)}}}null!=c&&(a=Editor.parseDiagramNode(c))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(t){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){try{var d=this.editor.graph,f=null;if(null!=c&&0<c.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),
-document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,!0),d),f=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),e=d.getGlobalVariable,g=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==
-f&&(f=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var e=c.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"tEXt","mxfile",encodeURIComponent(f));a(e.substring(e.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(I){null!=b&&b(I)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)}catch(y){null!=b&&b(y)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,e,g,k){k=b.background;
-k==mxConstants.NONE&&(k=null);g=b.getSvg(k,null,null,null,null,g);b.shadowVisible&&b.addSvgShadow(g);null!=a&&g.setAttribute("content",a);null!=c&&g.setAttribute("resource",c);if(null!=e)this.convertImages(g,mxUtils.bind(this,function(a){e((d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
-mxUtils.getXml(g)};EditorUi.prototype.exportImage=function(a,b,c,d,e,g,k,l,n,q,z){n=null!=n?n:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var f=this.editor.graph.isSelectionEmpty();c=null!=c?c:f;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c,l):null,n,null==this.pages||0==this.pages.length,z)}catch(A){"Invalid image"==A.message?this.downloadFile(n):
-this.handleError(A)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,g,k,q)}catch(C){this.spinner.stop(),this.handleError(C)}}};EditorUi.prototype.embedCssFonts=function(a,b){function c(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")}var d=a.split("url("),f=0;null==this.cachedFonts&&(this.cachedFonts={});var e=mxUtils.bind(this,function(){if(0==f){for(var a=[d[0]],e=1;e<d.length;e++){var g=
-d[e].indexOf(")");a.push('url("');a.push(this.cachedFonts[c(d[e].substring(0,g))]);a.push('"'+d[e].substring(g))}b(a.join(""))}});if(0<d.length){for(var g=1;g<d.length;g++){var m=d[g].indexOf(")"),k=null,l=d[g].indexOf("format(",m);0<l&&(k=c(d[g].substring(l+7,d[g].indexOf(")",l))));mxUtils.bind(this,function(a){if(null==this.cachedFonts[a]){this.cachedFonts[a]=a;f++;var b="application/x-font-ttf";if("svg"==k||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==k||"embedded-opentype"==k||/(\.otf)($|\?)/i.test(a))b=
-"application/x-font-opentype";else if("woff"==k||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==k||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==k||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==k||/(\.sfnt)($|\?)/i.test(a))b="application/font-sfnt";var c=a;/^https?:\/\//.test(c)&&!this.editor.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(c,mxUtils.bind(this,function(b){this.cachedFonts[a]=
-b;f--;e()}),mxUtils.bind(this,function(a){f--;e()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(c(d[g].substring(0,m)),k)}e()}else b(a)};EditorUi.prototype.loadFonts=function(a){null!=this.editor.fontCss&&null==this.editor.resolvedFontCss?this.embedCssFonts(this.editor.fontCss,mxUtils.bind(this,function(b){this.editor.resolvedFontCss=b;a()})):a()};EditorUi.prototype.embedExtFonts=function(a){var b=this.editor.graph.extFonts;if(null!=b&&0<b.length){var c="",d=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=
-{});for(var f=mxUtils.bind(this,function(){0==d&&this.embedCssFonts(c,a)}),e=0;e<b.length;e++){var g=b[e].name,k=b[e].url;0==k.indexOf(Editor.GOOGLE_FONTS)?null==this.cachedGoogleFonts[k]?(d++,this.loadUrl(k,mxUtils.bind(this,function(a){this.cachedGoogleFonts[k]=a;c+=a;d--;f()}),mxUtils.bind(this,function(a){d--;c+="@import url("+k+");";f()}))):c+=this.cachedGoogleFonts[k]:c+='@font-face {font-family: "'+g+'";src: url("'+k+'");}'}f()}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,
-g,k,l,n,q,z,B,C,A,G){try{g=null!=g?g:!0;k=null!=k?k:!0;B=null!=B?B:this.editor.graph;C=null!=C?C:0;var f=n?null:B.background;f==mxConstants.NONE&&(f=null);null==f&&(f=d);null==f&&0==n&&(f="#ffffff");this.convertImages(B.getSvg(null,null,null,A,null,k,null,null,null,q),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){try{var m=function(){mxClient.IS_SF?window.setTimeout(function(){z.drawImage(d,C/l,C/l);a(k)},0):(z.drawImage(d,C/l,C/l),a(k))},k=document.createElement("canvas"),
-p=parseInt(c.getAttribute("width")),n=parseInt(c.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=g?Math.min(1,Math.min(3*b/(4*n),b/p)):b/p);p=Math.ceil(l*p)+2*C;n=Math.ceil(l*n)+2*C;k.setAttribute("width",p);k.setAttribute("height",n);var z=k.getContext("2d");null!=f&&(z.beginPath(),z.rect(0,0,p,n),z.fillStyle=f,z.fill());z.scale(l,l);if(G){var t=B.view,u=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor)))),u="data:image/svg+xml;base64,"+u,q=B.gridSize*t.gridSteps*l,v=B.getGraphBounds(),
-y=v.x*l,x=v.y*l,A=new Image;A.src=u;A.onload=function(){for(var a=-Math.round(q-mxUtils.mod(t.translate.x*l-y,q)),b=-Math.round(q-mxUtils.mod(t.translate.y*l-x,q));a<p;a+=q)for(var c=b;c<n;c+=q)z.drawImage(A,a/l,c/l);m()}}else m()}catch(P){null!=e&&e(P)}});d.onerror=function(a){null!=e&&e(a)};try{q&&this.editor.graph.addSvgShadow(c);var m=function(a){var b=document.createElement("style");b.setAttribute("type","text/css");b.innerHTML=a;c.getElementsByTagName("defs")[0].appendChild(b)},k=mxUtils.bind(this,
-function(){null!=this.editor.resolvedFontCss&&m(this.editor.resolvedFontCss);B.mathEnabled&&this.editor.addMathCss(c);d.src=this.createSvgDataUri(mxUtils.getXml(c))});this.embedExtFonts(mxUtils.bind(this,function(a){null!=a&&m(a);this.loadFonts(k)}))}catch(R){null!=e&&e(R)}}),c,z)}catch(J){null!=e&&e(J)}};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(d){if(null!=d){var f="http://"==d.substring(0,7)||"https://"==
-d.substring(0,8);f&&!navigator.onLine?d=c.svgBrokenImage.src:!f||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.editor.isCorsEnabledForUrl(d)?"chrome-extension://"==d.substring(0,19)||mxClient.IS_CHROMEAPP||(d=b.apply(this,arguments)):d=PROXY_URL+"?url="+encodeURIComponent(d)}return d};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var f=0,e=c||{};c=mxUtils.bind(this,function(c,g){for(var m=a.getElementsByTagName(c),k=0;k<
-m.length;k++)mxUtils.bind(this,function(c){try{if(null!=c){var m=d.convert(c.getAttribute(g));if(null!=m&&"data:"!=m.substring(0,5)){var k=e[m];null==k?(f++,this.convertImageToDataUri(m,function(d){null!=d&&(e[m]=d,c.setAttribute(g,d));f--;0==f&&b(a)})):c.setAttribute(g,k)}else null!=m&&c.setAttribute(g,m)}}catch(A){}})(m[k])});c("image","xlink:href");c("img","src");0==f&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,d,e,g,k){try{var f=!k&&(d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||
-/(\.gif)($|\?)/i.test(a));e=null!=e?e:!0;var m=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var d=a.getText();if(f){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var d=Array(a.length),e=0;e<a.length;e++)d[e]=String.fromCharCode(a[e]);d=d.join("")}g=null!=g?g:"data:image/png;base64,";d=g+this.base64Encode(d)}b(d)}}else null!=
-c&&c({message:mxResources.get("error")+" "+a.getStatus()},a)}),function(a){null!=c&&c({message:mxResources.get("error")+" "+a.getStatus()})},f,this.timeout,function(){e&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:m})})});m()}catch(I){null!=c&&c(I)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){try{var c=!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;b(this.svgBrokenImage.src)}),this.timeout);
-if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(d);c&&b(this.createSvgDataUri(a.getText()))}),function(){window.clearTimeout(d);c&&b(this.svgBrokenImage.src)});else{var f=new Image,e=this;this.crossOriginImages&&(f.crossOrigin="anonymous");f.onload=function(){window.clearTimeout(d);if(c)try{var a=document.createElement("canvas"),g=a.getContext("2d");a.height=f.height;a.width=f.width;g.drawImage(f,0,0);b(a.toDataURL())}catch(D){b(e.svgBrokenImage.src)}};f.onerror=
-function(){window.clearTimeout(d);c&&b(e.svgBrokenImage.src)};f.src=a}}catch(x){b(this.svgBrokenImage.src)}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){g.model.beginUpdate();try{var m=mxUtils.parseXml(a),k=this.editor.extractGraphModel(m.documentElement,null!=this.pages);if(null!=k&&"mxfile"==k.nodeName&&null!=this.pages){var p=k.getElementsByTagName("diagram");if(1==p.length)k=Editor.parseDiagramNode(p[0]);
-else if(1<p.length){a={};var m=[],l=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(k=Editor.parseDiagramNode(p[0]),d=!1,l=1);for(;l<p.length;l++){var n=p[l].getAttribute("id");p[l].removeAttribute("id");var u=this.updatePageRoot(new DiagramPage(p[l]));a[n]=p[l].getAttribute("id");var q=this.pages.length;null==u.getName()&&u.setName(mxResources.get("pageWithNumber",[q+1]));g.model.execute(new ChangePage(this,u,u,q,!0));m.push(u)}this.updatePageLinks(a,m)}}null!=k&&"mxGraphModel"===
+function(){var c=f.value,d=b.length!=c;d&&this.drive.setUser(b[c]);this.drive.authorize(d,mxUtils.bind(this,function(){d||(b=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),!0)}));c.appendChild(f);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(c.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=c&&c()}),480,150);return}}null!=l.message?
+p=mxUtils.htmlEntities(l.message):null!=l.response&&null!=l.response.error?p=mxUtils.htmlEntities(l.response.error):"undefined"!==typeof window.App&&(l.code==App.ERROR_TIMEOUT?p=mxUtils.htmlEntities(mxResources.get("timeout")):l.code==App.ERROR_BUSY&&(p=mxUtils.htmlEntities(mxResources.get("busy"))))}var n=g=null;null!=l&&null!=l.helpLink&&(g=mxResources.get("help"),n=mxUtils.bind(this,function(){return this.editor.graph.openLink(l.helpLink)}));this.showError(b,p,k,c,q,null,null,g,n,null,null,null,
+d?c:null)}else null!=c&&c()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,c,d,e,g){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},l=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){f();null!=b&&b()},function(){f();null!=c&&c()},d,e,null,null,null,null,l);this.showDialog(a.container,340,46+
+l,!0,g);a.init()};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||(!mxClient.IS_SF||!this.editor.graph.mathEnabled)&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,
+b,c,d){var f=a.toDataURL("image/"+c);if(6>=f.length||f==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(f=this.writeGraphModelToPng(f,"tEXt","mxfile",encodeURIComponent(b)));0<d&&(f=this.writeGraphModelToPng(f,"pHYs","dpi",d));return f};EditorUi.prototype.saveCanvas=function(a,b,c,d,e){var f="jpeg"==c?"jpg":c;d=this.getBaseFilename(d)+"."+f;a=this.createImageDataUri(a,b,c,e);this.saveData(d,f,a.substring(a.lastIndexOf(",")+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=
+function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width="600px";c.textarea.style.height="380px";this.showDialog(c.container,620,460,!0,!0,null,null,null,
+null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,c,d,e){if(window.Blob&&navigator.msSaveOrOpenBlob)a=d?this.base64ToBlob(a,c):new Blob([a],{type:c}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else{var f=document.createElement("a"),l=!mxClient.IS_SF&&0>navigator.userAgent.indexOf("PaleMoon/")&&
+"undefined"!==typeof f.download;if(mxClient.IS_GC)var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),l=65==(g?parseInt(g[2],10):!1)?!1:l;if(l||this.isOffline()){f.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));l?f.download=b:f.setAttribute("target","_blank");document.body.appendChild(f);try{window.setTimeout(function(){URL.revokeObjectURL(f.href)},0),f.click(),f.parentNode.removeChild(f)}catch(D){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,"_blank")}};
+EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=e?"&format="+e:"")+(null!=g?"&base64="+g:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),e=Array(f),l=0;l<f;++l){for(var g=1024*l,k=Math.min(g+1024,d),m=Array(k-g),z=0;g<k;++z,++g)m[z]=c[g].charCodeAt(0);e[l]=new Uint8Array(m)}return new Blob(e,
+{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e,g,k){g=null!=g?g:!1;k=null!=k?k:"vsdx"!=e&&(!mxClient.IS_IOS||!navigator.standalone);e=this.getServiceCount(g);isLocalStorage&&e++;var f=4>=e?2:6<e?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,f){try{if("_blank"==f)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var e=window.open("about:blank");null==e?mxUtils.popup(a,!0):(e.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),
+e.document.close())}else this.openInNewWindow(a,c,d);else f==App.MODE_DEVICE||"download"==f?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(f,mxUtils.bind(this,function(e){try{this.exportFile(a,b,c,d,f,e)}catch(C){this.handleError(C)}}))}catch(B){this.handleError(B)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,k,null,1<e,f,a,c,d);g=this.isServices(e)?e>f?390:270:160;this.showDialog(b.container,400,g,!0,!0);b.init()};
+EditorUi.prototype.openInNewWindow=function(a,b,c){if(mxClient.IS_GC||mxClient.IS_EDGE||mxClient.IS_FF||11==document.documentMode||10==document.documentMode){var d=window.open("about:blank");null==d||null==d.document?mxUtils.popup(a,!0):("image/svg+xml"==b?d.document.write("<html>"+a+"</html>"):d.document.write('<html><img style="max-width:100%;" src="data:'+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),d.document.close())}else d=window.open("data:"+b+(c?";base64,"+a:";charset=utf8,"+
+encodeURIComponent(a))),null!=d&&null!=d.document||mxUtils.popup(a,!0)};var d=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var b=a(mxUtils.bind(this,function(a){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 d=b.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";
+mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=d.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){f.stop();
+this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var b=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",b);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(b.substring(b.indexOf(",")+
+1),"image/png",!0);c.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",c);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}d.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,c,d,e){this.isLocalFileSave()?this.saveLocalFile(c,a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,
+f){return this.createEchoRequest(c,a,d,e,b,f)}),c,e,d)};EditorUi.prototype.saveRequest=function(a,b,c,d,e,g,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var f=this.getServiceCount(!1);isLocalStorage&&f++;var l=4>=f?2:6<f?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,f){if("_blank"==f||null!=a&&0<a.length){var e=c("_blank"==f?null:a,f==App.MODE_DEVICE||"download"==f||null==f||"_blank"==f?"0":"1");null!=e&&(f==App.MODE_DEVICE||"download"==f||"_blank"==f?e.simulate(document,"_blank"):
+this.pickFolder(f,mxUtils.bind(this,function(c){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+b;if(null!=d)try{this.exportFile(d,a,g,!0,f,c)}catch(A){this.handleError(A)}else this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=e.getStatus()&&299>=e.getStatus())try{this.exportFile(e.getText(),a,g,!0,f,c)}catch(A){this.handleError(A)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();
+this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,k,null,1<f,l,d,g,e);f=this.isServices(f)?4<f?390:270:160;this.showDialog(a.container,380,f,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,d,e,g){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=
+function(a,b,c,d,e,g,k,m,n,t){if(this.spinner.spin(document.body,mxResources.get("export")))try{var f=this.editor.graph.isSelectionEmpty();c=null!=c?c:f;var l=b?null:this.editor.graph.background;l==mxConstants.NONE&&(l=null);null==l&&0==b&&(l="#ffffff");var p=this.editor.graph.getSvg(l,a,k,m,null,c,null,null,"blank"==t?"_blank":"self"==t?"_top":null,null,!0);d&&this.editor.graph.addSvgShadow(p);var q=this.getBaseFilename()+".svg",u=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",
+this.getFileData(!0,null,null,null,c,n,null,null,null,!1));var b='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(q,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.editor.addFontCss(p);this.editor.graph.mathEnabled&&
+this.editor.addMathCss(p);g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(p,u,this.thumbImageCache)):u(p)}catch(F){this.handleError(F)}};EditorUi.prototype.addRadiobox=function(a,b,c,d,e,g,k){return this.addCheckbox(a,c,d,e,g,k,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,c,d,e,g,k,m){g=null!=g?g:!0;var f=document.createElement("input");f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type",k?"radio":"checkbox");k="geCheckbox-"+Editor.guid();f.id=
+k;null!=m&&f.setAttribute("name",m);c&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);d&&f.setAttribute("disabled","disabled");g&&(a.appendChild(f),c=document.createElement("label"),mxUtils.write(c,b),c.setAttribute("for",k),a.appendChild(c),e||mxUtils.br(a));return f};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),f="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=
+App.MODE_BROWSER&&(f=window.location.href);var e=document.createElement("select");e.style.width="120px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));e.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");e.appendChild(d);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,
+function(){if("custom"==e.value){var a=new FilenameDialog(this,f,mxResources.get("ok"),function(a){null!=a?f=a:e.value="blank"},mxResources.get("url"),null,null,null,null,function(){e.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":
+f:null},getEditInput:function(){return c},getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){l.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");
+d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));d.appendChild(f);b&&
+(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(f));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",l=null,l=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();l.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";l.style.marginLeft="4px";l.style.height="22px";l.style.width=
+"22px";l.style.position="relative";l.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";l.className="geColorBtn";a.appendChild(l);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,g,k,m){var f=this.getCurrentFile(),l=[];d&&(l.push("lightbox=1"),"auto"!=a&&l.push("target="+a),null!=b&&b!=mxConstants.NONE&&l.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),
+null!=e&&0<e.length&&l.push("edit="+encodeURIComponent(e)),g&&l.push("layers=1"),this.editor.graph.foldingEnabled&&l.push("nav=1"));c&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&l.push("page-id="+this.currentPage.getId());a=!0;null!=k?c="#U"+encodeURIComponent(k):(f=this.getCurrentFile(),m||null==f||f.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):
+(c="#"+f.getHash(),a=!1));a&&null!=f&&null!=f.getTitle()&&f.getTitle()!=this.defaultFilename&&l.push("title="+encodeURIComponent(f.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host+"/")+(0<l.length?"?"+l.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,g,k,m,n,t,z){this.getBasenames();var f={};""!=e&&e!=mxConstants.NONE&&(f.highlight=e);"auto"!==d&&(f.target=d);n||(f.lightbox=
+!1);f.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(f.zoom=c/100);c=[];k&&(c.push("pages"),f.resize=!0,null!=this.pages&&null!=this.currentPage&&(f.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),f.resize=!0);m&&c.push("layers");0<c.length&&(n&&c.push("lightbox"),f.toolbar=c.join(" "));null!=t&&0<t.length&&(f.edit=t);null!=a?f.url=a:f.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(g?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":
+"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(f))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";z(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,d){var f=document.createElement("div");
+f.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("html"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(e);var l=document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name",
+"type-embedhtmldialog");e=g.cloneNode(!0);e.setAttribute("value","copy");l.appendChild(e);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));l.appendChild(k);mxUtils.br(l);l.appendChild(g);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));l.appendChild(k);var p=this.getCurrentFile();null==c&&null!=p&&p.constructor==window.DriveFile&&(k=document.createElement("a"),k.style.paddingLeft="12px",k.style.color="gray",k.setAttribute("href",
+"javascript:void(0);"),mxUtils.write(k,mxResources.get("share")),l.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(p.getId())})));e.setAttribute("checked","checked");null==c&&g.setAttribute("disabled","disabled");f.appendChild(l);var m=this.addLinkSection(f),n=this.addCheckbox(f,mxResources.get("zoom"),!0,null,!0);mxUtils.write(f,":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";
+u.style.width="60px";u.style.marginLeft="4px";u.style.marginRight="12px";u.value="100%";f.appendChild(u);var t=this.addCheckbox(f,mxResources.get("fit"),!0),l=null!=this.pages&&1<this.pages.length,G=G=this.addCheckbox(f,mxResources.get("allPages"),l,!l),F=this.addCheckbox(f,mxResources.get("layers"),!0),J=this.addCheckbox(f,mxResources.get("lightbox"),!0),H=this.addEditButton(f,J),E=H.getEditInput();E.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?E.removeAttribute("disabled"):
+E.setAttribute("disabled","disabled");E.checked&&J.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,f,mxUtils.bind(this,function(){d(g.checked?c:null,n.checked,u.value,m.getTarget(),m.getColor(),t.checked,G.checked,F.checked,J.checked,H.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);e.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,g){var f=document.createElement("div");f.style.whiteSpace=
+"nowrap";var l=document.createElement("h3");mxUtils.write(l,a||mxResources.get("link"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(l);var k=this.getCurrentFile(),l="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=k&&k.constructor==window.DriveFile&&!b){a=80;var l="https://desk.draw.io/support/solutions/articles/16000039384",p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
+var m=document.createElement("div");m.style.whiteSpace="normal";mxUtils.write(m,mxResources.get("linkAccountRequired"));p.appendChild(m);m=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(k.getId())}));m.style.marginTop="12px";m.className="geBtn";p.appendChild(m);f.appendChild(p);m=document.createElement("a");m.style.paddingLeft="12px";m.style.color="gray";m.style.fontSize="11px";m.setAttribute("href","javascript:void(0);");mxUtils.write(m,mxResources.get("check"));
+p.appendChild(m);mxEvent.addListener(m,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var q=null,n=null;if(null!=c||null!=d)a+=30,mxUtils.write(f,mxResources.get("width")+":"),q=document.createElement("input"),
+q.setAttribute("type","text"),q.style.marginRight="16px",q.style.width="50px",q.style.marginLeft="6px",q.style.marginRight="16px",q.style.marginBottom="10px",q.value="100%",f.appendChild(q),mxUtils.write(f,mxResources.get("height")+":"),n=document.createElement("input"),n.setAttribute("type","text"),n.style.width="50px",n.style.marginLeft="6px",n.style.marginBottom="10px",n.value=d+"px",f.appendChild(n),mxUtils.br(f);var u=this.addLinkSection(f,g);c=null!=this.pages&&1<this.pages.length;var v=null;
+if(null==k||k.constructor!=window.DriveFile||b)v=this.addCheckbox(f,mxResources.get("allPages"),c,!c);var t=this.addCheckbox(f,mxResources.get("lightbox"),!0),J=this.addEditButton(f,t),H=J.getEditInput(),E=this.addCheckbox(f,mxResources.get("layers"),!0);E.style.marginLeft=H.style.marginLeft;E.style.marginBottom="16px";E.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(E.removeAttribute("disabled"),H.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),H.setAttribute("disabled",
+"disabled"));H.checked&&t.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,function(){e(u.getTarget(),u.getColor(),null==v?!0:v.checked,t.checked,J.getLink(),E.checked,null!=q?q.value:null,null!=n?n.value:null)}),null,mxResources.get("create"),l);this.showDialog(b.container,340,254+a,!0,!0);null!=q?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():
+document.execCommand("selectAll",!1,null)):u.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=document.createElement("h3");mxUtils.write(l,mxResources.get("image"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(e?"10":"4")+"px";f.appendChild(l);if(e){mxUtils.write(f,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginRight=
+"16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";f.appendChild(g);mxUtils.write(f,mxResources.get("borderWidth")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.value=this.lastExportBorder||"0";f.appendChild(k);mxUtils.br(f)}var p=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),m=d?null:this.addCheckbox(f,
+mxResources.get("includeCopyOfMyDiagram"),!0),l=this.editor.graph,n=d?null:this.addCheckbox(f,mxResources.get("transparentBackground"),l.background==mxConstants.NONE||null==l.background);null!=n&&(n.style.marginBottom="16px");a=new CustomDialog(this,f,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,b=parseInt(k.value)||0;c(!p.checked,null!=m?m.checked:!1,null!=n?n.checked:!1,a,b)}),null,a,b);this.showDialog(a.container,300,(e?25:0)+(d?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
+function(a,b,c,d,e,g,k,m){k=null!=k?k:!0;var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=this.editor.graph,p="jpeg"==m?196:300,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";f.appendChild(n);mxUtils.write(f,mxResources.get("zoom")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight=
+"12px";q.value=this.lastExportZoom||"100%";f.appendChild(q);mxUtils.write(f,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.value=this.lastExportBorder||"0";f.appendChild(u);mxUtils.br(f);var t=this.addCheckbox(f,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=m),v=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),y=document.createElement("input");
+y.style.marginTop="16px";y.style.marginRight="8px";y.style.marginLeft="24px";y.setAttribute("disabled","disabled");y.setAttribute("type","checkbox");g&&(f.appendChild(y),mxUtils.write(f,mxResources.get("crop")),mxUtils.br(f),p+=26,mxEvent.addListener(v,"change",function(){v.checked?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}));l.isSelectionEmpty()||(y.setAttribute("checked","checked"),y.defaultChecked=!0);var x=this.addCheckbox(f,mxResources.get("shadow"),l.shadowVisible),
+E=document.createElement("input");E.style.marginTop="16px";E.style.marginRight="8px";E.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||E.setAttribute("disabled","disabled");b&&(f.appendChild(E),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f),p+=26);var K=null;if("png"==m||"jpeg"==m)K=this.addCheckbox(f,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),p+=26;var R=this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),k,null,null,
+"jpeg"!=m),N=null!=this.pages&&1<this.pages.length,Y=this.addCheckbox(f,N?mxResources.get("allPages"):"",N,!N,null,"jpeg"!=m);Y.style.marginLeft="24px";Y.style.marginBottom="16px";N||(Y.style.display="none");mxEvent.addListener(R,"change",function(){R.checked&&N?Y.removeAttribute("disabled"):Y.setAttribute("disabled","disabled")});k&&N||Y.setAttribute("disabled","disabled");var T=document.createElement("select");T.style.maxWidth="260px";T.style.marginLeft="8px";T.style.marginRight="10px";T.className=
+"geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));T.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));T.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));T.appendChild(a);"svg"==m&&(mxUtils.write(f,mxResources.get("links")+":"),f.appendChild(T),mxUtils.br(f),mxUtils.br(f),
+p+=26);c=new CustomDialog(this,f,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=q.value;e(q.value,t.checked,!v.checked,x.checked,R.checked,E.checked,u.value,y.checked,!Y.checked,T.value,null!=K?K.checked:null)}),null,c,d);this.showDialog(c.container,340,p,!0,!0,null,null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,
+b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(g)}var k=this.addCheckbox(f,mxResources.get("fit"),!0),p=this.addCheckbox(f,mxResources.get("shadow"),l.shadowVisible&&d,!d),m=this.addCheckbox(f,c),n=this.addCheckbox(f,mxResources.get("lightbox"),!0),u=this.addEditButton(f,n),t=u.getEditInput(),
+v=1<l.model.getChildCount(l.model.getRoot()),F=this.addCheckbox(f,mxResources.get("layers"),v,!v);F.style.marginLeft=t.style.marginLeft;F.style.marginBottom="12px";F.style.marginTop="8px";mxEvent.addListener(n,"change",function(){n.checked?(v&&F.removeAttribute("disabled"),t.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"));t.checked&&n.checked?u.getEditSelect().removeAttribute("disabled"):u.getEditSelect().setAttribute("disabled","disabled")});
+b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(k.checked,p.checked,m.checked,n.checked,u.getLink(),F.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,g,k,m){function f(b){var f=" ",p="";d&&(f=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.drawHost+"/?client=1&lightbox=1"+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");var m="";c&&(m=' width="'+Math.round(l.width)+'" height="'+Math.round(l.height)+'"');k('<img src="'+b+'"'+m+(""!=p?' style="'+p+'"':"")+f+"/>")}var l=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");f(a)}),null,null,null,
+mxUtils.bind(this,function(a){m({message:mxResources.get("unknownError")})}),null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),l.width*l.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var p="";c&&(p="&w="+Math.round(2*l.width)+"&h="+Math.round(2*l.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+p+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?f("data:image/png;base64,"+n.getText()):m({message:mxResources.get("unknownError")})}))}else m({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,g,k){var f=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!c),l=f.getElementsByTagName("a");if(null!=l)for(var p=0;p<l.length;p++){var m=l[p].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==l[p].getAttribute("target")&&l[p].removeAttribute("target")}d&&f.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(f);if(c){var n=" ",q="";d&&(n="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.drawHost+"/?client=1&lightbox=1"+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",q+="cursor:pointer;");a&&(q+="max-width:100%;");this.convertImages(f,mxUtils.bind(this,function(a){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=q?' style="'+q+'"':"")+n+"/>")}))}else q="",d&&(f.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.drawHost+"/?client=1&lightbox=1"+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),a&&(a=parseInt(f.getAttribute("width")),b=parseInt(f.getAttribute("height")),f.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),q+="max-width:100%;max-height:"+b+"px;",f.removeAttribute("height")),""!=q&&f.setAttribute("style",q),this.editor.addFontCss(f),this.editor.graph.mathEnabled&&this.editor.addMathCss(f),k(mxUtils.getXml(f))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-
+a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==
+a.nodeName){var d=a.getElementsByTagName("diagram");if(0<d.length){var c=d[0],f=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:f.apply(this,arguments)}}}null!=c&&(a=Editor.parseDiagramNode(c))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(q){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){try{var d=this.editor.graph,f=null;if(null!=
+c&&0<c.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,!0),d),f=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),e=d.getGlobalVariable,l=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(d.container);
+d.model.setRoot(l.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==f&&(f=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var e=c.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"tEXt","mxfile",encodeURIComponent(f));a(e.substring(e.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(I){null!=b&&b(I)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)}catch(y){null!=
+b&&b(y)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,e,g,k){k=b.background;k==mxConstants.NONE&&(k=null);g=b.getSvg(k,null,null,null,null,g);b.shadowVisible&&b.addSvgShadow(g);null!=a&&g.setAttribute("content",a);null!=c&&g.setAttribute("resource",c);if(null!=e)this.convertImages(g,mxUtils.bind(this,function(a){e((d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(d?
+"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(g)};EditorUi.prototype.exportImage=function(a,b,c,d,e,g,k,m,n,t,z){n=null!=n?n:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var f=this.editor.graph.isSelectionEmpty();c=null!=c?c:f;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,
+e?this.getFileData(!0,null,null,null,c,m):null,n,null==this.pages||0==this.pages.length,z)}catch(A){"Invalid image"==A.message?this.downloadFile(n):this.handleError(A)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,g,k,t)}catch(C){this.spinner.stop(),this.handleError(C)}}};EditorUi.prototype.embedCssFonts=function(a,b){function c(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")}
+var d=a.split("url("),f=0;null==this.cachedFonts&&(this.cachedFonts={});var e=mxUtils.bind(this,function(){if(0==f){for(var a=[d[0]],e=1;e<d.length;e++){var g=d[e].indexOf(")");a.push('url("');a.push(this.cachedFonts[c(d[e].substring(0,g))]);a.push('"'+d[e].substring(g))}b(a.join(""))}});if(0<d.length){for(var g=1;g<d.length;g++){var l=d[g].indexOf(")"),k=null,m=d[g].indexOf("format(",l);0<m&&(k=c(d[g].substring(m+7,d[g].indexOf(")",m))));mxUtils.bind(this,function(a){if(null==this.cachedFonts[a]){this.cachedFonts[a]=
+a;f++;var b="application/x-font-ttf";if("svg"==k||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==k||"embedded-opentype"==k||/(\.otf)($|\?)/i.test(a))b="application/x-font-opentype";else if("woff"==k||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==k||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==k||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==k||/(\.sfnt)($|\?)/i.test(a))b="application/font-sfnt";var c=a;/^https?:\/\//.test(c)&&
+!this.editor.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(c,mxUtils.bind(this,function(b){this.cachedFonts[a]=b;f--;e()}),mxUtils.bind(this,function(a){f--;e()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(c(d[g].substring(0,l)),k)}e()}else b(a)};EditorUi.prototype.loadFonts=function(a){null!=this.editor.fontCss&&null==this.editor.resolvedFontCss?this.embedCssFonts(this.editor.fontCss,mxUtils.bind(this,function(b){this.editor.resolvedFontCss=b;a()})):a()};EditorUi.prototype.embedExtFonts=
+function(a){var b=this.editor.graph.extFonts;if(null!=b&&0<b.length){var c="",d=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var f=mxUtils.bind(this,function(){0==d&&this.embedCssFonts(c,a)}),e=0;e<b.length;e++){var g=b[e].name,k=b[e].url;0==k.indexOf(Editor.GOOGLE_FONTS)?null==this.cachedGoogleFonts[k]?(d++,this.loadUrl(k,mxUtils.bind(this,function(a){this.cachedGoogleFonts[k]=a;c+=a;d--;f()}),mxUtils.bind(this,function(a){d--;c+="@import url("+k+");";f()}))):c+=this.cachedGoogleFonts[k]:
+c+='@font-face {font-family: "'+g+'";src: url("'+k+'");}'}f()}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,g,k,m,n,t,z,B,C,A,G){try{g=null!=g?g:!0;k=null!=k?k:!0;B=null!=B?B:this.editor.graph;C=null!=C?C:0;var f=n?null:B.background;f==mxConstants.NONE&&(f=null);null==f&&(f=d);null==f&&0==n&&(f="#ffffff");this.convertImages(B.getSvg(null,null,null,A,null,k,null,null,null,t),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){try{var l=function(){mxClient.IS_SF?
+window.setTimeout(function(){q.drawImage(d,C/m,C/m);a(k)},0):(q.drawImage(d,C/m,C/m),a(k))},k=document.createElement("canvas"),p=parseInt(c.getAttribute("width")),n=parseInt(c.getAttribute("height"));m=null!=m?m:1;null!=b&&(m=g?Math.min(1,Math.min(3*b/(4*n),b/p)):b/p);p=Math.ceil(m*p)+2*C;n=Math.ceil(m*n)+2*C;k.setAttribute("width",p);k.setAttribute("height",n);var q=k.getContext("2d");null!=f&&(q.beginPath(),q.rect(0,0,p,n),q.fillStyle=f,q.fill());q.scale(m,m);if(G){var z=B.view,u=btoa(unescape(encodeURIComponent(z.createSvgGrid(z.gridColor)))),
+u="data:image/svg+xml;base64,"+u,t=B.gridSize*z.gridSteps*m,v=B.getGraphBounds(),y=v.x*m,x=v.y*m,A=new Image;A.src=u;A.onload=function(){for(var a=-Math.round(t-mxUtils.mod(z.translate.x*m-y,t)),b=-Math.round(t-mxUtils.mod(z.translate.y*m-x,t));a<p;a+=t)for(var c=b;c<n;c+=t)q.drawImage(A,a/m,c/m);l()}}else l()}catch(P){null!=e&&e(P)}});d.onerror=function(a){null!=e&&e(a)};try{t&&this.editor.graph.addSvgShadow(c);var l=function(a){var b=document.createElement("style");b.setAttribute("type","text/css");
+b.innerHTML=a;c.getElementsByTagName("defs")[0].appendChild(b)},k=mxUtils.bind(this,function(){null!=this.editor.resolvedFontCss&&l(this.editor.resolvedFontCss);d.src=this.createSvgDataUri(mxUtils.getXml(c))});this.embedExtFonts(mxUtils.bind(this,function(a){null!=a&&l(a);this.loadFonts(k)}))}catch(R){null!=e&&e(R)}}),c,z)}catch(J){null!=e&&e(J)}};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(d){if(null!=
+d){var f="http://"==d.substring(0,7)||"https://"==d.substring(0,8);f&&!navigator.onLine?d=c.svgBrokenImage.src:!f||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.editor.isCorsEnabledForUrl(d)?"chrome-extension://"==d.substring(0,19)||mxClient.IS_CHROMEAPP||(d=b.apply(this,arguments)):d=PROXY_URL+"?url="+encodeURIComponent(d)}return d};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var f=0,e=c||{};c=mxUtils.bind(this,function(c,
+g){for(var l=a.getElementsByTagName(c),k=0;k<l.length;k++)mxUtils.bind(this,function(c){try{if(null!=c){var l=d.convert(c.getAttribute(g));if(null!=l&&"data:"!=l.substring(0,5)){var k=e[l];null==k?(f++,this.convertImageToDataUri(l,function(d){null!=d&&(e[l]=d,c.setAttribute(g,d));f--;0==f&&b(a)})):c.setAttribute(g,k)}else null!=l&&c.setAttribute(g,l)}}catch(A){}})(l[k])});c("image","xlink:href");c("img","src");0==f&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,d,e,g,k){try{var f=!k&&(d||/(\.png)($|\?)/i.test(a)||
+/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a));e=null!=e?e:!0;var l=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var d=a.getText();if(f){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var d=Array(a.length),e=0;e<a.length;e++)d[e]=String.fromCharCode(a[e]);d=d.join("")}g=null!=g?g:"data:image/png;base64,";
+d=g+this.base64Encode(d)}b(d)}}else null!=c&&c({message:mxResources.get("error")+" "+a.getStatus()},a)}),function(a){null!=c&&c({message:mxResources.get("error")+" "+a.getStatus()})},f,this.timeout,function(){e&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:l})})});l()}catch(I){null!=c&&c(I)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){try{var c=!0,d=window.setTimeout(mxUtils.bind(this,function(){c=
+!1;b(this.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(d);c&&b(this.createSvgDataUri(a.getText()))}),function(){window.clearTimeout(d);c&&b(this.svgBrokenImage.src)});else{var f=new Image,e=this;this.crossOriginImages&&(f.crossOrigin="anonymous");f.onload=function(){window.clearTimeout(d);if(c)try{var a=document.createElement("canvas"),g=a.getContext("2d");a.height=f.height;a.width=f.width;g.drawImage(f,0,0);b(a.toDataURL())}catch(D){b(e.svgBrokenImage.src)}};
+f.onerror=function(){window.clearTimeout(d);c&&b(e.svgBrokenImage.src)};f.src=a}}catch(x){b(this.svgBrokenImage.src)}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){g.model.beginUpdate();try{var l=mxUtils.parseXml(a),k=this.editor.extractGraphModel(l.documentElement,null!=this.pages);if(null!=k&&"mxfile"==k.nodeName&&null!=this.pages){var p=k.getElementsByTagName("diagram");if(1==p.length)k=Editor.parseDiagramNode(p[0]);
+else if(1<p.length){a={};var l=[],m=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(k=Editor.parseDiagramNode(p[0]),d=!1,m=1);for(;m<p.length;m++){var n=p[m].getAttribute("id");p[m].removeAttribute("id");var u=this.updatePageRoot(new DiagramPage(p[m]));a[n]=p[m].getAttribute("id");var t=this.pages.length;null==u.getName()&&u.setName(mxResources.get("pageWithNumber",[t+1]));g.model.execute(new ChangePage(this,u,u,t,!0));l.push(u)}this.updatePageLinks(a,l)}}null!=k&&"mxGraphModel"===
k.nodeName&&(f=g.importGraphModel(k,b,c,d))}finally{g.model.endUpdate()}}}catch(G){if(e)throw G;this.handleError(G)}return f};EditorUi.prototype.updatePageLinks=function(a,b){for(var c=0;c<b.length;c++)this.updatePageLinksForCell(a,b[c].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var c=document.createElement("div"),d=this.editor.graph,f=d.getLinkForCell(b);null!=f&&d.setLinkForCell(b,this.updatePageLink(a,f));if(d.isHtmlLabel(b)){c.innerHTML=d.getLabel(b);for(var e=c.getElementsByTagName("a"),
-g=!1,m=0;m<e.length;m++)f=e[m].getAttribute("href"),null!=f&&(e[m].setAttribute("href",this.updatePageLink(a,f)),g=!0);g&&d.labelChanged(b,c.innerHTML)}for(m=0;m<d.model.getChildCount(b);m++)this.updatePageLinksForCell(a,d.model.getChildAt(b,m))};EditorUi.prototype.updatePageLink=function(a,b){if("data:page/id,"==b.substring(0,13)){var c=a[b.substring(b.indexOf(",")+1)];b=null!=c?"data:page/id,"+c:null}else if("data:action/json,"==b.substring(0,17))try{var d=JSON.parse(b.substring(17));if(null!=d.actions){for(var f=
+g=!1,l=0;l<e.length;l++)f=e[l].getAttribute("href"),null!=f&&(e[l].setAttribute("href",this.updatePageLink(a,f)),g=!0);g&&d.labelChanged(b,c.innerHTML)}for(l=0;l<d.model.getChildCount(b);l++)this.updatePageLinksForCell(a,d.model.getChildAt(b,l))};EditorUi.prototype.updatePageLink=function(a,b){if("data:page/id,"==b.substring(0,13)){var c=a[b.substring(b.indexOf(",")+1)];b=null!=c?"data:page/id,"+c:null}else if("data:action/json,"==b.substring(0,17))try{var d=JSON.parse(b.substring(17));if(null!=d.actions){for(var f=
0;f<d.actions.length;f++){var e=d.actions[f];null!=e.open&&"data:page/id,"==e.open.substring(0,13)&&(c=a[e.open.substring(e.open.indexOf(",")+1)],null!=c?e.open="data:page/id,"+c:delete e.open)}b="data:action/json,"+JSON.stringify(d)}}catch(x){}return b};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,c,d){d=null!=d?d:a.name;c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});
-var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var f=this.isRemoteVisioFormat(d);try{var e="UNKNOWN-VISIO",g=d.lastIndexOf(".");0<=g&&g<d.length&&(e=d.substring(g+1).toUpperCase());EditorUi.logEvent({category:e+"-MS-IMPORT-FILE",action:"filename_"+d,label:f?"remote":"local"})}catch(I){}if(f)if(null!=VSD_CONVERT_URL){f=new FormData;f.append("file1",a,d);var m=new XMLHttpRequest;m.open("POST",VSD_CONVERT_URL);m.responseType="blob";this.addRemoteServiceSecurityCheck(m);
-m.onreadystatechange=mxUtils.bind(this,function(){if(4==m.readyState)if(200<=m.status&&299>=m.status)try{var a=m.response;if("text/xml"==a.type){var f=new FileReader;f.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(C){c({message:mxResources.get("errorLoadingFile")})}});f.readAsText(a)}else this.doImportVisio(a,b,c,d)}catch(B){c(B)}else c({})});m.send(f)}else c({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});
+var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var f=this.isRemoteVisioFormat(d);try{var e="UNKNOWN-VISIO",g=d.lastIndexOf(".");0<=g&&g<d.length&&(e=d.substring(g+1).toUpperCase());EditorUi.logEvent({category:e+"-MS-IMPORT-FILE",action:"filename_"+d,label:f?"remote":"local"})}catch(I){}if(f)if(null!=VSD_CONVERT_URL){f=new FormData;f.append("file1",a,d);var l=new XMLHttpRequest;l.open("POST",VSD_CONVERT_URL);l.responseType="blob";this.addRemoteServiceSecurityCheck(l);
+l.onreadystatechange=mxUtils.bind(this,function(){if(4==l.readyState)if(200<=l.status&&299>=l.status)try{var a=l.response;if("text/xml"==a.type){var f=new FileReader;f.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(C){c({message:mxResources.get("errorLoadingFile")})}});f.readAsText(a)}else this.doImportVisio(a,b,c,d)}catch(B){c(B)}else c({})});l.send(f)}else c({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});
else try{this.doImportVisio(a,b,c,d)}catch(I){c(I)}}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(a,b,c){c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,
-b,c)}catch(v){c(v)}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(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||this.handleError({message:mxResources.get("unknownError")})}catch(m){this.handleError(m)}else this.spinner.stop(),
+b,c)}catch(v){c(v)}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(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||this.handleError({message:mxResources.get("unknownError")})}catch(l){this.handleError(l)}else this.spinner.stop(),
this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,c){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(v){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(v){null!=
window.console&&console.error(v),c(v)}}else c({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",d):mxscript("js/extensions.min.js",d))};EditorUi.prototype.generatePlantUmlImage=function(a,b,c,d){function f(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=e(c1&63);r+=e(c2&63);r+=e(c3&
63);return r+=e(c4&63)}function e(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"}var g=new XMLHttpRequest;g.open("GET",("txt"==b?PLANT_URL+"/txt/":"png"==b?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+f(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+f(a.charCodeAt(i),0,0):r+f(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+
2));return r}(pako.deflateRaw(a,{to:"string"})),!0);"txt"!=b&&(g.responseType="blob");g.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==b)c(this.response);else{var f=new FileReader;f.readAsDataURL(this.response);f.onloadend=function(a){var b=new Image;b.onload=function(){var a=b.width,d=b.height;if(0==a&&0==d){var e=f.result,g=e.indexOf(","),e=decodeURIComponent(escape(atob(e.substring(g+1)))),e=mxUtils.parseXml(e).getElementsByTagName("svg");0<e.length&&(a=parseFloat(e[0].getAttribute("width")),
d=parseFloat(e[0].getAttribute("height")))}c(f.result,a,d)};b.src=f.result};f.onerror=function(a){d(a)}}else d(a)};g.onerror=function(a){d(a)};g.send()};EditorUi.prototype.insertAsPreText=function(a,b,c){var d=this.editor.graph,f=null;d.getModel().beginUpdate();try{f=d.insertVertex(null,null,"<pre>"+a+"</pre>",b,c,1,1,"text;html=1;align=left;verticalAlign=top;"),d.updateCellSize(f,!0)}finally{d.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=function(a,b,c,d,e,g,k){g=null!=g?g:!0;
k=null!=k?k:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(e||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var f=this.editor.graph;if("data:image/png;base64,"==
-a.substring(0,22)){var m=this.extractGraphModelFromPng(a),p=this.importXml(m,b,c,g,!0);if(0<p.length)return p}if("data:image/svg+xml;"==a.substring(0,19))try{if(m=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(m=a.substring(a.indexOf(",")+1),m=window.atob&&!mxClient.IS_SF?atob(m):Base64.decode(m,!0)):m=decodeURIComponent(a.substring(a.indexOf(",")+1)),p=this.importXml(m,b,c,g,!0),0<p.length)return p}catch(z){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,
+a.substring(0,22)){var l=this.extractGraphModelFromPng(a),p=this.importXml(l,b,c,g,!0);if(0<p.length)return p}if("data:image/svg+xml;"==a.substring(0,19))try{if(l=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(l=a.substring(a.indexOf(",")+1),l=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l,!0)):l=decodeURIComponent(a.substring(a.indexOf(",")+1)),p=this.importXml(l,b,c,g,!0),0<p.length)return p}catch(z){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,
a,mxUtils.bind(this,function(a,d,e){f.setSelectionCell(f.insertVertex(null,null,"",f.snap(b),f.snap(c),d,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),k,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/d.height)),g=Math.round(d.width*e);d=Math.round(d.height*e);f.setSelectionCell(f.insertVertex(null,null,"",f.snap(b),f.snap(c),g,d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
a+";"))}}),mxUtils.bind(this,function(){var e=null;f.getModel().beginUpdate();try{e=f.insertVertex(f.getDefaultParent(),null,a,f.snap(b),f.snap(c),1,1,"text;"+(d?"html=1;":"")),f.updateCellSize(e),f.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{f.getModel().endUpdate()}f.setSelectionCell(e)}))}else{a=Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,g);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,
function(a){this.editor.graph.setSelectionCells(this.importXml(a,b,c,g))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{f=this.editor.graph;e=null;f.getModel().beginUpdate();try{e=f.insertVertex(f.getDefaultParent(),null,"",f.snap(b),f.snap(c),1,1,"text;"+(d?"html=1;":"")),f.fireEvent(new mxEventObject("textInserted","cells",[e])),"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a)),a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"..."),e.value=a,
@@ -8541,33 +8545,33 @@ this.importFileInputElt){var c=document.createElement("input");c.setAttribute("t
function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){if(null!=b&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(b)){var c=new Blob([a],{type:"application/octet-stream"});this.importVisio(c,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,b)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var f=this.dialog,e=f.close;this.dialog.close=
mxUtils.bind(this,function(a){Editor.useLocalStorage=d;e.apply(f,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,b,c){var d=this,f=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(f){if(0==Object.keys(f.files).length)c();else{var e=0,g,k=!1;f.forEach(function(a,d){var f=d.name.toLowerCase();"diagram/diagram.xml"==f?(k=!0,d.async("string").then(function(a){0==
a.indexOf("<mxfile ")?b(a):c()})):0==f.indexOf("versions/")&&(f=parseInt(f.substr(9)),f>e&&(e=f,g=d))});0<e?g.async("string").then(function(f){!d.isOffline()&&(new XMLHttpRequest).upload&&d.isRemoteFileFormat(f,a.name)?d.parseFile(new Blob([f],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):c())}),a.name):c()}):k||c()}},function(a){c(a)}):c()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?f():
-(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importFile=function(a,b,c,d,e,g,k,l,n,q,z){q=null!=q?q:!0;var f=!1,m=null,p=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,k)):b=this.importXml(a,c,d,q);null!=l&&l(b)});"image"==b.substring(0,5)?(n=!1,"image/png"==b.substring(0,9)&&(b=z?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(m=this.importXml(b,c,d,q),n=!0)),n||(b=this.editor.graph,
-z=a.indexOf(";"),0<z&&(a=a.substring(0,z)+a.substring(a.indexOf(",",z+1))),q&&b.isGridEnabled()&&(c=b.snap(c),d=b.snap(d)),m=[b.insertVertex(null,null,"",c,d,e,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(f=!0,this.importGraphML(a,p)):null!=n&&null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||/(\.vs(x|sx?))($|\?)/i.test(k))?(f=!0,this.importVisio(n,p)):!this.isOffline()&&(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(a,k)?(f=!0,this.parseFile(null!=n?n:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?p(a.responseText):null!=l&&l(null))}),k)):0==a.indexOf("PK")&&null!=n?(f=!0,this.importZipFile(n,p,mxUtils.bind(this,function(){m=this.insertTextAt(this.validateFileData(a),c,d,!0,null,q);l(m)}))):/(\.v(sd|dx))($|\?)/i.test(k)||/(\.vs(s|x))($|\?)/i.test(k)||(m=this.insertTextAt(this.validateFileData(a),c,d,!0,null,
-q));f||null==l||l(m);return m};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,f,e,g;c<d;){f=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4);b+="==";break}e=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&
+(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importFile=function(a,b,c,d,e,g,k,m,n,t,z){t=null!=t?t:!0;var f=!1,l=null,p=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,k)):b=this.importXml(a,c,d,t);null!=m&&m(b)});"image"==b.substring(0,5)?(n=!1,"image/png"==b.substring(0,9)&&(b=z?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(l=this.importXml(b,c,d,t),n=!0)),n||(b=this.editor.graph,
+z=a.indexOf(";"),0<z&&(a=a.substring(0,z)+a.substring(a.indexOf(",",z+1))),t&&b.isGridEnabled()&&(c=b.snap(c),d=b.snap(d)),l=[b.insertVertex(null,null,"",c,d,e,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(f=!0,this.importGraphML(a,p)):null!=n&&null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||/(\.vs(x|sx?))($|\?)/i.test(k))?(f=!0,this.importVisio(n,p)):!this.isOffline()&&(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(a,k)?(f=!0,this.parseFile(null!=n?n:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?p(a.responseText):null!=m&&m(null))}),k)):0==a.indexOf("PK")&&null!=n?(f=!0,this.importZipFile(n,p,mxUtils.bind(this,function(){l=this.insertTextAt(this.validateFileData(a),c,d,!0,null,t);m(l)}))):/(\.v(sd|dx))($|\?)/i.test(k)||/(\.vs(s|x))($|\?)/i.test(k)||(l=this.insertTextAt(this.validateFileData(a),c,d,!0,null,
+t));f||null==m||m(l);return l};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,f,e,g;c<d;){f=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4);b+="==";break}e=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&
3)<<4|(e&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2);b+="=";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(e&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2|(g&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};
-EditorUi.prototype.importFiles=function(a,b,c,d,e,g,k,l,n,q,z,B){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;q=null!=q?q:this.maxImageBytes;var f=null!=b&&null!=c,m=!0,p=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var t=z||this.resampleThreshold,u=0;u<a.length;u++)if("image/"==a[u].type.substring(0,6)&&a[u].size>t){p=!0;break}var v=mxUtils.bind(this,function(){var p=this.editor.graph,n=p.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,g,k,m,p){return null!=a&&"<mxlibrary"==a.substring(0,
-10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,c,d,e,g,k,m,p,f,B)});g=null!=g?g:mxUtils.bind(this,function(a){p.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var t=a.length,u=t,C=[],v=mxUtils.bind(this,function(a,b){C[a]=b;if(0==--u){this.spinner.stop();if(null!=l)l(C);else{var c=[];p.getModel().beginUpdate();try{for(var d=0;d<C.length;d++){var f=C[d]();null!=f&&(c=c.concat(f))}}finally{p.getModel().endUpdate()}}g(c)}}),
-x=0;x<t;x++)mxUtils.bind(this,function(f){var g=a[f];if(null!=g){var l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==k||k(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var l=a.target.result,t=l.indexOf(","),u=decodeURIComponent(escape(atob(l.substring(t+1)))),C=mxUtils.parseXml(u),u=C.getElementsByTagName("svg");if(0<u.length){var u=u[0],x=B?null:u.getAttribute("content");null!=x&&"<"!=x.charAt(0)&&"%"!=x.charAt(0)&&(x=unescape(window.atob?atob(x):Base64.decode(x,
-!0)));null!=x&&"%"==x.charAt(0)&&(x=decodeURIComponent(x));null==x||"<mxfile "!==x.substring(0,8)&&"<mxGraphModel "!==x.substring(0,14)?v(f,mxUtils.bind(this,function(){try{if(l.substring(0,t+1),null!=C){var a=C.getElementsByTagName("svg");if(0<a.length){var k=a[0],m=k.getAttribute("width"),z=k.getAttribute("height"),m=null!=m&&"%"!=m.charAt(m.length-1)?parseFloat(m):NaN,z=null!=z&&"%"!=z.charAt(z.length-1)?parseFloat(z):NaN,u=k.getAttribute("viewBox");if(null==u||0==u.length)k.setAttribute("viewBox",
-"0 0 "+m+" "+z);else if(isNaN(m)||isNaN(z)){var q=u.split(" ");3<q.length&&(m=parseFloat(q[2]),z=parseFloat(q[3]))}l=this.createSvgDataUri(mxUtils.getXml(k));var B=Math.min(1,Math.min(d/Math.max(1,m)),d/Math.max(1,z)),v=e(l,g.type,b+f*n,c+f*n,Math.max(1,Math.round(m*B)),Math.max(1,Math.round(z*B)),g.name);if(isNaN(m)||isNaN(z)){var x=new Image;x.onload=mxUtils.bind(this,function(){m=Math.max(1,x.width);z=Math.max(1,x.height);v[0].geometry.width=m;v[0].geometry.height=z;k.setAttribute("viewBox","0 0 "+
-m+" "+z);l=this.createSvgDataUri(mxUtils.getXml(k));var a=l.indexOf(";");0<a&&(l=l.substring(0,a)+l.substring(l.indexOf(",",a+1)));p.setCellStyles("image",l,[v[0]])});x.src=this.createSvgDataUri(mxUtils.getXml(k))}return v}}}catch(ha){}return null})):v(f,mxUtils.bind(this,function(){return e(x,"text/xml",b+f*n,c+f*n,0,0,g.name)}))}else v(f,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==g.type){var A=B?null:this.extractGraphModelFromPng(a.target.result);if(null!=A&&0<A.length){var y=
+EditorUi.prototype.importFiles=function(a,b,c,d,e,g,k,m,n,t,z,B){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;t=null!=t?t:this.maxImageBytes;var f=null!=b&&null!=c,l=!0,p=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var q=z||this.resampleThreshold,u=0;u<a.length;u++)if("image/"==a[u].type.substring(0,6)&&a[u].size>q){p=!0;break}var v=mxUtils.bind(this,function(){var p=this.editor.graph,n=p.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,g,k,l,p){return null!=a&&"<mxlibrary"==a.substring(0,
+10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,c,d,e,g,k,l,p,f,B)});g=null!=g?g:mxUtils.bind(this,function(a){p.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=a.length,u=q,C=[],v=mxUtils.bind(this,function(a,b){C[a]=b;if(0==--u){this.spinner.stop();if(null!=m)m(C);else{var c=[];p.getModel().beginUpdate();try{for(var d=0;d<C.length;d++){var f=C[d]();null!=f&&(c=c.concat(f))}}finally{p.getModel().endUpdate()}}g(c)}}),
+x=0;x<q;x++)mxUtils.bind(this,function(f){var g=a[f];if(null!=g){var m=new FileReader;m.onload=mxUtils.bind(this,function(a){if(null==k||k(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var m=a.target.result,q=m.indexOf(","),u=decodeURIComponent(escape(atob(m.substring(q+1)))),C=mxUtils.parseXml(u),u=C.getElementsByTagName("svg");if(0<u.length){var u=u[0],x=B?null:u.getAttribute("content");null!=x&&"<"!=x.charAt(0)&&"%"!=x.charAt(0)&&(x=unescape(window.atob?atob(x):Base64.decode(x,
+!0)));null!=x&&"%"==x.charAt(0)&&(x=decodeURIComponent(x));null==x||"<mxfile "!==x.substring(0,8)&&"<mxGraphModel "!==x.substring(0,14)?v(f,mxUtils.bind(this,function(){try{if(m.substring(0,q+1),null!=C){var a=C.getElementsByTagName("svg");if(0<a.length){var k=a[0],l=k.getAttribute("width"),z=k.getAttribute("height"),l=null!=l&&"%"!=l.charAt(l.length-1)?parseFloat(l):NaN,z=null!=z&&"%"!=z.charAt(z.length-1)?parseFloat(z):NaN,u=k.getAttribute("viewBox");if(null==u||0==u.length)k.setAttribute("viewBox",
+"0 0 "+l+" "+z);else if(isNaN(l)||isNaN(z)){var t=u.split(" ");3<t.length&&(l=parseFloat(t[2]),z=parseFloat(t[3]))}m=this.createSvgDataUri(mxUtils.getXml(k));var B=Math.min(1,Math.min(d/Math.max(1,l)),d/Math.max(1,z)),v=e(m,g.type,b+f*n,c+f*n,Math.max(1,Math.round(l*B)),Math.max(1,Math.round(z*B)),g.name);if(isNaN(l)||isNaN(z)){var x=new Image;x.onload=mxUtils.bind(this,function(){l=Math.max(1,x.width);z=Math.max(1,x.height);v[0].geometry.width=l;v[0].geometry.height=z;k.setAttribute("viewBox","0 0 "+
+l+" "+z);m=this.createSvgDataUri(mxUtils.getXml(k));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));p.setCellStyles("image",m,[v[0]])});x.src=this.createSvgDataUri(mxUtils.getXml(k))}return v}}}catch(ha){}return null})):v(f,mxUtils.bind(this,function(){return e(x,"text/xml",b+f*n,c+f*n,0,0,g.name)}))}else v(f,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==g.type){var A=B?null:this.extractGraphModelFromPng(a.target.result);if(null!=A&&0<A.length){var y=
new Image;y.src=a.target.result;v(f,mxUtils.bind(this,function(){return e(A,"text/xml",b+f*n,c+f*n,y.width,y.height,g.name)}));u=!0}}u||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(k){this.resizeImage(k,a.target.result,
-mxUtils.bind(this,function(k,p,l){v(f,mxUtils.bind(this,function(){if(null!=k&&k.length<q){var t=m&&this.isResampleImage(a.target.result,z)?Math.min(1,Math.min(d/p,d/l)):1;return e(k,g.type,b+f*n,c+f*n,Math.round(p*t),Math.round(l*t),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),m,d,z)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else e(a.target.result,g.type,b+f*n,c+f*n,240,160,g.name,function(a){v(f,
-function(){return a})},g)});/(\.v(dx|sdx?))($|\?)/i.test(g.name)||/(\.vs(x|sx?))($|\?)/i.test(g.name)?e(null,g.type,b+f*n,c+f*n,240,160,g.name,function(a){v(f,function(){return a})},g):"image"==g.type.substring(0,5)?l.readAsDataURL(g):l.readAsText(g)}})(x)});if(p){p=[];for(u=0;u<a.length;u++)p.push(a[u]);a=p;this.confirmImageResize(function(a){m=a;v()},n)}else v()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():
+mxUtils.bind(this,function(k,p,m){v(f,mxUtils.bind(this,function(){if(null!=k&&k.length<t){var q=l&&this.isResampleImage(a.target.result,z)?Math.min(1,Math.min(d/p,d/m)):1;return e(k,g.type,b+f*n,c+f*n,Math.round(p*q),Math.round(m*q),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),l,d,z)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else e(a.target.result,g.type,b+f*n,c+f*n,240,160,g.name,function(a){v(f,
+function(){return a})},g)});/(\.v(dx|sdx?))($|\?)/i.test(g.name)||/(\.vs(x|sx?))($|\?)/i.test(g.name)?e(null,g.type,b+f*n,c+f*n,240,160,g.name,function(a){v(f,function(){return a})},g):"image"==g.type.substring(0,5)?m.readAsDataURL(g):m.readAsText(g)}})(x)});if(p){p=[];for(u=0;u<a.length;u++)p.push(a[u]);a=p;this.confirmImageResize(function(a){l=a;v()},n)}else v()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():
function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(d,f){if(d||b)mxSettings.setResizeImages(d?f:null),mxSettings.save();c();a(f)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){f(a,!0)},function(a){f(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,
-340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):f(!1,d)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){b(f)};f.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(t){}};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=
-function(a,b,c,d,e,g){e=null!=e?e:this.maxImageSize;var f=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,g))try{var m=Math.max(f/e,k/e);if(1<m){var p=Math.round(f/m),l=Math.round(k/m),n=document.createElement("canvas");n.width=p;n.height=l;n.getContext("2d").drawImage(a,0,0,p,l);var t=n.toDataURL();if(t.length<b.length){var q=document.createElement("canvas");q.width=p;q.height=l;var u=q.toDataURL();t!==u&&(b=t,f=p,k=l)}}}catch(F){}c(b,f,k)};EditorUi.prototype.crcTable=[];
+340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):f(!1,d)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){b(f)};f.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(q){}};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=
+function(a,b,c,d,e,g){e=null!=e?e:this.maxImageSize;var f=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,g))try{var l=Math.max(f/e,k/e);if(1<l){var p=Math.round(f/l),m=Math.round(k/l),n=document.createElement("canvas");n.width=p;n.height=m;n.getContext("2d").drawImage(a,0,0,p,m);var q=n.toDataURL();if(q.length<b.length){var t=document.createElement("canvas");t.width=p;t.height=m;var u=t.toDataURL();q!==u&&(b=q,f=p,k=m)}}}catch(F){}c(b,f,k)};EditorUi.prototype.crcTable=[];
for(var b=0;256>b;b++)for(var g=b,e=0;8>e;e++)g=1==(g&1)?3988292384^g>>>1:g>>>1,EditorUi.prototype.crcTable[b]=g;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var f=0;f<d;f++)a=EditorUi.prototype.crcTable[(a^b.charCodeAt(c+f))&255]^a>>>8;return a};EditorUi.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var b=-1,c=0;c<a.length;c++)b=b>>>8^this.crcTable[(b^a.charCodeAt(c))&255];return(b^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,
-b){var c=m;m+=b;return a.substring(c,m)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function k(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var m=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,m);do{var p=g(a);if("IDAT"==f(a,
-4)){e=a.substring(0,m-8);"pHYs"==b&&"dpi"==c?(c=Math.round(d/.0254),c=k(c)+k(c)+String.fromCharCode(1)):c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d;d=4294967295;d=this.updateCRC(d,b,0,4);d=this.updateCRC(d,c,0,c.length);e+=k(c.length)+b+c+k(d^4294967295);e+=a.substring(m-8,a.length);break}e+=a.substring(m-8,m-4+p);f(a,p);f(a,4)}while(p);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};
+b){var c=l;l+=b;return a.substring(c,l)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function k(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var l=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,l);do{var p=g(a);if("IDAT"==f(a,
+4)){e=a.substring(0,l-8);"pHYs"==b&&"dpi"==c?(c=Math.round(d/.0254),c=k(c)+k(c)+String.fromCharCode(1)):c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d;d=4294967295;d=this.updateCRC(d,b,0,4);d=this.updateCRC(d,c,0,c.length);e+=k(c.length)+b+c+k(d^4294967295);e+=a.substring(l-8,a.length);break}e+=a.substring(l-8,l-4+p);f(a,p);f(a,4)}while(p);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};
EditorUi.prototype.loadImage=function(a,b,c){try{var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a}catch(v){if(null!=c)c(v);else throw v;}};var k=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph,c=b.cellEditor.startEditing;b.cellEditor.startEditing=function(d,f){var e=this.graph.getAttributeForCell(d,
-"plantUmlData");if(null!=e){var g=JSON.parse(e),e=new TextareaDialog(a,mxResources.get("plantUml")+":",g.data,function(c){null!=c&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(c,g.format,function(f,e,k){a.spinner.stop();b.getModel().beginUpdate();try{if("txt"==g.format)b.labelChanged(d,"<pre>"+f+"</pre>"),b.updateCellSize(d,!0);else{b.setCellStyles("image",a.convertDataUri(f),[d]);var m=b.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=e,m.height=k,b.cellsResized([d],
-[m],!1))}b.setAttributeForCell(d,"plantUmlData",JSON.stringify({data:c,format:g.format}))}finally{b.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(e.container,420,300,!0,!0);e.init()}else c.apply(this,arguments)};b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var c=!1;try{a.handleCustomLink(b),c=!0}catch(G){a.handleError(G)}return c};var d=this.clearDefaultStyle;this.clearDefaultStyle=function(){d.apply(this,arguments)};
+"plantUmlData");if(null!=e){var g=JSON.parse(e),e=new TextareaDialog(a,mxResources.get("plantUml")+":",g.data,function(c){null!=c&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(c,g.format,function(f,e,k){a.spinner.stop();b.getModel().beginUpdate();try{if("txt"==g.format)b.labelChanged(d,"<pre>"+f+"</pre>"),b.updateCellSize(d,!0);else{b.setCellStyles("image",a.convertDataUri(f),[d]);var l=b.model.getGeometry(d);null!=l&&(l=l.clone(),l.width=e,l.height=k,b.cellsResized([d],
+[l],!1))}b.setAttributeForCell(d,"plantUmlData",JSON.stringify({data:c,format:g.format}))}finally{b.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(e.container,420,300,!0,!0);e.init()}else c.apply(this,arguments)};b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var c=!1;try{a.handleCustomLink(b),c=!0}catch(G){a.handleError(G)}return c};var d=this.clearDefaultStyle;this.clearDefaultStyle=function(){d.apply(this,arguments)};
this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var e=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=a.pages&&null!=a.currentPage)for(var c=0;c<a.pages.length;c++)if(a.pages[c]==a.currentPage){0<c&&(b+=(0<b.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return e.apply(this,arguments)};var g=b.addClickHandler;
b.addClickHandler=function(a,c,d){var f=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&mxEvent.consume(a);null!=f&&f(a,c)};g.call(this,a,c,d)};k.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,
-360,null!=a.pages&&1<a.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var l=b.getExportVariables;b.getExportVariables=function(){var b=l.apply(this,arguments);b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};var n=b.getGlobalVariable;b.getGlobalVariable=function(b){return"page"==b&&null!=a.currentPage?a.currentPage.getName():
-"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==b?null!=a.pages?a.pages.length:1:n.apply(this,arguments)};var q=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var f=c.getAttribute("href");if(null==f||!b.isCustomLink(f)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))q.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(f),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=
+360,null!=a.pages&&1<a.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var m=b.getExportVariables;b.getExportVariables=function(){var b=m.apply(this,arguments);b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};var n=b.getGlobalVariable;b.getGlobalVariable=function(b){return"page"==b&&null!=a.currentPage?a.currentPage.getName():
+"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==b?null!=a.pages?a.pages.length:1:n.apply(this,arguments)};var t=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var f=c.getAttribute("href");if(null==f||!b.isCustomLink(f)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))t.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(f),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=
function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var I=this.actions.get("print");I.setEnabled(!mxClient.IS_IOS||!navigator.standalone);I.visible=I.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",
!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize"),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,
function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<
@@ -8578,8 +8582,8 @@ null!=I&&(this.styleInput=document.createElement("input"),this.styleInput.setAtt
this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var z=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:z.apply(this,arguments)}}I=document.getElementById("geInfo");
null!=I&&I.parentNode.removeChild(I);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var B=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=B&&(B.parentNode.removeChild(B),B=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==B&&(!mxClient.IS_IE||10<document.documentMode)&&(B=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();
a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=B&&(B.parentNode.removeChild(B),B=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,f=b.view.scale,e=c.x/f-d.x,g=c.y/f-d.y;mxEvent.isAltDown(a)&&(g=e=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,e,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var k=
-0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,e,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var m=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=m;var p=null,d=c.getElementsByTagName("img");null!=d&&1==d.length?(m=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||(p=
-!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(m=c[0].getAttribute("href")));var l=!0,n=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(m,e,g,!0,p,null,l))});p&&m.length>this.resampleThreshold?this.confirmImageResize(function(a){l=a;n()},mxEvent.isControlDown(a)):n()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,
+0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,e,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var l=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=l;var p=null,d=c.getElementsByTagName("img");null!=d&&1==d.length?(l=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)||(p=
+!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(l=c[0].getAttribute("href")));var m=!0,n=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(l,e,g,!0,p,null,m))});p&&l.length>this.resampleThreshold?this.confirmImageResize(function(a){m=a;n()},mxEvent.isControlDown(a)):n()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,
Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",e,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(k,e,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),e,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();
"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b))try{for(var c=b.clipboardData||b.originalEvent.clipboardData,d=!1,f=0;f<c.types.length;f++)if("text/"===c.types[f].substring(0,5)){d=!0;break}if(!d){var e=c.items;for(index in e){var g=e[index];if("file"===g.kind){if(a.isEditing())this.importFiles([g.getAsFile()],
0,0,this.maxImageSize,function(b,c,d,f,e,g){a.insertImage(b,e,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(D){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){c.innerHTML="&nbsp;";c.focus();document.execCommand("selectAll",!1,null)},
@@ -8595,8 +8599,8 @@ mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();thi
mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),
mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),f=mxUtils.getXml(c.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(f));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=f,c.pasteCounter=0);a.focus();document.execCommand("selectAll",
!1,null)}};EditorUi.prototype.pasteCells=function(a,b,c){if(!mxEvent.isConsumed(a)){var d=b;c&&null!=a.clipboardData&&(d=document.createElement("div"),d.innerHTML=a.clipboardData.getData("text/html"));var f=d.getElementsByTagName("span");if(null!=f&&0<f.length&&"application/vnd.lucid.chart.objects"===f[0].getAttribute("data-lucid-type")){var e=f[0].getAttribute("data-lucid-content");null!=e&&0<e.length&&(this.convertLucidChart(e,mxUtils.bind(this,function(a){var b=this.editor.graph;b.lastPasteXml==
-a?b.pasteCounter++:(b.lastPasteXml=a,b.pasteCounter=0);var c=b.pasteCounter*b.gridSize;b.setSelectionCells(this.importXml(a,c,c));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a))}else{var e=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(d):d.textContent),g=!1;try{var k=e.lastIndexOf("%3E");0<=k&&k<e.length-3&&(e=e.substring(0,k+3))}catch(I){}try{var f=d.getElementsByTagName("span"),m=null!=f&&0<
-f.length?mxUtils.trim(decodeURIComponent(f[0].textContent)):decodeURIComponent(e);this.isCompatibleString(m)&&(g=!0,e=m)}catch(I){}d=this.editor.graph;if(null!=e&&0<e.length){if(d.lastPasteXml==e?d.pasteCounter++:(d.lastPasteXml=e,d.pasteCounter=0),c=d.pasteCounter*d.gridSize,g||this.isCompatibleString(e)?d.setSelectionCells(this.importXml(e,c,c)):(g=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==e&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(e,g.x+c,
+a?b.pasteCounter++:(b.lastPasteXml=a,b.pasteCounter=0);var c=b.pasteCounter*b.gridSize;b.setSelectionCells(this.importXml(a,c,c));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a))}else{var e=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(d):d.textContent),g=!1;try{var k=e.lastIndexOf("%3E");0<=k&&k<e.length-3&&(e=e.substring(0,k+3))}catch(I){}try{var f=d.getElementsByTagName("span"),l=null!=f&&0<
+f.length?mxUtils.trim(decodeURIComponent(f[0].textContent)):decodeURIComponent(e);this.isCompatibleString(l)&&(g=!0,e=l)}catch(I){}d=this.editor.graph;if(null!=e&&0<e.length){if(d.lastPasteXml==e?d.pasteCounter++:(d.lastPasteXml=e,d.pasteCounter=0),c=d.pasteCounter*d.gridSize,g||this.isCompatibleString(e)?d.setSelectionCells(this.importXml(e,c,c)):(g=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==e&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(e,g.x+c,
g.y+c,!0))),!d.isSelectionEmpty()){d.scrollCellToVisible(d.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell()));try{mxEvent.consume(a)}catch(I){}}}else c||(d.lastPasteXml=null,d.pasteCounter=0)}}b.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),
mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?
this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?
@@ -8617,50 +8621,50 @@ c(mxMarker.getPackageForType(f[mxConstants.STYLE_ENDARROW])));for(var f=d.model.
EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&
this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};
EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,f=null,e=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?
-null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,e);mxEvent.addListener(window,"message",mxUtils.bind(this,function(e){if(e.source==(window.opener||window.parent)){var k=e.data,m=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==
+null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,e);mxEvent.addListener(window,"message",mxUtils.bind(this,function(e){if(e.source==(window.opener||window.parent)){var k=e.data,l=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==
a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(P){}return a});if("json"==urlParams.proto){try{k=JSON.parse(k)}catch(Z){k=null}try{if(null==k)return;if("dialog"==k.action){this.showError(null!=k.titleKey?mxResources.get(k.titleKey):k.title,null!=k.messageKey?mxResources.get(k.messageKey):k.message,null!=k.buttonKey?mxResources.get(k.buttonKey):
-k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("prompt"==k.action){this.spinner.stop();var l=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?mxResources.get(k.okKey):null,function(a){null!=a&&g.postMessage(JSON.stringify({event:"prompt",value:a,message:k}),"*")},null!=k.titleKey?mxResources.get(k.titleKey):k.title);this.showDialog(l.container,300,80,!0,!1);l.init();return}if("draft"==k.action){var p=m(k.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",
+k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("prompt"==k.action){this.spinner.stop();var m=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?mxResources.get(k.okKey):null,function(a){null!=a&&g.postMessage(JSON.stringify({event:"prompt",value:a,message:k}),"*")},null!=k.titleKey?mxResources.get(k.titleKey):k.title);this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"==k.action){var p=l(k.xml);this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",
[k.name||this.defaultFilename]),p,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"edit",message:k}),"*")}),mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"discard",message:k}),"*")}),k.editKey?mxResources.get(k.editKey):null,k.discardKey?mxResources.get(k.discardKey):null,k.ignore?mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),
-"*")}):null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{l.init()}catch(Z){g.postMessage(JSON.stringify({event:"draft",error:Z.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();var n=1==k.enableRecent,t=1==k.enableSearch,q=1==k.enableCustomTemp,l=new NewDialog(this,!1,null!=k.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=k.callback?g.postMessage(JSON.stringify({event:"template",
-xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,e,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,n?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,t?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,b,c){g.postMessage(JSON.stringify({event:"template",
-docUrl:a,info:b,name:c}),"*")}),null,null,q?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("textContent"==k.action){var u=this.getDiagramTextContent();g.postMessage(JSON.stringify({event:"textContent",data:u,message:k}),"*");return}if("status"==k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):
+"*")}):null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{m.init()}catch(Z){g.postMessage(JSON.stringify({event:"draft",error:Z.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();var n=1==k.enableRecent,q=1==k.enableSearch,t=1==k.enableCustomTemp,m=new NewDialog(this,!1,null!=k.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=k.callback?g.postMessage(JSON.stringify({event:"template",
+xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,e,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,n?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,q?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,b,c){g.postMessage(JSON.stringify({event:"template",
+docUrl:a,info:b,name:c}),"*")}),null,null,t?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(m.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("textContent"==k.action){var u=this.getDiagramTextContent();g.postMessage(JSON.stringify({event:"textContent",data:u,message:k}),"*");return}if("status"==k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):
null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var v=null!=k.messageKey?mxResources.get(k.messageKey):k.message;null==k.show||k.show?this.spinner.spin(document.body,v):this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var x=null!=k.xml?
k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var E=this.editor.graph,y=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=k.format;b.message=k;b.data=a;b.xml=encodeURIComponent(x);g.postMessage(JSON.stringify(b),"*")}),R=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==k.format&&(a=this.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(x)));E!=this.editor.graph&&E.container.parentNode.removeChild(E.container);
y(a)}),N=k.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=N){for(var Y=E.getGlobalVariable,E=this.createTemporaryGraph(E.getStylesheet()),T,L=0;L<this.pages.length;L++)if(this.pages[L].getId()==N){T=this.updatePageRoot(this.pages[L]);break}E.getGlobalVariable=function(a){return"page"==a?T.getName():"pagenumber"==a?1:Y.apply(this,arguments)};document.body.appendChild(E.container);E.model.setRoot(T.root)}if(null!=k.layerIds){for(var V=
-E.model,X=V.getChildCells(V.getRoot()),l={},L=0;L<k.layerIds.length;L++)l[k.layerIds[L]]=!0;for(L=0;L<X.length;L++)V.setVisible(X[L],l[X[L].id]||!1)}this.exportToCanvas(mxUtils.bind(this,function(a){R(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){R(null)}),null,null,k.scale,null,null,null,E)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=N?"&pageId="+N:"")+(null!=k.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):
+E.model,X=V.getChildCells(V.getRoot()),m={},L=0;L<k.layerIds.length;L++)m[k.layerIds[L]]=!0;for(L=0;L<X.length;L++)V.setVisible(X[L],m[X[L].id]||!1)}this.exportToCanvas(mxUtils.bind(this,function(a){R(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){R(null)}),null,null,k.scale,null,null,null,E)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=N?"&pageId="+N:"")+(null!=k.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):
"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(x))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?y("data:image/png;base64,"+a.getText()):R(null)}),mxUtils.bind(this,function(){R(null)}))}}else{null!=k.xml&&0<k.xml.length&&this.setFileData(k.xml);v=this.createLoadMessage("export");if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ga=this.getXmlFileData();v.xml=mxUtils.getXml(ga);v.data=
this.getFileData(null,null,!0,null,null,null,ga);v.format=k.format}else if("html"==k.format)x=this.editor.getGraphXml(),v.data=this.getHtml(x,this.editor.graph),v.xml=mxUtils.getXml(x),v.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;var ca=this.editor.graph.background;ca==mxConstants.NONE&&(ca=null);v.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);v.format="svg";if(k.embedImages||null==k.embedImages){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),"xmlsvg"==k.format?this.getEmbeddedSvg(v.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();v.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(v),"*")})):this.convertImages(this.editor.graph.getSvg(ca),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();v.data=this.createSvgDataUri(mxUtils.getXml(a));g.postMessage(JSON.stringify(v),
"*")}));return}var ea="xmlsvg"==k.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(ca));v.data=this.createSvgDataUri(ea)}g.postMessage(JSON.stringify(v),"*")}return}if("load"==k.action)d=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.title&&null!=this.buttonContainer&&(p=document.createElement("span"),
mxUtils.write(p,k.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(p),this.embedFilenameSpan=p),k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):
-k.xml;else{"remoteInvokeReady"==k.action?this.handleRemoteInvokeReady(g):"remoteInvoke"==k.action?this.handleRemoteInvoke(k):"remoteInvokeResponse"==k.action?this.handleRemoteInvokeResponse(k):g.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}catch(Z){this.handleError(Z)}}var U=mxUtils.bind(this,function(e,k){c=!0;try{a(e,k)}catch(aa){this.handleError(aa)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var m=mxUtils.bind(this,function(){return"0"!=
-urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});f=m();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=m();if(d!=f&&!c){var e=this.createLoadMessage("autosave");e.xml=d;d=JSON.stringify(e);(window.opener||window.parent).postMessage(d,"*")}f=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",
+k.xml;else{"remoteInvokeReady"==k.action?this.handleRemoteInvokeReady(g):"remoteInvoke"==k.action?this.handleRemoteInvoke(k):"remoteInvokeResponse"==k.action?this.handleRemoteInvokeResponse(k):g.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}catch(Z){this.handleError(Z)}}var U=mxUtils.bind(this,function(e,k){c=!0;try{a(e,k)}catch(aa){this.handleError(aa)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var l=mxUtils.bind(this,function(){return"0"!=
+urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});f=l();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=l();if(d!=f&&!c){var e=this.createLoadMessage("autosave");e.xml=d;d=JSON.stringify(e);(window.opener||window.parent).postMessage(d,"*")}f=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",
b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||g.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")});null!=k&&"function"===typeof k.substring&&
-"data:application/vnd.visio;base64,"==k.substring(0,34)?(m="0M8R4KGxGuE"==k.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(k.substring(k.indexOf(",")+1)),function(a){U(a,e)},mxUtils.bind(this,function(a){this.handleError(a)}),m)):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(a){4==a.readyState&&200<=a.status&&
-299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&U(a.responseText,e)}),""):null!=k&&"function"===typeof k.substring&&this.isLucidChartData(k)?this.convertLucidChart(k,mxUtils.bind(this,function(a){U(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(k=m(k),U(k,e))}}));var g=window.opener||window.parent,e="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";g.postMessage(e,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=
+"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(a){U(a,e)},mxUtils.bind(this,function(a){this.handleError(a)}),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(a){4==a.readyState&&200<=a.status&&
+299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&U(a.responseText,e)}),""):null!=k&&"function"===typeof k.substring&&this.isLucidChartData(k)?this.convertLucidChart(k,mxUtils.bind(this,function(a){U(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(k=l(k),U(k,e))}}));var g=window.opener||window.parent,e="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";g.postMessage(e,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=
document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"0px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");b.className="geBigButton";"1"==urlParams.noSaveBtn?(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)):
(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,
function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className="geBigButton geBigStandardButton";b.style.marginLeft="6px";b.style.marginRight="20px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?
"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://about.draw.io/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=
-function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),f=0;f<a.length;f++){var e=new window[a[f].layout](c);if(null!=a[f].config)for(var g in a[f].config)e[g]=a[f].config[g];this.executeLayout(function(){e.execute(c.getDefaultParent(),0==d.length?null:d)},f==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],f=[],e={};if(0<c.length){var g={},k=null,m=null,l=null,n=null,q=null,C=null,A=null,G=null,F="",J="auto",H="auto",E=null,K=null,R=40,N=40,Y=100,
+function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),f=0;f<a.length;f++){var e=new window[a[f].layout](c);if(null!=a[f].config)for(var k in a[f].config)e[k]=a[f].config[k];this.executeLayout(function(){e.execute(c.getDefaultParent(),0==d.length?null:d)},f==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],f=[],e={};if(0<c.length){var k={},g=null,l=null,m=null,n=null,t=null,C=null,A=null,G=null,F="",J="auto",H="auto",E=null,K=null,R=40,N=40,Y=100,
T=0,L=this.editor.graph;L.getGraphBounds();for(var V=function(){null!=b?b(la):(L.setSelectionCells(la),L.scrollCellToVisible(L.getSelectionCell()))},X=L.getFreeInsertPoint(),ga=X.x,ca=X.y,X=ca,ea=null,U="auto",G=null,Z=[],P=null,ba=null,aa=0;aa<c.length&&"#"==c[aa].charAt(0);){a=c[aa];for(aa++;aa<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[aa].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[aa].substring(1)),aa++;if("#"!=a.charAt(1)){var fa=a.indexOf(":");if(0<fa){var Q=mxUtils.trim(a.substring(1,
-fa)),O=mxUtils.trim(a.substring(fa+1));"label"==Q?ea=L.sanitizeHtml(O):"labelname"==Q&&0<O.length&&"-"!=O?n=O:"labels"==Q&&0<O.length&&"-"!=O?q=JSON.parse(O):"style"==Q?k=O:"parentstyle"==Q?C=O:"stylename"==Q&&0<O.length&&"-"!=O?l=O:"styles"==Q&&0<O.length&&"-"!=O?m=JSON.parse(O):"identity"==Q&&0<O.length&&"-"!=O?A=O:"parent"==Q&&0<O.length&&"-"!=O?G=O:"namespace"==Q&&0<O.length&&"-"!=O?F=O:"width"==Q?J=O:"height"==Q?H=O:"left"==Q&&0<O.length?E=O:"top"==Q&&0<O.length?K=O:"ignore"==Q?ba=O.split(","):
-"connect"==Q?Z.push(JSON.parse(O)):"link"==Q?P=O:"padding"==Q?T=parseFloat(O):"edgespacing"==Q?R=parseFloat(O):"nodespacing"==Q?N=parseFloat(O):"levelspacing"==Q?Y=parseFloat(O):"layout"==Q&&(U=O)}}}if(null==c[aa])throw Error(mxResources.get("invalidOrMissingFile"));var da=this.editor.csvToArray(c[aa]),Q=fa=null;if(null!=A||null!=G)for(var W=0;W<da.length;W++)A==da[W]&&(fa=W),G==da[W]&&(Q=W);null==ea&&(ea="%"+da[0]+"%");if(null!=Z)for(var S=0;S<Z.length;S++)null==g[Z[S].to]&&(g[Z[S].to]={});L.model.beginUpdate();
-try{for(W=aa+1;W<c.length;W++){var ia=this.editor.csvToArray(c[W]);if(null==ia){var ma=40<c[W].length?c[W].substring(0,40)+"...":c[W];throw Error(W+" ("+ma+") "+mxResources.get("containsValidationErrors"));}if(ia.length==da.length){var M=null,ka=null!=fa?F+ia[fa]:null;null!=ka&&(M=L.model.getCell(ka));var A=null!=M,ha=new mxCell(ea,new mxGeometry(ga,X,0,0),k||"whiteSpace=wrap;html=1;");ha.vertex=!0;ha.id=ka;for(var ja=0;ja<ia.length;ja++)L.setAttributeForCell(ha,da[ja],ia[ja]);if(null!=n&&null!=q){var ua=
-q[ha.getAttribute(n)];null!=ua&&L.labelChanged(ha,ua)}if(null!=l&&null!=m){var va=m[ha.getAttribute(l)];null!=va&&(ha.style=va)}L.setAttributeForCell(ha,"placeholders","1");ha.style=L.replacePlaceholders(ha,ha.style);A&&(L.model.setGeometry(M,ha.geometry),L.model.setStyle(M,ha.style),0>mxUtils.indexOf(f,M)&&f.push(M));M=ha;if(!A)for(S=0;S<Z.length;S++)g[Z[S].to][M.getAttribute(Z[S].to)]=M;null!=P&&"link"!=P&&(L.setLinkForCell(M,M.getAttribute(P)),L.setAttributeForCell(M,P,null));L.fireEvent(new mxEventObject("cellsInserted",
+fa)),O=mxUtils.trim(a.substring(fa+1));"label"==Q?ea=L.sanitizeHtml(O):"labelname"==Q&&0<O.length&&"-"!=O?n=O:"labels"==Q&&0<O.length&&"-"!=O?t=JSON.parse(O):"style"==Q?g=O:"parentstyle"==Q?C=O:"stylename"==Q&&0<O.length&&"-"!=O?m=O:"styles"==Q&&0<O.length&&"-"!=O?l=JSON.parse(O):"identity"==Q&&0<O.length&&"-"!=O?A=O:"parent"==Q&&0<O.length&&"-"!=O?G=O:"namespace"==Q&&0<O.length&&"-"!=O?F=O:"width"==Q?J=O:"height"==Q?H=O:"left"==Q&&0<O.length?E=O:"top"==Q&&0<O.length?K=O:"ignore"==Q?ba=O.split(","):
+"connect"==Q?Z.push(JSON.parse(O)):"link"==Q?P=O:"padding"==Q?T=parseFloat(O):"edgespacing"==Q?R=parseFloat(O):"nodespacing"==Q?N=parseFloat(O):"levelspacing"==Q?Y=parseFloat(O):"layout"==Q&&(U=O)}}}if(null==c[aa])throw Error(mxResources.get("invalidOrMissingFile"));var da=this.editor.csvToArray(c[aa]),Q=fa=null;if(null!=A||null!=G)for(var W=0;W<da.length;W++)A==da[W]&&(fa=W),G==da[W]&&(Q=W);null==ea&&(ea="%"+da[0]+"%");if(null!=Z)for(var S=0;S<Z.length;S++)null==k[Z[S].to]&&(k[Z[S].to]={});L.model.beginUpdate();
+try{for(W=aa+1;W<c.length;W++){var ia=this.editor.csvToArray(c[W]);if(null==ia){var ma=40<c[W].length?c[W].substring(0,40)+"...":c[W];throw Error(W+" ("+ma+") "+mxResources.get("containsValidationErrors"));}if(ia.length==da.length){var M=null,ka=null!=fa?F+ia[fa]:null;null!=ka&&(M=L.model.getCell(ka));var A=null!=M,ha=new mxCell(ea,new mxGeometry(ga,X,0,0),g||"whiteSpace=wrap;html=1;");ha.vertex=!0;ha.id=ka;for(var ja=0;ja<ia.length;ja++)L.setAttributeForCell(ha,da[ja],ia[ja]);if(null!=n&&null!=t){var ua=
+t[ha.getAttribute(n)];null!=ua&&L.labelChanged(ha,ua)}if(null!=m&&null!=l){var va=l[ha.getAttribute(m)];null!=va&&(ha.style=va)}L.setAttributeForCell(ha,"placeholders","1");ha.style=L.replacePlaceholders(ha,ha.style);A&&(L.model.setGeometry(M,ha.geometry),L.model.setStyle(M,ha.style),0>mxUtils.indexOf(f,M)&&f.push(M));M=ha;if(!A)for(S=0;S<Z.length;S++)k[Z[S].to][M.getAttribute(Z[S].to)]=M;null!=P&&"link"!=P&&(L.setLinkForCell(M,M.getAttribute(P)),L.setAttributeForCell(M,P,null));L.fireEvent(new mxEventObject("cellsInserted",
"cells",[M]));var wa=this.editor.graph.getPreferredSizeForCell(M);M.vertex&&(null!=E&&null!=M.getAttribute(E)&&(M.geometry.x=ga+parseFloat(M.getAttribute(E))),null!=K&&null!=M.getAttribute(K)&&(M.geometry.y=ca+parseFloat(M.getAttribute(K))),"@"==J.charAt(0)&&null!=M.getAttribute(J.substring(1))?M.geometry.width=parseFloat(M.getAttribute(J.substring(1))):M.geometry.width="auto"==J?wa.width+T:parseFloat(J),"@"==H.charAt(0)&&null!=M.getAttribute(H.substring(1))?M.geometry.height=parseFloat(M.getAttribute(H.substring(1))):
M.geometry.height="auto"==H?wa.height+T:parseFloat(H),X+=M.geometry.height+N);A?(null==e[ka]&&(e[ka]=[]),e[ka].push(M)):(G=null!=Q?L.model.getCell(F+ia[Q]):null,d.push(M),null!=G?(G.style=L.replacePlaceholders(G,C),L.addCell(M,G)):f.push(L.addCell(M)))}}for(var na=f.slice(),la=f.slice(),S=0;S<Z.length;S++)for(var xa=Z[S],W=0;W<f.length;W++){var M=f[W],ya=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d){L.setAttributeForCell(b,c.from,null);for(var d=d.split(","),f=0;f<d.length;f++){var e=
-g[c.to][d[f]];if(null!=e){var k=c.label;null!=c.fromlabel&&(k=(b.getAttribute(c.fromlabel)||"")+(k||""));null!=c.tolabel&&(k=(k||"")+(e.getAttribute(c.tolabel)||""));la.push(L.insertEdge(null,null,k||"",c.invert?e:a,c.invert?a:e,c.style||L.createCurrentEdgeStyle()));mxUtils.remove(c.invert?a:e,na)}}}});ya(M,M,xa);if(null!=e[M.id])for(ja=0;ja<e[M.id].length;ja++)ya(M,e[M.id][ja],xa)}if(null!=ba)for(W=0;W<d.length;W++)for(M=d[W],ja=0;ja<ba.length;ja++)L.setAttributeForCell(M,mxUtils.trim(ba[ja]),null);
+k[c.to][d[f]];if(null!=e){var g=c.label;null!=c.fromlabel&&(g=(b.getAttribute(c.fromlabel)||"")+(g||""));null!=c.tolabel&&(g=(g||"")+(e.getAttribute(c.tolabel)||""));la.push(L.insertEdge(null,null,g||"",c.invert?e:a,c.invert?a:e,c.style||L.createCurrentEdgeStyle()));mxUtils.remove(c.invert?a:e,na)}}}});ya(M,M,xa);if(null!=e[M.id])for(ja=0;ja<e[M.id].length;ja++)ya(M,e[M.id][ja],xa)}if(null!=ba)for(W=0;W<d.length;W++)for(M=d[W],ja=0;ja<ba.length;ja++)L.setAttributeForCell(M,mxUtils.trim(ba[ja]),null);
if(0<f.length){var oa=new mxParallelEdgeLayout(L);oa.spacing=R;var ta=function(){0<oa.spacing&&oa.execute(L.getDefaultParent());for(var a=0;a<f.length;a++){var b=L.getCellGeometry(f[a]);b.x=Math.round(L.snap(b.x));b.y=Math.round(L.snap(b.y));"auto"==J&&(b.width=Math.round(L.snap(b.width)));"auto"==H&&(b.height=Math.round(L.snap(b.height)))}};if("["==U.charAt(0)){var za=V;L.view.validate();this.executeLayoutList(JSON.parse(U),function(){ta();za()});V=null}else if("circle"==U){var ra=new mxCircleLayout(L);
ra.resetEdges=!1;var Aa=ra.isVertexIgnored;ra.isVertexIgnored=function(a){return Aa.apply(this,arguments)||0>mxUtils.indexOf(f,a)};this.executeLayout(function(){ra.execute(L.getDefaultParent());ta()},!0,V);V=null}else if("horizontaltree"==U||"verticaltree"==U||"auto"==U&&la.length==2*f.length-1&&1==na.length){L.view.validate();var sa=new mxCompactTreeLayout(L,"horizontaltree"==U);sa.levelDistance=N;sa.edgeRouting=!1;sa.resetEdges=!1;this.executeLayout(function(){sa.execute(L.getDefaultParent(),0<
na.length?na[0]:null)},!0,V);V=null}else if("horizontalflow"==U||"verticalflow"==U||"auto"==U&&1==na.length){L.view.validate();var pa=new mxHierarchicalLayout(L,"horizontalflow"==U?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);pa.intraCellSpacing=N;pa.parallelEdgeSpacing=R;pa.interRankCellSpacing=Y;pa.disableEdgeStyle=!1;this.executeLayout(function(){pa.execute(L.getDefaultParent(),la);L.moveCells(la,ga,ca)},!0,V);V=null}else if("organic"==U||"auto"==U&&la.length>f.length){L.view.validate();
var qa=new mxFastOrganicLayout(L);qa.forceConstant=3*N;qa.resetEdges=!1;var Ba=qa.isVertexIgnored;qa.isVertexIgnored=function(a){return Ba.apply(this,arguments)||0>mxUtils.indexOf(f,a)};oa=new mxParallelEdgeLayout(L);oa.spacing=R;this.executeLayout(function(){qa.execute(L.getDefaultParent());ta()},!0,V);V=null}}this.hideDialog()}finally{L.model.endUpdate()}null!=V&&V()}}catch(Ca){this.handleError(Ca)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&
null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&
-(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,560,130,!0,!0);a.init()};var l=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=l.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=
+(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,560,130,!0,!0);a.init()};var n=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=n.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=
this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var f=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*
a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return f.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,
8/a)};var e=b.init;b.init=function(){e.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),f=b.source,e=b.outline;e.pageScale=f.pageScale;e.pageFormat=
-f.pageFormat;e.background=f.background;e.pageVisible=f.pageVisible;e.background=f.background;var g=mxUtils.getCurrentStyle(f.container);e.container.style.backgroundColor=g.backgroundColor;null!=f.view.backgroundPageShape&&null!=e.view.backgroundPageShape&&(e.view.backgroundPageShape.fill=f.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=1;null==this.drive&&"function"!==typeof window.DriveClient||
+f.pageFormat;e.background=f.background;e.pageVisible=f.pageVisible;e.background=f.background;var k=mxUtils.getCurrentStyle(f.container);e.container.style.backgroundColor=k.backgroundColor;null!=f.view.backgroundPageShape&&null!=e.view.backgroundPageShape&&(e.view.backgroundPageShape.fill=f.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=1;null==this.drive&&"function"!==typeof window.DriveClient||
c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.gitLab||c++;b&&a&&isLocalStorage&&"1"==urlParams.browser&&c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);
var c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!c);this.actions.get("print").setEnabled(!c);this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);c="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(c);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(c),this.menus.get("newLibrary").setEnabled(c));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||
null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&
@@ -8668,70 +8672,70 @@ this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.
"4px";this.offlineStatus.style.padding="2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var d=window.applicationCache,e=null,b=mxUtils.bind(this,function(){var a=d.status,b;a==d.CHECKING&&(a=d.DOWNLOADING);switch(a){case d.UNCACHED:b=
"";break;case d.IDLE:b="min"==uiTheme?"":'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case d.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';break;case d.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case d.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b=
'<img title="Unknown" border="0" src="'+IMAGE_PATH+'/clear.gif"/>'}a!=e&&(this.offlineStatus.innerHTML=b,e=a)});mxEvent.addListener(d,"checking",b);mxEvent.addListener(d,"noupdate",b);mxEvent.addListener(d,"downloading",b);mxEvent.addListener(d,"progress",b);mxEvent.addListener(d,"cached",b);mxEvent.addListener(d,"updateready",b);mxEvent.addListener(d,"obsolete",b);mxEvent.addListener(d,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=
-function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){n.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);
+function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);
this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));
this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);
this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};
-var q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);q.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,e,g,k){var f=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,
-"svg",mxUtils.getXml(f.getSvg(d,e,g)),"image/svg+xml");else{var m=a.getFileData(!0,null,null,null,null,!0),l=f.getGraphBounds(),n=Math.floor(l.width*e/f.view.scale),p=Math.floor(l.height*e/f.view.scale);if(m.length<=MAX_REQUEST_SIZE&&n*p<MAX_AREA)if(a.hideDialog(),"png"!=c&&"jpg"!=c&&"jpeg"!=c||!a.isExportToCanvas()){var t={globalVars:f.getExportVariables()};a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):
-"")+"&extras="+encodeURIComponent(JSON.stringify(t))+(0<k?"&dpi="+k:"")+"&bg="+(null!=d?d:"none")+"&w="+n+"&h="+p+"&border="+g+"&xml="+encodeURIComponent(m))})}else"png"==c?a.exportImage(e,null==d||"none"==d,!0,!1,!1,g,!0,!1,null,null,k):a.exportImage(e,!1,!0,!1,!1,g,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var c=0;c<this.pages.length;c++){var d=
+var t=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);t.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,e,k,g){var f=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,
+"svg",mxUtils.getXml(f.getSvg(d,e,k)),"image/svg+xml");else{var l=a.getFileData(!0,null,null,null,null,!0),m=f.getGraphBounds(),n=Math.floor(m.width*e/f.view.scale),p=Math.floor(m.height*e/f.view.scale);if(l.length<=MAX_REQUEST_SIZE&&n*p<MAX_AREA)if(a.hideDialog(),"png"!=c&&"jpg"!=c&&"jpeg"!=c||!a.isExportToCanvas()){var q={globalVars:f.getExportVariables()};a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):
+"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<g?"&dpi="+g:"")+"&bg="+(null!=d?d:"none")+"&w="+n+"&h="+p+"&border="+k+"&xml="+encodeURIComponent(l))})}else"png"==c?a.exportImage(e,null==d||"none"==d,!0,!1,!1,k,!0,!1,null,null,g):a.exportImage(e,!1,!0,!1,!1,k,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var c=0;c<this.pages.length;c++){var d=
a;this.currentPage!=this.pages[c]&&(d=this.createTemporaryGraph(a.getStylesheet()),d.model.setRoot(this.pages[c].root));b+=this.pages[c].getName()+" "+d.getIndexableText()+" "}else b=a.getIndexableText();this.editor.graph.setEnabled(!0);return b};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
-c.appendChild(d);var f=document.createElement("div");f.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";f.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var e={};try{var g=mxSettings.getCustomLibraries();for(a=0;a<g.length;a++){var k=g[a];if("R"==k.substring(0,1)){var l=JSON.parse(decodeURIComponent(k.substring(1)));e[l[0]]={id:l[0],title:l[1],downloadUrl:l[2]}}}}catch(I){}this.remoteInvoke("getCustomLibraries",null,null,function(a){f.innerHTML=
-"";if(0==a.length)f.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];e[d.id]&&(b[d.id]=d);var g=this.addCheckbox(f,d.title,e[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,g)}},mxUtils.bind(this,function(a){f.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,
+c.appendChild(d);var f=document.createElement("div");f.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";f.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var e={};try{var k=mxSettings.getCustomLibraries();for(a=0;a<k.length;a++){var g=k[a];if("R"==g.substring(0,1)){var m=JSON.parse(decodeURIComponent(g.substring(1)));e[m[0]]={id:m[0],title:m[1],downloadUrl:m[2]}}}}catch(I){}this.remoteInvoke("getCustomLibraries",null,null,function(a){f.innerHTML=
+"";if(0==a.length)f.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];e[d.id]&&(b[d.id]=d);var k=this.addCheckbox(f,d.title,e[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,k)}},mxUtils.bind(this,function(a){f.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,
mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));f.appendChild(b)}));c.appendChild(f);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==e[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(A){this.handleError(A,
mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));for(c in e)b[c]||this.closeLibrary(new RemoteLibrary(this,null,e[c]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1}};EditorUi.prototype.remoteInvokeCallbacks=
-[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];null!=c&&(a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp),this.remoteInvokeCallbacks[b.callbackId]=null)};EditorUi.prototype.remoteInvoke=
-function(a,b,c,d,e){var f=!0,g=window.setTimeout(mxUtils.bind(this,function(){f=!1;e({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),k=mxUtils.bind(this,function(){window.clearTimeout(g);f&&d.apply(this,arguments)});c=c||{};c.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:k,error:e});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:c});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};
-EditorUi.prototype.handleRemoteInvoke=function(a){var b=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var c=a.funtionName,d=this.remoteInvokableFns[c];if(null!=d&&"function"===typeof this[c]){var f=a.functionArgs;Array.isArray(f)||(f=[]);if(d.isAsync)f.push(function(){b(Array.prototype.slice.apply(arguments))}),f.push(function(a){b(null,a||"Unkown Error")}),
-this[c].apply(this,f);else{var e=this[c].apply(this,f);b([e])}}else b(null,"Invalid Call: "+c+" is not found.")}catch(x){b(null,"Invalid Call: An error occured, "+x.message)}};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=
-a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,c){var d=this.getCurrentFile();null!=d?d.addComment(a,b,c):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=
-function(a,b){var c=this.getCurrentFile();return null!=c?c.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var c=this.getCurrentFile();null!=c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();
-return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")}})();
-var CommentsWindow=function(a,c,d,b,g,e){function k(){for(var a=D.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==D&&b++;I.style.display=0==b?"block":"none"}function l(a,b,c,d){function e(){b.removeChild(l);b.removeChild(m);g.style.display="block";f.style.display="block"}t={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
-"geCommentEditTxtArea";l.style.minHeight=f.offsetHeight+"px";l.value=a.content;b.insertBefore(l,f);var m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),k()):e();t=null});n.className="geCommentEditBtn";m.appendChild(n);var p=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=l.value;mxUtils.write(f,a.content);e();c(a);t=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this,
-function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(p.click(),mxEvent.consume(a)):27==a.keyCode&&(n.click(),mxEvent.consume(a)))}));p.focus();p.className="geCommentEditBtn gePrimaryBtn";m.appendChild(p);b.insertBefore(m,f);g.style.display="none";f.style.display="none";l.focus()}function n(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),e=a.timeSince(d);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
-[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function q(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function f(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function m(a){a.style.border="";a.removeChild(a.busyImg)}function p(b,c,d,e,g){function z(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
-"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});F.appendChild(e);d&&(e.style.display="none")}function B(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=x;a(b);return{pdiv:d,replies:c}}function A(c,d,g,k,n){function z(){q(v);b.addReply(C,function(a){C.id=a;b.replies.push(C);m(v);g&&g()},function(b){t();f(v);a.handleError(b,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},k,n)}function t(){l(C,v,function(a){z()},!0)}var u=B().pdiv,C=a.newComment(c,a.getCurrentUser());C.pCommentId=b.id;null==b.replies&&(b.replies=[]);var v=p(C,b.replies,u,e+1);d?t():z()}if(g||!b.isResolved){I.style.display="none";var x=document.createElement("div");x.className="geCommentContainer";x.setAttribute("data-commentId",b.id);x.style.marginLeft=20*e+5+"px";b.isResolved&&"dark"!=uiTheme&&(x.style.backgroundColor="ghostWhite");
-var E=document.createElement("div");E.className="geCommentHeader";var y=document.createElement("img");y.className="geCommentUserImg";y.src=b.user.pictureUrl||Editor.userImage;E.appendChild(y);y=document.createElement("div");y.className="geCommentHeaderTxt";E.appendChild(y);var G=document.createElement("div");G.className="geCommentUsername";mxUtils.write(G,b.user.displayName||"");y.appendChild(G);G=document.createElement("div");G.className="geCommentDate";G.setAttribute("data-commentId",b.id);n(b,
-G);y.appendChild(G);x.appendChild(E);E=document.createElement("div");E.className="geCommentTxt";mxUtils.write(E,b.content||"");x.appendChild(E);E=document.createElement("div");E.className="geCommentActions";var F=document.createElement("ul");F.className="geCommentActionsList";E.appendChild(F);u||0!=e&&!v||z(mxResources.get("reply"),function(){A("",!0)},b.isResolved);y=a.getCurrentUser();null==y||y.id!=b.user.id||u||(z(mxResources.get("edit"),function(){function c(){l(b,x,function(){q(x);b.editComment(b.content,
-function(){m(x)},function(b){f(x);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}c()},b.isResolved),z(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){q(x);b.deleteComment(function(){for(var a=B(b).replies,d=0;d<a.length;d++)D.removeChild(a[d]);for(d=0;d<c.length;d++)if(c[d]==b){c.splice(d,1);break}I.style.display=0==D.getElementsByTagName("div").length?"block":"none"},function(b){f(x);a.handleError(b,null,null,
-null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));u||0!=e||z(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=B(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var l=e[g].querySelectorAll(".geCommentAction"),
-m=0;m<l.length;m++)l[m]!=c.parentNode&&(l[m].style.display=d);C||(e[g].style.display="none")}k()}b.isResolved?A(mxResources.get("reOpened")+": ",!0,c,!1,!0):A(mxResources.get("markedAsResolved"),!1,c,!0)});x.appendChild(E);null!=d?D.insertBefore(x,d.nextSibling):D.appendChild(x);for(d=0;null!=b.replies&&d<b.replies.length;d++)E=b.replies[d],E.isResolved=b.isResolved,p(E,b.replies,null,e+1,g);null!=t&&(t.comment.id==b.id?(g=b.content,b.content=t.comment.content,l(b,x,t.saveCallback,t.deleteOnCancel),
-b.content=g):null==t.comment.id&&t.comment.pCommentId==b.id&&(D.appendChild(t.div),l(t.comment,t.div,t.saveCallback,t.deleteOnCancel)));return x}}var u=!a.canComment(),v=a.canReplyToReplies(),t=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var y=EditorUi.compactUi?"26px":"30px",D=document.createElement("div");D.className="geCommentsList";D.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":
+[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];if(null==c)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,
+a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,c,d,e){var f=!0,k=window.setTimeout(mxUtils.bind(this,function(){f=!1;e({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),g=mxUtils.bind(this,function(){window.clearTimeout(k);f&&d.apply(this,arguments)});c=c||{};c.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:g,error:e});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,
+msgMarkers:c});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a){var b=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var c=a.funtionName,d=this.remoteInvokableFns[c];if(null!=d&&"function"===typeof this[c]){var f=a.functionArgs;Array.isArray(f)||(f=[]);if(d.isAsync)f.push(function(){b(Array.prototype.slice.apply(arguments))}),
+f.push(function(a){b(null,a||"Unkown Error")}),this[c].apply(this,f);else{var e=this[c].apply(this,f);b([e])}}else b(null,"Invalid Call: "+c+" is not found.")}catch(x){b(null,"Invalid Call: An error occured, "+x.message)}};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=
+function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,c){var d=this.getCurrentFile();null!=d?d.addComment(a,b,c):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=
+a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile();return null!=c?c.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var c=this.getCurrentFile();null!=c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=
+function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")}})();
+var CommentsWindow=function(a,c,d,b,g,e){function k(){for(var a=D.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==D&&b++;I.style.display=0==b?"block":"none"}function n(a,b,c,d){function e(){b.removeChild(m);b.removeChild(l);g.style.display="block";f.style.display="block"}q={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),m=document.createElement("textarea");m.className=
+"geCommentEditTxtArea";m.style.minHeight=f.offsetHeight+"px";m.value=a.content;b.insertBefore(m,f);var l=document.createElement("div");l.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),k()):e();q=null});n.className="geCommentEditBtn";l.appendChild(n);var p=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=m.value;mxUtils.write(f,a.content);e();c(a);q=null});mxEvent.addListener(m,"keydown",mxUtils.bind(this,
+function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(p.click(),mxEvent.consume(a)):27==a.keyCode&&(n.click(),mxEvent.consume(a)))}));p.focus();p.className="geCommentEditBtn gePrimaryBtn";l.appendChild(p);b.insertBefore(l,f);g.style.display="none";f.style.display="none";m.focus()}function m(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),e=a.timeSince(d);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
+[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function t(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function f(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function l(a){a.style.border="";a.removeChild(a.busyImg)}function p(b,c,d,e,g){function z(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
+"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});G.appendChild(e);d&&(e.style.display="none")}function B(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=x;a(b);return{pdiv:d,replies:c}}function A(c,d,g,k,m){function z(){t(v);b.addReply(C,function(a){C.id=a;b.replies.push(C);l(v);g&&g()},function(b){q();f(v);a.handleError(b,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},k,m)}function q(){n(C,v,function(a){z()},!0)}var u=B().pdiv,C=a.newComment(c,a.getCurrentUser());C.pCommentId=b.id;null==b.replies&&(b.replies=[]);var v=p(C,b.replies,u,e+1);d?q():z()}if(g||!b.isResolved){I.style.display="none";var x=document.createElement("div");x.className="geCommentContainer";x.setAttribute("data-commentId",b.id);x.style.marginLeft=20*e+5+"px";b.isResolved&&"dark"!=uiTheme&&(x.style.backgroundColor="ghostWhite");
+var E=document.createElement("div");E.className="geCommentHeader";var y=document.createElement("img");y.className="geCommentUserImg";y.src=b.user.pictureUrl||Editor.userImage;E.appendChild(y);y=document.createElement("div");y.className="geCommentHeaderTxt";E.appendChild(y);var F=document.createElement("div");F.className="geCommentUsername";mxUtils.write(F,b.user.displayName||"");y.appendChild(F);F=document.createElement("div");F.className="geCommentDate";F.setAttribute("data-commentId",b.id);m(b,
+F);y.appendChild(F);x.appendChild(E);E=document.createElement("div");E.className="geCommentTxt";mxUtils.write(E,b.content||"");x.appendChild(E);E=document.createElement("div");E.className="geCommentActions";var G=document.createElement("ul");G.className="geCommentActionsList";E.appendChild(G);u||0!=e&&!v||z(mxResources.get("reply"),function(){A("",!0)},b.isResolved);y=a.getCurrentUser();null==y||y.id!=b.user.id||u||(z(mxResources.get("edit"),function(){function c(){n(b,x,function(){t(x);b.editComment(b.content,
+function(){l(x)},function(b){f(x);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}c()},b.isResolved),z(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){t(x);b.deleteComment(function(){for(var a=B(b).replies,d=0;d<a.length;d++)D.removeChild(a[d]);for(d=0;d<c.length;d++)if(c[d]==b){c.splice(d,1);break}I.style.display=0==D.getElementsByTagName("div").length?"block":"none"},function(b){f(x);a.handleError(b,null,null,
+null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));u||0!=e||z(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=B(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var m=e[g].querySelectorAll(".geCommentAction"),
+l=0;l<m.length;l++)m[l]!=c.parentNode&&(m[l].style.display=d);C||(e[g].style.display="none")}k()}b.isResolved?A(mxResources.get("reOpened")+": ",!0,c,!1,!0):A(mxResources.get("markedAsResolved"),!1,c,!0)});x.appendChild(E);null!=d?D.insertBefore(x,d.nextSibling):D.appendChild(x);for(d=0;null!=b.replies&&d<b.replies.length;d++)E=b.replies[d],E.isResolved=b.isResolved,p(E,b.replies,null,e+1,g);null!=q&&(q.comment.id==b.id?(g=b.content,b.content=q.comment.content,n(b,x,q.saveCallback,q.deleteOnCancel),
+b.content=g):null==q.comment.id&&q.comment.pCommentId==b.id&&(D.appendChild(q.div),n(q.comment,q.div,q.saveCallback,q.deleteOnCancel)));return x}}var u=!a.canComment(),v=a.canReplyToReplies(),q=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var y=EditorUi.compactUi?"26px":"30px",D=document.createElement("div");D.className="geCommentsList";D.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":
Dialog.backdropColor;D.style.bottom=parseInt(y)+7+"px";x.appendChild(D);var I=document.createElement("span");I.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(I,mxResources.get("noCommentsFound"));var z=document.createElement("div");z.className="geToolbarContainer geCommentsToolbar";z.style.height=y;z.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";z.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(z.style.filter=
-"none");y=document.createElement("a");y.className="geButton";mxClient.IS_QUIRKS&&(y.style.filter="none");if(!u){var B=y.cloneNode();B.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';B.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(B,"click",function(b){function c(){l(d,e,function(b){q(e);a.addComment(b,function(a){b.id=a;A.push(b);m(e)},function(b){f(e);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},
+"none");y=document.createElement("a");y.className="geButton";mxClient.IS_QUIRKS&&(y.style.filter="none");if(!u){var B=y.cloneNode();B.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';B.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(B,"click",function(b){function c(){n(d,e,function(b){t(e);a.addComment(b,function(a){b.id=a;A.push(b);l(e)},function(b){f(e);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},
!0)}var d=a.newComment("",a.getCurrentUser()),e=p(d,A,null,0);c();b.preventDefault();mxEvent.consume(b)});z.appendChild(B)}B=y.cloneNode();B.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';B.setAttribute("title",mxResources.get("showResolved"));var C=!1;"dark"==uiTheme&&(B.style.filter="invert(100%)");mxEvent.addListener(B,"click",function(a){this.className=(C=!C)?"geButton geCheckedBtn":"geButton";G();a.preventDefault();mxEvent.consume(a)});z.appendChild(B);a.commentsRefreshNeeded()&&
(B=y.cloneNode(),B.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',B.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(B.style.filter="invert(100%)"),mxEvent.addListener(B,"click",function(a){G();a.preventDefault();mxEvent.consume(a)}),z.appendChild(B));a.commentsSaveNeeded()&&(y=y.cloneNode(),y.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',y.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&
-(y.style.filter="invert(100%)"),mxEvent.addListener(y,"click",function(a){e();a.preventDefault();mxEvent.consume(a)}),z.appendChild(y));x.appendChild(z);var A=[],G=mxUtils.bind(this,function(){this.hasError=!1;if(null!=t){t.div=t.div.cloneNode(!0);var b=t.div.querySelector(".geCommentEditTxtArea"),c=t.div.querySelector(".geCommentEditBtns");t.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}D.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+
+(y.style.filter="invert(100%)"),mxEvent.addListener(y,"click",function(a){e();a.preventDefault();mxEvent.consume(a)}),z.appendChild(y));x.appendChild(z);var A=[],G=mxUtils.bind(this,function(){this.hasError=!1;if(null!=q){q.div=q.div.cloneNode(!0);var b=q.div.querySelector(".geCommentEditTxtArea"),c=q.div.querySelector(".geCommentEditBtns");q.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}D.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+
'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";v=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});D.innerHTML="";D.appendChild(I);I.style.display="block";A=a;for(a=0;a<A.length;a++)b(A[a].replies),p(A[a],A,
-null,0,C);null!=t&&null==t.comment.id&&null==t.comment.pCommentId&&(D.appendChild(t.div),l(t.comment,t.div,t.saveCallback,t.deleteOnCancel))},mxUtils.bind(this,function(a){D.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?": "+a.message:""));this.hasError=!0})):D.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});G();this.refreshComments=G;z=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(n(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}
+null,0,C);null!=q&&null==q.comment.id&&null==q.comment.pCommentId&&(D.appendChild(q.div),n(q.comment,q.div,q.saveCallback,q.deleteOnCancel))},mxUtils.bind(this,function(a){D.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?": "+a.message:""));this.hasError=!0})):D.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});G();this.refreshComments=G;z=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(m(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}
if(this.window.isVisible()){for(var b=D.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<A.length;d++)a(A[d])}});setInterval(z,6E4);this.refreshCommentsTime=z;this.window=new mxWindow(mxResources.get("comments"),x,c,d,b,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var F=mxUtils.bind(this,function(){var a=this.window.getX(),
-b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",F);this.destroy=function(){mxEvent.removeListener(window,"resize",F);this.window.destroy()}},ConfirmDialog=function(a,c,d,b,g,e,k,l,n,q,f){var m=document.createElement("div");m.style.textAlign="center";f=null!=f?f:44;var p=document.createElement("div");p.style.padding="6px";p.style.overflow="auto";p.style.maxHeight=f+"px";p.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(p.style.height="60px");mxUtils.write(p,c);
-m.appendChild(p);null!=q&&(p=document.createElement("div"),p.style.padding="6px 0 6px 0",c=document.createElement("img"),c.setAttribute("src",q),p.appendChild(c),m.appendChild(p));q=document.createElement("div");q.style.textAlign="center";q.style.whiteSpace="nowrap";var u=document.createElement("input");u.setAttribute("type","checkbox");e=mxUtils.button(e||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b(u.checked)});e.className="geBtn";null!=l&&(e.innerHTML=l+"<br>"+e.innerHTML,e.style.paddingBottom=
-"8px",e.style.paddingTop="8px",e.style.height="auto",e.style.width="40%");a.editor.cancelFirst&&q.appendChild(e);var v=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d(u.checked)});q.appendChild(v);null!=k?(v.innerHTML=k+"<br>"+v.innerHTML+"<br>",v.style.paddingBottom="8px",v.style.paddingTop="8px",v.style.height="auto",v.className="geBtn",v.style.width="40%"):v.className="geBtn gePrimaryBtn";a.editor.cancelFirst||q.appendChild(e);m.appendChild(q);n?(q.style.marginTop=
-"10px",p=document.createElement("p"),p.style.marginTop="20px",p.appendChild(u),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),p.appendChild(g),m.appendChild(p),mxEvent.addListener(g,"click",function(a){u.checked=!u.checked;mxEvent.consume(a)})):q.style.marginTop="12px";this.init=function(){v.focus()};this.container=m};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};
-EditorUi.prototype.patchPages=function(a,c,d,b,g){var e={},k=[],l={},n={},q={},f={};if(null!=b&&null!=b[EditorUi.DIFF_UPDATE])for(var m in b[EditorUi.DIFF_UPDATE])e[m]=b[EditorUi.DIFF_UPDATE][m];if(null!=c[EditorUi.DIFF_REMOVE])for(b=0;b<c[EditorUi.DIFF_REMOVE].length;b++)n[c[EditorUi.DIFF_REMOVE][b]]=!0;if(null!=c[EditorUi.DIFF_INSERT])for(b=0;b<c[EditorUi.DIFF_INSERT].length;b++)l[c[EditorUi.DIFF_INSERT][b].previous]=c[EditorUi.DIFF_INSERT][b];if(null!=c[EditorUi.DIFF_UPDATE])for(m in c[EditorUi.DIFF_UPDATE])b=
-c[EditorUi.DIFF_UPDATE][m],null!=b.previous&&(f[b.previous]=m);if(null!=a){var p="";for(b=0;b<a.length;b++){var u=a[b].getId();q[u]=a[b];null!=f[p]||n[u]||null!=c[EditorUi.DIFF_UPDATE]&&null!=c[EditorUi.DIFF_UPDATE][u]&&null!=c[EditorUi.DIFF_UPDATE][u].previous||(f[p]=u);p=u}}var v={},t=mxUtils.bind(this,function(a){var b=null!=a?a.getId():"";if(null!=a&&!v[b]){v[b]=!0;k.push(a);var m=null!=c[EditorUi.DIFF_UPDATE]?c[EditorUi.DIFF_UPDATE][b]:null;null!=m&&(this.updatePageRoot(a),null!=m.name&&a.setName(m.name),
-null!=m.view&&this.patchViewState(a,m.view),null!=m.cells&&this.patchPage(a,m.cells,e[a.getId()],g),!d||null==m.cells&&null==m.view||(a.needsUpdate=!0))}a=f[b];null!=a&&(delete f[b],t(q[a]));a=l[b];null!=a&&(delete l[b],x(a))}),x=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var b=q[a.getId()];null==b?t(a):(b.root=a.root,this.currentPage==b?this.editor.graph.model.setRoot(b.root):d&&(b.needsUpdate=!0))});t();for(m in f)t(q[f[m]]),
-delete f[m];for(m in l)x(l[m]),delete l[m];return k};EditorUi.prototype.patchViewState=function(a,c){if(null!=a.viewState&&null!=c){a==this.currentPage&&(a.viewState=this.editor.graph.getViewState());for(var d in c)a.viewState[d]=JSON.parse(c[d]);a==this.currentPage&&this.editor.graph.setViewState(a.viewState)}};
-EditorUi.prototype.createParentLookup=function(a,c){function d(a){var c=b[a];null==c&&(c={inserted:[],moved:{}},b[a]=c);return c}var b={};if(null!=c[EditorUi.DIFF_INSERT])for(var g=0;g<c[EditorUi.DIFF_INSERT].length;g++){var e=c[EditorUi.DIFF_INSERT][g],k=null!=e.parent?e.parent:"",l=null!=e.previous?e.previous:"";d(k).inserted[l]=e}if(null!=c[EditorUi.DIFF_UPDATE])for(var n in c[EditorUi.DIFF_UPDATE])e=c[EditorUi.DIFF_UPDATE][n],null!=e.previous&&(k=e.parent,null==k&&(g=a.getCell(n),null!=g&&(g=
-a.getParent(g),null!=g&&(k=g.getId()))),null!=k&&(d(k).moved[e.previous]=n));return b};
-EditorUi.prototype.patchPage=function(a,c,d,b){var g=a==this.currentPage?this.editor.graph.model:new mxGraphModel(a.root),e=this.createParentLookup(g,c);g.beginUpdate();try{var k=g.updateEdgeParent,l=new mxDictionary,n=[];g.updateEdgeParent=function(a,c){!l.get(a)&&b&&(l.put(a,!0),n.push(a))};var q=e[""],f=null!=q&&null!=q.inserted?q.inserted[""]:null,m=null;null!=f&&(m=this.getCellForJson(f));if(null==m){var p=null!=q&&null!=q.moved?q.moved[""]:null;null!=p&&(m=g.getCell(p))}null!=m&&(g.setRoot(m),
-a.root=m);this.patchCellRecursive(a,g,g.root,e,c);if(null!=c[EditorUi.DIFF_REMOVE])for(var u=0;u<c[EditorUi.DIFF_REMOVE].length;u++){var v=g.getCell(c[EditorUi.DIFF_REMOVE][u]);null!=v&&g.remove(v)}if(null!=c[EditorUi.DIFF_UPDATE]){var t=null!=d&&null!=d.cells?d.cells[EditorUi.DIFF_UPDATE]:null;for(p in c[EditorUi.DIFF_UPDATE])this.patchCell(g,g.getCell(p),c[EditorUi.DIFF_UPDATE][p],null!=t?t[p]:null)}if(null!=c[EditorUi.DIFF_INSERT])for(u=0;u<c[EditorUi.DIFF_INSERT].length;u++)f=c[EditorUi.DIFF_INSERT][u],
-v=g.getCell(f.id),null!=v&&(g.setTerminal(v,g.getCell(f.source),!0),g.setTerminal(v,g.getCell(f.target),!1));g.updateEdgeParent=k;if(b&&0<n.length)for(u=0;u<n.length;u++)g.contains(n[u])&&g.updateEdgeParent(n[u])}finally{g.endUpdate()}};
-EditorUi.prototype.patchCellRecursive=function(a,c,d,b,g){if(null!=d){for(var e=b[d.getId()],k=null!=e&&null!=e.inserted?e.inserted:{},e=null!=e&&null!=e.moved?e.moved:{},l=0,n=c.getChildCount(d),q="",f=0;f<n;f++){var m=c.getChildAt(d,f).getId();null==e[q]&&(null==g[EditorUi.DIFF_UPDATE]||null==g[EditorUi.DIFF_UPDATE][m]||null==g[EditorUi.DIFF_UPDATE][m].previous&&null==g[EditorUi.DIFF_UPDATE][m].parent)&&(e[q]=m);q=m}n=mxUtils.bind(this,function(e,f){var k=null!=e?e.getId():"";if(null!=e&&f){var m=
-c.getCell(k);null!=m&&m!=e&&(e=null)}null!=e&&(c.getChildAt(d,l)!=e&&c.add(d,e,l),this.patchCellRecursive(a,c,e,b,g),l++);return k});for(q=[null];0<q.length;)if(f=q.shift(),f=n(null!=f?f.child:null,null!=f?f.insert:!1),m=e[f],null!=m&&(delete e[f],q.push({child:c.getCell(m)})),m=k[f],null!=m&&(delete k[f],q.push({child:this.getCellForJson(m),insert:!0})),0==q.length){for(f in e)q.push({child:c.getCell(e[f])}),delete e[f];for(f in k)q.push({child:this.getCellForJson(k[f]),insert:!0}),delete k[f]}}};
+b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",F);this.destroy=function(){mxEvent.removeListener(window,"resize",F);this.window.destroy()}},ConfirmDialog=function(a,c,d,b,g,e,k,n,m,t,f){var l=document.createElement("div");l.style.textAlign="center";f=null!=f?f:44;var p=document.createElement("div");p.style.padding="6px";p.style.overflow="auto";p.style.maxHeight=f+"px";p.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(p.style.height="60px");mxUtils.write(p,c);
+l.appendChild(p);null!=t&&(p=document.createElement("div"),p.style.padding="6px 0 6px 0",c=document.createElement("img"),c.setAttribute("src",t),p.appendChild(c),l.appendChild(p));t=document.createElement("div");t.style.textAlign="center";t.style.whiteSpace="nowrap";var u=document.createElement("input");u.setAttribute("type","checkbox");e=mxUtils.button(e||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b(u.checked)});e.className="geBtn";null!=n&&(e.innerHTML=n+"<br>"+e.innerHTML,e.style.paddingBottom=
+"8px",e.style.paddingTop="8px",e.style.height="auto",e.style.width="40%");a.editor.cancelFirst&&t.appendChild(e);var v=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d(u.checked)});t.appendChild(v);null!=k?(v.innerHTML=k+"<br>"+v.innerHTML+"<br>",v.style.paddingBottom="8px",v.style.paddingTop="8px",v.style.height="auto",v.className="geBtn",v.style.width="40%"):v.className="geBtn gePrimaryBtn";a.editor.cancelFirst||t.appendChild(e);l.appendChild(t);m?(t.style.marginTop=
+"10px",p=document.createElement("p"),p.style.marginTop="20px",p.appendChild(u),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),p.appendChild(g),l.appendChild(p),mxEvent.addListener(g,"click",function(a){u.checked=!u.checked;mxEvent.consume(a)})):t.style.marginTop="12px";this.init=function(){v.focus()};this.container=l};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};
+EditorUi.prototype.patchPages=function(a,c,d,b,g){var e={},k=[],n={},m={},t={},f={};if(null!=b&&null!=b[EditorUi.DIFF_UPDATE])for(var l in b[EditorUi.DIFF_UPDATE])e[l]=b[EditorUi.DIFF_UPDATE][l];if(null!=c[EditorUi.DIFF_REMOVE])for(b=0;b<c[EditorUi.DIFF_REMOVE].length;b++)m[c[EditorUi.DIFF_REMOVE][b]]=!0;if(null!=c[EditorUi.DIFF_INSERT])for(b=0;b<c[EditorUi.DIFF_INSERT].length;b++)n[c[EditorUi.DIFF_INSERT][b].previous]=c[EditorUi.DIFF_INSERT][b];if(null!=c[EditorUi.DIFF_UPDATE])for(l in c[EditorUi.DIFF_UPDATE])b=
+c[EditorUi.DIFF_UPDATE][l],null!=b.previous&&(f[b.previous]=l);if(null!=a){var p="";for(b=0;b<a.length;b++){var u=a[b].getId();t[u]=a[b];null!=f[p]||m[u]||null!=c[EditorUi.DIFF_UPDATE]&&null!=c[EditorUi.DIFF_UPDATE][u]&&null!=c[EditorUi.DIFF_UPDATE][u].previous||(f[p]=u);p=u}}var v={},q=mxUtils.bind(this,function(a){var b=null!=a?a.getId():"";if(null!=a&&!v[b]){v[b]=!0;k.push(a);var m=null!=c[EditorUi.DIFF_UPDATE]?c[EditorUi.DIFF_UPDATE][b]:null;null!=m&&(this.updatePageRoot(a),null!=m.name&&a.setName(m.name),
+null!=m.view&&this.patchViewState(a,m.view),null!=m.cells&&this.patchPage(a,m.cells,e[a.getId()],g),!d||null==m.cells&&null==m.view||(a.needsUpdate=!0))}a=f[b];null!=a&&(delete f[b],q(t[a]));a=n[b];null!=a&&(delete n[b],x(a))}),x=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var b=t[a.getId()];null==b?q(a):(b.root=a.root,this.currentPage==b?this.editor.graph.model.setRoot(b.root):d&&(b.needsUpdate=!0))});q();for(l in f)q(t[f[l]]),
+delete f[l];for(l in n)x(n[l]),delete n[l];return k};EditorUi.prototype.patchViewState=function(a,c){if(null!=a.viewState&&null!=c){a==this.currentPage&&(a.viewState=this.editor.graph.getViewState());for(var d in c)a.viewState[d]=JSON.parse(c[d]);a==this.currentPage&&this.editor.graph.setViewState(a.viewState)}};
+EditorUi.prototype.createParentLookup=function(a,c){function d(a){var c=b[a];null==c&&(c={inserted:[],moved:{}},b[a]=c);return c}var b={};if(null!=c[EditorUi.DIFF_INSERT])for(var g=0;g<c[EditorUi.DIFF_INSERT].length;g++){var e=c[EditorUi.DIFF_INSERT][g],k=null!=e.parent?e.parent:"",n=null!=e.previous?e.previous:"";d(k).inserted[n]=e}if(null!=c[EditorUi.DIFF_UPDATE])for(var m in c[EditorUi.DIFF_UPDATE])e=c[EditorUi.DIFF_UPDATE][m],null!=e.previous&&(k=e.parent,null==k&&(g=a.getCell(m),null!=g&&(g=
+a.getParent(g),null!=g&&(k=g.getId()))),null!=k&&(d(k).moved[e.previous]=m));return b};
+EditorUi.prototype.patchPage=function(a,c,d,b){var g=a==this.currentPage?this.editor.graph.model:new mxGraphModel(a.root),e=this.createParentLookup(g,c);g.beginUpdate();try{var k=g.updateEdgeParent,n=new mxDictionary,m=[];g.updateEdgeParent=function(a,c){!n.get(a)&&b&&(n.put(a,!0),m.push(a))};var t=e[""],f=null!=t&&null!=t.inserted?t.inserted[""]:null,l=null;null!=f&&(l=this.getCellForJson(f));if(null==l){var p=null!=t&&null!=t.moved?t.moved[""]:null;null!=p&&(l=g.getCell(p))}null!=l&&(g.setRoot(l),
+a.root=l);this.patchCellRecursive(a,g,g.root,e,c);if(null!=c[EditorUi.DIFF_REMOVE])for(var u=0;u<c[EditorUi.DIFF_REMOVE].length;u++){var v=g.getCell(c[EditorUi.DIFF_REMOVE][u]);null!=v&&g.remove(v)}if(null!=c[EditorUi.DIFF_UPDATE]){var q=null!=d&&null!=d.cells?d.cells[EditorUi.DIFF_UPDATE]:null;for(p in c[EditorUi.DIFF_UPDATE])this.patchCell(g,g.getCell(p),c[EditorUi.DIFF_UPDATE][p],null!=q?q[p]:null)}if(null!=c[EditorUi.DIFF_INSERT])for(u=0;u<c[EditorUi.DIFF_INSERT].length;u++)f=c[EditorUi.DIFF_INSERT][u],
+v=g.getCell(f.id),null!=v&&(g.setTerminal(v,g.getCell(f.source),!0),g.setTerminal(v,g.getCell(f.target),!1));g.updateEdgeParent=k;if(b&&0<m.length)for(u=0;u<m.length;u++)g.contains(m[u])&&g.updateEdgeParent(m[u])}finally{g.endUpdate()}};
+EditorUi.prototype.patchCellRecursive=function(a,c,d,b,g){if(null!=d){for(var e=b[d.getId()],k=null!=e&&null!=e.inserted?e.inserted:{},e=null!=e&&null!=e.moved?e.moved:{},n=0,m=c.getChildCount(d),t="",f=0;f<m;f++){var l=c.getChildAt(d,f).getId();null==e[t]&&(null==g[EditorUi.DIFF_UPDATE]||null==g[EditorUi.DIFF_UPDATE][l]||null==g[EditorUi.DIFF_UPDATE][l].previous&&null==g[EditorUi.DIFF_UPDATE][l].parent)&&(e[t]=l);t=l}m=mxUtils.bind(this,function(e,f){var k=null!=e?e.getId():"";if(null!=e&&f){var m=
+c.getCell(k);null!=m&&m!=e&&(e=null)}null!=e&&(c.getChildAt(d,n)!=e&&c.add(d,e,n),this.patchCellRecursive(a,c,e,b,g),n++);return k});for(t=[null];0<t.length;)if(f=t.shift(),f=m(null!=f?f.child:null,null!=f?f.insert:!1),l=e[f],null!=l&&(delete e[f],t.push({child:c.getCell(l)})),l=k[f],null!=l&&(delete k[f],t.push({child:this.getCellForJson(l),insert:!0})),0==t.length){for(f in e)t.push({child:c.getCell(e[f])}),delete e[f];for(f in k)t.push({child:this.getCellForJson(k[f]),insert:!0}),delete k[f]}}};
EditorUi.prototype.patchCell=function(a,c,d,b){if(null!=c&&null!=d){if(null==b||null==b.xmlValue&&(null==b.value||""==b.value))"value"in d?a.setValue(c,d.value):null!=d.xmlValue&&a.setValue(c,mxUtils.parseXml(d.xmlValue).documentElement);null!=b&&null!=b.style||null==d.style||a.setStyle(c,d.style);null!=d.visible&&a.setVisible(c,1==d.visible);null!=d.collapsed&&a.setCollapsed(c,1==d.collapsed);null!=d.vertex&&(c.vertex=1==d.vertex);null!=d.edge&&(c.edge=1==d.edge);null!=d.connectable&&(c.connectable=
1==d.connectable);null!=d.geometry&&a.setGeometry(c,this.codec.decode(mxUtils.parseXml(d.geometry).documentElement));null!=d.source&&a.setTerminal(c,a.getCell(d.source),!0);null!=d.target&&a.setTerminal(c,a.getCell(d.target),!1);for(var g in d)this.cellProperties[g]||(c[g]=d[g])}};
EditorUi.prototype.getPagesForNode=function(a,c){var d=this.editor.extractGraphModel(a,!0);null!=d&&(a=d);var d=a.getElementsByTagName(c||"diagram"),b=[];if(0<d.length)for(var g=0;g<d.length;g++){var e=new DiagramPage(d[g]);this.updatePageRoot(e);b.push(e)}else"mxGraphModel"==a.nodeName&&(e=new DiagramPage(a.ownerDocument.createElement("diagram")),e.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(e.node,Graph.compressNode(a)),b.push(e));return b};
-EditorUi.prototype.diffPages=function(a,c){for(var d=[],b=[],g={},e={},k={},l=null,n=0;n<c.length;n++)e[c[n].getId()]={page:c[n],prev:l},l=c[n];l=null;for(n=0;n<a.length;n++){var q=a[n].getId(),f=e[q];if(null==f)b.push(q);else{var m=this.diffPage(a[n],f.page),p={};0<Object.keys(m).length&&(p.cells=m);m=this.diffViewState(a[n],f.page);0<Object.keys(m).length&&(p.view=m);if((null!=f.prev?null==l:null!=l)||null!=l&&null!=f.prev&&l.getId()!=f.prev.getId())p.previous=null!=f.prev?f.prev.getId():"";null!=
-f.page.getName()&&a[n].getName()!=f.page.getName()&&(p.name=f.page.getName());0<Object.keys(p).length&&(k[q]=p)}delete e[a[n].getId()];l=a[n]}for(q in e)f=e[q],d.push({data:mxUtils.getXml(f.page.node),previous:null!=f.prev?f.prev.getId():""});0<Object.keys(k).length&&(g[EditorUi.DIFF_UPDATE]=k);0<b.length&&(g[EditorUi.DIFF_REMOVE]=b);0<d.length&&(g[EditorUi.DIFF_INSERT]=d);return g};
+EditorUi.prototype.diffPages=function(a,c){for(var d=[],b=[],g={},e={},k={},n=null,m=0;m<c.length;m++)e[c[m].getId()]={page:c[m],prev:n},n=c[m];n=null;for(m=0;m<a.length;m++){var t=a[m].getId(),f=e[t];if(null==f)b.push(t);else{var l=this.diffPage(a[m],f.page),p={};0<Object.keys(l).length&&(p.cells=l);l=this.diffViewState(a[m],f.page);0<Object.keys(l).length&&(p.view=l);if((null!=f.prev?null==n:null!=n)||null!=n&&null!=f.prev&&n.getId()!=f.prev.getId())p.previous=null!=f.prev?f.prev.getId():"";null!=
+f.page.getName()&&a[m].getName()!=f.page.getName()&&(p.name=f.page.getName());0<Object.keys(p).length&&(k[t]=p)}delete e[a[m].getId()];n=a[m]}for(t in e)f=e[t],d.push({data:mxUtils.getXml(f.page.node),previous:null!=f.prev?f.prev.getId():""});0<Object.keys(k).length&&(g[EditorUi.DIFF_UPDATE]=k);0<b.length&&(g[EditorUi.DIFF_REMOVE]=b);0<d.length&&(g[EditorUi.DIFF_INSERT]=d);return g};
EditorUi.prototype.createCellLookup=function(a,c,d){d=null!=d?d:{};d[a.getId()]={cell:a,prev:c};var b=a.getChildCount();c=null;for(var g=0;g<b;g++){var e=a.getChildAt(g);this.createCellLookup(e,c,d);c=e}return d};
-EditorUi.prototype.diffCellRecursive=function(a,c,d,b,g){b=null!=b?b:{};var e=d[a.getId()];delete d[a.getId()];if(null==e)g.push(a.getId());else{var k=this.diffCell(a,e.cell);if(null!=k.parent||(null!=e.prev?null==c:null!=c)||null!=c&&null!=e.prev&&c.getId()!=e.prev.getId())k.previous=null!=e.prev?e.prev.getId():"";0<Object.keys(k).length&&(b[a.getId()]=k)}e=a.getChildCount();c=null;for(k=0;k<e;k++){var l=a.getChildAt(k);this.diffCellRecursive(l,c,d,b,g);c=l}return b};
-EditorUi.prototype.diffPage=function(a,c){var d=[],b=[],g={};this.updatePageRoot(a);this.updatePageRoot(c);var e=this.createCellLookup(c.root),k=this.diffCellRecursive(a.root,null,e,k,b),l;for(l in e){var n=e[l];d.push(this.getJsonForCell(n.cell,n.prev))}0<Object.keys(k).length&&(g[EditorUi.DIFF_UPDATE]=k);0<b.length&&(g[EditorUi.DIFF_REMOVE]=b);0<d.length&&(g[EditorUi.DIFF_INSERT]=d);return g};
-EditorUi.prototype.diffViewState=function(a,c){var d=a.viewState,b=c.viewState,g={};c==this.currentPage&&(b=this.editor.graph.getViewState());if(null!=d&&null!=b)for(var e in this.viewStateProperties){var k=JSON.stringify(d[e]),l=JSON.stringify(b[e]);k!=l&&(g[e]=l)}return g};
+EditorUi.prototype.diffCellRecursive=function(a,c,d,b,g){b=null!=b?b:{};var e=d[a.getId()];delete d[a.getId()];if(null==e)g.push(a.getId());else{var k=this.diffCell(a,e.cell);if(null!=k.parent||(null!=e.prev?null==c:null!=c)||null!=c&&null!=e.prev&&c.getId()!=e.prev.getId())k.previous=null!=e.prev?e.prev.getId():"";0<Object.keys(k).length&&(b[a.getId()]=k)}e=a.getChildCount();c=null;for(k=0;k<e;k++){var n=a.getChildAt(k);this.diffCellRecursive(n,c,d,b,g);c=n}return b};
+EditorUi.prototype.diffPage=function(a,c){var d=[],b=[],g={};this.updatePageRoot(a);this.updatePageRoot(c);var e=this.createCellLookup(c.root),k=this.diffCellRecursive(a.root,null,e,k,b),n;for(n in e){var m=e[n];d.push(this.getJsonForCell(m.cell,m.prev))}0<Object.keys(k).length&&(g[EditorUi.DIFF_UPDATE]=k);0<b.length&&(g[EditorUi.DIFF_REMOVE]=b);0<d.length&&(g[EditorUi.DIFF_INSERT]=d);return g};
+EditorUi.prototype.diffViewState=function(a,c){var d=a.viewState,b=c.viewState,g={};c==this.currentPage&&(b=this.editor.graph.getViewState());if(null!=d&&null!=b)for(var e in this.viewStateProperties){var k=JSON.stringify(d[e]),n=JSON.stringify(b[e]);k!=n&&(g[e]=n)}return g};
EditorUi.prototype.getCellForJson=function(a){var c=null!=a.geometry?this.codec.decode(mxUtils.parseXml(a.geometry).documentElement):null,d=a.value;null!=a.xmlValue&&(d=mxUtils.parseXml(a.xmlValue).documentElement);c=new mxCell(d,c,a.style);c.connectable=0!=a.connectable;c.collapsed=1==a.collapsed;c.visible=0!=a.visible;c.vertex=1==a.vertex;c.edge=1==a.edge;c.id=a.id;for(var b in a)this.cellProperties[b]||(c[b]=a[b]);return c};
EditorUi.prototype.getJsonForCell=function(a,c){var d={id:a.getId()};a.vertex&&(d.vertex=1);a.edge&&(d.edge=1);a.connectable||(d.connectable=0);null!=a.parent&&(d.parent=a.parent.getId());null!=c&&(d.previous=c.getId());null!=a.source&&(d.source=a.source.getId());null!=a.target&&(d.target=a.target.getId());null!=a.style&&(d.style=a.style);null!=a.geometry&&(d.geometry=mxUtils.getXml(this.codec.encode(a.geometry)));a.collapsed&&(d.collapsed=1);a.visible||(d.visible=0);null!=a.value&&("object"===typeof a.value&&
"number"===typeof a.value.nodeType&&"string"===typeof a.value.nodeName&&"function"===typeof a.value.getAttribute?d.xmlValue=mxUtils.getXml(a.value):d.value=a.value);for(var b in a)this.cellProperties[b]||"function"===typeof a[b]||(d[b]=a[b]);return d};
@@ -8772,18 +8776,18 @@ DrawioFileSync.prototype.fileChangedNotify=function(){if(this.isValidState())if(
DrawioFileSync.prototype.fileChanged=function(a,c,d){var b=window.setTimeout(mxUtils.bind(this,function(){null!=d&&d()||(this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(b){null!=d&&d()||(this.isValidState()?this.catchup(b,a,c,d):null!=c&&c())}),c):null!=c&&c())}),0);return this.notifyThread=b};
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(a){null!=a?(this.file.setDescriptorRevisionId(a,this.file.getCurrentRevisionId()),this.updateDescriptor(a),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(a){this.file.inConflictState=!0;this.file.handleFileError(a)}))};
DrawioFileSync.prototype.updateDescriptor=function(a){this.file.setDescriptor(a);this.file.descriptorChanged();this.start()};
-DrawioFileSync.prototype.catchup=function(a,c,d,b){if(null!=a&&(null==b||!b())){var g=this.file.getDescriptorRevisionId(a),e=this.file.getCurrentRevisionId();if(e==g)this.file.patchDescriptor(this.file.getDescriptor(),a),null!=c&&c();else if(this.isValidState()){var k=this.file.getDescriptorSecret(a),l=0,n=!1,q=mxUtils.bind(this,function(){if(null==b||!b())if(e!=this.file.getCurrentRevisionId())null!=c&&c();else if(this.isValidState()){var f=!0,m=window.setTimeout(mxUtils.bind(this,function(){f=!1;
-this.reload(c,d,b)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(e)+"&to="+encodeURIComponent(g)+(null!=k?"&secret="+encodeURIComponent(k):""),mxUtils.bind(this,function(g){this.file.stats.bytesReceived+=g.getText().length;window.clearTimeout(m);if(f&&(null==b||!b()))if(e!=this.file.getCurrentRevisionId())null!=c&&c();else if(this.isValidState()){var k=null,p=[];if(200<=g.getStatus()&&299>=g.getStatus()&&0<g.getText().length)try{var t=
-JSON.parse(g.getText());if(null!=t&&0<t.length)for(var x=0;x<t.length;x++){var y=this.stringToObject(t[x]);if(y.v>DrawioFileSync.PROTOCOL){n=!0;p=[];break}else if(y.v===DrawioFileSync.PROTOCOL&&null!=y.d)k=y.d.checksum,p.push(y.d.patch);else{n=!0;p=[];break}}}catch(D){p=[],null!=window.console&&"1"==urlParams.test&&console.log(D)}try{0<p.length?(this.file.stats.cacheHits++,this.merge(p,k,a,c,d,b)):l<=this.maxCacheReadyRetries&&!n&&401!=g.getStatus()?(l++,this.file.stats.cacheMiss++,window.setTimeout(q,
-(l+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(c,d,b))}catch(D){null!=d&&d(D)}}else null!=d&&d()}))}else null!=d&&d()});window.setTimeout(q,this.cacheReadyDelay)}else null!=d&&d()}};DrawioFileSync.prototype.reload=function(a,c,d,b){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=a&&a()}),mxUtils.bind(this,function(a){null!=c&&c(a)}),d,b)};
-DrawioFileSync.prototype.merge=function(a,c,d,b,g,e){try{this.file.stats.merged++;this.lastModified=new Date;this.file.shadowPages=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);this.file.backupPatch=this.file.isModified()?this.ui.diffPages(this.file.shadowPages,this.ui.pages):null;var k=this.file.ignorePatches(a),l=this.file.getDescriptorRevisionId(d);if(!k){for(e=0;e<a.length;e++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages,
-a[e]);var n=null!=c?this.ui.getHashValueForPages(this.file.shadowPages):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentRevisionId(),"to",l,"etag",this.file.getDescriptorEtag(d),"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"patches",a,"checksum",c==n,c);if(null!=c&&c!=n){var q=this.ui.hashValue(this.file.getCurrentRevisionId()),f=this.ui.hashValue(l);this.file.checksumError(g,a,"From: "+q+"\nTo: "+f+"\nChecksum: "+c+"\nCurrent: "+n,l,"merge");
-return}this.file.patch(a,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),d);this.file.backupPatch=null;null!=b&&b()}catch(u){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=g&&g(u);try{if(this.file.errorReportsEnabled)q=this.ui.hashValue(this.file.getCurrentRevisionId()),f=this.ui.hashValue(l),this.file.sendErrorReport("Error in merge",
-"From: "+q+"\nTo: "+f+"\nChecksum: "+c+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(a,null,2)),u);else{var m=this.file.getCurrentUser(),p=null!=m?m.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),p,u)}}catch(v){}}};
+DrawioFileSync.prototype.catchup=function(a,c,d,b){if(null!=a&&(null==b||!b())){var g=this.file.getDescriptorRevisionId(a),e=this.file.getCurrentRevisionId();if(e==g)this.file.patchDescriptor(this.file.getDescriptor(),a),null!=c&&c();else if(this.isValidState()){var k=this.file.getDescriptorSecret(a),n=0,m=!1,t=mxUtils.bind(this,function(){if(null==b||!b())if(e!=this.file.getCurrentRevisionId())null!=c&&c();else if(this.isValidState()){var f=!0,l=window.setTimeout(mxUtils.bind(this,function(){f=!1;
+this.reload(c,d,b)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(e)+"&to="+encodeURIComponent(g)+(null!=k?"&secret="+encodeURIComponent(k):""),mxUtils.bind(this,function(g){this.file.stats.bytesReceived+=g.getText().length;window.clearTimeout(l);if(f&&(null==b||!b()))if(e!=this.file.getCurrentRevisionId())null!=c&&c();else if(this.isValidState()){var k=null,p=[];if(200<=g.getStatus()&&299>=g.getStatus()&&0<g.getText().length)try{var q=
+JSON.parse(g.getText());if(null!=q&&0<q.length)for(var x=0;x<q.length;x++){var y=this.stringToObject(q[x]);if(y.v>DrawioFileSync.PROTOCOL){m=!0;p=[];break}else if(y.v===DrawioFileSync.PROTOCOL&&null!=y.d)k=y.d.checksum,p.push(y.d.patch);else{m=!0;p=[];break}}}catch(D){p=[],null!=window.console&&"1"==urlParams.test&&console.log(D)}try{0<p.length?(this.file.stats.cacheHits++,this.merge(p,k,a,c,d,b)):n<=this.maxCacheReadyRetries&&!m&&401!=g.getStatus()?(n++,this.file.stats.cacheMiss++,window.setTimeout(t,
+(n+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(c,d,b))}catch(D){null!=d&&d(D)}}else null!=d&&d()}))}else null!=d&&d()});window.setTimeout(t,this.cacheReadyDelay)}else null!=d&&d()}};DrawioFileSync.prototype.reload=function(a,c,d,b){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=a&&a()}),mxUtils.bind(this,function(a){null!=c&&c(a)}),d,b)};
+DrawioFileSync.prototype.merge=function(a,c,d,b,g,e){try{this.file.stats.merged++;this.lastModified=new Date;this.file.shadowPages=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);this.file.backupPatch=this.file.isModified()?this.ui.diffPages(this.file.shadowPages,this.ui.pages):null;var k=this.file.ignorePatches(a),n=this.file.getDescriptorRevisionId(d);if(!k){for(e=0;e<a.length;e++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages,
+a[e]);var m=null!=c?this.ui.getHashValueForPages(this.file.shadowPages):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentRevisionId(),"to",n,"etag",this.file.getDescriptorEtag(d),"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"patches",a,"checksum",c==m,c);if(null!=c&&c!=m){var t=this.ui.hashValue(this.file.getCurrentRevisionId()),f=this.ui.hashValue(n);this.file.checksumError(g,a,"From: "+t+"\nTo: "+f+"\nChecksum: "+c+"\nCurrent: "+m,n,"merge");
+return}this.file.patch(a,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),d);this.file.backupPatch=null;null!=b&&b()}catch(u){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=g&&g(u);try{if(this.file.errorReportsEnabled)t=this.ui.hashValue(this.file.getCurrentRevisionId()),f=this.ui.hashValue(n),this.file.sendErrorReport("Error in merge",
+"From: "+t+"\nTo: "+f+"\nChecksum: "+c+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(a,null,2)),u);else{var l=this.file.getCurrentUser(),p=null!=l?l.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),p,u)}}catch(v){}}};
DrawioFileSync.prototype.descriptorChanged=function(a){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var c=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),d=this.file.getCurrentRevisionId(),b=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(a)+"&to="+encodeURIComponent(d)+"&msg="+encodeURIComponent(c)+"&data="+encodeURIComponent(b));this.file.stats.bytesSent+=b.length;this.file.stats.msgSent++}this.updateStatus()};
DrawioFileSync.prototype.objectToString=function(a){a=Graph.compress(JSON.stringify(a));null!=this.key&&"undefined"!==typeof CryptoJS&&(a=CryptoJS.AES.encrypt(a,this.key).toString());return a};DrawioFileSync.prototype.stringToObject=function(a){null!=this.key&&"undefined"!==typeof CryptoJS&&(a=CryptoJS.AES.decrypt(a,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(a))};
DrawioFileSync.prototype.fileSaved=function(a,c,d,b){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline()&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var g=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);b=this.ui.getHashValueForPages(a);g=this.ui.diffPages(g,a);c=this.file.getDescriptorRevisionId(c);
-var e=this.file.getCurrentRevisionId(),k=this.objectToString(this.createMessage({patch:g,checksum:b})),l=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),n=this.file.getDescriptorSecret(this.file.getDescriptor());this.file.stats.bytesSent+=k.length;this.file.stats.msgSent++;mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(c)+"&to="+encodeURIComponent(e)+"&msg="+encodeURIComponent(l)+(null!=n?"&secret="+encodeURIComponent(n):"")+(k.length<this.maxCacheEntrySize?
+var e=this.file.getCurrentRevisionId(),k=this.objectToString(this.createMessage({patch:g,checksum:b})),n=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),m=this.file.getDescriptorSecret(this.file.getDescriptor());this.file.stats.bytesSent+=k.length;this.file.stats.msgSent++;mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(c)+"&to="+encodeURIComponent(e)+"&msg="+encodeURIComponent(n)+(null!=m?"&secret="+encodeURIComponent(m):"")+(k.length<this.maxCacheEntrySize?
"&data="+encodeURIComponent(k):""),mxUtils.bind(this,function(a){}));"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",c,"to",e,"etag",this.file.getCurrentEtag(),k.length,"bytes","diff",g,"checksum",b)}this.file.shadowPages=a;null!=d&&d()};DrawioFileSync.prototype.getIdParameters=function(){var a="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(a+="&sid="+this.pusher.connection.socket_id);return a};
DrawioFileSync.prototype.createMessage=function(a){return{v:DrawioFileSync.PROTOCOL,d:a,c:this.clientId}};DrawioFileSync.prototype.fileConflict=function(a,c,d){this.catchupRetryCount++;this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=a?this.catchup(a,c,d):this.fileChanged(c,d)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=d&&d({message:mxResources.get("timeout")}))};
DrawioFileSync.prototype.stop=function(){null!=this.pusher&&(EditorUi.debug("Sync.stop",[this]),null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null);this.updateOnlineState();this.updateStatus()};
@@ -8794,13 +8798,13 @@ Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as=
mxAsyncCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxAsyncCanvas.prototype.updateFont=function(){var a="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a+="italic ");this.ctx.font=a+this.state.fontSize+"px "+this.state.fontFamily};mxAsyncCanvas.prototype.rotate=function(a,c,d,b,g){};
mxAsyncCanvas.prototype.setAlpha=function(a){this.state.alpha=a};mxAsyncCanvas.prototype.setFontColor=function(a){this.state.fontColor=a};mxAsyncCanvas.prototype.setFontBackgroundColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBackgroundColor=a};mxAsyncCanvas.prototype.setFontBorderColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBorderColor=a};mxAsyncCanvas.prototype.setFontSize=function(a){this.state.fontSize=a};
mxAsyncCanvas.prototype.setFontFamily=function(a){this.state.fontFamily=a};mxAsyncCanvas.prototype.setFontStyle=function(a){this.state.fontStyle=a};mxAsyncCanvas.prototype.rect=function(a,c,d,b){};mxAsyncCanvas.prototype.roundrect=function(a,c,d,b,g,e){};mxAsyncCanvas.prototype.ellipse=function(a,c,d,b){};mxAsyncCanvas.prototype.rewriteImageSource=function(a){if("http://"==a.substring(0,7)||"https://"==a.substring(0,8))a="/proxy?url="+encodeURIComponent(a);return a};
-mxAsyncCanvas.prototype.image=function(a,c,d,b,g,e,k,l){g=this.rewriteImageSource(g);a=this.htmlCanvas.images[g];null==a&&(a=new Image,a.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),a.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[g]=a,a.src=g)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
-mxAsyncCanvas.prototype.text=function(a,c,d,b,g,e,k,l,n,q,f,m){if(null!=g&&0!=g.length&&(a=this.state.scale,"html"==n&&"function"===typeof html2canvas)){this.incWaitCounter();var p=this.canvasIndex++;html2canvas(g,{onrendered:mxUtils.bind(this,function(a){this.htmlCanvas.subCanvas[p]=a;this.decWaitCounter()}),scale:a,logging:!0})}};mxAsyncCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};function mxJsCanvas(a){mxAbstractCanvas2D.call(this);this.ctx=a.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
+mxAsyncCanvas.prototype.image=function(a,c,d,b,g,e,k,n){g=this.rewriteImageSource(g);a=this.htmlCanvas.images[g];null==a&&(a=new Image,a.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),a.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[g]=a,a.src=g)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
+mxAsyncCanvas.prototype.text=function(a,c,d,b,g,e,k,n,m,t,f,l){if(null!=g&&0!=g.length&&(a=this.state.scale,"html"==m&&"function"===typeof html2canvas)){this.incWaitCounter();var p=this.canvasIndex++;html2canvas(g,{onrendered:mxUtils.bind(this,function(a){this.htmlCanvas.subCanvas[p]=a;this.decWaitCounter()}),scale:a,logging:!0})}};mxAsyncCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};function mxJsCanvas(a){mxAbstractCanvas2D.call(this);this.ctx=a.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
mxJsCanvas.prototype.subCanvas=null;mxJsCanvas.prototype.canvasIndex=0;mxJsCanvas.prototype.hexToRgb=function(a){a=a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(a,d,b,g){return d+d+b+b+g+g});return(a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a))?{r:parseInt(a[1],16),g:parseInt(a[2],16),b:parseInt(a[3],16)}:null};mxJsCanvas.prototype.incWaitCounter=function(){this.waitCounter++};
mxJsCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxJsCanvas.prototype.updateFont=function(){var a="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a+="italic ");this.ctx.font=a+this.state.fontSize+"px "+this.state.fontFamily};
mxJsCanvas.prototype.save=function(){this.states.push(this.state);this.state=mxUtils.clone(this.state);this.ctx.save()};mxJsCanvas.prototype.restore=function(){this.state=this.states.pop();this.ctx.restore()};mxJsCanvas.prototype.scale=function(a){this.state.scale*=a;this.state.strokeWidth*=a;this.ctx.scale(a,a)};mxJsCanvas.prototype.translate=function(a,c){this.state.dx+=a;this.state.dy+=c;this.ctx.translate(a,c)};
mxJsCanvas.prototype.rotate=function(a,c,d,b,g){b-=this.state.dx;g-=this.state.dy;this.ctx.translate(b,g);(c||d)&&this.ctx.scale(c?-1:1,d?-1:1);this.ctx.rotate(a*this.M_RAD_PER_DEG);this.ctx.translate(-b,-g)};mxJsCanvas.prototype.setAlpha=function(a){this.state.alpha=a;this.ctx.globalAlpha=a};mxJsCanvas.prototype.setFillColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fillColor=a;this.state.gradientColor=null;this.ctx.fillStyle=a};
-mxJsCanvas.prototype.setGradient=function(a,c,d,b,g,e,k,l,n){d=this.ctx.createLinearGradient(0,b,0,b+e);b=this.state;b.fillColor=a;b.fillAlpha=null!=l?l:1;b.gradientColor=c;b.gradientAlpha=null!=n?n:1;b.gradientDirection=k;a=this.hexToRgb(a);c=this.hexToRgb(c);null!=a&&d.addColorStop(0,"rgba("+a.r+","+a.g+","+a.b+","+b.fillAlpha+")");null!=c&&d.addColorStop(1,"rgba("+c.r+","+c.g+","+c.b+","+b.gradientAlpha+")");this.ctx.fillStyle=d};
+mxJsCanvas.prototype.setGradient=function(a,c,d,b,g,e,k,n,m){d=this.ctx.createLinearGradient(0,b,0,b+e);b=this.state;b.fillColor=a;b.fillAlpha=null!=n?n:1;b.gradientColor=c;b.gradientAlpha=null!=m?m:1;b.gradientDirection=k;a=this.hexToRgb(a);c=this.hexToRgb(c);null!=a&&d.addColorStop(0,"rgba("+a.r+","+a.g+","+a.b+","+b.fillAlpha+")");null!=c&&d.addColorStop(1,"rgba("+c.r+","+c.g+","+c.b+","+b.gradientAlpha+")");this.ctx.fillStyle=d};
mxJsCanvas.prototype.setStrokeColor=function(a){null!=a&&(a==mxConstants.NONE?(this.state.strokeColor=null,this.ctx.strokeStyle="rgba(0, 0, 0, 0)"):(this.ctx.strokeStyle=a,this.state.strokeColor=a))};mxJsCanvas.prototype.setStrokeWidth=function(a){this.ctx.lineWidth=a};mxJsCanvas.prototype.setDashed=function(a){if(this.state.dashed=a){a=this.state.dashPattern.split(" ");for(var c=0;c<a.length;c++)a[c]=parseInt(a[c],10);this.setLineDash(a)}else this.setLineDash([0])};
mxJsCanvas.prototype.setLineDash=function(a){try{"function"===typeof this.ctx.setLineDash&&this.ctx.setLineDash(a)}catch(c){}};mxJsCanvas.prototype.setDashPattern=function(a){this.state.dashPattern=a;if(this.state.dashed){a=a.split(" ");for(var c=0;c<a.length;c++)a[c]=parseInt(a[c],10);this.ctx.setLineDash(a)}};mxJsCanvas.prototype.setLineCap=function(a){this.ctx.lineCap=a};mxJsCanvas.prototype.setLineJoin=function(a){this.ctx.lineJoin=a};
mxJsCanvas.prototype.setMiterLimit=function(a){this.ctx.lineJoin=a};mxJsCanvas.prototype.setFontColor=function(a){this.ctx.fillStyle=a};mxJsCanvas.prototype.setFontBackgroundColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBackgroundColor=a};mxJsCanvas.prototype.setFontBorderColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBorderColor=a};mxJsCanvas.prototype.setFontSize=function(a){this.state.fontSize=a};
@@ -8810,13 +8814,13 @@ mxJsCanvas.prototype.setShadowOffset=function(a,c){this.state.shadowDx=a;this.st
mxJsCanvas.prototype.arcTo=function(a,c,d,b,g,e,k){a=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,a,c,d,b,g,e,k);if(null!=a)for(c=0;c<a.length;c+=6)this.curveTo(a[c],a[c+1],a[c+2],a[c+3],a[c+4],a[c+5])};mxJsCanvas.prototype.curveTo=function(a,c,d,b,g,e){this.ctx.bezierCurveTo(a,c,d,b,g,e);this.lastMoveX=g;this.lastMoveY=e};mxJsCanvas.prototype.rect=function(a,c,d,b){this.begin();this.moveTo(a,c);this.lineTo(a+d,c);this.lineTo(a+d,c+b);this.lineTo(a,c+b);this.close()};
mxJsCanvas.prototype.roundrect=function(a,c,d,b,g,e){this.begin();this.moveTo(a+g,c);this.lineTo(a+d-g,c);this.quadTo(a+d,c,a+d,c+e);this.lineTo(a+d,c+b-e);this.quadTo(a+d,c+b,a+d-g,c+b);this.lineTo(a+g,c+b);this.quadTo(a,c+b,a,c+b-e);this.lineTo(a,c+e);this.quadTo(a,c,a+g,c)};mxJsCanvas.prototype.ellipse=function(a,c,d,b){this.ctx.save();this.ctx.translate(a+d/2,c+b/2);this.ctx.scale(d/2,b/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()};
mxJsCanvas.prototype.rewriteImageSource=function(a){if("http://"==a.substring(0,7)||"https://"==a.substring(0,8))a="/proxy?url="+encodeURIComponent(a);return a};
-mxJsCanvas.prototype.image=function(a,c,d,b,g,e,k,l){g=this.rewriteImageSource(g);g=this.images[g];if(null!=g&&0<g.height&&0<g.width){var n=this.ctx;n.save();if(e){e=g.width;var q=g.height,f=Math.min(d/e,b/q);a+=(d-e*f)/2;c+=(b-q*f)/2;d=e*f;b=q*f}k&&(n.translate(2*a+d,0),n.scale(-1,1));l&&(n.translate(0,2*c+b),n.scale(1,-1));n.drawImage(g,a,c,d,b);n.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
+mxJsCanvas.prototype.image=function(a,c,d,b,g,e,k,n){g=this.rewriteImageSource(g);g=this.images[g];if(null!=g&&0<g.height&&0<g.width){var m=this.ctx;m.save();if(e){e=g.width;var t=g.height,f=Math.min(d/e,b/t);a+=(d-e*f)/2;c+=(b-t*f)/2;d=e*f;b=t*f}k&&(m.translate(2*a+d,0),m.scale(-1,1));n&&(m.translate(0,2*c+b),m.scale(1,-1));m.drawImage(g,a,c,d,b);m.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
mxJsCanvas.prototype.fill=function(){this.ctx.fill()};mxJsCanvas.prototype.stroke=function(){this.ctx.stroke()};mxJsCanvas.prototype.fillAndStroke=function(){if(this.state.shadow){this.ctx.stroke();this.ctx.fill();var a=this.ctx.shadowColor,c=this.ctx.shadowOffsetX,d=this.ctx.shadowOffsetY;this.ctx.shadowColor="transparent";this.ctx.shadowOffsetX=0;this.ctx.shadowOffsetY=0;this.ctx.stroke();this.ctx.shadowColor=a;this.ctx.shadowOffsetX=c;this.ctx.shadowOffsetY=d}else this.ctx.fill(),this.ctx.stroke()};
-mxJsCanvas.prototype.text=function(a,c,d,b,g,e,k,l,n,q,f,m){if(null!=g&&0!=g.length){d=this.state.scale;0!=m&&(this.ctx.translate(Math.round(a),Math.round(c)),this.ctx.rotate(m*Math.PI/180),this.ctx.translate(Math.round(-a),Math.round(-c)));if("html"==n){g=this.subCanvas[this.canvasIndex++];n=g.height;m=g.width;switch(k){case mxConstants.ALIGN_MIDDLE:c-=n/2/d;break;case mxConstants.ALIGN_BOTTOM:c-=n/d}switch(e){case mxConstants.ALIGN_CENTER:a-=m/2/d;break;case mxConstants.ALIGN_RIGHT:a-=m/d}this.ctx.save();
+mxJsCanvas.prototype.text=function(a,c,d,b,g,e,k,n,m,t,f,l){if(null!=g&&0!=g.length){d=this.state.scale;0!=l&&(this.ctx.translate(Math.round(a),Math.round(c)),this.ctx.rotate(l*Math.PI/180),this.ctx.translate(Math.round(-a),Math.round(-c)));if("html"==m){g=this.subCanvas[this.canvasIndex++];m=g.height;l=g.width;switch(k){case mxConstants.ALIGN_MIDDLE:c-=m/2/d;break;case mxConstants.ALIGN_BOTTOM:c-=m/d}switch(e){case mxConstants.ALIGN_CENTER:a-=l/2/d;break;case mxConstants.ALIGN_RIGHT:a-=l/d}this.ctx.save();
if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor)null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(Math.round(a)-.5,Math.round(c)-.5,Math.round(g.width/d),Math.round(g.height/d))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(a)-.5,Math.round(c)-.5,Math.round(g.width/d),Math.round(g.height/d)));this.ctx.scale(1/d,1/d);this.ctx.drawImage(g,
-Math.round(a*d),Math.round(c*d))}else{this.ctx.save();this.updateFont();m=document.createElement("div");m.innerHTML=g;m.style.position="absolute";m.style.top="-9999px";m.style.left="-9999px";m.style.fontFamily=this.state.fontFamily;m.style.fontWeight="bold";m.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(m);n=[m.offsetWidth,m.offsetHeight];document.body.removeChild(m);g=g.split("\n");m=n[1];this.ctx.textBaseline="top";n=c;switch(k){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
-"middle";c-=(g.length-1)*m/2;n=c-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",c-=m*(g.length-1),n=c-this.state.fontSize}k=[];m=[];for(d=0;d<g.length;d++)m[d]=a,k[d]=this.ctx.measureText(g[d]).width,null!=e&&e!=mxConstants.ALIGN_LEFT&&(m[d]-=k[d],e==mxConstants.ALIGN_CENTER&&(m[d]+=k[d]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){a=m[0];e=k[0];for(d=1;d<g.length;d++)a=Math.min(a,m[d]),e=Math.max(e,k[d]);this.ctx.save();
-a=Math.round(a)-.5;n=Math.round(n)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(a,n,e,this.state.fontSize*mxConstants.LINE_HEIGHT*g.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(a,n,e,this.state.fontSize*mxConstants.LINE_HEIGHT*g.length));this.ctx.restore()}for(d=0;d<g.length;d++)this.ctx.fillText(g[d],m[d],c),c+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
+Math.round(a*d),Math.round(c*d))}else{this.ctx.save();this.updateFont();l=document.createElement("div");l.innerHTML=g;l.style.position="absolute";l.style.top="-9999px";l.style.left="-9999px";l.style.fontFamily=this.state.fontFamily;l.style.fontWeight="bold";l.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(l);m=[l.offsetWidth,l.offsetHeight];document.body.removeChild(l);g=g.split("\n");l=m[1];this.ctx.textBaseline="top";m=c;switch(k){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
+"middle";c-=(g.length-1)*l/2;m=c-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",c-=l*(g.length-1),m=c-this.state.fontSize}k=[];l=[];for(d=0;d<g.length;d++)l[d]=a,k[d]=this.ctx.measureText(g[d]).width,null!=e&&e!=mxConstants.ALIGN_LEFT&&(l[d]-=k[d],e==mxConstants.ALIGN_CENTER&&(l[d]+=k[d]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){a=l[0];e=k[0];for(d=1;d<g.length;d++)a=Math.min(a,l[d]),e=Math.max(e,k[d]);this.ctx.save();
+a=Math.round(a)-.5;m=Math.round(m)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(a,m,e,this.state.fontSize*mxConstants.LINE_HEIGHT*g.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(a,m,e,this.state.fontSize*mxConstants.LINE_HEIGHT*g.length));this.ctx.restore()}for(d=0;d<g.length;d++)this.ctx.fillText(g[d],l[d],c),c+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
mxJsCanvas.prototype.getCanvas=function(){return canvas};mxJsCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};DrawioClient=function(a,c){mxEventSource.call(this);this.ui=a;this.cookieName=c;this.token=this.getPersistentToken()};mxUtils.extend(DrawioClient,mxEventSource);DrawioClient.prototype.token=null;DrawioClient.prototype.user=null;DrawioClient.prototype.setUser=function(a){this.user=a;this.fireEvent(new mxEventObject("userChanged"))};DrawioClient.prototype.getUser=function(){return this.user};
DrawioClient.prototype.clearPersistentToken=function(){if(isLocalStorage)localStorage.removeItem("."+this.cookieName),sessionStorage.removeItem("."+this.cookieName);else if("undefined"!=typeof Storage){var a=new Date;a.setYear(a.getFullYear()-1);document.cookie=this.cookieName+"=; expires="+a.toUTCString()}};
DrawioClient.prototype.getPersistentToken=function(a){var c=null;isLocalStorage&&(c=localStorage.getItem("."+this.cookieName),null==c&&a&&(c=sessionStorage.getItem("."+this.cookieName)));if(null==c&&"undefined"!=typeof Storage){var d=document.cookie;a=this.cookieName+"=";var b=d.indexOf(a);0<=b&&(b+=a.length,c=d.indexOf(";",b),0>c?c=d.length:postCookie=d.substring(c),c=d.substring(b,c),c=0<c.length?c:null,null!=c&&isLocalStorage&&(d=new Date,d.setYear(d.getFullYear()-1),document.cookie=a+"; expires="+
@@ -8824,10 +8828,10 @@ d.toUTCString(),localStorage.setItem("."+this.cookieName,c)))}return c};DrawioCl
DriveFile.prototype.isConflict=function(a){return null!=a&&null!=a.error&&412==a.error.code};DriveFile.prototype.getCurrentUser=function(){return null!=this.ui.drive?this.ui.drive.user:null};DriveFile.prototype.getMode=function(){return App.MODE_GOOGLE};
DriveFile.prototype.getPublicUrl=function(a){this.ui.drive.executeRequest({url:"/files/"+this.desc.id+"/permissions?supportsTeamDrives=true"},mxUtils.bind(this,function(c){if(null!=c&&null!=c.items)for(var d=0;d<c.items.length;d++)if("anyoneWithLink"===c.items[d].id||"anyone"===c.items[d].id){a(this.desc.webContentLink);return}a(null)}),mxUtils.bind(this,function(){a(null)}))};DriveFile.prototype.isAutosaveOptional=function(){return!0};
DriveFile.prototype.isRenamable=function(){return this.isEditable()&&DrawioFile.prototype.isEditable.apply(this,arguments)};DriveFile.prototype.isMovable=function(){return this.isEditable()};DriveFile.prototype.isTrashed=function(){return this.desc.labels.trashed};DriveFile.prototype.save=function(a,c,d,b,g){DrawioFile.prototype.save.apply(this,[a,mxUtils.bind(this,function(){this.saveFile(null,a,c,d,b,g)}),d,b,g])};
-DriveFile.prototype.saveFile=function(a,c,d,b,g,e){try{if(!this.isEditable())null!=d&&d();else if(!this.savingFile){var k=mxUtils.bind(this,function(a,e){var l=null,f=null;try{l=this.isModified;f=this.isModified();this.setModified(!1);this.savingFileTime=new Date;this.savingFile=!0;this.isModified=function(){return!0};var m=this.desc;this.ui.drive.saveFile(this,e,mxUtils.bind(this,function(a,e){try{this.savingFile=!1,this.isModified=l,0!=a?(c&&(this.lastAutosaveRevision=(new Date).getTime()),this.autosaveDelay=
-Math.min(8E3,Math.max(this.saveDelay+500,DriveFile.prototype.autosaveDelay)),this.desc=a,this.fileSaved(e,m,mxUtils.bind(this,function(){this.contentChanged();null!=d&&d(a)}),b)):(this.setModified(f||this.isModified()),null!=b&&b(a))}catch(v){if(this.setModified(f||this.isModified()),null!=b)b(v);else throw v;}}),mxUtils.bind(this,function(c,d){try{this.savingFile=!1,this.isModified=l,this.setModified(f||this.isModified()),this.isConflict(c)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=
-!0,this.savingFileTime=new Date,this.sync.fileConflict(d,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();k(a,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}))):null!=b&&b()):null!=b&&b(c)}catch(v){if(this.setModified(f||this.isModified()),null!=b)b(v);else throw v;}}),g,g,a)}catch(p){if(this.savingFile=!1,null!=l&&(this.isModified=l),null!=f&&this.setModified(f||this.isModified()),null!=b)b(p);else throw p;
-}});k(e,c)}}catch(l){if(null!=b)b(l);else throw l;}};DriveFile.prototype.copyFile=function(a,c){this.isRestricted()?DrawioFile.prototype.copyFile.apply(this,arguments):this.makeCopy(mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,mxResources.get("saving")))try{this.save(!0,a,c)}catch(d){c(d)}}),c,!0)};
+DriveFile.prototype.saveFile=function(a,c,d,b,g,e){try{if(!this.isEditable())null!=d&&d();else if(!this.savingFile){var k=mxUtils.bind(this,function(a,e){var m=null,f=null;try{m=this.isModified;f=this.isModified();this.setModified(!1);this.savingFileTime=new Date;this.savingFile=!0;this.isModified=function(){return!0};var l=this.desc;this.ui.drive.saveFile(this,e,mxUtils.bind(this,function(a,e){try{this.savingFile=!1,this.isModified=m,0!=a?(c&&(this.lastAutosaveRevision=(new Date).getTime()),this.autosaveDelay=
+Math.min(8E3,Math.max(this.saveDelay+500,DriveFile.prototype.autosaveDelay)),this.desc=a,this.fileSaved(e,l,mxUtils.bind(this,function(){this.contentChanged();null!=d&&d(a)}),b)):(this.setModified(f||this.isModified()),null!=b&&b(a))}catch(v){if(this.setModified(f||this.isModified()),null!=b)b(v);else throw v;}}),mxUtils.bind(this,function(c,d){try{this.savingFile=!1,this.isModified=m,this.setModified(f||this.isModified()),this.isConflict(c)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=
+!0,this.savingFileTime=new Date,this.sync.fileConflict(d,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();k(a,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}))):null!=b&&b()):null!=b&&b(c)}catch(v){if(this.setModified(f||this.isModified()),null!=b)b(v);else throw v;}}),g,g,a)}catch(p){if(this.savingFile=!1,null!=m&&(this.isModified=m),null!=f&&this.setModified(f||this.isModified()),null!=b)b(p);else throw p;
+}});k(e,c)}}catch(n){if(null!=b)b(n);else throw n;}};DriveFile.prototype.copyFile=function(a,c){this.isRestricted()?DrawioFile.prototype.copyFile.apply(this,arguments):this.makeCopy(mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,mxResources.get("saving")))try{this.save(!0,a,c)}catch(d){c(d)}}),c,!0)};
DriveFile.prototype.makeCopy=function(a,c,d){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.saveAs(this.ui.getCopyFilename(this,d),mxUtils.bind(this,function(b){this.desc=b;this.ui.spinner.stop();this.setModified(!1);this.backupPatch=null;this.inConflictState=this.invalidChecksum=!1;this.descriptorChanged();a()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=c&&c()}))};DriveFile.prototype.saveAs=function(a,c,d){this.ui.drive.copyFile(this.getId(),a,c,d)};
DriveFile.prototype.rename=function(a,c,d){var b=this.getCurrentEtag();this.ui.drive.renameFile(this.getId(),a,mxUtils.bind(this,function(g){this.hasSameExtension(a,this.getTitle())?(this.desc=g,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(b),null!=c&&c(g)):(this.desc=g,null!=this.sync&&this.sync.descriptorChanged(b),this.save(!0,c,d))}),d)};
DriveFile.prototype.move=function(a,c,d){this.ui.drive.moveFile(this.getId(),a,mxUtils.bind(this,function(a){this.desc=a;this.descriptorChanged();null!=c&&c(a)}),d)};DriveFile.prototype.getTitle=function(){return this.desc.title};DriveFile.prototype.getHash=function(){return"G"+this.getId()};DriveFile.prototype.getId=function(){return this.desc.id};DriveFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&this.desc.editable};
@@ -8838,7 +8842,7 @@ DriveFile.prototype.getDescriptor=function(){return this.desc};DriveFile.prototy
DriveFile.prototype.setDescriptorEtag=function(a,c){a.etag=c};DriveFile.prototype.loadPatchDescriptor=function(a,c){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"?supportsTeamDrives=true&fields="+this.ui.drive.catchupFields},mxUtils.bind(this,function(c){a(c)}),c)};DriveFile.prototype.patchDescriptor=function(a,c){DrawioFile.prototype.patchDescriptor.apply(this,arguments);a.headRevisionId=c.headRevisionId;a.modifiedDate=c.modifiedDate};
DriveFile.prototype.loadDescriptor=function(a,c){this.ui.drive.loadDescriptor(this.getId(),a,c)};DriveFile.prototype.commentsSupported=function(){return!0};
DriveFile.prototype.getComments=function(a,c){function d(a,c,k){if(c.deleted)return null;k=new DriveComment(a,c.commentId||c.replyId,c.content,c.modifiedDate,c.createdDate,"resolved"==c.status,c.author.isAuthenticatedUser?b:new DrawioUser(c.author.permissionId,c.author.emailAddress,c.author.displayName,c.author.picture.url),k);for(var e=0;null!=c.replies&&e<c.replies.length;e++)k.addReplyDirect(d(a,c.replies[e],c.commentId));return k}var b=this.ui.getCurrentUser();this.ui.drive.executeRequest({url:"/files/"+
-this.getId()+"/comments"},mxUtils.bind(this,function(b){for(var c=[],g=0;g<b.items.length;g++){var l=d(this,b.items[g]);null!=l&&c.push(l)}a(c)}),c)};DriveFile.prototype.addComment=function(a,c,d){a={content:a.content};this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/comments",method:"POST",params:a},mxUtils.bind(this,function(a){c(a.commentId)}),d)};DriveFile.prototype.canReplyToReplies=function(){return!1};DriveFile.prototype.canComment=function(){return this.desc.canComment};
+this.getId()+"/comments"},mxUtils.bind(this,function(b){for(var c=[],k=0;k<b.items.length;k++){var g=d(this,b.items[k]);null!=g&&c.push(g)}a(c)}),c)};DriveFile.prototype.addComment=function(a,c,d){a={content:a.content};this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/comments",method:"POST",params:a},mxUtils.bind(this,function(a){c(a.commentId)}),d)};DriveFile.prototype.canReplyToReplies=function(){return!1};DriveFile.prototype.canComment=function(){return this.desc.canComment};
DriveFile.prototype.newComment=function(a,c){return new DriveComment(this,null,a,Date.now(),Date.now(),!1,c)};DriveLibrary=function(a,c,d){DriveFile.call(this,a,c,d)};mxUtils.extend(DriveLibrary,DriveFile);DriveLibrary.prototype.isAutosave=function(){return!0};DriveLibrary.prototype.save=function(a,c,d){this.ui.drive.saveFile(this,a,mxUtils.bind(this,function(a){this.desc=a;null!=c&&c(a)}),d)};DriveLibrary.prototype.open=function(){};DriveClient=function(a){mxEventSource.call(this);DrawioClient.call(this,a,"gDriveAuthInfo");this.ui=a;this.xmlMimeType="application/vnd.jgraph.mxfile";this.mimeType="application/vnd.jgraph.mxfile.realtime";this.ui.editor.chromeless&&!this.ui.editor.editable&&"1"!=urlParams.rt?(this.cookieName="gDriveViewerAuthInfo",this.token=this.getPersistentToken(),this.appId=window.DRAWIO_GOOGLE_VIEWER_APP_ID||"850530949725",this.clientId=window.DRAWIO_GOOGLE_VIEWER_CLIENT_ID||"850530949725.apps.googleusercontent.com",
this.scopes=["https://www.googleapis.com/auth/drive.readonly","https://www.googleapis.com/auth/userinfo.profile"],this.appIndex=0):(this.appId=window.DRAWIO_GOOGLE_APP_ID||"671128082532",this.clientId=window.DRAWIO_GOOGLE_CLIENT_ID||"671128082532-jhphbq6d0e1gnsus9mn7vf8a6fjn10mp.apps.googleusercontent.com",this.appIndex=1);this.mimeTypes=this.xmlMimeType+"application/mxe,application/mxr,application/vnd.jgraph.mxfile.realtime,application/vnd.jgraph.mxfile.rtlegacy";"1"==urlParams.photos&&this.scopes.push("https://www.googleapis.com/auth/photos.upload");
a=JSON.parse(this.token);if(null!=a&&null!=a.current){a=a.current;this.userId=a.userId;this.token=a.access_token;var c=(a.expires-Date.now())/1E3;a.expires_in=600>c?1:c;this.resetTokenRefresh(a);this.authCalled=!1}};mxUtils.extend(DriveClient,mxEventSource);mxUtils.extend(DriveClient,DrawioClient);DriveClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/google";DriveClient.prototype.GDriveBaseUrl="https://www.googleapis.com/drive/v2";
@@ -8850,92 +8854,92 @@ DriveClient.prototype.setUser=function(a){this.user=a;null==this.user?(this.user
DriveClient.prototype.getUsersList=function(){var a=[],c=JSON.parse(this.getPersistentToken(!0)),d=null;if(null!=c){null!=c.current&&(d=c.current.userId,a.push(c[d].user),a[0].isCurrent=!0);for(var b in c)"current"!=b&&b!=d&&a.push(c[b].user)}return a};DriveClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};
DriveClient.prototype.execute=function(a){var c=mxUtils.bind(this,function(c){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(b,c){this.authorize(!1,mxUtils.bind(this,function(){null!=c&&c();a()}),mxUtils.bind(this,function(a){var b=mxResources.get("cannotLogin");null!=a&&null!=a.error&&403==a.error.code&&null!=a.error.data&&0<a.error.data.length&&"domainPolicy"==a.error.data[0].reason&&(b=a.error.message);this.logout();this.ui.showError(mxResources.get("error"),b,mxResources.get("help"),
mxUtils.bind(this,function(){this.ui.openLink("https://desk.draw.io/support/solutions/articles/16000074659")}),null,mxResources.get("ok"))}),b)}))});this.authorize(!0,a,c)};
-DriveClient.prototype.executeRequest=function(a,c,d){try{var b=!0,g=null,e=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var k=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=a;null!=g&&window.clearTimeout(g);g=window.setTimeout(mxUtils.bind(this,function(){b=!1;null!=d&&d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:k})}),this.ui.timeout);var l=null,n=!1;"string"===typeof a.params?l=a.params:null!=a.params&&(l=JSON.stringify(a.params),
-n=!0);var q=a.fullUrl||this.GDriveBaseUrl+a.url;n&&(q+=(0<q.indexOf("?")?"&":"?")+"alt=json");var f=new mxXmlRequest(q,l,a.method||"GET");f.setRequestHeaders=mxUtils.bind(this,function(b,c){if(null!=a.headers)for(var d in a.headers)b.setRequestHeader(d,a.headers[d]);else null!=a.contentType?b.setRequestHeader("Content-Type",a.contentType):n&&b.setRequestHeader("Content-Type","application/json");b.setRequestHeader("Authorization","Bearer "+this.token)});f.send(mxUtils.bind(this,function(f){try{if(window.clearTimeout(g),
-b){var l;try{l=JSON.parse(f.getText())}catch(t){l=null}if(200<=f.getStatus()&&299>=f.getStatus())null!=c&&c(l);else{var m=null!=l&&null!=l.error?null!=l.error.data?l.error.data:l.error.errors:null,n=null!=m&&0<m.length?m[0].reason:null;null==d||null==l||null==l.error||-1!=l.error.code&&(403!=l.error.code||"domainPolicy"!=n&&"The requested mime type change is forbidden."!=l.error.message)?null!=l&&null!=l.error&&(401==l.error.code||403==l.error.code&&"rateLimitExceeded"!=n)?403==l.error.code&&this.retryAuth||
-401==l.error.code&&this.retryAuth&&"authError"==n?(null!=d&&d(l),this.retryAuth=!1):(this.retryAuth=!0,this.execute(k)):null!=l&&null!=l.error&&412!=l.error.code&&404!=l.error.code&&400!=l.error.code&&this.currentRequest==a&&e<this.maxRetries?(e++,this.requestThread=window.setTimeout(k,Math.round(Math.pow(2,e)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=d&&d(l):d(l)}}}catch(t){if(null!=d)d(t);else throw t;}}))}catch(m){if(null!=d)d(m);else throw m;}});null!=this.token&&this.authCalled?k():this.execute(k)}catch(l){if(null!=
-d)d(l);else throw l;}};DriveClient.prototype.createAuthWin=function(a){return window.open(a?a:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())};
+DriveClient.prototype.executeRequest=function(a,c,d){try{var b=!0,g=null,e=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var k=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=a;null!=g&&window.clearTimeout(g);g=window.setTimeout(mxUtils.bind(this,function(){b=!1;null!=d&&d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:k})}),this.ui.timeout);var n=null,m=!1;"string"===typeof a.params?n=a.params:null!=a.params&&(n=JSON.stringify(a.params),
+m=!0);var t=a.fullUrl||this.GDriveBaseUrl+a.url;m&&(t+=(0<t.indexOf("?")?"&":"?")+"alt=json");var f=new mxXmlRequest(t,n,a.method||"GET");f.setRequestHeaders=mxUtils.bind(this,function(b,c){if(null!=a.headers)for(var d in a.headers)b.setRequestHeader(d,a.headers[d]);else null!=a.contentType?b.setRequestHeader("Content-Type",a.contentType):m&&b.setRequestHeader("Content-Type","application/json");b.setRequestHeader("Authorization","Bearer "+this.token)});f.send(mxUtils.bind(this,function(f){try{if(window.clearTimeout(g),
+b){var m;try{m=JSON.parse(f.getText())}catch(q){m=null}if(200<=f.getStatus()&&299>=f.getStatus())null!=c&&c(m);else{var l=null!=m&&null!=m.error?null!=m.error.data?m.error.data:m.error.errors:null,n=null!=l&&0<l.length?l[0].reason:null;null==d||null==m||null==m.error||-1!=m.error.code&&(403!=m.error.code||"domainPolicy"!=n&&"The requested mime type change is forbidden."!=m.error.message)?null!=m&&null!=m.error&&(401==m.error.code||403==m.error.code&&"rateLimitExceeded"!=n)?403==m.error.code&&this.retryAuth||
+401==m.error.code&&this.retryAuth&&"authError"==n?(null!=d&&d(m),this.retryAuth=!1):(this.retryAuth=!0,this.execute(k)):null!=m&&null!=m.error&&412!=m.error.code&&404!=m.error.code&&400!=m.error.code&&this.currentRequest==a&&e<this.maxRetries?(e++,this.requestThread=window.setTimeout(k,Math.round(Math.pow(2,e)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=d&&d(m):d(m)}}}catch(q){if(null!=d)d(q);else throw q;}}))}catch(l){if(null!=d)d(l);else throw l;}});null!=this.token&&this.authCalled?k():this.execute(k)}catch(n){if(null!=
+d)d(n);else throw n;}};DriveClient.prototype.createAuthWin=function(a){return window.open(a?a:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())};
DriveClient.prototype.authorize=function(a,c,d,b,g){var e=mxUtils.bind(this,function(a,b,e){this.token=a.access_token;a.expires=Date.now()+1E3*parseInt(a.expires_in);a.remember=b;this.resetTokenRefresh(a);this.authCalled=!0;if(e||null==this.user){var f=JSON.stringify(a);this.updateUser(mxUtils.bind(this,function(){var a=JSON.parse(f);this.setPersistentToken(a,!b);null!=c&&c()}),d)}else null!=c&&(this.setPersistentToken(a,!b),c())});try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(this.userId=
this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));var k=JSON.parse(this.getPersistentToken(!0));null!=k&&(null==this.userId?null!=k.current?(this.userId=k.current.userId,k=k[this.userId]):k=null:k=k[this.userId]);if(!a||null!=k&&null!=k.refresh_token)if(a)(new mxXmlRequest(this.redirectUri+"?state=appIndex%3D"+this.appIndex+"&refresh_token="+k.refresh_token,null,"GET")).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?(a=JSON.parse(a.getText()),
-a.refresh_token=k.refresh_token,e(a,!0)):(0!=a.getStatus()&&this.logout(),null!=d&&d(a))}),d);else{var l="https://accounts.google.com/o/oauth2/v2/auth?client_id="+this.clientId+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&include_granted_scopes=true"+(b?"&access_type=offline&prompt=consent%20select_account":"")+"&scope="+encodeURIComponent(this.scopes.join(" "))+"&state=appIndex%3D"+this.appIndex;null==g?g=this.createAuthWin(l):g.location=l;null!=g&&(window.onGoogleDriveCallback=
-mxUtils.bind(this,function(a,c){window.onGoogleDriveCallback=null;try{null==a?null!=d&&d({message:mxResources.get("accessDenied")}):e(a,b,!0)}catch(f){null!=d&&d(f)}finally{null!=c&&c.close()}}),g.focus())}else null!=d&&d()}catch(n){if(null!=d)d(n);else throw n;}};
+a.refresh_token=k.refresh_token,e(a,!0)):(0!=a.getStatus()&&this.logout(),null!=d&&d(a))}),d);else{var n="https://accounts.google.com/o/oauth2/v2/auth?client_id="+this.clientId+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&include_granted_scopes=true"+(b?"&access_type=offline&prompt=consent%20select_account":"")+"&scope="+encodeURIComponent(this.scopes.join(" "))+"&state=appIndex%3D"+this.appIndex;null==g?g=this.createAuthWin(n):g.location=n;null!=g&&(window.onGoogleDriveCallback=
+mxUtils.bind(this,function(a,c){window.onGoogleDriveCallback=null;try{null==a?null!=d&&d({message:mxResources.get("accessDenied")}):e(a,b,!0)}catch(f){null!=d&&d(f)}finally{null!=c&&c.close()}}),g.focus())}else null!=d&&d()}catch(m){if(null!=d)d(m);else throw m;}};
DriveClient.prototype.resetTokenRefresh=function(a){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);null!=a&&null==a.error&&0<a.expires_in&&(this.tokenRefreshInterval=1E3*parseInt(a.expires_in),this.lastTokenRefresh=(new Date).getTime(),this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authorize(!0,mxUtils.bind(this,function(){}),mxUtils.bind(this,function(){}))}),900*a.expires_in))};
DriveClient.prototype.checkToken=function(a){var c=0<this.lastTokenRefresh;(new Date).getTime()-this.lastTokenRefresh>this.tokenRefreshInterval||null==this.tokenRefreshThread?this.execute(mxUtils.bind(this,function(){a();c&&this.fireEvent(new mxEventObject("disconnected"))})):a()};
-DriveClient.prototype.updateUser=function(a,c){try{this.ui.loadUrl("https://www.googleapis.com/oauth2/v2/userinfo?alt=json&access_token="+this.token,mxUtils.bind(this,function(d){var b=JSON.parse(d);this.executeRequest({url:"/about"},mxUtils.bind(this,function(c){var d=mxResources.get("notAvailable"),g=d,l=null;null!=c&&null!=c.user&&(d=c.user.emailAddress,g=c.user.displayName,l=null!=c.user.picture?c.user.picture.url:null);this.setUser(new DrawioUser(b.id,d,g,l,b.locale));this.userId=b.id;null!=
+DriveClient.prototype.updateUser=function(a,c){try{this.ui.loadUrl("https://www.googleapis.com/oauth2/v2/userinfo?alt=json&access_token="+this.token,mxUtils.bind(this,function(d){var b=JSON.parse(d);this.executeRequest({url:"/about"},mxUtils.bind(this,function(c){var d=mxResources.get("notAvailable"),k=d,g=null;null!=c&&null!=c.user&&(d=c.user.emailAddress,k=c.user.displayName,g=null!=c.user.picture?c.user.picture.url:null);this.setUser(new DrawioUser(b.id,d,k,g,b.locale));this.userId=b.id;null!=
a&&a()}),c)}),c)}catch(d){if(null!=c)c(d);else throw d;}};DriveClient.prototype.copyFile=function(a,c,d,b){null!=a&&null!=c&&this.executeRequest({url:"/files/"+a+"/copy?fields="+encodeURIComponent(this.allFields)+"&supportsTeamDrives=true",method:"POST",params:{title:c,properties:[{key:"channel",value:Editor.guid()}]}},d,b)};DriveClient.prototype.renameFile=function(a,c,d,b){null!=a&&null!=c&&this.executeRequest(this.createDriveRequest(a,{title:c}),d,b)};
DriveClient.prototype.moveFile=function(a,c,d,b){null!=a&&null!=c&&this.executeRequest(this.createDriveRequest(a,{parents:[{kind:"drive#fileLink",id:c}]}),d,b)};DriveClient.prototype.createDriveRequest=function(a,c){return{url:"/files/"+a+"?uploadType=multipart&supportsTeamDrives=true",method:"PUT",contentType:"application/json; charset=UTF-8",params:c}};DriveClient.prototype.getLibrary=function(a,c,d){return this.getFile(a,c,d,!0,!0)};
DriveClient.prototype.loadDescriptor=function(a,c,d,b){this.executeRequest({url:"/files/"+a+"?supportsTeamDrives=true&fields="+(null!=b?b:this.allFields)},c,d)};DriveClient.prototype.getCustomProperty=function(a,c){var d=a.properties,b=null;if(null!=d)for(var g=0;g<d.length;g++)if(d[g].key==c){b=d[g].value;break}return b};
DriveClient.prototype.getFile=function(a,c,d,b,g){b=null!=b?b:!1;g=null!=g?g:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+a+"/revisions/"+urlParams.rev+"?supportsTeamDrives=true"},mxUtils.bind(this,function(b){b.title=b.originalFilename;b.headRevisionId=b.id;b.id=a;this.getXmlFile(b,c,d)}),d):this.loadDescriptor(a,mxUtils.bind(this,function(a){try{if(null!=this.user){var e=/\.png$/i.test(a.title);/\.v(dx|sdx?)$/i.test(a.title)||/\.gliffy$/i.test(a.title)||!this.ui.useCanvasForExport&&
-e?this.ui.convertFile(a.downloadUrl+"&access_token="+this.token,a.title,a.mimeType,this.extension,c,d):b||g||a.mimeType==this.libraryMimeType||a.mimeType==this.xmlMimeType?this.getXmlFile(a,c,d,!0,g):this.getXmlFile(a,c,d)}else d({message:mxResources.get("loggedOut")})}catch(l){if(null!=d)d(l);else throw l;}}),d)};DriveClient.prototype.isGoogleRealtimeMimeType=function(a){return null!=a&&"application/vnd.jgraph.mxfile."==a.substring(0,30)};
-DriveClient.prototype.getXmlFile=function(a,c,d,b,g){try{var e=a.downloadUrl+"&access_token="+this.token;this.ui.loadUrl(e,mxUtils.bind(this,function(b){try{if(null==b)d({message:mxResources.get("invalidOrMissingFile")});else if(a.mimeType==this.libraryMimeType||g)a.mimeType!=this.libraryMimeType||g?c(new DriveLibrary(this.ui,b,a)):d({message:mxResources.get("notADiagramFile")});else{var k=!1;if(/\.png$/i.test(a.title)){var n=b.lastIndexOf(",");if(0<n){var q=this.ui.extractGraphModelFromPng(b.substring(n+
-1));if(null!=q&&0<q.length)b=q;else try{var q=b.substring(n+1),f=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(q):atob(q),m=this.ui.editor.extractGraphModel(mxUtils.parseXml(f).documentElement,!0);null==m||0<m.getElementsByTagName("parsererror").length?k=!0:b=f}catch(p){k=!0}}}else"data:image/png;base64,PG14ZmlsZS"==b.substring(0,32)&&(f=b.substring(22),b=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(b,
+e?this.ui.convertFile(a.downloadUrl+"&access_token="+this.token,a.title,a.mimeType,this.extension,c,d):b||g||a.mimeType==this.libraryMimeType||a.mimeType==this.xmlMimeType?this.getXmlFile(a,c,d,!0,g):this.getXmlFile(a,c,d)}else d({message:mxResources.get("loggedOut")})}catch(n){if(null!=d)d(n);else throw n;}}),d)};DriveClient.prototype.isGoogleRealtimeMimeType=function(a){return null!=a&&"application/vnd.jgraph.mxfile."==a.substring(0,30)};
+DriveClient.prototype.getXmlFile=function(a,c,d,b,g){try{var e=a.downloadUrl+"&access_token="+this.token;this.ui.loadUrl(e,mxUtils.bind(this,function(b){try{if(null==b)d({message:mxResources.get("invalidOrMissingFile")});else if(a.mimeType==this.libraryMimeType||g)a.mimeType!=this.libraryMimeType||g?c(new DriveLibrary(this.ui,b,a)):d({message:mxResources.get("notADiagramFile")});else{var k=!1;if(/\.png$/i.test(a.title)){var m=b.lastIndexOf(",");if(0<m){var t=this.ui.extractGraphModelFromPng(b.substring(m+
+1));if(null!=t&&0<t.length)b=t;else try{var t=b.substring(m+1),f=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(t):atob(t),l=this.ui.editor.extractGraphModel(mxUtils.parseXml(f).documentElement,!0);null==l||0<l.getElementsByTagName("parsererror").length?k=!0:b=f}catch(p){k=!0}}}else"data:image/png;base64,PG14ZmlsZS"==b.substring(0,32)&&(f=b.substring(22),b=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(b,
e)?this.ui.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){try{4==b.readyState&&(200<=b.status&&299>=b.status?c(new LocalFile(this.ui,b.responseText,a.title+this.extension,!0)):null!=d&&d({message:mxResources.get("errorLoadingFile")}))}catch(u){if(null!=d)d(u);else throw u;}}),a.title):c(k?new LocalFile(this.ui,b,a.title,!0):new DriveFile(this.ui,b,a))}}catch(p){if(null!=d)d(p);else throw p;}}),d,null!=a.mimeType&&"image/"==a.mimeType.substring(0,6)&&"image/svg"!=
a.mimeType.substring(0,9)||/\.png$/i.test(a.title)||/\.jpe?g$/i.test(a.title))}catch(k){if(null!=d)d(k);else throw k;}};
-DriveClient.prototype.saveFile=function(a,c,d,b,g,e,k,l){try{a.saveLevel=1;var n=mxUtils.bind(this,function(c){if(null!=b)b(c);else throw c;try{if(!a.isConflict(c)){var d="sl_"+a.saveLevel+"-error_"+(a.getErrorMessage(c)||"unknown");null!=c&&null!=c.error&&null!=c.error.code&&(d+="-code_"+c.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+a.getHash()+"-rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+
-(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),action:d,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}}catch(D){}}),q=mxUtils.bind(this,function(b){n(b);try{EditorUi.logError(b.message,null,null,b),EditorUi.sendReport("Critical error in DriveClient.saveFile "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+a.desc.id+"."+a.desc.headRevisionId+
-"\nUser="+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")+"\nSaveLevel="+a.saveLevel+"\nMessage="+b.message+"\n\nStack:\n"+b.stack)}catch(y){}});if(a.isEditable()&&null!=a.desc){var f=(new Date).getTime(),m=a.desc.etag,p=a.desc.modifiedDate,u=a.desc.headRevisionId,v=this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle());e=null!=e?e:!1;var t=mxUtils.bind(this,function(b,g,t){try{a.saveLevel=3;var x=null,z=!1,B={mimeType:a.desc.mimeType,title:a.getTitle()};
-this.isGoogleRealtimeMimeType(a.desc.mimeType)?(B.mimeType=this.xmlMimeType,x=a.desc,z=c=!0):"application/octet-stream"==B.mimeType&&(B.mimeType=this.xmlMimeType);a.constructor==DriveFile&&(null==l&&(l=[]),null==a.getChannelId()&&l.push({key:"channel",value:Editor.guid(32)}),null==a.getChannelKey()&&l.push({key:"key",value:Editor.guid(32)}),l.push({key:"secret",value:Editor.guid(32)}));t||(null!=b||e||(b=this.placeholderThumbnail,g=this.placeholderMimeType),null!=b&&null!=g&&(B.thumbnail={image:b,
-mimeType:g}));var C=a.getData(),A=mxUtils.bind(this,function(b){try{if(a.saveDelay=(new Date).getTime()-f,null==b)n({message:mxResources.get("errorSavingFile")+": Empty response"});else{var e=(new Date(b.modifiedDate)).getTime()-(new Date(p)).getTime();if(0>=e||m==b.etag||c&&u==b.headRevisionId){var g=[];0>=e&&g.push("invalid modified time");m==b.etag&&g.push("stale etag");c&&u==b.headRevisionId&&g.push("stale revision");var k=g.join(", ");n({message:mxResources.get("errorSavingFile")+": "+k},b);
-try{EditorUi.logError("Critical: Error saving to Google Drive "+a.desc.id,null,"from-"+u+"."+p+"-"+this.ui.hashValue(m)+"-to-"+b.headRevisionId+"."+b.modifiedDate+"-"+this.ui.hashValue(b.etag)+(0<k.length?"-errors-"+k:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync"))}catch(K){}}else if(a.saveLevel=null,d(b,C),null!=x){this.executeRequest({url:"/files/"+x.id+"/revisions/"+x.headRevisionId+"?supportsTeamDrives=true"},mxUtils.bind(this,mxUtils.bind(this,
-function(a){a.pinned=!0;this.executeRequest({url:"/files/"+x.id+"/revisions/"+x.headRevisionId,method:"PUT",params:a})})));try{EditorUi.logEvent({category:a.convertedFrom+"-CONVERT-FILE-"+a.getHash(),action:"from_"+x.id+"."+x.headRevisionId+"-to_"+a.desc.id+"."+a.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=a.sync?"-client_"+a.sync.clientId:"nosync")})}catch(K){}}}}catch(K){q(K)}}),y=mxUtils.bind(this,function(d,e){a.saveLevel=4;try{null!=l&&(B.properties=l);var f=
-k||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),g=0,m=mxUtils.bind(this,function(b){a.saveLevel=5;try{var k=a.desc.mimeType!=this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;n({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),3*this.ui.timeout);this.executeRequest(this.createUploadRequest(a.getId(),B,d,c||b||k,e,b?null:f,z),mxUtils.bind(this,
-function(a){window.clearTimeout(m);l&&A(a)}),mxUtils.bind(this,function(b){window.clearTimeout(m);if(l){a.saveLevel=6;try{a.isConflict(b)?this.executeRequest({url:"/files/"+a.getId()+"?supportsTeamDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(c){a.saveLevel=7;try{if(null!=c&&c.etag==f)if(g<this.maxRetries)g++,window.setTimeout(p,2*g*this.coolOff*(1+.1*(Math.random()-.5)));else{p(!0);try{EditorUi.logError("Warning: Stale Etag Overwrite "+a.getHash(),null,a.desc.id+"."+a.desc.headRevisionId,
-(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync"))}catch(ca){}}else"1"==urlParams.test&&c.headRevisionId==u&&EditorUi.debug("DriveClient: Remote Etag Changed","local",f,"remote",c.etag,"rev",a.desc.headRevisionId,"response",[c],"file",[a]),n(b,c)}catch(ca){q(ca)}}),mxUtils.bind(this,function(){n(b)})):n(b)}catch(ga){q(ga)}}}))}catch(X){q(X)}}),p=mxUtils.bind(this,function(b){a.saveLevel=9;if(b)m(b);else{var c=!0,d=window.setTimeout(mxUtils.bind(this,
-function(){c=!1;n({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),3*this.ui.timeout);this.executeRequest({url:"/files/"+a.getId()+"?supportsTeamDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(e){window.clearTimeout(d);if(c){a.saveLevel=13;try{null!=e&&e.headRevisionId==u?("1"==urlParams.test&&f!=e.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",f,"to",e.etag,"rev",a.desc.headRevisionId,"response",[e],"file",[a]),f=e.etag,m(b)):n({error:{code:412}},
-e)}catch(X){q(X)}}}),mxUtils.bind(this,function(a){window.clearTimeout(d);c&&n(a)}))}});if(v&&null==b){a.saveLevel=8;var t=new Image;t.onload=mxUtils.bind(this,function(){try{var a=this.thumbnailWidth/t.width,b=document.createElement("canvas");b.width=this.thumbnailWidth;b.height=Math.floor(t.height*a);b.getContext("2d").drawImage(t,0,0,b.width,b.height);var c=b.toDataURL(),c=c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");B.thumbnail={image:c,mimeType:"image/png"};p(!1)}catch(V){p(!1)}});
-t.src="data:image/png;base64,"+d}else p(!1)}catch(Y){q(Y)}});v?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){y(a,!0)}),n,this.ui.getCurrentFile()!=a?C:null):y(C,!1)}catch(F){q(F)}});try{if(a.saveLevel=2,e||v||a.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=a.desc.mimeType&&"application/vnd.jgraph.mxfile"!=a.desc.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(b){try{var c=a.thumbTime=null;try{null!=b&&(c=b.toDataURL("image/png")),
-null!=c&&(c=c.length>this.maxThumbnailSize?null:c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(D){c=null}t(c,"image/png")}catch(D){q(D)}})))a.thumbTime=null,t(null,null,a.constructor!=DriveLibrary)}catch(x){q(x)}}else this.ui.editor.graph.reset(),n({message:mxResources.get("readOnly")})}catch(x){q(x)}};
-DriveClient.prototype.insertFile=function(a,c,d,b,g,e,k){e=null!=e?e:this.xmlMimeType;a={mimeType:e,title:a};null!=d&&(a.parents=[{kind:"drive#fileLink",id:d}]);this.executeRequest(this.createUploadRequest(null,a,c,!1,k),mxUtils.bind(this,function(a){e==this.libraryMimeType?b(new DriveLibrary(this.ui,c,a)):0==a?null!=g&&g({message:mxResources.get("errorSavingFile")}):b(new DriveFile(this.ui,c,a))}),g)};
-DriveClient.prototype.createUploadRequest=function(a,c,d,b,g,e,k){g=null!=g?g:!1;var l={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=e&&(l["If-Match"]=e);a={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=a?"/"+a:"")+"?uploadType=multipart&supportsTeamDrives=true&fields="+this.allFields,method:null!=a?"PUT":"POST",headers:l,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"+
+DriveClient.prototype.saveFile=function(a,c,d,b,g,e,k,n){try{a.saveLevel=1;var m=mxUtils.bind(this,function(c){if(null!=b)b(c);else throw c;try{if(!a.isConflict(c)){var d="sl_"+a.saveLevel+"-error_"+(a.getErrorMessage(c)||"unknown");null!=c&&null!=c.error&&null!=c.error.code&&(d+="-code_"+c.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+a.getHash()+"-rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+
+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),action:d,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}}catch(D){}}),t=mxUtils.bind(this,function(b){m(b);try{EditorUi.logError(b.message,null,null,b),EditorUi.sendReport("Critical error in DriveClient.saveFile "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+a.desc.id+"."+a.desc.headRevisionId+
+"\nUser="+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")+"\nSaveLevel="+a.saveLevel+"\nMessage="+b.message+"\n\nStack:\n"+b.stack)}catch(y){}});if(a.isEditable()&&null!=a.desc){var f=(new Date).getTime(),l=a.desc.etag,p=a.desc.modifiedDate,u=a.desc.headRevisionId,v=this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle());e=null!=e?e:!1;var q=mxUtils.bind(this,function(b,g,q){try{a.saveLevel=3;var x=null,z=!1,B={mimeType:a.desc.mimeType,title:a.getTitle()};
+this.isGoogleRealtimeMimeType(a.desc.mimeType)?(B.mimeType=this.xmlMimeType,x=a.desc,z=c=!0):"application/octet-stream"==B.mimeType&&(B.mimeType=this.xmlMimeType);a.constructor==DriveFile&&(null==n&&(n=[]),null==a.getChannelId()&&n.push({key:"channel",value:Editor.guid(32)}),null==a.getChannelKey()&&n.push({key:"key",value:Editor.guid(32)}),n.push({key:"secret",value:Editor.guid(32)}));q||(null!=b||e||(b=this.placeholderThumbnail,g=this.placeholderMimeType),null!=b&&null!=g&&(B.thumbnail={image:b,
+mimeType:g}));var C=a.getData(),A=mxUtils.bind(this,function(b){try{if(a.saveDelay=(new Date).getTime()-f,null==b)m({message:mxResources.get("errorSavingFile")+": Empty response"});else{var e=(new Date(b.modifiedDate)).getTime()-(new Date(p)).getTime();if(0>=e||l==b.etag||c&&u==b.headRevisionId){var g=[];0>=e&&g.push("invalid modified time");l==b.etag&&g.push("stale etag");c&&u==b.headRevisionId&&g.push("stale revision");var k=g.join(", ");m({message:mxResources.get("errorSavingFile")+": "+k},b);
+try{EditorUi.logError("Critical: Error saving to Google Drive "+a.desc.id,null,"from-"+u+"."+p+"-"+this.ui.hashValue(l)+"-to-"+b.headRevisionId+"."+b.modifiedDate+"-"+this.ui.hashValue(b.etag)+(0<k.length?"-errors-"+k:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync"))}catch(K){}}else if(a.saveLevel=null,d(b,C),null!=x){this.executeRequest({url:"/files/"+x.id+"/revisions/"+x.headRevisionId+"?supportsTeamDrives=true"},mxUtils.bind(this,mxUtils.bind(this,
+function(a){a.pinned=!0;this.executeRequest({url:"/files/"+x.id+"/revisions/"+x.headRevisionId,method:"PUT",params:a})})));try{EditorUi.logEvent({category:a.convertedFrom+"-CONVERT-FILE-"+a.getHash(),action:"from_"+x.id+"."+x.headRevisionId+"-to_"+a.desc.id+"."+a.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=a.sync?"-client_"+a.sync.clientId:"nosync")})}catch(K){}}}}catch(K){t(K)}}),y=mxUtils.bind(this,function(d,f){a.saveLevel=4;try{null!=n&&(B.properties=n);var e=
+k||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),g=0,l=mxUtils.bind(this,function(b){a.saveLevel=5;try{var k=a.desc.mimeType!=this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;m({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),3*this.ui.timeout);this.executeRequest(this.createUploadRequest(a.getId(),B,d,c||b||k,f,b?null:e,z),mxUtils.bind(this,
+function(a){window.clearTimeout(n);l&&A(a)}),mxUtils.bind(this,function(b){window.clearTimeout(n);if(l){a.saveLevel=6;try{a.isConflict(b)?this.executeRequest({url:"/files/"+a.getId()+"?supportsTeamDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(c){a.saveLevel=7;try{if(null!=c&&c.etag==e)if(g<this.maxRetries)g++,window.setTimeout(p,2*g*this.coolOff*(1+.1*(Math.random()-.5)));else{p(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+a.getHash(),action:"rev_"+a.desc.headRevisionId+
+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}catch(ca){}}else"1"==urlParams.test&&c.headRevisionId==u&&EditorUi.debug("DriveClient: Remote Etag Changed","local",e,"remote",c.etag,"rev",
+a.desc.headRevisionId,"response",[c],"file",[a]),m(b,c)}catch(ca){t(ca)}}),mxUtils.bind(this,function(){m(b)})):m(b)}catch(ga){t(ga)}}}))}catch(X){t(X)}}),p=mxUtils.bind(this,function(b){a.saveLevel=9;if(b)l(b);else{var c=!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;m({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),3*this.ui.timeout);this.executeRequest({url:"/files/"+a.getId()+"?supportsTeamDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(f){window.clearTimeout(d);
+if(c){a.saveLevel=13;try{null!=f&&f.headRevisionId==u?("1"==urlParams.test&&e!=f.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",e,"to",f.etag,"rev",a.desc.headRevisionId,"response",[f],"file",[a]),e=f.etag,l(b)):m({error:{code:412}},f)}catch(X){t(X)}}}),mxUtils.bind(this,function(a){window.clearTimeout(d);c&&m(a)}))}});if(v&&null==b){a.saveLevel=8;var q=new Image;q.onload=mxUtils.bind(this,function(){try{var a=this.thumbnailWidth/q.width,b=document.createElement("canvas");b.width=
+this.thumbnailWidth;b.height=Math.floor(q.height*a);b.getContext("2d").drawImage(q,0,0,b.width,b.height);var c=b.toDataURL(),c=c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");B.thumbnail={image:c,mimeType:"image/png"};p(!1)}catch(V){p(!1)}});q.src="data:image/png;base64,"+d}else p(!1)}catch(Y){t(Y)}});v?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){y(a,!0)}),m,this.ui.getCurrentFile()!=a?C:null):y(C,!1)}catch(F){t(F)}});try{if(a.saveLevel=2,e||v||a.constructor==DriveLibrary||
+!this.enableThumbnails||"0"==urlParams.thumb||null!=a.desc.mimeType&&"application/vnd.jgraph.mxfile"!=a.desc.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(b){try{var c=a.thumbTime=null;try{null!=b&&(c=b.toDataURL("image/png")),null!=c&&(c=c.length>this.maxThumbnailSize?null:c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(D){c=null}q(c,"image/png")}catch(D){t(D)}})))a.thumbTime=null,q(null,null,a.constructor!=DriveLibrary)}catch(x){t(x)}}else this.ui.editor.graph.reset(),
+m({message:mxResources.get("readOnly")})}catch(x){t(x)}};DriveClient.prototype.insertFile=function(a,c,d,b,g,e,k){e=null!=e?e:this.xmlMimeType;a={mimeType:e,title:a};null!=d&&(a.parents=[{kind:"drive#fileLink",id:d}]);this.executeRequest(this.createUploadRequest(null,a,c,!1,k),mxUtils.bind(this,function(a){e==this.libraryMimeType?b(new DriveLibrary(this.ui,c,a)):0==a?null!=g&&g({message:mxResources.get("errorSavingFile")}):b(new DriveFile(this.ui,c,a))}),g)};
+DriveClient.prototype.createUploadRequest=function(a,c,d,b,g,e,k){g=null!=g?g:!1;var n={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=e&&(n["If-Match"]=e);a={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=a?"/"+a:"")+"?uploadType=multipart&supportsTeamDrives=true&fields="+this.allFields,method:null!=a?"PUT":"POST",headers:n,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+JSON.stringify(c)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+
(null!=d?g?d:Base64.encode(d):"")+"\r\n---------314159265358979323846--"};b||(a.url+="&newRevision=false");k&&(a.url+="&pinned=true");return a};
DriveClient.prototype.pickFile=function(a,c){this.filePickerCallback=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("G"+a)});this.filePicked=mxUtils.bind(this,function(a){a.action==google.picker.Action.PICKED&&this.filePickerCallback(a.docs[0].id)});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var a=c?"genericPicker":"filePicker",b=mxUtils.bind(this,function(c){"picker modal-dialog-bg picker-dialog-bg"==
-mxEvent.getSource(c).className&&(mxEvent.removeListener(document,"click",b),this[a].setVisible(!1))});if(null==this[a]||this[a+"Token"]!=this.token){this[a+"Token"]=this.token;var g=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),e=(new google.picker.DocsView).setIncludeFolders(!0),k=(new google.picker.DocsView).setEnableTeamDrives(!0).setIncludeFolders(!0),l=(new google.picker.DocsUploadView).setIncludeFolders(!0);c?(g.setMimeTypes("*/*"),e.setMimeTypes("*/*"),
-k.setMimeTypes("*/*")):(g.setMimeTypes(this.mimeTypes),e.setMimeTypes(this.mimeTypes),k.setMimeTypes(this.mimeTypes));this[a]=(new google.picker.PickerBuilder).setOAuthToken(this[a+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(g).addView(e).addView(k).addView(google.picker.ViewId.RECENTLY_PICKED).addView(l).setCallback(mxUtils.bind(this,function(a){a.action!=google.picker.Action.PICKED&&a.action!=google.picker.Action.CANCEL||
-mxEvent.removeListener(document,"click",b);a.action==google.picker.Action.PICKED&&this.filePicked(a)})).build()}mxEvent.addListener(document,"click",b);this[a].setVisible(!0)}catch(n){this.ui.spinner.stop(),this.ui.handleError(n)}}))};
+mxEvent.getSource(c).className&&(mxEvent.removeListener(document,"click",b),this[a].setVisible(!1))});if(null==this[a]||this[a+"Token"]!=this.token){this[a+"Token"]=this.token;var g=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),e=(new google.picker.DocsView).setIncludeFolders(!0),k=(new google.picker.DocsView).setEnableTeamDrives(!0).setIncludeFolders(!0),n=(new google.picker.DocsUploadView).setIncludeFolders(!0);c?(g.setMimeTypes("*/*"),e.setMimeTypes("*/*"),
+k.setMimeTypes("*/*")):(g.setMimeTypes(this.mimeTypes),e.setMimeTypes(this.mimeTypes),k.setMimeTypes(this.mimeTypes));this[a]=(new google.picker.PickerBuilder).setOAuthToken(this[a+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(g).addView(e).addView(k).addView(google.picker.ViewId.RECENTLY_PICKED).addView(n).setCallback(mxUtils.bind(this,function(a){a.action!=google.picker.Action.PICKED&&a.action!=google.picker.Action.CANCEL||
+mxEvent.removeListener(document,"click",b);a.action==google.picker.Action.PICKED&&this.filePicked(a)})).build()}mxEvent.addListener(document,"click",b);this[a].setVisible(!0)}catch(m){this.ui.spinner.stop(),this.ui.handleError(m)}}))};
DriveClient.prototype.pickFolder=function(a,c){this.folderPickerCallback=a;var d=mxUtils.bind(this,function(){try{this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var a=mxUtils.bind(this,function(b){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(b).className&&(mxEvent.removeListener(document,"click",a),this.folderPicker.setVisible(!1))});if(null==this.folderPicker||this.folderPickerToken!=this.token){this.folderPickerToken=
this.token;var c=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),d=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),k=(new google.picker.DocsView).setIncludeFolders(!0).setEnableTeamDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");this.folderPicker=(new google.picker.PickerBuilder).setSelectableMimeTypes("application/vnd.google-apps.folder").setOAuthToken(this.folderPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(c).addView(d).addView(k).addView(google.picker.ViewId.RECENTLY_PICKED).setTitle(mxResources.get("pickFolder")).setCallback(mxUtils.bind(this,
-function(b){b.action!=google.picker.Action.PICKED&&b.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",a);this.folderPickerCallback(b)})).build()}mxEvent.addListener(document,"click",a);this.folderPicker.setVisible(!0)}catch(l){this.ui.spinner.stop(),this.ui.handleError(l)}}))}catch(b){this.ui.handleError(b)}});c?d():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){this.folderPickerCallback({action:google.picker.Action.PICKED,docs:[{type:"folder",
+function(b){b.action!=google.picker.Action.PICKED&&b.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",a);this.folderPickerCallback(b)})).build()}mxEvent.addListener(document,"click",a);this.folderPicker.setVisible(!0)}catch(n){this.ui.spinner.stop(),this.ui.handleError(n)}}))}catch(b){this.ui.handleError(b)}});c?d():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){this.folderPickerCallback({action:google.picker.Action.PICKED,docs:[{type:"folder",
id:"root"}]})}),mxUtils.bind(this,function(){d()}),mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0)};
DriveClient.prototype.pickLibrary=function(a){this.filePickerCallback=a;this.filePicked=mxUtils.bind(this,function(a){a.action==google.picker.Action.PICKED?this.filePickerCallback(a.docs[0].id):a.action==google.picker.Action.CANCEL&&null==this.ui.getCurrentFile()&&this.ui.showSplash()});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var a=mxUtils.bind(this,function(b){"picker modal-dialog-bg picker-dialog-bg"==
mxEvent.getSource(b).className&&(mxEvent.removeListener(document,"click",a),this.libraryPicker.setVisible(!1))});if(null==this.libraryPicker||this.libraryPickerToken!=this.token){this.libraryPickerToken=this.token;var d=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),b=(new google.picker.DocsView).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),
g=(new google.picker.DocsView).setEnableTeamDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),e=(new google.picker.DocsUploadView).setIncludeFolders(!0);this.libraryPicker=(new google.picker.PickerBuilder).setOAuthToken(this.libraryPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(d).addView(b).addView(g).addView(google.picker.ViewId.RECENTLY_PICKED).addView(e).setCallback(mxUtils.bind(this,
function(b){b.action!=google.picker.Action.PICKED&&b.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",a);b.action==google.picker.Action.PICKED&&this.filePicked(b)})).build()}mxEvent.addListener(document,"click",a);this.libraryPicker.setVisible(!0)}catch(k){this.ui.spinner.stop(),this.ui.handleError(k)}}))};
DriveClient.prototype.showPermissions=function(a){var c=mxUtils.bind(this,function(){var c=new ConfirmDialog(this.ui,mxResources.get("googleSharingNotAvailable"),mxUtils.bind(this,function(){this.ui.editor.graph.openLink("https://drive.google.com/open?id="+a)}),null,mxResources.get("open"),null,null,null,null,IMAGE_PATH+"/google-share.png");this.ui.showDialog(c.container,360,190,!0,!0);c.init()});this.sharingFailed?c():this.checkToken(mxUtils.bind(this,function(){try{var d=new gapi.drive.share.ShareClient(this.appId);
-d.setOAuthToken(this.token);d.setItemIds([a]);d.showSettingsDialog();"MutationObserver"in window&&(null!=this.sharingObserver&&(this.sharingObserver.disconnect(),this.sharingObserver=null),this.sharingObserver=new MutationObserver(mxUtils.bind(this,function(a){for(var b=!1,d=0;d<a.length;d++)for(var k=0;k<a[d].addedNodes.length;k++){var l=a[d].addedNodes[k];"BUTTON"==l.nodeName&&"ok"==l.getAttribute("name")&&null!=l.parentNode&&null!=l.parentNode.parentNode&&"dialog"==l.parentNode.parentNode.getAttribute("role")?
-(this.sharingFailed=!0,l.click(),c(),b=!0):"DIV"==l.nodeName&&"shr-q-shr-r-shr-xb"==l.className&&(b=!0)}b&&(this.sharingObserver.disconnect(),this.sharingObserver=null)})),this.sharingObserver.observe(document,{childList:!0,subtree:!0}))}catch(b){this.ui.handleError(b)}}))};
+d.setOAuthToken(this.token);d.setItemIds([a]);d.showSettingsDialog();"MutationObserver"in window&&(null!=this.sharingObserver&&(this.sharingObserver.disconnect(),this.sharingObserver=null),this.sharingObserver=new MutationObserver(mxUtils.bind(this,function(a){for(var b=!1,d=0;d<a.length;d++)for(var k=0;k<a[d].addedNodes.length;k++){var n=a[d].addedNodes[k];"BUTTON"==n.nodeName&&"ok"==n.getAttribute("name")&&null!=n.parentNode&&null!=n.parentNode.parentNode&&"dialog"==n.parentNode.parentNode.getAttribute("role")?
+(this.sharingFailed=!0,n.click(),c(),b=!0):"DIV"==n.nodeName&&"shr-q-shr-r-shr-xb"==n.className&&(b=!0)}b&&(this.sharingObserver.disconnect(),this.sharingObserver=null)})),this.sharingObserver.observe(document,{childList:!0,subtree:!0}))}catch(b){this.ui.handleError(b)}}))};
DriveClient.prototype.clearPersistentToken=function(){var a=JSON.parse(this.getPersistentToken(!0))||{};delete a.current;delete a[this.userId];for(var c in a){a.current={userId:c,expires:0};break}DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(a))};
DriveClient.prototype.setPersistentToken=function(a,c){var d=JSON.parse(this.getPersistentToken(!0))||{};a.userId=this.userId;d.current=a;d[this.userId]={refresh_token:a.refresh_token,user:this.user};DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(d),c)};DropboxFile=function(a,c,d){DrawioFile.call(this,a,c);this.stat=d};mxUtils.extend(DropboxFile,DrawioFile);DropboxFile.prototype.getId=function(){return this.stat.path_display.substring(1)};DropboxFile.prototype.getHash=function(){return"D"+encodeURIComponent(this.getId())};DropboxFile.prototype.getMode=function(){return App.MODE_DROPBOX};DropboxFile.prototype.isAutosaveOptional=function(){return!0};DropboxFile.prototype.getTitle=function(){return this.stat.name};
DropboxFile.prototype.isRenamable=function(){return!0};DropboxFile.prototype.getSize=function(){return this.stat.size};DropboxFile.prototype.isRevisionHistorySupported=function(){return!0};
DropboxFile.prototype.getRevisions=function(a,c){var d=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});d.then(mxUtils.bind(this,function(b){try{for(var d=[],e=b.entries.length-1;0<=e;e--)mxUtils.bind(this,function(a){d.push({modifiedDate:a.client_modified,fileSize:a.size,getXml:mxUtils.bind(this,function(b,c){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:a.rev},b,c)}),getUrl:mxUtils.bind(this,function(b){return this.ui.getUrl(window.location.pathname+"?rev="+
a.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=b?"&page="+b:""))+window.location.hash})})})(b.entries[e]);a(d)}catch(k){c(k)}}));d["catch"](function(a){c(a)})};DropboxFile.prototype.getLatestVersion=function(a,c){this.ui.dropbox.getFile(this.getId(),a,c)};DropboxFile.prototype.updateDescriptor=function(a){this.stat=a.stat};DropboxFile.prototype.save=function(a,c,d,b,g){this.doSave(this.getTitle(),a,c,d,b,g)};DropboxFile.prototype.saveAs=function(a,c,d){this.doSave(a,!1,c,d)};
DropboxFile.prototype.doSave=function(a,c,d,b,g,e){var k=this.stat.name;this.stat.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.stat.name=k;this.saveFile(a,c,d,b,g,e)}),b,g,e])};
-DropboxFile.prototype.saveFile=function(a,c,d,b){this.isEditable()?this.savingFile?null!=b&&b({code:App.ERROR_BUSY}):(c=mxUtils.bind(this,function(c){if(c){var e=null,g=null;try{e=this.isModified;g=this.isModified();this.savingFile=!0;this.savingFileTime=new Date;var l=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return g}});l();var n=mxUtils.bind(this,function(c){var f=this.stat.path_display.lastIndexOf("/"),f=1<f?this.stat.path_display.substring(1,f+1):null;this.ui.dropbox.saveFile(a,
-c,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.stat=a;this.contentChanged();null!=d&&d()}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(g||this.isModified());if(null!=b){if(null!=a&&null!=a.retry){var c=a.retry;a.retry=function(){l();c()}}b(a)}}),f)});this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){n(this.ui.base64ToBlob(a,"image/png"))}),b,this.ui.getCurrentFile()!=
-this?this.getData():null):n(this.getData())}catch(q){if(this.savingFile=!1,null!=e&&(this.isModified=e),null!=g&&this.setModified(g||this.isModified()),null!=b)b(q);else throw q;}}else null!=b&&b()}),this.getTitle()==a?c(!0):this.ui.dropbox.checkExists(a,c)):null!=d&&d()};
+DropboxFile.prototype.saveFile=function(a,c,d,b){this.isEditable()?this.savingFile?null!=b&&b({code:App.ERROR_BUSY}):(c=mxUtils.bind(this,function(c){if(c){var e=null,g=null;try{e=this.isModified;g=this.isModified();this.savingFile=!0;this.savingFileTime=new Date;var n=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return g}});n();var m=mxUtils.bind(this,function(c){var f=this.stat.path_display.lastIndexOf("/"),f=1<f?this.stat.path_display.substring(1,f+1):null;this.ui.dropbox.saveFile(a,
+c,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.stat=a;this.contentChanged();null!=d&&d()}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(g||this.isModified());if(null!=b){if(null!=a&&null!=a.retry){var c=a.retry;a.retry=function(){n();c()}}b(a)}}),f)});this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){m(this.ui.base64ToBlob(a,"image/png"))}),b,this.ui.getCurrentFile()!=
+this?this.getData():null):m(this.getData())}catch(t){if(this.savingFile=!1,null!=e&&(this.isModified=e),null!=g&&this.setModified(g||this.isModified()),null!=b)b(t);else throw t;}}else null!=b&&b()}),this.getTitle()==a?c(!0):this.ui.dropbox.checkExists(a,c)):null!=d&&d()};
DropboxFile.prototype.rename=function(a,c,d){this.ui.dropbox.renameFile(this,a,mxUtils.bind(this,function(b){this.hasSameExtension(a,this.getTitle())?(this.stat=b,this.descriptorChanged(),null!=c&&c()):(this.stat=b,this.descriptorChanged(),this.save(!0,c,d))}),d)};DropboxLibrary=function(a,c,d){DropboxFile.call(this,a,c,d)};mxUtils.extend(DropboxLibrary,DropboxFile);DropboxLibrary.prototype.isAutosave=function(){return!0};DropboxLibrary.prototype.doSave=function(a,c,d){this.saveFile(a,!1,c,d)};DropboxLibrary.prototype.open=function(){};DropboxClient=function(a){DrawioClient.call(this,a,"dbauth");this.client=new Dropbox({clientId:App.DROPBOX_APPKEY});this.client.setAccessToken(this.token)};mxUtils.extend(DropboxClient,DrawioClient);DropboxClient.prototype.appPath="/drawio/";DropboxClient.prototype.extension=".drawio";DropboxClient.prototype.writingFile=!1;DropboxClient.prototype.maxRetries=4;
DropboxClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null;this.client.authTokenRevoke().then(mxUtils.bind(this,function(){this.client.setAccessToken(null)}))};
DropboxClient.prototype.updateUser=function(a,c,d){var b=!0,g=window.setTimeout(mxUtils.bind(this,function(){b=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),e=this.client.usersGetCurrentAccount();e.then(mxUtils.bind(this,function(c){window.clearTimeout(g);b&&(this.setUser(new DrawioUser(c.account_id,c.email,c.name.display_name)),a())}));e["catch"](mxUtils.bind(this,function(e){window.clearTimeout(g);b&&(null==e||401!==e.status||d?c({message:mxResources.get("accessDenied")}):(this.setUser(null),
this.client.setAccessToken(null),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,c,!0)}),c)))}))};
-DropboxClient.prototype.authenticate=function(a,c){if(null==window.onDropboxCallback){var d=mxUtils.bind(this,function(){var b=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(g,e){null!=window.open(this.client.getAuthenticationUrl("https://"+window.location.host+"/dropbox.html"),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(k,l){if(b){window.onDropboxCallback=null;b=!1;try{null==k?c({message:mxResources.get("accessDenied"),retry:d}):(null!=e&&e(),this.client.setAccessToken(k),
-this.setUser(null),g&&this.setPersistentToken(k),a())}catch(n){c(n)}finally{null!=l&&l.close()}}else null!=l&&l.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:d})}),mxUtils.bind(this,function(){b&&(window.onDropboxCallback=null,b=!1,c({message:mxResources.get("accessDenied"),retry:d}))}))});d()}else c({code:App.ERROR_BUSY})};
-DropboxClient.prototype.executePromise=function(a,c,d){var b=mxUtils.bind(this,function(e){var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;d({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout);a.then(mxUtils.bind(this,function(a){window.clearTimeout(l);k&&null!=c&&c(a)}));a["catch"](mxUtils.bind(this,function(a){window.clearTimeout(l);k&&(null==a||500!=a.status&&400!=a.status&&401!=a.status?d({message:mxResources.get("error")+" "+a.status}):(this.setUser(null),this.client.setAccessToken(null),
+DropboxClient.prototype.authenticate=function(a,c){if(null==window.onDropboxCallback){var d=mxUtils.bind(this,function(){var b=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(g,e){null!=window.open(this.client.getAuthenticationUrl("https://"+window.location.host+"/dropbox.html"),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(k,n){if(b){window.onDropboxCallback=null;b=!1;try{null==k?c({message:mxResources.get("accessDenied"),retry:d}):(null!=e&&e(),this.client.setAccessToken(k),
+this.setUser(null),g&&this.setPersistentToken(k),a())}catch(m){c(m)}finally{null!=n&&n.close()}}else null!=n&&n.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:d})}),mxUtils.bind(this,function(){b&&(window.onDropboxCallback=null,b=!1,c({message:mxResources.get("accessDenied"),retry:d}))}))});d()}else c({code:App.ERROR_BUSY})};
+DropboxClient.prototype.executePromise=function(a,c,d){var b=mxUtils.bind(this,function(e){var k=!0,n=window.setTimeout(mxUtils.bind(this,function(){k=!1;d({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout);a.then(mxUtils.bind(this,function(a){window.clearTimeout(n);k&&null!=c&&c(a)}));a["catch"](mxUtils.bind(this,function(a){window.clearTimeout(n);k&&(null==a||500!=a.status&&400!=a.status&&401!=a.status?d({message:mxResources.get("error")+" "+a.status}):(this.setUser(null),this.client.setAccessToken(null),
e?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){g(!0)},d)})}):this.authenticate(function(){b(!0)},d)))}))}),g=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){g(!0)},d,a):b(a)});null===this.client.getAccessToken()?this.authenticate(function(){g(!0)},d):g(!1)};DropboxClient.prototype.getLibrary=function(a,c,d){this.getFile(a,c,d,!0)};
DropboxClient.prototype.getFile=function(a,c,d,b){b=null!=b?b:!1;var g=/\.png$/i.test(a);if(/^https:\/\//i.test(a)||/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&g){var e=mxUtils.bind(this,function(){var b=a.split("/");this.ui.convertFile(a,0<b.length?b[b.length-1]:a,null,this.extension,c,d)});null!=this.token?e():this.authenticate(e,d)}else e={path:"/"+a},null!=urlParams.rev&&(e.rev=urlParams.rev),this.readFile(e,mxUtils.bind(this,function(d,e){var k=g?d.lastIndexOf(","):
--1,l=null;0<k&&(k=this.ui.extractGraphModelFromPng(d.substring(k+1)),null!=k&&0<k.length?d=k:l=new LocalFile(this,d,a,!0));c(null!=l?l:b?new DropboxLibrary(this.ui,d,e):new DropboxFile(this.ui,d,e))}),d,g)};
-DropboxClient.prototype.readFile=function(a,c,d,b){var g=mxUtils.bind(this,function(k){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),q=this.client.filesGetMetadata({path:"/"+a.path.substring(1),include_deleted:!1});q.then(mxUtils.bind(this,function(a){}));q["catch"](function(a){window.clearTimeout(n);l&&null!=a&&409==a.status&&(l=!1,d({message:mxResources.get("fileNotFound")}))});q=this.client.filesDownload(a);q.then(mxUtils.bind(this,
-function(a){window.clearTimeout(n);if(l){l=!1;try{var e=new FileReader;e.onload=mxUtils.bind(this,function(b){c(e.result,a)});b?e.readAsDataURL(a.fileBlob):e.readAsText(a.fileBlob)}catch(p){d(p)}}}));q["catch"](mxUtils.bind(this,function(a){window.clearTimeout(n);l&&(l=!1,null==a||500!=a.status&&400!=a.status&&401!=a.status?d({message:mxResources.get("error")+" "+a.status}):(this.client.setAccessToken(null),this.setUser(null),k?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){e(!0)},
+-1,n=null;0<k&&(k=this.ui.extractGraphModelFromPng(d.substring(k+1)),null!=k&&0<k.length?d=k:n=new LocalFile(this,d,a,!0));c(null!=n?n:b?new DropboxLibrary(this.ui,d,e):new DropboxFile(this.ui,d,e))}),d,g)};
+DropboxClient.prototype.readFile=function(a,c,d,b){var g=mxUtils.bind(this,function(k){var n=!0,m=window.setTimeout(mxUtils.bind(this,function(){n=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),t=this.client.filesGetMetadata({path:"/"+a.path.substring(1),include_deleted:!1});t.then(mxUtils.bind(this,function(a){}));t["catch"](function(a){window.clearTimeout(m);n&&null!=a&&409==a.status&&(n=!1,d({message:mxResources.get("fileNotFound")}))});t=this.client.filesDownload(a);t.then(mxUtils.bind(this,
+function(a){window.clearTimeout(m);if(n){n=!1;try{var f=new FileReader;f.onload=mxUtils.bind(this,function(b){c(f.result,a)});b?f.readAsDataURL(a.fileBlob):f.readAsText(a.fileBlob)}catch(p){d(p)}}}));t["catch"](mxUtils.bind(this,function(a){window.clearTimeout(m);n&&(n=!1,null==a||500!=a.status&&400!=a.status&&401!=a.status?d({message:mxResources.get("error")+" "+a.status}):(this.client.setAccessToken(null),this.setUser(null),k?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){e(!0)},
d)})}):this.authenticate(function(){g(!0)},d)))}))}),e=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){e(!0)},d,a):g(a)});null===this.client.getAccessToken()?this.authenticate(function(){e(!0)},d):e(!1)};
DropboxClient.prototype.checkExists=function(a,c,d){var b=this.client.filesGetMetadata({path:"/"+a.toLowerCase(),include_deleted:!1});this.executePromise(b,mxUtils.bind(this,function(b){d?c(!1,!0,b):this.ui.confirm(mxResources.get("replaceIt",[a]),function(){c(!0,!0,b)},function(){c(!1,!0,b)})}),function(a){c(!0,!1)})};
-DropboxClient.prototype.renameFile=function(a,c,d,b){if(/[\\\/:\?\*"\|]/.test(c))b({message:mxResources.get("dropboxCharsNotAllowed")});else{if(null!=a&&null!=c){var g=a.stat.path_display.substring(1),e=g.lastIndexOf("/");0<e&&(c=g.substring(0,e+1)+c)}null!=a&&null!=c&&a.stat.path_lower.substring(1)!==c.toLowerCase()?this.checkExists(c,mxUtils.bind(this,function(e,g,n){e?(e=mxUtils.bind(this,function(e){e=this.client.filesMove({from_path:a.stat.path_display,to_path:"/"+c,autorename:!1});this.executePromise(e,
-d,b)}),g&&n.path_lower.substring(1)!==c.toLowerCase()?(g=this.client.filesDelete({path:"/"+c.toLowerCase()}),this.executePromise(g,e,b)):e()):b()})):b({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(a,c,d,b){this.insertFile(a,c,d,b,!0)};
+DropboxClient.prototype.renameFile=function(a,c,d,b){if(/[\\\/:\?\*"\|]/.test(c))b({message:mxResources.get("dropboxCharsNotAllowed")});else{if(null!=a&&null!=c){var g=a.stat.path_display.substring(1),e=g.lastIndexOf("/");0<e&&(c=g.substring(0,e+1)+c)}null!=a&&null!=c&&a.stat.path_lower.substring(1)!==c.toLowerCase()?this.checkExists(c,mxUtils.bind(this,function(e,g,m){e?(e=mxUtils.bind(this,function(e){e=this.client.filesMove({from_path:a.stat.path_display,to_path:"/"+c,autorename:!1});this.executePromise(e,
+d,b)}),g&&m.path_lower.substring(1)!==c.toLowerCase()?(g=this.client.filesDelete({path:"/"+c.toLowerCase()}),this.executePromise(g,e,b)):e()):b()})):b({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(a,c,d,b){this.insertFile(a,c,d,b,!0)};
DropboxClient.prototype.insertFile=function(a,c,d,b,g){g=null!=g?g:!1;this.checkExists(a,mxUtils.bind(this,function(e){e?this.saveFile(a,c,mxUtils.bind(this,function(a){g?d(new DropboxLibrary(this.ui,c,a)):d(new DropboxFile(this.ui,c,a))}),b):b()}))};
DropboxClient.prototype.saveFile=function(a,c,d,b,g){/[\\\/:\?\*"\|]/.test(a)?b({message:mxResources.get("dropboxCharsNotAllowed")}):15E7<=c.length?b({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(c.length)+" / 150 MB)"}):(a=this.client.filesUpload({path:"/"+(null!=g?g:"")+a,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([c],{type:"text/plain"})}),this.executePromise(a,d,b))};
DropboxClient.prototype.pickLibrary=function(a){Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(c){if(this.ui.spinner.spin(document.body,mxResources.get("loading"))){var d=mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError(a)}),b=c[0].link.indexOf(this.appPath);if(0<b){var g=decodeURIComponent(c[0].link.substring(b+this.appPath.length-1));this.readFile({path:g},mxUtils.bind(this,function(b,k){if(null!=k&&k.id==c[0].id)try{this.ui.spinner.stop(),
-a(g.substring(1),new DropboxLibrary(this.ui,b,k))}catch(l){this.ui.handleError(l)}else this.createLibrary(c[0],a,d)}),d)}else this.createLibrary(c[0],a,d)}})})};
+a(g.substring(1),new DropboxLibrary(this.ui,b,k))}catch(n){this.ui.handleError(n)}else this.createLibrary(c[0],a,d)}),d)}else this.createLibrary(c[0],a,d)}})})};
DropboxClient.prototype.createLibrary=function(a,c,d){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[a.name]),mxUtils.bind(this,function(){this.ui.loadUrl(a.link,mxUtils.bind(this,function(b){this.insertFile(a.name,b,mxUtils.bind(this,function(a){try{this.ui.spinner.stop(),c(a.getHash().substring(1),a)}catch(e){d(e)}}),d,!0)}),d)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))};
DropboxClient.prototype.pickFile=function(a,c){null!=Dropbox.choose?(a=null!=a?a:mxUtils.bind(this,function(a,b){this.ui.loadFile(null!=a?"D"+encodeURIComponent(a):b.getHash(),null,b)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(d){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(c)this.ui.spinner.stop(),a(d[0].link);else{var b=mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError(a)}),g=mxUtils.bind(this,
-function(b,c){this.ui.spinner.stop();a(b,c)}),e=/\.png$/i.test(d[0].name);if(/\.vsdx$/i.test(d[0].name)||/\.gliffy$/i.test(d[0].name)||!this.ui.useCanvasForExport&&e)g(d[0].link);else{var k=d[0].link.indexOf(this.appPath);if(0<k){var l=decodeURIComponent(d[0].link.substring(k+this.appPath.length-1));this.readFile({path:l},mxUtils.bind(this,function(c,k){if(null!=k&&k.id==d[0].id){var f=e?c.lastIndexOf(","):-1;this.ui.spinner.stop();var m=null;0<f&&(f=this.ui.extractGraphModelFromPng(c.substring(f+
-1)),null!=f&&0<f.length?c=f:m=new LocalFile(this,c,l,!0));a(l.substring(1),null!=m?m:new DropboxFile(this.ui,c,k))}else this.createFile(d[0],g,b)}),b,e)}else this.createFile(d[0],g,b)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};
+function(b,c){this.ui.spinner.stop();a(b,c)}),e=/\.png$/i.test(d[0].name);if(/\.vsdx$/i.test(d[0].name)||/\.gliffy$/i.test(d[0].name)||!this.ui.useCanvasForExport&&e)g(d[0].link);else{var k=d[0].link.indexOf(this.appPath);if(0<k){var n=decodeURIComponent(d[0].link.substring(k+this.appPath.length-1));this.readFile({path:n},mxUtils.bind(this,function(c,k){if(null!=k&&k.id==d[0].id){var f=e?c.lastIndexOf(","):-1;this.ui.spinner.stop();var m=null;0<f&&(f=this.ui.extractGraphModelFromPng(c.substring(f+
+1)),null!=f&&0<f.length?c=f:m=new LocalFile(this,c,n,!0));a(n.substring(1),null!=m?m:new DropboxFile(this.ui,c,k))}else this.createFile(d[0],g,b)}),b,e)}else this.createFile(d[0],g,b)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};
DropboxClient.prototype.createFile=function(a,c,d){var b=/(\.png)$/i.test(a.name);this.ui.loadUrl(a.link,mxUtils.bind(this,function(g){null!=g&&0<g.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[a.name]),mxUtils.bind(this,function(){var e=b?g.lastIndexOf(","):-1;0<e&&(e=this.ui.extractGraphModelFromPng(g.substring(e+1)),null!=e&&0<e.length&&(g=e));this.insertFile(a.name,g,mxUtils.bind(this,function(b){c(a.name,b)}),d)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})):
(this.ui.spinner.stop(),d({message:mxResources.get("errorLoadingFile")}))}),d,b)};OneDriveFile=function(a,c,d){DrawioFile.call(this,a,c);this.meta=d};mxUtils.extend(OneDriveFile,DrawioFile);OneDriveFile.prototype.getId=function(){return this.getIdOf(this.meta)};OneDriveFile.prototype.getParentId=function(){return this.getIdOf(this.meta,!0)};OneDriveFile.prototype.getIdOf=function(a,c){return(null!=a.parentReference&&null!=a.parentReference.driveId?a.parentReference.driveId+"/":"")+(null!=c?a.parentReference.id:a.id)};
OneDriveFile.prototype.getChannelId=function(){return"W-"+DrawioFile.prototype.getChannelId.apply(this,arguments)};OneDriveFile.prototype.getHash=function(){return"W"+encodeURIComponent(this.getId())};OneDriveFile.prototype.getMode=function(){return App.MODE_ONEDRIVE};OneDriveFile.prototype.isAutosaveOptional=function(){return!0};OneDriveFile.prototype.getTitle=function(){return this.meta.name};OneDriveFile.prototype.isRenamable=function(){return!0};OneDriveFile.prototype.isSyncSupported=function(){return!0};
@@ -8945,8 +8949,8 @@ OneDriveFile.prototype.getDescriptorSecret=function(a){return null!=a.file&&null
OneDriveFile.prototype.loadPatchDescriptor=function(a,c){var d=this.ui.oneDrive.getItemURL(this.getId());this.ui.oneDrive.executeRequest(d+"?select=etag,file",mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?a(JSON.parse(b.getText())):c(this.ui.oneDrive.parseRequestText(b))}),c)};
OneDriveFile.prototype.getChannelKey=function(){return"undefined"!==typeof CryptoJS?CryptoJS.MD5(this.meta.createdDateTime+(null!=this.meta.createdBy&&null!=this.meta.createdBy.user?this.meta.createdBy.user.id:"")).toString():null};OneDriveFile.prototype.getLastModifiedDate=function(){return new Date(this.meta.lastModifiedDateTime)};OneDriveFile.prototype.save=function(a,c,d,b,g){this.doSave(this.getTitle(),a,c,d,b,g)};OneDriveFile.prototype.saveAs=function(a,c,d){this.doSave(a,!1,c,d)};
OneDriveFile.prototype.doSave=function(a,c,d,b,g,e){var k=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=k;this.saveFile(a,c,d,b,g,e)}),b,g,e])};
-OneDriveFile.prototype.saveFile=function(a,c,d,b,g,e){if(!this.isEditable())null!=d&&d();else if(!this.savingFile)if(this.getTitle()==a){var k=mxUtils.bind(this,function(){var a=null,c=null;try{a=this.isModified;c=this.isModified();this.savingFile=!0;this.savingFileTime=new Date;var g=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return c}}),f=e||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),m=this.meta;
-g();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(c,e){this.isModified=a;this.savingFile=!1;this.meta=c;this.fileSaved(e,m,mxUtils.bind(this,function(){this.contentChanged();null!=d&&d()}),b)}),mxUtils.bind(this,function(d,e){this.savingFile=!1;this.isModified=a;this.setModified(c||this.isModified());if(this.isConflict(e))this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.savingFileTime=new Date,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,
+OneDriveFile.prototype.saveFile=function(a,c,d,b,g,e){if(!this.isEditable())null!=d&&d();else if(!this.savingFile)if(this.getTitle()==a){var k=mxUtils.bind(this,function(){var a=null,c=null;try{a=this.isModified;c=this.isModified();this.savingFile=!0;this.savingFileTime=new Date;var g=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return c}}),f=e||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),l=this.meta;
+g();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(c,e){this.isModified=a;this.savingFile=!1;this.meta=c;this.fileSaved(e,l,mxUtils.bind(this,function(){this.contentChanged();null!=d&&d()}),b)}),mxUtils.bind(this,function(d,e){this.savingFile=!1;this.isModified=a;this.setModified(c||this.isModified());if(this.isConflict(e))this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.savingFileTime=new Date,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,
function(){this.updateFileData();k()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}))):null!=b&&b();else if(null!=b){if(null!=d&&null!=d.retry){var f=d.retry;d.retry=function(){g();f()}}b(d)}}),f)}catch(p){if(this.savingFile=!1,null!=a&&(this.isModified=a),null!=c&&this.setModified(c||this.isModified()),null!=b)b(p);else throw p;}});k()}else this.savingFile=!0,this.savingFileTime=new Date,this.ui.oneDrive.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=
!1;null!=d&&d();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}))};OneDriveFile.prototype.rename=function(a,c,d){var b=this.getCurrentEtag();this.ui.oneDrive.renameFile(this,a,mxUtils.bind(this,function(g){this.hasSameExtension(a,this.getTitle())?(this.meta=g,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(b),null!=c&&c(g)):(this.meta=g,null!=this.sync&&this.sync.descriptorChanged(b),this.save(!0,c,d))}),d)};
OneDriveFile.prototype.move=function(a,c,d){this.ui.oneDrive.moveFile(this.getId(),a,mxUtils.bind(this,function(a){this.meta=a;this.descriptorChanged();null!=c&&c(a)}),d)};OneDriveLibrary=function(a,c,d){OneDriveFile.call(this,a,c,d)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.save=function(a,c,d){this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(a){this.desc=a;null!=c&&c(a)}),d)};OneDriveLibrary.prototype.open=function(){};OneDriveClient=function(a){DrawioClient.call(this,a,"oneDriveAuthInfo");a=JSON.parse(this.token);null!=a&&(this.token=a.access_token,this.endpointHint=a.endpointHint,this.tokenExpiresOn=a.expiresOn,a=(this.tokenExpiresOn-Date.now())/1E3,this.resetTokenRefresh(600>a?1:a))};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");
@@ -8958,25 +8962,25 @@ a()))}),c)};OneDriveClient.prototype.resetTokenRefresh=function(a){null!=this.to
OneDriveClient.prototype.authenticate=function(a,c,d){if(null==window.onOneDriveCallback){var b=mxUtils.bind(this,function(){var g=!0,e=JSON.parse(this.getPersistentToken(!0));null!=e?(new mxXmlRequest(this.redirectUri+"?refresh_token="+e.refresh_token,null,"GET")).send(mxUtils.bind(this,function(e){200<=e.getStatus()&&299>=e.getStatus()?(e=JSON.parse(e.getText()),this.token=e.access_token,e.access_token=e.access_token,e.refresh_token=e.refresh_token,e.expiresOn=Date.now()+1E3*e.expires_in,this.tokenExpiresOn=
e.expiresOn,this.setPersistentToken(JSON.stringify(e),!e.remember),this.resetTokenRefresh(e.expires_in),a()):(this.clearPersistentToken(),this.setUser(null),this.token=null,401!=e.getStatus()||d?c({message:mxResources.get("accessDenied"),retry:b}):b())}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(d,e){var k="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=code&redirect_uri="+encodeURIComponent(this.redirectUri)+"&scope="+encodeURIComponent(this.scopes),
k=window.open(k,"odauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=k&&(window.onOneDriveCallback=mxUtils.bind(this,function(k,f){if(g){window.onOneDriveCallback=null;g=!1;try{null==k?c({message:mxResources.get("accessDenied"),retry:b}):(null!=e&&e(),this.setUser(null),this.token=k.access_token,k.expiresOn=Date.now()+1E3*
-k.expires_in,this.tokenExpiresOn=k.expiresOn,k.remember=d,this.setPersistentToken(JSON.stringify(k),!d),this.resetTokenRefresh(k.expires_in),this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){a()}),c))}catch(m){c(m)}finally{null!=f&&f.close()}}else null!=f&&f.close()}),k.focus())}),mxUtils.bind(this,function(){g&&(window.onOneDriveCallback=null,g=!1,c({message:mxResources.get("accessDenied"),retry:b}))}))});b()}else c({code:App.ERROR_BUSY})};
+k.expires_in,this.tokenExpiresOn=k.expiresOn,k.remember=d,this.setPersistentToken(JSON.stringify(k),!d),this.resetTokenRefresh(k.expires_in),this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){a()}),c))}catch(l){c(l)}finally{null!=f&&f.close()}}else null!=f&&f.close()}),k.focus())}),mxUtils.bind(this,function(){g&&(window.onOneDriveCallback=null,g=!1,c({message:mxResources.get("accessDenied"),retry:b}))}))});b()}else c({code:App.ERROR_BUSY})};
OneDriveClient.prototype.getAccountTypeAndEndpoint=function(a,c){this.get(this.baseUrl+"/me/drive/root",mxUtils.bind(this,function(d){try{if(200<=d.getStatus()&&299>=d.getStatus()){var b=JSON.parse(d.getText());0<b.webUrl.indexOf(".sharepoint.com")?this.endpointHint=b.webUrl:this.endpointHint=this.defEndpointHint;var g=JSON.parse(this.getPersistentToken(!0));null!=g&&(g.endpointHint=this.endpointHint,this.setPersistentToken(JSON.stringify(g),!g.remember));a();return}}catch(e){}c({message:mxResources.get("unknownError")+
" (Code: "+d.getStatus()+")"})}),c)};
OneDriveClient.prototype.executeRequest=function(a,c,d){var b=mxUtils.bind(this,function(g){var e=!0,k=window.setTimeout(mxUtils.bind(this,function(){e=!1;d({code:App.ERROR_TIMEOUT,retry:b})}),this.ui.timeout);this.get(a,mxUtils.bind(this,function(a){window.clearTimeout(k);e&&(200<=a.getStatus()&&299>=a.getStatus()||404==a.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),c(a)):g||401!==a.getStatus()&&400!==a.getStatus()?d(this.parseRequestText(a)):this.authenticate(function(){b(!0)},
d,g))}),d)});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){b(!0)},d):b(!1)};OneDriveClient.prototype.checkToken=function(a){null==this.token||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(a,this.emptyFn):a()};OneDriveClient.prototype.getItemRef=function(a){var c=a.split("/");return 1<c.length?{driveId:c[0],id:c[1]}:{id:a}};
OneDriveClient.prototype.getItemURL=function(a,c){var d=a.split("/");return 1<d.length?(c?"":this.baseUrl)+"/drives/"+d[0]+"/items/"+d[1]:(c?"":this.baseUrl)+"/me/drive/items/"+a};OneDriveClient.prototype.getLibrary=function(a,c,d){this.getFile(a,c,d,!1,!0)};
-OneDriveClient.prototype.getFile=function(a,c,d,b,g){g=null!=g?g:!1;this.executeRequest(this.getItemURL(a),mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){var b=JSON.parse(a.getText()),e=/\.png$/i.test(b.name);if(/\.v(dx|sdx?)$/i.test(b.name)||/\.gliffy$/i.test(b.name)||!this.ui.useCanvasForExport&&e)this.ui.convertFile(b["@microsoft.graph.downloadUrl"],b.name,null!=b.file?b.file.mimeType:null,this.extension,c,d);else{var n=!0,q=window.setTimeout(mxUtils.bind(this,function(){n=
-!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.loadUrl(b["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(a){try{if(window.clearTimeout(q),n){var f=e?a.lastIndexOf(","):-1,k=null;if(0<f){var l=this.ui.extractGraphModelFromPng(a.substring(f+1));null!=l&&0<l.length?a=l:k=new LocalFile(this.ui,a,b.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==a.substring(0,32)){var v=a.substring(22);a=window.atob&&!mxClient.IS_SF?atob(v):Base64.decode(v)}Graph.fileSupport&&(new XMLHttpRequest).upload&&
-this.ui.isRemoteFileFormat(a,b["@microsoft.graph.downloadUrl"])?this.ui.parseFile(new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){try{4==a.readyState&&(200<=a.status&&299>=a.status?c(new LocalFile(this.ui,a.responseText,b.name+this.extension,!0)):null!=d&&d({message:mxResources.get("errorLoadingFile")}))}catch(x){if(null!=d)d(x);else throw x;}}),b.name):null!=k?c(k):g?c(new OneDriveLibrary(this.ui,a,b)):c(new OneDriveFile(this.ui,a,b))}}catch(t){if(null!=d)d(t);else throw t;
-}}),mxUtils.bind(this,function(a){window.clearTimeout(q);n&&d(this.parseRequestText(a))}),e||null!=b.file&&null!=b.file.mimeType&&"image/"==b.file.mimeType.substring(0,6))}}else d(this.parseRequestText(a))}),d)};
+OneDriveClient.prototype.getFile=function(a,c,d,b,g){g=null!=g?g:!1;this.executeRequest(this.getItemURL(a),mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){var b=JSON.parse(a.getText()),e=/\.png$/i.test(b.name);if(/\.v(dx|sdx?)$/i.test(b.name)||/\.gliffy$/i.test(b.name)||!this.ui.useCanvasForExport&&e)this.ui.convertFile(b["@microsoft.graph.downloadUrl"],b.name,null!=b.file?b.file.mimeType:null,this.extension,c,d);else{var m=!0,t=window.setTimeout(mxUtils.bind(this,function(){m=
+!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.loadUrl(b["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(a){try{if(window.clearTimeout(t),m){var f=e?a.lastIndexOf(","):-1,k=null;if(0<f){var n=this.ui.extractGraphModelFromPng(a.substring(f+1));null!=n&&0<n.length?a=n:k=new LocalFile(this.ui,a,b.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==a.substring(0,32)){var v=a.substring(22);a=window.atob&&!mxClient.IS_SF?atob(v):Base64.decode(v)}Graph.fileSupport&&(new XMLHttpRequest).upload&&
+this.ui.isRemoteFileFormat(a,b["@microsoft.graph.downloadUrl"])?this.ui.parseFile(new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){try{4==a.readyState&&(200<=a.status&&299>=a.status?c(new LocalFile(this.ui,a.responseText,b.name+this.extension,!0)):null!=d&&d({message:mxResources.get("errorLoadingFile")}))}catch(x){if(null!=d)d(x);else throw x;}}),b.name):null!=k?c(k):g?c(new OneDriveLibrary(this.ui,a,b)):c(new OneDriveFile(this.ui,a,b))}}catch(q){if(null!=d)d(q);else throw q;
+}}),mxUtils.bind(this,function(a){window.clearTimeout(t);m&&d(this.parseRequestText(a))}),e||null!=b.file&&null!=b.file.mimeType&&"image/"==b.file.mimeType.substring(0,6))}}else d(this.parseRequestText(a))}),d)};
OneDriveClient.prototype.renameFile=function(a,c,d,b){null!=a&&null!=c&&(this.isValidFilename(c)?this.checkExists(a.getParentId(),c,!1,mxUtils.bind(this,function(g){g?this.writeFile(this.getItemURL(a.getId()),JSON.stringify({name:c}),"PATCH","application/json",d,b):b()})):b({message:this.invalidFilenameRegExs[0].test(c)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};
OneDriveClient.prototype.moveFile=function(a,c,d,b){c=this.getItemRef(c);var g=this.getItemRef(a);c.driveId!=g.driveId?b({message:mxResources.get("cannotMoveOneDrive",null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(a),JSON.stringify({parentReference:c}),"PATCH","application/json",d,b)};OneDriveClient.prototype.insertLibrary=function(a,c,d,b,g){this.insertFile(a,c,d,b,!0,g)};
OneDriveClient.prototype.insertFile=function(a,c,d,b,g,e){this.isValidFilename(a)?(g=null!=g?g:!1,this.checkExists(e,a,!0,mxUtils.bind(this,function(k){k?(k="/me/drive/root",null!=e&&(k=this.getItemURL(e,!0)),k=this.baseUrl+k+"/children/"+encodeURIComponent(a)+"/content",this.writeFile(k,c,"PUT",null,mxUtils.bind(this,function(a){g?d(new OneDriveLibrary(this.ui,c,a)):d(new OneDriveFile(this.ui,c,a))}),b)):b()}))):b({message:this.invalidFilenameRegExs[0].test(a)?mxResources.get("oneDriveCharsNotAllowed"):
mxResources.get("oneDriveInvalidDeviceName")})};
OneDriveClient.prototype.checkExists=function(a,c,d,b){var g="/me/drive/root";null!=a&&(g=this.getItemURL(a,!0));this.executeRequest(this.baseUrl+g+"/children/"+encodeURIComponent(c),mxUtils.bind(this,function(a){404==a.getStatus()?b(!0):d?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[c]),function(){b(!0)},function(){b(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){b(!1)}))}),function(a){b(!1)},
!0)};OneDriveClient.prototype.saveFile=function(a,c,d,b){try{var g=a.getData(),e=mxUtils.bind(this,function(e){var k=this.getItemURL(a.getId());this.writeFile(k+"/content/",e,"PUT",null,mxUtils.bind(this,function(a){c(a,g)}),d,b)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){e(this.ui.base64ToBlob(a,"image/png"))}),d,this.ui.getCurrentFile()!=a?g:null):e(g)}catch(k){d(k)}};
-OneDriveClient.prototype.writeFile=function(a,c,d,b,g,e,k){try{if(null!=a&&null!=c)if(4E6<=c.length)e({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(c.length)+" / 4 MB)"});else{var l=mxUtils.bind(this,function(n){try{var q=!0,f=window.setTimeout(mxUtils.bind(this,function(){q=!1;e({code:App.ERROR_TIMEOUT,retry:l})}),this.ui.timeout),m=new mxXmlRequest(a,c,d);m.setRequestHeaders=mxUtils.bind(this,function(a,c){a.setRequestHeader("Content-Type",b||" ");a.setRequestHeader("Authorization",
-"Bearer "+this.token);null!=k&&a.setRequestHeader("If-Match",k)});m.send(mxUtils.bind(this,function(a){window.clearTimeout(f);q&&(200<=a.getStatus()&&299>=a.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),g(JSON.parse(a.getText()))):n||401!==a.getStatus()?e(this.parseRequestText(a),a):this.authenticate(function(){l(!0)},e,n))}),mxUtils.bind(this,function(a){window.clearTimeout(f);q&&e(this.parseRequestText(a))}))}catch(p){e(p)}});null==this.token||6E4>this.tokenExpiresOn-
-Date.now()?this.authenticate(function(){l(!0)},e):l(!1)}else e({message:mxResources.get("unknownError")})}catch(n){e(n)}};OneDriveClient.prototype.parseRequestText=function(a){var c={message:mxResources.get("unknownError")};try{c=JSON.parse(a.getText())}catch(d){}return c};OneDriveClient.prototype.pickLibrary=function(a){this.pickFile(function(c){a(c)})};
+OneDriveClient.prototype.writeFile=function(a,c,d,b,g,e,k){try{if(null!=a&&null!=c)if(4E6<=c.length)e({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(c.length)+" / 4 MB)"});else{var n=mxUtils.bind(this,function(m){try{var t=!0,f=window.setTimeout(mxUtils.bind(this,function(){t=!1;e({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout),l=new mxXmlRequest(a,c,d);l.setRequestHeaders=mxUtils.bind(this,function(a,c){a.setRequestHeader("Content-Type",b||" ");a.setRequestHeader("Authorization",
+"Bearer "+this.token);null!=k&&a.setRequestHeader("If-Match",k)});l.send(mxUtils.bind(this,function(a){window.clearTimeout(f);t&&(200<=a.getStatus()&&299>=a.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),g(JSON.parse(a.getText()))):m||401!==a.getStatus()?e(this.parseRequestText(a),a):this.authenticate(function(){n(!0)},e,m))}),mxUtils.bind(this,function(a){window.clearTimeout(f);t&&e(this.parseRequestText(a))}))}catch(p){e(p)}});null==this.token||6E4>this.tokenExpiresOn-
+Date.now()?this.authenticate(function(){n(!0)},e):n(!1)}else e({message:mxResources.get("unknownError")})}catch(m){e(m)}};OneDriveClient.prototype.parseRequestText=function(a){var c={message:mxResources.get("unknownError")};try{c=JSON.parse(a.getText())}catch(d){}return c};OneDriveClient.prototype.pickLibrary=function(a){this.pickFile(function(c){a(c)})};
OneDriveClient.prototype.pickFolder=function(a,c){var d=mxUtils.bind(this,function(b){var c=mxUtils.bind(this,function(){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:this.token,isConsumerAccount:!1},success:mxUtils.bind(this,function(b){a(b);mxClient.IS_IE11&&(this.token=b.accessToken)}),cancel:mxUtils.bind(this,function(){}),
error:mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)})})});b?c():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){a({value:[{id:"root",name:"root",parentReference:{driveId:"me"}}]})}),c,mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0);null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){d(!1)}),this.emptyFn):d(c)};
OneDriveClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("W"+encodeURIComponent(a))});var c=mxUtils.bind(this,function(){OneDrive.open({clientId:this.clientId,action:"query",multiSelect:!1,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:this.token,isConsumerAccount:!1},success:mxUtils.bind(this,function(c){null!=c&&null!=c.value&&0<c.value.length&&
@@ -8985,107 +8989,107 @@ OneDriveClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,func
GitHubFile.prototype.getPublicUrl=function(a){null!=this.meta.download_url?mxUtils.get(this.meta.download_url,mxUtils.bind(this,function(c){a(200<=c.getStatus()&&299>=c.getStatus()?this.meta.download_url:null)}),mxUtils.bind(this,function(){a(null)})):a(null)};GitHubFile.prototype.isConflict=function(a){return null!=a&&409==a.status};GitHubFile.prototype.getMode=function(){return App.MODE_GITHUB};GitHubFile.prototype.isAutosave=function(){return!1};GitHubFile.prototype.getTitle=function(){return this.meta.name};
GitHubFile.prototype.isRenamable=function(){return!1};GitHubFile.prototype.getLatestVersion=function(a,c){this.peer.getFile(this.getId(),a,c)};GitHubFile.prototype.isCompressedStorage=function(){return!1};GitHubFile.prototype.getDescriptor=function(){return this.meta};GitHubFile.prototype.setDescriptor=function(a){this.meta=a};GitHubFile.prototype.getDescriptorEtag=function(a){return a.sha};GitHubFile.prototype.setDescriptorEtag=function(a,c){a.sha=c};
GitHubFile.prototype.save=function(a,c,d,b,g,e){this.doSave(this.getTitle(),c,d,b,g,e)};GitHubFile.prototype.saveAs=function(a,c,d){this.doSave(a,c,d)};GitHubFile.prototype.doSave=function(a,c,d,b,g,e){var k=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=k;this.saveFile(a,!1,c,d,b,g,e)}),d,b,g])};
-GitHubFile.prototype.saveFile=function(a,c,d,b,g,e,k){if(this.isEditable())if(this.savingFile)null!=b&&b({code:App.ERROR_BUSY});else{var l=mxUtils.bind(this,function(c){if(this.getTitle()==a){var g=null,f=null;try{g=this.isModified;f=this.isModified();this.savingFile=!0;this.savingFileTime=new Date;var k=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return f}}),l=this.getCurrentEtag(),n=this.data;k();this.peer.saveFile(this,mxUtils.bind(this,function(a){this.savingFile=
-!1;this.isModified=g;this.setDescriptorEtag(this.meta,a);this.fileSaved(n,l,mxUtils.bind(this,function(){this.contentChanged();null!=d&&d()}),b)}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=g;this.setModified(f||this.isModified());if(this.isConflict(a))this.inConflictState=!0,null!=b&&b({commitMessage:c});else if(null!=b){if(null!=a&&null!=a.retry){var d=a.retry;a.retry=function(){k();d()}}b(a)}}),e,c)}catch(v){if(this.savingFile=!1,null!=g&&(this.isModified=g),null!=f&&this.setModified(f||
-this.isModified()),null!=b)b(v);else throw v;}}else this.savingFile=!0,this.savingFileTime=new Date,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(e){this.peer.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=!1;null!=d&&d();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}),!1,e,c)}))});null!=k?l(k):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(a){l(a)}),
+GitHubFile.prototype.saveFile=function(a,c,d,b,g,e,k){if(this.isEditable())if(this.savingFile)null!=b&&b({code:App.ERROR_BUSY});else{var n=mxUtils.bind(this,function(c){if(this.getTitle()==a){var g=null,f=null;try{g=this.isModified;f=this.isModified();this.savingFile=!0;this.savingFileTime=new Date;var k=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return f}}),m=this.getCurrentEtag(),n=this.data;k();this.peer.saveFile(this,mxUtils.bind(this,function(a){this.savingFile=
+!1;this.isModified=g;this.setDescriptorEtag(this.meta,a);this.fileSaved(n,m,mxUtils.bind(this,function(){this.contentChanged();null!=d&&d()}),b)}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=g;this.setModified(f||this.isModified());if(this.isConflict(a))this.inConflictState=!0,null!=b&&b({commitMessage:c});else if(null!=b){if(null!=a&&null!=a.retry){var d=a.retry;a.retry=function(){k();d()}}b(a)}}),e,c)}catch(v){if(this.savingFile=!1,null!=g&&(this.isModified=g),null!=f&&this.setModified(f||
+this.isModified()),null!=b)b(v);else throw v;}}else this.savingFile=!0,this.savingFileTime=new Date,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(e){this.peer.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=!1;null!=d&&d();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}),!1,e,c)}))});null!=k?n(k):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(a){n(a)}),
b)}else null!=d&&d()};GitHubLibrary=function(a,c,d){GitHubFile.call(this,a,c,d)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(a,c,d){this.saveFile(a,!1,c,d)};GitHubLibrary.prototype.open=function(){};GitHubClient=function(a,c){DrawioClient.call(this,a,c||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"23bc97120b9035515661":"89c9e4624ca416554489";GitHubClient.prototype.scope="repo";GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl="https://api.github.com";GitHubClient.prototype.maxFileSize=1E6;
GitHubClient.prototype.updateUser=function(a,c,d){var b=!0,g=window.setTimeout(mxUtils.bind(this,function(){b=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(this.baseUrl+"/user?access_token="+this.token,mxUtils.bind(this,function(e){window.clearTimeout(g);b&&(401===e.getStatus()?d?c({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,c,!0)}),c)):200>e.getStatus()||300<=e.getStatus()?
c({message:mxResources.get("accessDenied")}):(this.setUser(this.createUser(JSON.parse(e.getText()))),a()))}))};GitHubClient.prototype.createUser=function(a){return new DrawioUser(a.id,a.email,a.name)};
-GitHubClient.prototype.authenticate=function(a,c){if(null==window.onGitHubCallback){var d=mxUtils.bind(this,function(){var b=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(g,e){null!=window.open("https://github.com/login/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope,"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(k,l){if(b)if(window.onGitHubCallback=null,b=!1,null==k)c({message:mxResources.get("accessDenied"),retry:d});else{var n=mxUtils.bind(this,function(){var b=
-!0,d=window.setTimeout(mxUtils.bind(this,function(){b=!1;c({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout);mxUtils.get("/github?client_id="+this.clientId+"&code="+k,mxUtils.bind(this,function(f){window.clearTimeout(d);if(b)try{if(200>f.getStatus()||300<=f.getStatus())c({message:mxResources.get("cannotLogin")});else{null!=e&&e();var k=f.getText();this.token=k.substring(k.indexOf("=")+1,k.indexOf("&"));this.setUser(null);g&&this.setPersistentToken(this.token);a()}}catch(u){c(u)}finally{null!=l&&
-l.close()}}))});n()}else null!=l&&l.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:d})}),mxUtils.bind(this,function(){b&&(window.onGitHubCallback=null,b=!1,c({message:mxResources.get("accessDenied"),retry:d}))}))});d()}else c({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=function(a,c){try{var d=JSON.parse(a.getText());null!=d&&null!=d.message&&(c=d.message)}catch(b){}return c};
-GitHubClient.prototype.executeRequest=function(a,c,d,b){var g=mxUtils.bind(this,function(k){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout),q=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","token "+q)};a.send(mxUtils.bind(this,function(){window.clearTimeout(n);if(l)if(200<=a.getStatus()&&299>=a.getStatus()||b&&404==a.getStatus())c(a);else if(401===a.getStatus())k?d({code:a.getStatus(),message:mxResources.get("accessDenied"),
-retry:mxUtils.bind(this,function(){this.authenticate(function(){e(!0)},d)})}):this.authenticate(function(){g(!0)},d);else if(403===a.getStatus()){var f=!1;try{var m=JSON.parse(a.getText());null!=m&&null!=m.errors&&0<m.errors.length&&(f="too_large"==m.errors[0].code)}catch(p){}d({message:mxResources.get(f?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?d({code:a.getStatus(),message:this.getErrorMessage(a,mxResources.get("fileNotFound"))}):409===a.getStatus()?d({code:a.getStatus(),status:409}):
+GitHubClient.prototype.authenticate=function(a,c){if(null==window.onGitHubCallback){var d=mxUtils.bind(this,function(){var b=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(g,e){null!=window.open("https://github.com/login/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope,"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(k,n){if(b)if(window.onGitHubCallback=null,b=!1,null==k)c({message:mxResources.get("accessDenied"),retry:d});else{var m=mxUtils.bind(this,function(){var b=
+!0,d=window.setTimeout(mxUtils.bind(this,function(){b=!1;c({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout);mxUtils.get("/github?client_id="+this.clientId+"&code="+k,mxUtils.bind(this,function(f){window.clearTimeout(d);if(b)try{if(200>f.getStatus()||300<=f.getStatus())c({message:mxResources.get("cannotLogin")});else{null!=e&&e();var k=f.getText();this.token=k.substring(k.indexOf("=")+1,k.indexOf("&"));this.setUser(null);g&&this.setPersistentToken(this.token);a()}}catch(u){c(u)}finally{null!=n&&
+n.close()}}))});m()}else null!=n&&n.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:d})}),mxUtils.bind(this,function(){b&&(window.onGitHubCallback=null,b=!1,c({message:mxResources.get("accessDenied"),retry:d}))}))});d()}else c({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=function(a,c){try{var d=JSON.parse(a.getText());null!=d&&null!=d.message&&(c=d.message)}catch(b){}return c};
+GitHubClient.prototype.executeRequest=function(a,c,d,b){var g=mxUtils.bind(this,function(k){var n=!0,m=window.setTimeout(mxUtils.bind(this,function(){n=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout),t=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","token "+t)};a.send(mxUtils.bind(this,function(){window.clearTimeout(m);if(n)if(200<=a.getStatus()&&299>=a.getStatus()||b&&404==a.getStatus())c(a);else if(401===a.getStatus())k?d({code:a.getStatus(),message:mxResources.get("accessDenied"),
+retry:mxUtils.bind(this,function(){this.authenticate(function(){e(!0)},d)})}):this.authenticate(function(){g(!0)},d);else if(403===a.getStatus()){var f=!1;try{var l=JSON.parse(a.getText());null!=l&&null!=l.errors&&0<l.errors.length&&(f="too_large"==l.errors[0].code)}catch(p){}d({message:mxResources.get(f?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?d({code:a.getStatus(),message:this.getErrorMessage(a,mxResources.get("fileNotFound"))}):409===a.getStatus()?d({code:a.getStatus(),status:409}):
d({code:a.getStatus(),message:this.getErrorMessage(a,mxResources.get("error")+" "+a.getStatus())})}),d)}),e=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){e(!0)},d,a):g(a)});null==this.token?this.authenticate(function(){e(!0)},d):e(!1)};GitHubClient.prototype.getLibrary=function(a,c,d){this.getFile(a,c,d,!0)};
-GitHubClient.prototype.getSha=function(a,c,d,b,g,e){var k="&t="+(new Date).getTime();a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+c+"/contents/"+d+"?ref="+b+k,null,"HEAD");this.executeRequest(a,mxUtils.bind(this,function(a){try{g(a.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(n){e(n)}}),e)};
-GitHubClient.prototype.getFile=function(a,c,d,b,g){b=null!=b?b:!1;var e=a.split("/"),k=e[0],l=e[1],n=e[2];a=e.slice(3,e.length).join("/");e=/\.png$/i.test(a);!g&&(/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&e)?null!=this.token?(g=this.baseUrl+"/repos/"+k+"/"+l+"/contents/"+a+"?ref="+n+"&token="+this.token,e=a.split("/"),this.ui.convertFile(g,0<e.length?e[e.length-1]:a,null,this.extension,c,d)):d({message:mxResources.get("accessDenied")}):(g="&t="+(new Date).getTime(),
-a=new mxXmlRequest(this.baseUrl+"/repos/"+k+"/"+l+"/contents/"+a+"?ref="+n+g,null,"GET"),this.executeRequest(a,mxUtils.bind(this,function(a){try{c(this.createGitHubFile(k,l,n,JSON.parse(a.getText()),b))}catch(f){d(f)}}),d))};
+GitHubClient.prototype.getSha=function(a,c,d,b,g,e){var k="&t="+(new Date).getTime();a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+c+"/contents/"+d+"?ref="+b+k,null,"HEAD");this.executeRequest(a,mxUtils.bind(this,function(a){try{g(a.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(m){e(m)}}),e)};
+GitHubClient.prototype.getFile=function(a,c,d,b,g){b=null!=b?b:!1;var e=a.split("/"),k=e[0],n=e[1],m=e[2];a=e.slice(3,e.length).join("/");e=/\.png$/i.test(a);!g&&(/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&e)?null!=this.token?(g=this.baseUrl+"/repos/"+k+"/"+n+"/contents/"+a+"?ref="+m+"&token="+this.token,e=a.split("/"),this.ui.convertFile(g,0<e.length?e[e.length-1]:a,null,this.extension,c,d)):d({message:mxResources.get("accessDenied")}):(g="&t="+(new Date).getTime(),
+a=new mxXmlRequest(this.baseUrl+"/repos/"+k+"/"+n+"/contents/"+a+"?ref="+m+g,null,"GET"),this.executeRequest(a,mxUtils.bind(this,function(a){try{c(this.createGitHubFile(k,n,m,JSON.parse(a.getText()),b))}catch(f){d(f)}}),d))};
GitHubClient.prototype.createGitHubFile=function(a,c,d,b,g){a={org:a,repo:c,ref:d,name:b.name,path:b.path,sha:b.sha,html_url:b.html_url,download_url:b.download_url};c=b.content;"base64"===b.encoding&&(/\.jpe?g$/i.test(b.name)?c="data:image/jpeg;base64,"+c:/\.gif$/i.test(b.name)?c="data:image/gif;base64,"+c:/\.png$/i.test(b.name)?(b=this.ui.extractGraphModelFromPng(c),c=null!=b&&0<b.length?b:"data:image/png;base64,"+c):c=Base64.decode(c));return g?new GitHubLibrary(this.ui,c,a):new GitHubFile(this.ui,
c,a)};GitHubClient.prototype.insertLibrary=function(a,c,d,b,g){this.insertFile(a,c,d,b,!0,g,!1)};
-GitHubClient.prototype.insertFile=function(a,c,d,b,g,e,k){g=null!=g?g:!1;e=e.split("/");var l=e[0],n=e[1],q=e[2],f=e.slice(3,e.length).join("/");0<f.length&&(f+="/");f+=a;this.checkExists(l+"/"+n+"/"+q+"/"+f,!0,mxUtils.bind(this,function(e,p){e?g?(k||(c=Base64.encode(c)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(l,n,q,f,a,c,p,mxUtils.bind(this,function(a){try{var c=JSON.parse(a.getText());d(this.createGitHubFile(l,n,q,c.content,g))}catch(x){b(x)}}),b)}),b)):d(new GitHubFile(this.ui,
-c,{org:l,repo:n,ref:q,name:a,path:f,sha:p,isNew:!0})):b()}))};GitHubClient.prototype.showCommitDialog=function(a,c,d,b){var g=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(c?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){g();d(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){b()}),null,280);this.ui.showDialog(a.container,400,80,!0,!1);a.init()};
-GitHubClient.prototype.writeFile=function(a,c,d,b,g,e,k,l,n){e.length>=this.maxFileSize?n({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 1 MB)"}):(d={path:b,branch:decodeURIComponent(d),message:g,content:e},null!=k&&(d.sha=k),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+c+"/contents/"+b,JSON.stringify(d),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){l(a)}),mxUtils.bind(this,function(a){404==a.code&&(a.helpLink="https://github.com/settings/connections/applications/"+
-this.clientId,a.code=null);n(a)})))};
+GitHubClient.prototype.insertFile=function(a,c,d,b,g,e,k){g=null!=g?g:!1;e=e.split("/");var n=e[0],m=e[1],t=e[2],f=e.slice(3,e.length).join("/");0<f.length&&(f+="/");f+=a;this.checkExists(n+"/"+m+"/"+t+"/"+f,!0,mxUtils.bind(this,function(e,p){e?g?(k||(c=Base64.encode(c)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(n,m,t,f,a,c,p,mxUtils.bind(this,function(a){try{var c=JSON.parse(a.getText());d(this.createGitHubFile(n,m,t,c.content,g))}catch(x){b(x)}}),b)}),b)):d(new GitHubFile(this.ui,
+c,{org:n,repo:m,ref:t,name:a,path:f,sha:p,isNew:!0})):b()}))};GitHubClient.prototype.showCommitDialog=function(a,c,d,b){var g=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(c?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){g();d(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){b()}),null,280);this.ui.showDialog(a.container,400,80,!0,!1);a.init()};
+GitHubClient.prototype.writeFile=function(a,c,d,b,g,e,k,n,m){e.length>=this.maxFileSize?m({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 1 MB)"}):(d={path:b,branch:decodeURIComponent(d),message:g,content:e},null!=k&&(d.sha=k),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+c+"/contents/"+b,JSON.stringify(d),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){n(a)}),mxUtils.bind(this,function(a){404==a.code&&(a.helpLink="https://github.com/settings/connections/applications/"+
+this.clientId,a.code=null);m(a)})))};
GitHubClient.prototype.checkExists=function(a,c,d){var b=a.split("/"),g=b[0],e=b[1],k=b[2];a=b.slice(3,b.length).join("/");this.getSha(g,e,a,k,mxUtils.bind(this,function(b){if(c){var e=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){e();d(!0,b)},function(){e();d(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){d(!1)})}),mxUtils.bind(this,function(a){d(!0)}),null,!0)};
-GitHubClient.prototype.saveFile=function(a,c,d,b,g){var e=a.meta.org,k=a.meta.repo,l=a.meta.ref,n=a.meta.path,q=mxUtils.bind(this,function(b,f){this.writeFile(e,k,l,n,g,f,b,mxUtils.bind(this,function(b){delete a.meta.isNew;c(JSON.parse(b.getText()).content.sha)}),mxUtils.bind(this,function(a){d(a)}))}),f=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(n)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){q(a.meta.sha,b)}),d,this.ui.getCurrentFile()!=a?a.getData():null):
-q(a.meta.sha,Base64.encode(a.getData()))});b?this.getSha(e,k,n,l,mxUtils.bind(this,function(b){a.meta.sha=b;f()}),d):f()};GitHubClient.prototype.pickLibrary=function(a){this.pickFile(a)};GitHubClient.prototype.pickFolder=function(a){this.showGitHubDialog(!1,a)};GitHubClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("H"+encodeURIComponent(a))});this.showGitHubDialog(!0,a)};
-GitHubClient.prototype.showGitHubDialog=function(a,c){var d=null,b=null,g=null,e=null,k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.height="304px";var l=document.createElement("h3");mxUtils.write(l,mxResources.get(a?"selectFile":"selectFolder"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(l);var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.border="1px solid lightgray";n.style.boxSizing=
-"border-box";n.style.padding="4px";n.style.overflow="auto";n.style.lineHeight="1.2em";n.style.height="274px";k.appendChild(n);var q=document.createElement("div");q.style.textOverflow="ellipsis";q.style.boxSizing="border-box";q.style.overflow="hidden";q.style.padding="4px";q.style.width="100%";var f=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){c(d+"/"+b+"/"+encodeURIComponent(g)+"/"+e)}));this.ui.showDialog(f.container,420,360,!0,!0);a&&f.okButton.parentNode.removeChild(f.okButton);var m=
-mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("href","javascript:void(0);");d.setAttribute("title",a);mxUtils.write(d,a);mxEvent.addListener(d,"click",b);null!=c&&(a=q.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),p=mxUtils.bind(this,function(a){var c=document.createElement("div");c.style.marginBottom="8px";c.appendChild(m(d+"/"+b,mxUtils.bind(this,function(){e=null;D()})));a||(mxUtils.write(c," / "),c.appendChild(m(decodeURIComponent(g),mxUtils.bind(this,
-function(){e=null;y()}))));if(null!=e&&0<e.length){var f=e.split("/");for(a=0;a<f.length;a++)(function(a){mxUtils.write(c," / ");c.appendChild(m(f[a],mxUtils.bind(this,function(){e=f.slice(0,a+1).join("/");x()})))})(a)}n.appendChild(c)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(e=g=b=d=null,D()):this.ui.hideDialog()}))}),v=null,t=null,x=mxUtils.bind(this,function(k){null==k&&(n.innerHTML="",k=1);var l=new mxXmlRequest(this.baseUrl+
-"/repos/"+d+"/"+b+"/contents/"+e+"?ref="+encodeURIComponent(g)+"&per_page=100&page="+k,null,"GET");this.ui.spinner.spin(n,mxResources.get("loading"));f.okButton.removeAttribute("disabled");null!=t&&(mxEvent.removeListener(n,"scroll",t),t=null);null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");var B=mxUtils.bind(this,function(){x(k+1)});mxEvent.addListener(v,
-"click",B);this.executeRequest(l,mxUtils.bind(this,function(f){this.ui.spinner.stop();1==k&&(p(),n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){if(""==e)e=null,D();else{var a=e.split("/");e=a.slice(0,a.length-1).join("/");x()}}),"4px")));var l=JSON.parse(f.getText());if(null==l||0==l.length)mxUtils.write(n,mxResources.get("noFiles"));else{var z=!0,t=0;f=mxUtils.bind(this,function(f){for(var k=0;k<l.length;k++)mxUtils.bind(this,function(k,l){if(f==("dir"==k.type)){var p=q.cloneNode();p.style.backgroundColor=
-z?"#eeeeee":"";z=!z;var B=document.createElement("img");B.src=IMAGE_PATH+"/"+("dir"==k.type?"folder.png":"file.png");B.setAttribute("align","absmiddle");B.style.marginRight="4px";B.style.marginTop="-4px";B.width=20;p.appendChild(B);p.appendChild(m(k.name+("dir"==k.type?"/":""),mxUtils.bind(this,function(){"dir"==k.type?(e=k.path,x()):a&&"file"==k.type&&(this.ui.hideDialog(),c(d+"/"+b+"/"+encodeURIComponent(g)+"/"+k.path))})));n.appendChild(p);t++}})(l[k],k)});f(!0);a&&f(!1)}}),u,!0)}),y=mxUtils.bind(this,
-function(a){null==a&&(n.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+b+"/branches?per_page=100&page="+a,null,"GET");f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=t&&(mxEvent.removeListener(n,"scroll",t),t=null);null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");var k=
-mxUtils.bind(this,function(){y(a+1)});mxEvent.addListener(v,"click",k);this.executeRequest(c,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(p(!0),n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){e=null;D()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(n,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a,b){var c=q.cloneNode();c.style.backgroundColor=0==b%2?"#eeeeee":"";c.appendChild(m(a.name,mxUtils.bind(this,function(){g=
-a.name;e="";x()})));n.appendChild(c)})(b[c],c);100==b.length&&(n.appendChild(v),t=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",t))}}),u)}),D=mxUtils.bind(this,function(a){null==a&&(n.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=t&&mxEvent.removeListener(n,"scroll",t);null!=v&&null!=v.parentNode&&
-v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){D(a+1)});mxEvent.addListener(v,"click",k);this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();c=JSON.parse(c.getText());if(null==c||0==c.length)mxUtils.write(n,mxResources.get("noFiles"));else{1==a&&(n.appendChild(m(mxResources.get("enterValue")+"...",mxUtils.bind(this,
-function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(a){if(null!=a){var c=a.split("/");if(1<c.length){a=c[0];var f=c[1];3>c.length?(d=a,b=f,e=g=null,y()):this.ui.spinner.spin(n,mxResources.get("loading"))&&(c=encodeURIComponent(c.slice(2,c.length).join("/")),this.getFile(a+"/"+f+"/"+c,mxUtils.bind(this,function(a){this.ui.spinner.stop();d=a.meta.org;b=a.meta.repo;g=decodeURIComponent(a.meta.ref);e="";x()}),mxUtils.bind(this,function(a){this.ui.spinner.stop();
-this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(n),mxUtils.br(n));for(var f=0;f<c.length;f++)mxUtils.bind(this,function(a,c){var f=q.cloneNode();f.style.backgroundColor=0==c%2?"#eeeeee":"";f.appendChild(m(a.full_name,mxUtils.bind(this,function(){d=a.owner.login;b=a.name;g=a.default_branch;
-e="";x()})));n.appendChild(f)})(c[f],f)}100==c.length&&(n.appendChild(v),t=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",t))}),u)});D()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,c,d){DrawioFile.call(this,a,c);this.meta=d;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
+GitHubClient.prototype.saveFile=function(a,c,d,b,g){var e=a.meta.org,k=a.meta.repo,n=a.meta.ref,m=a.meta.path,t=mxUtils.bind(this,function(b,f){this.writeFile(e,k,n,m,g,f,b,mxUtils.bind(this,function(b){delete a.meta.isNew;c(JSON.parse(b.getText()).content.sha)}),mxUtils.bind(this,function(a){d(a)}))}),f=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(m)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){t(a.meta.sha,b)}),d,this.ui.getCurrentFile()!=a?a.getData():null):
+t(a.meta.sha,Base64.encode(a.getData()))});b?this.getSha(e,k,m,n,mxUtils.bind(this,function(b){a.meta.sha=b;f()}),d):f()};GitHubClient.prototype.pickLibrary=function(a){this.pickFile(a)};GitHubClient.prototype.pickFolder=function(a){this.showGitHubDialog(!1,a)};GitHubClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("H"+encodeURIComponent(a))});this.showGitHubDialog(!0,a)};
+GitHubClient.prototype.showGitHubDialog=function(a,c){var d=null,b=null,g=null,e=null,k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.height="304px";var n=document.createElement("h3");mxUtils.write(n,mxResources.get(a?"selectFile":"selectFolder"));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(n);var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.border="1px solid lightgray";m.style.boxSizing=
+"border-box";m.style.padding="4px";m.style.overflow="auto";m.style.lineHeight="1.2em";m.style.height="274px";k.appendChild(m);var t=document.createElement("div");t.style.textOverflow="ellipsis";t.style.boxSizing="border-box";t.style.overflow="hidden";t.style.padding="4px";t.style.width="100%";var f=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){c(d+"/"+b+"/"+encodeURIComponent(g)+"/"+e)}));this.ui.showDialog(f.container,420,360,!0,!0);a&&f.okButton.parentNode.removeChild(f.okButton);var l=
+mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("href","javascript:void(0);");d.setAttribute("title",a);mxUtils.write(d,a);mxEvent.addListener(d,"click",b);null!=c&&(a=t.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),p=mxUtils.bind(this,function(a){var c=document.createElement("div");c.style.marginBottom="8px";c.appendChild(l(d+"/"+b,mxUtils.bind(this,function(){e=null;D()})));a||(mxUtils.write(c," / "),c.appendChild(l(decodeURIComponent(g),mxUtils.bind(this,
+function(){e=null;y()}))));if(null!=e&&0<e.length){var f=e.split("/");for(a=0;a<f.length;a++)(function(a){mxUtils.write(c," / ");c.appendChild(l(f[a],mxUtils.bind(this,function(){e=f.slice(0,a+1).join("/");x()})))})(a)}m.appendChild(c)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(e=g=b=d=null,D()):this.ui.hideDialog()}))}),v=null,q=null,x=mxUtils.bind(this,function(k){null==k&&(m.innerHTML="",k=1);var n=new mxXmlRequest(this.baseUrl+
+"/repos/"+d+"/"+b+"/contents/"+e+"?ref="+encodeURIComponent(g)+"&per_page=100&page="+k,null,"GET");this.ui.spinner.spin(m,mxResources.get("loading"));f.okButton.removeAttribute("disabled");null!=q&&(mxEvent.removeListener(m,"scroll",q),q=null);null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");var B=mxUtils.bind(this,function(){x(k+1)});mxEvent.addListener(v,
+"click",B);this.executeRequest(n,mxUtils.bind(this,function(f){this.ui.spinner.stop();1==k&&(p(),m.appendChild(l("../ [Up]",mxUtils.bind(this,function(){if(""==e)e=null,D();else{var a=e.split("/");e=a.slice(0,a.length-1).join("/");x()}}),"4px")));var n=JSON.parse(f.getText());if(null==n||0==n.length)mxUtils.write(m,mxResources.get("noFiles"));else{var z=!0,q=0;f=mxUtils.bind(this,function(f){for(var k=0;k<n.length;k++)mxUtils.bind(this,function(k,n){if(f==("dir"==k.type)){var p=t.cloneNode();p.style.backgroundColor=
+z?"#eeeeee":"";z=!z;var B=document.createElement("img");B.src=IMAGE_PATH+"/"+("dir"==k.type?"folder.png":"file.png");B.setAttribute("align","absmiddle");B.style.marginRight="4px";B.style.marginTop="-4px";B.width=20;p.appendChild(B);p.appendChild(l(k.name+("dir"==k.type?"/":""),mxUtils.bind(this,function(){"dir"==k.type?(e=k.path,x()):a&&"file"==k.type&&(this.ui.hideDialog(),c(d+"/"+b+"/"+encodeURIComponent(g)+"/"+k.path))})));m.appendChild(p);q++}})(n[k],k)});f(!0);a&&f(!1)}}),u,!0)}),y=mxUtils.bind(this,
+function(a){null==a&&(m.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+b+"/branches?per_page=100&page="+a,null,"GET");f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=q&&(mxEvent.removeListener(m,"scroll",q),q=null);null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");var k=
+mxUtils.bind(this,function(){y(a+1)});mxEvent.addListener(v,"click",k);this.executeRequest(c,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(p(!0),m.appendChild(l("../ [Up]",mxUtils.bind(this,function(){e=null;D()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(m,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a,b){var c=t.cloneNode();c.style.backgroundColor=0==b%2?"#eeeeee":"";c.appendChild(l(a.name,mxUtils.bind(this,function(){g=
+a.name;e="";x()})));m.appendChild(c)})(b[c],c);100==b.length&&(m.appendChild(v),q=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&k()},mxEvent.addListener(m,"scroll",q))}}),u)}),D=mxUtils.bind(this,function(a){null==a&&(m.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=q&&mxEvent.removeListener(m,"scroll",q);null!=v&&null!=v.parentNode&&
+v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){D(a+1)});mxEvent.addListener(v,"click",k);this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();c=JSON.parse(c.getText());if(null==c||0==c.length)mxUtils.write(m,mxResources.get("noFiles"));else{1==a&&(m.appendChild(l(mxResources.get("enterValue")+"...",mxUtils.bind(this,
+function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(a){if(null!=a){var c=a.split("/");if(1<c.length){a=c[0];var f=c[1];3>c.length?(d=a,b=f,e=g=null,y()):this.ui.spinner.spin(m,mxResources.get("loading"))&&(c=encodeURIComponent(c.slice(2,c.length).join("/")),this.getFile(a+"/"+f+"/"+c,mxUtils.bind(this,function(a){this.ui.spinner.stop();d=a.meta.org;b=a.meta.repo;g=decodeURIComponent(a.meta.ref);e="";x()}),mxUtils.bind(this,function(a){this.ui.spinner.stop();
+this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(m),mxUtils.br(m));for(var f=0;f<c.length;f++)mxUtils.bind(this,function(a,c){var f=t.cloneNode();f.style.backgroundColor=0==c%2?"#eeeeee":"";f.appendChild(l(a.full_name,mxUtils.bind(this,function(){d=a.owner.login;b=a.name;g=a.default_branch;
+e="";x()})));m.appendChild(f)})(c[f],f)}100==c.length&&(m.appendChild(v),q=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&k()},mxEvent.addListener(m,"scroll",q))}),u)});D()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,c,d){DrawioFile.call(this,a,c);this.meta=d;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
TrelloFile.prototype.save=function(a,c,d){this.doSave(this.getTitle(),c,d)};TrelloFile.prototype.saveAs=function(a,c,d){this.doSave(a,c,d)};TrelloFile.prototype.doSave=function(a,c,d){var b=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=b;this.saveFile(a,!1,c,d)};
TrelloFile.prototype.saveFile=function(a,c,d,b){if(this.isEditable())if(this.savingFile)null!=b&&(this.saveNeededCounter++,b({code:App.ERROR_BUSY}));else if(this.savingFile=!0,this.savingFileTime=new Date,this.getTitle()==a){var g=this.isModified,e=this.isModified(),k=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return e}});k();this.ui.trello.saveFile(this,mxUtils.bind(this,function(e){this.savingFile=!1;this.isModified=g;this.meta=e;this.contentChanged();null!=d&&
d();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a,c,d,b))}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=g;this.setModified(e||this.isModified());if(null!=b){if(null!=a&&null!=a.retry){var c=a.retry;a.retry=function(){k();c()}}b(a)}}))}else this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(e){this.ui.trello.insertFile(a,this.getData(),mxUtils.bind(this,function(e){this.savingFile=!1;null!=d&&d();this.ui.fileLoaded(e);0<this.saveNeededCounter&&
(this.saveNeededCounter--,this.saveFile(a,c,d,b))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}),!1,e)}));else null!=d&&d()};TrelloLibrary=function(a,c,d){TrelloFile.call(this,a,c,d)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(a,c,d){this.saveFile(a,!1,c,d)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(a){DrawioClient.call(this,a,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e73615c79cf7e381aef91c85936e9553";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml";
TrelloClient.prototype.authenticate=function(a,c,d){d&&this.logout();d=mxUtils.bind(this,function(b,d){Trello.authorize({type:"popup",name:"draw.io",scope:{read:"true",write:"true"},expiration:b?"never":"1hour",success:function(){null!=d&&d();a()},error:function(){null!=d&&d();null!=c&&c(mxResources.get("loggedOut"))}})});this.isAuthorized()?d(!0):this.ui.showAuthDialog(this,!0,d)};TrelloClient.prototype.getLibrary=function(a,c,d){this.getFile(a,c,d,!1,!0)};
-TrelloClient.prototype.getFile=function(a,c,d,b,g){g=null!=g?g:!1;var e=mxUtils.bind(this,function(){var b=a.split(this.SEPARATOR),l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout);Trello.cards.get(b[0]+"/attachments/"+b[1],mxUtils.bind(this,function(b){window.clearTimeout(n);if(l){var f=/\.png$/i.test(b.name);/\.v(dx|sdx?)$/i.test(b.name)||/\.gliffy$/i.test(b.name)||!this.ui.useCanvasForExport&&f?this.ui.convertFile(PROXY_URL+"?url="+
-encodeURIComponent(b.url),b.name,b.mimeType,this.extension,c,d):(l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b.url),mxUtils.bind(this,function(d){window.clearTimeout(n);if(l){b.compoundId=a;var e=f?d.lastIndexOf(","):-1;0<e&&(e=this.ui.extractGraphModelFromPng(d.substring(e+1)),null!=e&&0<e.length&&(d=e));g?c(new TrelloLibrary(this.ui,d,b)):c(new TrelloFile(this.ui,d,b))}}),mxUtils.bind(this,
-function(a,b){window.clearTimeout(n);l&&(401==b.status?this.authenticate(e,d,!0):d())}),f||null!=b.mimeType&&"image/"==b.mimeType.substring(0,6)))}}),mxUtils.bind(this,function(a){window.clearTimeout(n);l&&(null!=a&&401==a.status?this.authenticate(e,d,!0):d())}))});this.authenticate(e,d)};TrelloClient.prototype.insertLibrary=function(a,c,d,b,g){this.insertFile(a,c,d,b,!0,g)};
+TrelloClient.prototype.getFile=function(a,c,d,b,g){g=null!=g?g:!1;var e=mxUtils.bind(this,function(){var b=a.split(this.SEPARATOR),n=!0,m=window.setTimeout(mxUtils.bind(this,function(){n=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout);Trello.cards.get(b[0]+"/attachments/"+b[1],mxUtils.bind(this,function(b){window.clearTimeout(m);if(n){var f=/\.png$/i.test(b.name);/\.v(dx|sdx?)$/i.test(b.name)||/\.gliffy$/i.test(b.name)||!this.ui.useCanvasForExport&&f?this.ui.convertFile(PROXY_URL+"?url="+
+encodeURIComponent(b.url),b.name,b.mimeType,this.extension,c,d):(n=!0,m=window.setTimeout(mxUtils.bind(this,function(){n=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b.url),mxUtils.bind(this,function(d){window.clearTimeout(m);if(n){b.compoundId=a;var e=f?d.lastIndexOf(","):-1;0<e&&(e=this.ui.extractGraphModelFromPng(d.substring(e+1)),null!=e&&0<e.length&&(d=e));g?c(new TrelloLibrary(this.ui,d,b)):c(new TrelloFile(this.ui,d,b))}}),mxUtils.bind(this,
+function(a,b){window.clearTimeout(m);n&&(401==b.status?this.authenticate(e,d,!0):d())}),f||null!=b.mimeType&&"image/"==b.mimeType.substring(0,6)))}}),mxUtils.bind(this,function(a){window.clearTimeout(m);n&&(null!=a&&401==a.status?this.authenticate(e,d,!0):d())}))});this.authenticate(e,d)};TrelloClient.prototype.insertLibrary=function(a,c,d,b,g){this.insertFile(a,c,d,b,!0,g)};
TrelloClient.prototype.insertFile=function(a,c,d,b,g,e){g=null!=g?g:!1;var k=mxUtils.bind(this,function(){var k=mxUtils.bind(this,function(k){this.writeFile(a,k,e,mxUtils.bind(this,function(a){g?d(new TrelloLibrary(this.ui,c,a)):d(new TrelloFile(this.ui,c,a))}),b)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){k(this.ui.base64ToBlob(a,"image/png"))}),b,c):k(c)});this.authenticate(k,b)};
TrelloClient.prototype.saveFile=function(a,c,d){var b=a.meta.compoundId.split(this.SEPARATOR),g=mxUtils.bind(this,function(g){this.writeFile(a.meta.name,g,b[0],function(a){Trello.del("cards/"+b[0]+"/attachments/"+b[1],mxUtils.bind(this,function(){c(a)}),mxUtils.bind(this,function(a){null!=a&&401==a.status?this.authenticate(e,d,!0):d()}))},d)}),e=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){g(this.ui.base64ToBlob(a,
"image/png"))}),d,this.ui.getCurrentFile()!=a?a.getData():null):g(a.getData())});this.authenticate(e,d)};
-TrelloClient.prototype.writeFile=function(a,c,d,b,g){if(null!=a&&null!=c)if(c.length>=this.maxFileSize)g({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(c.length)+" / 10 MB)"});else{var e=mxUtils.bind(this,function(){var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;g({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout),n=new FormData;n.append("key",Trello.key());n.append("token",Trello.token());n.append("file","string"===typeof c?new Blob([c]):c,a);n.append("name",
-a);var q=new XMLHttpRequest;q.responseType="json";q.onreadystatechange=mxUtils.bind(this,function(){if(4===q.readyState&&(window.clearTimeout(l),k))if(200==q.status){var a=q.response;a.compoundId=d+this.SEPARATOR+a.id;b(a)}else 401==q.status?this.authenticate(e,g,!0):g()});q.open("POST",this.baseUrl+"cards/"+d+"/attachments");q.send(n)});this.authenticate(e,g)}else g({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(a){this.pickFile(a)};
+TrelloClient.prototype.writeFile=function(a,c,d,b,g){if(null!=a&&null!=c)if(c.length>=this.maxFileSize)g({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(c.length)+" / 10 MB)"});else{var e=mxUtils.bind(this,function(){var k=!0,n=window.setTimeout(mxUtils.bind(this,function(){k=!1;g({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout),m=new FormData;m.append("key",Trello.key());m.append("token",Trello.token());m.append("file","string"===typeof c?new Blob([c]):c,a);m.append("name",
+a);var t=new XMLHttpRequest;t.responseType="json";t.onreadystatechange=mxUtils.bind(this,function(){if(4===t.readyState&&(window.clearTimeout(n),k))if(200==t.status){var a=t.response;a.compoundId=d+this.SEPARATOR+a.id;b(a)}else 401==t.status?this.authenticate(e,g,!0):g()});t.open("POST",this.baseUrl+"cards/"+d+"/attachments");t.send(m)});this.authenticate(e,g)}else g({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(a){this.pickFile(a)};
TrelloClient.prototype.pickFolder=function(a){this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!1,a)}),mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)}))};TrelloClient.prototype.pickFile=function(a,c){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("T"+encodeURIComponent(a))});this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!0,a)}),mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a,mxResources.get("ok"))}))};
-TrelloClient.prototype.showTrelloDialog=function(a,c){var d=null,b="@me",g=0,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.height="224px";var k=document.createElement("h3");mxUtils.write(k,a?mxResources.get("selectFile"):mxResources.get("selectCard"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(k);var l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.overflow="auto";l.style.height=
-"194px";e.appendChild(l);e=new CustomDialog(this.ui,e);this.ui.showDialog(e.container,340,270,!0,!0);e.okButton.parentNode.removeChild(e.okButton);var n=mxUtils.bind(this,function(a,b,c){g++;var d=document.createElement("div");d.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;background:"+(0==g%2?"#eee":"#fff");var e=document.createElement("a");e.setAttribute("href","javascript:void(0);");if(null!=c){var f=document.createElement("img");f.src=c.url;f.width=c.width;f.height=
-c.height;f.style="border: 1px solid black;margin:5px;vertical-align:middle";e.appendChild(f)}mxUtils.write(e,a);mxEvent.addListener(e,"click",b);d.appendChild(e);return d}),q=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),f=mxUtils.bind(this,function(){g=0;l.innerHTML="";this.ui.spinner.spin(l,mxResources.get("loading"));var a=mxUtils.bind(this,function(){Trello.cards.get(d+"/attachments",{fields:"id,name,previews"},
-mxUtils.bind(this,function(a){this.ui.spinner.stop();l.appendChild(n("../ [Up]",mxUtils.bind(this,function(){u()})));mxUtils.br(l);null==a||0==a.length?mxUtils.write(l,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var b=0;b<a.length;b++)mxUtils.bind(this,function(a){l.appendChild(n(a.name,mxUtils.bind(this,function(){this.ui.hideDialog();c(d+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[b])})()}),mxUtils.bind(this,function(b){401==b.status?this.authenticate(a,q,!0):
-null!=q&&q(b)}))});a()}),m=null,p=null,u=mxUtils.bind(this,function(e){null==e&&(g=0,l.innerHTML="",e=1);this.ui.spinner.spin(l,mxResources.get("loading"));null!=m&&null!=m.parentNode&&m.parentNode.removeChild(m);m=document.createElement("a");m.style.display="block";m.setAttribute("href","javascript:void(0);");mxUtils.write(m,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(l,"scroll",p);u(e+1)});mxEvent.addListener(m,"click",k);var v=mxUtils.bind(this,function(){Trello.get("search",
-{query:""==mxUtils.trim(b)?"is:open":b,cards_limit:100,cards_page:e-1},mxUtils.bind(this,function(g){this.ui.spinner.stop();g=null!=g?g.cards:null;if(null==g||0==g.length)mxUtils.write(l,mxResources.get("noFiles"));else{1==e&&(l.appendChild(n(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,b,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(b=a,u())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
-this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(l));for(var t=0;t<g.length;t++)mxUtils.bind(this,function(b){l.appendChild(n(b.name,mxUtils.bind(this,function(){a?(d=b.id,f()):(this.ui.hideDialog(),c(b.id))})))})(g[t]);100==g.length&&(l.appendChild(m),p=function(){l.scrollTop>=l.scrollHeight-l.offsetHeight&&k()},mxEvent.addListener(l,"scroll",p))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(v,q,!0):null!=q&&q({message:a.responseText})}))});v()});u()};
+TrelloClient.prototype.showTrelloDialog=function(a,c){var d=null,b="@me",g=0,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.height="224px";var k=document.createElement("h3");mxUtils.write(k,a?mxResources.get("selectFile"):mxResources.get("selectCard"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(k);var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.overflow="auto";n.style.height=
+"194px";e.appendChild(n);e=new CustomDialog(this.ui,e);this.ui.showDialog(e.container,340,270,!0,!0);e.okButton.parentNode.removeChild(e.okButton);var m=mxUtils.bind(this,function(a,b,c){g++;var d=document.createElement("div");d.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;background:"+(0==g%2?"#eee":"#fff");var e=document.createElement("a");e.setAttribute("href","javascript:void(0);");if(null!=c){var f=document.createElement("img");f.src=c.url;f.width=c.width;f.height=
+c.height;f.style="border: 1px solid black;margin:5px;vertical-align:middle";e.appendChild(f)}mxUtils.write(e,a);mxEvent.addListener(e,"click",b);d.appendChild(e);return d}),t=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),f=mxUtils.bind(this,function(){g=0;n.innerHTML="";this.ui.spinner.spin(n,mxResources.get("loading"));var a=mxUtils.bind(this,function(){Trello.cards.get(d+"/attachments",{fields:"id,name,previews"},
+mxUtils.bind(this,function(a){this.ui.spinner.stop();n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){u()})));mxUtils.br(n);null==a||0==a.length?mxUtils.write(n,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var b=0;b<a.length;b++)mxUtils.bind(this,function(a){n.appendChild(m(a.name,mxUtils.bind(this,function(){this.ui.hideDialog();c(d+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[b])})()}),mxUtils.bind(this,function(b){401==b.status?this.authenticate(a,t,!0):
+null!=t&&t(b)}))});a()}),l=null,p=null,u=mxUtils.bind(this,function(e){null==e&&(g=0,n.innerHTML="",e=1);this.ui.spinner.spin(n,mxResources.get("loading"));null!=l&&null!=l.parentNode&&l.parentNode.removeChild(l);l=document.createElement("a");l.style.display="block";l.setAttribute("href","javascript:void(0);");mxUtils.write(l,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(n,"scroll",p);u(e+1)});mxEvent.addListener(l,"click",k);var v=mxUtils.bind(this,function(){Trello.get("search",
+{query:""==mxUtils.trim(b)?"is:open":b,cards_limit:100,cards_page:e-1},mxUtils.bind(this,function(g){this.ui.spinner.stop();g=null!=g?g.cards:null;if(null==g||0==g.length)mxUtils.write(n,mxResources.get("noFiles"));else{1==e&&(n.appendChild(m(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,b,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(b=a,u())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
+this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(n));for(var q=0;q<g.length;q++)mxUtils.bind(this,function(b){n.appendChild(m(b.name,mxUtils.bind(this,function(){a?(d=b.id,f()):(this.ui.hideDialog(),c(b.id))})))})(g[q]);100==g.length&&(n.appendChild(l),p=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",p))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(v,t,!0):null!=t&&t({message:a.responseText})}))});v()});u()};
TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(a){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};GitLabFile=function(a,c,d){GitHubFile.call(this,a,c,d);this.peer=this.ui.gitLab};mxUtils.extend(GitLabFile,GitHubFile);GitLabFile.prototype.getId=function(){return this.meta.org+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):"")};GitLabFile.prototype.getHash=function(){return encodeURIComponent("A"+this.getId())};GitLabFile.prototype.isConflict=function(a){return null!=a&&400==a.status};
GitLabFile.prototype.getMode=function(){return App.MODE_GITLAB};GitLabFile.prototype.getDescriptorEtag=function(a){return a.last_commit_id};GitLabFile.prototype.setDescriptorEtag=function(a,c){a.last_commit_id=c};GitLabLibrary=function(a,c,d){GitLabFile.call(this,a,c,d)};mxUtils.extend(GitLabLibrary,GitLabFile);GitLabLibrary.prototype.doSave=function(a,c,d){this.saveFile(a,!1,c,d)};GitLabLibrary.prototype.open=function(){};GitLabClient=function(a){GitHubClient.call(this,a,"gitlabauth")};mxUtils.extend(GitLabClient,GitHubClient);GitLabClient.prototype.clientId=DRAWIO_GITLAB_ID;GitLabClient.prototype.scope="api%20read_repository%20write_repository";GitLabClient.prototype.baseUrl=DRAWIO_GITLAB_URL+"/api/v4";
GitLabClient.prototype.authenticate=function(a,c){if(null==window.onGitLabCallback){var d=mxUtils.bind(this,function(){var b=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(g,e){var k=window.location.href,k=k.substring(0,k.lastIndexOf("/")),k=encodeURIComponent(k+"/gitlab.html");null!=window.open(DRAWIO_GITLAB_URL+"/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope+"&redirect_uri="+k+"&response_type=token&state=123","gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,
-function(k,n){b?(window.onGitLabCallback=null,b=!1,null==k?c({message:mxResources.get("accessDenied"),retry:d}):(null!=e&&e(),this.token=k,this.setUser(null),g&&this.setPersistentToken(this.token),a())):null!=n&&n.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:d})}),mxUtils.bind(this,function(){b&&(window.onGitLabCallback=null,b=!1,c({message:mxResources.get("accessDenied"),retry:d}))}))});d()}else c({code:App.ERROR_BUSY})};
-GitLabClient.prototype.executeRequest=function(a,c,d,b){var g=mxUtils.bind(this,function(k){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),q=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","Bearer "+q);a.setRequestHeader("PRIVATE_TOKEN",q);a.setRequestHeader("Content-Type","application/json")};a.send(mxUtils.bind(this,function(){window.clearTimeout(n);if(l)if(200<=a.getStatus()&&
-299>=a.getStatus()||b&&404==a.getStatus())c(a);else if(401===a.getStatus())k?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){e(!0)},d)})}):this.authenticate(function(){g(!0)},d);else if(403===a.getStatus()){var f=!1;try{var m=JSON.parse(a.getText());null!=m&&null!=m.errors&&0<m.errors.length&&(f="too_large"==m.errors[0].code)}catch(p){}d({message:mxResources.get(f?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?d({message:this.getErrorMessage(a,
+function(k,m){b?(window.onGitLabCallback=null,b=!1,null==k?c({message:mxResources.get("accessDenied"),retry:d}):(null!=e&&e(),this.token=k,this.setUser(null),g&&this.setPersistentToken(this.token),a())):null!=m&&m.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:d})}),mxUtils.bind(this,function(){b&&(window.onGitLabCallback=null,b=!1,c({message:mxResources.get("accessDenied"),retry:d}))}))});d()}else c({code:App.ERROR_BUSY})};
+GitLabClient.prototype.executeRequest=function(a,c,d,b){var g=mxUtils.bind(this,function(k){var n=!0,m=window.setTimeout(mxUtils.bind(this,function(){n=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),t=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","Bearer "+t);a.setRequestHeader("PRIVATE_TOKEN",t);a.setRequestHeader("Content-Type","application/json")};a.send(mxUtils.bind(this,function(){window.clearTimeout(m);if(n)if(200<=a.getStatus()&&
+299>=a.getStatus()||b&&404==a.getStatus())c(a);else if(401===a.getStatus())k?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){e(!0)},d)})}):this.authenticate(function(){g(!0)},d);else if(403===a.getStatus()){var f=!1;try{var l=JSON.parse(a.getText());null!=l&&null!=l.errors&&0<l.errors.length&&(f="too_large"==l.errors[0].code)}catch(p){}d({message:mxResources.get(f?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?d({message:this.getErrorMessage(a,
mxResources.get("fileNotFound"))}):400===a.getStatus()?d({status:400}):d({status:a.getStatus(),message:this.getErrorMessage(a,mxResources.get("error")+" "+a.getStatus())})}),d)}),e=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){e(!0)},d,a):g(a)});null==this.token?this.authenticate(function(){e(!0)},d):e(!1)};
-GitLabClient.prototype.getRefIndex=function(a,c,d,b,g){if(null!=g)d(a,g);else{var e=a.length-2,k=mxUtils.bind(this,function(){if(2>e)b({message:mxResources.get("fileNotFound")});else{var g=Math.max(e-1,0),n=a.slice(0,g).join("/"),g=a[g],q=a[e],f=a.slice(e+1,a.length).join("/"),n=this.baseUrl+"/projects/"+encodeURIComponent(n+"/"+g)+"/repository/"+(c?"tree?path="+f+"&ref="+q:"files/"+encodeURIComponent(f)+"?ref="+q),m=new mxXmlRequest(n,null,"HEAD");this.executeRequest(m,mxUtils.bind(this,function(){200==
-m.getStatus()?d(a,e):b({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==m.getStatus()?(e--,k()):b({message:mxResources.get("fileNotFound")})}))}});k()}};
-GitLabClient.prototype.getFile=function(a,c,d,b,g,e){b=null!=b?b:!1;this.getRefIndex(a.split("/"),!1,mxUtils.bind(this,function(e,l){var k=Math.max(l-1,0),q=e.slice(0,k).join("/"),f=e[k],m=e[l];a=e.slice(l+1,e.length).join("/");k=/\.png$/i.test(a);if(!g&&(/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&k))null!=this.token?(k=this.baseUrl+"/projects/"+encodeURIComponent(q+"/"+f)+"/repository/files/"+encodeURIComponent(m),e=a.split("/"),this.ui.convertFile(k,0<e.length?
-e[e.length-1]:a,null,this.extension,c,d)):d({message:mxResources.get("accessDenied")});else{var p="&t="+(new Date).getTime(),k=this.baseUrl+"/projects/"+encodeURIComponent(q+"/"+f)+"/repository/files/"+encodeURIComponent(a)+"?ref="+m,k=new mxXmlRequest(k+p,null,"GET");this.executeRequest(k,mxUtils.bind(this,function(a){try{c(this.createGitLabFile(q,f,m,JSON.parse(a.getText()),b,l))}catch(v){d(v)}}),d)}}),d,e)};
-GitLabClient.prototype.createGitLabFile=function(a,c,d,b,g,e){var k=DRAWIO_GITLAB_URL+"/",l=b.file_name;a={org:a,repo:c,ref:d,name:l,path:b.file_path,html_url:k+a+"/"+c+"/blob/"+d+"/"+b.file_path,download_url:k+a+"/"+c+"/raw/"+d+"/"+b.file_path+"?inline=false",last_commit_id:b.last_commit_id,refPos:e};c=b.content;"base64"===b.encoding&&(/\.jpe?g$/i.test(l)?c="data:image/jpeg;base64,"+c:/\.gif$/i.test(l)?c="data:image/gif;base64,"+c:/\.png$/i.test(l)?(b=this.ui.extractGraphModelFromPng(c),c=null!=
+GitLabClient.prototype.getRefIndex=function(a,c,d,b,g){if(null!=g)d(a,g);else{var e=a.length-2,k=mxUtils.bind(this,function(){if(2>e)b({message:mxResources.get("fileNotFound")});else{var g=Math.max(e-1,0),m=a.slice(0,g).join("/"),g=a[g],t=a[e],f=a.slice(e+1,a.length).join("/"),m=this.baseUrl+"/projects/"+encodeURIComponent(m+"/"+g)+"/repository/"+(c?"tree?path="+f+"&ref="+t:"files/"+encodeURIComponent(f)+"?ref="+t),l=new mxXmlRequest(m,null,"HEAD");this.executeRequest(l,mxUtils.bind(this,function(){200==
+l.getStatus()?d(a,e):b({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==l.getStatus()?(e--,k()):b({message:mxResources.get("fileNotFound")})}))}});k()}};
+GitLabClient.prototype.getFile=function(a,c,d,b,g,e){b=null!=b?b:!1;this.getRefIndex(a.split("/"),!1,mxUtils.bind(this,function(e,n){var k=Math.max(n-1,0),t=e.slice(0,k).join("/"),f=e[k],l=e[n];a=e.slice(n+1,e.length).join("/");k=/\.png$/i.test(a);if(!g&&(/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&k))null!=this.token?(k=this.baseUrl+"/projects/"+encodeURIComponent(t+"/"+f)+"/repository/files/"+encodeURIComponent(l),e=a.split("/"),this.ui.convertFile(k,0<e.length?
+e[e.length-1]:a,null,this.extension,c,d)):d({message:mxResources.get("accessDenied")});else{var p="&t="+(new Date).getTime(),k=this.baseUrl+"/projects/"+encodeURIComponent(t+"/"+f)+"/repository/files/"+encodeURIComponent(a)+"?ref="+l,k=new mxXmlRequest(k+p,null,"GET");this.executeRequest(k,mxUtils.bind(this,function(a){try{c(this.createGitLabFile(t,f,l,JSON.parse(a.getText()),b,n))}catch(v){d(v)}}),d)}}),d,e)};
+GitLabClient.prototype.createGitLabFile=function(a,c,d,b,g,e){var k=DRAWIO_GITLAB_URL+"/",n=b.file_name;a={org:a,repo:c,ref:d,name:n,path:b.file_path,html_url:k+a+"/"+c+"/blob/"+d+"/"+b.file_path,download_url:k+a+"/"+c+"/raw/"+d+"/"+b.file_path+"?inline=false",last_commit_id:b.last_commit_id,refPos:e};c=b.content;"base64"===b.encoding&&(/\.jpe?g$/i.test(n)?c="data:image/jpeg;base64,"+c:/\.gif$/i.test(n)?c="data:image/gif;base64,"+c:/\.png$/i.test(n)?(b=this.ui.extractGraphModelFromPng(c),c=null!=
b&&0<b.length?b:"data:image/png;base64,"+c):c=Base64.decode(c));return g?new GitLabLibrary(this.ui,c,a):new GitLabFile(this.ui,c,a)};
-GitLabClient.prototype.insertFile=function(a,c,d,b,g,e,k){g=null!=g?g:!1;this.getRefIndex(e.split("/"),!0,mxUtils.bind(this,function(e,n){var l=Math.max(n-1,0),f=e.slice(0,l).join("/"),m=e[l],p=e[n];path=e.slice(n+1,e.length).join("/");0<path.length&&(path+="/");path+=a;this.checkExists(f+"/"+m+"/"+p+"/"+path,!0,mxUtils.bind(this,function(e,l){if(e)if(g)k||(c=Base64.encode(c)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(f,m,p,path,a,c,l,mxUtils.bind(this,function(a){try{var c=
-JSON.parse(a.getText());d(this.createGitLabFile(f,m,p,c.content,g,n))}catch(I){b(I)}}),b)}),b);else{var t=DRAWIO_GITLAB_URL+"/";d(new GitLabFile(this.ui,c,{org:f,repo:m,ref:p,name:a,path:path,html_url:t+f+"/"+m+"/blob/"+p+"/"+path,download_url:t+f+"/"+m+"/raw/"+p+"/"+path+"?inline=false",refPos:n,last_commit_id:l,isNew:!0}))}else b()}))}),b)};
+GitLabClient.prototype.insertFile=function(a,c,d,b,g,e,k){g=null!=g?g:!1;this.getRefIndex(e.split("/"),!0,mxUtils.bind(this,function(e,m){var n=Math.max(m-1,0),f=e.slice(0,n).join("/"),l=e[n],p=e[m];path=e.slice(m+1,e.length).join("/");0<path.length&&(path+="/");path+=a;this.checkExists(f+"/"+l+"/"+p+"/"+path,!0,mxUtils.bind(this,function(e,n){if(e)if(g)k||(c=Base64.encode(c)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(f,l,p,path,a,c,n,mxUtils.bind(this,function(a){try{var c=
+JSON.parse(a.getText());d(this.createGitLabFile(f,l,p,c.content,g,m))}catch(I){b(I)}}),b)}),b);else{var q=DRAWIO_GITLAB_URL+"/";d(new GitLabFile(this.ui,c,{org:f,repo:l,ref:p,name:a,path:path,html_url:q+f+"/"+l+"/blob/"+p+"/"+path,download_url:q+f+"/"+l+"/raw/"+p+"/"+path+"?inline=false",refPos:m,last_commit_id:n,isNew:!0}))}else b()}))}),b)};
GitLabClient.prototype.checkExists=function(a,c,d){this.getFile(a,mxUtils.bind(this,function(b){if(c){var g=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){g();d(!0,b.getCurrentEtag())},function(){g();d(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){d(!1)})}),mxUtils.bind(this,function(a){d(!0)}),null,!0)};
-GitLabClient.prototype.writeFile=function(a,c,d,b,g,e,k,l,n){if(e.length>=this.maxFileSize)n({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 1 MB)"});else{var q="POST";d={path:encodeURIComponent(b),branch:decodeURIComponent(d),commit_message:g,content:e,encoding:"base64"};null!=k&&(d.last_commit_id=k,q="PUT");a=this.baseUrl+"/projects/"+encodeURIComponent(a+"/"+c)+"/repository/files/"+encodeURIComponent(b);q=new mxXmlRequest(a,JSON.stringify(d),q);this.executeRequest(q,
-mxUtils.bind(this,function(a){l(a)}),n)}};
-GitLabClient.prototype.saveFile=function(a,c,d,b,g){var e=a.meta.org,k=a.meta.repo,l=a.meta.ref,n=a.meta.path,q=mxUtils.bind(this,function(b,f){this.writeFile(e,k,l,n,g,f,b,mxUtils.bind(this,function(b){delete a.meta.isNew;this.getFile(e+"/"+k+"/"+l+"/"+n,mxUtils.bind(this,function(b){b.getData()==a.getData()?c(b.getCurrentEtag()):c({content:a.getCurrentEtag()})}),d,null,null,a.meta.refPos)}),d)}),f=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(n)?this.ui.getEmbeddedPng(mxUtils.bind(this,
-function(b){q(a.meta.last_commit_id,b)}),d,this.ui.getCurrentFile()!=a?a.getData():null):q(a.meta.last_commit_id,Base64.encode(a.getData()))});b?this.getFile(e+"/"+k+"/"+l+"/"+n,mxUtils.bind(this,function(b){a.meta.last_commit_id=b.meta.last_commit_id;f()}),d):f()};GitLabClient.prototype.pickFolder=function(a){this.showGitLabDialog(!1,a)};GitLabClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("A"+encodeURIComponent(a))});this.showGitLabDialog(!0,a)};
-GitLabClient.prototype.showGitLabDialog=function(a,c){var d=null,b=null,g=null,e=null,k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.height="304px";var l=document.createElement("h3");mxUtils.write(l,mxResources.get(a?"selectFile":"selectFolder"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(l);var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.border="1px solid lightgray";n.style.boxSizing=
-"border-box";n.style.padding="4px";n.style.overflow="auto";n.style.lineHeight="1.2em";n.style.height="274px";k.appendChild(n);var q=document.createElement("div");q.style.textOverflow="ellipsis";q.style.boxSizing="border-box";q.style.overflow="hidden";q.style.padding="4px";q.style.width="100%";var f=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){c(d+"/"+b+"/"+encodeURIComponent(g)+"/"+e)}));this.ui.showDialog(f.container,420,360,!0,!0);a&&f.okButton.parentNode.removeChild(f.okButton);var m=
-mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("href","javascript:void(0);");d.setAttribute("title",a);mxUtils.write(d,a);mxEvent.addListener(d,"click",b);null!=c&&(a=q.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),p=mxUtils.bind(this,function(a){var c=document.createElement("div");c.style.marginBottom="8px";c.appendChild(m(d+"/"+b,mxUtils.bind(this,function(){e=null;D()})));a||(mxUtils.write(c," / "),c.appendChild(m(decodeURIComponent(g),mxUtils.bind(this,
-function(){e=null;y()}))));if(null!=e&&0<e.length){var f=e.split("/");for(a=0;a<f.length;a++)(function(a){mxUtils.write(c," / ");c.appendChild(m(f[a],mxUtils.bind(this,function(){e=f.slice(0,a+1).join("/");x()})))})(a)}n.appendChild(c)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(e=g=b=d=null,D()):this.ui.hideDialog()}))}),v=null,t=null,x=mxUtils.bind(this,function(k){null==k&&(n.innerHTML="",k=1);var l=new mxXmlRequest(this.baseUrl+
-"/projects/"+encodeURIComponent(d+"/"+b)+"/repository/tree?path="+e+"&ref="+g+"&per_page=100&page="+k,null,"GET");this.ui.spinner.spin(n,mxResources.get("loading"));f.okButton.removeAttribute("disabled");null!=t&&(mxEvent.removeListener(n,"scroll",t),t=null);null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");var B=mxUtils.bind(this,function(){x(k+
-1)});mxEvent.addListener(v,"click",B);this.executeRequest(l,mxUtils.bind(this,function(f){this.ui.spinner.stop();1==k&&(p(!g),n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){if(""==e)e=null,D();else{var a=e.split("/");e=a.slice(0,a.length-1).join("/");x()}}),"4px")));var l=JSON.parse(f.getText());if(null==l||0==l.length)mxUtils.write(n,mxResources.get("noFiles"));else{var z=!0,u=0;f=mxUtils.bind(this,function(f){for(var k=0;k<l.length;k++)mxUtils.bind(this,function(k){if(f==("tree"==k.type)){var l=
-q.cloneNode();l.style.backgroundColor=z?"#eeeeee":"";z=!z;var p=document.createElement("img");p.src=IMAGE_PATH+"/"+("tree"==k.type?"folder.png":"file.png");p.setAttribute("align","absmiddle");p.style.marginRight="4px";p.style.marginTop="-4px";p.width=20;l.appendChild(p);l.appendChild(m(k.name+("tree"==k.type?"/":""),mxUtils.bind(this,function(){"tree"==k.type?(e=k.path,x()):a&&"blob"==k.type&&(this.ui.hideDialog(),c(d+"/"+b+"/"+g+"/"+k.path))})));n.appendChild(l);u++}})(l[k])});f(!0);a&&f(!1);100==
-u&&(n.appendChild(v),t=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&B()},mxEvent.addListener(n,"scroll",t))}}),u,!0)}),y=mxUtils.bind(this,function(a){null==a&&(n.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(d+"/"+b)+"/repository/branches?per_page=100&page="+a,null,"GET");f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=t&&(mxEvent.removeListener(n,"scroll",t),t=null);null!=v&&null!=v.parentNode&&
-v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){y(a+1)});mxEvent.addListener(v,"click",k);this.executeRequest(c,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(p(!0),n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){e=null;D()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(n,mxResources.get("noFiles"));
-else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a,b){var c=q.cloneNode();c.style.backgroundColor=0==b%2?"#eeeeee":"";c.appendChild(m(a.name,mxUtils.bind(this,function(){g=encodeURIComponent(a.name);e="";x()})));n.appendChild(c)})(b[c],c);100==b.length&&(n.appendChild(v),t=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",t))}}),u)});f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));var D=mxUtils.bind(this,
-function(a){this.ui.spinner.stop();null==a&&(n.innerHTML="",a=1);null!=t&&(mxEvent.removeListener(n,"scroll",t),t=null);null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");var c=mxUtils.bind(this,function(){D(a+1)});mxEvent.addListener(v,"click",c);var f=mxUtils.bind(this,function(a){this.ui.spinner.spin(n,mxResources.get("loading"));var b=new mxXmlRequest(this.baseUrl+
-"/groups?per_page=100",null,"GET");this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();a(JSON.parse(b.getText()))}),u)}),k=mxUtils.bind(this,function(a,b){this.ui.spinner.spin(n,mxResources.get("loading"));var c=new mxXmlRequest(this.baseUrl+"/groups/"+a.id+"/projects?per_page=100",null,"GET");this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();b(a,JSON.parse(c.getText()))}),u)});f(mxUtils.bind(this,function(f){var l=new mxXmlRequest(this.baseUrl+"/users/"+
-this.user.id+"/projects?per_page=100&page="+a,null,"GET");this.ui.spinner.spin(n,mxResources.get("loading"));this.executeRequest(l,mxUtils.bind(this,function(l){this.ui.spinner.stop();l=JSON.parse(l.getText());if(null!=l&&0!=l.length||null!=f&&0!=f.length){1==a&&(n.appendChild(m(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(a=a.split("/"),1<a.length?(d=a[0],b=a[1],g="master",
-e=null,2<a.length&&(e=encodeURIComponent(a.slice(2,a.length).join("/"))),x()):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(n),mxUtils.br(n));for(var p=!0,z=0;z<l.length;z++)mxUtils.bind(this,function(a,c){var f=q.cloneNode();f.style.backgroundColor=p?"#eeeeee":"";p=!p;f.appendChild(m(a.name_with_namespace,mxUtils.bind(this,function(){d=a.owner.username;b=
-a.path;g=a.default_branch||"master";e="";x()})));n.appendChild(f)})(l[z],z);for(z=0;z<f.length;z++)k(f[z],mxUtils.bind(this,function(a,c){for(var f=0;f<c.length;f++){var k=q.cloneNode();k.style.backgroundColor=p?"#eeeeee":"";p=!p;mxUtils.bind(this,function(c){k.appendChild(m(c.name_with_namespace,mxUtils.bind(this,function(){d=a.full_path;b=c.path;g=c.default_branch||"master";e="";x()})));n.appendChild(k)})(c[f])}}))}else mxUtils.write(n,mxResources.get("noFiles"));100==l.length&&(n.appendChild(v),
-t=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&c()},mxEvent.addListener(n,"scroll",t))}),u)}))});this.token?this.user?D():this.updateUser(function(){D()},u,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){D()},u,!0)}),u)};GitLabClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};DrawioComment=function(a,c,d,b,g,e,k){this.file=a;this.id=c;this.content=d;this.modifiedDate=b;this.createdDate=g;this.isResolved=e;this.user=k;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,c,d,b,g){c()};DrawioComment.prototype.editComment=function(a,c,d){c()};DrawioComment.prototype.deleteComment=function(a,c){a()};DriveComment=function(a,c,d,b,g,e,k,l){DrawioComment.call(this,a,c,d,b,g,e,k);this.pCommentId=l};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(a,c,d,b,g){a={content:a.content};b?a.verb="resolve":g&&(a.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:a,method:"POST"},mxUtils.bind(this,function(a){c(a.replyId)}),d)};
+GitLabClient.prototype.writeFile=function(a,c,d,b,g,e,k,n,m){if(e.length>=this.maxFileSize)m({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 1 MB)"});else{var t="POST";d={path:encodeURIComponent(b),branch:decodeURIComponent(d),commit_message:g,content:e,encoding:"base64"};null!=k&&(d.last_commit_id=k,t="PUT");a=this.baseUrl+"/projects/"+encodeURIComponent(a+"/"+c)+"/repository/files/"+encodeURIComponent(b);t=new mxXmlRequest(a,JSON.stringify(d),t);this.executeRequest(t,
+mxUtils.bind(this,function(a){n(a)}),m)}};
+GitLabClient.prototype.saveFile=function(a,c,d,b,g){var e=a.meta.org,k=a.meta.repo,n=a.meta.ref,m=a.meta.path,t=mxUtils.bind(this,function(b,f){this.writeFile(e,k,n,m,g,f,b,mxUtils.bind(this,function(b){delete a.meta.isNew;this.getFile(e+"/"+k+"/"+n+"/"+m,mxUtils.bind(this,function(b){b.getData()==a.getData()?c(b.getCurrentEtag()):c({content:a.getCurrentEtag()})}),d,null,null,a.meta.refPos)}),d)}),f=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(m)?this.ui.getEmbeddedPng(mxUtils.bind(this,
+function(b){t(a.meta.last_commit_id,b)}),d,this.ui.getCurrentFile()!=a?a.getData():null):t(a.meta.last_commit_id,Base64.encode(a.getData()))});b?this.getFile(e+"/"+k+"/"+n+"/"+m,mxUtils.bind(this,function(b){a.meta.last_commit_id=b.meta.last_commit_id;f()}),d):f()};GitLabClient.prototype.pickFolder=function(a){this.showGitLabDialog(!1,a)};GitLabClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("A"+encodeURIComponent(a))});this.showGitLabDialog(!0,a)};
+GitLabClient.prototype.showGitLabDialog=function(a,c){var d=null,b=null,g=null,e=null,k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.height="304px";var n=document.createElement("h3");mxUtils.write(n,mxResources.get(a?"selectFile":"selectFolder"));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(n);var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.border="1px solid lightgray";m.style.boxSizing=
+"border-box";m.style.padding="4px";m.style.overflow="auto";m.style.lineHeight="1.2em";m.style.height="274px";k.appendChild(m);var t=document.createElement("div");t.style.textOverflow="ellipsis";t.style.boxSizing="border-box";t.style.overflow="hidden";t.style.padding="4px";t.style.width="100%";var f=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){c(d+"/"+b+"/"+encodeURIComponent(g)+"/"+e)}));this.ui.showDialog(f.container,420,360,!0,!0);a&&f.okButton.parentNode.removeChild(f.okButton);var l=
+mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("href","javascript:void(0);");d.setAttribute("title",a);mxUtils.write(d,a);mxEvent.addListener(d,"click",b);null!=c&&(a=t.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),p=mxUtils.bind(this,function(a){var c=document.createElement("div");c.style.marginBottom="8px";c.appendChild(l(d+"/"+b,mxUtils.bind(this,function(){e=null;D()})));a||(mxUtils.write(c," / "),c.appendChild(l(decodeURIComponent(g),mxUtils.bind(this,
+function(){e=null;y()}))));if(null!=e&&0<e.length){var f=e.split("/");for(a=0;a<f.length;a++)(function(a){mxUtils.write(c," / ");c.appendChild(l(f[a],mxUtils.bind(this,function(){e=f.slice(0,a+1).join("/");x()})))})(a)}m.appendChild(c)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(e=g=b=d=null,D()):this.ui.hideDialog()}))}),v=null,q=null,x=mxUtils.bind(this,function(k){null==k&&(m.innerHTML="",k=1);var n=new mxXmlRequest(this.baseUrl+
+"/projects/"+encodeURIComponent(d+"/"+b)+"/repository/tree?path="+e+"&ref="+g+"&per_page=100&page="+k,null,"GET");this.ui.spinner.spin(m,mxResources.get("loading"));f.okButton.removeAttribute("disabled");null!=q&&(mxEvent.removeListener(m,"scroll",q),q=null);null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");var B=mxUtils.bind(this,function(){x(k+
+1)});mxEvent.addListener(v,"click",B);this.executeRequest(n,mxUtils.bind(this,function(f){this.ui.spinner.stop();1==k&&(p(!g),m.appendChild(l("../ [Up]",mxUtils.bind(this,function(){if(""==e)e=null,D();else{var a=e.split("/");e=a.slice(0,a.length-1).join("/");x()}}),"4px")));var n=JSON.parse(f.getText());if(null==n||0==n.length)mxUtils.write(m,mxResources.get("noFiles"));else{var z=!0,u=0;f=mxUtils.bind(this,function(f){for(var k=0;k<n.length;k++)mxUtils.bind(this,function(k){if(f==("tree"==k.type)){var n=
+t.cloneNode();n.style.backgroundColor=z?"#eeeeee":"";z=!z;var p=document.createElement("img");p.src=IMAGE_PATH+"/"+("tree"==k.type?"folder.png":"file.png");p.setAttribute("align","absmiddle");p.style.marginRight="4px";p.style.marginTop="-4px";p.width=20;n.appendChild(p);n.appendChild(l(k.name+("tree"==k.type?"/":""),mxUtils.bind(this,function(){"tree"==k.type?(e=k.path,x()):a&&"blob"==k.type&&(this.ui.hideDialog(),c(d+"/"+b+"/"+g+"/"+k.path))})));m.appendChild(n);u++}})(n[k])});f(!0);a&&f(!1);100==
+u&&(m.appendChild(v),q=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&B()},mxEvent.addListener(m,"scroll",q))}}),u,!0)}),y=mxUtils.bind(this,function(a){null==a&&(m.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(d+"/"+b)+"/repository/branches?per_page=100&page="+a,null,"GET");f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=q&&(mxEvent.removeListener(m,"scroll",q),q=null);null!=v&&null!=v.parentNode&&
+v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){y(a+1)});mxEvent.addListener(v,"click",k);this.executeRequest(c,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(p(!0),m.appendChild(l("../ [Up]",mxUtils.bind(this,function(){e=null;D()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(m,mxResources.get("noFiles"));
+else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a,b){var c=t.cloneNode();c.style.backgroundColor=0==b%2?"#eeeeee":"";c.appendChild(l(a.name,mxUtils.bind(this,function(){g=encodeURIComponent(a.name);e="";x()})));m.appendChild(c)})(b[c],c);100==b.length&&(m.appendChild(v),q=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&k()},mxEvent.addListener(m,"scroll",q))}}),u)});f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));var D=mxUtils.bind(this,
+function(a){this.ui.spinner.stop();null==a&&(m.innerHTML="",a=1);null!=q&&(mxEvent.removeListener(m,"scroll",q),q=null);null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");var c=mxUtils.bind(this,function(){D(a+1)});mxEvent.addListener(v,"click",c);var f=mxUtils.bind(this,function(a){this.ui.spinner.spin(m,mxResources.get("loading"));var b=new mxXmlRequest(this.baseUrl+
+"/groups?per_page=100",null,"GET");this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();a(JSON.parse(b.getText()))}),u)}),k=mxUtils.bind(this,function(a,b){this.ui.spinner.spin(m,mxResources.get("loading"));var c=new mxXmlRequest(this.baseUrl+"/groups/"+a.id+"/projects?per_page=100",null,"GET");this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();b(a,JSON.parse(c.getText()))}),u)});f(mxUtils.bind(this,function(f){var n=new mxXmlRequest(this.baseUrl+"/users/"+
+this.user.id+"/projects?per_page=100&page="+a,null,"GET");this.ui.spinner.spin(m,mxResources.get("loading"));this.executeRequest(n,mxUtils.bind(this,function(n){this.ui.spinner.stop();n=JSON.parse(n.getText());if(null!=n&&0!=n.length||null!=f&&0!=f.length){1==a&&(m.appendChild(l(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(a=a.split("/"),1<a.length?(d=a[0],b=a[1],g="master",
+e=null,2<a.length&&(e=encodeURIComponent(a.slice(2,a.length).join("/"))),x()):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(m),mxUtils.br(m));for(var p=!0,z=0;z<n.length;z++)mxUtils.bind(this,function(a,c){var f=t.cloneNode();f.style.backgroundColor=p?"#eeeeee":"";p=!p;f.appendChild(l(a.name_with_namespace,mxUtils.bind(this,function(){d=a.owner.username;b=
+a.path;g=a.default_branch||"master";e="";x()})));m.appendChild(f)})(n[z],z);for(z=0;z<f.length;z++)k(f[z],mxUtils.bind(this,function(a,c){for(var f=0;f<c.length;f++){var k=t.cloneNode();k.style.backgroundColor=p?"#eeeeee":"";p=!p;mxUtils.bind(this,function(c){k.appendChild(l(c.name_with_namespace,mxUtils.bind(this,function(){d=a.full_path;b=c.path;g=c.default_branch||"master";e="";x()})));m.appendChild(k)})(c[f])}}))}else mxUtils.write(m,mxResources.get("noFiles"));100==n.length&&(m.appendChild(v),
+q=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&c()},mxEvent.addListener(m,"scroll",q))}),u)}))});this.token?this.user?D():this.updateUser(function(){D()},u,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){D()},u,!0)}),u)};GitLabClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};DrawioComment=function(a,c,d,b,g,e,k){this.file=a;this.id=c;this.content=d;this.modifiedDate=b;this.createdDate=g;this.isResolved=e;this.user=k;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,c,d,b,g){c()};DrawioComment.prototype.editComment=function(a,c,d){c()};DrawioComment.prototype.deleteComment=function(a,c){a()};DriveComment=function(a,c,d,b,g,e,k,n){DrawioComment.call(this,a,c,d,b,g,e,k);this.pCommentId=n};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(a,c,d,b,g){a={content:a.content};b?a.verb="resolve":g&&(a.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:a,method:"POST"},mxUtils.bind(this,function(a){c(a.replyId)}),d)};
DriveComment.prototype.editComment=function(a,c,d){this.content=a;a={content:a};this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,params:a,method:"PATCH"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,params:a,method:"PATCH"},c,d)};
DriveComment.prototype.deleteComment=function(a,c){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},a,c)};App=function(a,c,d){EditorUi.call(this,a,c,null!=d?d:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.isModified()){var c={category:"DISCARD-FILE-"+a.getHash(),action:(a.savingFile?"saving":"")+(a.savingFile&&null!=a.savingFileTime?"_"+Math.round((Date.now()-a.savingFileTime.getTime())/1E3):"")+(null!=a.saveLevel?"-sl_"+a.saveLevel:"")+"-age_"+(null!=
a.ageStart?Math.round((Date.now()-a.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+"-open_"+(null!=a.opened?Math.round((Date.now()-a.opened.getTime())/1E3):"x")+"-save_"+(null!=a.lastSaved?Math.round((Date.now()-a.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=a.lastChanged?Math.round((Date.now()-a.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=a.sync?"client_"+a.sync.clientId:"nosync"};
a.constructor==DriveFile&&null!=a.desc&&null!=this.drive&&(c.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType);EditorUi.logEvent(c)}}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+a.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(a,c,d){var b=null;try{b=window.open(a)}catch(l){}null==b||void 0===b?this.showDialog((new PopupDialog(this,a,c,d)).container,320,140,!0,!0):null!=c&&c()});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(a){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(a)});this.editor.chromeless&&!this.editor.editable||this.addFileDropHandler([document]);if(null!=
+(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(a,c,d){var b=null;try{b=window.open(a)}catch(n){}null==b||void 0===b?this.showDialog((new PopupDialog(this,a,c,d)).container,320,140,!0,!0):null!=c&&c()});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(a){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(a)});this.editor.chromeless&&!this.editor.editable||this.addFileDropHandler([document]);if(null!=
App.DrawPlugins){for(a=0;a<App.DrawPlugins.length;a++)try{App.DrawPlugins[a](this)}catch(b){null!=window.console&&console.log("Plugin Error:",b,App.DrawPlugins[a])}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}window.Draw.loadPlugin=mxUtils.bind(this,function(a){try{a(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.DROPBOX_APPKEY="libwls2fa9szdji";App.DROPBOX_URL="js/dropbox/Dropbox-sdk.min.js";App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";
App.ONEDRIVE_URL=mxClient.IS_IE11?"https://js.live.net/v7.2/OneDrive.js":"js/onedrive/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL="https://code.jquery.com/jquery-1.7.1.min.js";App.PUSHER_KEY="1e756b07a690c5bdb054";App.PUSHER_CLUSTER="eu";App.PUSHER_URL="https://js.pusher.com/4.3/pusher.min.js";App.GOOGLE_APIS="drive-share";App.startTime=new Date;
@@ -9102,13 +9106,13 @@ Graph.prototype.defaultThemes.darkTheme=b[2].getDocumentElement());b=null!=c?c()
function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):
"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=
a&&a(b);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("Started in "+((new Date).getTime()-t0.getTime())+"ms"),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))},function(a){a=document.getElementById("geStatus");null!=a&&(a.innerHTML="Error loading page. <a>Please try refreshing.</a>",a.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";d(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function b(){try{if(null!=
-mxSettings.settings){if(null!=mxSettings.settings.autosaveDelay){var a=parseInt(mxSettings.settings.autosaveDelay);!isNaN(a)&&0<a?(DrawioFile.prototype.autosaveDelay=a,EditorUi.debug("Setting autosaveDelay",a)):EditorUi.debug("Invalid autosaveDelay",a)}null!=mxSettings.settings.defaultEdgeLength&&(a=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(a)&&0<a?(Graph.prototype.defaultEdgeLength=a,EditorUi.debug("Using defaultEdgeLength",a)):EditorUi.debug("Invalid defaultEdgeLength",a))}}catch(m){null!=
-window.console&&console.error(m)}mxResources.loadDefaultBundle=!1;d(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(a,b,c,d,e){EditorUi.logError(a,b,c,d,e)};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)&&
+mxSettings.settings){if(null!=mxSettings.settings.autosaveDelay){var a=parseInt(mxSettings.settings.autosaveDelay);!isNaN(a)&&0<a?(DrawioFile.prototype.autosaveDelay=a,EditorUi.debug("Setting autosaveDelay",a)):EditorUi.debug("Invalid autosaveDelay",a)}null!=mxSettings.settings.defaultEdgeLength&&(a=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(a)&&0<a?(Graph.prototype.defaultEdgeLength=a,EditorUi.debug("Using defaultEdgeLength",a)):EditorUi.debug("Invalid defaultEdgeLength",a))}}catch(l){null!=
+window.console&&console.error(l)}mxResources.loadDefaultBundle=!1;d(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(a,b,c,d,e){EditorUi.logError(a,b,c,d,e)};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.offline||"1"==urlParams.appcache)mxscript("js/shapes.min.js"),mxscript("js/stencils.min.js"),mxscript("js/extensions.min.js"),g=document.createElement("iframe"),g.setAttribute("width","0"),g.setAttribute("height","0"),g.setAttribute("src","offline.html"),document.body.appendChild(g);"ArrayBuffer"in window&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"auto"==DrawioFile.SYNC&&"1"!=urlParams.embed&&"1"!=urlParams.local&&"1"!=urlParams.stealth&&
"1"!=urlParams.offline&&mxscript(App.PUSHER_URL);if("0"!=urlParams.plugins&&"1"!=urlParams.offline){g=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var e=JSON.parse(localStorage.getItem(mxSettings.key));null!=e&&(g=e.plugins)}catch(f){}e=urlParams.p;App.initPluginCallback();null!=e&&App.loadPlugins(e.split(";"));if(null!=g&&0<g.length&&"0"!=urlParams.plugins){for(var e=window.location.protocol+"//"+window.location.host,
-k=!0,l=0;l<g.length&&k;l++)"/"!=g[l].charAt(0)&&g[l].substring(0,e.length)!=e&&(k=!1);if(k||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",[g.join("\n")]).replace(/\\n/g,"\n")))for(l=0;l<g.length;l++)try{null==App.pluginsLoaded[g[l]]&&(App.pluginsLoaded[g[l]]=!0,App.embedModePluginsCount++,
-"/"==g[l].charAt(0)&&(g[l]=PLUGINS_BASE_PATH+g[l]),mxscript(g[l]))}catch(f){}}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&
-Editor.initMath();if("1"==urlParams.configure){var n=window.opener||window.parent,q=function(a){if(a.source==n)try{var c=JSON.parse(a.data);null!=c&&"configure"==c.action&&(mxEvent.removeListener(window,"message",q),Editor.configure(c.config,!0),mxSettings.load(),b())}catch(p){null!=window.console&&console.log("Error in configure message: "+p,a.data)}};mxEvent.addListener(window,"message",q);n.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",
+k=!0,n=0;n<g.length&&k;n++)"/"!=g[n].charAt(0)&&g[n].substring(0,e.length)!=e&&(k=!1);if(k||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",[g.join("\n")]).replace(/\\n/g,"\n")))for(n=0;n<g.length;n++)try{null==App.pluginsLoaded[g[n]]&&(App.pluginsLoaded[g[n]]=!0,App.embedModePluginsCount++,
+"/"==g[n].charAt(0)&&(g[n]=PLUGINS_BASE_PATH+g[n]),mxscript(g[n]))}catch(f){}}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&
+Editor.initMath();if("1"==urlParams.configure){var m=window.opener||window.parent,t=function(a){if(a.source==m)try{var c=JSON.parse(a.data);null!=c&&"configure"==c.action&&(mxEvent.removeListener(window,"message",t),Editor.configure(c.config,!0),mxSettings.load(),b())}catch(p){null!=window.console&&console.log("Error in configure message: "+p,a.data)}};mxEvent.addListener(window,"message",t);m.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",
window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG)}catch(f){null!=window.console&&console.error(f)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&(g=localStorage.getItem(".configuration"),null!=g))try{g=JSON.parse(g),null!=g&&(EditorUi.debug("Using local configuration",g),Editor.configure(g))}catch(f){null!=window.console&&console.error(f)}}b()}};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture="https://lh3.googleusercontent.com/-HIzvXUy6QUY/AAAAAAAAAAI/AAAAAAAAAAA/giuR7PQyjEk/photo.jpg?sz=64";
App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg==";
App.prototype.chevronUpImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUY1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NjA1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1RDUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1RTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pg+qUokAAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAAL0lEQVR42mJgRgMMRAswMKAKMDDARBjg8lARBoR6KImkH0wTbygT6YaS4DmAAAMAYPkClOEDDD0AAAAASUVORK5CYII=":
@@ -9143,15 +9147,15 @@ a.opened?Math.round((Date.now()-a.opened.getTime())/1E3):"x")+"-save_"+(null!=a.
this.mode&&a.isEditable()?"save":"saveAs").funct()}),null,null,360,120,null,mxUtils.bind(this,function(){this.scheduleSanityCheck()}))}};App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&("test.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"jgraph.github.io"==window.location.hostname)};
App.prototype.getPusher=function(){null==this.pusher&&"function"===typeof window.Pusher&&(this.pusher=new Pusher(App.PUSHER_KEY,{cluster:App.PUSHER_CLUSTER,encrypted:!0}));return this.pusher};
App.prototype.checkLicense=function(){var a=this.drive.getUser(),c=("1"==urlParams.dev?urlParams.lic:null)||(null!=a?a.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=c){var d=c.lastIndexOf("@"),b=c;0<=d&&(b=c.substring(d+1),c=this.crc32(c.substring(0,d))+"@"+b);mxUtils.post("/license","domain="+encodeURIComponent(b)+"&email="+encodeURIComponent(c)+"&lc="+encodeURIComponent(a.locale)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(a){try{if(200<=a.getStatus()&&299>=a.getStatus()){var c=
-a.getText();if(0<c.length){var d=JSON.parse(c);null!=d&&this.handleLicense(d,b)}}}catch(l){}}))}};App.prototype.handleLicense=function(a,c){null!=a&&null!=a.plugins&&App.loadPlugins(a.plugins.split(";"),!0)};App.prototype.getEditBlankXml=function(){var a=this.getCurrentFile();return null!=a&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?a.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};
+a.getText();if(0<c.length){var d=JSON.parse(c);null!=d&&this.handleLicense(d,b)}}}catch(n){}}))}};App.prototype.handleLicense=function(a,c){null!=a&&null!=a.plugins&&App.loadPlugins(a.plugins.split(";"),!0)};App.prototype.getEditBlankXml=function(){var a=this.getCurrentFile();return null!=a&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?a.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};
App.prototype.updateDraft=function(){isLocalStorage&&null!=localStorage&&localStorage.setItem(".draft",JSON.stringify({modified:(new Date).getTime(),data:this.getFileData()}))};App.prototype.getDraft=function(){return null};App.prototype.addRecent=function(a){if(isLocalStorage&&null!=localStorage){var c=this.getRecent();if(null==c)c=[];else for(var d=0;d<c.length;d++)c[d].id==a.id&&c.splice(d,1);null!=c&&(c.unshift(a),c=c.slice(0,10),localStorage.setItem(".recent",JSON.stringify(c)))}};
App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var a=localStorage.getItem(".recent");if(null!=a)return JSON.parse(a)}catch(c){}return null}};App.prototype.resetRecent=function(a){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(c){}};App.prototype.removeDraft=function(){if(isLocalStorage&&null!=localStorage&&"0"==urlParams.splash)try{localStorage.removeItem(".draft")}catch(a){}};
App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var a=this.getCurrentFile();if(null!=a)if(a.constructor!=LocalFile||""!=a.getHash()||a.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()){if(a.isModified())return mxResources.get("allChangesLost");a.close(!0)}else return mxResources.get("ensureDataSaved")};
App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var a=this.editor.appName,c=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=c&&(a=(null!=c.getTitle()?c.getTitle():this.defaultFilename)+" - "+a);document.title=a}};App.prototype.createCrcTable=function(){for(var a=[],c,d=0;256>d;d++){c=d;for(var b=0;8>b;b++)c=c&1?3988292384^c>>>1:c>>>1;a[d]=c}return a};
-App.prototype.getThumbnail=function(a,c){var d=!1;try{var b=!0,g=window.setTimeout(mxUtils.bind(this,function(){b=!1;c(null)}),this.timeout),e=mxUtils.bind(this,function(a){window.clearTimeout(g);b&&c(a)});null==this.thumbImageCache&&(this.thumbImageCache={});var k=this.editor.graph,l=null!=k.themes&&"darkTheme"==k.defaultThemeName;if(null!=this.pages&&(this.currentPage!=this.pages[0]||l)){var n=k.getGlobalVariable,k=this.createTemporaryGraph(l?k.getDefaultStylesheet():k.getStylesheet()),q=this.pages[0];
-l&&(k.defaultThemeName="default");k.getGlobalVariable=function(a){return"page"==a?q.getName():"pagenumber"==a?1:n.apply(this,arguments)};k.getGlobalVariable=n;document.body.appendChild(k.container);k.model.setRoot(q.root)}if(mxClient.IS_CHROMEAPP||!k.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,function(a){try{k!=this.editor.graph&&null!=k.container.parentNode&&k.container.parentNode.removeChild(k.container)}catch(B){a=null}e(a)}),a,this.thumbImageCache,"#ffffff",function(){e()},
-null,null,null,null,null,null,k),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var f=document.createElement("canvas"),m=k.getGraphBounds(),p=a/m.width,p=Math.min(1,Math.min(3*a/(4*m.height),p)),u=Math.floor(m.x),v=Math.floor(m.y);f.setAttribute("width",Math.ceil(p*(m.width+4)));f.setAttribute("height",Math.ceil(p*(m.height+4)));var t=f.getContext("2d");t.scale(p,p);t.translate(-u,-v);var x=k.background;if(null==x||""==x||x==mxConstants.NONE)x="#ffffff";t.save();t.fillStyle=x;t.fillRect(u,
-v,Math.ceil(m.width+4),Math.ceil(m.height+4));t.restore();var y=new mxJsCanvas(f),D=new mxAsyncCanvas(this.thumbImageCache);y.images=this.thumbImageCache.images;var I=new mxImageExport;I.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};I.drawText=function(a,b){};I.drawState(k.getView().getState(k.model.root),D);D.finish(mxUtils.bind(this,function(){try{I.drawState(k.getView().getState(k.model.root),
+App.prototype.getThumbnail=function(a,c){var d=!1;try{var b=!0,g=window.setTimeout(mxUtils.bind(this,function(){b=!1;c(null)}),this.timeout),e=mxUtils.bind(this,function(a){window.clearTimeout(g);b&&c(a)});null==this.thumbImageCache&&(this.thumbImageCache={});var k=this.editor.graph,n=null!=k.themes&&"darkTheme"==k.defaultThemeName;if(null!=this.pages&&(this.currentPage!=this.pages[0]||n)){var m=k.getGlobalVariable,k=this.createTemporaryGraph(n?k.getDefaultStylesheet():k.getStylesheet()),t=this.pages[0];
+n&&(k.defaultThemeName="default");k.getGlobalVariable=function(a){return"page"==a?t.getName():"pagenumber"==a?1:m.apply(this,arguments)};k.getGlobalVariable=m;document.body.appendChild(k.container);k.model.setRoot(t.root)}if(mxClient.IS_CHROMEAPP||!k.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,function(a){try{k!=this.editor.graph&&null!=k.container.parentNode&&k.container.parentNode.removeChild(k.container)}catch(B){a=null}e(a)}),a,this.thumbImageCache,"#ffffff",function(){e()},
+null,null,null,null,null,null,k),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var f=document.createElement("canvas"),l=k.getGraphBounds(),p=a/l.width,p=Math.min(1,Math.min(3*a/(4*l.height),p)),u=Math.floor(l.x),v=Math.floor(l.y);f.setAttribute("width",Math.ceil(p*(l.width+4)));f.setAttribute("height",Math.ceil(p*(l.height+4)));var q=f.getContext("2d");q.scale(p,p);q.translate(-u,-v);var x=k.background;if(null==x||""==x||x==mxConstants.NONE)x="#ffffff";q.save();q.fillStyle=x;q.fillRect(u,
+v,Math.ceil(l.width+4),Math.ceil(l.height+4));q.restore();var y=new mxJsCanvas(f),D=new mxAsyncCanvas(this.thumbImageCache);y.images=this.thumbImageCache.images;var I=new mxImageExport;I.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};I.drawText=function(a,b){};I.drawState(k.getView().getState(k.model.root),D);D.finish(mxUtils.bind(this,function(){try{I.drawState(k.getView().getState(k.model.root),
y),k!=this.editor.graph&&null!=k.container.parentNode&&k.container.parentNode.removeChild(k.container)}catch(z){f=null}e(f)}));d=!0}}catch(z){d=!1,null!=k&&k!=this.editor.graph&&null!=k.container.parentNode&&k.container.parentNode.removeChild(k.container)}return d};
App.prototype.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);mxClient.IS_QUIRKS&&new mxDivResizer(a);return a};
(function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(c,d){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var b=this.getCurrentFile();c=null!=b?b.getMode():c;c==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):c==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),
@@ -9167,11 +9171,11 @@ App.prototype.showRefreshDialog=function(a,c){if(!this.showingRefreshDialog&&(th
this.createRealtimeNotice();d.style.left="0";d.style.right="0";d.style.borderRadius="0";d.style.borderLeftStyle="none";d.style.borderRightStyle="none";d.style.marginBottom="26px";d.style.padding="8px 0 8px 0";this.dialog.container.appendChild(d)}};
App.prototype.showAlert=function(a){if(null!=a&&0<a.length){var c=document.createElement("div");c.className="geAlert";c.style.zIndex=2E9;c.style.left="50%";c.style.top="-100%";mxUtils.setPrefixedStyle(c.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(c.style,"transition","all 1s ease");c.innerHTML=a;a=document.createElement("a");a.className="geAlertLink";a.style.textAlign="right";a.style.marginTop="20px";a.style.display="block";a.setAttribute("title",mxResources.get("close"));a.innerHTML=
mxResources.get("close");c.appendChild(a);mxEvent.addListener(a,"click",function(a){null!=c.parentNode&&(c.parentNode.removeChild(c),mxEvent.consume(a))});document.body.appendChild(c);window.setTimeout(function(){c.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(c.style,"transition","all 2s ease");c.style.opacity="0";window.setTimeout(function(){null!=c.parentNode&&c.parentNode.removeChild(c)},2E3)},15E3)}};
-App.prototype.start=function(){this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{if("1"!=urlParams.client&&"1"!=urlParams.embed&&mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){try{this.hideDialog();var b=this.getDiagramId(),c=this.getCurrentFile();null!=c&&c.getHash()==b||this.loadFile(b,!0)}catch(l){null!=document.body&&this.handleError(l,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=
+App.prototype.start=function(){this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{if("1"!=urlParams.client&&"1"!=urlParams.embed&&mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){try{this.hideDialog();var b=this.getDiagramId(),c=this.getCurrentFile();null!=c&&c.getHash()==b||this.loadFile(b,!0)}catch(n){null!=document.body&&this.handleError(n,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=
null!=a?a.getHash():""}))}})),(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var a=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var a=mxUtils.bind(this,function(a){"data:image/png;base64,"==a.substring(0,22)&&(a=this.extractGraphModelFromPng(a));var b=urlParams.title,b=null!=b?
decodeURIComponent(b):this.defaultFilename;a=new LocalFile(this,a,b,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(a.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(a);this.getCurrentFile().setModified(!this.editor.chromeless)}),b=window.opener||window.parent;if(b!=window){var c=urlParams.create;null!=c?a(b[decodeURIComponent(c)]):(c=urlParams.data,null!=c?a(decodeURIComponent(c)):this.installMessageHandler(mxUtils.bind(this,function(c,d){d.source==
-b&&a(c)})))}}else if(null==this.dialog)if("1"==urlParams.demo)c=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=c;else{c=!1;try{c=null!=window.opener&&null!=window.opener.openFile}catch(q){}if(c)this.spinner.spin(document.body,mxResources.get("loading"));else if(c=this.getDiagramId(),"0"!=urlParams.splash||null!=c&&0!=c.length)this.loadFile(c);else if(!mxClient.IS_CHROMEAPP){var d=this.getDraft(),n=null!=d?d.data:this.getFileData(),
-c=Editor.useLocalStorage;this.createFile(this.defaultFilename,n,null,null,null,null,null,!0);Editor.useLocalStorage=c;null!=d&&(c=this.getCurrentFile(),null!=c&&c.addUnsavedStatus())}}}),c=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=c&&0<c.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var d=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=
+b&&a(c)})))}}else if(null==this.dialog)if("1"==urlParams.demo)c=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=c;else{c=!1;try{c=null!=window.opener&&null!=window.opener.openFile}catch(t){}if(c)this.spinner.spin(document.body,mxResources.get("loading"));else if(c=this.getDiagramId(),"0"!=urlParams.splash||null!=c&&0!=c.length)this.loadFile(c);else if(!mxClient.IS_CHROMEAPP){var d=this.getDraft(),m=null!=d?d.data:this.getFileData(),
+c=Editor.useLocalStorage;this.createFile(this.defaultFilename,m,null,null,null,null,null,!0);Editor.useLocalStorage=c;null!=d&&(c=this.getCurrentFile(),null!=c&&c.addUnsavedStatus())}}}),c=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=c&&0<c.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var d=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=
this.getSearch(["create","title"]))}),b=mxUtils.bind(this,function(a){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,a,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var b=urlParams.title,b=null!=b?decodeURIComponent(b):this.defaultFilename;a=this.getServiceCount(!0);isLocalStorage&&a++;var c=4>=a?2:6<a?4:3,b=new CreateDialog(this,b,mxUtils.bind(this,function(a,b){if(null==b){this.hideDialog();var c=Editor.useLocalStorage;this.createFile(0<a.length?
a:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=c}else this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,this.getFileData(!0),null,b,null,!0,c)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,c,null,null,null,this.editor.fileExtensions);this.showDialog(b.container,400,a>c?390:270,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));b.init()}}),c=decodeURIComponent(c);if("http://"!=c.substring(0,
7)&&"https://"!=c.substring(0,8))try{null!=window.opener&&null!=window.opener[c]?b(window.opener[c]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(g){this.handleError(g,mxResources.get("errorLoadingFile"))}else this.loadTemplate(c,function(a){b(a)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),d)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=
@@ -9185,31 +9189,31 @@ App.prototype.pickFile=function(a){try{if(a=null!=a?a:this.mode,a==App.MODE_GOOG
(this.openFiles(d.files),d.type="",d.type="file",d.value="")}));d.style.display="none";document.body.appendChild(d);this.openFileInputElt=d}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";var b=Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,function(b,c){this.useCanvasForExport||".png"!=c.substring(c.length-
4)||(c=c.substring(0,c.length-4)+".drawio");this.fileLoaded(a==App.MODE_BROWSER?new StorageFile(this,b,c):new LocalFile(this,b,c))}));var g=this.dialog,e=g.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=b;e.apply(g,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(k){this.handleError(k)}};
App.prototype.pickLibrary=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE||a==App.MODE_DROPBOX||a==App.MODE_ONEDRIVE||a==App.MODE_GITHUB||a==App.MODE_GITLAB||a==App.MODE_TRELLO){var c=a==App.MODE_GOOGLE?this.drive:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_GITLAB?this.gitLab:a==App.MODE_TRELLO?this.trello:this.dropbox;null!=c&&c.pickLibrary(mxUtils.bind(this,function(a,b){if(null!=b)try{this.loadLibrary(b)}catch(k){this.handleError(k,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
-mxResources.get("loading"))&&c.getLibrary(a,mxUtils.bind(this,function(a){this.spinner.stop();try{this.loadLibrary(a)}catch(l){this.handleError(l,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorLoadingFile"):null)}))}))}else if(a==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var d=document.createElement("input");d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){if(null!=
-d.files){for(var a=0;a<d.files.length;a++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){try{this.loadLibrary(new LocalLibrary(this,b.target.result,a.name))}catch(n){this.handleError(n,mxResources.get("errorLoadingFile"))}});b.readAsText(a)})(d.files[a]);d.type="";d.type="file";d.value=""}}));d.style.display="none";document.body.appendChild(d);this.libFileInputElt=d}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";var b=Editor.useLocalStorage;
+mxResources.get("loading"))&&c.getLibrary(a,mxUtils.bind(this,function(a){this.spinner.stop();try{this.loadLibrary(a)}catch(n){this.handleError(n,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorLoadingFile"):null)}))}))}else if(a==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var d=document.createElement("input");d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){if(null!=
+d.files){for(var a=0;a<d.files.length;a++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){try{this.loadLibrary(new LocalLibrary(this,b.target.result,a.name))}catch(m){this.handleError(m,mxResources.get("errorLoadingFile"))}});b.readAsText(a)})(d.files[a]);d.type="";d.type="file";d.value=""}}));d.style.display="none";document.body.appendChild(d);this.libFileInputElt=d}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";var b=Editor.useLocalStorage;
Editor.useLocalStorage=a==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(b,c){try{this.loadLibrary(a==App.MODE_BROWSER?new StorageLibrary(this,b,c):new LocalLibrary(this,b,c))}catch(k){this.handleError(k,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=
b;window.openFile=null})}};
-App.prototype.saveLibrary=function(a,c,d,b,g,e,k){try{b=null!=b?b:this.mode;g=null!=g?g:!1;e=null!=e?e:!1;var l=this.createLibraryDataFromImages(c),n=mxUtils.bind(this,function(a){this.spinner.stop();null!=k&&k();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==d&&b==App.MODE_DEVICE&&(d=new LocalLibrary(this,l,a));if(null==d)this.pickFolder(b,mxUtils.bind(this,function(d){b==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.drive.insertFile(a,
-l,d,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),n,this.drive.libraryMimeType):b==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,l,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),n,d):b==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(a,l,mxUtils.bind(this,
-function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),n,d):b==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,l,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),n,d):b==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,l,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);
-this.libraryLoaded(a,c)}),n,d):b==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,l,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),n,d):b==App.MODE_BROWSER?(d=mxUtils.bind(this,function(){var b=new StorageLibrary(this,l,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(b,c)}),n)}),null==localStorage.getItem(a)?d():this.confirm(mxResources.get("replaceIt",
-[a]),d)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(g||this.spinner.spin(document.body,mxResources.get("saving"))){d.setData(l);var q=mxUtils.bind(this,function(){d.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);e||this.libraryLoaded(d,c);null!=k&&k()}),n)});if(a!=d.getTitle()){var f=d.getHash();d.rename(a,mxUtils.bind(this,function(a){d.constructor!=LocalLibrary&&f!=d.getHash()&&(mxSettings.removeCustomLibrary(f),mxSettings.addCustomLibrary(d.getHash()));
-this.removeLibrarySidebar(f);q()}),n)}else q()}}catch(m){this.handleError(m)}};
-App.prototype.saveFile=function(a,c){var d=this.getCurrentFile();if(null!=d){var b=mxUtils.bind(this,function(){this.removeDraft();this.getCurrentFile()==d||d.isModified()||(d.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=c&&c()});if(a||null==d.getTitle()||null==this.mode){var g=null!=d.getTitle()?d.getTitle():this.defaultFilename,e=!mxClient.IS_IOS||!navigator.standalone,k=this.mode,l=this.getServiceCount(!0);
-isLocalStorage&&l++;var n=4>=l?2:6<l?4:3,g=new CreateDialog(this,g,mxUtils.bind(this,function(a,c,d){null!=a&&0<a.length&&(/(\.pdf)$/i.test(a)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){d.value=a.split(".").slice(0,-1).join(".");d.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?d.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),
+App.prototype.saveLibrary=function(a,c,d,b,g,e,k){try{b=null!=b?b:this.mode;g=null!=g?g:!1;e=null!=e?e:!1;var n=this.createLibraryDataFromImages(c),m=mxUtils.bind(this,function(a){this.spinner.stop();null!=k&&k();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==d&&b==App.MODE_DEVICE&&(d=new LocalLibrary(this,n,a));if(null==d)this.pickFolder(b,mxUtils.bind(this,function(d){b==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.drive.insertFile(a,
+n,d,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),m,this.drive.libraryMimeType):b==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,n,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),m,d):b==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(a,n,mxUtils.bind(this,
+function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),m,d):b==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,n,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),m,d):b==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,n,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);
+this.libraryLoaded(a,c)}),m,d):b==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,n,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),m,d):b==App.MODE_BROWSER?(d=mxUtils.bind(this,function(){var b=new StorageLibrary(this,n,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(b,c)}),m)}),null==localStorage.getItem(a)?d():this.confirm(mxResources.get("replaceIt",
+[a]),d)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(g||this.spinner.spin(document.body,mxResources.get("saving"))){d.setData(n);var t=mxUtils.bind(this,function(){d.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);e||this.libraryLoaded(d,c);null!=k&&k()}),m)});if(a!=d.getTitle()){var f=d.getHash();d.rename(a,mxUtils.bind(this,function(a){d.constructor!=LocalLibrary&&f!=d.getHash()&&(mxSettings.removeCustomLibrary(f),mxSettings.addCustomLibrary(d.getHash()));
+this.removeLibrarySidebar(f);t()}),m)}else t()}}catch(l){this.handleError(l)}};
+App.prototype.saveFile=function(a,c){var d=this.getCurrentFile();if(null!=d){var b=mxUtils.bind(this,function(){this.removeDraft();this.getCurrentFile()==d||d.isModified()||(d.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=c&&c()});if(a||null==d.getTitle()||null==this.mode){var g=null!=d.getTitle()?d.getTitle():this.defaultFilename,e=!mxClient.IS_IOS||!navigator.standalone,k=this.mode,n=this.getServiceCount(!0);
+isLocalStorage&&n++;var m=4>=n?2:6<n?4:3,g=new CreateDialog(this,g,mxUtils.bind(this,function(a,c,d){null!=a&&0<a.length&&(/(\.pdf)$/i.test(a)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){d.value=a.split(".").slice(0,-1).join(".");d.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?d.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),
mxResources.get("no")):(this.hideDialog(),null==k&&c==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(a,b)):"download"==c?(new LocalFile(this,null,a)).save():"_blank"==c?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):k!=c?this.pickFolder(c,mxUtils.bind(this,function(d){this.createFile(a,this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf(".")||/(\.drawio)$/i.test(a),
-/(\.svg)$/i.test(a),/(\.html)$/i.test(a)),null,c,b,null==this.mode,d)})):null!=c&&this.save(a,b)))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,e,null,!0,n,null,null,null,this.editor.fileExtensions,!1);this.showDialog(g.container,400,l>n?390:270,!0,!0);g.init()}else this.save(d.getTitle(),b)}};
+/(\.svg)$/i.test(a),/(\.html)$/i.test(a)),null,c,b,null==this.mode,d)})):null!=c&&this.save(a,b)))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,e,null,!0,m,null,null,null,this.editor.fileExtensions,!1);this.showDialog(g.container,400,n>m?390:270,!0,!0);g.init()}else this.save(d.getTitle(),b)}};
App.prototype.loadTemplate=function(a,c,d,b){var g=!1,e=a;this.editor.isCorsEnabledForUrl(e)||(e="t="+(new Date).getTime(),e=PROXY_URL+"?url="+encodeURIComponent(a)+"&base64=1&"+e,g=!0);var k=null!=b?b:a;this.loadUrl(e,mxUtils.bind(this,function(b){try{var e=g?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b):b;if(/(\.v(dx|sdx?))($|\?)/i.test(k)||this.isVisioData(e))this.importVisio(this.base64ToBlob(b.substring(b.indexOf(",")+1)),function(a){c(a)},d,k);else if(!this.isOffline()&&
-(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,k))this.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&c(a.responseText)}),a);else if(this.isLucidChartData(e))this.convertLucidChart(e,mxUtils.bind(this,function(a){c(a)}),mxUtils.bind(this,function(a){d(a)}));else{if(/(\.png)($|\?)/i.test(k)||this.isPngData(e))e=this.extractGraphModelFromPng(b);c(e)}}catch(q){d(q)}}),
+(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,k))this.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&c(a.responseText)}),a);else if(this.isLucidChartData(e))this.convertLucidChart(e,mxUtils.bind(this,function(a){c(a)}),mxUtils.bind(this,function(a){d(a)}));else{if(/(\.png)($|\?)/i.test(k)||this.isPngData(e))e=this.extractGraphModelFromPng(b);c(e)}}catch(t){d(t)}}),
d,/(\.png)($|\?)/i.test(k)||/(\.v(dx|sdx?))($|\?)/i.test(k),null,null,g)};App.prototype.getPeerForMode=function(a){return a==App.MODE_GOOGLE?this.drive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_GITLAB?this.gitLab:a==App.MODE_DROPBOX?this.dropbox:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_TRELLO?this.trello:null};
-App.prototype.createFile=function(a,c,d,b,g,e,k,l,n){b=l?null:null!=b?b:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){c=null!=c?c:this.emptyDiagramXml;var q=mxUtils.bind(this,function(){this.spinner.stop()}),f=mxUtils.bind(this,function(a){q();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});try{if(b==App.MODE_GOOGLE&&null!=this.drive)null==k&&null!=this.stateArg&&null!=this.stateArg.folderId&&(k=this.stateArg.folderId),
-this.drive.insertFile(a,c,k,mxUtils.bind(this,function(a){q();this.fileCreated(a,d,e,g,n)}),f);else if(b==App.MODE_GITHUB&&null!=this.gitHub)this.gitHub.insertFile(a,c,mxUtils.bind(this,function(a){q();this.fileCreated(a,d,e,g,n)}),f,!1,k);else if(b==App.MODE_GITLAB&&null!=this.gitLab)this.gitLab.insertFile(a,c,mxUtils.bind(this,function(a){q();this.fileCreated(a,d,e,g,n)}),f,!1,k);else if(b==App.MODE_TRELLO&&null!=this.trello)this.trello.insertFile(a,c,mxUtils.bind(this,function(a){q();this.fileCreated(a,
-d,e,g,n)}),f,!1,k);else if(b==App.MODE_DROPBOX&&null!=this.dropbox)this.dropbox.insertFile(a,c,mxUtils.bind(this,function(a){q();this.fileCreated(a,d,e,g,n)}),f);else if(b==App.MODE_ONEDRIVE&&null!=this.oneDrive)this.oneDrive.insertFile(a,c,mxUtils.bind(this,function(a){q();this.fileCreated(a,d,e,g,n)}),f,!1,k);else if(b==App.MODE_BROWSER){q();var m=mxUtils.bind(this,function(){var b=new StorageFile(this,c,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(b,d,e,g,n)}),f)});null==localStorage.getItem(a)?
-m():this.confirm(mxResources.get("replaceIt",[a]),m,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}else q(),this.fileCreated(new LocalFile(this,c,a,null==b),d,e,g,n)}catch(p){q(),this.handleError(p)}}};
-App.prototype.fileCreated=function(a,c,d,b,g){var e=window.location.pathname;null!=c&&0<c.length&&(e+="?libs="+c);null!=g&&0<g.length&&(e+="?clibs="+g);e=this.getUrl(e);a.getMode()!=App.MODE_DEVICE&&(e+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var k=a.getData(),k=0<k.length?this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,!0):null,l=window.location.protocol+"//"+window.location.hostname+e,n=k,q=null;null!=k&&/\.svg$/i.test(a.getTitle())&&
-(q=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(q.container),n=this.decodeNodeIntoGraph(n,q));a.setData(this.createFileData(k,q,a,l));null!=q&&q.container.parentNode.removeChild(q.container);var f=mxUtils.bind(this,function(){this.spinner.stop()}),m=mxUtils.bind(this,function(){f();var k=this.getCurrentFile();null==d&&null!=k&&(d=!k.isModified()&&null==k.getMode());var l=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);d&&a.addAllSavedStatus();
-null!=c&&this.sidebar.showEntries(c);if(null!=g){for(var b=[],e=g.split(";"),f=0;f<e.length;f++)b.push(decodeURIComponent(e[f]));this.loadLibraries(b)}}),m=mxUtils.bind(this,function(){d||null==k||!k.isModified()?l():this.confirm(mxResources.get("allChangesLost"),null,l,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=b&&b();null==d||d?m():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),
-null==a.getMode())),null!=b&&b(),window.openWindow(e,null,m))});a.constructor==LocalFile?m():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,function(){m()}),mxUtils.bind(this,function(a){f();this.handleError(a)}))}};
+App.prototype.createFile=function(a,c,d,b,g,e,k,n,m){b=n?null:null!=b?b:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){c=null!=c?c:this.emptyDiagramXml;var t=mxUtils.bind(this,function(){this.spinner.stop()}),f=mxUtils.bind(this,function(a){t();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});try{if(b==App.MODE_GOOGLE&&null!=this.drive)null==k&&null!=this.stateArg&&null!=this.stateArg.folderId&&(k=this.stateArg.folderId),
+this.drive.insertFile(a,c,k,mxUtils.bind(this,function(a){t();this.fileCreated(a,d,e,g,m)}),f);else if(b==App.MODE_GITHUB&&null!=this.gitHub)this.gitHub.insertFile(a,c,mxUtils.bind(this,function(a){t();this.fileCreated(a,d,e,g,m)}),f,!1,k);else if(b==App.MODE_GITLAB&&null!=this.gitLab)this.gitLab.insertFile(a,c,mxUtils.bind(this,function(a){t();this.fileCreated(a,d,e,g,m)}),f,!1,k);else if(b==App.MODE_TRELLO&&null!=this.trello)this.trello.insertFile(a,c,mxUtils.bind(this,function(a){t();this.fileCreated(a,
+d,e,g,m)}),f,!1,k);else if(b==App.MODE_DROPBOX&&null!=this.dropbox)this.dropbox.insertFile(a,c,mxUtils.bind(this,function(a){t();this.fileCreated(a,d,e,g,m)}),f);else if(b==App.MODE_ONEDRIVE&&null!=this.oneDrive)this.oneDrive.insertFile(a,c,mxUtils.bind(this,function(a){t();this.fileCreated(a,d,e,g,m)}),f,!1,k);else if(b==App.MODE_BROWSER){t();var l=mxUtils.bind(this,function(){var b=new StorageFile(this,c,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(b,d,e,g,m)}),f)});null==localStorage.getItem(a)?
+l():this.confirm(mxResources.get("replaceIt",[a]),l,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}else t(),this.fileCreated(new LocalFile(this,c,a,null==b),d,e,g,m)}catch(p){t(),this.handleError(p)}}};
+App.prototype.fileCreated=function(a,c,d,b,g){var e=window.location.pathname;null!=c&&0<c.length&&(e+="?libs="+c);null!=g&&0<g.length&&(e+="?clibs="+g);e=this.getUrl(e);a.getMode()!=App.MODE_DEVICE&&(e+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var k=a.getData(),k=0<k.length?this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,!0):null,n=window.location.protocol+"//"+window.location.hostname+e,m=k,t=null;null!=k&&/\.svg$/i.test(a.getTitle())&&
+(t=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(t.container),m=this.decodeNodeIntoGraph(m,t));a.setData(this.createFileData(k,t,a,n));null!=t&&t.container.parentNode.removeChild(t.container);var f=mxUtils.bind(this,function(){this.spinner.stop()}),l=mxUtils.bind(this,function(){f();var k=this.getCurrentFile();null==d&&null!=k&&(d=!k.isModified()&&null==k.getMode());var m=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);d&&a.addAllSavedStatus();
+null!=c&&this.sidebar.showEntries(c);if(null!=g){for(var b=[],e=g.split(";"),f=0;f<e.length;f++)b.push(decodeURIComponent(e[f]));this.loadLibraries(b)}}),l=mxUtils.bind(this,function(){d||null==k||!k.isModified()?m():this.confirm(mxResources.get("allChangesLost"),null,m,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=b&&b();null==d||d?l():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),
+null==a.getMode())),null!=b&&b(),window.openWindow(e,null,l))});a.constructor==LocalFile?l():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,function(){l()}),mxUtils.bind(this,function(a){f();this.handleError(a)}))}};
App.prototype.loadFile=function(a,c,d,b,g){this.hideDialog();var e=mxUtils.bind(this,function(){if(null==a||0==a.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==a.charAt(0))if(this.spinner.stop(),isLocalStorage)try{a=decodeURIComponent(a.substring(1));var e=localStorage.getItem(a);if(null!=e)this.fileLoaded(new StorageFile(this,e,a)),null!=b&&b();else throw{message:mxResources.get("fileNotFound")};}catch(p){this.handleError(p,
mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}))}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else if(null!=d)this.spinner.stop(),this.fileLoaded(d),null!=b&&b();else if("S"==a.charAt(0)){this.spinner.stop();try{this.loadDescriptor(JSON.parse(Graph.decompress(a.substring(1))),
b,mxUtils.bind(this,function(a){this.handleError(a,mxResources.get("errorLoadingFile"))}))}catch(p){this.handleError(p,mxResources.get("errorLoadingFile"))}}else if("R"==a.charAt(0))this.spinner.stop(),e=decodeURIComponent(a.substring(1)),"<"!=e.charAt(0)&&(e=Graph.decompress(e)),e=new LocalFile(this,e,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0),e.getHash=function(){return a},this.fileLoaded(e),null!=b&&b();else if("U"==a.charAt(0)){var g=decodeURIComponent(a.substring(1)),
@@ -9218,15 +9222,15 @@ null!=b&&b()}));return!0}return!1});!a()&&this.spinner.spin(document.body,mxReso
e||".png"===e||".drawio"===e)&&(c=d+e)}b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):c,!0);b.getHash=function(){return a};this.fileLoaded(b,!0)||f()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else f()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,function(){f()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},
mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else if(e=null,"G"==a.charAt(0)?e=this.drive:"D"==a.charAt(0)?e=this.dropbox:"W"==a.charAt(0)?e=this.oneDrive:"H"==a.charAt(0)?e=this.gitHub:"A"==a.charAt(0)?e=this.gitLab:"T"==a.charAt(0)&&(e=this.trello),null==e)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();
window.location.hash=null!=a?a.getHash():""}));else{var k=a.charAt(0);a=decodeURIComponent(a.substring(1));e.getFile(a,mxUtils.bind(this,function(c){this.spinner.stop();this.fileLoaded(c);var d=this.getCurrentFile();null==d?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(d.getHash=function(){return k+a},window.location.hash="#"+d.getHash()):c==d&&null==c.getMode()&&(c=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+c+'" class="geStatusAlert" style="overflow:hidden;">'+
-c+"</div>"));null!=b&&b()}),mxUtils.bind(this,function(b){null!=window.console&&null!=b&&console.log("error in loadFile:",a,b);this.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var a=this.getCurrentFile();null==a?(window.location.hash="",this.showSplash()):window.location.hash="#"+a.getHash()}),null,null,"#"+k+a)}))}}),k=this.getCurrentFile(),l=mxUtils.bind(this,function(){g||null==k||!k.isModified()?e():this.confirm(mxResources.get("allChangesLost"),
-mxUtils.bind(this,function(){null!=k&&(window.location.hash=k.getHash())}),e,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==a||0==a.length?l():null==k||c?l():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+a,null,l)).container,320,140,!0,!0)};
+c+"</div>"));null!=b&&b()}),mxUtils.bind(this,function(b){null!=window.console&&null!=b&&console.log("error in loadFile:",a,b);this.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var a=this.getCurrentFile();null==a?(window.location.hash="",this.showSplash()):window.location.hash="#"+a.getHash()}),null,null,"#"+k+a)}))}}),k=this.getCurrentFile(),n=mxUtils.bind(this,function(){g||null==k||!k.isModified()?e():this.confirm(mxResources.get("allChangesLost"),
+mxUtils.bind(this,function(){null!=k&&(window.location.hash=k.getHash())}),e,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==a||0==a.length?n():null==k||c?n():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+a,null,n)).container,320,140,!0,!0)};
App.prototype.getLibraryStorageHint=function(a){var c=a.getTitle();a.constructor!=LocalLibrary&&(c+="\n"+a.getHash());a.constructor==DriveLibrary?c+=" ("+mxResources.get("googleDrive")+")":a.constructor==GitHubLibrary?c+=" ("+mxResources.get("github")+")":a.constructor==TrelloLibrary?c+=" ("+mxResources.get("trello")+")":a.constructor==DropboxLibrary?c+=" ("+mxResources.get("dropbox")+")":a.constructor==OneDriveLibrary?c+=" ("+mxResources.get("oneDrive")+")":a.constructor==StorageLibrary?c+=" ("+
mxResources.get("browser")+")":a.constructor==LocalLibrary&&(c+=" ("+mxResources.get("device")+")");return c};App.prototype.restoreLibraries=function(){this.loadLibraries(mxSettings.getCustomLibraries(),mxUtils.bind(this,function(){this.loadLibraries((urlParams.clibs||"").split(";"))}))};
-App.prototype.loadLibraries=function(a,c){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var d=mxUtils.bind(this,function(a,b){b||mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),b=0,g=[],e=mxUtils.bind(this,function(){if(0==b){if(null!=a)for(var d=a.length-1;0<=d;d--)null!=g[d]&&this.loadLibrary(g[d]);null!=c&&c()}});if(null!=a)for(var k=0;k<a.length;k++){var l=encodeURIComponent(decodeURIComponent(a[k]));mxUtils.bind(this,function(a,c){if(null!=
-a&&0<a.length&&null==this.pendingLibraries[a]&&null==this.sidebar.palettes[a]){b++;var f=mxUtils.bind(this,function(d){delete this.pendingLibraries[a];g[c]=d;b--;e()}),k=mxUtils.bind(this,function(c){d(a,c);b--;e()});this.pendingLibraries[a]=!0;var l=a.substring(0,1);if("L"==l)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var b=decodeURIComponent(a.substring(1));this.getLocalData(b,mxUtils.bind(this,function(a){".scratchpad"==b&&null==a&&(a=this.emptyLibraryXml);
-null!=a?f(new StorageLibrary(this,a,b)):k()}))}catch(y){k()}}),0);else if("U"==l){var n=decodeURIComponent(a.substring(1));if(!this.isOffline()){l=n;this.editor.isCorsEnabledForUrl(l)||(l="t="+(new Date).getTime(),l=PROXY_URL+"?url="+encodeURIComponent(n)+"&"+l);try{mxUtils.get(l,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{f(new UrlLibrary(this,a.getText(),n))}catch(y){k()}else k()}),function(){k()})}catch(x){k()}}}else if("R"==l){if(l=decodeURIComponent(a.substring(1)),
-!this.isOffline())try{var l=JSON.parse(l),q={id:l[0],title:l[1],downloadUrl:l[2]};this.remoteInvoke("getFileContent",[q.downloadUrl],null,mxUtils.bind(this,function(a){try{f(new RemoteLibrary(this,a,q))}catch(y){k()}}),function(){k()})}catch(x){k()}}else if("S"==l&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(a.substring(1)),function(a){f(a)},k)}catch(x){k()}else{var t=null;"G"==l?null!=this.drive&&null!=this.drive.user&&(t=this.drive):"H"==l?null!=this.gitHub&&null!=this.gitHub.getUser()&&
-(t=this.gitHub):"T"==l?null!=this.trello&&this.trello.isAuthorized()&&(t=this.trello):"D"==l?null!=this.dropbox&&null!=this.dropbox.getUser()&&(t=this.dropbox):"W"==l&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(t=this.oneDrive);null!=t?t.getLibrary(decodeURIComponent(a.substring(1)),mxUtils.bind(this,function(a){try{f(a)}catch(y){k()}}),function(a){k()}):k(!0)}}})(l,k)}e()}};
+App.prototype.loadLibraries=function(a,c){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var d=mxUtils.bind(this,function(a,b){b||mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),b=0,g=[],e=mxUtils.bind(this,function(){if(0==b){if(null!=a)for(var d=a.length-1;0<=d;d--)null!=g[d]&&this.loadLibrary(g[d]);null!=c&&c()}});if(null!=a)for(var k=0;k<a.length;k++){var n=encodeURIComponent(decodeURIComponent(a[k]));mxUtils.bind(this,function(a,c){if(null!=
+a&&0<a.length&&null==this.pendingLibraries[a]&&null==this.sidebar.palettes[a]){b++;var f=mxUtils.bind(this,function(d){delete this.pendingLibraries[a];g[c]=d;b--;e()}),k=mxUtils.bind(this,function(c){d(a,c);b--;e()});this.pendingLibraries[a]=!0;var m=a.substring(0,1);if("L"==m)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var b=decodeURIComponent(a.substring(1));this.getLocalData(b,mxUtils.bind(this,function(a){".scratchpad"==b&&null==a&&(a=this.emptyLibraryXml);
+null!=a?f(new StorageLibrary(this,a,b)):k()}))}catch(y){k()}}),0);else if("U"==m){var n=decodeURIComponent(a.substring(1));if(!this.isOffline()){m=n;this.editor.isCorsEnabledForUrl(m)||(m="t="+(new Date).getTime(),m=PROXY_URL+"?url="+encodeURIComponent(n)+"&"+m);try{mxUtils.get(m,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{f(new UrlLibrary(this,a.getText(),n))}catch(y){k()}else k()}),function(){k()})}catch(x){k()}}}else if("R"==m){if(m=decodeURIComponent(a.substring(1)),
+!this.isOffline())try{var m=JSON.parse(m),t={id:m[0],title:m[1],downloadUrl:m[2]};this.remoteInvoke("getFileContent",[t.downloadUrl],null,mxUtils.bind(this,function(a){try{f(new RemoteLibrary(this,a,t))}catch(y){k()}}),function(){k()})}catch(x){k()}}else if("S"==m&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(a.substring(1)),function(a){f(a)},k)}catch(x){k()}else{var q=null;"G"==m?null!=this.drive&&null!=this.drive.user&&(q=this.drive):"H"==m?null!=this.gitHub&&null!=this.gitHub.getUser()&&
+(q=this.gitHub):"T"==m?null!=this.trello&&this.trello.isAuthorized()&&(q=this.trello):"D"==m?null!=this.dropbox&&null!=this.dropbox.getUser()&&(q=this.dropbox):"W"==m&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(q=this.oneDrive);null!=q?q.getLibrary(decodeURIComponent(a.substring(1)),mxUtils.bind(this,function(a){try{f(a)}catch(y){k()}}),function(a){k()}):k(!0)}}})(n,k)}e()}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var a=this.getCurrentFile();this.commentsSupported()?null==this.commentButton&&(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton",this.commentButton.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;float:left;cursor:pointer;width:24px;height:24px;background-size:24px 24px;background-position:center center;background-repeat:no-repeat;background-image:url("+
Editor.commentImage+");","atlas"==uiTheme?(this.commentButton.style.marginRight="10px",this.commentButton.style.marginTop="-3px"):this.commentButton.style.marginTop="min"==uiTheme?"1px":"-5px",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton),"dark"==uiTheme||"atlas"==uiTheme)&&(this.commentButton.style.filter="invert(100%)"):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),
this.commentButton=null);null!=a&&a.constructor==DriveFile?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.backgroundColor="#F2931E",this.shareButton.style.borderColor="#F08705",this.shareButton.style.backgroundImage="none",this.shareButton.style.padding="2px 10px 0 10px",this.shareButton.style.marginTop="-10px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight=
@@ -9242,10 +9246,10 @@ d():this.confirm(mxResources.get("replaceIt",[c]),d))};
App.prototype.descriptorChanged=function(){var a=this.getCurrentFile();if(null!=a){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerHTML="";var c=null!=a.getTitle()?a.getTitle():this.defaultFilename;mxUtils.write(this.fname,c);this.fname.setAttribute("title",c+" - "+mxResources.get("rename"))}var c=this.editor.graph,d=a.isEditable()&&!a.invalidChecksum;c.isEnabled()&&!d&&c.reset();c.setEnabled(d);null==urlParams.rev&&(this.updateDocumentTitle(),a=a.getHash(),0<a.length?
window.location.hash=a:0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null!=this.format&&this.editor.graph.isSelectionEmpty()&&this.format.refresh()};
App.prototype.showAuthDialog=function(a,c,d,b){var g=this.spinner.pause();this.showDialog((new AuthDialog(this,a,c,mxUtils.bind(this,function(a){try{null!=d&&d(a,mxUtils.bind(this,function(){this.hideDialog();g()}))}catch(k){this.editor.setStatus(mxUtils.htmlEntities(k.message))}}))).container,300,c?180:140,!0,!0,mxUtils.bind(this,function(a){null!=b&&b();a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(a,c,d,b,g,e){var k=c;/\.svg$/i.test(k)||(k=k.substring(0,c.lastIndexOf("."))+b);var l=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(l=!0);if(/\.v(dx|sdx?)$/i.test(c)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var n=new XMLHttpRequest;n.open("GET",a,!0);l||(n.responseType="blob");n.onload=mxUtils.bind(this,function(){if(200<=n.status&&299>=n.status){var a=null;l?(a=
-JSON.parse(n.responseText),a=this.base64ToBlob(a.content,"application/octet-stream")):a=new Blob([n.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){g(new LocalFile(this,a,k,!0))}),e,c)}else null!=e&&e({message:mxResources.get("errorLoadingFile")})});n.onerror=e;n.send()}else{var q=mxUtils.bind(this,function(b){try{/\.png$/i.test(c)?(temp=this.extractGraphModelFromPng(b),null!=temp?g(new LocalFile(this,temp,k,!0)):g(new LocalFile(this,b,c,!0))):Graph.fileSupport&&
-(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,a)?this.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(new LocalFile(this,a.responseText,k,!0)):null!=e&&e({message:mxResources.get("errorLoadingFile")}))}),c):g(new LocalFile(this,b,k,!0))}catch(m){null!=e&&e(m)}});d=/\.png$/i.test(c)||/\.jpe?g$/i.test(c)||null!=d&&"image/"==d.substring(0,6);l?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&
-299>=a.getStatus()){if(null!=g){a=JSON.parse(a.getText());var b=a.content;"base64"===a.encoding&&(b=/\.png$/i.test(c)?"data:image/png;base64,"+b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));q(b)}}else null!=e&&e({code:App.ERROR_UNKNOWN})}),function(){null!=e&&e({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=e&&e({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(a,q,e,d)}};
+App.prototype.convertFile=function(a,c,d,b,g,e){var k=c;/\.svg$/i.test(k)||(k=k.substring(0,c.lastIndexOf("."))+b);var n=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(n=!0);if(/\.v(dx|sdx?)$/i.test(c)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var m=new XMLHttpRequest;m.open("GET",a,!0);n||(m.responseType="blob");m.onload=mxUtils.bind(this,function(){if(200<=m.status&&299>=m.status){var a=null;n?(a=
+JSON.parse(m.responseText),a=this.base64ToBlob(a.content,"application/octet-stream")):a=new Blob([m.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){g(new LocalFile(this,a,k,!0))}),e,c)}else null!=e&&e({message:mxResources.get("errorLoadingFile")})});m.onerror=e;m.send()}else{var t=mxUtils.bind(this,function(b){try{/\.png$/i.test(c)?(temp=this.extractGraphModelFromPng(b),null!=temp?g(new LocalFile(this,temp,k,!0)):g(new LocalFile(this,b,c,!0))):Graph.fileSupport&&
+(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,a)?this.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(new LocalFile(this,a.responseText,k,!0)):null!=e&&e({message:mxResources.get("errorLoadingFile")}))}),c):g(new LocalFile(this,b,k,!0))}catch(l){null!=e&&e(l)}});d=/\.png$/i.test(c)||/\.jpe?g$/i.test(c)||null!=d&&"image/"==d.substring(0,6);n?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&
+299>=a.getStatus()){if(null!=g){a=JSON.parse(a.getText());var b=a.content;"base64"===a.encoding&&(b=/\.png$/i.test(c)?"data:image/png;base64,"+b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));t(b)}}else null!=e&&e({code:App.ERROR_UNKNOWN})}),function(){null!=e&&e({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=e&&e({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(a,t,e,d)}};
App.prototype.updateHeader=function(){if(null!=this.menubar){this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="28px";this.appIcon.style.height=this.menubarHeight-28+"px";this.appIcon.style.margin="14px 0px 8px 20px";this.appIcon.style.opacity="0.75";this.appIcon.style.borderRadius="3px";"dark"!=uiTheme&&(this.appIcon.style.backgroundColor="#f08705");mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,
"click",mxUtils.bind(this,function(a){this.appIconClicked(a)}));var a=mxClient.IS_SVG?"dark"==uiTheme?"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+)":
"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJFYmVuZV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMjI1IDIyNSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjI1IDIyNTsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MXtmaWxsOiNERjZDMEM7fQoJLnN0MntmaWxsOiNGRkZGRkY7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QxIiBkPSJNMjI1LDIxNS40YzAsNS4zLTQuMyw5LjYtOS41LDkuNmwwLDBINzcuMWwtNDQuOC00NS41TDYwLjIsMTM0bDgyLjctMTAyLjdsODIuMSw4NC41VjIxNS40eiIvPgo8cGF0aCBjbGFzcz0ic3QyIiBkPSJNMTg0LjYsMTI1LjhoLTIzLjdsLTI1LTQyLjdjNS43LTEuMiw5LjgtNi4yLDkuNy0xMlYzOWMwLTYuOC01LjQtMTIuMy0xMi4yLTEyLjNoLTAuMUg5MS42CgljLTYuOCwwLTEyLjMsNS40LTEyLjMsMTIuMlYzOXYzMi4xYzAsNS44LDQsMTAuOCw5LjcsMTJsLTI1LDQyLjdINDAuNGMtNi44LDAtMTIuMyw1LjQtMTIuMywxMi4ydjAuMXYzMi4xCgljMCw2LjgsNS40LDEyLjMsMTIuMiwxMi4zaDAuMWg0MS43YzYuOCwwLDEyLjMtNS40LDEyLjMtMTIuMnYtMC4xdi0zMi4xYzAtNi44LTUuNC0xMi4zLTEyLjItMTIuM2gtMC4xaC00bDI0LjgtNDIuNGgxOS4zCglsMjQuOSw0Mi40SDE0M2MtNi44LDAtMTIuMyw1LjQtMTIuMywxMi4ydjAuMXYzMi4xYzAsNi44LDUuNCwxMi4zLDEyLjIsMTIuM2gwLjFoNDEuN2M2LjgsMCwxMi4zLTUuNCwxMi4zLTEyLjJ2LTAuMXYtMzIuMQoJYzAtNi44LTUuNC0xMi4zLTEyLjItMTIuM0MxODQuNywxMjUuOCwxODQuNywxMjUuOCwxODQuNiwxMjUuOHoiLz4KPC9zdmc+Cg==)":
@@ -9273,7 +9277,7 @@ else{var b=!1;this.userPanel.innerHTML="";c=document.createElement("img");c.setA
function(a,b){var c=this.getCurrentFile();null!=c&&c.constructor==DriveFile?(this.spinner.spin(document.body,b),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();a()}),2E3)):a()}),e=mxUtils.bind(this,function(a){var b=document.createElement("tr");b.style.cssText=a.isCurrent?"":"background-color: whitesmoke; cursor: pointer";b.setAttribute("title","User ID: "+a.id);b.innerHTML='<td valign="middle" style="height: 59px;width: 66px;'+(a.isCurrent?"":"border-top: 1px solid rgb(224, 224, 224);")+
'"><img width="50" height="50" style="margin: 4px 8px 0 8px;border-radius:50%;" src="'+(null!=a.pictureUrl?a.pictureUrl:this.defaultUserPicture)+'"/></td><td valign="middle" style="white-space:nowrap;'+(null!=a.pictureUrl?"padding-top:4px;":"")+(a.isCurrent?"":"border-top: 1px solid rgb(224, 224, 224);")+'">'+mxUtils.htmlEntities(a.displayName)+'<br><small style="color:gray;">'+mxUtils.htmlEntities(a.email)+'</small><div style="margin-top:4px;"><i>'+mxResources.get("googleDrive")+"</i></div>";a.isCurrent||
mxEvent.addListener(b,"click",mxUtils.bind(this,function(b){g(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(a);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(a){this.handleError(a)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(b)}));return b}),b=!0,k=document.createElement("table");k.style.cssText="font-size:10pt;padding: 20px 0 0 0;min-width: 300px;border-spacing: 0;";
-for(var l=0;l<c.length;l++)k.appendChild(e(c[l]));this.userPanel.appendChild(k);c=document.createElement("div");c.style.textAlign="left";c.style.padding="8px";c.style.whiteSpace="nowrap";c.style.borderTop="1px solid rgb(224, 224, 224)";e=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){g(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),
+for(var n=0;n<c.length;n++)k.appendChild(e(c[n]));this.userPanel.appendChild(k);c=document.createElement("div");c.style.textAlign="left";c.style.padding="8px";c.style.whiteSpace="nowrap";c.style.borderTop="1px solid rgb(224, 224, 224)";e=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){g(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),
mxResources.get("signOut"))}))}));e.className="geBtn";e.style["float"]="right";c.appendChild(e);e=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var a=this.drive.createAuthWin();a.blur();window.focus();g(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(a){this.handleError(a)}),!0,a)}),mxResources.get("closingFile")+"...")}));
e.className="geBtn";e.style.margin="0px";c.appendChild(e);this.userPanel.appendChild(c)}c=mxUtils.bind(this,function(a,c,d,e){if(null!=a){b&&this.userPanel.appendChild(document.createElement("hr"));b=!0;var f=document.createElement("table");f.style.cssText="font-size:10pt;padding:"+(b?"10":"20")+"px 20px 10px 10px;";f.innerHTML+='<tr><td valign="top">'+(null!=c?'<img style="margin-right:6px;" src="'+c+'" width="40" height="40"/></td>':"")+'<td valign="middle" style="white-space:nowrap;">'+mxUtils.htmlEntities(a.displayName)+
(null!=a.email?'<br><small style="color:gray;">'+mxUtils.htmlEntities(a.email)+"</small>":"")+(null!=e?'<div style="margin-top:4px;"><i>'+mxUtils.htmlEntities(e)+"</i></div>":"")+"</td></tr>";this.userPanel.appendChild(f);a=document.createElement("div");a.style.textAlign="center";a.style.paddingBottom="12px";a.style.whiteSpace="nowrap";null!=d&&(d=mxUtils.button(mxResources.get("signOut"),d),d.className="geBtn",a.appendChild(d));this.userPanel.appendChild(a)}});null!=this.dropbox&&c(this.dropbox.getUser(),
@@ -9288,8 +9292,8 @@ var a=null;null!=this.drive&&null!=this.drive.getUser()?a=this.drive.getUser():n
App.prototype.getCurrentUser=function(){var a=null;null!=this.drive&&null!=this.drive.getUser()?a=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?a=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?a=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(a=this.gitHub.getUser());return a};var editorResetGraph=Editor.prototype.resetGraph;
Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);this.graph.pageFormat=mxSettings.getPageFormat()};(function(){var a=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){a.apply(this,arguments);this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-10+"px"};Menus.prototype.createHelpLink=function(a){var b=document.createElement("span");b.setAttribute("title",mxResources.get("help"));b.style.cssText="color:blue;text-decoration:underline;margin-left:8px;cursor:help;";
var c=document.createElement("img");mxUtils.setOpacity(c,50);c.style.height="16px";c.style.width="16px";c.setAttribute("border","0");c.setAttribute("valign","bottom");c.setAttribute("src",Editor.helpImage);b.appendChild(c);mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){null!=this.editorUi.menubar&&this.editorUi.menubar.hideMenu();this.editorUi.openLink(a);mxEvent.consume(b)}));return b};Menus.prototype.addLinkToItem=function(a,b){null!=a&&a.firstChild.nextSibling.appendChild(this.createHelpLink(b))};
-var c=Menus.prototype.init;Menus.prototype.init=function(){function a(a,b){this.ui=a;this.previousExtFonts=this.extFonts=b}c.apply(this,arguments);var b=this.editorUi,g=b.editor.graph,e=mxUtils.bind(g,g.isEnabled),k=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),l=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==
-document.documentMode||9<document.documentMode),n=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),q=("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&mxClient.IS_SVG&&(null==document.documentMode||
+var c=Menus.prototype.init;Menus.prototype.init=function(){function a(a,b){this.ui=a;this.previousExtFonts=this.extFonts=b}c.apply(this,arguments);var b=this.editorUi,g=b.editor.graph,e=mxUtils.bind(g,g.isEnabled),k=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),n=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==
+document.documentMode||9<document.documentMode),m=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),t=("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&mxClient.IS_SVG&&(null==document.documentMode||
9<document.documentMode);mxClient.IS_SVG||b.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");b.actions.addAction("new...",function(){var a=b.isOffline(),c=new NewDialog(b,a);b.showDialog(c.container,a?350:620,a?70:440,!0,!0,function(a){a&&null==b.getCurrentFile()&&b.showSplash()});c.init()});b.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){b.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",
mxUtils.bind(this,function(a,c,d,e,f,g,k,l,m,n){a=parseInt(a);!isNaN(a)&&0<a&&b.exportSvg(a/100,c,d,e,f,g,k,!l,m,n)}),!0,null,"svg")}));b.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){var a=new NewDialog(b,null,!1,function(a){b.hideDialog();if(null!=a){var c=b.editor.graph.getFreeInsertPoint();g.setSelectionCells(b.importXml(a,Math.max(c.x,20),Math.max(c.y,20),!0));g.scrollCellToVisible(g.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,
!1,mxResources.get("insert"));b.showDialog(a.container,620,440,!0,!0)})).isEnabled=e;var f=b.actions.addAction("points",function(){b.editor.graph.view.setUnit(mxConstants.POINTS)});f.setToggleAction(!0);f.setSelectedCallback(function(){return b.editor.graph.view.unit==mxConstants.POINTS});f=b.actions.addAction("inches",function(){b.editor.graph.view.setUnit(mxConstants.INCHES)});f.setToggleAction(!0);f.setSelectedCallback(function(){return b.editor.graph.view.unit==mxConstants.INCHES});f=b.actions.addAction("millimeters",
@@ -9306,7 +9310,7 @@ var c=b.getCurrentFile();null!=c&&c.isModified()?b.confirm(mxResources.get("allC
function(){b.isRevisionHistorySupported()?b.spinner.spin(document.body,mxResources.get("loading"))&&b.getRevisions(mxUtils.bind(this,function(a,c){b.spinner.stop();var d=new RevisionDialog(b,a,c);b.showDialog(d.container,640,480,!0,!0);d.init()}),mxUtils.bind(this,function(a){b.handleError(a)})):b.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});b.actions.addAction("createRevision",function(){b.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");
f=b.actions.addAction("synchronize",function(){b.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(f.label=mxResources.get("refresh"));b.actions.addAction("upload...",function(){var a=b.getCurrentFile();null!=a&&(window.drawdata=b.getFileData(),a=null!=a.getTitle()?a.getTitle():b.defaultFilename,b.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(b.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(a),
null,!0))});"undefined"!==typeof MathJax&&(f=b.actions.addAction("mathematicalTypesetting",function(){var a=new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.mathEnabled=!b.isMathEnabled();g.model.execute(a)}),f.setToggleAction(!0),f.setSelectedCallback(function(){return b.isMathEnabled()}),f.isEnabled=e);if(isLocalStorage||mxClient.IS_CHROMEAPP)f=b.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),f.setToggleAction(!0),
-f.setSelectedCallback(function(){return mxSettings.getShowStartScreen()});var m=b.actions.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});m.setToggleAction(!0);m.setSelectedCallback(function(){return m.isEnabled()&&b.editor.autosave});b.actions.addAction("editGeometry...",function(){for(var a=g.getSelectionCells(),c=[],d=0;d<a.length;d++)g.getModel().isVertex(a[d])&&c.push(a[d]);0<c.length&&(a=new EditGeometryDialog(b,c),b.showDialog(a.container,200,250,!0,!0),a.init())},
+f.setSelectedCallback(function(){return mxSettings.getShowStartScreen()});var l=b.actions.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});l.setToggleAction(!0);l.setSelectedCallback(function(){return l.isEnabled()&&b.editor.autosave});b.actions.addAction("editGeometry...",function(){for(var a=g.getSelectionCells(),c=[],d=0;d<a.length;d++)g.getModel().isVertex(a[d])&&c.push(a[d]);0<c.length&&(a=new EditGeometryDialog(b,c),b.showDialog(a.container,200,250,!0,!0),a.init())},
null,null,Editor.ctrlKey+"+Shift+M");var p="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize".split(" ");b.actions.addAction("copyStyle",function(){var a=
g.view.getState(g.getSelectionCell());if(g.isEnabled()&&null!=a){b.copiedStyle=mxUtils.clone(a.style);for(var a=g.getModel().getStyle(a.cell),a=null!=a?a.split(";"):[],c=0;c<a.length;c++){var d=a[c],e=d.indexOf("=");if(0<=e){var f=d.substring(0,e),d=d.substring(e+1);null==b.copiedStyle[f]&&"none"==d&&(b.copiedStyle[f]="none")}}}},null,null,Editor.ctrlKey+"+Shift+C");b.actions.addAction("pasteStyle",function(){if(g.isEnabled()&&!g.isSelectionEmpty()&&null!=b.copiedStyle){g.getModel().beginUpdate();
try{for(var a=g.getSelectionCells(),c=0;c<a.length;c++)for(var d=g.view.getState(a[c]),e=0;e<p.length;e++){var f=p[e],k=b.copiedStyle[f];d.style[f]!=k&&g.setCellStyles(f,k,[a[c]])}}finally{g.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+V");b.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!b.isOffline()){var a=new BackgroundImageDialog(b,function(a){b.setBackgroundImage(a)});b.showDialog(a.container,320,170,!0,!0);a.init()}}));b.actions.put("exportPng",
@@ -9324,7 +9328,7 @@ f=new EmbedDialog(b,e);b.showDialog(f.container,440,240,!0);f.init()}catch(J){b.
if(null!=b){var c=this.get("language");if(null!=c){c=b.addMenu("",c.funct);c.setAttribute("title",mxResources.get("language"));c.style.width="16px";c.style.paddingTop="2px";c.style.paddingLeft="4px";c.style.zIndex="1";c.style.position="absolute";c.style.display="block";c.style.cursor="pointer";c.style.right="17px";"atlas"==uiTheme?(c.style.top="6px",c.style.right="15px"):c.style.top="min"==uiTheme?"2px":"0px";if(mxClient.IS_VML)c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>';else{var d=
document.createElement("div");d.style.backgroundImage="url("+Editor.globeImage+")";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";d.style.backgroundSize="19px 19px";d.style.position="absolute";d.style.height="19px";d.style.width="19px";d.style.marginTop="2px";d.style.zIndex="1";c.appendChild(d);mxUtils.setOpacity(c,40);if("atlas"==uiTheme||"dark"==uiTheme)c.style.opacity="0.85",c.style.filter="invert(100%)"}document.body.appendChild(c)}}return b}}b.customLayoutConfig=
[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];b.actions.addAction("runLayout",function(){var a=new TextareaDialog(b,"Run Layouts:",JSON.stringify(b.customLayoutConfig,null,2),function(a){if(0<a.length)try{var c=JSON.parse(a);b.executeLayoutList(c);b.customLayoutConfig=c}catch(A){b.handleError(A),null!=window.console&&console.error(A)}});a.textarea.style.width="600px";a.textarea.style.height=
-"380px";b.showDialog(a.container,620,460,!0,!0);a.init()});var f=this.get("layout"),t=f.funct;f.funct=function(a,c){t.apply(this,arguments);a.addSeparator(c);b.menus.addMenuItem(a,"runLayout",c,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(a,c){if(!mxClient.IS_CHROMEAPP&&b.isOffline())this.addMenuItems(a,["about"],c);else{var d=a.addItem("Search:",null,null,c,null,null,!1);d.style.backgroundColor="dark"==uiTheme?"#505759":"whiteSmoke";d.style.cursor=
+"380px";b.showDialog(a.container,620,460,!0,!0);a.init()});var f=this.get("layout"),q=f.funct;f.funct=function(a,c){q.apply(this,arguments);a.addSeparator(c);b.menus.addMenuItem(a,"runLayout",c,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(a,c){if(!mxClient.IS_CHROMEAPP&&b.isOffline())this.addMenuItems(a,["about"],c);else{var d=a.addItem("Search:",null,null,c,null,null,!1);d.style.backgroundColor="dark"==uiTheme?"#505759":"whiteSmoke";d.style.cursor=
"default";var e=document.createElement("input");e.setAttribute("type","text");e.setAttribute("size","25");e.style.marginLeft="8px";mxEvent.addListener(e,"keydown",mxUtils.bind(this,function(a){var b=mxUtils.trim(e.value);13==a.keyCode&&0<b.length?(this.editorUi.openLink("https://desk.draw.io/support/search/solutions?term="+encodeURIComponent(b)),e.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:b}),null!=this.editorUi.menubar&&window.setTimeout(mxUtils.bind(this,function(){this.editorUi.menubar.hideMenu()}),
0)):27==a.keyCode&&(e.value="")}));d.firstChild.nextSibling.appendChild(e);mxEvent.addGestureListeners(e,function(a){document.activeElement!=e&&e.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){e.focus()},0);this.addMenuItems(a,["-","keyboardShortcuts","quickStart","userManual","-"],c);mxClient.IS_CHROMEAPP||this.addMenuItems(a,["feedback"],c);this.addMenuItems(a,["support","-"],c);EditorUi.isElectronApp||navigator.standalone||
"1"==urlParams.embed||this.addMenuItems(a,["downloadDesktop"],c);navigator.standalone||"1"==urlParams.embed||this.addMenuItems(a,["useOffline"],c);this.addMenuItems(a,["-","about"],c)}"1"==urlParams.test&&(a.addSeparator(c),this.addSubmenu("testDevelop",a,c))})));"1"==urlParams.test&&(mxResources.parse("testDevelop=Develop"),mxResources.parse("showBoundingBox=Show bounding box"),mxResources.parse("createSidebarEntry=Create Sidebar Entry"),mxResources.parse("testCheckFile=Check File"),mxResources.parse("testDiff=Diff"),
@@ -9356,9 +9360,9 @@ this.addMenuItems(a,["exportPng","exportJpg"],c);this.addMenuItems(a,["exportSvg
mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(a,c){function d(a){a.pickFile(function(c){b.spinner.spin(document.body,mxResources.get("loading"))&&a.getFile(c,function(a){var c="data:image/"==a.getData().substring(0,11)?f(a.getTitle()):"text/xml";/\.svg$/i.test(a.getTitle())&&!b.editor.isDataSvg(a.getData())&&(a.setData(b.createSvgDataUri(a.getData())),c="image/svg+xml");e(a.getData(),c,a.getTitle())},function(a){b.handleError(a,null!=a?mxResources.get("errorLoadingFile"):
null)},a==b.drive)},!0)}var e=mxUtils.bind(this,function(a,c,d){var e=g.view,f=g.getGraphBounds(),k=g.snap(Math.ceil(Math.max(0,f.x/e.scale-e.translate.x)+4*g.gridSize)),l=g.snap(Math.ceil(Math.max(0,(f.y+f.height)/e.scale-e.translate.y)+4*g.gridSize));"data:image/"==a.substring(0,11)?b.loadImage(a,mxUtils.bind(this,function(e){var f=!0,m=mxUtils.bind(this,function(){b.resizeImage(e,a,mxUtils.bind(this,function(e,m,n){e=f?Math.min(1,Math.min(b.maxImageSize/m,b.maxImageSize/n)):1;b.importFile(a,c,
k,l,Math.round(m*e),Math.round(n*e),d,function(a){b.spinner.stop();g.setSelectionCells(a);g.scrollCellToVisible(g.getSelectionCell())})}),f)});a.length>b.resampleThreshold?b.confirmImageResize(function(a){f=a;m()}):m()}),mxUtils.bind(this,function(){b.handleError({message:mxResources.get("cannotOpenFile")})})):b.importFile(a,c,k,l,0,0,d,function(a){b.spinner.stop();g.setSelectionCells(a);g.scrollCellToVisible(g.getSelectionCell())})}),f=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?
-b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)&&(b="image/gif");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=b.drive?a.addItem(mxResources.get("googleDrive")+"...",null,function(){d(b.drive)},c):k&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){d(b.oneDrive)},c):n&&
-"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+"...",null,function(){d(b.dropbox)},c):l&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){d(b.gitHub)},c);null!=
-b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){d(b.gitLab)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){d(b.trello)},c):q&&"function"===typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&a.addItem(mxResources.get("browser")+"...",null,function(){b.importLocalFile(!1)},c);a.addItem(mxResources.get("device")+"...",
+b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)&&(b="image/gif");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=b.drive?a.addItem(mxResources.get("googleDrive")+"...",null,function(){d(b.drive)},c):k&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){d(b.oneDrive)},c):m&&
+"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+"...",null,function(){d(b.dropbox)},c):n&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){d(b.gitHub)},c);null!=
+b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){d(b.gitLab)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){d(b.trello)},c):t&&"function"===typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&a.addItem(mxResources.get("browser")+"...",null,function(){b.importLocalFile(!1)},c);a.addItem(mxResources.get("device")+"...",
null,function(){b.importLocalFile(!0)},c);b.isOffline()||(a.addSeparator(c),a.addItem(mxResources.get("url")+"...",null,function(){var a=new FilenameDialog(b,"",mxResources.get("import"),function(a){if(null!=a&&0<a.length&&b.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(a)?"image/png":"text/xml";b.loadUrl(PROXY_URL+"?url="+encodeURIComponent(a),function(b){e(b,c,a)},function(){b.spinner.stop();b.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==
c)}},mxResources.get("url"));b.showDialog(a.container,300,80,!0,!0);a.init()},c))}))).isEnabled=e;this.put("theme",new Menu(mxUtils.bind(this,function(a,c){var d=mxSettings.getUi(),e=a.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");mxSettings.save();b.alert(mxResources.get("restartForChangeRequired"))},c);"kennedy"!=d&&"atlas"!=d&&"dark"!=d&&"min"!=d&&a.addCheckmark(e,Editor.checkmarkImage);a.addSeparator(c);e=a.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("kennedy");
mxSettings.save();b.alert(mxResources.get("restartForChangeRequired"))},c);"kennedy"==d&&a.addCheckmark(e,Editor.checkmarkImage);e=a.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");mxSettings.save();b.alert(mxResources.get("restartForChangeRequired"))},c);"min"==d&&a.addCheckmark(e,Editor.checkmarkImage);e=a.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();b.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==d&&a.addCheckmark(e,
@@ -9376,17 +9380,17 @@ null,null,Editor.ctrlKey+"+Shift+X").isEnabled=e;b.actions.put("insertRectangle"
new Action(mxResources.get("rhombus"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&y("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=e;var D=mxUtils.bind(this,function(a,b,c){for(var d=0;d<c.length;d++)"-"==c[d]?a.addSeparator(b):x(a,b,mxResources.get(c[d])+"...",c[d])});this.put("insert",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),c);b.insertTemplateEnabled&&
!b.isOffline()&&this.addMenuItems(a,["insertTemplate","-"],c);this.addMenuItems(a,["createShape","insertFreehand","-"],c);this.addSubmenu("insertLayout",a,c,mxResources.get("layout"));this.addSubmenu("insertAdvanced",a,c,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){D(a,b,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,c){D(a,c,
["fromText","plantUml","-","formatSql"]);a.addItem(mxResources.get("csv")+"...",null,function(){b.showImportCsvDialog()},c,null,e())})));this.put("openRecent",new Menu(function(a,c){var d=b.getRecent();if(null!=d){for(var e=0;e<d.length;e++)(function(d){var e=d.mode;e==App.MODE_GOOGLE?e="googleDrive":e==App.MODE_ONEDRIVE&&(e="oneDrive");a.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){b.loadFile(d.id)},c)})(d[e]);a.addSeparator(c)}a.addItem(mxResources.get("reset"),null,function(){b.resetRecent()},
-c)}));this.put("openFrom",new Menu(function(a,c){null!=b.drive?a.addItem(mxResources.get("googleDrive")+"...",null,function(){b.pickFile(App.MODE_GOOGLE)},c):k&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){b.pickFile(App.MODE_ONEDRIVE)},c):n&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+
-" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+"...",null,function(){b.pickFile(App.MODE_DROPBOX)},c):l&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){b.pickFile(App.MODE_GITHUB)},c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+
-"...",null,function(){b.pickFile(App.MODE_GITLAB)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){b.pickFile(App.MODE_TRELLO)},c):q&&"function"===typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&a.addItem(mxResources.get("browser")+"...",null,function(){b.pickFile(App.MODE_BROWSER)},c);a.addItem(mxResources.get("device")+"...",null,
+c)}));this.put("openFrom",new Menu(function(a,c){null!=b.drive?a.addItem(mxResources.get("googleDrive")+"...",null,function(){b.pickFile(App.MODE_GOOGLE)},c):k&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){b.pickFile(App.MODE_ONEDRIVE)},c):m&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+
+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+"...",null,function(){b.pickFile(App.MODE_DROPBOX)},c):n&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){b.pickFile(App.MODE_GITHUB)},c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+
+"...",null,function(){b.pickFile(App.MODE_GITLAB)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){b.pickFile(App.MODE_TRELLO)},c):t&&"function"===typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&a.addItem(mxResources.get("browser")+"...",null,function(){b.pickFile(App.MODE_BROWSER)},c);a.addItem(mxResources.get("device")+"...",null,
function(){b.pickFile(App.MODE_DEVICE)},c);b.isOffline()||(a.addSeparator(c),a.addItem(mxResources.get("url")+"...",null,function(){var a=new FilenameDialog(b,"",mxResources.get("open"),function(a){null!=a&&0<a.length&&(null==b.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(a):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(a)))},mxResources.get("url"));b.showDialog(a.container,300,80,!0,!0);
a.init()},c))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(a,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=b.drive?a.addItem(mxResources.get("googleDrive")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):k&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+
-"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):n&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):l&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},
-c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},c):q&&"function"===typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+
+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):m&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):n&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},
+c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},c):t&&"function"===typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+
" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&a.addItem(mxResources.get("browser")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);a.addItem(mxResources.get("device")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)})),this.put("openLibraryFrom",new Menu(function(a,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=b.drive?a.addItem(mxResources.get("googleDrive")+
-"...",null,function(){b.pickLibrary(App.MODE_GOOGLE)},c):k&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){b.pickLibrary(App.MODE_ONEDRIVE)},c):n&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+
-"...",null,function(){b.pickLibrary(App.MODE_DROPBOX)},c):l&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){b.pickLibrary(App.MODE_GITHUB)},c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){b.pickLibrary(App.MODE_GITLAB)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",
-null,function(){b.pickLibrary(App.MODE_TRELLO)},c):q&&"function"===typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&a.addItem(mxResources.get("browser")+"...",null,function(){b.pickLibrary(App.MODE_BROWSER)},c);a.addItem(mxResources.get("device")+"...",null,function(){b.pickLibrary(App.MODE_DEVICE)},c);b.isOffline()||(a.addSeparator(c),a.addItem(mxResources.get("url")+
+"...",null,function(){b.pickLibrary(App.MODE_GOOGLE)},c):k&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){b.pickLibrary(App.MODE_ONEDRIVE)},c):m&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+
+"...",null,function(){b.pickLibrary(App.MODE_DROPBOX)},c):n&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){b.pickLibrary(App.MODE_GITHUB)},c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){b.pickLibrary(App.MODE_GITLAB)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",
+null,function(){b.pickLibrary(App.MODE_TRELLO)},c):t&&"function"===typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&a.addItem(mxResources.get("browser")+"...",null,function(){b.pickLibrary(App.MODE_BROWSER)},c);a.addItem(mxResources.get("device")+"...",null,function(){b.pickLibrary(App.MODE_DEVICE)},c);b.isOffline()||(a.addSeparator(c),a.addItem(mxResources.get("url")+
"...",null,function(){var a=new FilenameDialog(b,"",mxResources.get("open"),function(a){if(null!=a&&0<a.length&&b.spinner.spin(document.body,mxResources.get("loading"))){var c=a;b.editor.isCorsEnabledForUrl(a)||(c=PROXY_URL+"?url="+encodeURIComponent(a));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){b.spinner.stop();try{b.loadLibrary(new UrlLibrary(this,c.getText(),a))}catch(J){b.handleError(J,mxResources.get("errorLoadingFile"))}}else b.spinner.stop(),b.handleError(null,mxResources.get("errorLoadingFile"))},
function(){b.spinner.stop();b.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));b.showDialog(a.container,300,80,!0,!0);a.init()},c));"1"==urlParams.confLib&&(a.addSeparator(c),a.addItem(mxResources.get("confluenceCloud")+"...",null,function(){b.showRemotelyStoredLibrary(mxResources.get("libraries"))},c))})));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
f=b.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(b,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("comments"));else{var a=!this.commentsWindow.window.isVisible();
@@ -9421,9 +9425,9 @@ this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pa
a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft=a.view.translate.x*a.view.scale+b.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+b.viewState.scrollTop),d=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?1!=MathJax.Hub.queue.pending||null==this.editor||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){null!=this.editor&&this.editor.graph.refresh()})):
"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,c){for(var d=c.getProperty("edit").changes,e=0;e<d.length;e++)if(d[e]instanceof SelectPage||d[e]instanceof RenamePage||d[e]instanceof MovePage||d[e]instanceof mxRootChange){b();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
EditorUi.prototype.restoreViewState=function(a,c,d){a=null!=a?this.getPageById(a.getId()):null;var b=this.editor.graph;null!=a&&null!=this.currentPage&&null!=this.pages&&(a!=this.currentPage?this.selectPage(a,!0,c):(b.setViewState(c),this.editor.updateGraphComponents(),b.view.revalidate(),b.sizeDidChange()),b.container.scrollLeft=b.view.translate.x*b.view.scale+c.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+c.scrollTop,b.restoreSelection(d))};
-Graph.prototype.createViewState=function(a){var c=a.getAttribute("page"),d=parseFloat(a.getAttribute("pageScale")),b=parseFloat(a.getAttribute("pageWidth")),g=parseFloat(a.getAttribute("pageHeight")),e=a.getAttribute("background"),k=a.getAttribute("backgroundImage"),k=null!=k&&0<k.length?JSON.parse(k):null,l=a.getAttribute("extFonts");if(l)try{l=l.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}})}catch(n){console.log("ExtFonts format error: "+n.message)}return{gridEnabled:"0"!=
+Graph.prototype.createViewState=function(a){var c=a.getAttribute("page"),d=parseFloat(a.getAttribute("pageScale")),b=parseFloat(a.getAttribute("pageWidth")),g=parseFloat(a.getAttribute("pageHeight")),e=a.getAttribute("background"),k=a.getAttribute("backgroundImage"),k=null!=k&&0<k.length?JSON.parse(k):null,n=a.getAttribute("extFonts");if(n)try{n=n.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}})}catch(m){console.log("ExtFonts format error: "+m.message)}return{gridEnabled:"0"!=
a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=c?"0"!=c:this.defaultPageVisible,background:null!=e&&0<e.length?e:null,backgroundImage:null!=k?new mxImage(k.src,k.width,k.height):null,pageScale:isNaN(d)?mxGraph.prototype.pageScale:d,pageFormat:isNaN(b)||isNaN(g)?"undefined"===
-typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat():new mxRectangle(0,0,b,g),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,extFonts:l||[]}};
+typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat():new mxRectangle(0,0,b,g),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,extFonts:n||[]}};
Graph.prototype.saveViewState=function(a,c,d){d||(c.setAttribute("grid",null==a||a.gridEnabled?"1":"0"),c.setAttribute("gridSize",null!=a?a.gridSize:mxGraph.prototype.gridSize),c.setAttribute("guides",null==a||a.guidesEnabled?"1":"0"),c.setAttribute("tooltips",null==a||a.tooltips?"1":"0"),c.setAttribute("connect",null==a||a.connect?"1":"0"),c.setAttribute("arrows",null==a||a.arrows?"1":"0"),c.setAttribute("page",null==a&&this.defaultPageVisible||null!=a&&a.pageVisible?"1":"0"),c.setAttribute("fold",
null==a||a.foldingEnabled?"1":"0"));c.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);d=null!=a?a.pageFormat:"undefined"===typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=d&&(c.setAttribute("pageWidth",d.width),c.setAttribute("pageHeight",d.height));null!=a&&null!=a.background&&c.setAttribute("background",a.background);null!=a&&null!=a.backgroundImage&&c.setAttribute("backgroundImage",JSON.stringify(a.backgroundImage));c.setAttribute("math",
null!=a&&a.mathEnabled?"1":"0");c.setAttribute("shadow",null!=a&&a.shadowVisible?"1":"0");null!=a&&null!=a.extFonts&&0<a.extFonts.length&&c.setAttribute("extFonts",a.extFonts.map(function(a){return a.name+"^"+a.url}).join("|"))};
@@ -9449,9 +9453,9 @@ EditorUi.prototype.createTabContainer=function(){var a=document.createElement("d
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,c=document.createElement("div");c.style.position="relative";c.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";c.style.verticalAlign="top";c.style.height=this.tabContainer.style.height;c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.fontSize="13px";c.style.marginLeft="30px";for(var d=this.editor.isChromelessView()?29:59,b=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
d)/this.pages.length)+1),g=null,e=0;e<this.pages.length;e++)mxUtils.bind(this,function(b,d){this.pages[b]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#fff"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(c){a.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),g=b):mxEvent.consume(c)}));mxEvent.addListener(d,"dragend",mxUtils.bind(this,function(a){g=
null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=g&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=g&&b!=g&&this.movePage(g,b);a.stopPropagation();a.preventDefault()}));c.appendChild(d)})(e,this.createTabForPage(this.pages[e],b,this.pages[e]!=this.currentPage,e+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(c);b=this.createPageMenuTab();
-this.tabContainer.appendChild(b);b=null;this.isPageInsertTabVisible()&&(b=this.createPageInsertTab(),this.tabContainer.appendChild(b));if(c.clientWidth>this.tabContainer.clientWidth-d){null!=b&&(b.style.position="absolute",b.style.right="0px",c.style.marginRight="30px");var k=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");k.style.position="absolute";k.style.right=this.editor.chromeless?"29px":"55px";k.style.fontSize="13pt";this.tabContainer.appendChild(k);var l=this.createControlTab(4,"&nbsp;&#10095;");
-l.style.position="absolute";l.style.right=this.editor.chromeless?"0px":"29px";l.style.fontSize="13pt";this.tabContainer.appendChild(l);var n=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));c.style.width=n+"px";mxEvent.addListener(k,"click",mxUtils.bind(this,function(a){c.scrollLeft-=Math.max(20,n-20);mxUtils.setOpacity(k,0<c.scrollLeft?100:50);mxUtils.setOpacity(l,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(k,0<c.scrollLeft?100:
-50);mxUtils.setOpacity(l,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.addListener(l,"click",mxUtils.bind(this,function(a){c.scrollLeft+=Math.max(20,n-20);mxUtils.setOpacity(k,0<c.scrollLeft?100:50);mxUtils.setOpacity(l,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+this.tabContainer.appendChild(b);b=null;this.isPageInsertTabVisible()&&(b=this.createPageInsertTab(),this.tabContainer.appendChild(b));if(c.clientWidth>this.tabContainer.clientWidth-d){null!=b&&(b.style.position="absolute",b.style.right="0px",c.style.marginRight="30px");var k=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");k.style.position="absolute";k.style.right=this.editor.chromeless?"29px":"55px";k.style.fontSize="13pt";this.tabContainer.appendChild(k);var n=this.createControlTab(4,"&nbsp;&#10095;");
+n.style.position="absolute";n.style.right=this.editor.chromeless?"0px":"29px";n.style.fontSize="13pt";this.tabContainer.appendChild(n);var m=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));c.style.width=m+"px";mxEvent.addListener(k,"click",mxUtils.bind(this,function(a){c.scrollLeft-=Math.max(20,m-20);mxUtils.setOpacity(k,0<c.scrollLeft?100:50);mxUtils.setOpacity(n,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(k,0<c.scrollLeft?100:
+50);mxUtils.setOpacity(n,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.addListener(n,"click",mxUtils.bind(this,function(a){c.scrollLeft+=Math.max(20,m-20);mxUtils.setOpacity(k,0<c.scrollLeft?100:50);mxUtils.setOpacity(n,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(a){var c=document.createElement("div");c.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";c.style.whiteSpace="nowrap";c.style.boxSizing="border-box";c.style.position="relative";c.style.overflow="hidden";c.style.textAlign="center";c.style.marginLeft="-1px";c.style.height=this.tabContainer.clientHeight+"px";c.style.padding="12px 4px 8px 4px";c.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #e8eaed";c.style.borderTopStyle="none";c.style.borderBottomStyle=
"none";c.style.backgroundColor=this.tabContainer.style.backgroundColor;c.style.cursor="move";c.style.color="gray";a&&(mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(c.style.backgroundColor="dark"==uiTheme?"black":"#e8eaed",mxEvent.consume(a))})),mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(a){c.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return c};
EditorUi.prototype.createControlTab=function(a,c){var d=this.createTab(!0);d.style.lineHeight=this.tabContainerHeight+"px";d.style.paddingTop=a+"px";d.style.cursor="pointer";d.style.width="30px";d.innerHTML=c;null!=d.firstChild&&null!=d.firstChild.style&&mxUtils.setOpacity(d.firstChild,40);return d};
@@ -9461,7 +9465,7 @@ function(){this.removePage(d)}),b),a.addItem(mxResources.get("rename"),null,mxUt
mxEvent.getClientX(a),g=mxEvent.getClientY(a);c.popup(b,g,null,a);this.setCurrentMenu(c);mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
EditorUi.prototype.createTabForPage=function(a,c,d,b){d=this.createTab(d);var g=a.getName()||mxResources.get("untitled"),e=a.getId();d.setAttribute("title",g+(null!=e?" ("+e+")":"")+" ["+b+"]");mxUtils.write(d,g);d.style.maxWidth=c+"px";d.style.width=c+"px";this.addTabListeners(a,d);42<c&&(d.style.textOverflow="ellipsis");return d};
EditorUi.prototype.addTabListeners=function(a,c){mxEvent.disableContextMenu(c);var d=this.editor.graph;mxEvent.addListener(c,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var b=!1,g=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,function(c){b=null!=this.currentMenu;g=a==this.currentPage;d.isMouseDown||g||this.selectPage(a)}),null,mxUtils.bind(this,function(e){if(d.isEnabled()&&!d.isMouseDown&&(mxEvent.isTouchEvent(e)&&g||mxEvent.isPopupTrigger(e))){d.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(e)||!b){var k=new mxPopupMenu(this.createPageMenu(a));k.div.className+=" geMenubarMenu";k.smartSeparators=!0;k.showDisabled=!0;k.autoExpand=!0;k.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(k,arguments);this.resetCurrentMenu();k.destroy()});var l=mxEvent.getClientX(e),n=mxEvent.getClientY(e);k.popup(l,n,null,e);this.setCurrentMenu(k,c)}mxEvent.consume(e)}}))};
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(e)||!b){var k=new mxPopupMenu(this.createPageMenu(a));k.div.className+=" geMenubarMenu";k.smartSeparators=!0;k.showDisabled=!0;k.autoExpand=!0;k.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(k,arguments);this.resetCurrentMenu();k.destroy()});var n=mxEvent.getClientX(e),m=mxEvent.getClientY(e);k.popup(n,m,null,e);this.setCurrentMenu(k,c)}mxEvent.consume(e)}}))};
EditorUi.prototype.createPageMenu=function(a,c){return mxUtils.bind(this,function(d,b){d.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),b);d.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),b);d.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,c)}),b);var g=this.getCurrentFile();null!=g&&g.constructor!=LocalFile&&(d.addSeparator(b),d.addItem(mxResources.get("link"),
null,mxUtils.bind(this,function(){var b=this.getSearch("create title mode url drive splash state".split(" ")),b=b+((0==b.length?"?":"&")+"page-id="+a.getId()),b=window.location.protocol+"//"+window.location.host+"/"+b+"#"+g.getHash(),b=new EmbedDialog(this,b);this.showDialog(b.container,440,240,!0,!0);b.init()}),b));d.addSeparator(b);d.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,mxResources.get("copyOf",[a.getName()]))}),b)})};
(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){a.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,d,b){b.ui=a.ui;return d};a.afterDecode=function(a,d,b){a=b.oldIndex;b.oldIndex=b.newIndex;b.newIndex=a;return b};mxCodecRegistry.register(a)})();
@@ -9469,30 +9473,30 @@ null,mxUtils.bind(this,function(){var b=this.getSearch("create title mode url dr
(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),c="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,b,g){g.setAttribute("relatedPage",b.relatedPage.getId());null==b.index&&(g.setAttribute("name",b.relatedPage.getName()),null!=b.relatedPage.viewState&&g.setAttribute("viewState",JSON.stringify(b.relatedPage.viewState,function(a,b){return 0>mxUtils.indexOf(c,
a)?b:void 0})),null!=b.relatedPage.root&&a.encodeCell(b.relatedPage.root,g));return g};a.beforeDecode=function(a,b,c){c.ui=a.ui;c.relatedPage=c.ui.getPageById(b.getAttribute("relatedPage"));if(null==c.relatedPage){var d=b.ownerDocument.createElement("diagram");d.setAttribute("id",b.getAttribute("relatedPage"));d.setAttribute("name",b.getAttribute("name"));c.relatedPage=new DiagramPage(d);d=b.getAttribute("viewState");null!=d&&(c.relatedPage.viewState=JSON.parse(d),b.removeAttribute("viewState"));
b=b.cloneNode(!0);d=b.firstChild;if(null!=d)for(c.relatedPage.root=a.decodeCell(d,!1),c=d.nextSibling,d.parentNode.removeChild(d),d=c;null!=d;){c=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var g=d.getAttribute("id");null==a.lookup(g)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=c}}return b};a.afterDecode=function(a,b,c){c.index=c.previousIndex;return c};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png";EditorUi.prototype.altShiftActions[68]=
-"selectDescendants";var c=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,b,d,l,n){b=null!=b?b:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var e=d.slice(),f=[],g=0;g<d.length;g++){var k=this.view.getState(d[g]),u=null!=k?k.style:this.getCellStyle(d[g]);"1"==mxUtils.getValue(u,"treeFolding","0")&&(this.traverse(d[g],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=d[g]&&f.push(a);return a==d[g]||!this.model.isCollapsed(a)})),
-this.model.setCollapsed(d[g],a))}for(g=0;g<f.length;g++)this.model.setVisible(f[g],!a);d=e;d=c.apply(this,arguments)}finally{this.model.endUpdate()}return d};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return x.isVertex(a)&&d(a)}function c(a){var b=!1;null!=a&&(b=t.view.getState(a),b="1"==(null!=b?b.style:t.getCellStyle(a)).treeMoving);
-return b}function d(a){var b=!1;null!=a&&(a=x.getParent(a),b=t.view.getState(a),b="tree"==(null!=b?b.style:t.getCellStyle(a)).containerType);return b}function l(a){var b=!1;null!=a&&(a=x.getParent(a),b=t.view.getState(a),t.view.getState(a),b=null!=(null!=b?b.style:t.getCellStyle(a)).childLayout);return b}function n(a){a=t.view.getState(a);if(null!=a){var b=t.getIncomingEdges(a.cell);if(0<b.length&&(b=t.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==
-a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function q(a,b){b=null!=b?b:!0;t.model.beginUpdate();try{var c=t.model.getParent(a),d=t.getIncomingEdges(a),e=t.cloneCells([d[0],a]);t.model.setTerminal(e[0],t.model.getTerminal(d[0],!0),!0);var f=n(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||
-f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;t.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=t.view.getState(a),l=t.view.scale;if(null!=k){var m=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?m.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*l:m.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*l;var p=t.getOutgoingEdges(t.model.getTerminal(d[0],
-!0));if(null!=p){for(var q=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,u=g=d=0;u<p.length;u++){var z=t.model.getTerminal(p[u],!1);if(f==n(z)){var v=t.view.getState(z);z!=a&&null!=v&&(q&&b!=v.getCenterX()<k.getCenterX()||!q&&b!=v.getCenterY()<k.getCenterY())&&mxUtils.intersects(m,v)&&(d=10+Math.max(d,(Math.min(m.x+m.width,v.x+v.width)-Math.max(m.x,v.x))/l),g=10+Math.max(g,(Math.min(m.y+m.height,v.y+v.height)-Math.max(m.y,v.y))/l))}}q?g=0:d=0;for(u=0;u<p.length;u++)if(z=t.model.getTerminal(p[u],
-!1),f==n(z)&&(v=t.view.getState(z),z!=a&&null!=v&&(q&&b!=v.getCenterX()<k.getCenterX()||!q&&b!=v.getCenterY()<k.getCenterY()))){var x=[];t.traverse(v.cell,!0,function(a,b){null!=b&&x.push(b);x.push(a);return!0});t.moveCells(x,(b?1:-1)*d,(b?1:-1)*g)}}}return t.addCells(e,c)}finally{t.model.endUpdate()}}function f(a){t.model.beginUpdate();try{var b=n(a),c=t.getIncomingEdges(a),d=t.cloneCells([c[0],a]);t.model.setTerminal(c[0],d[1],!1);t.model.setTerminal(d[0],d[1],!0);t.model.setTerminal(d[0],a,!1);
-var e=t.model.getParent(a),f=e.geometry,g=[];t.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);t.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,l=-l):b==mxConstants.DIRECTION_WEST?(k=-k,l=0):b==mxConstants.DIRECTION_EAST&&(l=0);t.moveCells(g,k,l);return t.addCells(d,e)}finally{t.model.endUpdate()}}function m(a){t.model.beginUpdate();try{var b=
-t.model.getParent(a),c=t.getIncomingEdges(a),d=t.cloneCells([c[0],a]);t.model.setTerminal(d[0],a,!0);var c=t.getOutgoingEdges(a),e=b.geometry,f=[];t.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var k=t.model.getTerminal(c[g],!1);null!=k&&f.push(k)}var l=t.view.getBounds(f),m=n(a),p=t.view.translate,q=t.view.scale;m==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/q-p.x-e.x+10,d[1].geometry.y+=d[1].geometry.height-
-e.y+40):m==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/q-p.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height+e.y+40):(d[1].geometry.x=m==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width+e.x+40):d[1].geometry.x+(d[1].geometry.width-e.x+40),d[1].geometry.y=null==l?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(l.y+l.height)/q-p.y+-e.y+10);return t.addCells(d,b)}finally{t.model.endUpdate()}}function p(a,
-b,c){a=t.getOutgoingEdges(a);c=t.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=t.view.getState(t.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function u(a,b){var c=n(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
-c==mxConstants.DIRECTION_WEST)==d&&c!=b?v.actions.get("selectParent").funct():c==b?(d=t.getOutgoingEdges(a),null!=d&&0<d.length&&t.setSelectionCell(t.model.getTerminal(d[0],!1))):(c=t.getIncomingEdges(a),null!=c&&0<c.length&&(d=p(t.model.getTerminal(c[0],!0),d,a),c=t.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&t.setSelectionCell(d[c].cell)))))}var v=this,t=v.editor.graph,x=t.getModel(),y=v.menus.createPopupMenu;
-v.menus.createPopupMenu=function(a,c,d){y.apply(this,arguments);if(1==t.getSelectionCount()){c=t.getSelectionCell();var e=t.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(t.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(t.getSelectionCell())&&(a.addSeparator(),0<t.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};v.actions.addAction("selectChildren",function(){if(t.isEnabled()&&
-1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+X");v.actions.addAction("selectSiblings",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=t.getOutgoingEdges(t.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],
-!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+S");v.actions.addAction("selectParent",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);null!=a&&0<a.length&&t.setSelectionCell(t.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");v.actions.addAction("selectDescendants",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),b=[];t.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});t.setSelectionCells(b)}},
-null,null,"Alt+Shift+D");var D=t.removeCells;t.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];x.isEdge(g)&&d(g)&&(e.push(g),g=x.getTerminal(g,!1));b(g)?(t.traverse(g,!0,function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=t.getIncomingEdges(a[f]),a=a.concat(g)):e.push(a[f])}a=e;return D.apply(this,arguments)};v.hoverIcons.getStateAt=function(a,c,
-d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var I=t.duplicateCells;t.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=t.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=t.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],a)}this.model.beginUpdate();try{var k=I.call(this,a,c);if(k.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var l=t.getIncomingEdges(k[e]),g=t.getIncomingEdges(a[e]);
-if(0==l.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,t.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var z=t.moveCells;t.moveCells=function(a,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,n=this.view.getState(f),p=null!=n?n.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var q=0;q<a.length;q++)if(b(a[q])||t.model.isEdge(a[q])&&null==t.model.getTerminal(a[q],!0)){f=t.model.getParent(a[q]);
-break}if(null!=m&&f!=m&&null!=this.view.getState(a[0])){var u=t.getIncomingEdges(a[0]);if(0<u.length){var v=t.view.getState(t.model.getTerminal(u[0],!0));if(null!=v){var x=t.view.getState(m);null!=x&&(c=(x.getCenterX()-v.getCenterX())/t.view.scale,d=(x.getCenterY()-v.getCenterY())/t.view.scale)}}}}l=z.apply(this,arguments);if(null!=l&&null!=a&&l.length==a.length)for(q=0;q<l.length;q++)if(this.model.isEdge(l[q]))b(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[q],!0))&&this.model.setTerminal(l[q],
-m,!0);else if(b(a[q])&&(u=t.getIncomingEdges(a[q]),0<u.length))if(!e)b(m)&&0>mxUtils.indexOf(a,this.model.getTerminal(u[0],!0))&&this.model.setTerminal(u[0],m,!0);else if(0==t.getIncomingEdges(l[q]).length){n=m;if(null==n||n==t.model.getParent(a[q]))n=t.model.getTerminal(u[0],!0);e=this.cloneCell(u[0]);this.addEdge(e,t.getDefaultParent(),n,l[q])}}finally{this.model.endUpdate()}return l};if(null!=v.sidebar){var B=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=function(a,c,d,e){var f=t.model,g=null;
-f.beginUpdate();try{if(g=B.apply(this,arguments),b(a))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],a,!0);var l=t.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var C={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},A=v.onKeyDown;v.onKeyDown=function(a){try{if(t.isEnabled()&&!t.isEditing()&&
-b(t.getSelectionCell())&&1==t.getSelectionCount()){var c=null;0<t.getIncomingEdges(t.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?f(t.getSelectionCell()):m(t.getSelectionCell()):13==a.which&&(c=q(t.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&t.model.isEdge(c[0])?t.setSelectionCell(t.model.getTerminal(c[0],!1)):t.setSelectionCell(c[c.length-1]),null!=v.hoverIcons&&v.hoverIcons.update(t.view.getState(t.getSelectionCell())),t.startEditingAtCell(t.getSelectionCell()),
-mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var d=C[a.keyCode];null!=d&&(d.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(u(t.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(u(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(u(t.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(u(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(N){console.log("error",
-N)}mxEvent.isConsumed(a)||A.apply(this,arguments)};var G=t.connectVertex;t.connectVertex=function(a,c,d,e,g,k){var l=t.getIncomingEdges(a);return b(a)&&0<l.length?(d=n(a),e=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,g=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,d==c?m(a):e==g?f(a):q(a,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):G.call(this,a,c,d,e,g,k)};t.getSubtree=function(a){var d=[a];!c(a)&&!b(a)||l(a)||t.traverse(a,!0,function(a,b){null!=
+"selectDescendants";var c=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,b,d,n,m){b=null!=b?b:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var e=d.slice(),f=[],g=0;g<d.length;g++){var k=this.view.getState(d[g]),u=null!=k?k.style:this.getCellStyle(d[g]);"1"==mxUtils.getValue(u,"treeFolding","0")&&(this.traverse(d[g],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=d[g]&&f.push(a);return a==d[g]||!this.model.isCollapsed(a)})),
+this.model.setCollapsed(d[g],a))}for(g=0;g<f.length;g++)this.model.setVisible(f[g],!a);d=e;d=c.apply(this,arguments)}finally{this.model.endUpdate()}return d};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return x.isVertex(a)&&d(a)}function c(a){var b=!1;null!=a&&(b=q.view.getState(a),b="1"==(null!=b?b.style:q.getCellStyle(a)).treeMoving);
+return b}function d(a){var b=!1;null!=a&&(a=x.getParent(a),b=q.view.getState(a),b="tree"==(null!=b?b.style:q.getCellStyle(a)).containerType);return b}function n(a){var b=!1;null!=a&&(a=x.getParent(a),b=q.view.getState(a),q.view.getState(a),b=null!=(null!=b?b.style:q.getCellStyle(a)).childLayout);return b}function m(a){a=q.view.getState(a);if(null!=a){var b=q.getIncomingEdges(a.cell);if(0<b.length&&(b=q.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==
+a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function t(a,b){b=null!=b?b:!0;q.model.beginUpdate();try{var c=q.model.getParent(a),d=q.getIncomingEdges(a),e=q.cloneCells([d[0],a]);q.model.setTerminal(e[0],q.model.getTerminal(d[0],!0),!0);var f=m(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||
+f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;q.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=q.view.getState(a),l=q.view.scale;if(null!=k){var n=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*l:n.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*l;var p=q.getOutgoingEdges(q.model.getTerminal(d[0],
+!0));if(null!=p){for(var t=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,u=g=d=0;u<p.length;u++){var z=q.model.getTerminal(p[u],!1);if(f==m(z)){var v=q.view.getState(z);z!=a&&null!=v&&(t&&b!=v.getCenterX()<k.getCenterX()||!t&&b!=v.getCenterY()<k.getCenterY())&&mxUtils.intersects(n,v)&&(d=10+Math.max(d,(Math.min(n.x+n.width,v.x+v.width)-Math.max(n.x,v.x))/l),g=10+Math.max(g,(Math.min(n.y+n.height,v.y+v.height)-Math.max(n.y,v.y))/l))}}t?g=0:d=0;for(u=0;u<p.length;u++)if(z=q.model.getTerminal(p[u],
+!1),f==m(z)&&(v=q.view.getState(z),z!=a&&null!=v&&(t&&b!=v.getCenterX()<k.getCenterX()||!t&&b!=v.getCenterY()<k.getCenterY()))){var x=[];q.traverse(v.cell,!0,function(a,b){null!=b&&x.push(b);x.push(a);return!0});q.moveCells(x,(b?1:-1)*d,(b?1:-1)*g)}}}return q.addCells(e,c)}finally{q.model.endUpdate()}}function f(a){q.model.beginUpdate();try{var b=m(a),c=q.getIncomingEdges(a),d=q.cloneCells([c[0],a]);q.model.setTerminal(c[0],d[1],!1);q.model.setTerminal(d[0],d[1],!0);q.model.setTerminal(d[0],a,!1);
+var e=q.model.getParent(a),f=e.geometry,g=[];q.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);q.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,l=-l):b==mxConstants.DIRECTION_WEST?(k=-k,l=0):b==mxConstants.DIRECTION_EAST&&(l=0);q.moveCells(g,k,l);return q.addCells(d,e)}finally{q.model.endUpdate()}}function l(a){q.model.beginUpdate();try{var b=
+q.model.getParent(a),c=q.getIncomingEdges(a),d=q.cloneCells([c[0],a]);q.model.setTerminal(d[0],a,!0);var c=q.getOutgoingEdges(a),e=b.geometry,f=[];q.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var k=q.model.getTerminal(c[g],!1);null!=k&&f.push(k)}var l=q.view.getBounds(f),n=m(a),p=q.view.translate,t=q.view.scale;n==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/t-p.x-e.x+10,d[1].geometry.y+=d[1].geometry.height-
+e.y+40):n==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/t-p.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height+e.y+40):(d[1].geometry.x=n==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width+e.x+40):d[1].geometry.x+(d[1].geometry.width-e.x+40),d[1].geometry.y=null==l?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(l.y+l.height)/t-p.y+-e.y+10);return q.addCells(d,b)}finally{q.model.endUpdate()}}function p(a,
+b,c){a=q.getOutgoingEdges(a);c=q.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=q.view.getState(q.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function u(a,b){var c=m(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
+c==mxConstants.DIRECTION_WEST)==d&&c!=b?v.actions.get("selectParent").funct():c==b?(d=q.getOutgoingEdges(a),null!=d&&0<d.length&&q.setSelectionCell(q.model.getTerminal(d[0],!1))):(c=q.getIncomingEdges(a),null!=c&&0<c.length&&(d=p(q.model.getTerminal(c[0],!0),d,a),c=q.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&q.setSelectionCell(d[c].cell)))))}var v=this,q=v.editor.graph,x=q.getModel(),y=v.menus.createPopupMenu;
+v.menus.createPopupMenu=function(a,c,d){y.apply(this,arguments);if(1==q.getSelectionCount()){c=q.getSelectionCell();var e=q.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(q.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(q.getSelectionCell())&&(a.addSeparator(),0<q.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};v.actions.addAction("selectChildren",function(){if(q.isEnabled()&&
+1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+X");v.actions.addAction("selectSiblings",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=q.getOutgoingEdges(q.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],
+!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+S");v.actions.addAction("selectParent",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);null!=a&&0<a.length&&q.setSelectionCell(q.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");v.actions.addAction("selectDescendants",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),b=[];q.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});q.setSelectionCells(b)}},
+null,null,"Alt+Shift+D");var D=q.removeCells;q.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];x.isEdge(g)&&d(g)&&(e.push(g),g=x.getTerminal(g,!1));b(g)?(q.traverse(g,!0,function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=q.getIncomingEdges(a[f]),a=a.concat(g)):e.push(a[f])}a=e;return D.apply(this,arguments)};v.hoverIcons.getStateAt=function(a,c,
+d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var I=q.duplicateCells;q.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=q.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=q.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],a)}this.model.beginUpdate();try{var k=I.call(this,a,c);if(k.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var l=q.getIncomingEdges(k[e]),g=q.getIncomingEdges(a[e]);
+if(0==l.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,q.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var z=q.moveCells;q.moveCells=function(a,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,n=this.view.getState(f),p=null!=n?n.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var t=0;t<a.length;t++)if(b(a[t])||q.model.isEdge(a[t])&&null==q.model.getTerminal(a[t],!0)){f=q.model.getParent(a[t]);
+break}if(null!=m&&f!=m&&null!=this.view.getState(a[0])){var u=q.getIncomingEdges(a[0]);if(0<u.length){var v=q.view.getState(q.model.getTerminal(u[0],!0));if(null!=v){var x=q.view.getState(m);null!=x&&(c=(x.getCenterX()-v.getCenterX())/q.view.scale,d=(x.getCenterY()-v.getCenterY())/q.view.scale)}}}}l=z.apply(this,arguments);if(null!=l&&null!=a&&l.length==a.length)for(t=0;t<l.length;t++)if(this.model.isEdge(l[t]))b(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[t],!0))&&this.model.setTerminal(l[t],
+m,!0);else if(b(a[t])&&(u=q.getIncomingEdges(a[t]),0<u.length))if(!e)b(m)&&0>mxUtils.indexOf(a,this.model.getTerminal(u[0],!0))&&this.model.setTerminal(u[0],m,!0);else if(0==q.getIncomingEdges(l[t]).length){n=m;if(null==n||n==q.model.getParent(a[t]))n=q.model.getTerminal(u[0],!0);e=this.cloneCell(u[0]);this.addEdge(e,q.getDefaultParent(),n,l[t])}}finally{this.model.endUpdate()}return l};if(null!=v.sidebar){var B=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=function(a,c,d,e){var f=q.model,g=null;
+f.beginUpdate();try{if(g=B.apply(this,arguments),b(a))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],a,!0);var l=q.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var C={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},A=v.onKeyDown;v.onKeyDown=function(a){try{if(q.isEnabled()&&!q.isEditing()&&
+b(q.getSelectionCell())&&1==q.getSelectionCount()){var c=null;0<q.getIncomingEdges(q.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?f(q.getSelectionCell()):l(q.getSelectionCell()):13==a.which&&(c=t(q.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&q.model.isEdge(c[0])?q.setSelectionCell(q.model.getTerminal(c[0],!1)):q.setSelectionCell(c[c.length-1]),null!=v.hoverIcons&&v.hoverIcons.update(q.view.getState(q.getSelectionCell())),q.startEditingAtCell(q.getSelectionCell()),
+mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var d=C[a.keyCode];null!=d&&(d.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(u(q.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(u(q.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(u(q.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(u(q.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(N){console.log("error",
+N)}mxEvent.isConsumed(a)||A.apply(this,arguments)};var G=q.connectVertex;q.connectVertex=function(a,c,d,e,g,k){var n=q.getIncomingEdges(a);return b(a)&&0<n.length?(d=m(a),e=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,g=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,d==c?l(a):e==g?f(a):t(a,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):G.call(this,a,c,d,e,g,k)};q.getSubtree=function(a){var d=[a];!c(a)&&!b(a)||n(a)||q.traverse(a,!0,function(a,b){null!=
b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);return!0});return d};var F=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){F.apply(this,arguments);(c(this.state.cell)||b(this.state.cell))&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="18px",
this.moveHandle.style.height="18px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a));this.graph.graphHandler.cells=this.graph.getSubtree(this.state.cell);this.graph.graphHandler.bounds=this.state.view.getBounds(this.graph.graphHandler.cells);this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);
this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var J=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){J.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var H=mxVertexHandler.prototype.destroy;
@@ -9500,8 +9504,8 @@ mxVertexHandler.prototype.destroy=function(a,b){H.apply(this,arguments);null!=th
a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");b.vertex=!0;var c=new mxCell("Topic",
new mxGeometry(320,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");d.geometry.relative=!0;d.edge=!0;b.insertEdge(d,!0);c.insertEdge(d,!1);var e=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");
e.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);e.insertEdge(g,!1);var p=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;");p.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-u.geometry.relative=!0;u.edge=!0;b.insertEdge(u,!0);p.insertEdge(u,!1);var v=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");v.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-t.geometry.relative=!0;t.edge=!0;b.insertEdge(t,!0);v.insertEdge(t,!1);a.insert(d);a.insert(g);a.insert(u);a.insert(t);a.insert(b);a.insert(c);a.insert(e);a.insert(p);a.insert(v);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");a.vertex=
+u.geometry.relative=!0;u.edge=!0;b.insertEdge(u,!0);p.insertEdge(u,!1);var v=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");v.vertex=!0;var q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+q.geometry.relative=!0;q.edge=!0;b.insertEdge(q,!0);v.insertEdge(q,!1);a.insert(d);a.insert(g);a.insert(u);a.insert(q);a.insert(b);a.insert(c);a.insert(e);a.insert(p);a.insert(v);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");a.vertex=
!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");a.vertex=!0;var b=new mxCell("",
new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;");
a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");
@@ -9519,23 +9523,23 @@ g.className="geTitle";b.appendChild(g);return g}var d=document.createElement("di
c("newLibrary",mxResources.get("newLibrary")),d.style.boxSizing="border-box",d.style.paddingRight="6px",d.style.paddingLeft="6px",d.style.height="32px",d.style.left="0",d=c("openLibraryFrom",mxResources.get("openLibraryFrom")),d.style.borderLeft="1px solid lightgray",d.style.boxSizing="border-box",d.style.paddingRight="6px",d.style.paddingLeft="6px",d.style.height="32px",d.style.left="50%";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.minimumSize=new mxRectangle(0,
0,90,90);a.sidebarWindow.window.setVisible(!0);a.getLocalData("sidebar",function(b){a.sidebar.showEntries(b,null,!0)});a.restoreLibraries()}else a.sidebarWindow.window.setVisible(!a.sidebarWindow.window.isVisible());a.sidebarWindow.window.isVisible()&&a.sidebarWindow.window.fit()}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
try{var b=document.createElement("style");b.type="text/css";b.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * { font-size:13px; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select:none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity:0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding:2px;display:inline-block; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; border: none !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }.geToolbarContainer { background:#fff !important; }div.geSidebarContainer { background-color: #ffffff; }div.geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: rgb(249, 249, 249) !important; color: #A0A0A0 !important; } html div.geActivePage { background: white !important;color: #353535 !important; } html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }"+
-(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"");document.getElementsByTagName("head")[0].appendChild(b)}catch(t){}var g=function(a,b,c,d,e,f,g){var k=document.createElement("div");k.className="geSidebarContainer";k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.border="1px solid whiteSmoke";k.style.overflowX="hidden";k.style.overflowY="auto";g(k);this.window=new mxWindow(b,k,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
+(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"");document.getElementsByTagName("head")[0].appendChild(b)}catch(q){}var g=function(a,b,c,d,e,f,g){var k=document.createElement("div");k.className="geSidebarContainer";k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.border="1px solid whiteSmoke";k.style.overflowX="hidden";k.style.overflowY="auto";g(k);this.window=new mxWindow(b,k,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};mxClient.IS_SF&&
(this.window.div.onselectstart=mxUtils.bind(this,function(b){null==b&&(b=window.event);return null!=b&&a.isSelectionAllowed(b)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;
mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR=
"#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.prototype.inactiveTabBackgroundColor=
"#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!0;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var e=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=
-function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px");e.apply(this,arguments)};var k=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){k.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var l=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>d&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",
-b.shortcut):l.apply(this,arguments)};var n=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){n.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height=
-"24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"));"none"!=a.style.display&&(a.style.display="inline-block")}};var q=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){q.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage=
+function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px");e.apply(this,arguments)};var k=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){k.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var n=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>d&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",
+b.shortcut):n.apply(this,arguments)};var m=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){m.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height=
+"24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"));"none"!=a.style.display&&(a.style.display="inline-block")}};var t=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){t.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage=
"url("+Editor.shareImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px"}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=document.createElement("div");a.style.display="inline-block";a.style.position="relative";a.style.marginTop="8px";a.style.marginRight="4px";var b=document.createElement("a");b.className="geMenuItem gePrimaryBtn";b.style.marginLeft=
"8px";b.style.padding="6px";"1"==urlParams.noSaveBtn?(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),
"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.className="geMenuItem",b.style.marginLeft="6px",b.style.padding="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className="geMenuItem";b.style.marginLeft=
"6px";b.style.padding="6px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.buttonContainer.appendChild(a);this.buttonContainer.style.top="6px"}};Sidebar.prototype.getTooltipOffset=function(){var a=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);a.y+=40;return a};var f=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(a,b,c){var d=this.editorUi.editor.graph;a.smartSeparators=!0;f.apply(this,arguments);
mxUtils.bind(this,function(a,b){var c=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),function(a){b(parseFloat(a))},mxResources.get("spacing"));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()});1==d.getSelectionCount()?(this.addMenuItems(a,["editTooltip","-","editStyle","editGeometry","-"],null,c),d.isCellFoldable(d.getSelectionCell())&&this.addMenuItems(a,d.isCellCollapsed(b)?["expand"]:["collapse"],null,c),this.addMenuItems(a,["collapsible","-","lockUnlock","enterGroup"],
null,c),a.addSeparator(),this.addSubmenu("layout",a)):d.isSelectionEmpty()&&d.isEnabled()?(a.addSeparator(),this.addMenuItems(a,["editData"],null,c),a.addSeparator(),this.addSubmenu("layout",a),this.addSubmenu("view",a,null,mxResources.get("options")),this.addMenuItems(a,["-","exitGroup"],null,c)):d.isEnabled()&&this.addMenuItems(a,["-","lockUnlock"],null,c)};EditorUi.prototype.toggleFormatPanel=function(b){null!=this.formatWindow?this.formatWindow.window.setVisible(b?!1:!this.formatWindow.window.isVisible()):
-a(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var m=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),
-this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.window.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);m.apply(this,arguments)};var p=
+a(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var l=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),
+this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.window.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);l.apply(this,arguments)};var p=
EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){p.apply(this,arguments);a||(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};EditorUi.prototype.chromelessWindowResize=function(){};var u=Menus.prototype.init;Menus.prototype.init=function(){u.apply(this,arguments);var b=this.editorUi,d=b.editor.graph;b.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";b.actions.get("createShape").label=
mxResources.get("shape")+"...";b.actions.get("outline").label=mxResources.get("outline")+"...";b.actions.get("layers").label=mxResources.get("layers")+"...";b.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){d.popupMenuHandler.hideMenu();b.showImportCsvDialog()}));b.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(b,"Insert from Text");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("formatSql",new Action(mxResources.get("formatSql")+
"...",function(){var a=new ParseDialog(b,"Insert from Text","formatSql");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",function(){c(b)}));b.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(b)}));EditorUi.enablePlantUml&&!b.isOffline()&&b.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(b,"Insert from Text","plantUml");b.showDialog(a.container,
@@ -9564,43 +9568,43 @@ null,640<=d?b("",f.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)"
null],60)}c=k.menus.get("language");null!=c&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=d?(null==R&&(f=p.addMenu("",c.funct),f.setAttribute("title",mxResources.get("language")),f.className="geToolbarButton",f.style.backgroundImage="url("+Editor.globeImage+")",f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.position="absolute",f.style.height="24px",f.style.width="24px",f.style.zIndex="1",f.style.right="8px",f.style.cursor=
"pointer",f.style.top="1"==urlParams.embed?"12px":"11px",m.appendChild(f),R=f),k.buttonContainer.style.paddingRight="34px"):(k.buttonContainer.style.paddingRight="4px",null!=R&&(R.parentNode.removeChild(R),R=null))}v.apply(this,arguments);var g=document.createElement("div");g.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";g.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(g);null==urlParams.clibs&&
null==urlParams.libs||c(this);var k=this,l=k.editor.graph;k.toolbar=this.createToolbar(k.createDiv("geToolbar"));k.defaultLibraryName=mxResources.get("untitledLibrary");var m=document.createElement("div");m.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var n=null,p=new Menubar(k,m);k.statusContainer=k.createStatusContainer();k.statusContainer.style.position="relative";
-k.statusContainer.style.maxWidth="";k.statusContainer.style.marginTop="7px";k.statusContainer.style.marginLeft="6px";k.statusContainer.style.color="gray";k.statusContainer.style.cursor="default";k.editor.addListener("statusChanged",mxUtils.bind(this,function(){k.setStatusText(k.editor.getStatus())}));var q=k.descriptorChanged;k.descriptorChanged=function(){q.apply(this,arguments);var a=k.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":
+k.statusContainer.style.maxWidth="";k.statusContainer.style.marginTop="7px";k.statusContainer.style.marginLeft="6px";k.statusContainer.style.color="gray";k.statusContainer.style.cursor="default";k.editor.addListener("statusChanged",mxUtils.bind(this,function(){k.setStatusText(k.editor.getStatus())}));var t=k.descriptorChanged;k.descriptorChanged=function(){t.apply(this,arguments);var a=k.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":
"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);m.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else m.removeAttribute("title")};k.setStatusText(k.editor.getStatus());m.appendChild(k.statusContainer);k.buttonContainer=document.createElement("div");k.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";m.appendChild(k.buttonContainer);k.menubarContainer=k.buttonContainer;
k.tabContainer=document.createElement("div");k.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var g=k.diagramContainer.parentNode,u=document.createElement("div");u.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";k.diagramContainer.style.top="47px";var H=k.menus.get("viewZoom");
if(null!=H){this.tabContainer.style.right="70px";var E=p.addMenu("100%",H.funct);E.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");E.style.whiteSpace="nowrap";E.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";E.style.backgroundPosition="right 6px center";E.style.backgroundRepeat="no-repeat";E.style.backgroundColor="#ffffff";E.style.paddingRight="10px";E.style.display="block";E.style.position="absolute";E.style.textDecoration="none";E.style.textDecoration="none";
E.style.right="0px";E.style.bottom="0px";E.style.overflow="hidden";E.style.visibility="hidden";E.style.textAlign="center";E.style.color="#000";E.style.fontSize="12px";E.style.color="#707070";E.style.width="59px";E.style.cursor="pointer";E.style.borderTop="1px solid lightgray";E.style.borderLeft="1px solid lightgray";E.style.height=parseInt(k.tabContainerHeight)-1+"px";E.style.lineHeight=parseInt(k.tabContainerHeight)+1+"px";u.appendChild(E);H=mxUtils.bind(this,function(){E.innerHTML=Math.round(100*
k.editor.graph.view.scale)+"%"});k.editor.graph.view.addListener(mxEvent.EVENT_SCALE,H);k.editor.addListener("resetGraphView",H);k.editor.addListener("pageSelected",H);var K=k.setGraphEnabled;k.setGraphEnabled=function(){K.apply(this,arguments);null!=this.tabContainer&&(E.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}u.appendChild(k.tabContainer);u.appendChild(m);u.appendChild(k.diagramContainer);
g.appendChild(u);k.updateTabContainer();var R=null;f();mxEvent.addListener(window,"resize",function(){f();null!=k.sidebarWindow&&k.sidebarWindow.window.fit();null!=k.formatWindow&&k.formatWindow.window.fit();null!=k.actions.outlineWindow&&k.actions.outlineWindow.window.fit();null!=k.actions.layersWindow&&k.actions.layersWindow.window.fit();null!=k.menus.tagsWindow&&k.menus.tagsWindow.window.fit();null!=k.menus.findWindow&&k.menus.findWindow.window.fit()})}}};
-(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,d,k){var e=c.y,g=c.x,q=!1,f=!1;if(null!=this.states&&null!=b&&null!=c){var m=this,p=new mxCellState,u=this.graph.getView().scale,v=Math.max(2,this.getGuideTolerance()/2);p.x=b.x+g;p.y=b.y+e;p.width=b.width;p.height=b.height;for(var t=[],x=[],y=0;y<this.states.length;y++){var D=this.states[y];D instanceof mxCellState&&(k||!this.graph.isCellSelected(D.cell))&&((p.x>=D.x&&p.x<=D.x+D.width||D.x>=p.x&&D.x<=p.x+p.width)&&(p.y>
-D.y+D.height+4||p.y+p.height+4<D.y)?t.push(D):(p.y>=D.y&&p.y<=D.y+D.height||D.y>=p.y&&D.y<=p.y+p.height)&&(p.x>D.x+D.width+4||p.x+p.width+4<D.x)&&x.push(D))}var I=0,z=0,B=D=0,C=0,A=0,G=0,F=0,J=5*u;if(1<t.length){t.push(p);t.sort(function(a,b){return a.y-b.y});var H=!1,y=p==t[0],u=p==t[t.length-1];if(!y&&!u)for(y=1;y<t.length-1;y++)if(p==t[y]){u=t[y-1];y=t[y+1];D=z=B=(y.y-u.y-u.height-p.height)/2;break}for(y=0;y<t.length-1;y++){var u=t[y],E=t[y+1],K=p==u||p==E,E=E.y-u.y-u.height,H=H|p==u;if(0==z&&
-0==I)z=E,I=1;else if(Math.abs(z-E)<=(K||1==y&&H?v:0))I+=1;else if(1<I&&H){t=t.slice(0,y+1);break}else if(3<=t.length-y&&!H)I=0,D=z=0!=B?B:0,t.splice(0,0==y?1:y),y=-1;else break;0!=D||K||(z=D=E)}3==t.length&&t[1]==p&&(D=0)}if(1<x.length){x.push(p);x.sort(function(a,b){return a.x-b.x});H=!1;y=p==x[0];u=p==x[x.length-1];if(!y&&!u)for(y=1;y<x.length-1;y++)if(p==x[y]){u=x[y-1];y=x[y+1];G=A=F=(y.x-u.x-u.width-p.width)/2;break}for(y=0;y<x.length-1;y++){u=x[y];E=x[y+1];K=p==u||p==E;E=E.x-u.x-u.width;H|=p==
+(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,d,k){var e=c.y,g=c.x,t=!1,f=!1;if(null!=this.states&&null!=b&&null!=c){var l=this,p=new mxCellState,u=this.graph.getView().scale,v=Math.max(2,this.getGuideTolerance()/2);p.x=b.x+g;p.y=b.y+e;p.width=b.width;p.height=b.height;for(var q=[],x=[],y=0;y<this.states.length;y++){var D=this.states[y];D instanceof mxCellState&&(k||!this.graph.isCellSelected(D.cell))&&((p.x>=D.x&&p.x<=D.x+D.width||D.x>=p.x&&D.x<=p.x+p.width)&&(p.y>
+D.y+D.height+4||p.y+p.height+4<D.y)?q.push(D):(p.y>=D.y&&p.y<=D.y+D.height||D.y>=p.y&&D.y<=p.y+p.height)&&(p.x>D.x+D.width+4||p.x+p.width+4<D.x)&&x.push(D))}var I=0,z=0,B=D=0,C=0,A=0,G=0,F=0,J=5*u;if(1<q.length){q.push(p);q.sort(function(a,b){return a.y-b.y});var H=!1,y=p==q[0],u=p==q[q.length-1];if(!y&&!u)for(y=1;y<q.length-1;y++)if(p==q[y]){u=q[y-1];y=q[y+1];D=z=B=(y.y-u.y-u.height-p.height)/2;break}for(y=0;y<q.length-1;y++){var u=q[y],E=q[y+1],K=p==u||p==E,E=E.y-u.y-u.height,H=H|p==u;if(0==z&&
+0==I)z=E,I=1;else if(Math.abs(z-E)<=(K||1==y&&H?v:0))I+=1;else if(1<I&&H){q=q.slice(0,y+1);break}else if(3<=q.length-y&&!H)I=0,D=z=0!=B?B:0,q.splice(0,0==y?1:y),y=-1;else break;0!=D||K||(z=D=E)}3==q.length&&q[1]==p&&(D=0)}if(1<x.length){x.push(p);x.sort(function(a,b){return a.x-b.x});H=!1;y=p==x[0];u=p==x[x.length-1];if(!y&&!u)for(y=1;y<x.length-1;y++)if(p==x[y]){u=x[y-1];y=x[y+1];G=A=F=(y.x-u.x-u.width-p.width)/2;break}for(y=0;y<x.length-1;y++){u=x[y];E=x[y+1];K=p==u||p==E;E=E.x-u.x-u.width;H|=p==
u;if(0==A&&0==C)A=E,C=1;else if(Math.abs(A-E)<=(K||1==y&&H?v:0))C+=1;else if(1<C&&H){x=x.slice(0,y+1);break}else if(3<=x.length-y&&!H)C=0,G=A=0!=F?F:0,x.splice(0,0==y?1:y),y=-1;else break;0!=G||K||(A=G=E)}3==x.length&&x[1]==p&&(G=0)}v=function(a,b,c,d){var e=[],f;d?(d=J,f=0):(d=0,f=J);e.push(new mxPoint(a.x-d,a.y-f));e.push(new mxPoint(a.x+d,a.y+f));e.push(a);e.push(b);e.push(new mxPoint(b.x-d,b.y-f));e.push(new mxPoint(b.x+d,b.y+f));if(null!=c)return c.points=e,c;a=new mxPolyline(e,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(m.graph.getView().getOverlayPane());return a};A=function(a,b){if(a&&null!=m.guidesArrHor)for(var c=0;c<m.guidesArrHor.length;c++)m.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=m.guidesArrVer)for(c=0;c<m.guidesArrVer.length;c++)m.guidesArrVer[c].node.style.visibility="hidden"};if(1<C&&C==x.length-1){C=[];F=m.guidesArrHor;q=[];g=0;y=x[0]==p?1:0;H=x[y].y+x[y].height;if(0<G)for(y=0;y<x.length-1;y++)u=
-x[y],E=x[y+1],p==u?(g=E.x-u.width-G,q.push(new mxPoint(g+u.width+J,H)),q.push(new mxPoint(E.x-J,H))):p==E?(q.push(new mxPoint(u.x+u.width+J,H)),g=u.x+u.width+G,q.push(new mxPoint(g-J,H))):(q.push(new mxPoint(u.x+u.width+J,H)),q.push(new mxPoint(E.x-J,H)));else u=x[0],y=x[2],g=u.x+u.width+(y.x-u.x-u.width-p.width)/2,q.push(new mxPoint(u.x+u.width+J,H)),q.push(new mxPoint(g-J,H)),q.push(new mxPoint(g+p.width+J,H)),q.push(new mxPoint(y.x-J,H));for(y=0;y<q.length;y+=2)x=q[y],G=q[y+1],x=v(x,G,null!=F?
-F[y/2]:null),x.node.style.visibility="visible",x.redraw(),C.push(x);for(y=q.length/2;null!=F&&y<F.length;y++)F[y].destroy();m.guidesArrHor=C;g-=b.x;q=!0}else A(!0);if(1<I&&I==t.length-1){C=[];F=m.guidesArrVer;f=[];e=0;y=t[0]==p?1:0;I=t[y].x+t[y].width;if(0<D)for(y=0;y<t.length-1;y++)u=t[y],E=t[y+1],p==u?(e=E.y-u.height-D,f.push(new mxPoint(I,e+u.height+J)),f.push(new mxPoint(I,E.y-J))):p==E?(f.push(new mxPoint(I,u.y+u.height+J)),e=u.y+u.height+D,f.push(new mxPoint(I,e-J))):(f.push(new mxPoint(I,u.y+
-u.height+J)),f.push(new mxPoint(I,E.y-J)));else u=t[0],y=t[2],e=u.y+u.height+(y.y-u.y-u.height-p.height)/2,f.push(new mxPoint(I,u.y+u.height+J)),f.push(new mxPoint(I,e-J)),f.push(new mxPoint(I,e+p.height+J)),f.push(new mxPoint(I,y.y-J));for(y=0;y<f.length;y+=2)x=f[y],G=f[y+1],x=v(x,G,null!=F?F[y/2]:null,!0),x.node.style.visibility="visible",x.redraw(),C.push(x);for(y=f.length/2;null!=F&&y<F.length;y++)F[y].destroy();m.guidesArrVer=C;e-=b.y;f=!0}else A(!1,!0)}if(q||f)return p=new mxPoint(g,e),t=a.call(this,
-b,p,d,k),q&&!f?p.y=t.y:f&&!q&&(p.x=t.x),t.y!=p.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),t.x!=p.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),p;A(!0,!0);return a.apply(this,arguments)};var c=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(a){c.call(this,a);var b=this.guidesArrVer,d=this.guidesArrHor;if(null!=b)for(var k=0;k<b.length;k++)b[k].node.style.visibility=a?"visible":"hidden";if(null!=
-d)for(k=0;k<d.length;k++)d[k].node.style.visibility=a?"visible":"hidden"};var d=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){d.call(this);var a=this.guidesArrVer,c=this.guidesArrHor;if(null!=a){for(var e=0;e<a.length;e++)a[e].destroy();this.guidesArrVer=null}if(null!=c){for(e=0;e<c.length;e++)c[e].destroy();this.guidesArrHor=null}}})();function mxRuler(a,c,d,b){function g(){var b=a.diagramContainer;q.style.top=b.offsetTop-k+"px";q.style.left=b.offsetLeft-k+"px";q.style.width=(d?0:b.offsetWidth)+k+"px";q.style.height=(d?b.offsetHeight:0)+k+"px"}function e(a,b,c){var d;return function(){var e=this,f=arguments,g=c&&!d;clearTimeout(d);d=setTimeout(function(){d=null;c||a.apply(e,f)},b);g&&a.apply(e,f)}}var k=this.RULER_THICKNESS,l=this;this.unit=c;var n="dark"!=window.uiTheme?{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",
-strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"}:{bkgClr:"#202020",outBkgClr:"#2a2a2a",cornerClr:"#2a2a2a",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"},q=document.createElement("div");q.style.position="absolute";q.style.background=n.bkgClr;q.style[d?"borderRight":"borderBottom"]="0.5px solid "+n.strokeClr;q.style.borderLeft="0.5px solid "+n.strokeClr;document.body.appendChild(q);mxEvent.disableContextMenu(q);this.editorUiRefresh=a.refresh;a.refresh=function(b){l.editorUiRefresh.apply(a,
-arguments);g()};g();var f=document.createElement("canvas");f.width=q.offsetWidth;f.height=q.offsetHeight;q.style.overflow="hidden";f.style.position="relative";q.appendChild(f);var m=f.getContext("2d");this.ui=a;var p=a.editor.graph;this.graph=p;this.container=q;this.canvas=f;var u=function(a,b,c,e,f){a=Math.round(a);b=Math.round(b);c=Math.round(c);e=Math.round(e);m.beginPath();m.moveTo(a+.5,b+.5);m.lineTo(c+.5,e+.5);m.stroke();f&&(d?(m.save(),m.translate(a,b),m.rotate(-Math.PI/2),m.fillText(f,0,0),
-m.restore()):m.fillText(f,a,b))},v=function(){m.clearRect(0,0,f.width,f.height);m.beginPath();m.lineWidth=.7;m.strokeStyle=n.strokeClr;m.setLineDash([]);m.font="9px Arial";m.textAlign="center";var a=p.view.scale,b=p.view.getBackgroundPageBounds(),c=p.view.translate,e=p.view.getGraphBounds(),g=p.pageVisible,q=g?k+(d?b.y-p.container.scrollTop:b.x-p.container.scrollLeft):k+(d?c.y-p.container.scrollTop:c.x-p.container.scrollLeft),v=0;g&&(v=d?Math.floor(((e.y+1)/a-c.y)/p.pageFormat.height)*p.pageFormat.height*
-a:Math.floor(((e.x+1)/a-c.x)/p.pageFormat.width)*p.pageFormat.width*a);var C,A,G;switch(l.unit){case mxConstants.POINTS:C=G=10;A=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:G=10;C=mxConstants.PIXELS_PER_MM;A=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:G=.5>=a||4<=a?8:16,C=mxConstants.PIXELS_PER_INCH/G,A=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}c=C;2<=a?c=C/(2*Math.floor(a/2)):.5>=a&&(c=C*Math.floor(1/a/2)*(l.unit==mxConstants.MILLIMETERS?2:1));C=null;b=g?Math.min(q+(d?b.height:b.width),
-d?f.height:f.width):d?f.height:f.width;g&&(m.fillStyle=n.outBkgClr,d?(m.fillRect(0,k,k,q-k),m.fillRect(0,b,k,f.height)):(m.fillRect(k,0,q-k,k),m.fillRect(b,0,f.width,k)));m.fillStyle=n.fontClr;for(g=g?q:q%(c*a);g<=b;g+=c*a)if(e=Math.round((g-q)/a/c),!(g<k||e==C)){C=e;var F=null;0==e%G&&(F=l.formatText(v+e*c)+"");d?u(k-A[Math.abs(e)%G],g,k,g,F):u(g,k-A[Math.abs(e)%G],g,k,F)}m.lineWidth=1;u(d?0:k,d?k:0,k,k);m.fillStyle=n.cornerClr;m.fillRect(0,0,k,k)};this.drawRuler=v;this.sizeListener=c=e(function(){var a=
-p.container;d?(a=a.offsetHeight+k,f.height!=a&&(f.height=a,q.style.height=a+"px",v())):(a=a.offsetWidth+k,f.width!=a&&(f.width=a,q.style.width=a+"px",v()))},10);this.pageListener=function(){v()};this.scrollListener=b=e(function(){var a=d?p.container.scrollTop:p.container.scrollLeft;l.lastScroll!=a&&(l.lastScroll=a,v())},10);this.unitListener=function(a,b){l.setUnit(b.getProperty("unit"))};p.addListener(mxEvent.SIZE,c);p.container.addEventListener("scroll",b);p.view.addListener("unitChanged",this.unitListener);
-a.addListener("pageViewChanged",this.pageListener);a.addListener("pageScaleChanged",this.pageListener);a.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(a){n=a;q.style.background=n.bkgClr;v()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(a,b,c,e){var f;if(d&&4<a.height||!d&&4<a.width){if(null!=l.guidePart)try{m.putImageData(l.guidePart.imgData1,l.guidePart.x1,l.guidePart.y1),m.putImageData(l.guidePart.imgData2,l.guidePart.x2,l.guidePart.y2),m.putImageData(l.guidePart.imgData3,
-l.guidePart.x3,l.guidePart.y3)}catch(K){}f=l.origGuideMove.apply(this,arguments);try{var g,p,q,t,v,x,y,D,E;m.lineWidth=.5;m.strokeStyle=n.guideClr;m.setLineDash([2]);d?(p=a.y+f.y+k-this.graph.container.scrollTop,g=0,v=p+a.height/2,t=k/2,D=p+a.height,y=0,q=m.getImageData(g,p-1,k,3),u(g,p,k,p),p--,x=m.getImageData(t,v-1,k,3),u(t,v,k,v),v--,E=m.getImageData(y,D-1,k,3),u(y,D,k,D),D--):(p=0,g=a.x+f.x+k-this.graph.container.scrollLeft,v=k/2,t=g+a.width/2,D=0,y=g+a.width,q=m.getImageData(g-1,p,3,k),u(g,
-p,g,k),g--,x=m.getImageData(t-1,v,3,k),u(t,v,t,k),t--,E=m.getImageData(y-1,D,3,k),u(y,D,y,k),y--);if(null==l.guidePart||l.guidePart.x1!=g||l.guidePart.y1!=p)l.guidePart={imgData1:q,x1:g,y1:p,imgData2:x,x2:t,y2:v,imgData3:E,x3:y,y3:D}}catch(K){}}else f=l.origGuideMove.apply(this,arguments);return f};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var a=l.origGuideDestroy.apply(this,arguments);if(null!=l.guidePart)try{m.putImageData(l.guidePart.imgData1,l.guidePart.x1,
-l.guidePart.y1),m.putImageData(l.guidePart.imgData2,l.guidePart.x2,l.guidePart.y2),m.putImageData(l.guidePart.imgData3,l.guidePart.x3,l.guidePart.y3),l.guidePart=null}catch(x){}return a}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(a){this.unit=a;this.drawRuler()};
+mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(l.graph.getView().getOverlayPane());return a};A=function(a,b){if(a&&null!=l.guidesArrHor)for(var c=0;c<l.guidesArrHor.length;c++)l.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=l.guidesArrVer)for(c=0;c<l.guidesArrVer.length;c++)l.guidesArrVer[c].node.style.visibility="hidden"};if(1<C&&C==x.length-1){C=[];F=l.guidesArrHor;t=[];g=0;y=x[0]==p?1:0;H=x[y].y+x[y].height;if(0<G)for(y=0;y<x.length-1;y++)u=
+x[y],E=x[y+1],p==u?(g=E.x-u.width-G,t.push(new mxPoint(g+u.width+J,H)),t.push(new mxPoint(E.x-J,H))):p==E?(t.push(new mxPoint(u.x+u.width+J,H)),g=u.x+u.width+G,t.push(new mxPoint(g-J,H))):(t.push(new mxPoint(u.x+u.width+J,H)),t.push(new mxPoint(E.x-J,H)));else u=x[0],y=x[2],g=u.x+u.width+(y.x-u.x-u.width-p.width)/2,t.push(new mxPoint(u.x+u.width+J,H)),t.push(new mxPoint(g-J,H)),t.push(new mxPoint(g+p.width+J,H)),t.push(new mxPoint(y.x-J,H));for(y=0;y<t.length;y+=2)x=t[y],G=t[y+1],x=v(x,G,null!=F?
+F[y/2]:null),x.node.style.visibility="visible",x.redraw(),C.push(x);for(y=t.length/2;null!=F&&y<F.length;y++)F[y].destroy();l.guidesArrHor=C;g-=b.x;t=!0}else A(!0);if(1<I&&I==q.length-1){C=[];F=l.guidesArrVer;f=[];e=0;y=q[0]==p?1:0;I=q[y].x+q[y].width;if(0<D)for(y=0;y<q.length-1;y++)u=q[y],E=q[y+1],p==u?(e=E.y-u.height-D,f.push(new mxPoint(I,e+u.height+J)),f.push(new mxPoint(I,E.y-J))):p==E?(f.push(new mxPoint(I,u.y+u.height+J)),e=u.y+u.height+D,f.push(new mxPoint(I,e-J))):(f.push(new mxPoint(I,u.y+
+u.height+J)),f.push(new mxPoint(I,E.y-J)));else u=q[0],y=q[2],e=u.y+u.height+(y.y-u.y-u.height-p.height)/2,f.push(new mxPoint(I,u.y+u.height+J)),f.push(new mxPoint(I,e-J)),f.push(new mxPoint(I,e+p.height+J)),f.push(new mxPoint(I,y.y-J));for(y=0;y<f.length;y+=2)x=f[y],G=f[y+1],x=v(x,G,null!=F?F[y/2]:null,!0),x.node.style.visibility="visible",x.redraw(),C.push(x);for(y=f.length/2;null!=F&&y<F.length;y++)F[y].destroy();l.guidesArrVer=C;e-=b.y;f=!0}else A(!1,!0)}if(t||f)return p=new mxPoint(g,e),q=a.call(this,
+b,p,d,k),t&&!f?p.y=q.y:f&&!t&&(p.x=q.x),q.y!=p.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),q.x!=p.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),p;A(!0,!0);return a.apply(this,arguments)};var c=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(a){c.call(this,a);var b=this.guidesArrVer,d=this.guidesArrHor;if(null!=b)for(var k=0;k<b.length;k++)b[k].node.style.visibility=a?"visible":"hidden";if(null!=
+d)for(k=0;k<d.length;k++)d[k].node.style.visibility=a?"visible":"hidden"};var d=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){d.call(this);var a=this.guidesArrVer,c=this.guidesArrHor;if(null!=a){for(var e=0;e<a.length;e++)a[e].destroy();this.guidesArrVer=null}if(null!=c){for(e=0;e<c.length;e++)c[e].destroy();this.guidesArrHor=null}}})();function mxRuler(a,c,d,b){function g(){var b=a.diagramContainer;t.style.top=b.offsetTop-k+"px";t.style.left=b.offsetLeft-k+"px";t.style.width=(d?0:b.offsetWidth)+k+"px";t.style.height=(d?b.offsetHeight:0)+k+"px"}function e(a,b,c){var d;return function(){var e=this,f=arguments,g=c&&!d;clearTimeout(d);d=setTimeout(function(){d=null;c||a.apply(e,f)},b);g&&a.apply(e,f)}}var k=this.RULER_THICKNESS,n=this;this.unit=c;var m="dark"!=window.uiTheme?{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",
+strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"}:{bkgClr:"#202020",outBkgClr:"#2a2a2a",cornerClr:"#2a2a2a",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"},t=document.createElement("div");t.style.position="absolute";t.style.background=m.bkgClr;t.style[d?"borderRight":"borderBottom"]="0.5px solid "+m.strokeClr;t.style.borderLeft="0.5px solid "+m.strokeClr;document.body.appendChild(t);mxEvent.disableContextMenu(t);this.editorUiRefresh=a.refresh;a.refresh=function(b){n.editorUiRefresh.apply(a,
+arguments);g()};g();var f=document.createElement("canvas");f.width=t.offsetWidth;f.height=t.offsetHeight;t.style.overflow="hidden";f.style.position="relative";t.appendChild(f);var l=f.getContext("2d");this.ui=a;var p=a.editor.graph;this.graph=p;this.container=t;this.canvas=f;var u=function(a,b,c,e,f){a=Math.round(a);b=Math.round(b);c=Math.round(c);e=Math.round(e);l.beginPath();l.moveTo(a+.5,b+.5);l.lineTo(c+.5,e+.5);l.stroke();f&&(d?(l.save(),l.translate(a,b),l.rotate(-Math.PI/2),l.fillText(f,0,0),
+l.restore()):l.fillText(f,a,b))},v=function(){l.clearRect(0,0,f.width,f.height);l.beginPath();l.lineWidth=.7;l.strokeStyle=m.strokeClr;l.setLineDash([]);l.font="9px Arial";l.textAlign="center";var a=p.view.scale,b=p.view.getBackgroundPageBounds(),c=p.view.translate,e=p.view.getGraphBounds(),g=p.pageVisible,t=g?k+(d?b.y-p.container.scrollTop:b.x-p.container.scrollLeft):k+(d?c.y-p.container.scrollTop:c.x-p.container.scrollLeft),v=0;g&&(v=d?Math.floor(((e.y+1)/a-c.y)/p.pageFormat.height)*p.pageFormat.height*
+a:Math.floor(((e.x+1)/a-c.x)/p.pageFormat.width)*p.pageFormat.width*a);var C,A,G;switch(n.unit){case mxConstants.POINTS:C=G=10;A=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:G=10;C=mxConstants.PIXELS_PER_MM;A=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:G=.5>=a||4<=a?8:16,C=mxConstants.PIXELS_PER_INCH/G,A=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}c=C;2<=a?c=C/(2*Math.floor(a/2)):.5>=a&&(c=C*Math.floor(1/a/2)*(n.unit==mxConstants.MILLIMETERS?2:1));C=null;b=g?Math.min(t+(d?b.height:b.width),
+d?f.height:f.width):d?f.height:f.width;g&&(l.fillStyle=m.outBkgClr,d?(l.fillRect(0,k,k,t-k),l.fillRect(0,b,k,f.height)):(l.fillRect(k,0,t-k,k),l.fillRect(b,0,f.width,k)));l.fillStyle=m.fontClr;for(g=g?t:t%(c*a);g<=b;g+=c*a)if(e=Math.round((g-t)/a/c),!(g<k||e==C)){C=e;var F=null;0==e%G&&(F=n.formatText(v+e*c)+"");d?u(k-A[Math.abs(e)%G],g,k,g,F):u(g,k-A[Math.abs(e)%G],g,k,F)}l.lineWidth=1;u(d?0:k,d?k:0,k,k);l.fillStyle=m.cornerClr;l.fillRect(0,0,k,k)};this.drawRuler=v;this.sizeListener=c=e(function(){var a=
+p.container;d?(a=a.offsetHeight+k,f.height!=a&&(f.height=a,t.style.height=a+"px",v())):(a=a.offsetWidth+k,f.width!=a&&(f.width=a,t.style.width=a+"px",v()))},10);this.pageListener=function(){v()};this.scrollListener=b=e(function(){var a=d?p.container.scrollTop:p.container.scrollLeft;n.lastScroll!=a&&(n.lastScroll=a,v())},10);this.unitListener=function(a,b){n.setUnit(b.getProperty("unit"))};p.addListener(mxEvent.SIZE,c);p.container.addEventListener("scroll",b);p.view.addListener("unitChanged",this.unitListener);
+a.addListener("pageViewChanged",this.pageListener);a.addListener("pageScaleChanged",this.pageListener);a.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(a){m=a;t.style.background=m.bkgClr;v()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(a,b,c,e){var f;if(d&&4<a.height||!d&&4<a.width){if(null!=n.guidePart)try{l.putImageData(n.guidePart.imgData1,n.guidePart.x1,n.guidePart.y1),l.putImageData(n.guidePart.imgData2,n.guidePart.x2,n.guidePart.y2),l.putImageData(n.guidePart.imgData3,
+n.guidePart.x3,n.guidePart.y3)}catch(K){}f=n.origGuideMove.apply(this,arguments);try{var g,p,t,q,v,x,y,D,E;l.lineWidth=.5;l.strokeStyle=m.guideClr;l.setLineDash([2]);d?(p=a.y+f.y+k-this.graph.container.scrollTop,g=0,v=p+a.height/2,q=k/2,D=p+a.height,y=0,t=l.getImageData(g,p-1,k,3),u(g,p,k,p),p--,x=l.getImageData(q,v-1,k,3),u(q,v,k,v),v--,E=l.getImageData(y,D-1,k,3),u(y,D,k,D),D--):(p=0,g=a.x+f.x+k-this.graph.container.scrollLeft,v=k/2,q=g+a.width/2,D=0,y=g+a.width,t=l.getImageData(g-1,p,3,k),u(g,
+p,g,k),g--,x=l.getImageData(q-1,v,3,k),u(q,v,q,k),q--,E=l.getImageData(y-1,D,3,k),u(y,D,y,k),y--);if(null==n.guidePart||n.guidePart.x1!=g||n.guidePart.y1!=p)n.guidePart={imgData1:t,x1:g,y1:p,imgData2:x,x2:q,y2:v,imgData3:E,x3:y,y3:D}}catch(K){}}else f=n.origGuideMove.apply(this,arguments);return f};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var a=n.origGuideDestroy.apply(this,arguments);if(null!=n.guidePart)try{l.putImageData(n.guidePart.imgData1,n.guidePart.x1,
+n.guidePart.y1),l.putImageData(n.guidePart.imgData2,n.guidePart.x2,n.guidePart.y2),l.putImageData(n.guidePart.imgData3,n.guidePart.x3,n.guidePart.y3),n.guidePart=null}catch(x){}return a}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(a){this.unit=a;this.drawRuler()};
mxRuler.prototype.formatText=function(a){switch(this.unit){case mxConstants.POINTS:return Math.round(a);case mxConstants.MILLIMETERS:return(a/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.INCHES:return(a/mxConstants.PIXELS_PER_INCH).toFixed(2)}};
mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener("unitChanged",this.unitListener);this.ui.removeListener("pageViewChanged",this.pageListener);this.ui.removeListener("pageScaleChanged",this.pageListener);this.ui.removeListener("pageFormatChanged",
this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};
function mxDualRuler(a,c){var d=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=a.getDiagramContainerOffset;a.getDiagramContainerOffset=function(){return d};this.editorUiRefresh=a.refresh;this.ui=a;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(a,c,!0);this.hRuler=new mxRuler(a,c,!1,!0);var b=mxUtils.bind(this,function(b){var c=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,
function(b){c=null!=a.currentMenu;mxEvent.consume(b)}),null,mxUtils.bind(this,function(d){if(a.editor.graph.isEnabled()&&!a.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(d)||mxEvent.isPopupTrigger(d))){a.editor.graph.popupMenuHandler.hideMenu();a.hideCurrentMenu();if(!mxEvent.isTouchEvent(d)||!c){var e=new mxPopupMenu(mxUtils.bind(this,function(b,c){a.menus.addMenuItems(b,["points","millimeters"],c)}));e.div.className+=" geMenubarMenu";e.smartSeparators=!0;e.showDisabled=!0;e.autoExpand=!0;e.hideMenu=
mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);a.resetCurrentMenu();e.destroy()});var g=mxEvent.getClientX(d),k=mxEvent.getClientY(d);e.popup(g,k,null,d);a.setCurrentMenu(e,b)}mxEvent.consume(d)}}))});b(this.hRuler.container);b(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.setUnit=function(a){this.vRuler.setUnit(a);this.hRuler.setUnit(a)};mxDualRuler.prototype.setStyle=function(a){this.vRuler.setStyle(a);this.hRuler.setStyle(a)};
-mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(a){var c=null!=a.view&&null!=a.view.canvas?a.view.canvas.ownerSVGElement:null;if(null!=a.container&&null!=c){var d=mxFreehand.prototype.NORMAL_SMOOTHING,b=null,g=[],e,k=[],l,n=!1,q=!0,f=[],m=!1,p=!1;this.setClosedPath=function(a){n=a};this.setAutoClose=function(a){q=a};this.setStopClickEnabled=function(a){p=a};this.setSmoothing=function(a){d=a};var u=function(b){m=b;a.getRubberband().setEnabled(!b);a.graphHandler.setSelectEnabled(!b);a.graphHandler.setMoveEnabled(!b);a.container.style.cursor=
-b?"crosshair":"";a.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){u(!0)};this.isDrawing=function(){return m};var v=mxUtils.bind(this,function(a){if(b){var c=p&&0<k.length&&null!=l&&2>l.length;c||k.push.apply(k,l);l=[];k.push(null);g.push(b);b=null;c&&this.stopDrawing();mxEvent.consume(a)}});this.stopDrawing=function(){if(0<g.length){for(var c=k[0].x,d=k[0].x,e=k[0].y,f=k[0].y,l=1;l<k.length;l++)null!=k[l]&&(c=Math.max(c,k[l].x),d=Math.min(d,k[l].x),e=Math.max(e,
-k[l].y),f=Math.min(f,k[l].y));c-=d;e-=f;if(0<c&&0<e){var m=100/c,p=100/e;k.map(function(a){if(null==a)return a;a.x=(a.x-d)*m;a.y=(a.y-f)*p;return a});for(var t='<shape strokewidth="inherit"><foreground>',v=0,l=0;l<k.length;l++){var x=k[l];if(null==x){var x=!1,v=k[v],y=k[l-1];!n&&q&&(x=v.x-y.x,y=v.y-y.y,x=Math.sqrt(x*x+y*y)<=a.tolerance);if(n||x)t+='<line x="'+v.x.toFixed(2)+'" y="'+v.y.toFixed(2)+'"/>';t+="</path>"+(n||x?"<fillstroke/>":"<stroke/>");v=l+1}else t=l==v?t+('<path><move x="'+x.x.toFixed(2)+
-'" y="'+x.y.toFixed(2)+'"/>'):t+('<line x="'+x.x.toFixed(2)+'" y="'+x.y.toFixed(2)+'"/>')}var l=mxConstants.STYLE_SHAPE+"=stencil("+Graph.compress(t+"</foreground></shape>")+");fillColor=none;",t=a.view.scale,v=a.view.translate,K=new mxCell("",new mxGeometry(d/t-v.x,f/t-v.y,c/t,e/t),l);K.vertex=1;a.model.beginUpdate();try{K=a.addCell(K)}finally{a.model.endUpdate()}a.fireEvent(new mxEventObject("cellsInserted","cells",[K]));a.fireEvent(new mxEventObject("freehandInserted","cell",K));setTimeout(function(){a.setSelectionCells([K])},
-10)}for(l=0;l<g.length;l++)g[l].parentNode.removeChild(g[l]);b=null;g=[];k=[]}u(!1)};mxEvent.addGestureListeners(c,function(d){if(m){var g=parseFloat(a.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1),g=Math.max(1,g*a.view.scale);b=document.createElementNS("http://www.w3.org/2000/svg","path");b.setAttribute("fill","none");b.setAttribute("stroke",a.currentVertexStyle[mxConstants.STYLE_STROKECOLOR]||"#000");b.setAttribute("stroke-width",g);if("1"==a.currentVertexStyle[mxConstants.STYLE_DASHED]){var n=
-a.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",n=n.split(" ").map(function(a){return parseFloat(a)*g}).join(" ");b.setAttribute("stroke-dasharray",n)}f=[];n=t(d);x(n);e="M"+n.x+" "+n.y;k.push(n);l=[];b.setAttribute("d",e);c.appendChild(b);mxEvent.consume(d)}},function(a){if(b){x(t(a));var c=y(0);if(c){e+=" L"+c.x+" "+c.y;k.push(c);var d="";l=[];for(var g=2;g<f.length;g+=2)c=y(g),d+=" L"+c.x+" "+c.y,l.push(c);b.setAttribute("d",e+d)}mxEvent.consume(a)}},v);var t=function(b){return mxUtils.convertPoint(a.container,
+mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(a){var c=null!=a.view&&null!=a.view.canvas?a.view.canvas.ownerSVGElement:null;if(null!=a.container&&null!=c){var d=mxFreehand.prototype.NORMAL_SMOOTHING,b=null,g=[],e,k=[],n,m=!1,t=!0,f=[],l=!1,p=!1;this.setClosedPath=function(a){m=a};this.setAutoClose=function(a){t=a};this.setStopClickEnabled=function(a){p=a};this.setSmoothing=function(a){d=a};var u=function(b){l=b;a.getRubberband().setEnabled(!b);a.graphHandler.setSelectEnabled(!b);a.graphHandler.setMoveEnabled(!b);a.container.style.cursor=
+b?"crosshair":"";a.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){u(!0)};this.isDrawing=function(){return l};var v=mxUtils.bind(this,function(a){if(b){var c=p&&0<k.length&&null!=n&&2>n.length;c||k.push.apply(k,n);n=[];k.push(null);g.push(b);b=null;c&&this.stopDrawing();mxEvent.consume(a)}});this.stopDrawing=function(){if(0<g.length){for(var c=k[0].x,d=k[0].x,e=k[0].y,f=k[0].y,l=1;l<k.length;l++)null!=k[l]&&(c=Math.max(c,k[l].x),d=Math.min(d,k[l].x),e=Math.max(e,
+k[l].y),f=Math.min(f,k[l].y));c-=d;e-=f;if(0<c&&0<e){var n=100/c,p=100/e;k.map(function(a){if(null==a)return a;a.x=(a.x-d)*n;a.y=(a.y-f)*p;return a});for(var q='<shape strokewidth="inherit"><foreground>',v=0,l=0;l<k.length;l++){var x=k[l];if(null==x){var x=!1,v=k[v],y=k[l-1];!m&&t&&(x=v.x-y.x,y=v.y-y.y,x=Math.sqrt(x*x+y*y)<=a.tolerance);if(m||x)q+='<line x="'+v.x.toFixed(2)+'" y="'+v.y.toFixed(2)+'"/>';q+="</path>"+(m||x?"<fillstroke/>":"<stroke/>");v=l+1}else q=l==v?q+('<path><move x="'+x.x.toFixed(2)+
+'" y="'+x.y.toFixed(2)+'"/>'):q+('<line x="'+x.x.toFixed(2)+'" y="'+x.y.toFixed(2)+'"/>')}var l=mxConstants.STYLE_SHAPE+"=stencil("+Graph.compress(q+"</foreground></shape>")+");fillColor=none;",q=a.view.scale,v=a.view.translate,K=new mxCell("",new mxGeometry(d/q-v.x,f/q-v.y,c/q,e/q),l);K.vertex=1;a.model.beginUpdate();try{K=a.addCell(K)}finally{a.model.endUpdate()}a.fireEvent(new mxEventObject("cellsInserted","cells",[K]));a.fireEvent(new mxEventObject("freehandInserted","cell",K));setTimeout(function(){a.setSelectionCells([K])},
+10)}for(l=0;l<g.length;l++)g[l].parentNode.removeChild(g[l]);b=null;g=[];k=[]}u(!1)};mxEvent.addGestureListeners(c,function(d){if(l){var g=parseFloat(a.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1),g=Math.max(1,g*a.view.scale);b=document.createElementNS("http://www.w3.org/2000/svg","path");b.setAttribute("fill","none");b.setAttribute("stroke",a.currentVertexStyle[mxConstants.STYLE_STROKECOLOR]||"#000");b.setAttribute("stroke-width",g);if("1"==a.currentVertexStyle[mxConstants.STYLE_DASHED]){var m=
+a.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",m=m.split(" ").map(function(a){return parseFloat(a)*g}).join(" ");b.setAttribute("stroke-dasharray",m)}f=[];m=q(d);x(m);e="M"+m.x+" "+m.y;k.push(m);n=[];b.setAttribute("d",e);c.appendChild(b);mxEvent.consume(d)}},function(a){if(b){x(q(a));var c=y(0);if(c){e+=" L"+c.x+" "+c.y;k.push(c);var d="";n=[];for(var g=2;g<f.length;g+=2)c=y(g),d+=" L"+c.x+" "+c.y,n.push(c);b.setAttribute("d",e+d)}mxEvent.consume(a)}},v);var q=function(b){return mxUtils.convertPoint(a.container,
mxEvent.getClientX(b),mxEvent.getClientY(b))},x=function(a){for(f.push(a);f.length>d;)f.shift()},y=function(a){var b=f.length;if(1===b%2||b>=d){var c=0,e=0,g,k=0;for(g=a;g<b;g++)k++,a=f[g],c+=a.x,e+=a.y;return{x:c/k,y:e/k}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;
diff --git a/src/main/webapp/js/diagramly/DriveClient.js b/src/main/webapp/js/diagramly/DriveClient.js
index b9d1ee35..5035a706 100644
--- a/src/main/webapp/js/diagramly/DriveClient.js
+++ b/src/main/webapp/js/diagramly/DriveClient.js
@@ -1541,10 +1541,16 @@ DriveClient.prototype.saveFile = function(file, revision, success, errFn, noChec
// Logs overwrite
try
{
- EditorUi.logError('Warning: Stale Etag Overwrite ' + file.getHash(),
- null, file.desc.id + '.' + file.desc.headRevisionId,
- ((this.user != null) ? ('user_' + this.user.id) : 'nouser') +
- ((file.sync != null) ? ('-client_' + file.sync.clientId) : '-nosync'));
+ EditorUi.logEvent({category: 'STALE-ETAG-SAVE-FILE-' + file.getHash(),
+ action: 'rev_' + file.desc.headRevisionId + '-mod_' + file.desc.modifiedDate +
+ '-size_' + file.getSize() + '-mime_' + file.desc.mimeType +
+ ((this.ui.editor.autosave) ? '' : '-nosave') +
+ ((file.isAutosave()) ? '' : '-noauto') +
+ ((file.changeListenerEnabled) ? '' : '-nolisten') +
+ ((file.inConflictState) ? '-conflict' : '') +
+ ((file.invalidChecksum) ? '-invalid' : ''),
+ label: ((this.user != null) ? ('user_' + this.user.id) : 'nouser') +
+ ((file.sync != null) ? ('-client_' + file.sync.clientId) : '-nosync')});
}
catch (e)
{
diff --git a/src/main/webapp/js/diagramly/Editor.js b/src/main/webapp/js/diagramly/Editor.js
index 2c558e6d..41e373ba 100644
--- a/src/main/webapp/js/diagramly/Editor.js
+++ b/src/main/webapp/js/diagramly/Editor.js
@@ -1714,6 +1714,24 @@
}
}
};
+
+ /**
+ * Adds the global fontCss configuration.
+ */
+ Editor.prototype.addFontCss = function(svgRoot)
+ {
+ var defs = svgRoot.getElementsByTagName('defs');
+
+ if (this.fontCss != null && defs != null && defs.length > 0)
+ {
+ var svgDoc = svgRoot.ownerDocument;
+ var style = (svgDoc.createElementNS != null) ?
+ svgDoc.createElementNS(mxConstants.NS_SVG, 'style') : svgDoc.createElement('style');
+ style.setAttribute('type', 'text/css');
+ mxUtils.setTextContent(style, this.fontCss);
+ defs[0][0].appendChild(style);
+ }
+ };
//TODO This function is a replica of EditorUi one, it is planned to replace all calls to EditorUi one to point to this one
/**
@@ -4001,21 +4019,22 @@
var x0 = graph.container.scrollLeft - origin.x;
var drawText = imgExport.drawText;
- imgExport.drawText = function(state, canvas)
+ imgExport.drawText = function(state, c)
{
- if (state.text != null && state.text.node != null &&
- state.text.node.ownerSVGElement == null)
+ if (c.addForeignObject != null && state.text != null && state.text.checkBounds() &&
+ state.text.node != null && state.text.node.ownerSVGElement == null)
{
+ c.save();
+
// Copies text into DOM using untransformed bounding box
- var tr = state.text.node.style.transform;
- state.text.node.style.transform = '';
- var rect = state.text.node.getBoundingClientRect();
var clone = state.text.node.cloneNode(true);
- state.text.node.style.transform = tr;
- // Removes unused style
+ // Clears styles that go to wrapper group
clone.style.transformOrigin = '';
-
+ clone.style.transform = '';
+ clone.style.top = '0px';
+ clone.style.left = '0px';
+
// Removes all math elements
var ele = clone.getElementsByTagName('math');
@@ -4024,56 +4043,53 @@
ele[0].parentNode.removeChild(ele[0]);
}
- // Sets position on foreignObject
- var s = canvas.state.scale * state.text.scale;
- var x = (rect.x + x0) / state.text.scale + canvas.state.dx;
- var y = (rect.y + y0) / state.text.scale + canvas.state.dy;
- var w = rect.width;
- var h = rect.height;
+ var s = state.text.scale;
+ var x = state.text.bounds.x / s;
+ var y = state.text.bounds.y / s;
+ var w = state.text.bounds.width / s;
+ var h = state.text.bounds.height / s;
- var fo = canvas.root.ownerDocument.createElementNS(mxConstants.NS_SVG, 'foreignObject');
- fo.setAttribute('x', x * s);
- fo.setAttribute('y', y * s);
- fo.setAttribute('width', w);
- fo.setAttribute('height', h);
+ state.text.updateTransform(c, x, y, w, h);
+ state.text.configureCanvas(c, x, y, w, h);
+
+ // Checks if text contains HTML markup
+ var realHtml = mxUtils.isNode(state.text.value) || state.text.dialect == mxConstants.DIALECT_STRICTHTML;
- // Resets position on inner DIV
- clone.style.top = '0px';
- clone.style.left = '0px';
+ // Always renders labels as HTML in VML
+ var fmt = (realHtml || c instanceof mxVmlCanvas2D) ? 'html' : '';
+ var val = state.text.value;
- // Applies transform on foreignObject
- var theta = state.text.getTextRotation();
- var dx = state.text.margin.x;
- var dy = state.text.margin.y;
- var tx = (2 * w * dx - w * s * dx) / s;
- var ty = (2 * h * dy - h * s * dy) / s;
+ if (!realHtml && fmt == 'html')
+ {
+ val = mxUtils.htmlEntities(val, false);
+ }
- // FIXME: Center/right aligned text with rotation and export zoom
- if (s != 1 && theta != 0)
+ if (fmt == 'html' && !mxUtils.isNode(state.text.value))
{
-// var rad = theta * (Math.PI / 180);
-// var pt = mxUtils.getRotatedPoint(new mxPoint(dx, dy), Math.cos(rad), Math.sin(rad));
-// tx -= 2 * pt.x * w * s + 2 * pt.y * h * s;
-// ty -= 2 * pt.y * h * s + 2 * pt.x * w * s;
-// console.log('s', s, theta, dx, w, pt);
+ val = mxUtils.replaceTrailingNewlines(val, '<div><br></div>');
}
- var tr = 'translate(' +
- canvas.format(tx) + ',' +
- canvas.format(ty) + ')';
+ // Handles trailing newlines to make sure they are visible in rendering output
+ val = (!mxUtils.isNode(state.text.value) && state.text.replaceLinefeeds && fmt == 'html') ?
+ val.replace(/\n/g, '<br/>') : val;
+
+ var dir = state.text.textDirection;
+
+ if (dir == mxConstants.TEXT_DIRECTION_AUTO && !realHtml)
+ {
+ dir = state.text.getAutoDirection();
+ }
- if (theta != 0)
+ if (dir != mxConstants.TEXT_DIRECTION_LTR && dir != mxConstants.TEXT_DIRECTION_RTL)
{
- tr += ' rotate(' + theta + ')';
+ dir = null;
}
- fo.setAttribute('transform-origin',
- canvas.format((x - dx * w) * s) + ' ' +
- canvas.format((y - dy * h) * s));
- fo.setAttribute('transform', tr +
- ' scale(' + s + ')');
- fo.appendChild(clone);
- canvas.root.ownerSVGElement.appendChild(fo);
+ c.addForeignObject(x + c.state.dx, y + c.state.dy, w, h, val,
+ state.text.align, state.text.valign, state.text.wrap, fmt,
+ state.text.overflow, state.text.clipped, state.text.getTextRotation(),
+ dir, clone, c.root.ownerSVGElement);
+ c.restore();
}
else
{
diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js
index cceffc04..504e5b6d 100644
--- a/src/main/webapp/js/diagramly/EditorUi.js
+++ b/src/main/webapp/js/diagramly/EditorUi.js
@@ -3921,13 +3921,12 @@
/**
* Handling for canvas export.
*/
-
- /**
- * See fixme in convertMath for client-side image generation with math.
- */
EditorUi.prototype.isExportToCanvas = function()
{
- return mxClient.IS_CHROMEAPP || this.useCanvasForExport;
+ // FIXME: Safari disabled due to mathjax rendering errors
+ return mxClient.IS_CHROMEAPP || ((!mxClient.IS_SF ||
+ !this.editor.graph.mathEnabled) &&
+ this.useCanvasForExport);
};
/**
@@ -4239,7 +4238,8 @@
EditorUi.prototype.openInNewWindow = function(data, mimeType, base64Encoded)
{
// In Google Chrome 60 the code from below produces a blank window
- if (mxClient.IS_GC || mxClient.IS_EDGE || document.documentMode == 11 || document.documentMode == 10)
+ if (mxClient.IS_GC || mxClient.IS_EDGE || mxClient.IS_FF ||
+ document.documentMode == 11 || document.documentMode == 10)
{
var win = window.open('about:blank');
@@ -4591,16 +4591,6 @@
currentPage, null, null, null, false));
}
- if (this.editor.fontCss != null)
- {
- var svgDoc = svgRoot.ownerDocument;
- var style = (svgDoc.createElementNS != null) ?
- svgDoc.createElementNS(mxConstants.NS_SVG, 'style') : svgDoc.createElement('style');
- style.setAttribute('type', 'text/css');
- mxUtils.setTextContent(style, this.editor.fontCss);
- svgRoot.getElementsByTagName('defs')[0].appendChild(style);
- }
-
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);
@@ -4617,6 +4607,9 @@
}));
}
});
+
+ // Adds CSS
+ this.editor.addFontCss(svgRoot);
if (this.editor.graph.mathEnabled)
{
@@ -5751,7 +5744,8 @@
*/
EditorUi.prototype.createEmbedSvg = function(fit, shadow, image, lightbox, edit, layers, fn)
{
- var svgRoot = this.editor.graph.getSvg();
+ var svgRoot = this.editor.graph.getSvg(null, null, null, null, null,
+ null, null, null, null, null, !image);
// Keeps hashtag links on same page
var links = svgRoot.getElementsByTagName('a');
@@ -5786,7 +5780,7 @@
{
var onclick = ' ';
var css = '';
-
+
// Adds double click handling
if (lightbox)
{
@@ -5848,6 +5842,14 @@
svgRoot.setAttribute('style', css);
}
+ // Adds CSS
+ this.editor.addFontCss(svgRoot);
+
+ if (this.editor.graph.mathEnabled)
+ {
+ this.editor.addMathCss(svgRoot);
+ }
+
fn(mxUtils.getXml(svgRoot));
}
};
@@ -6546,11 +6548,6 @@
addFontCss(this.editor.resolvedFontCss);
}
- if (graph.mathEnabled)
- {
- this.editor.addMathCss(svgRoot);
- }
-
img.src = this.createSvgDataUri(mxUtils.getXml(svgRoot));
});
@@ -13203,19 +13200,20 @@
var msgMarkers = msg.msgMarkers;
var callback = this.remoteInvokeCallbacks[msgMarkers.callbackId];
- if (callback != null)
+ if (callback == null)
{
- if (msg.error)
- {
- if (callback.error) callback.error(msg.error.errResp);
- }
- else if (callback.callback)
- {
- callback.callback.apply(this, msg.resp);
- }
-
- this.remoteInvokeCallbacks[msgMarkers.callbackId] = null; //set it to null only to keep the index
+ throw new Error('No callback for ' + ((msgMarkers != null) ? msgMarkers.callbackId : 'null'));
+ }
+ else if (msg.error)
+ {
+ if (callback.error) callback.error(msg.error.errResp);
}
+ else if (callback.callback)
+ {
+ callback.callback.apply(this, msg.resp);
+ }
+
+ this.remoteInvokeCallbacks[msgMarkers.callbackId] = null; //set it to null only to keep the index
};
EditorUi.prototype.remoteInvoke = function(remoteFn, remoteFnArgs, msgMarkers, callback, error)
diff --git a/src/main/webapp/js/diagramly/sidebar/Sidebar.js b/src/main/webapp/js/diagramly/sidebar/Sidebar.js
index 828ee81b..7519e88a 100644
--- a/src/main/webapp/js/diagramly/sidebar/Sidebar.js
+++ b/src/main/webapp/js/diagramly/sidebar/Sidebar.js
@@ -320,7 +320,8 @@
{
this.libs = (stc != null && (force || stc.length > 0)) ? stc : ((urlParams['libs'] != null &&
urlParams['libs'].length > 0) ? decodeURIComponent(urlParams['libs']) :
- ((mxSettings != null) ? mxSettings.getLibraries() : this.defaultEntries));
+ ((mxSettings != null && mxSettings.settings != null) ? mxSettings.getLibraries() :
+ this.defaultEntries));
var tmp = this.libs.split(';');
// Maps library names via the alias table
diff --git a/src/main/webapp/js/mxgraph/Actions.js b/src/main/webapp/js/mxgraph/Actions.js
index 8a183dd6..7a137151 100644
--- a/src/main/webapp/js/mxgraph/Actions.js
+++ b/src/main/webapp/js/mxgraph/Actions.js
@@ -628,8 +628,28 @@ Actions.prototype.init = function()
graph.zoomTo(1);
ui.resetScrollbars();
}, null, null, Editor.ctrlKey + '+H');
- this.addAction('zoomIn', function(evt) { graph.zoomIn(); }, null, null, Editor.ctrlKey + ' + (Numpad) / Alt+Mousewheel');
- this.addAction('zoomOut', function(evt) { graph.zoomOut(); }, null, null, Editor.ctrlKey + ' - (Numpad) / Alt+Mousewheel');
+ this.addAction('zoomIn', function(evt)
+ {
+ if (urlParams['zoom'] == 'fast')
+ {
+ graph.lazyZoom(true, true);
+ }
+ else
+ {
+ graph.zoomIn();
+ }
+ }, null, null, Editor.ctrlKey + ' + (Numpad) / Alt+Mousewheel');
+ this.addAction('zoomOut', function(evt)
+ {
+ if (urlParams['zoom'] == 'fast')
+ {
+ graph.lazyZoom(false, true);
+ }
+ else
+ {
+ graph.zoomOut();
+ }
+ }, null, null, Editor.ctrlKey + ' - (Numpad) / Alt+Mousewheel');
this.addAction('fitWindow', function()
{
var bounds = (graph.isSelectionEmpty()) ? graph.getGraphBounds() : graph.getBoundingBox(graph.getSelectionCells());
diff --git a/src/main/webapp/js/mxgraph/EditorUi.js b/src/main/webapp/js/mxgraph/EditorUi.js
index 7a42745e..3a9b6861 100644
--- a/src/main/webapp/js/mxgraph/EditorUi.js
+++ b/src/main/webapp/js/mxgraph/EditorUi.js
@@ -2069,8 +2069,10 @@ EditorUi.prototype.initCanvas = function()
graph.cumulativeZoomFactor = 1;
var cursorPosition = null;
+ var mainGroup = graph.view.getDrawPane();
+ var bgGroup = graph.view.getBackgroundPane();
- graph.lazyZoom = function(zoomIn)
+ graph.lazyZoom = function(zoomIn, ignoreCursorPosition)
{
if (this.updateZoomTimeout != null)
{
@@ -2078,7 +2080,7 @@ EditorUi.prototype.initCanvas = function()
}
// Switches to 1% zoom steps below 15%
- // Lower bound depdends on rounding below
+ // Lower bound depends on rounding below
if (zoomIn)
{
if (this.view.scale * this.cumulativeZoomFactor < 0.15)
@@ -2108,10 +2110,48 @@ EditorUi.prototype.initCanvas = function()
}
}
+ if (urlParams['zoom'] == 'fast')
+ {
+ var cx = (ignoreCursorPosition) ? graph.container.scrollWidth / 2 :
+ cursorPosition.x + graph.container.scrollLeft - graph.container.offsetLeft;
+ var cy = (ignoreCursorPosition) ? graph.container.scrollHeight / 2 :
+ cursorPosition.y + graph.container.scrollTop - graph.container.offsetTop;
+ mainGroup.setAttribute('transform-origin', cx + ' ' + cy);
+ mainGroup.setAttribute('transform', 'scale(' +
+ this.cumulativeZoomFactor + ')');
+ bgGroup.setAttribute('transform-origin', cx + ' ' + cy);
+ bgGroup.setAttribute('transform', 'scale(' +
+ this.cumulativeZoomFactor + ')');
+
+ var page = graph.view.backgroundPageShape.node;
+
+ mxUtils.setPrefixedStyle(page.style, 'transform-origin',
+ (ignoreCursorPosition) ? '50%' : ((cursorPosition.x + graph.container.offsetLeft - page.offsetLeft) + 'px') + ' ' +
+ (ignoreCursorPosition) ? '50%' : ((cursorPosition.y - page.offsetTop) + 'px'));
+ mxUtils.setPrefixedStyle(page.style, 'transform',
+ 'scale(' + this.cumulativeZoomFactor + ')');
+
+ graph.view.getOverlayPane().style.opacity = '0';
+ graph.view.getDecoratorPane().style.opacity = '0';
+ console.log('here', this.cumulativeZoomFactor, cx, page.offsetLeft, page.offsetWidth);
+ }
+
this.cumulativeZoomFactor = Math.max(0.01, Math.min(this.view.scale * this.cumulativeZoomFactor, 160) / this.view.scale);
this.updateZoomTimeout = window.setTimeout(mxUtils.bind(this, function()
{
+ if (urlParams['zoom'] == 'fast')
+ {
+ mainGroup.removeAttribute('transform-origin');
+ mainGroup.removeAttribute('transform');
+ bgGroup.removeAttribute('transform-origin');
+ bgGroup.removeAttribute('transform');
+ graph.view.getOverlayPane().style.opacity = '';
+ graph.view.getDecoratorPane().style.opacity = '';
+ mxUtils.setPrefixedStyle(graph.view.backgroundPageShape.node.style, 'transform-origin', null);
+ mxUtils.setPrefixedStyle(graph.view.backgroundPageShape.node.style, 'transform', null);
+ }
+
var offset = mxUtils.getOffset(graph.container);
var dx = 0;
var dy = 0;
@@ -2143,7 +2183,7 @@ EditorUi.prototype.initCanvas = function()
this.cumulativeZoomFactor = 1;
this.updateZoomTimeout = null;
- }), this.lazyZoomDelay);
+ }), (urlParams['zoom'] == 'fast') ? 500 : this.lazyZoomDelay);
};
mxEvent.addMouseWheelListener(mxUtils.bind(this, function(evt, up)
diff --git a/src/main/webapp/js/mxgraph/Menus.js b/src/main/webapp/js/mxgraph/Menus.js
index ca77eb36..1eb78026 100644
--- a/src/main/webapp/js/mxgraph/Menus.js
+++ b/src/main/webapp/js/mxgraph/Menus.js
@@ -818,19 +818,33 @@ Menus.prototype.createStyleChangeFunction = function(keys, values)
graph.getModel().beginUpdate();
try
{
+ var cells = graph.getSelectionCells();
+
for (var i = 0; i < keys.length; i++)
{
- graph.setCellStyles(keys[i], values[i]);
+ graph.setCellStyles(keys[i], values[i], cells);
// Removes CSS alignment to produce consistent output
if (keys[i] == mxConstants.STYLE_ALIGN)
{
- graph.updateLabelElements(graph.getSelectionCells(), function(elt)
+ graph.updateLabelElements(cells, function(elt)
{
elt.removeAttribute('align');
elt.style.textAlign = null;
});
}
+
+ // Updates autosize after font changes
+ if (keys[i] == mxConstants.STYLE_FONTFAMILY)
+ {
+ for (var i = 0; i < cells.length; i++)
+ {
+ if (graph.model.getChildCount(cells[i]) == 0)
+ {
+ graph.autoSizeCell(cells[i], false);
+ }
+ }
+ }
}
if (post != null)
@@ -838,8 +852,8 @@ Menus.prototype.createStyleChangeFunction = function(keys, values)
post();
}
- this.editorUi.fireEvent(new mxEventObject('styleChanged', 'keys', keys, 'values', values,
- 'cells', graph.getSelectionCells()));
+ this.editorUi.fireEvent(new mxEventObject('styleChanged',
+ 'keys', keys, 'values', values, 'cells', cells));
}
finally
{
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index a73773a8..6e1cb5f1 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -439,15 +439,16 @@ mxSvgCanvas2D.prototype.updateText=function(a,b,c,d,e,f,g,k,l,m,n){if(null!=n&&n
"px"));g&&0<c&&(q.style.width=Math.round(c+1)+"px");var t,u=q;null!=u.firstChild&&"DIV"==u.firstChild.nodeName&&(u=u.firstChild);var x=null!=n.mxCachedOffsetWidth?n.mxCachedOffsetWidth:u.offsetWidth;t=x+0;g&&"fill"!=k&&(l&&(t=Math.min(t,c)),q.style.width=Math.round(t+1)+"px");t=null!=n.mxCachedFinalOffsetWidth?n.mxCachedFinalOffsetWidth:u.offsetWidth;g=null!=n.mxCachedFinalOffsetHeight?n.mxCachedFinalOffsetHeight:u.offsetHeight;this.cacheOffsetSize&&(n.mxCachedOffsetWidth=x,n.mxCachedFinalOffsetWidth=
t,n.mxCachedFinalOffsetHeight=g);t+=0;g-=2;l&&(g=Math.min(g,d),t=Math.min(t,c));"width"==k?d=g:"fill"!=k&&(c=t,d=g);g=l=0;e==mxConstants.ALIGN_CENTER?l-=c/2:e==mxConstants.ALIGN_RIGHT&&(l-=c);a+=l;f==mxConstants.ALIGN_MIDDLE?g-=d/2:f==mxConstants.ALIGN_BOTTOM&&(g-=d);"fill"!=k&&mxClient.IS_FF&&mxClient.IS_WIN&&(g-=2);b+=g;e=1!=r.scale?"scale("+r.scale+")":"";0!=r.rotation&&this.rotateHtml?(e+="rotate("+r.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*r.scale,(b+d/2)*r.scale,r.rotation,r.rotationCx,
r.rotationCy),a=b.x-c*r.scale/2,b=b.y-d*r.scale/2):(a*=r.scale,b*=r.scale);0!=m&&(e+="rotate("+m+","+-l+","+-g+")");n.setAttribute("transform","translate("+Math.round(a)+","+Math.round(b)+")"+e);p.setAttribute("width",Math.round(Math.max(1,c)));p.setAttribute("height",Math.round(Math.max(1,d)))}};
-mxSvgCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,q){if(this.textEnabled&&null!=e){p=null!=p?p:0;var r=this.state;a+=r.dx;b+=r.dy;if(this.foEnabled&&"html"==l){var t="vertical-align:top;";n?t+="overflow:hidden;max-height:"+Math.round(d)+"px;max-width:"+Math.round(c)+"px;":"fill"==m?t+="width:"+Math.round(c+1)+"px;height:"+Math.round(d+1)+"px;overflow:hidden;":"width"==m&&(t+="width:"+Math.round(c+1)+"px;",0<d&&(t+="max-height:"+Math.round(d)+"px;overflow:hidden;"));var t=k&&0<c?t+("width:"+
-Math.round(c+1)+"px;white-space:normal;word-wrap:"+mxConstants.WORD_WRAP+";"):t+"white-space:nowrap;",u=this.createElement("g");1>r.alpha&&u.setAttribute("opacity",r.alpha);var x=this.createElement("foreignObject");x.setAttribute("style","overflow:visible;");x.setAttribute("pointer-events",this.pointerEvents?this.pointerEventsValue:"none");t=this.createDiv(e,f,g,t,m,k&&0<c?"normal":null);if(null!=t){null!=q&&t.setAttribute("dir",q);u.appendChild(x);this.root.appendChild(u);var y,A;q=y=2;if(!mxClient.IS_IE||
-9!=document.documentMode&&mxClient.IS_SVG){this.root.ownerDocument!=document?(t.style.visibility="hidden",document.body.appendChild(t)):x.appendChild(t);var z=t;null!=z.firstChild&&"DIV"==z.firstChild.nodeName&&(z=z.firstChild,k&&"break-word"==t.style.wordWrap&&(z.style.width="100%"));v=z.offsetWidth;0==v&&t.parentNode==x&&(t.style.visibility="hidden",document.body.appendChild(t),v=z.offsetWidth);this.cacheOffsetSize&&(u.mxCachedOffsetWidth=v);!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=
-m&&"width"!=m&&(B=t.style.whiteSpace,t.style.whiteSpace="nowrap",v<z.offsetWidth&&(t.style.whiteSpace=B));y=v+y-1;k&&"fill"!=m&&"width"!=m&&(n&&(y=Math.min(y,c)),t.style.width=y+"px");y=z.offsetWidth;A=z.offsetHeight;this.cacheOffsetSize&&(u.mxCachedFinalOffsetWidth=y,u.mxCachedFinalOffsetHeight=A);A-=q;t.parentNode!=x&&(x.appendChild(t),t.style.visibility="")}else{z=document.createElement("div");z.style.cssText=t.getAttribute("style");z.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";z.style.position=
-"absolute";z.style.visibility="hidden";A=document.createElement("div");A.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";A.style.wordWrap=mxConstants.WORD_WRAP;A.innerHTML=mxUtils.isNode(e)?e.outerHTML:e;z.appendChild(A);document.body.appendChild(z);8!=document.documentMode&&9!=document.documentMode&&null!=r.fontBorderColor&&(y+=2,q+=2);if(k&&0<c){var v=A.offsetWidth;padDx=0;if(!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=m){var B=z.style.whiteSpace;A.style.whiteSpace="nowrap";
-v<A.offsetWidth&&(z.style.whiteSpace=B)}n&&(v=Math.min(v,c));z.style.width=v+"px";y=A.offsetWidth+y+padDx;A=A.offsetHeight+q;z.style.display="inline-block";z.style.position="";z.style.visibility="";z.style.width=y+"px";t.setAttribute("style",z.style.cssText)}else y=A.offsetWidth+y,A=A.offsetHeight+q;z.parentNode.removeChild(z);x.appendChild(t)}n&&(A=Math.min(A,d),y=Math.min(y,c));"width"==m?d=A:"fill"!=m&&(c=y,d=A);1>r.alpha&&u.setAttribute("opacity",r.alpha);q=t=0;f==mxConstants.ALIGN_CENTER?t-=
-c/2:f==mxConstants.ALIGN_RIGHT&&(t-=c);a+=t;g==mxConstants.ALIGN_MIDDLE?q-=d/2:g==mxConstants.ALIGN_BOTTOM&&(q-=d);"fill"!=m&&mxClient.IS_FF&&mxClient.IS_WIN&&(q-=2);b+=q;z=1!=r.scale?"scale("+r.scale+")":"";0!=r.rotation&&this.rotateHtml?(z+="rotate("+r.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*r.scale,(b+d/2)*r.scale,r.rotation,r.rotationCx,r.rotationCy),a=b.x-c*r.scale/2,b=b.y-d*r.scale/2):(a*=r.scale,b*=r.scale);0!=p&&(z+="rotate("+p+","+-t+","+-q+")");u.setAttribute("transform",
-"translate("+(Math.round(a)+this.foOffset)+","+(Math.round(b)+this.foOffset)+")"+z);x.setAttribute("width",Math.round(Math.max(1,c)));x.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(x,a,b,c,d,e,f,g,k,l,m,n,p),null!=a&&(x.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),c.appendChild(x),c.appendChild(a),u.appendChild(c)))}}else this.plainText(a,b,c,d,e,f,g,k,m,n,p,
-q)}};mxSvgCanvas2D.prototype.createClip=function(a,b,c,d){a=Math.round(a);b=Math.round(b);c=Math.round(c);d=Math.round(d);for(var e="mx-clip-"+a+"-"+b+"-"+c+"-"+d,f=0,g=e+"-"+f;null!=document.getElementById(g);)g=e+"-"+ ++f;clip=this.createElement("clipPath");clip.setAttribute("id",g);e=this.createElement("rect");e.setAttribute("x",a);e.setAttribute("y",b);e.setAttribute("width",c);e.setAttribute("height",d);clip.appendChild(e);return clip};
+mxSvgCanvas2D.prototype.addForeignObject=function(a,b,c,d,e,f,g,k,l,m,n,p,q,r,t){var u=this.state;q=this.createElement("g");1>u.alpha&&q.setAttribute("opacity",u.alpha);var x=this.createElement("foreignObject");x.setAttribute("style","overflow:visible;");x.setAttribute("pointer-events",this.pointerEvents?this.pointerEventsValue:"none");q.appendChild(x);t.appendChild(q);var y,A;t=y=2;if(!mxClient.IS_IE||9!=document.documentMode&&mxClient.IS_SVG){this.root.ownerDocument!=document?(r.style.visibility=
+"hidden",document.body.appendChild(r)):x.appendChild(r);var z=r;null!=z.firstChild&&"DIV"==z.firstChild.nodeName&&(z=z.firstChild,k&&"break-word"==r.style.wordWrap&&(z.style.width="100%"));v=z.offsetWidth;0==v&&r.parentNode==x&&(r.style.visibility="hidden",document.body.appendChild(r),v=z.offsetWidth);this.cacheOffsetSize&&(q.mxCachedOffsetWidth=v);!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=m&&"width"!=m&&(B=r.style.whiteSpace,r.style.whiteSpace="nowrap",v<z.offsetWidth&&(r.style.whiteSpace=
+B));y=v+y-1;k&&"fill"!=m&&"width"!=m&&(n&&(y=Math.min(y,c)),r.style.width=y+"px");y=z.offsetWidth;A=z.offsetHeight;this.cacheOffsetSize&&(q.mxCachedFinalOffsetWidth=y,q.mxCachedFinalOffsetHeight=A);A-=t;r.parentNode!=x&&(x.appendChild(r),r.style.visibility="")}else{z=document.createElement("div");z.style.cssText=r.getAttribute("style");z.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";z.style.position="absolute";z.style.visibility="hidden";A=document.createElement("div");A.style.display=
+mxClient.IS_QUIRKS?"inline":"inline-block";A.style.wordWrap=mxConstants.WORD_WRAP;A.innerHTML=mxUtils.isNode(e)?e.outerHTML:e;z.appendChild(A);document.body.appendChild(z);8!=document.documentMode&&9!=document.documentMode&&null!=u.fontBorderColor&&(y+=2,t+=2);if(k&&0<c){var v=A.offsetWidth;padDx=0;if(!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=m){var B=z.style.whiteSpace;A.style.whiteSpace="nowrap";v<A.offsetWidth&&(z.style.whiteSpace=B)}n&&(v=Math.min(v,c));z.style.width=v+"px";y=A.offsetWidth+
+y+padDx;A=A.offsetHeight+t;z.style.display="inline-block";z.style.position="";z.style.visibility="";z.style.width=y+"px";r.setAttribute("style",z.style.cssText)}else y=A.offsetWidth+y,A=A.offsetHeight+t;z.parentNode.removeChild(z);x.appendChild(r)}n&&(A=Math.min(A,d),y=Math.min(y,c));"width"==m?d=A:"fill"!=m&&(c=y,d=A);1>u.alpha&&q.setAttribute("opacity",u.alpha);t=r=0;f==mxConstants.ALIGN_CENTER?r-=c/2:f==mxConstants.ALIGN_RIGHT&&(r-=c);a+=r;g==mxConstants.ALIGN_MIDDLE?t-=d/2:g==mxConstants.ALIGN_BOTTOM&&
+(t-=d);"fill"!=m&&mxClient.IS_FF&&mxClient.IS_WIN&&(t-=2);b+=t;z=1!=u.scale?"scale("+u.scale+")":"";0!=u.rotation&&this.rotateHtml?(z+="rotate("+u.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*u.scale,(b+d/2)*u.scale,u.rotation,u.rotationCx,u.rotationCy),a=b.x-c*u.scale/2,b=b.y-d*u.scale/2):(a*=u.scale,b*=u.scale);0!=p&&(z+="rotate("+p+","+-r+","+-t+")");q.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(b)+this.foOffset)+")"+z);x.setAttribute("width",
+Math.round(Math.max(1,c)));x.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(x,a,b,c,d,e,f,g,k,l,m,n,p),null!=a&&(x.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),c.appendChild(x),c.appendChild(a),q.appendChild(c)))};
+mxSvgCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,q){if(this.textEnabled&&null!=e){p=null!=p?p:0;var r=this.state;a+=r.dx;b+=r.dy;this.foEnabled&&"html"==l?(r="vertical-align:top;",n?r+="overflow:hidden;max-height:"+Math.round(d)+"px;max-width:"+Math.round(c)+"px;":"fill"==m?r+="width:"+Math.round(c+1)+"px;height:"+Math.round(d+1)+"px;overflow:hidden;":"width"==m&&(r+="width:"+Math.round(c+1)+"px;",0<d&&(r+="max-height:"+Math.round(d)+"px;overflow:hidden;")),r=k&&0<c?r+("width:"+Math.round(c+
+1)+"px;white-space:normal;word-wrap:"+mxConstants.WORD_WRAP+";"):r+"white-space:nowrap;",r=this.createDiv(e,f,g,r,m,k&&0<c?"normal":null),null!=r&&(null!=q&&r.setAttribute("dir",q),this.addForeignObject(a,b,c,d,e,f,g,k,l,m,n,p,q,r,this.root))):this.plainText(a,b,c,d,e,f,g,k,m,n,p,q)}};
+mxSvgCanvas2D.prototype.createClip=function(a,b,c,d){a=Math.round(a);b=Math.round(b);c=Math.round(c);d=Math.round(d);for(var e="mx-clip-"+a+"-"+b+"-"+c+"-"+d,f=0,g=e+"-"+f;null!=document.getElementById(g);)g=e+"-"+ ++f;clip=this.createElement("clipPath");clip.setAttribute("id",g);e=this.createElement("rect");e.setAttribute("x",a);e.setAttribute("y",b);e.setAttribute("width",c);e.setAttribute("height",d);clip.appendChild(e);return clip};
mxSvgCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,k,l,m,n,p){n=null!=n?n:0;k=this.state;var q=k.fontSize,r=this.createElement("g"),t=k.transform||"";this.updateFont(r);0!=n&&(t+="rotate("+n+","+this.format(a*k.scale)+","+this.format(b*k.scale)+")");null!=p&&r.setAttribute("direction",p);m&&0<c&&0<d&&(p=a,n=b,f==mxConstants.ALIGN_CENTER?p-=c/2:f==mxConstants.ALIGN_RIGHT&&(p-=c),"fill"!=l&&(g==mxConstants.ALIGN_MIDDLE?n-=d/2:g==mxConstants.ALIGN_BOTTOM&&(n-=d)),n=this.createClip(p*k.scale-2,
n*k.scale-2,c*k.scale+4,d*k.scale+4),null!=this.defs?this.defs.appendChild(n):this.root.appendChild(n),mxClient.IS_CHROMEAPP||mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE||this.root.ownerDocument!=document?r.setAttribute("clip-path","url(#"+n.getAttribute("id")+")"):(p=this.getBaseUrl().replace(/([\(\)])/g,"\\$1"),r.setAttribute("clip-path","url("+p+"#"+n.getAttribute("id")+")")));n=f==mxConstants.ALIGN_RIGHT?"end":f==mxConstants.ALIGN_CENTER?"middle":"start";"start"!=n&&r.setAttribute("text-anchor",
n);this.styleEnabled&&q==mxConstants.DEFAULT_FONTSIZE||r.setAttribute("font-size",q*k.scale+"px");0<t.length&&r.setAttribute("transform",t);1>k.alpha&&r.setAttribute("opacity",k.alpha);t=e.split("\n");p=Math.round(q*mxConstants.LINE_HEIGHT);var u=q+(t.length-1)*p;n=b+q-1;g==mxConstants.ALIGN_MIDDLE?"fill"==l?n-=d/2:(m=(this.matchHtmlAlignment&&m&&0<d?Math.min(u,d):u)/2,n-=m+1):g==mxConstants.ALIGN_BOTTOM&&("fill"==l?n-=d:(m=this.matchHtmlAlignment&&m&&0<d?Math.min(u,d):u,n-=m+2));for(m=0;m<t.length;m++)0<
@@ -2024,11 +2025,11 @@ Editor.prototype.setFilename=function(a){this.filename=a};
Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,f){b.undoableEditHappened(f.getProperty("edit"))};var f=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,f);a.getView().addListener(mxEvent.UNDO,f);f=function(b,f){var d=a.getSelectionCellsForChanges(f.getProperty("edit").changes);a.getModel();for(var l=[],u=0;u<d.length;u++)null!=a.view.getState(d[u])&&l.push(d[u]);a.setSelectionCells(l)};
b.addListener(mxEvent.UNDO,f);b.addListener(mxEvent.REDO,f);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};
OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
-function Dialog(a,b,f,d,l,m,p,u,x,B,c){var e=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(e=80);f+=e;d+=e;var k=f,q=d,n=mxUtils.getDocumentSize(),g=n.height,y=Math.max(1,Math.round((n.width-f-64)/2)),A=Math.max(1,Math.round((g-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");f=null!=document.body?Math.min(f,document.body.scrollWidth-64):f;d=Math.min(d,g-64);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),
-this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=g+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));n=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=n.x+"px";this.bg.style.top=n.y+"px";y+=n.x;A+=n.y;l&&document.body.appendChild(this.bg);var t=a.createDiv(x?"geTransDialog":"geDialog");l=this.getPosition(y,A,f,d);y=l.x;A=l.y;t.style.width=
-f+"px";t.style.height=d+"px";t.style.left=y+"px";t.style.top=A+"px";t.style.zIndex=this.zIndex;t.appendChild(b);document.body.appendChild(t);!u&&b.clientHeight>t.clientHeight-64&&(b.style.overflowY="auto");m&&(m=document.createElement("img"),m.setAttribute("src",Dialog.prototype.closeImage),m.setAttribute("title",mxResources.get("close")),m.className="geDialogClose",m.style.top=A+14+"px",m.style.left=y+f+38-e+"px",m.style.zIndex=this.zIndex,mxEvent.addListener(m,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),
-document.body.appendChild(m),this.dialogImg=m,c||mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(c){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){if(null!=B){var c=B();null!=c&&(k=f=c.w,q=d=c.h)}c=mxUtils.getDocumentSize();g=c.height;this.bg.style.height=g+"px";y=Math.max(1,Math.round((c.width-f-64)/2));A=Math.max(1,Math.round((g-d-a.footerHeight)/3));f=null!=document.body?Math.min(k,document.body.scrollWidth-64):k;d=Math.min(q,g-64);c=this.getPosition(y,
-A,f,d);y=c.x;A=c.y;t.style.left=y+"px";t.style.top=A+"px";t.style.width=f+"px";t.style.height=d+"px";!u&&b.clientHeight>t.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=A+14+"px",this.dialogImg.style.left=y+f+38-e+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=p;this.container=t;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
+function Dialog(a,b,f,d,l,m,p,u,v,B,c){var e=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(e=80);f+=e;d+=e;var k=f,q=d,n=mxUtils.getDocumentSize(),g=n.height,x=Math.max(1,Math.round((n.width-f-64)/2)),A=Math.max(1,Math.round((g-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");f=null!=document.body?Math.min(f,document.body.scrollWidth-64):f;d=Math.min(d,g-64);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),
+this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=g+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));n=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=n.x+"px";this.bg.style.top=n.y+"px";x+=n.x;A+=n.y;l&&document.body.appendChild(this.bg);var t=a.createDiv(v?"geTransDialog":"geDialog");l=this.getPosition(x,A,f,d);x=l.x;A=l.y;t.style.width=
+f+"px";t.style.height=d+"px";t.style.left=x+"px";t.style.top=A+"px";t.style.zIndex=this.zIndex;t.appendChild(b);document.body.appendChild(t);!u&&b.clientHeight>t.clientHeight-64&&(b.style.overflowY="auto");m&&(m=document.createElement("img"),m.setAttribute("src",Dialog.prototype.closeImage),m.setAttribute("title",mxResources.get("close")),m.className="geDialogClose",m.style.top=A+14+"px",m.style.left=x+f+38-e+"px",m.style.zIndex=this.zIndex,mxEvent.addListener(m,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),
+document.body.appendChild(m),this.dialogImg=m,c||mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(c){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){if(null!=B){var c=B();null!=c&&(k=f=c.w,q=d=c.h)}c=mxUtils.getDocumentSize();g=c.height;this.bg.style.height=g+"px";x=Math.max(1,Math.round((c.width-f-64)/2));A=Math.max(1,Math.round((g-d-a.footerHeight)/3));f=null!=document.body?Math.min(k,document.body.scrollWidth-64):k;d=Math.min(q,g-64);c=this.getPosition(x,
+A,f,d);x=c.x;A=c.y;t.style.left=x+"px";t.style.top=A+"px";t.style.width=f+"px";t.style.height=d+"px";!u&&b.clientHeight>t.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=A+14+"px",this.dialogImg.style.left=x+f+38-e+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=p;this.container=t;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":
IMAGE_PATH+"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
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+
@@ -2037,33 +2038,33 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA
"/locked.png";
Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+
"/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,b){return new mxPoint(a,b)};Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,b))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(a,b,f,d,l,m,p,u,x,B,c){x=null!=x?x:!0;var e=document.createElement("div");e.style.textAlign="center";if(null!=b){var k=document.createElement("div");k.style.padding="0px";k.style.margin="0px";k.style.fontSize="18px";k.style.paddingBottom="16px";k.style.marginBottom="10px";k.style.borderBottom="1px solid #c0c0c0";k.style.color="gray";k.style.whiteSpace="nowrap";k.style.textOverflow="ellipsis";k.style.overflow="hidden";mxUtils.write(k,b);k.setAttribute("title",b);e.appendChild(k)}b=
-document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=f;e.appendChild(b);f=document.createElement("div");f.style.marginTop="12px";f.style.textAlign="center";null!=m&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();m()}),b.className="geBtn",f.appendChild(b),f.style.textAlign="center");null!=B&&(B=mxUtils.button(B,function(){null!=c&&c()}),B.className="geBtn",f.appendChild(B));var q=mxUtils.button(d,function(){x&&a.hideDialog();null!=l&&l()});
-q.className="geBtn";f.appendChild(q);null!=p&&(d=mxUtils.button(p,function(){x&&a.hideDialog();null!=u&&u()}),d.className="geBtn gePrimaryBtn",f.appendChild(d));this.init=function(){q.focus()};e.appendChild(f);this.container=e},PrintDialog=function(a,b){this.create(a,b)};
+var ErrorDialog=function(a,b,f,d,l,m,p,u,v,B,c){v=null!=v?v:!0;var e=document.createElement("div");e.style.textAlign="center";if(null!=b){var k=document.createElement("div");k.style.padding="0px";k.style.margin="0px";k.style.fontSize="18px";k.style.paddingBottom="16px";k.style.marginBottom="10px";k.style.borderBottom="1px solid #c0c0c0";k.style.color="gray";k.style.whiteSpace="nowrap";k.style.textOverflow="ellipsis";k.style.overflow="hidden";mxUtils.write(k,b);k.setAttribute("title",b);e.appendChild(k)}b=
+document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=f;e.appendChild(b);f=document.createElement("div");f.style.marginTop="12px";f.style.textAlign="center";null!=m&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();m()}),b.className="geBtn",f.appendChild(b),f.style.textAlign="center");null!=B&&(B=mxUtils.button(B,function(){null!=c&&c()}),B.className="geBtn",f.appendChild(B));var q=mxUtils.button(d,function(){v&&a.hideDialog();null!=l&&l()});
+q.className="geBtn";f.appendChild(q);null!=p&&(d=mxUtils.button(p,function(){v&&a.hideDialog();null!=u&&u()}),d.className="geBtn gePrimaryBtn",f.appendChild(d));this.init=function(){q.focus()};e.appendChild(f);this.container=e},PrintDialog=function(a,b){this.create(a,b)};
PrintDialog.prototype.create=function(a){function b(a){var b=u.checked||B.checked,d=parseInt(e.value)/100;isNaN(d)&&(d=1,e.value="100%");var d=.75*d,k=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,q=1/f.pageScale;if(b){var t=u.checked?1:parseInt(c.value);isNaN(t)||(q=mxUtils.getScaleForPageCount(t,f,k))}f.getGraphBounds();var l=t=0,k=mxRectangle.fromRectangle(k);k.width=Math.ceil(k.width*d);k.height=Math.ceil(k.height*d);q*=d;!b&&f.pageVisible?(d=f.getPageLayout(),t-=d.x*k.width,l-=d.y*k.height):
-b=!0;b=PrintDialog.createPrintPreview(f,q,k,0,t,l,b);b.open();a&&PrintDialog.printPreview(b)}var f=a.editor.graph,d,l,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var p=document.createElement("tbody");d=document.createElement("tr");var u=document.createElement("input");u.setAttribute("type","checkbox");l=document.createElement("td");l.setAttribute("colspan","2");l.style.fontSize="10pt";l.appendChild(u);var x=document.createElement("span");mxUtils.write(x," "+mxResources.get("fitPage"));
-l.appendChild(x);mxEvent.addListener(x,"click",function(a){u.checked=!u.checked;B.checked=!u.checked;mxEvent.consume(a)});mxEvent.addListener(u,"change",function(){B.checked=!u.checked});d.appendChild(l);p.appendChild(d);d=d.cloneNode(!1);var B=document.createElement("input");B.setAttribute("type","checkbox");l=document.createElement("td");l.style.fontSize="10pt";l.appendChild(B);x=document.createElement("span");mxUtils.write(x," "+mxResources.get("posterPrint")+":");l.appendChild(x);mxEvent.addListener(x,
+b=!0;b=PrintDialog.createPrintPreview(f,q,k,0,t,l,b);b.open();a&&PrintDialog.printPreview(b)}var f=a.editor.graph,d,l,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var p=document.createElement("tbody");d=document.createElement("tr");var u=document.createElement("input");u.setAttribute("type","checkbox");l=document.createElement("td");l.setAttribute("colspan","2");l.style.fontSize="10pt";l.appendChild(u);var v=document.createElement("span");mxUtils.write(v," "+mxResources.get("fitPage"));
+l.appendChild(v);mxEvent.addListener(v,"click",function(a){u.checked=!u.checked;B.checked=!u.checked;mxEvent.consume(a)});mxEvent.addListener(u,"change",function(){B.checked=!u.checked});d.appendChild(l);p.appendChild(d);d=d.cloneNode(!1);var B=document.createElement("input");B.setAttribute("type","checkbox");l=document.createElement("td");l.style.fontSize="10pt";l.appendChild(B);v=document.createElement("span");mxUtils.write(v," "+mxResources.get("posterPrint")+":");l.appendChild(v);mxEvent.addListener(v,
"click",function(a){B.checked=!B.checked;u.checked=!B.checked;mxEvent.consume(a)});d.appendChild(l);var c=document.createElement("input");c.setAttribute("value","1");c.setAttribute("type","number");c.setAttribute("min","1");c.setAttribute("size","4");c.setAttribute("disabled","disabled");c.style.width="50px";l=document.createElement("td");l.style.fontSize="10pt";l.appendChild(c);mxUtils.write(l," "+mxResources.get("pages")+" (max)");d.appendChild(l);p.appendChild(d);mxEvent.addListener(B,"change",
function(){B.checked?c.removeAttribute("disabled"):c.setAttribute("disabled","disabled");u.checked=!B.checked});d=d.cloneNode(!1);l=document.createElement("td");mxUtils.write(l,mxResources.get("pageScale")+":");d.appendChild(l);l=document.createElement("td");var e=document.createElement("input");e.setAttribute("value","100 %");e.setAttribute("size","5");e.style.width="50px";l.appendChild(e);d.appendChild(l);p.appendChild(d);d=document.createElement("tr");l=document.createElement("td");l.colSpan=2;
-l.style.paddingTop="20px";l.setAttribute("align","right");x=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});x.className="geBtn";a.editor.cancelFirst&&l.appendChild(x);if(PrintDialog.previewEnabled){var k=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});k.className="geBtn";l.appendChild(k)}k=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});k.className="geBtn gePrimaryBtn";l.appendChild(k);a.editor.cancelFirst||
-l.appendChild(x);d.appendChild(l);p.appendChild(d);m.appendChild(p);this.container=m};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(f){}};
+l.style.paddingTop="20px";l.setAttribute("align","right");v=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});v.className="geBtn";a.editor.cancelFirst&&l.appendChild(v);if(PrintDialog.previewEnabled){var k=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});k.className="geBtn";l.appendChild(k)}k=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});k.className="geBtn gePrimaryBtn";l.appendChild(k);a.editor.cancelFirst||
+l.appendChild(v);d.appendChild(l);p.appendChild(d);m.appendChild(p);this.container=m};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(f){}};
PrintDialog.createPrintPreview=function(a,b,f,d,l,m,p){b=new mxPrintPreview(a,b,f,d,l,m);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=p;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var u=b.writeHead;b.writeHead=function(a){u.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b};
PrintDialog.previewEnabled=!0;
var PageSetupDialog=function(a){function b(){null==c||c==mxConstants.NONE?(B.style.backgroundColor="",B.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(B.style.backgroundColor=c,B.style.backgroundImage="")}function f(){null==q?(k.removeAttribute("title"),k.style.fontSize="",k.innerHTML=mxResources.get("change")+"..."):(k.setAttribute("title",q.src),k.style.fontSize="11px",k.innerHTML=q.src.substring(0,42)+"...")}var d=a.editor.graph,l,m,p=document.createElement("table");p.style.width=
-"100%";p.style.height="100%";var u=document.createElement("tbody");l=document.createElement("tr");m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("paperSize")+":");l.appendChild(m);m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";var x=PageSetupDialog.addPageFormatPanel(m,"pagesetupdialog",d.pageFormat);l.appendChild(m);u.appendChild(l);l=document.createElement("tr");m=document.createElement("td");
+"100%";p.style.height="100%";var u=document.createElement("tbody");l=document.createElement("tr");m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("paperSize")+":");l.appendChild(m);m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";var v=PageSetupDialog.addPageFormatPanel(m,"pagesetupdialog",d.pageFormat);l.appendChild(m);u.appendChild(l);l=document.createElement("tr");m=document.createElement("td");
mxUtils.write(m,mxResources.get("background")+":");l.appendChild(m);m=document.createElement("td");m.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var B=document.createElement("button");B.style.width="18px";B.style.height="18px";B.style.marginRight="20px";B.style.backgroundPosition="center center";B.style.backgroundRepeat="no-repeat";var c=d.background;b();mxEvent.addListener(B,"click",function(e){a.pickColor(c||"none",function(a){c=a;b()});mxEvent.consume(e)});
m.appendChild(B);mxUtils.write(m,mxResources.get("gridSize")+":");var e=document.createElement("input");e.setAttribute("type","number");e.setAttribute("min","0");e.style.width="40px";e.style.marginLeft="6px";e.value=d.getGridSize();m.appendChild(e);mxEvent.addListener(e,"change",function(){var a=parseInt(e.value);e.value=Math.max(1,isNaN(a)?d.getGridSize():a)});l.appendChild(m);u.appendChild(l);l=document.createElement("tr");m=document.createElement("td");mxUtils.write(m,mxResources.get("image")+
":");l.appendChild(m);m=document.createElement("td");var k=document.createElement("a");k.style.textDecoration="underline";k.style.cursor="pointer";k.style.color="#a0a0a0";var q=d.backgroundImage;mxEvent.addListener(k,"click",function(c){a.showBackgroundImageDialog(function(a){q=a;f()});mxEvent.consume(c)});f();m.appendChild(k);l.appendChild(m);u.appendChild(l);l=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop="16px";m.setAttribute("align","right");var n=
-mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst&&m.appendChild(n);var g=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.gridSize!==e.value&&d.setGridSize(parseInt(e.value));var b=new ChangePageSetup(a,c,q,x.get());b.ignoreColor=d.background==c;b.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=q?q.src:null);d.pageFormat.width==b.previousFormat.width&&d.pageFormat.height==b.previousFormat.height&&
+mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst&&m.appendChild(n);var g=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.gridSize!==e.value&&d.setGridSize(parseInt(e.value));var b=new ChangePageSetup(a,c,q,v.get());b.ignoreColor=d.background==c;b.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=q?q.src:null);d.pageFormat.width==b.previousFormat.width&&d.pageFormat.height==b.previousFormat.height&&
b.ignoreColor&&b.ignoreImage||d.model.execute(b)});g.className="geBtn gePrimaryBtn";m.appendChild(g);a.editor.cancelFirst||m.appendChild(n);l.appendChild(m);u.appendChild(l);p.appendChild(u);this.container=p};
PageSetupDialog.addPageFormatPanel=function(a,b,f,d){function l(a,b,d){if(d||e!=document.activeElement&&k!=document.activeElement){a=!1;for(b=0;b<n.length;b++)d=n[b],t?"custom"==d.key&&(u.value=d.key,t=!1):null!=d.format&&("a4"==d.key?826==f.width?(f=mxRectangle.fromRectangle(f),f.width=827):826==f.height&&(f=mxRectangle.fromRectangle(f),f.height=827):"a5"==d.key&&(584==f.width?(f=mxRectangle.fromRectangle(f),f.width=583):584==f.height&&(f=mxRectangle.fromRectangle(f),f.height=583)),f.width==d.format.width&&
-f.height==d.format.height?(u.value=d.key,m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):f.width==d.format.height&&f.height==d.format.width&&(u.value=d.key,m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,a=p.checked=!0));a?(x.style.display="",c.style.display="none"):(e.value=f.width/100,k.value=f.height/100,m.setAttribute("checked","checked"),
-u.value="custom",x.style.display="none",c.style.display="")}}b="format-"+b;var m=document.createElement("input");m.setAttribute("name",b);m.setAttribute("type","radio");m.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",b);p.setAttribute("type","radio");p.setAttribute("value","landscape");var u=document.createElement("select");u.style.marginBottom="8px";u.style.width="202px";var x=document.createElement("div");x.style.marginLeft="4px";x.style.width="210px";
-x.style.height="24px";m.style.marginRight="6px";x.appendChild(m);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));x.appendChild(b);p.style.marginLeft="10px";p.style.marginRight="6px";x.appendChild(p);var B=document.createElement("span");B.style.width="100px";mxUtils.write(B,mxResources.get("landscape"));x.appendChild(B);var c=document.createElement("div");c.style.marginLeft="4px";c.style.width="210px";c.style.height="24px";var e=document.createElement("input");
-e.setAttribute("size","7");e.style.textAlign="right";c.appendChild(e);mxUtils.write(c," in x ");var k=document.createElement("input");k.setAttribute("size","7");k.style.textAlign="right";c.appendChild(k);mxUtils.write(c," in");x.style.display="none";c.style.display="none";for(var q={},n=PageSetupDialog.getFormats(),g=0;g<n.length;g++){var y=n[g];q[y.key]=y;var A=document.createElement("option");A.setAttribute("value",y.key);mxUtils.write(A,y.title);u.appendChild(A)}var t=!1;l();a.appendChild(u);mxUtils.br(a);
-a.appendChild(x);a.appendChild(c);var F=f,z=function(a,b){var g=q[u.value];null!=g.format?(e.value=g.format.width/100,k.value=g.format.height/100,c.style.display="none",x.style.display=""):(x.style.display="none",c.style.display="");g=parseFloat(e.value);if(isNaN(g)||0>=g)e.value=f.width/100;g=parseFloat(k.value);if(isNaN(g)||0>=g)k.value=f.height/100;g=new mxRectangle(0,0,Math.floor(100*parseFloat(e.value)),Math.floor(100*parseFloat(k.value)));"custom"!=u.value&&p.checked&&(g=new mxRectangle(0,0,
-g.height,g.width));b&&t||g.width==F.width&&g.height==F.height||(F=g,null!=d&&d(F))};mxEvent.addListener(b,"click",function(a){m.checked=!0;z(a);mxEvent.consume(a)});mxEvent.addListener(B,"click",function(a){p.checked=!0;z(a);mxEvent.consume(a)});mxEvent.addListener(e,"blur",z);mxEvent.addListener(e,"click",z);mxEvent.addListener(k,"blur",z);mxEvent.addListener(k,"click",z);mxEvent.addListener(p,"change",z);mxEvent.addListener(m,"change",z);mxEvent.addListener(u,"change",function(a){t="custom"==u.value;
-z(a,!0)});z();return{set:function(a){f=a;l(null,null,!0)},get:function(){return F},widthInput:e,heightInput:k}};
+f.height==d.format.height?(u.value=d.key,m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):f.width==d.format.height&&f.height==d.format.width&&(u.value=d.key,m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,a=p.checked=!0));a?(v.style.display="",c.style.display="none"):(e.value=f.width/100,k.value=f.height/100,m.setAttribute("checked","checked"),
+u.value="custom",v.style.display="none",c.style.display="")}}b="format-"+b;var m=document.createElement("input");m.setAttribute("name",b);m.setAttribute("type","radio");m.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",b);p.setAttribute("type","radio");p.setAttribute("value","landscape");var u=document.createElement("select");u.style.marginBottom="8px";u.style.width="202px";var v=document.createElement("div");v.style.marginLeft="4px";v.style.width="210px";
+v.style.height="24px";m.style.marginRight="6px";v.appendChild(m);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));v.appendChild(b);p.style.marginLeft="10px";p.style.marginRight="6px";v.appendChild(p);var B=document.createElement("span");B.style.width="100px";mxUtils.write(B,mxResources.get("landscape"));v.appendChild(B);var c=document.createElement("div");c.style.marginLeft="4px";c.style.width="210px";c.style.height="24px";var e=document.createElement("input");
+e.setAttribute("size","7");e.style.textAlign="right";c.appendChild(e);mxUtils.write(c," in x ");var k=document.createElement("input");k.setAttribute("size","7");k.style.textAlign="right";c.appendChild(k);mxUtils.write(c," in");v.style.display="none";c.style.display="none";for(var q={},n=PageSetupDialog.getFormats(),g=0;g<n.length;g++){var x=n[g];q[x.key]=x;var A=document.createElement("option");A.setAttribute("value",x.key);mxUtils.write(A,x.title);u.appendChild(A)}var t=!1;l();a.appendChild(u);mxUtils.br(a);
+a.appendChild(v);a.appendChild(c);var E=f,z=function(a,b){var g=q[u.value];null!=g.format?(e.value=g.format.width/100,k.value=g.format.height/100,c.style.display="none",v.style.display=""):(v.style.display="none",c.style.display="");g=parseFloat(e.value);if(isNaN(g)||0>=g)e.value=f.width/100;g=parseFloat(k.value);if(isNaN(g)||0>=g)k.value=f.height/100;g=new mxRectangle(0,0,Math.floor(100*parseFloat(e.value)),Math.floor(100*parseFloat(k.value)));"custom"!=u.value&&p.checked&&(g=new mxRectangle(0,0,
+g.height,g.width));b&&t||g.width==E.width&&g.height==E.height||(E=g,null!=d&&d(E))};mxEvent.addListener(b,"click",function(a){m.checked=!0;z(a);mxEvent.consume(a)});mxEvent.addListener(B,"click",function(a){p.checked=!0;z(a);mxEvent.consume(a)});mxEvent.addListener(e,"blur",z);mxEvent.addListener(e,"click",z);mxEvent.addListener(k,"blur",z);mxEvent.addListener(k,"click",z);mxEvent.addListener(p,"change",z);mxEvent.addListener(m,"change",z);mxEvent.addListener(u,"change",function(a){t="custom"==u.value;
+z(a,!0)});z();return{set:function(a){f=a;l(null,null,!0)},get:function(){return E},widthInput:e,heightInput:k}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,1600,900)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1920,1200)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1600,1200)},{key:"custom",title:mxResources.get("custom"),format:null}]};
@@ -2075,7 +2076,7 @@ c="url("+this.gridImage+")";var k=d=0;null!=a.view.backgroundPageShape&&(k=this.
b,a.container.className="geDiagramContainer geDiagramBackdrop",d.style.backgroundImage="none",d.style.backgroundColor=""):(a.container.className="geDiagramContainer",d.style.backgroundPosition=e,d.style.backgroundColor=b,d.style.backgroundImage=c)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var d=this.gridSteps*b,c=[],e=1;e<this.gridSteps;e++){var k=e*b;c.push("M 0 "+k+" L "+d+" "+k+" M "+k+" 0 L "+k+" "+d)}return'<svg width="'+
d+'" height="'+d+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+d+'" height="'+d+'" patternUnits="userSpaceOnUse"><path d="'+c.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+d+" 0 L 0 0 0 "+d+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,d){a.apply(this,arguments);if(null!=this.shiftPreview1){var f=
this.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);var c=this.gridSize*this.view.scale*this.view.gridSteps,c=-Math.round(c-mxUtils.mod(this.view.translate.x*this.view.scale+b,c))+"px "+-Math.round(c-mxUtils.mod(this.view.translate.y*this.view.scale+d,c))+"px";f.style.backgroundPosition=c}};mxGraph.prototype.updatePageBreaks=function(a,b,d){var c=this.view.scale,e=this.view.translate,k=this.pageFormat,f=c*this.pageScale,n=this.view.getBackgroundPageBounds();b=n.width;d=n.height;var g=
-new mxRectangle(c*e.x,c*e.y,k.width*f,k.height*f),y=(a=a&&Math.min(g.width,g.height)>this.minPageBreakDist)?Math.ceil(d/g.height)-1:0,A=a?Math.ceil(b/g.width)-1:0,t=n.x+b,l=n.y+d;null==this.horizontalPageBreaks&&0<y&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<A&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?y:A,e=0;e<=c;e++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(n.x),Math.round(n.y+(e+1)*g.height)),
+new mxRectangle(c*e.x,c*e.y,k.width*f,k.height*f),x=(a=a&&Math.min(g.width,g.height)>this.minPageBreakDist)?Math.ceil(d/g.height)-1:0,A=a?Math.ceil(b/g.width)-1:0,t=n.x+b,l=n.y+d;null==this.horizontalPageBreaks&&0<x&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<A&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?x:A,e=0;e<=c;e++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(n.x),Math.round(n.y+(e+1)*g.height)),
new mxPoint(Math.round(t),Math.round(n.y+(e+1)*g.height))]:[new mxPoint(Math.round(n.x+(e+1)*g.width),Math.round(n.y)),new mxPoint(Math.round(n.x+(e+1)*g.width),Math.round(l))];null!=a[e]?(a[e].points=b,a[e].redraw()):(b=new mxPolyline(b,this.pageBreakColor),b.dialect=this.dialect,b.isDashed=this.pageBreakDashed,b.pointerEvents=!1,b.init(this.view.backgroundPane),b.redraw(),a[e]=b)}for(e=c;e<a.length;e++)a[e].destroy();a.splice(c,a.length-c)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,d,f){for(var c=0;c<d.length;c++)if(this.graph.getModel().isVertex(d[c])){var e=this.graph.getCellGeometry(d[c]);if(null!=e&&e.relative)return!1}return b.apply(this,arguments)};var f=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=f.apply(this,arguments);a.intersects=mxUtils.bind(this,function(b,d){return this.isConnecting()?
!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,d=0<a.height?a.y/this.scale-this.translate.y:0,c=this.graph.pageFormat,e=this.graph.pageScale,k=c.width*e,c=c.height*e,e=Math.floor(Math.min(0,b)/k),f=Math.floor(Math.min(0,
@@ -2089,19 +2090,19 @@ l,this.menubarContainer.onmousedown=l,this.toolbarContainer.onselectstart=l,this
(b=function(a){if(null!=a){var c=mxEvent.getSource(a);if("A"==c.nodeName)for(;null!=c;){if("geHint"==c.className)return!0;c=c.parentNode}}return l(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):d.panningHandler.usePopupTrigger=!1;d.init(this.diagramContainer);mxClient.IS_SVG&&null!=d.view.getDrawPane()&&(b=d.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position=
"absolute"));this.hoverIcons=this.createHoverIcons();mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var c=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-c.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-c.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var m=!1,p=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=
function(a,c){return m||p.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32!=a.which||d.isEditing()?mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0):(m=!0,this.hoverIcons.reset(),d.container.style.cursor="move",d.isEditing()||mxEvent.getSource(a)!=d.container||mxEvent.consume(a))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";m=!1});mxEvent.addListener(document,"keyup",
-this.keyupHandler);var u=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return u.apply(this,arguments)||m||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var x=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return x.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&
+this.keyupHandler);var u=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return u.apply(this,arguments)||m||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var v=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return v.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&
mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var B=!1,c=null,e=null,k=null,q=mxUtils.bind(this,function(){if(null!=this.toolbar&&B!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var g=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=g}a=this.toolbar.fontMenu;g=this.toolbar.sizeMenu;if(null==k)this.toolbar.createTextToolbar();else{for(var f=
0;f<k.length;f++)this.toolbar.container.appendChild(k[f]);this.toolbar.fontMenu=c;this.toolbar.sizeMenu=e}B=d.cellEditor.isContentEditing();c=a;e=g;k=b}}),n=this,g=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){g.apply(this,arguments);q();if(d.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=d.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&
-null!=n.toolbar)){var e=c.fontFamily;"'"==e.charAt(0)&&(e=e.substring(1));"'"==e.charAt(e.length-1)&&(e=e.substring(0,e.length-1));n.toolbar.setFontName(e);n.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",c);mxEvent.addListener(d.cellEditor.textarea,"touchend",c);mxEvent.addListener(d.cellEditor.textarea,"mouseup",c);mxEvent.addListener(d.cellEditor.textarea,"keyup",c);c()}};var y=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,
-c){y.apply(this,arguments);q()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(I){}var A=d.fireMouseEvent;d.fireMouseEvent=function(a,c,e){a==mxEvent.MOUSE_DOWN&&this.container.focus();A.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,e){this.menus.createPopupMenu(a,c,e)}));mxEvent.addGestureListeners(document,
-mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var t="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),F="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){try{var c=d.view.getState(a);if(null!=c){var e=a.clone();e.style="";var b=d.getCellStyle(e);a=[];var e=[],k;for(k in c.style)b[k]!=c.style[k]&&(a.push(c.style[k]),
-e.push(k));for(var g=d.getModel().getStyle(c.cell),f=null!=g?g.split(";"):[],g=0;g<f.length;g++){var v=f[g],n=v.indexOf("=");if(0<=n){k=v.substring(0,n);var q=v.substring(n+1);null!=b[k]&&"none"==q&&(a.push(q),e.push(k))}}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",e,"values",a,"cells",[c.cell]))}}catch(G){this.handleError(G)}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);
-d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var z=["fontFamily","fontSize","fontColor"],D="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),E=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],z,["opacity"],["align"],["html"]];for(a=0;a<E.length;a++)for(b=
-0;b<E[a].length;b++)t.push(E[a][b]);for(a=0;a<F.length;a++)0>mxUtils.indexOf(t,F[a])&&t.push(F[a]);var v=function(a,c){var e=d.getModel();e.beginUpdate();try{if(c)for(var b=e.isEdge(v),k=b?d.currentEdgeStyle:d.currentVertexStyle,b=["fontSize","fontFamily","fontColor"],g=0;g<b.length;g++){var f=k[b[g]];null!=f&&d.setCellStyles(b[g],f,a)}else for(f=0;f<a.length;f++){for(var v=a[f],n=e.getStyle(v),q=null!=n?n.split(";"):[],y=t.slice(),g=0;g<q.length;g++){var l=q[g],A=l.indexOf("=");if(0<=A){var I=l.substring(0,
-A),O=mxUtils.indexOf(y,I);0<=O&&y.splice(O,1);for(var V=0;V<E.length;V++){var z=E[V];if(0<=mxUtils.indexOf(z,I))for(var m=0;m<z.length;m++){var u=mxUtils.indexOf(y,z[m]);0<=u&&y.splice(u,1)}}}}for(var k=(b=e.isEdge(v))?d.currentEdgeStyle:d.currentVertexStyle,p=e.getStyle(v),g=0;g<y.length;g++){var I=y[g],D=k[I];null==D||"shape"==I&&!b||b&&!(0>mxUtils.indexOf(F,I))||(p=mxUtils.setStyle(p,I,D))}e.setStyle(v,p)}}finally{e.endUpdate()}};d.addListener("cellsInserted",function(a,c){v(c.getProperty("cells"))});
-d.addListener("textInserted",function(a,c){v(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,c){var e=[c.getProperty("cell")];c.getProperty("terminalInserted")&&e.push(c.getProperty("terminal"));v(e)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var e=c.getProperty("cells"),b=!1,k=!1;if(0<e.length)for(var g=0;g<e.length&&(b=d.getModel().isVertex(e[g])||b,!(k=d.getModel().isEdge(e[g])||k)||!b);g++);else k=b=!0;for(var e=c.getProperty("keys"),
-f=c.getProperty("values"),g=0;g<e.length;g++){var v=0<=mxUtils.indexOf(z,e[g]);if("strokeColor"!=e[g]||null!=f[g]&&"none"!=f[g])if(0<=mxUtils.indexOf(F,e[g]))k||0<=mxUtils.indexOf(D,e[g])?null==f[g]?delete d.currentEdgeStyle[e[g]]:d.currentEdgeStyle[e[g]]=f[g]:b&&0<=mxUtils.indexOf(t,e[g])&&(null==f[g]?delete d.currentVertexStyle[e[g]]:d.currentVertexStyle[e[g]]=f[g]);else if(0<=mxUtils.indexOf(t,e[g])){if(b||v)null==f[g]?delete d.currentVertexStyle[e[g]]:d.currentVertexStyle[e[g]]=f[g];if(k||v||
-0<=mxUtils.indexOf(D,e[g]))null==f[g]?delete d.currentEdgeStyle[e[g]]:d.currentEdgeStyle[e[g]]=f[g]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":
+null!=n.toolbar)){var e=c.fontFamily;"'"==e.charAt(0)&&(e=e.substring(1));"'"==e.charAt(e.length-1)&&(e=e.substring(0,e.length-1));n.toolbar.setFontName(e);n.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",c);mxEvent.addListener(d.cellEditor.textarea,"touchend",c);mxEvent.addListener(d.cellEditor.textarea,"mouseup",c);mxEvent.addListener(d.cellEditor.textarea,"keyup",c);c()}};var x=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,
+c){x.apply(this,arguments);q()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(I){}var A=d.fireMouseEvent;d.fireMouseEvent=function(a,c,e){a==mxEvent.MOUSE_DOWN&&this.container.focus();A.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,e){this.menus.createPopupMenu(a,c,e)}));mxEvent.addGestureListeners(document,
+mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var t="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),E="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){try{var c=d.view.getState(a);if(null!=c){var e=a.clone();e.style="";var b=d.getCellStyle(e);a=[];var e=[],k;for(k in c.style)b[k]!=c.style[k]&&(a.push(c.style[k]),
+e.push(k));for(var g=d.getModel().getStyle(c.cell),f=null!=g?g.split(";"):[],g=0;g<f.length;g++){var n=f[g],q=n.indexOf("=");if(0<=q){k=n.substring(0,q);var y=n.substring(q+1);null!=b[k]&&"none"==y&&(a.push(y),e.push(k))}}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",e,"values",a,"cells",[c.cell]))}}catch(F){this.handleError(F)}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);
+d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var z=["fontFamily","fontSize","fontColor"],G="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),D=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],z,["opacity"],["align"],["html"]];for(a=0;a<D.length;a++)for(b=
+0;b<D[a].length;b++)t.push(D[a][b]);for(a=0;a<E.length;a++)0>mxUtils.indexOf(t,E[a])&&t.push(E[a]);var y=function(a,c){var e=d.getModel();e.beginUpdate();try{if(c)for(var b=e.isEdge(n),k=b?d.currentEdgeStyle:d.currentVertexStyle,b=["fontSize","fontFamily","fontColor"],g=0;g<b.length;g++){var f=k[b[g]];null!=f&&d.setCellStyles(b[g],f,a)}else for(f=0;f<a.length;f++){for(var n=a[f],q=e.getStyle(n),y=null!=q?q.split(";"):[],O=t.slice(),g=0;g<y.length;g++){var x=y[g],A=x.indexOf("=");if(0<=A){var l=x.substring(0,
+A),Q=mxUtils.indexOf(O,l);0<=Q&&O.splice(Q,1);for(var z=0;z<D.length;z++){var I=D[z];if(0<=mxUtils.indexOf(I,l))for(var m=0;m<I.length;m++){var u=mxUtils.indexOf(O,I[m]);0<=u&&O.splice(u,1)}}}}for(var k=(b=e.isEdge(n))?d.currentEdgeStyle:d.currentVertexStyle,p=e.getStyle(n),g=0;g<O.length;g++){var l=O[g],G=k[l];null==G||"shape"==l&&!b||b&&!(0>mxUtils.indexOf(E,l))||(p=mxUtils.setStyle(p,l,G))}e.setStyle(n,p)}}finally{e.endUpdate()}};d.addListener("cellsInserted",function(a,c){y(c.getProperty("cells"))});
+d.addListener("textInserted",function(a,c){y(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,c){var e=[c.getProperty("cell")];c.getProperty("terminalInserted")&&e.push(c.getProperty("terminal"));y(e)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var e=c.getProperty("cells"),b=!1,k=!1;if(0<e.length)for(var g=0;g<e.length&&(b=d.getModel().isVertex(e[g])||b,!(k=d.getModel().isEdge(e[g])||k)||!b);g++);else k=b=!0;for(var e=c.getProperty("keys"),
+f=c.getProperty("values"),g=0;g<e.length;g++){var n=0<=mxUtils.indexOf(z,e[g]);if("strokeColor"!=e[g]||null!=f[g]&&"none"!=f[g])if(0<=mxUtils.indexOf(E,e[g]))k||0<=mxUtils.indexOf(G,e[g])?null==f[g]?delete d.currentEdgeStyle[e[g]]:d.currentEdgeStyle[e[g]]=f[g]:b&&0<=mxUtils.indexOf(t,e[g])&&(null==f[g]?delete d.currentVertexStyle[e[g]]:d.currentVertexStyle[e[g]]=f[g]);else if(0<=mxUtils.indexOf(t,e[g])){if(b||n)null==f[g]?delete d.currentVertexStyle[e[g]]:d.currentVertexStyle[e[g]]=f[g];if(k||n||
+0<=mxUtils.indexOf(G,e[g]))null==f[g]?delete d.currentEdgeStyle[e[g]]:d.currentEdgeStyle[e[g]]=f[g]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":
"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):
"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",d.currentEdgeStyle.shape,
d.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(d.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(d.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var a=d.currentVertexStyle.fontFamily||"Helvetica",c=String(d.currentVertexStyle.fontSize||
@@ -2123,32 +2124,34 @@ EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipb
0),k=0;k<m.length;k++)c.add(e,m[k]);b.updateCustomLinks(b.createCellMapping(f,l),m);mxClipboard.insertCount=1;mxClipboard.setCells(m)}a.updatePasteActionStates();return d};var f=mxClipboard.paste;mxClipboard.paste=function(b){var d=null;b.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):d=f.apply(this,arguments);a.updatePasteActionStates();return d};var d=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){d.apply(this,arguments);a.updatePasteActionStates()};
var l=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,d){l.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;
EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),c=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*c.width),this.scale*(this.translate.y+a.y*c.height),this.scale*a.width*c.width,
-this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,e){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(c,e,b,d){if(null!=a.container&&!a.isViewer()){b=null!=b?b:0;d=null!=d?d:0;var k=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),g=mxUtils.hasScrollbars(a.container),f=a.view.translate,n=a.view.scale,v=mxRectangle.fromRectangle(k);
-v.x=v.x/n-f.x;v.y=v.y/n-f.y;v.width/=n;v.height/=n;var f=a.container.scrollTop,q=a.container.scrollLeft,t=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)t+=3;var y=a.container.offsetWidth-t,t=a.container.offsetHeight-t;c=c?Math.max(.3,Math.min(e||1,y/v.width)):n;e=(y-c*v.width)/2/c;var l=0==this.lightboxVerticalDivider?0:(t-c*v.height)/this.lightboxVerticalDivider/c;g&&(e=Math.max(e,0),l=Math.max(l,0));if(g||k.width<y||k.height<t)a.view.scaleAndTranslate(c,
-Math.floor(e-v.x),Math.floor(l-v.y)),a.container.scrollTop=f*c/n,a.container.scrollLeft=q*c/n;else if(0!=b||0!=d)k=a.view.translate,a.view.setTranslate(Math.floor(k.x+b/n),Math.floor(k.y+d/n))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView",
+this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,e){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(c,e,b,d){if(null!=a.container&&!a.isViewer()){b=null!=b?b:0;d=null!=d?d:0;var k=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),g=mxUtils.hasScrollbars(a.container),f=a.view.translate,n=a.view.scale,q=mxRectangle.fromRectangle(k);
+q.x=q.x/n-f.x;q.y=q.y/n-f.y;q.width/=n;q.height/=n;var f=a.container.scrollTop,y=a.container.scrollLeft,C=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)C+=3;var t=a.container.offsetWidth-C,C=a.container.offsetHeight-C;c=c?Math.max(.3,Math.min(e||1,t/q.width)):n;e=(t-c*q.width)/2/c;var x=0==this.lightboxVerticalDivider?0:(C-c*q.height)/this.lightboxVerticalDivider/c;g&&(e=Math.max(e,0),x=Math.max(x,0));if(g||k.width<t||k.height<C)a.view.scaleAndTranslate(c,
+Math.floor(e-q.x),Math.floor(x-q.y)),a.container.scrollTop=f*c/n,a.container.scrollLeft=y*c/n;else if(0!=b||0!=d)k=a.view.translate,a.view.setTranslate(Math.floor(k.x+b/n),Math.floor(k.y+d/n))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView",
mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(c){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(c){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var l=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";
this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var m=mxUtils.bind(this,function(){var c=
mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=c?parseInt(c["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",m);m();var p=0,m=mxUtils.bind(this,function(a,c,e){p++;var b=document.createElement("span");b.style.paddingLeft="8px";b.style.paddingRight="8px";b.style.cursor="pointer";mxEvent.addListener(b,"click",a);null!=e&&b.setAttribute("title",
-e);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",c);b.appendChild(a);this.chromelessToolbar.appendChild(b);return b});null!=l.backBtn&&m(mxUtils.bind(this,function(a){window.location.href=l.backBtn.url;mxEvent.consume(a)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));var u=m(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),x=document.createElement("div");
-x.style.display="inline-block";x.style.verticalAlign="top";x.style.fontFamily="Helvetica,Arial";x.style.marginTop="8px";x.style.fontSize="14px";x.style.color="#ffffff";this.chromelessToolbar.appendChild(x);var B=m(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(x.innerHTML="",mxUtils.write(x,mxUtils.indexOf(this.pages,
-this.currentPage)+1+" / "+this.pages.length))});u.style.paddingLeft="0px";u.style.paddingRight="4px";B.style.paddingLeft="4px";B.style.paddingRight="0px";var e=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(B.style.display="",u.style.display="",x.style.display="inline-block"):(B.style.display="none",u.style.display="none",x.style.display="none");c()});this.editor.addListener("resetGraphView",e);this.editor.addListener("pageSelected",c);m(mxUtils.bind(this,
+e);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",c);b.appendChild(a);this.chromelessToolbar.appendChild(b);return b});null!=l.backBtn&&m(mxUtils.bind(this,function(a){window.location.href=l.backBtn.url;mxEvent.consume(a)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));var u=m(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),v=document.createElement("div");
+v.style.display="inline-block";v.style.verticalAlign="top";v.style.fontFamily="Helvetica,Arial";v.style.marginTop="8px";v.style.fontSize="14px";v.style.color="#ffffff";this.chromelessToolbar.appendChild(v);var B=m(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(v.innerHTML="",mxUtils.write(v,mxUtils.indexOf(this.pages,
+this.currentPage)+1+" / "+this.pages.length))});u.style.paddingLeft="0px";u.style.paddingRight="4px";B.style.paddingLeft="4px";B.style.paddingRight="0px";var e=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(B.style.display="",u.style.display="",v.style.display="inline-block"):(B.style.display="none",u.style.display="none",v.style.display="none");c()});this.editor.addListener("resetGraphView",e);this.editor.addListener("pageSelected",c);m(mxUtils.bind(this,
function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(c){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage,
mxResources.get("fit"));var k=null,q=null,n=mxUtils.bind(this,function(a){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=q&&(window.clearTimeout(q),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);k=null;q=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";q=null}),600)}),a||200)}),g=mxUtils.bind(this,function(a){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=q&&(window.clearTimeout(q),
-fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var y=m(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=
-null}));var e=y.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=e.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
-this.chromelessToolbar.offsetHeight+4+"px";e=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=e.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),A=a.getModel();A.addListener(mxEvent.CHANGE,function(){y.style.display=1<A.getChildCount(A.root)?"":"none"})}this.addChromelessToolbarItems(m);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||m(mxUtils.bind(this,function(c){null!=
+fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var x=m(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=
+null}));var e=x.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=e.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
+this.chromelessToolbar.offsetHeight+4+"px";e=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=e.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),A=a.getModel();A.addListener(mxEvent.CHANGE,function(){x.style.display=1<A.getChildCount(A.root)?"":"none"})}this.addChromelessToolbarItems(m);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||m(mxUtils.bind(this,function(c){null!=
this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(c)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(e=0;e<this.lightboxToolbarActions.length;e++){var t=this.lightboxToolbarActions[e];m(t.fn,t.icon,t.tooltip)}null!=l.refreshBtn&&m(mxUtils.bind(this,function(a){l.refreshBtn.url?window.location.href=l.refreshBtn.url:
window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=l.fullscreenBtn&&window.self!==window.top&&m(mxUtils.bind(this,function(c){l.fullscreenBtn.url?a.openLink(l.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(c)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(l.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&m(mxUtils.bind(this,
function(a){"1"==urlParams.close||l.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||
g(30),n())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?n():g(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?n():g(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||
-g(30)}));var F=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,e){this.startX=e.getGraphX();this.startY=e.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,e){mxEvent.isTouchEvent(e.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<F&&Math.abs(this.scrollTop-a.container.scrollTop)<F&&Math.abs(this.startX-e.getGraphX())<F&&Math.abs(this.startY-e.getGraphY())<
-F&&(0<parseFloat(f.chromelessToolbar.style.opacity||0)?n():g(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var z=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=a.y-(this.y0||0)*c.height}z.apply(this,arguments)};if(!a.isViewer()){var D=a.sizeDidChange;a.sizeDidChange=
-function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),e=this.getPagePadding(),b=this.getPageSize(),d=Math.ceil(2*e.x+c.width*b.width),k=Math.ceil(2*e.y+c.height*b.height),g=a.minimumGraphSize;if(null==g||g.width!=d||g.height!=k)a.minimumGraphSize=new mxRectangle(0,0,d,k);d=e.x-c.x*b.width;e=e.y-c.y*b.height;this.autoTranslate||this.view.translate.x==d&&this.view.translate.y==e?D.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=
-c.y,c=a.view.translate.x,b=a.view.translate.y,a.view.setTranslate(d,e),a.container.scrollLeft+=Math.round((d-c)*a.view.scale),a.container.scrollTop+=Math.round((e-b)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var E=null;a.lazyZoom=function(c){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);c?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=
-(this.view.scale+.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*
-this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var c=mxUtils.getOffset(a.container),e=0,d=0;null!=E&&(e=a.container.offsetWidth/2-E.x+c.x,d=a.container.offsetHeight/2-E.y+c.y);c=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=c&&(null!=b&&f.chromelessResize(!1,null,e*(this.cumulativeZoomFactor-1),d*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==e&&0==d||(a.container.scrollLeft-=e*(this.cumulativeZoomFactor-
-1),a.container.scrollTop-=d*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),this.lazyZoomDelay)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,e){if((null==this.dialogs||0==this.dialogs.length)&&a.isZoomWheelEvent(c))for(var b=mxEvent.getSource(c);null!=b;){if(b==a.container)return E=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c)),a.lazyZoom(e),mxEvent.consume(c),!1;b=b.parentNode}}),a.container)};
-EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};
+g(30)}));var E=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,e){this.startX=e.getGraphX();this.startY=e.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,e){mxEvent.isTouchEvent(e.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<E&&Math.abs(this.scrollTop-a.container.scrollTop)<E&&Math.abs(this.startX-e.getGraphX())<E&&Math.abs(this.startY-e.getGraphY())<
+E&&(0<parseFloat(f.chromelessToolbar.style.opacity||0)?n():g(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var z=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=a.y-(this.y0||0)*c.height}z.apply(this,arguments)};if(!a.isViewer()){var G=a.sizeDidChange;a.sizeDidChange=
+function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),e=this.getPagePadding(),b=this.getPageSize(),d=Math.ceil(2*e.x+c.width*b.width),k=Math.ceil(2*e.y+c.height*b.height),g=a.minimumGraphSize;if(null==g||g.width!=d||g.height!=k)a.minimumGraphSize=new mxRectangle(0,0,d,k);d=e.x-c.x*b.width;e=e.y-c.y*b.height;this.autoTranslate||this.view.translate.x==d&&this.view.translate.y==e?G.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=
+c.y,c=a.view.translate.x,b=a.view.translate.y,a.view.setTranslate(d,e),a.container.scrollLeft+=Math.round((d-c)*a.view.scale),a.container.scrollTop+=Math.round((e-b)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var D=null,y=a.view.getDrawPane(),I=a.view.getBackgroundPane();a.lazyZoom=function(c,e){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);
+c?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);
+if("fast"==urlParams.zoom){var d=e?a.container.scrollWidth/2:D.x+a.container.scrollLeft-a.container.offsetLeft,k=e?a.container.scrollHeight/2:D.y+a.container.scrollTop-a.container.offsetTop;y.setAttribute("transform-origin",d+" "+k);y.setAttribute("transform","scale("+this.cumulativeZoomFactor+")");I.setAttribute("transform-origin",d+" "+k);I.setAttribute("transform","scale("+this.cumulativeZoomFactor+")");k=a.view.backgroundPageShape.node;mxUtils.setPrefixedStyle(k.style,"transform-origin",e?"50%":
+D.x+a.container.offsetLeft-k.offsetLeft+"px "+e?"50%":D.y-k.offsetTop+"px");mxUtils.setPrefixedStyle(k.style,"transform","scale("+this.cumulativeZoomFactor+")");a.view.getOverlayPane().style.opacity="0";a.view.getDecoratorPane().style.opacity="0";console.log("here",this.cumulativeZoomFactor,d,k.offsetLeft,k.offsetWidth)}this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){"fast"==
+urlParams.zoom&&(y.removeAttribute("transform-origin"),y.removeAttribute("transform"),I.removeAttribute("transform-origin"),I.removeAttribute("transform"),a.view.getOverlayPane().style.opacity="",a.view.getDecoratorPane().style.opacity="",mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null));var c=mxUtils.getOffset(a.container),e=0,d=0;null!=D&&(e=a.container.offsetWidth/2-D.x+c.x,d=
+a.container.offsetHeight/2-D.y+c.y);c=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=c&&(null!=b&&f.chromelessResize(!1,null,e*(this.cumulativeZoomFactor-1),d*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==e&&0==d||(a.container.scrollLeft-=e*(this.cumulativeZoomFactor-1),a.container.scrollTop-=d*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),"fast"==urlParams.zoom?500:this.lazyZoomDelay)};mxEvent.addMouseWheelListener(mxUtils.bind(this,
+function(c,e){if((null==this.dialogs||0==this.dialogs.length)&&a.isZoomWheelEvent(c))for(var b=mxEvent.getSource(c);null!=b;){if(b==a.container)return D=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c)),a.lazyZoom(e),mxEvent.consume(c),!1;b=b.parentNode}}),a.container)};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};
EditorUi.prototype.createTemporaryGraph=function(a){a=new Graph(document.createElement("div"),null,null,a);a.resetViewOnRootChange=!1;a.setConnectable(!1);a.gridEnabled=!1;a.autoScroll=!1;a.setTooltips(!1);a.setEnabled(!1);a.container.style.visibility="hidden";a.container.style.position="absolute";a.container.style.overflow="hidden";a.container.style.height="1px";a.container.style.width="1px";return a};
EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){null!=this.format&&(this.formatWidth=a||0<this.formatWidth?0:240,this.formatContainer.style.display=a||0<this.formatWidth?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var b=urlParams.border,f=60;null!=b&&(f=parseInt(b));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(f,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))};
@@ -2180,11 +2183,11 @@ this.actions.get("collapsible").setEnabled(f&&(a.isContainer(a.getSelectionCell(
this.actions.get("editLink").setEnabled(1==a.getSelectionCount());this.actions.get("openLink").setEnabled(1==a.getSelectionCount()&&null!=a.getLinkForCell(a.getSelectionCell()));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);b=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(b);this.menus.get("insert").setEnabled(b);this.menus.get("direction").setEnabled(b&&f);this.menus.get("align").setEnabled(b&&
f&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(b&&f&&1<a.getSelectionCount());this.actions.get("selectVertices").setEnabled(b);this.actions.get("selectEdges").setEnabled(b);this.actions.get("selectAll").setEnabled(b);this.actions.get("selectNone").setEnabled(b);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),f=this.container.clientWidth,d=this.container.clientHeight;this.container==document.body&&(f=document.body.clientWidth||document.documentElement.clientWidth,d=b?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var l=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&
-(l=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var m=Math.max(0,Math.min(this.hsplitPosition,f-this.splitSize-20)),p=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",p+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",p+=this.toolbarHeight);0<p&&!mxClient.IS_QUIRKS&&(p+=1);var u=0;if(null!=this.sidebarFooterContainer){var x=
-this.footerHeight+l,u=Math.max(0,Math.min(d-p-x,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=m+"px";this.sidebarFooterContainer.style.height=u+"px";this.sidebarFooterContainer.style.bottom=x+"px"}x=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=p+"px";this.sidebarContainer.style.width=m+"px";this.formatContainer.style.top=p+"px";this.formatContainer.style.width=x+"px";this.formatContainer.style.display=null!=this.format?"":"none";var B=this.getDiagramContainerOffset(),
+(l=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var m=Math.max(0,Math.min(this.hsplitPosition,f-this.splitSize-20)),p=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",p+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",p+=this.toolbarHeight);0<p&&!mxClient.IS_QUIRKS&&(p+=1);var u=0;if(null!=this.sidebarFooterContainer){var v=
+this.footerHeight+l,u=Math.max(0,Math.min(d-p-v,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=m+"px";this.sidebarFooterContainer.style.height=u+"px";this.sidebarFooterContainer.style.bottom=v+"px"}v=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=p+"px";this.sidebarContainer.style.width=m+"px";this.formatContainer.style.top=p+"px";this.formatContainer.style.width=v+"px";this.formatContainer.style.display=null!=this.format?"":"none";var B=this.getDiagramContainerOffset(),
c=null!=this.hsplit.parentNode?m+this.splitSize:0;this.diagramContainer.style.left=c+B.x+"px";this.diagramContainer.style.top=p+B.y+"px";this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+l+"px";this.hsplit.style.left=m+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=c+"px");b?(this.menubarContainer.style.width=f+"px",
-this.toolbarContainer.style.width=this.menubarContainer.style.width,b=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-u+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,f-m-this.splitSize-x)+"px":f+"px",this.footerContainer.style.width=this.menubarContainer.style.width,u=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=
-this.diagramContainer.style.width,this.tabContainer.style.bottom=this.footerHeight+l+"px",u-=this.tabContainer.clientHeight),this.diagramContainer.style.height=u+"px",this.hsplit.style.height=u+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=l+"px"),this.diagramContainer.style.right=x+"px",f=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+l+"px",this.tabContainer.style.right=this.diagramContainer.style.right,f=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=
+this.toolbarContainer.style.width=this.menubarContainer.style.width,b=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-u+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,f-m-this.splitSize-v)+"px":f+"px",this.footerContainer.style.width=this.menubarContainer.style.width,u=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=
+this.diagramContainer.style.width,this.tabContainer.style.bottom=this.footerHeight+l+"px",u-=this.tabContainer.clientHeight),this.diagramContainer.style.height=u+"px",this.hsplit.style.height=u+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=l+"px"),this.diagramContainer.style.right=v+"px",f=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+l+"px",this.tabContainer.style.right=this.diagramContainer.style.right,f=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=
this.footerHeight+u+l+"px",this.formatContainer.style.bottom=this.footerHeight+l+"px",this.diagramContainer.style.bottom=this.footerHeight+l+f+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
@@ -2194,10 +2197,10 @@ this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContaine
this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,
!0,0,mxUtils.bind(this,function(a){this.hsplitPosition=a;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var a=document.createElement("a");a.className="geItem geStatus";420>screen.width&&(a.style.maxWidth=Math.max(20,screen.width-320)+"px",a.style.overflow="hidden");return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a};EditorUi.prototype.createToolbar=function(a){return new Toolbar(this,a)};
EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorUi.prototype.createFormat=function(a){return new Format(this,a)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(a){var b=document.createElement("div");b.className=a;return b};
-EditorUi.prototype.addSplitHandler=function(a,b,f,d){function l(a){if(null!=p){var e=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,u+(b?e.x-p.x:p.y-e.y)-f));mxEvent.consume(a);u!=c()&&(x=!0,B=null)}}function m(a){l(a);p=u=null}var p=null,u=null,x=!0,B=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var c=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+f-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a),
-mxEvent.getClientY(a));u=c();x=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!x&&this.hsplitClickEnabled){var e=null!=B?B-f:0;B=c();d(e);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,l,m);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,l,m)})};
+EditorUi.prototype.addSplitHandler=function(a,b,f,d){function l(a){if(null!=p){var e=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,u+(b?e.x-p.x:p.y-e.y)-f));mxEvent.consume(a);u!=c()&&(v=!0,B=null)}}function m(a){l(a);p=u=null}var p=null,u=null,v=!0,B=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var c=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+f-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a),
+mxEvent.getClientY(a));u=c();v=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!v&&this.hsplitClickEnabled){var e=null!=B?B-f:0;B=c();d(e);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,l,m);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,l,m)})};
EditorUi.prototype.handleError=function(a,b,f,d,l){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){l=mxUtils.htmlEntities(mxResources.get("unknownError"));var m=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(l=mxUtils.htmlEntities(a.message));this.showError(b,l,m,f,null,null,null,null,null,null,null,null,d?f:null)}else null!=f&&f()};
-EditorUi.prototype.showError=function(a,b,f,d,l,m,p,u,x,B,c,e,k){a=new ErrorDialog(this,a,b,f||mxResources.get("ok"),d,l,m,p,e,u,x);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,B||340,c||100+20*b,!0,!1,k);a.init()};EditorUi.prototype.showDialog=function(a,b,f,d,l,m,p,u,x,B){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,f,d,l,m,p,u,x,B);this.dialogs.push(this.dialog)};
+EditorUi.prototype.showError=function(a,b,f,d,l,m,p,u,v,B,c,e,k){a=new ErrorDialog(this,a,b,f||mxResources.get("ok"),d,l,m,p,e,u,v);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,B||340,c||100+20*b,!0,!1,k);a.init()};EditorUi.prototype.showDialog=function(a,b,f,d,l,m,p,u,v,B){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,f,d,l,m,p,u,v,B);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(a,b){if(null!=this.dialogs&&0<this.dialogs.length){var f=this.dialogs.pop();0==f.close(a,b)?this.dialogs.push(f):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?this.editor.graph.cellEditor.textarea.focus():
(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0))}};EditorUi.prototype.pickColor=function(a,b){var f=this.editor.graph,d=f.cellEditor.saveSelection(),l=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),m=new ColorDialog(this,a||"none",function(a){f.cellEditor.restoreSelection(d);b(a)},function(){f.cellEditor.restoreSelection(d)});this.showDialog(m.container,230,l,!0,!1);m.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
@@ -2215,8 +2218,8 @@ EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.gra
EditorUi.prototype.createKeyHandler=function(a){function b(a,c,b){p.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(c=null!=c?c:1,b){d.getModel().beginUpdate();try{for(var e=d.getSelectionCells(),k=0;k<e.length;k++)if(d.getModel().isVertex(e[k])&&d.isCellResizable(e[k])){var f=d.getCellGeometry(e[k]);null!=f&&(f=f.clone(),37==a?f.width=Math.max(0,f.width-c):38==a?f.height=Math.max(0,f.height-c):39==a?f.width+=c:40==a&&(f.height+=c),d.getModel().setGeometry(e[k],f))}}finally{d.getModel().endUpdate()}}else e=
d.getSelectionCell(),k=d.model.getParent(e),f=null,1==d.getSelectionCount()&&d.model.isVertex(e)&&null!=d.layoutManager&&!d.isCellLocked(e)&&(f=d.layoutManager.getLayout(k)),null!=f&&f.constructor==mxStackLayout?(f=k.getIndex(e),37==a||38==a?d.model.add(k,e,Math.max(0,f-1)):39!=a&&40!=a||d.model.add(k,e,Math.min(d.model.getChildCount(k),f+1))):(k=e=0,37==a?e=-c:38==a?k=-c:39==a?e=c:40==a&&(k=c),d.moveCells(d.getMovableCells(d.getSelectionCells()),e,k))});null!=u&&window.clearTimeout(u);u=window.setTimeout(function(){if(0<
p.length){d.getModel().beginUpdate();try{for(var a=0;a<p.length;a++)p[a]();p=[]}finally{d.getModel().endUpdate()}d.scrollCellToVisible(d.getSelectionCell())}},200)}var f=this,d=this.editor.graph,l=new mxKeyHandler(d),m=l.isEventIgnored;l.isEventIgnored=function(a){return(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&
-!mxClient.IS_SF)&&m.apply(this,arguments)};l.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==f.dialogs||0==f.dialogs.length)};l.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var p=[],u=null,x={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},B=l.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&&
-mxEvent.isAltDown(a)){var c=f.actions.get(f.altShiftActions[a.keyCode]);if(null!=c)return c.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){d.selectParentCell()}:function(){d.selectChildCell()};if(null!=x[a.keyCode]&&!d.isSelectionEmpty())if(!this.isControlDown(a)&&mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(d.model.isVertex(d.getSelectionCell()))return function(){var c=d.connectVertex(d.getSelectionCell(),x[a.keyCode],d.defaultEdgeLength,a,!0);null!=c&&0<
+!mxClient.IS_SF)&&m.apply(this,arguments)};l.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==f.dialogs||0==f.dialogs.length)};l.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var p=[],u=null,v={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},B=l.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&&
+mxEvent.isAltDown(a)){var c=f.actions.get(f.altShiftActions[a.keyCode]);if(null!=c)return c.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){d.selectParentCell()}:function(){d.selectChildCell()};if(null!=v[a.keyCode]&&!d.isSelectionEmpty())if(!this.isControlDown(a)&&mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(d.model.isVertex(d.getSelectionCell()))return function(){var c=d.connectVertex(d.getSelectionCell(),v[a.keyCode],d.defaultEdgeLength,a,!0);null!=c&&0<
c.length&&(1==c.length&&d.model.isEdge(c[0])?d.setSelectionCell(d.model.getTerminal(c[0],!1)):d.setSelectionCell(c[c.length-1]),d.scrollCellToVisible(d.getSelectionCell()),null!=f.hoverIcons&&f.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return B.apply(this,arguments)};l.bindAction=mxUtils.bind(this,function(a,c,b,d){var e=
this.actions.get(b);null!=e&&(b=function(){e.isEnabled()&&e.funct()},c?d?l.bindControlShiftKey(a,b):l.bindControlKey(a,b):d?l.bindShiftKey(a,b):l.bindKey(a,b))});var c=l.escape;l.escape=function(a){c.apply(this,arguments)};l.enter=function(){};l.bindControlShiftKey(36,function(){d.exitGroup()});l.bindControlShiftKey(35,function(){d.enterGroup()});l.bindKey(36,function(){d.home()});l.bindKey(35,function(){d.refresh()});l.bindAction(107,!0,"zoomIn");l.bindAction(109,!0,"zoomOut");l.bindAction(80,!0,
"print");l.bindAction(79,!0,"outline",!0);l.bindAction(112,!1,"about");if(!this.editor.chromeless||this.editor.editable)l.bindControlKey(36,function(){d.isEnabled()&&d.foldCells(!0)}),l.bindControlKey(35,function(){d.isEnabled()&&d.foldCells(!1)}),l.bindControlKey(13,function(){d.isEnabled()&&d.setSelectionCells(d.duplicateCells(d.getSelectionCells(),!1))}),l.bindAction(8,!1,"delete"),l.bindAction(8,!0,"deleteAll"),l.bindAction(46,!1,"delete"),l.bindAction(46,!0,"deleteAll"),l.bindAction(72,!0,"resetView"),
@@ -2231,26 +2234,26 @@ mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHAD
mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;
mxGraphView.prototype.unit=mxConstants.POINTS;mxGraphView.prototype.setUnit=function(a){this.unit!=a&&(this.unit=a,this.fireEvent(new mxEventObject("unitChanged","unit",a)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(a,b,f){return null};
Graph=function(a,b,f,d,l,m){mxGraph.call(this,a,b,f,d);this.themes=l||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=m?m:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){var c=this.view.getState(a);a=
-null!=c?c.style:this.getCellStyle(a);return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var p=null,u=null,x=null,B=null,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var e=b.getProperty("event");if(!mxEvent.isControlDown(e.getEvent())&&!mxEvent.isShiftDown(e.getEvent())){var d=e.getState();null!=d&&this.model.isEdge(d.cell)&&(p=new mxPoint(e.getGraphX(),e.getGraphY()),
-c=this.isCellSelected(d.cell),x=d,u=e,null!=d.text&&null!=d.text.boundingBox&&mxUtils.contains(d.text.boundingBox,e.getGraphX(),e.getGraphY())?B=mxEvent.LABEL_HANDLE:(d=this.selectionCellsHandler.getHandler(d.cell),null!=d&&null!=d.bends&&0<d.bends.length&&(B=d.getHandleForEvent(e))))}}}));this.addMouseListener({mouseDown:function(a,c){},mouseMove:mxUtils.bind(this,function(a,e){var b=this.selectionCellsHandler.handlers.map,d;for(d in b)if(null!=b[d].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&
-!mxEvent.isControlDown(e.getEvent())&&!mxEvent.isShiftDown(e.getEvent())&&!mxEvent.isAltDown(e.getEvent()))if(d=this.tolerance,null!=p&&null!=x&&null!=u){if(b=x,Math.abs(p.x-e.getGraphX())>d||Math.abs(p.y-e.getGraphY())>d){this.isCellSelected(b.cell)||this.setSelectionCell(b.cell);var k=this.selectionCellsHandler.getHandler(b.cell);if(null!=k&&null!=k.bends&&0<k.bends.length){var g=k.getHandleForEvent(u),f=this.view.getEdgeStyle(b);d=f==mxEdgeStyle.EntityRelation;c||B!=mxEvent.LABEL_HANDLE||(g=B);
-if(d&&0!=g&&g!=k.bends.length-1&&g!=mxEvent.LABEL_HANDLE)!d||null==b.visibleSourceState&&null==b.visibleTargetState||(this.graphHandler.reset(),e.consume());else if(g==mxEvent.LABEL_HANDLE||0==g||null!=b.visibleSourceState||g==k.bends.length-1||null!=b.visibleTargetState)d||g==mxEvent.LABEL_HANDLE||(d=b.absolutePoints,null!=d&&(null==f&&null==g||f==mxEdgeStyle.OrthConnector)&&(g=B,null==g&&(g=new mxRectangle(p.x,p.y),g.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(g,d[0].x,d[0].y)?
-g=0:mxUtils.contains(g,d[d.length-1].x,d[d.length-1].y)?g=k.bends.length-1:null!=f&&(2==d.length||3==d.length&&(0==Math.round(d[0].x-d[1].x)&&0==Math.round(d[1].x-d[2].x)||0==Math.round(d[0].y-d[1].y)&&0==Math.round(d[1].y-d[2].y)))?g=2:(g=mxUtils.findNearestSegment(b,p.x,p.y),g=null==f?mxEvent.VIRTUAL_HANDLE-g:g+1))),null==g&&(g=mxEvent.VIRTUAL_HANDLE)),k.start(e.getGraphX(),e.getGraphX(),g),B=p=u=x=null,c=!1,e.consume(),this.graphHandler.reset()}}}else if(b=e.getState(),null!=b&&this.model.isEdge(b.cell)){k=
-null;d=b.absolutePoints;if(null!=d)if(g=new mxRectangle(e.getGraphX(),e.getGraphY()),g.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=b.text&&null!=b.text.boundingBox&&mxUtils.contains(b.text.boundingBox,e.getGraphX(),e.getGraphY()))k="move";else if(mxUtils.contains(g,d[0].x,d[0].y)||mxUtils.contains(g,d[d.length-1].x,d[d.length-1].y))k="pointer";else if(null!=b.visibleSourceState||null!=b.visibleTargetState)f=this.view.getEdgeStyle(b),k="crosshair",f!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(b)&&
-(f=mxUtils.findNearestSegment(b,e.getGraphX(),e.getGraphY()),f<d.length-1&&0<=f&&(k=0==Math.round(d[f].x-d[f+1].x)?"col-resize":"row-resize"));null!=k&&b.setCursor(k)}}),mouseUp:mxUtils.bind(this,function(a,c){B=p=u=x=null})})}this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);
+null!=c?c.style:this.getCellStyle(a);return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var p=null,u=null,v=null,B=null,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,e){if("mouseDown"==e.getProperty("eventName")&&this.isEnabled()){var b=e.getProperty("event");if(!mxEvent.isControlDown(b.getEvent())&&!mxEvent.isShiftDown(b.getEvent())){var d=b.getState();null!=d&&this.model.isEdge(d.cell)&&(p=new mxPoint(b.getGraphX(),b.getGraphY()),
+c=this.isCellSelected(d.cell),v=d,u=b,null!=d.text&&null!=d.text.boundingBox&&mxUtils.contains(d.text.boundingBox,b.getGraphX(),b.getGraphY())?B=mxEvent.LABEL_HANDLE:(d=this.selectionCellsHandler.getHandler(d.cell),null!=d&&null!=d.bends&&0<d.bends.length&&(B=d.getHandleForEvent(b))))}}}));this.addMouseListener({mouseDown:function(a,c){},mouseMove:mxUtils.bind(this,function(a,b){var e=this.selectionCellsHandler.handlers.map,d;for(d in e)if(null!=e[d].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&
+!mxEvent.isControlDown(b.getEvent())&&!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(d=this.tolerance,null!=p&&null!=v&&null!=u){if(e=v,Math.abs(p.x-b.getGraphX())>d||Math.abs(p.y-b.getGraphY())>d){this.isCellSelected(e.cell)||this.setSelectionCell(e.cell);var k=this.selectionCellsHandler.getHandler(e.cell);if(null!=k&&null!=k.bends&&0<k.bends.length){var g=k.getHandleForEvent(u),f=this.view.getEdgeStyle(e);d=f==mxEdgeStyle.EntityRelation;c||B!=mxEvent.LABEL_HANDLE||(g=B);
+if(d&&0!=g&&g!=k.bends.length-1&&g!=mxEvent.LABEL_HANDLE)!d||null==e.visibleSourceState&&null==e.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(g==mxEvent.LABEL_HANDLE||0==g||null!=e.visibleSourceState||g==k.bends.length-1||null!=e.visibleTargetState)d||g==mxEvent.LABEL_HANDLE||(d=e.absolutePoints,null!=d&&(null==f&&null==g||f==mxEdgeStyle.OrthConnector)&&(g=B,null==g&&(g=new mxRectangle(p.x,p.y),g.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(g,d[0].x,d[0].y)?
+g=0:mxUtils.contains(g,d[d.length-1].x,d[d.length-1].y)?g=k.bends.length-1:null!=f&&(2==d.length||3==d.length&&(0==Math.round(d[0].x-d[1].x)&&0==Math.round(d[1].x-d[2].x)||0==Math.round(d[0].y-d[1].y)&&0==Math.round(d[1].y-d[2].y)))?g=2:(g=mxUtils.findNearestSegment(e,p.x,p.y),g=null==f?mxEvent.VIRTUAL_HANDLE-g:g+1))),null==g&&(g=mxEvent.VIRTUAL_HANDLE)),k.start(b.getGraphX(),b.getGraphX(),g),B=p=u=v=null,c=!1,b.consume(),this.graphHandler.reset()}}}else if(e=b.getState(),null!=e&&this.model.isEdge(e.cell)){k=
+null;d=e.absolutePoints;if(null!=d)if(g=new mxRectangle(b.getGraphX(),b.getGraphY()),g.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=e.text&&null!=e.text.boundingBox&&mxUtils.contains(e.text.boundingBox,b.getGraphX(),b.getGraphY()))k="move";else if(mxUtils.contains(g,d[0].x,d[0].y)||mxUtils.contains(g,d[d.length-1].x,d[d.length-1].y))k="pointer";else if(null!=e.visibleSourceState||null!=e.visibleTargetState)f=this.view.getEdgeStyle(e),k="crosshair",f!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(e)&&
+(f=mxUtils.findNearestSegment(e,b.getGraphX(),b.getGraphY()),f<d.length-1&&0<=f&&(k=0==Math.round(d[f].x-d[f+1].x)?"col-resize":"row-resize"));null!=k&&e.setCursor(k)}}),mouseUp:mxUtils.bind(this,function(a,c){B=p=u=v=null})})}this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);
this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,c){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var e=this.graphHandler.getGuideStates;
this.graphHandler.getGuideStates=function(){var a=e.apply(this,arguments);if(this.graph.pageVisible){for(var c=[],b=this.graph.pageFormat,d=this.graph.pageScale,k=b.width*d,b=b.height*d,d=this.graph.view.translate,g=this.graph.view.scale,f=this.graph.getPageLayout(),n=0;n<f.width;n++)c.push(new mxRectangle(((f.x+n)*k+d.x)*g,(f.y*b+d.y)*g,k*g,b*g));for(n=0;n<f.height;n++)c.push(new mxRectangle((f.x*k+d.x)*g,((f.y+n)*b+d.y)*g,k*g,b*g));a=c.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=
-mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(a){for(var c=mxGraphHandler.prototype.getCells.apply(this,arguments),b=[],e=0;e<c.length;e++){var d=this.graph.view.getState(c[e]),
-d=null!=d?d.style:this.graph.getCellStyle(c[e]);"1"==mxUtils.getValue(d,"part","0")?(d=this.graph.model.getParent(c[e]),this.graph.model.isVertex(d)&&0>mxUtils.indexOf(c,d)&&b.push(d)):b.push(c[e])}return b};this.connectionHandler.createTargetVertex=function(a,c){var b=this.graph.view.getState(c),b=null!=b?b.style:this.graph.getCellStyle(c);mxUtils.getValue(b,"part",!1)&&(b=this.graph.model.getParent(c),this.graph.model.isVertex(b)&&(c=b));return mxConnectionHandler.prototype.createTargetVertex.apply(this,
-arguments)};var k=new mxRubberband(this);this.getRubberband=function(){return k};var q=(new Date).getTime(),n=0,g=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;g.apply(this,arguments);a!=this.currentState?(q=(new Date).getTime(),n=0):n=(new Date).getTime()-q};var y=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<n||(null==
-this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&y.apply(this,arguments)};var A=this.isToggleEvent;this.isToggleEvent=function(a){return A.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var t=k.isForceRubberbandEvent;k.isForceRubberbandEvent=function(a){return t.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&
-mxEvent.isTouchEvent(a.getEvent())};var F=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(F=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=F)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var z=this.click;this.click=
+mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(a){for(var c=mxGraphHandler.prototype.getCells.apply(this,arguments),e=[],b=0;b<c.length;b++){var d=this.graph.view.getState(c[b]),
+d=null!=d?d.style:this.graph.getCellStyle(c[b]);"1"==mxUtils.getValue(d,"part","0")?(d=this.graph.model.getParent(c[b]),this.graph.model.isVertex(d)&&0>mxUtils.indexOf(c,d)&&e.push(d)):e.push(c[b])}return e};this.connectionHandler.createTargetVertex=function(a,c){var b=this.graph.view.getState(c),b=null!=b?b.style:this.graph.getCellStyle(c);mxUtils.getValue(b,"part",!1)&&(b=this.graph.model.getParent(c),this.graph.model.isVertex(b)&&(c=b));return mxConnectionHandler.prototype.createTargetVertex.apply(this,
+arguments)};var k=new mxRubberband(this);this.getRubberband=function(){return k};var q=(new Date).getTime(),n=0,g=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;g.apply(this,arguments);a!=this.currentState?(q=(new Date).getTime(),n=0):n=(new Date).getTime()-q};var x=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<n||(null==
+this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&x.apply(this,arguments)};var A=this.isToggleEvent;this.isToggleEvent=function(a){return A.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var t=k.isForceRubberbandEvent;k.isForceRubberbandEvent=function(a){return t.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&
+mxEvent.isTouchEvent(a.getEvent())};var E=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(E=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=E)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var z=this.click;this.click=
function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!c||a.isConsumed())return z.apply(this,arguments);var b=c?a.sourceState.cell:a.getCell();null!=b&&(b=this.getLinkForCell(b),null!=b&&(this.isCustomLink(b)?this.customLinkClicked(b):this.openLink(b)));this.isEnabled()&&c&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var c=null==a.state&&null!=a.sourceState&&
-this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(c?a.sourceState.cell:a.getCell())};var D=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return D.apply(this,arguments)};this.selectRegion=function(a,c){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,c);return b};this.getAllCells=function(a,c,b,e,d,k){k=null!=k?k:[];
-if(0<b||0<e){var g=this.getModel(),f=a+b,n=c+e;null==d&&(d=this.getCurrentRoot(),null==d&&(d=g.getRoot()));if(null!=d)for(var v=g.getChildCount(d),q=0;q<v;q++){var t=g.getChildAt(d,q),y=this.view.getState(t);if(null!=y&&this.isCellVisible(t)&&"1"!=mxUtils.getValue(y.style,"locked","0")){var O=mxUtils.getValue(y.style,mxConstants.STYLE_ROTATION)||0;0!=O&&(y=mxUtils.getBoundingBox(y,O));(g.isEdge(t)||g.isVertex(t))&&y.x>=a&&y.y+y.height<=n&&y.y>=c&&y.x+y.width<=f&&k.push(t);this.getAllCells(a,c,b,e,
-t,k)}}}return k};var E=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,b){return this.graph.isCellSelected(a)?!1:E.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var v=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var b=
-c.getProperty("event").getState();v=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var b=c.getProperty("event"),e=c.getProperty("cell");null==e?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),k.start(b.x,b.y)):null!=v?this.addSelectionCells(v):1<this.getSelectionCount()&&this.isCellSelected(e)&&this.removeSelectionCell(e);
-v=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,c){return c&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&
+this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(c?a.sourceState.cell:a.getCell())};var G=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return G.apply(this,arguments)};this.selectRegion=function(a,c){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,c);return b};this.getAllCells=function(a,c,b,e,d,k){k=null!=k?k:[];
+if(0<b||0<e){var g=this.getModel(),f=a+b,n=c+e;null==d&&(d=this.getCurrentRoot(),null==d&&(d=g.getRoot()));if(null!=d)for(var q=g.getChildCount(d),y=0;y<q;y++){var t=g.getChildAt(d,y),x=this.view.getState(t);if(null!=x&&this.isCellVisible(t)&&"1"!=mxUtils.getValue(x.style,"locked","0")){var Q=mxUtils.getValue(x.style,mxConstants.STYLE_ROTATION)||0;0!=Q&&(x=mxUtils.getBoundingBox(x,Q));(g.isEdge(t)||g.isVertex(t))&&x.x>=a&&x.y+x.height<=n&&x.y>=c&&x.x+x.width<=f&&k.push(t);this.getAllCells(a,c,b,e,
+t,k)}}}return k};var D=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,b){return this.graph.isCellSelected(a)?!1:D.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var y=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var b=
+c.getProperty("event").getState();y=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var b=c.getProperty("event"),e=c.getProperty("cell");null==e?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),k.start(b.x,b.y)):null!=y?this.addSelectionCells(y):1<this.getSelectionCount()&&this.isCellSelected(e)&&this.removeSelectionCell(e);
+y=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,c){return c&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&
this.initTouch();var I=this.updateMouseEvent;this.updateMouseEvent=function(a){a=I.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;
Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;
Graph.createSvgImage=function(a,b,f){f=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" version="1.1">'+f+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(f):Base64.encode(f,!0)),a,b)};
@@ -2259,15 +2262,15 @@ Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)
mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";
Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default";
Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;
-Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,f){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,l=!0,m=null,p=mxUtils.bind(this,function(a){l=!0;m=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),u=mxUtils.bind(this,function(a){l=l&&null!=m&&Math.abs(m.x-mxEvent.getClientX(a))<b&&Math.abs(m.y-mxEvent.getClientY(a))<b}),x=mxUtils.bind(this,function(b){if(l)for(var c=mxEvent.getSource(b);null!=
-c&&c!=f.node;){if("a"==c.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,c,b);break}c=c.parentNode}});mxEvent.addGestureListeners(f.node,p,u,x);mxEvent.addListener(f.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
-(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO};Graph.prototype.getCellAt=function(a,b,f,p,u,x){this.useCssTransforms&&(a=a/this.currentScale-this.currentTranslate.x,b=b/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(a,
-b,f,p,u,x){p=null!=p?p:!0;u=null!=u?u:!0;null==f&&(f=this.getCurrentRoot(),null==f&&(f=this.getModel().getRoot()));if(null!=f)for(var d=this.model.getChildCount(f)-1;0<=d;d--){var c=this.model.getChildAt(f,d),e=this.getScaledCellAt(a,b,c,p,u,x);if(null!=e)return e;if(this.isCellVisible(c)&&(u&&this.model.isEdge(c)||p&&this.model.isVertex(c))&&(e=this.view.getState(c),null!=e&&(null==x||!x(e,a,b))&&this.intersects(e,a,b)))return c}return null};mxCellHighlight.prototype.getStrokeWidth=function(a){a=
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,f){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,l=!0,m=null,p=mxUtils.bind(this,function(a){l=!0;m=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),u=mxUtils.bind(this,function(a){l=l&&null!=m&&Math.abs(m.x-mxEvent.getClientX(a))<b&&Math.abs(m.y-mxEvent.getClientY(a))<b}),v=mxUtils.bind(this,function(b){if(l)for(var c=mxEvent.getSource(b);null!=
+c&&c!=f.node;){if("a"==c.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,c,b);break}c=c.parentNode}});mxEvent.addGestureListeners(f.node,p,u,v);mxEvent.addListener(f.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
+(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO};Graph.prototype.getCellAt=function(a,b,f,p,u,v){this.useCssTransforms&&(a=a/this.currentScale-this.currentTranslate.x,b=b/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(a,
+b,f,p,u,v){p=null!=p?p:!0;u=null!=u?u:!0;null==f&&(f=this.getCurrentRoot(),null==f&&(f=this.getModel().getRoot()));if(null!=f)for(var d=this.model.getChildCount(f)-1;0<=d;d--){var c=this.model.getChildAt(f,d),e=this.getScaledCellAt(a,b,c,p,u,v);if(null!=e)return e;if(this.isCellVisible(c)&&(u&&this.model.isEdge(c)||p&&this.model.isVertex(c))&&(e=this.view.getState(c),null!=e&&(null==v||!v(e,a,b))&&this.intersects(e,a,b)))return c}return null};mxCellHighlight.prototype.getStrokeWidth=function(a){a=
this.strokeWidth;this.graph.useCssTransforms&&(a/=this.graph.currentScale);return a};mxGraphView.prototype.getGraphBounds=function(){var a=this.graphBounds;if(this.graph.useCssTransforms)var b=this.graph.currentTranslate,f=this.graph.currentScale,a=new mxRectangle((a.x+b.x)*f,(a.y+b.y)*f,a.width*f,a.height*f);return a};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var a=mxGraphView.prototype.validate;mxGraphView.prototype.validate=
function(b){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);a.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};Graph.prototype.updateCssTransform=function(){var a=this.view.getDrawPane();
if(null!=a)if(a=a.parentNode,this.useCssTransforms){var b=a.getAttribute("transform");a.setAttribute("transformOrigin","0 0");var f=Math.round(100*this.currentScale)/100;a.setAttribute("transform","scale("+f+","+f+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");if(b!=a.getAttribute("transform"))try{if(mxClient.IS_EDGE){var p=a.style.display;a.style.display="none";a.getBBox();a.style.display=p}}catch(u){}}else a.removeAttribute("transformOrigin"),
-a.removeAttribute("transform")};var b=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,f=this.scale,m=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);b.apply(this,arguments);a&&(this.scale=f,this.translate=m)};var f=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,b,m){var d=this.useCssTransforms,l=this.view.scale,x=this.view.translate;
-d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);f.apply(this,arguments);d&&(this.view.scale=l,this.view.translate=x,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
+a.removeAttribute("transform")};var b=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,f=this.scale,m=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);b.apply(this,arguments);a&&(this.scale=f,this.translate=m)};var f=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,b,m){var d=this.useCssTransforms,l=this.view.scale,v=this.view.translate;
+d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);f.apply(this,arguments);d&&(this.view.scale=l,this.view.translate=v,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
Graph.prototype.labelLinkClicked=function(a,b,f){b=b.getAttribute("href");if(null!=b&&!this.isCustomLink(b)&&mxEvent.isLeftMouseButton(f)&&!mxEvent.isPopupTrigger(f)||mxEvent.isTouchEvent(f)){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(b)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(b),a);mxEvent.consume(f)}};
Graph.prototype.openLink=function(a,b,f){var d=window;try{if("_self"==b&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top){var l=a.split("#")[1];window.location.hash=="#"+l&&(window.location.hash="");window.location.hash=l}else d=window.open(a,b),null==d||f||(d.opener=null)}catch(m){}return d};Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)};
Graph.prototype.isCustomLink=function(a){return"data:"==a.substring(0,5)};Graph.prototype.customLinkClicked=function(a){return!1};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==this.domainUrl)};
@@ -2285,8 +2288,8 @@ Graph.prototype.isLabelMovable=function(a){var b=this.view.getState(a),b=null!=b
Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};
Graph.prototype.formatDate=function(a,b,f){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,l=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,m=/[^-+\dA-Z]/g,p=function(a,c){a=String(a);for(c=c||2;a.length<c;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),f=!0);var u=f?"getUTC":"get",x=a[u+"Date"](),B=a[u+"Day"](),c=a[u+"Month"](),e=a[u+"FullYear"](),k=a[u+"Hours"](),q=a[u+"Minutes"](),n=a[u+"Seconds"](),u=a[u+"Milliseconds"](),g=f?0:a.getTimezoneOffset(),y={d:x,dd:p(x),ddd:d.i18n.dayNames[B],dddd:d.i18n.dayNames[B+7],m:c+1,mm:p(c+1),mmm:d.i18n.monthNames[c],mmmm:d.i18n.monthNames[c+
-12],yy:String(e).slice(2),yyyy:e,h:k%12||12,hh:p(k%12||12),H:k,HH:p(k),M:q,MM:p(q),s:n,ss:p(n),l:p(u,3),L:p(99<u?Math.round(u/10):u),t:12>k?"a":"p",tt:12>k?"am":"pm",T:12>k?"A":"P",TT:12>k?"AM":"PM",Z:f?"UTC":(String(a).match(l)||[""]).pop().replace(m,""),o:(0<g?"-":"+")+p(100*Math.floor(Math.abs(g)/60)+Math.abs(g)%60,4),S:["th","st","nd","rd"][3<x%10?0:(10!=x%100-x%10)*x%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in y?y[a]:a.slice(1,
+/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),f=!0);var u=f?"getUTC":"get",v=a[u+"Date"](),B=a[u+"Day"](),c=a[u+"Month"](),e=a[u+"FullYear"](),k=a[u+"Hours"](),q=a[u+"Minutes"](),n=a[u+"Seconds"](),u=a[u+"Milliseconds"](),g=f?0:a.getTimezoneOffset(),x={d:v,dd:p(v),ddd:d.i18n.dayNames[B],dddd:d.i18n.dayNames[B+7],m:c+1,mm:p(c+1),mmm:d.i18n.monthNames[c],mmmm:d.i18n.monthNames[c+
+12],yy:String(e).slice(2),yyyy:e,h:k%12||12,hh:p(k%12||12),H:k,HH:p(k),M:q,MM:p(q),s:n,ss:p(n),l:p(u,3),L:p(99<u?Math.round(u/10):u),t:12>k?"a":"p",tt:12>k?"am":"pm",T:12>k?"A":"P",TT:12>k?"AM":"PM",Z:f?"UTC":(String(a).match(l)||[""]).pop().replace(m,""),o:(0<g?"-":"+")+p(100*Math.floor(Math.abs(g)/60)+Math.abs(g)%60,4),S:["th","st","nd","rd"][3<v%10?0:(10!=v%100-v%10)*v%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in x?x[a]:a.slice(1,
a.length-1)})};
Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),f=b.getChildCount(b.root),d=0;d<f;d++)mxUtils.bind(this,function(d){var f=document.createElement("div");f.style.overflow="hidden";f.style.textOverflow="ellipsis";f.style.padding="2px";f.style.whiteSpace="nowrap";var l=document.createElement("input");l.style.display="inline-block";l.setAttribute("type","checkbox");b.isVisible(d)&&(l.setAttribute("checked","checked"),
l.defaultChecked=!0);f.appendChild(l);var u=this.convertValueToString(d)||mxResources.get("background")||"Background";f.setAttribute("title",u);mxUtils.write(f,u);a.appendChild(f);mxEvent.addListener(l,"click",function(){null!=l.getAttribute("checked")?l.removeAttribute("checked"):l.setAttribute("checked","checked");b.setVisible(d,l.checked)})})(b.getChildAt(b.root,d));return a};
@@ -2294,7 +2297,7 @@ Graph.prototype.replacePlaceholders=function(a,b){var f=[];if(null!=b){for(var d
match.index)+(null!=m?m:l));d=match.index+l.length}}f.push(b.substring(d))}return f.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],f=0;f<a.length;f++){var d=this.model.getCell(a[f].id);null!=d&&b.push(d)}this.setSelectionCells(b)}else this.clearSelection()};
Graph.prototype.selectCellsForConnectVertex=function(a,b,f){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=f&&(mxEvent.isTouchEvent(b)?f.update(f.getState(this.view.getState(a[1]))):f.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)};
Graph.prototype.connectVertex=function(a,b,f,d,l,m){if(a.geometry.relative&&this.model.isEdge(a.parent))return[];m=m?m:!1;var p=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(p.x+=a.geometry.width/2,p.y-=f):b==mxConstants.DIRECTION_SOUTH?(p.x+=a.geometry.width/2,p.y+=a.geometry.height+f):(p.x=b==mxConstants.DIRECTION_WEST?p.x-f:p.x+(a.geometry.width+
-f),p.y+=a.geometry.height/2);f=this.view.getState(this.model.getParent(a));var u=this.view.scale,x=this.view.translate,B=x.x*u,x=x.y*u;null!=f&&this.model.isVertex(f.cell)&&(B=f.x,x=f.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(p.x+=a.parent.geometry.x,p.y+=a.parent.geometry.y);m=m||mxEvent.isControlDown(d)&&!l?null:this.getCellAt(B+p.x*u,x+p.y*u);this.model.isAncestor(m,a)&&(m=null);for(f=m;null!=f;){if(this.isCellLocked(f)){m=null;break}f=this.model.getParent(f)}null!=m&&(f=this.view.getState(a),
+f),p.y+=a.geometry.height/2);f=this.view.getState(this.model.getParent(a));var u=this.view.scale,v=this.view.translate,B=v.x*u,v=v.y*u;null!=f&&this.model.isVertex(f.cell)&&(B=f.x,v=f.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(p.x+=a.parent.geometry.x,p.y+=a.parent.geometry.y);m=m||mxEvent.isControlDown(d)&&!l?null:this.getCellAt(B+p.x*u,v+p.y*u);this.model.isAncestor(m,a)&&(m=null);for(f=m;null!=f;){if(this.isCellLocked(f)){m=null;break}f=this.model.getParent(f)}null!=m&&(f=this.view.getState(a),
u=this.view.getState(m),null!=f&&null!=u&&mxUtils.intersects(f,u)&&(m=null));if(l=!mxEvent.isShiftDown(d)||l)b==mxConstants.DIRECTION_NORTH?p.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?p.y+=a.geometry.height/2:p.x=b==mxConstants.DIRECTION_WEST?p.x-a.geometry.width/2:p.x+a.geometry.width/2;null==m||this.isCellConnectable(m)||(f=this.getModel().getParent(m),this.getModel().isVertex(f)&&this.isCellConnectable(f)&&(m=f));if(m==a||this.model.isEdge(m)||!this.isCellConnectable(m))m=null;f=[];
this.model.beginUpdate();try{u=m;if(null==u&&l){for(var B=a,c=this.getCellGeometry(a);null!=c&&c.relative;)B=this.getModel().getParent(B),c=this.getCellGeometry(B);var e=this.view.getState(B),k=null!=e?e.style:this.getCellStyle(B);if(mxUtils.getValue(k,"part",!1)){var q=this.model.getParent(B);this.model.isVertex(q)&&(B=q)}u=this.duplicateCells([B],!1)[0];c=this.getCellGeometry(u);null!=c&&(c.x=p.x-c.width/2,c.y=p.y-c.height/2)}c=null;null!=this.layoutManager&&(c=this.layoutManager.getLayout(this.model.getParent(a)));
var n=mxEvent.isControlDown(d)&&l||null==m&&null!=c&&c.constructor==mxStackLayout?null:this.insertEdge(this.model.getParent(a),null,"",a,u,this.createCurrentEdgeStyle());if(null!=n&&this.connectionHandler.insertBeforeSource){var g=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=n.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==n.parent&&(g=d.parent.getIndex(d),this.model.add(d.parent,n,g))}null==m&&null!=u&&null!=c&&null!=a.parent&&c.constructor==
@@ -2304,8 +2307,8 @@ Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typ
Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null};
Graph.prototype.getCellStyle=function(a){var b=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var f=this.model.getParent(a);this.model.isVertex(f)&&this.isCellCollapsed(a)&&(f=this.layoutManager.getLayout(f),null!=f&&f.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!f.horizontal))}return b};
Graph.prototype.updateAlternateBounds=function(a,b,f){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var d=this.layoutManager.getLayout(this.model.getParent(a));null!=d&&d.constructor==mxStackLayout&&(d.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a,b){return mxEvent.isShiftDown(a)||"1"==mxUtils.getValue(b.style,"moveCells","0")};
-Graph.prototype.foldCells=function(a,b,f,d,l){b=null!=b?b:!1;null==f&&(f=this.getFoldableCells(this.getSelectionCells(),a));if(null!=f){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var m=0;m<f.length;m++){var p=this.view.getState(f[m]),u=this.getCellGeometry(f[m]);if(null!=p&&null!=u){var x=Math.round(u.width-p.width/this.view.scale),B=Math.round(u.height-p.height/this.view.scale);if(0!=B||0!=x){var c=this.model.getParent(f[m]),e=this.layoutManager.getLayout(c);
-null==e?null!=l&&this.isMoveCellsEvent(l,p)&&this.moveSiblings(p,c,x,B):null!=l&&mxEvent.isAltDown(l)||e.constructor!=mxStackLayout||e.resizeLast||this.resizeParentStacks(c,e,x,B)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(f)}};
+Graph.prototype.foldCells=function(a,b,f,d,l){b=null!=b?b:!1;null==f&&(f=this.getFoldableCells(this.getSelectionCells(),a));if(null!=f){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var m=0;m<f.length;m++){var p=this.view.getState(f[m]),u=this.getCellGeometry(f[m]);if(null!=p&&null!=u){var v=Math.round(u.width-p.width/this.view.scale),B=Math.round(u.height-p.height/this.view.scale);if(0!=B||0!=v){var c=this.model.getParent(f[m]),e=this.layoutManager.getLayout(c);
+null==e?null!=l&&this.isMoveCellsEvent(l,p)&&this.moveSiblings(p,c,v,B):null!=l&&mxEvent.isAltDown(l)||e.constructor!=mxStackLayout||e.resizeLast||this.resizeParentStacks(c,e,v,B)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(f)}};
Graph.prototype.moveSiblings=function(a,b,f,d){this.model.beginUpdate();try{var l=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<l.length;b++)if(l[b]!=a.cell){var m=this.view.getState(l[b]),p=this.getCellGeometry(l[b]);null!=m&&null!=p&&(p=p.clone(),p.translate(Math.round(f*Math.max(0,Math.min(1,(m.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(m.y-a.y)/a.height)))),this.model.setGeometry(l[b],p))}}finally{this.model.endUpdate()}};
Graph.prototype.resizeParentStacks=function(a,b,f,d){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var l=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==l&&!b.resizeLast;){var m=this.getCellGeometry(a),p=this.view.getState(a);null!=p&&null!=m&&(m=m.clone(),b.horizontal?m.width+=f+Math.min(0,p.width/this.view.scale-m.width):m.height+=d+Math.min(0,p.height/this.view.scale-m.height),this.model.setGeometry(a,
m));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return null!=b&&null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
@@ -2351,14 +2354,14 @@ HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstra
(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,d){d=null!=d?d:!0;var c=this.getState(a);null!=c&&d&&this.graph.model.isEdge(c.cell)&&null!=c.style&&1!=c.style[mxConstants.STYLE_CURVED]&&!c.invalid&&this.updateLineJumps(c)&&this.graph.cellRenderer.redraw(c,!1,this.isRendering());c=b.apply(this,
arguments);null!=c&&d&&this.graph.model.isEdge(c.cell)&&null!=c.style&&1!=c.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(c);return c};var f=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return f.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){d.apply(this,arguments);this.graph.model.isEdge(a.cell)&&
1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=a.routedPoints,e=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var d=function(c,b,d){var k=new mxPoint(b,d);k.type=c;e.push(k);k=null!=a.routedPoints?a.routedPoints[e.length-1]:null;return null==k||k.type!=c||k.x!=b||k.y!=d},f=.5*this.scale,c=!1,e=[],n=0;n<b.length-1;n++){for(var g=
-b[n+1],y=b[n],l=[],t=b[n+2];n<b.length-2&&mxUtils.ptSegDistSq(y.x,y.y,t.x,t.y,g.x,g.y)<1*this.scale*this.scale;)g=t,n++,t=b[n+2];for(var c=d(0,y.x,y.y)||c,u=0;u<this.validEdges.length;u++){var z=this.validEdges[u],m=z.absolutePoints;if(null!=m&&mxUtils.intersects(a,z)&&"1"!=z.style.noJump)for(z=0;z<m.length-1;z++){for(var p=m[z+1],v=m[z],t=m[z+2];z<m.length-2&&mxUtils.ptSegDistSq(v.x,v.y,t.x,t.y,p.x,p.y)<1*this.scale*this.scale;)p=t,z++,t=m[z+2];t=mxUtils.intersection(y.x,y.y,g.x,g.y,v.x,v.y,p.x,
-p.y);if(null!=t&&(Math.abs(t.x-y.x)>f||Math.abs(t.y-y.y)>f)&&(Math.abs(t.x-g.x)>f||Math.abs(t.y-g.y)>f)&&(Math.abs(t.x-v.x)>f||Math.abs(t.y-v.y)>f)&&(Math.abs(t.x-p.x)>f||Math.abs(t.y-p.y)>f)){p=t.x-y.x;v=t.y-y.y;t={distSq:p*p+v*v,x:t.x,y:t.y};for(p=0;p<l.length;p++)if(l[p].distSq>t.distSq){l.splice(p,0,t);t=null;break}null==t||0!=l.length&&l[l.length-1].x===t.x&&l[l.length-1].y===t.y||l.push(t)}}}for(z=0;z<l.length;z++)c=d(1,l[z].x,l[z].y)||c}t=b[b.length-1];c=d(0,t.x,t.y)||c}a.routedPoints=e;return c}return!1};
+b[n+1],x=b[n],l=[],t=b[n+2];n<b.length-2&&mxUtils.ptSegDistSq(x.x,x.y,t.x,t.y,g.x,g.y)<1*this.scale*this.scale;)g=t,n++,t=b[n+2];for(var c=d(0,x.x,x.y)||c,u=0;u<this.validEdges.length;u++){var z=this.validEdges[u],m=z.absolutePoints;if(null!=m&&mxUtils.intersects(a,z)&&"1"!=z.style.noJump)for(z=0;z<m.length-1;z++){for(var p=m[z+1],y=m[z],t=m[z+2];z<m.length-2&&mxUtils.ptSegDistSq(y.x,y.y,t.x,t.y,p.x,p.y)<1*this.scale*this.scale;)p=t,z++,t=m[z+2];t=mxUtils.intersection(x.x,x.y,g.x,g.y,y.x,y.y,p.x,
+p.y);if(null!=t&&(Math.abs(t.x-x.x)>f||Math.abs(t.y-x.y)>f)&&(Math.abs(t.x-g.x)>f||Math.abs(t.y-g.y)>f)&&(Math.abs(t.x-y.x)>f||Math.abs(t.y-y.y)>f)&&(Math.abs(t.x-p.x)>f||Math.abs(t.y-p.y)>f)){p=t.x-x.x;y=t.y-x.y;t={distSq:p*p+y*y,x:t.x,y:t.y};for(p=0;p<l.length;p++)if(l[p].distSq>t.distSq){l.splice(p,0,t);t=null;break}null==t||0!=l.length&&l[l.length-1].x===t.x&&l[l.length-1].y===t.y||l.push(t)}}}for(z=0;z<l.length;z++)c=d(1,l[z].x,l[z].y)||c}t=b[b.length-1];c=d(0,t.x,t.y)||c}a.routedPoints=e;return c}return!1};
var l=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)l.apply(this,arguments);else{var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,d=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,f=mxUtils.getValue(this.style,
-"jumpStyle","none"),n,g=!0,y=null,A=null;n=[];var t=null;a.begin();for(var m=0;m<this.state.routedPoints.length;m++){var z=this.state.routedPoints[m],u=new mxPoint(z.x/this.scale,z.y/this.scale);0==m?u=b[0]:m==this.state.routedPoints.length-1&&(u=b[b.length-1]);var p=!1;if(null!=y&&1==z.type){var v=this.state.routedPoints[m+1],z=v.x/this.scale-u.x,v=v.y/this.scale-u.y,z=z*z+v*v;null==t&&(t=new mxPoint(u.x-y.x,u.y-y.y),A=Math.sqrt(t.x*t.x+t.y*t.y),0<A?(t.x=t.x*d/A,t.y=t.y*d/A):t=null);z>d*d&&0<A&&
-(z=y.x-u.x,v=y.y-u.y,z=z*z+v*v,z>d*d&&(p=new mxPoint(u.x-t.x,u.y-t.y),z=new mxPoint(u.x+t.x,u.y+t.y),n.push(p),this.addPoints(a,n,c,e,!1,null,g),n=0>Math.round(t.x)||0==Math.round(t.x)&&0>=Math.round(t.y)?1:-1,g=!1,"sharp"==f?(a.lineTo(p.x-t.y*n,p.y+t.x*n),a.lineTo(z.x-t.y*n,z.y+t.x*n),a.lineTo(z.x,z.y)):"arc"==f?(n*=1.3,a.curveTo(p.x-t.y*n,p.y+t.x*n,z.x-t.y*n,z.y+t.x*n,z.x,z.y)):(a.moveTo(z.x,z.y),g=!0),n=[z],p=!0))}else t=null;p||(n.push(u),y=u)}this.addPoints(a,n,c,e,!1,null,g);a.stroke()}};var m=
-mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,e){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)m.apply(this,arguments);else{b=this.getTerminalPort(a,b,e);var d=this.getNextPoint(a,c,e),f=this.graph.isOrthogonal(a),n=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),g=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=n)var y=Math.cos(-n),l=Math.sin(-n),d=mxUtils.getRotatedPoint(d,y,l,g);
-y=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);y+=parseFloat(a.style[e?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);d=this.getPerimeterPoint(b,d,0==n&&f,y);0!=n&&(y=Math.cos(n),l=Math.sin(n),d=mxUtils.getRotatedPoint(d,y,l,g));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,e,d),e)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,e,d){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);e=c=null;if(null!=a)for(var f=
-0;f<a.length;f++){var k=this.graph.getConnectionPoint(b,a[f]);if(null!=k){var g=(k.x-d.x)*(k.x-d.x)+(k.y-d.y)*(k.y-d.y);if(null==e||g<e)c=k,e=g}}null!=c&&(d=c)}return d};var p=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,b,c){var e=p.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=c.state&&(e=c.state.view.graph.replacePlaceholders(c.state.cell,e));return e};var u=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=
+"jumpStyle","none"),n,g=!0,x=null,A=null;n=[];var t=null;a.begin();for(var m=0;m<this.state.routedPoints.length;m++){var z=this.state.routedPoints[m],u=new mxPoint(z.x/this.scale,z.y/this.scale);0==m?u=b[0]:m==this.state.routedPoints.length-1&&(u=b[b.length-1]);var p=!1;if(null!=x&&1==z.type){var y=this.state.routedPoints[m+1],z=y.x/this.scale-u.x,y=y.y/this.scale-u.y,z=z*z+y*y;null==t&&(t=new mxPoint(u.x-x.x,u.y-x.y),A=Math.sqrt(t.x*t.x+t.y*t.y),0<A?(t.x=t.x*d/A,t.y=t.y*d/A):t=null);z>d*d&&0<A&&
+(z=x.x-u.x,y=x.y-u.y,z=z*z+y*y,z>d*d&&(p=new mxPoint(u.x-t.x,u.y-t.y),z=new mxPoint(u.x+t.x,u.y+t.y),n.push(p),this.addPoints(a,n,c,e,!1,null,g),n=0>Math.round(t.x)||0==Math.round(t.x)&&0>=Math.round(t.y)?1:-1,g=!1,"sharp"==f?(a.lineTo(p.x-t.y*n,p.y+t.x*n),a.lineTo(z.x-t.y*n,z.y+t.x*n),a.lineTo(z.x,z.y)):"arc"==f?(n*=1.3,a.curveTo(p.x-t.y*n,p.y+t.x*n,z.x-t.y*n,z.y+t.x*n,z.x,z.y)):(a.moveTo(z.x,z.y),g=!0),n=[z],p=!0))}else t=null;p||(n.push(u),x=u)}this.addPoints(a,n,c,e,!1,null,g);a.stroke()}};var m=
+mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,e){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)m.apply(this,arguments);else{b=this.getTerminalPort(a,b,e);var d=this.getNextPoint(a,c,e),f=this.graph.isOrthogonal(a),n=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),g=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=n)var x=Math.cos(-n),l=Math.sin(-n),d=mxUtils.getRotatedPoint(d,x,l,g);
+x=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);x+=parseFloat(a.style[e?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);d=this.getPerimeterPoint(b,d,0==n&&f,x);0!=n&&(x=Math.cos(n),l=Math.sin(n),d=mxUtils.getRotatedPoint(d,x,l,g));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,e,d),e)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,e,d){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);e=c=null;if(null!=a)for(var k=
+0;k<a.length;k++){var f=this.graph.getConnectionPoint(b,a[k]);if(null!=f){var g=(f.x-d.x)*(f.x-d.x)+(f.y-d.y)*(f.y-d.y);if(null==e||g<e)c=f,e=g}}null!=c&&(d=c)}return d};var p=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,b,c){var e=p.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=c.state&&(e=c.state.view.graph.replacePlaceholders(c.state.cell,e));return e};var u=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=
function(a){if(null!=a.style&&"undefined"!==typeof pako){var b=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=b&&"string"===typeof b&&"stencil("==b.substring(0,8))try{var c=b.substring(8,b.length-1),e=mxUtils.parseXml(Graph.decompress(c));return new mxShape(new mxStencil(e.documentElement))}catch(k){null!=window.console&&console.log("Error in shape: "+k)}}return u.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;
mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var f=mxStencilRegistry.getBasenameForStencil(a);if(null!=f){b=mxStencilRegistry.libraries[f];if(null!=b){if(null==mxStencilRegistry.packages[f]){for(var d=0;d<b.length;d++){var l=b[d];if(".xml"==l.toLowerCase().substring(l.length-4,l.length))mxStencilRegistry.loadStencilSet(l,null);else if(".js"==l.toLowerCase().substring(l.length-3,l.length))try{if(mxStencilRegistry.allowEval){var m=
@@ -2378,7 +2381,7 @@ Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",je
a+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(a+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=
null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.createCellLookup=function(a,c){c=null!=c?c:{};for(var b=0;b<a.length;b++){var e=a[b];c[mxObjectIdentity.get(e)]=e.getId();for(var d=this.model.getChildCount(e),k=0;k<d;k++)this.createCellLookup([this.model.getChildAt(e,k)],c)}return c};Graph.prototype.createCellMapping=
function(a,c,b){b=null!=b?b:{};for(var e in a){var d=c[e];null==b[d]&&(b[d]=a[e].getId()||"")}return b};Graph.prototype.importGraphModel=function(a,c,b,e){c=null!=c?c:0;b=null!=b?b:0;var d=new mxCodec(a.ownerDocument),k=new mxGraphModel;d.decode(a,k);a=[];var d={},f={},g=k.getChildren(this.cloneCell(k.root,this.isCloneInvalidEdges(),d));if(null!=g){var n=this.createCellLookup([k.root]),g=g.slice();this.model.beginUpdate();try{if(1!=g.length||this.isCellLocked(this.getDefaultParent()))for(k=0;k<g.length;k++)a=
-a.concat(this.model.getChildren(this.moveCells([g[k]],c,b,!1,this.model.getRoot())[0]));else a=this.moveCells(k.getChildren(g[0]),c,b,!1,this.getDefaultParent()),f[k.getChildAt(k.root,0).getId()]=this.getDefaultParent().getId();this.createCellMapping(d,n,f);this.updateCustomLinks(f,a);if(e){this.isGridEnabled()&&(c=this.snap(c),b=this.snap(b));var v=this.getBoundingBoxFromGeometry(a,!0);null!=v&&this.moveCells(a,c-v.x,b-v.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var c=
+a.concat(this.model.getChildren(this.moveCells([g[k]],c,b,!1,this.model.getRoot())[0]));else a=this.moveCells(k.getChildren(g[0]),c,b,!1,this.getDefaultParent()),f[k.getChildAt(k.root,0).getId()]=this.getDefaultParent().getId();this.createCellMapping(d,n,f);this.updateCustomLinks(f,a);if(e){this.isGridEnabled()&&(c=this.snap(c),b=this.snap(b));var y=this.getBoundingBoxFromGeometry(a,!0);null!=y&&this.moveCells(a,c-y.x,b-y.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var c=
{},b=this.cloneCells(a,null,c),e=new mxDictionary,d=0;d<a.length;d++)e.put(a[d],!0);for(d=0;d<b.length;d++){var k=this.view.getState(a[d]);if(null!=k){var f=this.getCellGeometry(b[d]);null==f||!f.relative||this.model.isEdge(a[d])||e.get(this.model.getParent(a[d]))||(f.relative=!1,f.x=k.x/k.view.scale-k.view.translate.x,f.y=k.y/k.view.scale-k.view.translate.y)}}e=new mxCodec;k=new mxGraphModel;f=k.getChildAt(k.getRoot(),0);for(d=0;d<b.length;d++)k.add(f,b[d]);this.updateCustomLinks(this.createCellMapping(c,
this.createCellLookup(a)),b);return e.encode(k)};var m=Graph.prototype.moveCells;Graph.prototype.moveCells=function(a,c,b,e,d,k,f){f=null!=f?f:{};var g=m.apply(this,arguments);e&&this.updateCustomLinks(this.createCellMapping(f,this.createCellLookup(a)),g);return g};Graph.prototype.updateCustomLinks=function(a,c){for(var b=0;b<c.length;b++)null!=c[b]&&this.updateCustomLinksForCell(a,c[b])};Graph.prototype.updateCustomLinksForCell=function(a,c){};Graph.prototype.getAllConnectionConstraints=function(a,
c){if(null!=a){var b=mxUtils.getValue(a.style,"points",null);if(null!=b){var e=[];try{for(var d=JSON.parse(b),b=0;b<d.length;b++){var k=d[b];e.push(new mxConnectionConstraint(new mxPoint(k[0],k[1]),2<k.length?"0"!=k[2]:!0,null,3<k.length?k[3]:0,4<k.length?k[4]:0))}}catch(X){}return e}if(null!=a.shape&&null!=a.shape.bounds){k=a.shape.direction;d=a.shape.bounds;b=a.shape.scale;e=d.width/b;d=d.height/b;if(k==mxConstants.DIRECTION_NORTH||k==mxConstants.DIRECTION_SOUTH)k=e,e=d,d=k;b=a.shape.getConstraints(a.style,
@@ -2386,8 +2389,8 @@ e,d);if(null!=b)return b;if(null!=a.shape.stencil&&null!=a.shape.stencil.constra
c,[a]))}};Graph.prototype.isValidRoot=function(a){for(var c=this.model.getChildCount(a),b=0,e=0;e<c;e++){var d=this.model.getChildAt(a,e);this.model.isVertex(d)&&(d=this.getCellGeometry(d),null==d||d.relative||b++)}return 0<b||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(c,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(c,
"dropTarget","1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var c=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(c&&null!=a&&null!=this.layoutManager){var b=this.model.getParent(a);null!=b&&(b=this.layoutManager.getLayout(b),null!=b&&b.constructor==mxStackLayout&&(c=!1))}return c};Graph.prototype.getPreferredSizeForCell=function(a){var c=
mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=c&&(c.width+=10,c.height+=4,this.gridEnabled&&(c.width=this.snap(c.width),c.height=this.snap(c.height)));return c};Graph.prototype.turnShapes=function(a){var c=this.getModel(),b=[];c.beginUpdate();try{for(var e=0;e<a.length;e++){var d=a[e];if(c.isEdge(d)){var k=c.getTerminal(d,!0),f=c.getTerminal(d,!1);c.setTerminal(d,f,!0);c.setTerminal(d,k,!1);var g=c.getGeometry(d);if(null!=g){g=g.clone();null!=g.points&&g.points.reverse();var n=
-g.getTerminalPoint(!0),v=g.getTerminalPoint(!1);g.setTerminalPoint(n,!1);g.setTerminalPoint(v,!0);c.setGeometry(d,g);var q=this.view.getState(d),t=this.view.getState(k),y=this.view.getState(f);if(null!=q){var l=null!=t?this.getConnectionConstraint(q,t,!0):null,C=null!=y?this.getConnectionConstraint(q,y,!1):null;this.setConnectionConstraint(d,k,!0,C);this.setConnectionConstraint(d,f,!1,l)}b.push(d)}}else if(c.isVertex(d)&&(g=this.getCellGeometry(d),null!=g)){g=g.clone();g.x+=g.width/2-g.height/2;g.y+=
-g.height/2-g.width/2;var A=g.width;g.width=g.height;g.height=A;c.setGeometry(d,g);var z=this.view.getState(d);if(null!=z){var O=z.style[mxConstants.STYLE_DIRECTION]||"east";"east"==O?O="south":"south"==O?O="west":"west"==O?O="north":"north"==O&&(O="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,O,[d])}b.push(d)}}}finally{c.endUpdate()}return b};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;
+g.getTerminalPoint(!0),y=g.getTerminalPoint(!1);g.setTerminalPoint(n,!1);g.setTerminalPoint(y,!0);c.setGeometry(d,g);var q=this.view.getState(d),t=this.view.getState(k),x=this.view.getState(f);if(null!=q){var l=null!=t?this.getConnectionConstraint(q,t,!0):null,C=null!=x?this.getConnectionConstraint(q,x,!1):null;this.setConnectionConstraint(d,k,!0,C);this.setConnectionConstraint(d,f,!1,l)}b.push(d)}}else if(c.isVertex(d)&&(g=this.getCellGeometry(d),null!=g)){g=g.clone();g.x+=g.width/2-g.height/2;g.y+=
+g.height/2-g.width/2;var A=g.width;g.width=g.height;g.height=A;c.setGeometry(d,g);var z=this.view.getState(d);if(null!=z){var Q=z.style[mxConstants.STYLE_DIRECTION]||"east";"east"==Q?Q="south":"south"==Q?Q="west":"west"==Q?Q="north":"north"==Q&&(Q="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,Q,[d])}b.push(d)}}}finally{c.endUpdate()}return b};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;
a=a.nextSibling}return!1};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var c=this.model.getDescendants(a.cell);if(0<c.length)for(var b=0;b<c.length;b++){var e=this.view.getState(c[b]);null!=e&&null!=e.shape&&null!=e.shape.stencil&&this.stencilHasPlaceholders(e.shape.stencil)?this.removeStateForCell(c[b]):this.isReplacePlaceholders(c[b])&&this.view.invalidate(c[b],
!1,!1)}}};Graph.prototype.replaceElement=function(a,c){for(var b=a.ownerDocument.createElement(null!=c?c:"span"),e=Array.prototype.slice.call(a.attributes);attr=e.pop();)b.setAttribute(attr.nodeName,attr.nodeValue);b.innerHTML=a.innerHTML;a.parentNode.replaceChild(b,a)};Graph.prototype.processElements=function(a,c){for(var b=a.getElementsByTagName("*"),e=0;e<b.length;e++)c(b[e])};Graph.prototype.updateLabelElements=function(a,c,b){a=null!=a?a:this.getSelectionCells();for(var e=document.createElement("div"),
d=0;d<a.length;d++)if(this.isHtmlLabel(a[d])){var k=this.convertValueToString(a[d]);if(null!=k&&0<k.length){e.innerHTML=k;for(var g=e.getElementsByTagName(null!=b?b:"*"),f=0;f<g.length;f++)c(g[f]);e.innerHTML!=k&&this.cellLabelChanged(a[d],e.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,c,b){c=Graph.zapGremlins(c);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var e=a.getAttribute("placeholder"),
@@ -2407,18 +2410,18 @@ g.getCellAt(a.getGraphX(),a.getGraphY(),null,null,null,function(a,c,b){return nu
!g.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c))}},mouseUp:function(a,e){for(var d=e.getSource(),f=e.getEvent();null!=d&&"a"!=d.nodeName.toLowerCase();)d=d.parentNode;null==d&&Math.abs(this.scrollLeft-g.container.scrollLeft)<k&&Math.abs(this.scrollTop-g.container.scrollTop)<k&&(null==e.sourceState||!e.isSource(e.sourceState.control))&&((mxEvent.isLeftMouseButton(f)||mxEvent.isMiddleMouseButton(f))&&!mxEvent.isPopupTrigger(f)||mxEvent.isTouchEvent(f))&&(null!=
this.currentLink?(d=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&d||null==c||c(f,this.currentLink),mxEvent.isConsumed(f)||(f=mxEvent.isMiddleMouseButton(f)?"_blank":d?g.linkTarget:"_top",g.openLink(this.currentLink,f),e.consume())):null!=b&&!e.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<k&&Math.abs(this.scrollTop-g.container.scrollTop)<k&&Math.abs(this.startX-e.getGraphX())<k&&Math.abs(this.startY-e.getGraphY())<k&&b(e.getEvent()));this.clear()},activate:function(a){this.currentLink=
g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=d);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(f);mxEvent.addListener(document,"mouseleave",function(a){f.clear()})};Graph.prototype.duplicateCells=function(a,
-c){a=null!=a?a:this.getSelectionCells();c=null!=c?c:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),e=this.gridSize,d=[];b.beginUpdate();try{for(var k=this.cloneCells(a,!1,null,!0),g=0;g<a.length;g++){var f=b.getParent(a[g]),n=this.moveCells([k[g]],e,e,!1)[0];d.push(n);if(c)b.add(f,k[g]);else{var v=f.getIndex(a[g]);b.add(f,k[g],v+1)}}}finally{b.endUpdate()}return d};Graph.prototype.insertImage=function(a,c,b){if(null!=a&&null!=this.cellEditor.textarea){for(var e=this.cellEditor.textarea.getElementsByTagName("img"),
+c){a=null!=a?a:this.getSelectionCells();c=null!=c?c:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),e=this.gridSize,d=[];b.beginUpdate();try{for(var k=this.cloneCells(a,!1,null,!0),g=0;g<a.length;g++){var f=b.getParent(a[g]),n=this.moveCells([k[g]],e,e,!1)[0];d.push(n);if(c)b.add(f,k[g]);else{var y=f.getIndex(a[g]);b.add(f,k[g],y+1)}}}finally{b.endUpdate()}return d};Graph.prototype.insertImage=function(a,c,b){if(null!=a&&null!=this.cellEditor.textarea){for(var e=this.cellEditor.textarea.getElementsByTagName("img"),
d=[],k=0;k<e.length;k++)d.push(e[k]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==d.length+1)for(k=a.length-1;0<=k;k--)if(0==k||a[k]!=d[k-1]){a[k].setAttribute("width",c);a[k].setAttribute("height",b);break}}};Graph.prototype.insertLink=function(a){if(null!=this.cellEditor.textarea)if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var c=this.cellEditor.textarea.getElementsByTagName("a"),b=[],e=0;e<c.length;e++)b.push(c[e]);
document.execCommand("createlink",!1,mxUtils.trim(a));c=this.cellEditor.textarea.getElementsByTagName("a");if(c.length==b.length+1)for(e=c.length-1;0<=e;e--)if(c[e]!=b[e-1]){for(c=c[e].getElementsByTagName("a");0<c.length;){for(b=c[0].parentNode;null!=c[0].firstChild;)b.insertBefore(c[0].firstChild,c[0]);b.removeChild(c[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var c=mxGraph.prototype.isCellResizable.apply(this,arguments),b=
this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return c||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,c){null==c&&(c=this.getSelectionCells());if(null!=c&&1<c.length){for(var b=[],e=null,d=null,k=0;k<c.length;k++)if(this.getModel().isVertex(c[k])){var g=this.view.getState(c[k]);if(null!=g){var f=a?g.getCenterX():g.getCenterY(),e=null!=e?Math.max(e,f):f,d=null!=d?Math.min(d,f):f;b.push(g)}}if(2<
-b.length){b.sort(function(c,b){return a?c.x-b.x:c.y-b.y});g=this.view.translate;f=this.view.scale;d=d/f-(a?g.x:g.y);e=e/f-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var n=(e-d)/(b.length-1),e=d,k=1;k<b.length-1;k++){var v=this.view.getState(this.model.getParent(b[k].cell)),q=this.getCellGeometry(b[k].cell),e=e+n;null!=q&&null!=v&&(q=q.clone(),a?q.x=Math.round(e-q.width/2)-v.origin.x:q.y=Math.round(e-q.height/2)-v.origin.y,this.getModel().setGeometry(b[k].cell,q))}}finally{this.getModel().endUpdate()}}}return c};
-Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,c,b,e,d,k,g,f,n,v){var q=this.useCssTransforms;q&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{c=null!=c?c:1;b=null!=b?b:0;d=null!=d?d:!0;k=null!=k?k:
-!0;g=null!=g?g:!0;var t=k||e?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==t)throw Error(mxResources.get("drawingEmpty"));var y=this.view.scale,l=mxUtils.createXmlDocument(),C=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"svg"):l.createElement("svg");null!=a&&(null!=C.style?C.style.backgroundColor=a:C.setAttribute("style","background-color:"+a));null==l.createElementNS?(C.setAttribute("xmlns",mxConstants.NS_SVG),C.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):
-C.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=c/y;var A=Math.max(1,Math.ceil(t.width*a)+2*b)+(v?5:0),z=Math.max(1,Math.ceil(t.height*a)+2*b)+(v?5:0);C.setAttribute("version","1.1");C.setAttribute("width",A+"px");C.setAttribute("height",z+"px");C.setAttribute("viewBox",(d?"-0.5 -0.5":"0 0")+" "+A+" "+z);l.appendChild(C);var I=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g");C.appendChild(I);var u=this.createSvgCanvas(I);
-u.foOffset=d?-.5:0;u.textOffset=d?-.5:0;u.imageOffset=d?-.5:0;u.translate(Math.floor((b/c-t.x)/y),Math.floor((b/c-t.y)/y));var m=document.createElement("textarea"),J=u.createAlternateContent;u.createAlternateContent=function(a,c,b,e,d,k,g,f,n,v,q,t,y){var l=this.state;if(null!=this.foAltText&&(0==e||0!=l.fontSize&&k.length<5*e/l.fontSize)){var C=this.createElement("text");C.setAttribute("x",Math.round(e/2));C.setAttribute("y",Math.round((d+l.fontSize)/2));C.setAttribute("fill",l.fontColor||"black");
+b.length){b.sort(function(c,b){return a?c.x-b.x:c.y-b.y});g=this.view.translate;f=this.view.scale;d=d/f-(a?g.x:g.y);e=e/f-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var n=(e-d)/(b.length-1),e=d,k=1;k<b.length-1;k++){var y=this.view.getState(this.model.getParent(b[k].cell)),q=this.getCellGeometry(b[k].cell),e=e+n;null!=q&&null!=y&&(q=q.clone(),a?q.x=Math.round(e-q.width/2)-y.origin.x:q.y=Math.round(e-q.height/2)-y.origin.y,this.getModel().setGeometry(b[k].cell,q))}}finally{this.getModel().endUpdate()}}}return c};
+Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,c,b,e,d,k,g,f,n,y){var q=this.useCssTransforms;q&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{c=null!=c?c:1;b=null!=b?b:0;d=null!=d?d:!0;k=null!=k?k:
+!0;g=null!=g?g:!0;var t=k||e?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==t)throw Error(mxResources.get("drawingEmpty"));var x=this.view.scale,l=mxUtils.createXmlDocument(),C=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"svg"):l.createElement("svg");null!=a&&(null!=C.style?C.style.backgroundColor=a:C.setAttribute("style","background-color:"+a));null==l.createElementNS?(C.setAttribute("xmlns",mxConstants.NS_SVG),C.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):
+C.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=c/x;var A=Math.max(1,Math.ceil(t.width*a)+2*b)+(y?5:0),z=Math.max(1,Math.ceil(t.height*a)+2*b)+(y?5:0);C.setAttribute("version","1.1");C.setAttribute("width",A+"px");C.setAttribute("height",z+"px");C.setAttribute("viewBox",(d?"-0.5 -0.5":"0 0")+" "+A+" "+z);l.appendChild(C);var I=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g");C.appendChild(I);var u=this.createSvgCanvas(I);
+u.foOffset=d?-.5:0;u.textOffset=d?-.5:0;u.imageOffset=d?-.5:0;u.translate(Math.floor((b/c-t.x)/x),Math.floor((b/c-t.y)/x));var m=document.createElement("textarea"),J=u.createAlternateContent;u.createAlternateContent=function(a,c,b,e,d,k,g,f,n,y,q,t,x){var l=this.state;if(null!=this.foAltText&&(0==e||0!=l.fontSize&&k.length<5*e/l.fontSize)){var C=this.createElement("text");C.setAttribute("x",Math.round(e/2));C.setAttribute("y",Math.round((d+l.fontSize)/2));C.setAttribute("fill",l.fontColor||"black");
C.setAttribute("text-anchor","middle");C.setAttribute("font-size",Math.round(l.fontSize)+"px");C.setAttribute("font-family",l.fontFamily);(l.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&C.setAttribute("font-weight","bold");(l.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&C.setAttribute("font-style","italic");(l.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&C.setAttribute("text-decoration","underline");try{return m.innerHTML=k,C.textContent=m.value,C}catch(qa){return J.apply(this,
-arguments)}}else return J.apply(this,arguments)};var p=this.backgroundImage;if(null!=p){c=y/c;var K=this.view.translate,D=new mxRectangle(K.x*c,K.y*c,p.width*c,p.height*c);mxUtils.intersects(t,D)&&u.image(K.x,K.y,p.width,p.height,p.src,!0)}u.scale(a);u.textEnabled=g;f=null!=f?f:this.createSvgImageExport();var V=f.drawCellState,Q=f.getLinkForCellState;f.getLinkForCellState=function(a,c){var b=Q.apply(this,arguments);return null==b||a.view.graph.isCustomLink(b)?null:b};f.drawCellState=function(a,c){for(var b=
-a.view.graph,e=b.isCellSelected(a.cell),d=b.model.getParent(a.cell);!k&&!e&&null!=d;)e=b.isCellSelected(d),d=b.model.getParent(d);(k||e)&&V.apply(this,arguments)};f.drawState(this.getView().getState(this.model.root),u);this.updateSvgLinks(C,n,!0);return C}finally{q&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.updateSvgLinks=function(a,c,b){a=a.getElementsByTagName("a");for(var e=0;e<a.length;e++){var d=a[e].getAttribute("href");null==d&&(d=a[e].getAttribute("xlink:href"));
+arguments)}}else return J.apply(this,arguments)};var p=this.backgroundImage;if(null!=p){c=x/c;var O=this.view.translate,L=new mxRectangle(O.x*c,O.y*c,p.width*c,p.height*c);mxUtils.intersects(t,L)&&u.image(O.x,O.y,p.width,p.height,p.src,!0)}u.scale(a);u.textEnabled=g;f=null!=f?f:this.createSvgImageExport();var G=f.drawCellState,S=f.getLinkForCellState;f.getLinkForCellState=function(a,c){var b=S.apply(this,arguments);return null==b||a.view.graph.isCustomLink(b)?null:b};f.drawCellState=function(a,c){for(var b=
+a.view.graph,e=b.isCellSelected(a.cell),d=b.model.getParent(a.cell);!k&&!e&&null!=d;)e=b.isCellSelected(d),d=b.model.getParent(d);(k||e)&&G.apply(this,arguments)};f.drawState(this.getView().getState(this.model.root),u);this.updateSvgLinks(C,n,!0);return C}finally{q&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.updateSvgLinks=function(a,c,b){a=a.getElementsByTagName("a");for(var e=0;e<a.length;e++){var d=a[e].getAttribute("href");null==d&&(d=a[e].getAttribute("xlink:href"));
null!=d&&(null!=c&&/^https?:\/\//.test(d)?a[e].setAttribute("target",c):b&&this.isCustomLink(d)&&a[e].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=!0;return a};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var c=window.getSelection();c.getRangeAt&&c.rangeCount&&(a=c.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());
return a};Graph.prototype.getParentByName=function(a,c,b){for(;null!=a&&a.nodeName!=c;){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.getParentByNames=function(a,c,b){for(;null!=a&&!(0<=mxUtils.indexOf(c,a.nodeName));){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var c=null;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){var b=document.createRange();b.selectNode(a);c.removeAllRanges();c.addRange(b)}}else(c=document.selection)&&
"Control"!=c.type&&(a=c.createRange(),a.collapse(!0),b=c.createRange(),b.setEndPoint("StartToStart",a),b.select())};Graph.prototype.insertRow=function(a,c){for(var b=a.tBodies[0],e=b.rows[0].cells,d=0,k=0;k<e.length;k++)var g=e[k].getAttribute("colspan"),d=d+(null!=g?parseInt(g):1);b=b.insertRow(c);for(k=0;k<d;k++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=function(a,c){a.tBodies[0].deleteRow(c)};Graph.prototype.insertColumn=function(a,c){var b=a.tHead;if(null!=b)for(var e=
@@ -2430,8 +2433,8 @@ c.state.shape.node.style.cursor))}null==c.getState()&&this.isEnabled()&&(this.co
(null==d.getState()||!d.isSource(d.getState().control))&&(this.popupMenuHandler.popupTrigger||!e&&!mxEvent.isMouseEvent(d.getEvent())&&(b&&null==d.getCell()&&this.isSelectionEmpty()||c&&this.isCellSelected(d.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),
"TABLE",this.textarea)};mxCellEditor.prototype.alignText=function(a,c){!this.isTableSelected()==(null==c||!mxEvent.isShiftDown(c))&&(this.graph.cellEditor.setAlign(a),this.graph.processElements(this.textarea,function(a){a.removeAttribute("align");a.style.textAlign=null}));document.execCommand("justify"+a.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var c=[],b=0,e=a.rangeCount;b<e;++b)c.push(a.getRangeAt(b));
return c}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var c=0,b=a.length;c<b;++c)sel.addRange(a[c])}else document.selection&&a.select&&a.select()}catch(W){}};var p=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds=
-"0"!=mxUtils.getValue(a.style,"nl2Br","1"));p.apply(this,arguments)};var u=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,c){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?u.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var x=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=
-function(a,c){x.apply(this,arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),e=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=e&&e.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=
+"0"!=mxUtils.getValue(a.style,"nl2Br","1"));p.apply(this,arguments)};var u=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,c){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?u.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var v=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=
+function(a,c){v.apply(this,arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),e=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=e&&e.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=
mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var B=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function c(a,b){b.originalNode=a;a=a.firstChild;for(var e=b.firstChild;null!=a&&null!=e;)c(a,e),a=a.nextSibling,e=e.nextSibling;return b}function b(a,c){if(null!=a)if(c.originalNode!=a)e(a);else for(a=a.firstChild,c=c.firstChild;null!=
a;){var d=a.nextSibling;null==c?e(a):(b(a,c),c=c.nextSibling);a=d}}function e(a){for(var c=a.firstChild;null!=c;){var b=c.nextSibling;e(c);c=b}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),
a.removeAttribute("border"))):a.parentNode.removeChild(a)}B.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var e=c(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>"))&&b(this.textarea,e)}),0)}))};mxCellEditor.prototype.toggleViewMode=
@@ -2445,7 +2448,7 @@ f);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&t
this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/e)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*e);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/e)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*e);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=
Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=e:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+e+","+e+")")}else this.textarea.style.height="",this.textarea.style.overflow="",c.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,c){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var b=this.graph.getEditingValue(a.cell,
c);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(b=b.replace(/\n/g,"<br/>"));return b=this.graph.sanitizeHtml(b,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var c=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return c="1"==mxUtils.getValue(a.style,"nl2Br","1")?c.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):c.replace(/\r\n/g,
-"").replace(/\n/g,"")};var e=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();e.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(O){}};var k=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,c){this.graph.getModel().beginUpdate();try{if(k.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var b=
+"").replace(/\n/g,"")};var e=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();e.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(Q){}};var k=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,c){this.graph.getModel().beginUpdate();try{if(k.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var b=
mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),e=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==c&&b==mxConstants.NONE&&e==mxConstants.NONE&&this.graph.removeCells([a.cell],!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var c=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=c&&c!=mxConstants.NONE||!(null!=a.cell.geometry&&0<a.cell.geometry.width)||0==mxUtils.getValue(a.style,
mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)||(c=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null));c==mxConstants.NONE&&(c=null);return c};mxCellEditor.prototype.getMinimumSize=function(a){var c=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*c+20,30)};var q=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,c,b,e,d,k){mxEvent.isAltDown(k)&&(d=null);q.apply(this,arguments)};mxGraphView.prototype.formatUnitText=
function(a){return a?b(a,this.unit):a};mxGraphHandler.prototype.updateHint=function(c){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var e=this.graph.view.translate,d=this.graph.view.scale;c=this.roundLength((this.bounds.x+this.currentDx)/d-e.x);e=this.roundLength((this.bounds.y+this.currentDy)/d-e.y);d=this.graph.view.unit;this.hint.innerHTML=b(c,d)+", "+b(e,d);this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/
@@ -2453,8 +2456,8 @@ function(a){return a?b(a,this.unit):a};mxGraphHandler.prototype.updateHint=funct
"childLayout",null)};mxVertexHandler.prototype.isCenteredEvent=function(a,c){return!(!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(c.getEvent())||mxEvent.isMetaDown(c.getEvent())};var n=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),c=
this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(c/=2,a.x=this.sizers[0].bounds.width+c,a.y=this.sizers[0].bounds.height+c):a=n.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(c){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";
else{c=this.state.view.scale;var e=this.state.view.unit;this.hint.innerHTML=b(this.roundLength(this.bounds.width/c),e)+" x "+b(this.roundLength(this.bounds.height/c),e)}c=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==c&&(c=this.bounds);this.hint.style.left=c.x+Math.round((c.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=c.y+c.height+12+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};
-mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var g=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(a,c){g.apply(this,arguments);null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none")};var y=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=
-function(a,c){y.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(c,e){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var d=this.graph.view.translate,k=this.graph.view.scale,g=this.roundLength(e.x/k-d.x),d=this.roundLength(e.y/k-d.y),k=this.graph.view.unit;this.hint.innerHTML=b(g,k)+", "+b(d,k);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=
+mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var g=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(a,c){g.apply(this,arguments);null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none")};var x=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=
+function(a,c){x.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(c,e){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var d=this.graph.view.translate,k=this.graph.view.scale,g=this.roundLength(e.x/k-d.x),d=this.roundLength(e.y/k-d.y),k=this.graph.view.unit;this.hint.innerHTML=b(g,k)+", "+b(d,k);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=
this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(g=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*g.x)+"%, "+Math.round(100*g.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(c.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(c.getGraphY(),e.y)+this.state.view.graph.gridSize+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=
mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=
mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><path d="m 7 7 L 11 11 M 7 11 L 11 7" stroke="#fff"/>'):new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="9" cy="9" r="2" stroke="#fff" fill="transparent"/>'):new mxImage(IMAGE_PATH+
@@ -2468,40 +2471,40 @@ function(a){return!mxEvent.isShiftDown(a.getEvent())};if(Graph.touchStyle){if(mx
function(a){var c=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(c)||mxEvent.isPopupTrigger(c)&&(null==a.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))};var A=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,c){A.apply(this,arguments);mxEvent.isTouchEvent(c.getEvent())&&this.graph.isCellSelected(c.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var c=
a.getEvent();return mxEvent.isLeftMouseButton(c)&&(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(c)&&!mxEvent.isShiftDown(c))||this.usePopupTrigger&&mxEvent.isPopupTrigger(c)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.mouseUp=function(a,c){var b=null!=this.div&&"none"!=this.div.style.display,
e=null,d=null,k=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(e=this.first.x,d=this.first.y,k=(this.currentX-e)/this.graph.view.scale,g=(this.currentY-d)/this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(k=this.graph.snap(k),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(k)<this.graph.tolerance&&(k=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(b){if(mxEvent.isAltDown(c.getEvent())&&this.graph.isToggleEvent(c.getEvent())){var k=new mxRectangle(this.x,
-this.y,this.width,this.height),f=this.graph.getCells(k.x,k.y,k.width,k.height);this.graph.removeSelectionCells(f)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(f=this.graph.getCellsBeyond(e,d,this.graph.getDefaultParent(),!0,!0),b=0;b<f.length;b++)if(this.graph.isCellMovable(f[b])){var n=this.graph.view.getState(f[b]),v=this.graph.getCellGeometry(f[b]);null!=n&&null!=v&&(v=v.clone(),v.translate(k,g),this.graph.model.setGeometry(f[b],v))}}finally{this.graph.model.endUpdate()}}else k=
+this.y,this.width,this.height),f=this.graph.getCells(k.x,k.y,k.width,k.height);this.graph.removeSelectionCells(f)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(f=this.graph.getCellsBeyond(e,d,this.graph.getDefaultParent(),!0,!0),b=0;b<f.length;b++)if(this.graph.isCellMovable(f[b])){var n=this.graph.view.getState(f[b]),y=this.graph.getCellGeometry(f[b]);null!=n&&null!=y&&(y=y.clone(),y.translate(k,g),this.graph.model.setGeometry(f[b],y))}}finally{this.graph.model.endUpdate()}}else k=
new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(k,c.getEvent());c.consume()}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),e=mxUtils.getOffset(this.graph.container);b.x-=e.x;b.y-=e.y;var e=c.getX()+b.x,b=c.getY()+b.y,d=this.first.x-e,k=this.first.y-b,g=this.graph.tolerance;if(null!=this.div||Math.abs(d)>g||Math.abs(k)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),
this.update(e,b),this.isSpaceEvent(c)?(e=this.x+this.width,b=this.y+this.height,d=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/d)*d,this.height=this.graph.snap(this.height/d)*d,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=e-this.width),this.y<this.first.y&&(this.y=b-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor=
"white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+
"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),c.consume()}};var t=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),
-this.secondDiv=null);t.apply(this,arguments)};var F=(new Date).getTime(),z=0,D=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,e){D.apply(this,arguments);b!=this.currentTerminalState?(F=(new Date).getTime(),z=0):z=(new Date).getTime()-F;this.currentTerminalState=b};var E=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&
-2E3<z||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&E.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,c){var b=null!=a&&0==a,e=this.state.getVisibleTerminalState(b),d=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,
-e,b):null,b=null!=(null!=d?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),d):null)?this.fixedHandleImage:null!=d&&null!=e?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=!1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var v=mxVertexHandler.prototype.createSizerShape;
-mxVertexHandler.prototype.createSizerShape=function(a,c,b){this.handleImage=c==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return v.apply(this,arguments)};var I=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),b=c.getParent(a[0]),e=this.graph.getCellGeometry(a[0]);if(c.isEdge(b)&&null!=e&&e.relative&&(c=this.graph.view.getState(a[0]),
-null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return I.apply(this,arguments)};var V=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=V.apply(this,arguments),c=[],b=0;b<a.length;b++)"1"!=mxUtils.getValue(a[b].style,"part","0")&&c.push(a[b]);return c};var J=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),
-b=c.getParent(a.cell),e=this.graph.getCellGeometry(a.cell);return c.isEdge(b)&&null!=e&&e.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):J.apply(this,arguments)};var Q=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),e=b.getParent(this.state.cell),d=this.graph.getCellGeometry(this.state.cell);
-(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(e)||null==d||!d.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Q.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};
-var C=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,c){C.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var K=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){K.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&
-(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};var N=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){N.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var c=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&
+this.secondDiv=null);t.apply(this,arguments)};var E=(new Date).getTime(),z=0,G=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,e){G.apply(this,arguments);b!=this.currentTerminalState?(E=(new Date).getTime(),z=0):z=(new Date).getTime()-E;this.currentTerminalState=b};var D=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&
+2E3<z||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&D.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,c){var b=null!=a&&0==a,e=this.state.getVisibleTerminalState(b),d=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,
+e,b):null,b=null!=(null!=d?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),d):null)?this.fixedHandleImage:null!=d&&null!=e?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=!1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var y=mxVertexHandler.prototype.createSizerShape;
+mxVertexHandler.prototype.createSizerShape=function(a,c,b){this.handleImage=c==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return y.apply(this,arguments)};var I=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),b=c.getParent(a[0]),e=this.graph.getCellGeometry(a[0]);if(c.isEdge(b)&&null!=e&&e.relative&&(c=this.graph.view.getState(a[0]),
+null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return I.apply(this,arguments)};var O=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=O.apply(this,arguments),c=[],b=0;b<a.length;b++)"1"!=mxUtils.getValue(a[b].style,"part","0")&&c.push(a[b]);return c};var J=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),
+b=c.getParent(a.cell),e=this.graph.getCellGeometry(a.cell);return c.isEdge(b)&&null!=e&&e.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):J.apply(this,arguments)};var S=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),e=b.getParent(this.state.cell),d=this.graph.getCellGeometry(this.state.cell);
+(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(e)||null==d||!d.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&S.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};
+var C=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,c){C.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var L=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){L.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&
+(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};var P=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){P.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var c=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&
this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(a,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));c()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,c){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,
this.editingHandler);var b=this.graph.getLinkForCell(this.state.cell),e=this.graph.getLinksForState(this.state);this.updateLinkHint(b,e);if(null!=b||null!=e&&0<e.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(c,b){if(null==c&&(null==b||0==b.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=c||null!=b&&0<b.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding=
"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));this.linkHint.innerHTML="";if(null!=c&&(this.linkHint.appendChild(this.graph.createLinkForHint(c)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var e=document.createElement("img");e.setAttribute("src",Editor.editImage);e.setAttribute("title",mxResources.get("editLink"));e.setAttribute("width","11");e.setAttribute("height","11");e.style.marginLeft="10px";
e.style.marginBottom="-1px";e.style.cursor="pointer";this.linkHint.appendChild(e);mxEvent.addListener(e,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));e=document.createElement("img");e.setAttribute("src",Dialog.prototype.clearImage);e.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));e.setAttribute("width","13");e.setAttribute("height","10");e.style.marginLeft="4px";e.style.marginBottom="-1px";
e.style.cursor="pointer";this.linkHint.appendChild(e);mxEvent.addListener(e,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(a)}))}if(null!=b)for(e=0;e<b.length;e++){var d=document.createElement("div");d.style.marginTop=null!=c||0<e?"6px":"0px";d.appendChild(this.graph.createLinkForHint(b[e].getAttribute("href"),mxUtils.getTextContent(b[e])));this.linkHint.appendChild(d)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;
-var R=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){R.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?"":
+var T=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){T.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":
"none")});this.changeHandler=mxUtils.bind(this,function(c,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var c=this.graph.getLinkForCell(this.state.cell),b=this.graph.getLinksForState(this.state);if(null!=c||null!=b&&0<b.length)this.updateLinkHint(c,b),this.redrawHandles()};
var ba=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){ba.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Y=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?
"none":"");Y.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),c=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),b=mxUtils.getBoundingBox(c,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=b?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,c=null!=this.state.text?this.state.text.boundingBox:null;null==b&&(b=this.state);b=b.y+b.height;
-null!=c&&(b=Math.max(b,c.y+c.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var G=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){G.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),
+null!=c&&(b=Math.max(b,c.y+c.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var F=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){F.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),
this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var aa=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(aa.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));
this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var ea=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ea.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var fa=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){fa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),
-this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function f(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function l(){mxCylinder.call(this)}function m(){mxActor.call(this)}function p(){mxCylinder.call(this)}function u(){mxActor.call(this)}function x(){mxActor.call(this)}function B(){mxActor.call(this)}function c(){mxActor.call(this)}function e(){mxActor.call(this)}function k(){mxActor.call(this)}function q(){mxActor.call(this)}function n(a,c){this.canvas=
+this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function f(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function l(){mxCylinder.call(this)}function m(){mxActor.call(this)}function p(){mxCylinder.call(this)}function u(){mxActor.call(this)}function v(){mxActor.call(this)}function B(){mxActor.call(this)}function c(){mxActor.call(this)}function e(){mxActor.call(this)}function k(){mxActor.call(this)}function q(){mxActor.call(this)}function n(a,c){this.canvas=
a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=c;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,n.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,n.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,n.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,n.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,n.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,n.prototype.arcTo)}function g(){mxRectangleShape.call(this)}function y(){mxRectangleShape.call(this)}function A(){mxActor.call(this)}function t(){mxActor.call(this)}function F(){mxActor.call(this)}function z(){mxRectangleShape.call(this)}function D(){mxRectangleShape.call(this)}function E(){mxCylinder.call(this)}function v(){mxShape.call(this)}function I(){mxShape.call(this)}
-function V(){mxEllipse.call(this)}function J(){mxShape.call(this)}function Q(){mxShape.call(this)}function C(){mxRectangleShape.call(this)}function K(){mxShape.call(this)}function N(){mxShape.call(this)}function R(){mxShape.call(this)}function ba(){mxShape.call(this)}function Y(){mxShape.call(this)}function G(){mxCylinder.call(this)}function aa(){mxDoubleEllipse.call(this)}function ea(){mxDoubleEllipse.call(this)}function fa(){mxArrowConnector.call(this);this.spacing=0}function O(){mxArrowConnector.call(this);
-this.spacing=0}function ha(){mxActor.call(this)}function T(){mxRectangleShape.call(this)}function W(){mxActor.call(this)}function la(){mxActor.call(this)}function ma(){mxActor.call(this)}function X(){mxActor.call(this)}function ia(){mxActor.call(this)}function M(){mxActor.call(this)}function L(){mxActor.call(this)}function ja(){mxActor.call(this)}function P(){mxActor.call(this)}function S(){mxActor.call(this)}function ga(){mxEllipse.call(this)}function ta(){mxEllipse.call(this)}function H(){mxEllipse.call(this)}
-function oa(){mxRhombus.call(this)}function ca(){mxEllipse.call(this)}function da(){mxEllipse.call(this)}function Aa(){mxEllipse.call(this)}function wa(){mxEllipse.call(this)}function za(){mxActor.call(this)}function na(){mxActor.call(this)}function ka(){mxActor.call(this)}function ra(){mxConnector.call(this)}function Ea(a,c,b,e,d,k,g,f,n,v){g+=n;var U=e.clone();e.x-=d*(2*g+n);e.y-=k*(2*g+n);d*=g+n;k*=g+n;return function(){a.ellipse(U.x-d-g,U.y-k-g,2*g,2*g);v?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,
-mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,c,b,e,d){var k=Math.max(0,Math.min(e,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),U=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));a.translate(c,b);a.begin();a.moveTo(0,0);a.lineTo(e-k,0);a.lineTo(e,
-k);a.lineTo(e,d);a.lineTo(k,d);a.lineTo(0,d-k);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(e-k,0),a.lineTo(e,k),a.lineTo(k,k),a.close(),a.fill()),0!=U&&(a.setFillAlpha(Math.abs(U)),a.setFillColor(0>U?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(k,k),a.lineTo(k,d),a.lineTo(0,d-k),a.close(),a.fill()),a.begin(),a.moveTo(k,d),a.lineTo(k,k),a.lineTo(0,
+this.canvas.curveTo=mxUtils.bind(this,n.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,n.prototype.arcTo)}function g(){mxRectangleShape.call(this)}function x(){mxRectangleShape.call(this)}function A(){mxActor.call(this)}function t(){mxActor.call(this)}function E(){mxActor.call(this)}function z(){mxRectangleShape.call(this)}function G(){mxRectangleShape.call(this)}function D(){mxCylinder.call(this)}function y(){mxShape.call(this)}function I(){mxShape.call(this)}
+function O(){mxEllipse.call(this)}function J(){mxShape.call(this)}function S(){mxShape.call(this)}function C(){mxRectangleShape.call(this)}function L(){mxShape.call(this)}function P(){mxShape.call(this)}function T(){mxShape.call(this)}function ba(){mxShape.call(this)}function Y(){mxShape.call(this)}function F(){mxCylinder.call(this)}function aa(){mxDoubleEllipse.call(this)}function ea(){mxDoubleEllipse.call(this)}function fa(){mxArrowConnector.call(this);this.spacing=0}function Q(){mxArrowConnector.call(this);
+this.spacing=0}function ha(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function W(){mxActor.call(this)}function la(){mxActor.call(this)}function ma(){mxActor.call(this)}function X(){mxActor.call(this)}function ia(){mxActor.call(this)}function N(){mxActor.call(this)}function M(){mxActor.call(this)}function ja(){mxActor.call(this)}function R(){mxActor.call(this)}function U(){mxActor.call(this)}function ga(){mxEllipse.call(this)}function ta(){mxEllipse.call(this)}function H(){mxEllipse.call(this)}
+function oa(){mxRhombus.call(this)}function ca(){mxEllipse.call(this)}function da(){mxEllipse.call(this)}function Aa(){mxEllipse.call(this)}function wa(){mxEllipse.call(this)}function za(){mxActor.call(this)}function na(){mxActor.call(this)}function ka(){mxActor.call(this)}function ra(){mxConnector.call(this)}function Ea(a,c,b,e,d,k,g,f,n,y){g+=n;var K=e.clone();e.x-=d*(2*g+n);e.y-=k*(2*g+n);d*=g+n;k*=g+n;return function(){a.ellipse(K.x-d-g,K.y-k-g,2*g,2*g);y?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,
+mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,c,b,e,d){var k=Math.max(0,Math.min(e,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),K=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));a.translate(c,b);a.begin();a.moveTo(0,0);a.lineTo(e-k,0);a.lineTo(e,
+k);a.lineTo(e,d);a.lineTo(k,d);a.lineTo(0,d-k);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(e-k,0),a.lineTo(e,k),a.lineTo(k,k),a.close(),a.fill()),0!=K&&(a.setFillAlpha(Math.abs(K)),a.setFillColor(0>K?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(k,k),a.lineTo(k,d),a.lineTo(0,d-k),a.close(),a.fill()),a.begin(),a.moveTo(k,d),a.lineTo(k,k),a.lineTo(0,
0),a.moveTo(k,k),a.lineTo(e,k),a.end(),a.stroke())};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var sa=Math.tan(mxUtils.toRadians(30)),pa=(.5-sa)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,c,b,e,d){c=Math.min(e,d/sa);a.translate((e-c)/2,(d-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*
c,c*pa);a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-pa)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",b);mxUtils.extend(f,mxCylinder);f.prototype.size=20;f.prototype.redrawPath=function(a,c,b,e,d,k){c=Math.min(e,d/(.5+sa));k?(a.moveTo(0,.25*c),a.lineTo(.5*c,(.5-pa)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-pa)*c),a.lineTo(.5*c,(1-pa)*c)):(a.translate((e-c)/2,(d-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*pa),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-pa)*c),a.lineTo(0,
.75*c),a.close());a.end()};mxCellRenderer.registerShape("isoCube",f);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(a,c,b,e,d,k){c=Math.min(d/2,Math.round(d/8)+this.strokewidth-1);if(k&&null!=this.fill||!k&&null==this.fill)a.moveTo(0,c),a.curveTo(0,2*c,e,2*c,e,c),k||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,e,2*c,e,c),k||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,e,2*c,e,c),k||(a.stroke(),a.begin()),a.translate(0,-c);k||(a.moveTo(0,
@@ -2509,71 +2512,71 @@ c),a.curveTo(0,-c/3,e,-c/3,e,c),a.lineTo(e,d-c),a.curveTo(e,d+c/3,0,d+c/3,0,d-c)
Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(c,b);a.begin();a.moveTo(0,0);a.lineTo(e-k,0);a.lineTo(e,k);a.lineTo(e,d);a.lineTo(0,d);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(e-k,0),a.lineTo(e-k,k),a.lineTo(e,k),a.close(),a.fill()),a.begin(),a.moveTo(e-k,0),a.lineTo(e-k,k),a.lineTo(e,k),a.end(),a.stroke())};
mxCellRenderer.registerShape("note",l);mxUtils.extend(m,mxActor);m.prototype.redrawPath=function(a,c,b,e,d){a.moveTo(0,0);a.quadTo(e/2,.5*d,e,0);a.quadTo(.5*e,d/2,e,d);a.quadTo(e/2,.5*d,0,d);a.quadTo(.5*e,d/2,0,0);a.end()};mxCellRenderer.registerShape("switch",m);mxUtils.extend(p,mxCylinder);p.prototype.tabWidth=60;p.prototype.tabHeight=20;p.prototype.tabPosition="right";p.prototype.redrawPath=function(a,c,b,e,d,k){c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));
b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var g=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);k?"left"==g?(a.moveTo(0,b),a.lineTo(c,b)):(a.moveTo(e-c,b),a.lineTo(e,b)):("left"==g?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,b),a.lineTo(e,b)):(a.moveTo(0,b),a.lineTo(e-c,b),a.lineTo(e-c,0),a.lineTo(e,0)),a.lineTo(e,d),a.lineTo(0,d),a.lineTo(0,b),a.close());a.end()};mxCellRenderer.registerShape("folder",p);mxUtils.extend(u,mxActor);u.prototype.size=
-30;u.prototype.isRoundable=function(){return!0};u.prototype.redrawPath=function(a,c,b,e,d){c=Math.max(0,Math.min(e,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(e,0),new mxPoint(e,d),new mxPoint(0,d),new mxPoint(0,c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("card",u);mxUtils.extend(x,mxActor);x.prototype.size=.4;x.prototype.redrawPath=
-function(a,c,b,e,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,c/2);a.quadTo(e/4,1.4*c,e/2,c/2);a.quadTo(3*e/4,c*(1-1.4),e,c/2);a.lineTo(e,d-c/2);a.quadTo(3*e/4,d-1.4*c,e/2,d-c/2);a.quadTo(e/4,d-c*(1-1.4),0,d-c/2);a.lineTo(0,c/2);a.close();a.end()};x.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=mxUtils.getValue(this.style,"size",this.size),b=a.width,e=a.height;if(null==this.direction||this.direction==
-mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=e,new mxRectangle(a.x,a.y+c,b,e-2*c);c*=b;return new mxRectangle(a.x+c,a.y,b-2*c,e)}return a};mxCellRenderer.registerShape("tape",x);mxUtils.extend(B,mxActor);B.prototype.size=.3;B.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};B.prototype.redrawPath=function(a,c,b,e,d){c=d*Math.max(0,
+30;u.prototype.isRoundable=function(){return!0};u.prototype.redrawPath=function(a,c,b,e,d){c=Math.max(0,Math.min(e,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(e,0),new mxPoint(e,d),new mxPoint(0,d),new mxPoint(0,c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("card",u);mxUtils.extend(v,mxActor);v.prototype.size=.4;v.prototype.redrawPath=
+function(a,c,b,e,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,c/2);a.quadTo(e/4,1.4*c,e/2,c/2);a.quadTo(3*e/4,c*(1-1.4),e,c/2);a.lineTo(e,d-c/2);a.quadTo(3*e/4,d-1.4*c,e/2,d-c/2);a.quadTo(e/4,d-c*(1-1.4),0,d-c/2);a.lineTo(0,c/2);a.close();a.end()};v.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=mxUtils.getValue(this.style,"size",this.size),b=a.width,e=a.height;if(null==this.direction||this.direction==
+mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=e,new mxRectangle(a.x,a.y+c,b,e-2*c);c*=b;return new mxRectangle(a.x+c,a.y,b-2*c,e)}return a};mxCellRenderer.registerShape("tape",v);mxUtils.extend(B,mxActor);B.prototype.size=.3;B.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};B.prototype.redrawPath=function(a,c,b,e,d){c=d*Math.max(0,
Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(e,0);a.lineTo(e,d-c/2);a.quadTo(3*e/4,d-1.4*c,e/2,d-c/2);a.quadTo(e/4,d-c*(1-1.4),0,d-c/2);a.lineTo(0,c/2);a.close();a.end()};mxCellRenderer.registerShape("document",B);var Ka=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,c,b,e){var d=mxUtils.getValue(this.style,"size");return null!=d?e*Math.max(0,Math.min(1,d)):Ka.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=
function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*c),0,0)}return null};mxUtils.extend(c,mxActor);c.prototype.size=.2;c.prototype.isRoundable=function(){return!0};c.prototype.redrawPath=function(a,c,b,e,d){c=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(c,0),new mxPoint(e,0),new mxPoint(e-c,d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("parallelogram",c);mxUtils.extend(e,mxActor);e.prototype.size=.2;e.prototype.isRoundable=function(){return!0};e.prototype.redrawPath=function(a,c,b,e,d){c=e*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,
d),new mxPoint(c,0),new mxPoint(e-c,0),new mxPoint(e,d)],this.isRounded,b,!0)};mxCellRenderer.registerShape("trapezoid",e);mxUtils.extend(k,mxActor);k.prototype.size=.5;k.prototype.redrawPath=function(a,c,b,e,d){a.setFillColor(null);c=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(e,0),new mxPoint(c,0),new mxPoint(c,d/2),new mxPoint(0,d/2),new mxPoint(c,
d/2),new mxPoint(c,d),new mxPoint(e,d)],this.isRounded,b,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",k);mxUtils.extend(q,mxActor);q.prototype.redrawPath=function(a,c,b,e,d){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=e/5;a.rect(0,0,c,d);a.fillAndStroke();a.rect(2*c,0,c,d);a.fillAndStroke();a.rect(4*c,0,c,d);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",q);n.prototype.moveTo=function(a,c){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=
c;this.firstX=a;this.firstY=c};n.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};n.prototype.quadTo=function(a,c,b,e){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=e};n.prototype.curveTo=function(a,c,b,e,d,k){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=k};n.prototype.arcTo=function(a,c,b,e,
-d,k,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=k;this.lastY=g};n.prototype.lineTo=function(a,c){if(null!=this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},e=Math.abs(a-this.lastX),d=Math.abs(c-this.lastY),k=Math.sqrt(e*e+d*d);if(2>k){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var g=Math.round(k/10),f=this.defaultVariation;5>g&&(g=5,f/=3);for(var U=b(a-this.lastX)*e/g,b=b(c-this.lastY)*d/g,
-e=e/k,d=d/k,k=0;k<g;k++){var n=(Math.random()-.5)*f;this.originalLineTo.call(this.canvas,U*k+this.lastX-n*d,b*k+this.lastY-n*e)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};n.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};
+d,k,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=k;this.lastY=g};n.prototype.lineTo=function(a,c){if(null!=this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},e=Math.abs(a-this.lastX),d=Math.abs(c-this.lastY),k=Math.sqrt(e*e+d*d);if(2>k){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var g=Math.round(k/10),f=this.defaultVariation;5>g&&(g=5,f/=3);for(var K=b(a-this.lastX)*e/g,b=b(c-this.lastY)*d/g,
+e=e/k,d=d/k,k=0;k<g;k++){var n=(Math.random()-.5)*f;this.originalLineTo.call(this.canvas,K*k+this.lastX-n*d,b*k+this.lastY-n*e)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};n.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};
var Ba=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new n(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ba.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var La=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==
this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&La.apply(this,arguments)};var Ca=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,c,b,e,d){if(null==a.handJiggle)Ca.apply(this,arguments);else{var k=!0;null!=this.style&&(k="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(k||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)k||null!=this.fill&&this.fill!=mxConstants.NONE||
(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?k=Math.min(e/2,Math.min(d/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,k=Math.min(e*k,d*k)),a.moveTo(c+k,b),a.lineTo(c+e-k,b),a.quadTo(c+e,b,c+e,b+k),a.lineTo(c+e,b+d-k),a.quadTo(c+e,b+d,c+e-k,b+d),a.lineTo(c+k,b+d),a.quadTo(c,b+d,c,b+d-k),
a.lineTo(c,b+k),a.quadTo(c,b,c+k,b)):(a.moveTo(c,b),a.lineTo(c+e,b),a.lineTo(c+e,b+d),a.lineTo(c,b+d),a.lineTo(c,b)),a.close(),a.end(),a.fillAndStroke()}};var xa=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,b,e,d){null==a.handJiggle&&xa.apply(this,arguments)};mxUtils.extend(g,mxRectangleShape);g.prototype.size=.1;g.prototype.isHtmlAllowed=function(){return!1};g.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,
!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var c=a.width,b=a.height;a=new mxRectangle(a.x,a.y,c,b);var e=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(c*d,b*d));a.x+=Math.round(e);a.width-=Math.round(2*e)}return a};g.prototype.paintForeground=
-function(a,c,b,e,d){var k=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,k=Math.max(k,Math.min(e*g,d*g));k=Math.round(k);a.begin();a.moveTo(c+k,b);a.lineTo(c+k,b+d);a.moveTo(c+e-k,b);a.lineTo(c+e-k,b+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",g);mxUtils.extend(y,
-mxRectangleShape);y.prototype.paintBackground=function(a,c,b,e,d){a.setFillColor(mxConstants.NONE);a.rect(c,b,e,d);a.fill()};y.prototype.paintForeground=function(a,c,b,e,d){};mxCellRenderer.registerShape("transparent",y);mxUtils.extend(A,mxHexagon);A.prototype.size=30;A.prototype.position=.5;A.prototype.position2=.5;A.prototype.base=20;A.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};A.prototype.isRoundable=
+function(a,c,b,e,d){var k=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,k=Math.max(k,Math.min(e*g,d*g));k=Math.round(k);a.begin();a.moveTo(c+k,b);a.lineTo(c+k,b+d);a.moveTo(c+e-k,b);a.lineTo(c+e-k,b+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",g);mxUtils.extend(x,
+mxRectangleShape);x.prototype.paintBackground=function(a,c,b,e,d){a.setFillColor(mxConstants.NONE);a.rect(c,b,e,d);a.fill()};x.prototype.paintForeground=function(a,c,b,e,d){};mxCellRenderer.registerShape("transparent",x);mxUtils.extend(A,mxHexagon);A.prototype.size=30;A.prototype.position=.5;A.prototype.position2=.5;A.prototype.base=20;A.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};A.prototype.isRoundable=
function(){return!0};A.prototype.redrawPath=function(a,c,b,e,d){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var k=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"base",this.base))));
this.addPoints(a,[new mxPoint(0,0),new mxPoint(e,0),new mxPoint(e,d-b),new mxPoint(Math.min(e,k+f),d-b),new mxPoint(g,d),new mxPoint(Math.max(0,k),d-b),new mxPoint(0,d-b)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",A);mxUtils.extend(t,mxActor);t.prototype.size=.2;t.prototype.fixedSize=20;t.prototype.isRoundable=function(){return!0};t.prototype.redrawPath=function(a,c,b,e,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,
-"size",this.fixedSize)))):e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(e-c,0),new mxPoint(e,d/2),new mxPoint(e-c,d),new mxPoint(0,d),new mxPoint(c,d/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",t);mxUtils.extend(F,mxHexagon);F.prototype.size=.25;F.prototype.isRoundable=function(){return!0};F.prototype.redrawPath=
-function(a,c,b,e,d){c=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(e-c,0),new mxPoint(e,.5*d),new mxPoint(e-c,d),new mxPoint(c,d),new mxPoint(0,.5*d)],this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",F);mxUtils.extend(z,mxRectangleShape);z.prototype.isHtmlAllowed=function(){return!1};z.prototype.paintForeground=function(a,
+"size",this.fixedSize)))):e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(e-c,0),new mxPoint(e,d/2),new mxPoint(e-c,d),new mxPoint(0,d),new mxPoint(c,d/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",t);mxUtils.extend(E,mxHexagon);E.prototype.size=.25;E.prototype.isRoundable=function(){return!0};E.prototype.redrawPath=
+function(a,c,b,e,d){c=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(e-c,0),new mxPoint(e,.5*d),new mxPoint(e-c,d),new mxPoint(c,d),new mxPoint(0,.5*d)],this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",E);mxUtils.extend(z,mxRectangleShape);z.prototype.isHtmlAllowed=function(){return!1};z.prototype.paintForeground=function(a,
c,b,e,d){var k=Math.min(e/5,d/5)+1;a.begin();a.moveTo(c+e/2,b+k);a.lineTo(c+e/2,b+d-k);a.moveTo(c+k,b+d/2);a.lineTo(c+e-k,b+d/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",z);var ua=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+
-c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,b,e,d){ua.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var k=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=k;b+=k;e-=2*k;d-=2*k;0<e&&0<d&&(a.setShadow(!1),ua.apply(this,[a,c,b,e,d]))}};mxUtils.extend(D,mxRectangleShape);D.prototype.isHtmlAllowed=function(){return!1};D.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(Math.max(2,
-this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};D.prototype.paintForeground=function(a,c,b,e,d){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var k=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=k;b+=k;e-=2*k;d-=2*k;0<e&&0<d&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var k=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+
-k]];if(null!=g){var f=this.style["symbol"+k+"Align"],U=this.style["symbol"+k+"VerticalAlign"],n=this.style["symbol"+k+"Width"],v=this.style["symbol"+k+"Height"],q=this.style["symbol"+k+"Spacing"]||0,t=this.style["symbol"+k+"VSpacing"]||q,y=this.style["symbol"+k+"ArcSpacing"];null!=y&&(y*=this.getArcSize(e+this.strokewidth,d+this.strokewidth),q+=y,t+=y);var y=c,l=b,y=f==mxConstants.ALIGN_CENTER?y+(e-n)/2:f==mxConstants.ALIGN_RIGHT?y+(e-n-q):y+q,l=U==mxConstants.ALIGN_MIDDLE?l+(d-v)/2:U==mxConstants.ALIGN_BOTTOM?
-l+(d-v-t):l+t;a.save();f=new g;f.style=this.style;g.prototype.paintVertexShape.call(f,a,y,l,n,v);a.restore()}k++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",D);mxUtils.extend(E,mxCylinder);E.prototype.redrawPath=function(a,c,b,e,d,k){k?(a.moveTo(0,0),a.lineTo(e/2,d/2),a.lineTo(e,0),a.end()):(a.moveTo(0,0),a.lineTo(e,0),a.lineTo(e,d),a.lineTo(0,d),a.close())};mxCellRenderer.registerShape("message",E);mxUtils.extend(v,mxShape);
-v.prototype.paintBackground=function(a,c,b,e,d){a.translate(c,b);a.ellipse(e/4,0,e/2,d/4);a.fillAndStroke();a.begin();a.moveTo(e/2,d/4);a.lineTo(e/2,2*d/3);a.moveTo(e/2,d/3);a.lineTo(0,d/3);a.moveTo(e/2,d/3);a.lineTo(e,d/3);a.moveTo(e/2,2*d/3);a.lineTo(0,d);a.moveTo(e/2,2*d/3);a.lineTo(e,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",v);mxUtils.extend(I,mxShape);I.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};I.prototype.paintBackground=function(a,
-c,b,e,d){a.translate(c,b);a.begin();a.moveTo(0,d/4);a.lineTo(0,3*d/4);a.end();a.stroke();a.begin();a.moveTo(0,d/2);a.lineTo(e/6,d/2);a.end();a.stroke();a.ellipse(e/6,0,5*e/6,d);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",I);mxUtils.extend(V,mxEllipse);V.prototype.paintVertexShape=function(a,c,b,e,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+e/8,b+d);a.lineTo(c+7*e/8,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",V);mxUtils.extend(J,
-mxShape);J.prototype.paintVertexShape=function(a,c,b,e,d){a.translate(c,b);a.begin();a.moveTo(e,0);a.lineTo(0,d);a.moveTo(0,0);a.lineTo(e,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",J);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,c,b,e,d){a.translate(c,b);a.begin();a.moveTo(3*e/8,d/8*1.1);a.lineTo(5*e/8,0);a.end();a.stroke();a.ellipse(0,d/8,e,7*d/8);a.fillAndStroke()};
-Q.prototype.paintForeground=function(a,c,b,e,d){a.begin();a.moveTo(3*e/8,d/8*1.1);a.lineTo(5*e/8,d/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",Q);mxUtils.extend(C,mxRectangleShape);C.prototype.size=40;C.prototype.isHtmlAllowed=function(){return!1};C.prototype.getLabelBounds=function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,c)};C.prototype.paintBackground=function(a,c,b,e,
+c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,b,e,d){ua.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var k=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=k;b+=k;e-=2*k;d-=2*k;0<e&&0<d&&(a.setShadow(!1),ua.apply(this,[a,c,b,e,d]))}};mxUtils.extend(G,mxRectangleShape);G.prototype.isHtmlAllowed=function(){return!1};G.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(Math.max(2,
+this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};G.prototype.paintForeground=function(a,c,b,e,d){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var k=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=k;b+=k;e-=2*k;d-=2*k;0<e&&0<d&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var k=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+
+k]];if(null!=g){var f=this.style["symbol"+k+"Align"],K=this.style["symbol"+k+"VerticalAlign"],n=this.style["symbol"+k+"Width"],y=this.style["symbol"+k+"Height"],q=this.style["symbol"+k+"Spacing"]||0,t=this.style["symbol"+k+"VSpacing"]||q,x=this.style["symbol"+k+"ArcSpacing"];null!=x&&(x*=this.getArcSize(e+this.strokewidth,d+this.strokewidth),q+=x,t+=x);var x=c,l=b,x=f==mxConstants.ALIGN_CENTER?x+(e-n)/2:f==mxConstants.ALIGN_RIGHT?x+(e-n-q):x+q,l=K==mxConstants.ALIGN_MIDDLE?l+(d-y)/2:K==mxConstants.ALIGN_BOTTOM?
+l+(d-y-t):l+t;a.save();f=new g;f.style=this.style;g.prototype.paintVertexShape.call(f,a,x,l,n,y);a.restore()}k++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",G);mxUtils.extend(D,mxCylinder);D.prototype.redrawPath=function(a,c,b,e,d,k){k?(a.moveTo(0,0),a.lineTo(e/2,d/2),a.lineTo(e,0),a.end()):(a.moveTo(0,0),a.lineTo(e,0),a.lineTo(e,d),a.lineTo(0,d),a.close())};mxCellRenderer.registerShape("message",D);mxUtils.extend(y,mxShape);
+y.prototype.paintBackground=function(a,c,b,e,d){a.translate(c,b);a.ellipse(e/4,0,e/2,d/4);a.fillAndStroke();a.begin();a.moveTo(e/2,d/4);a.lineTo(e/2,2*d/3);a.moveTo(e/2,d/3);a.lineTo(0,d/3);a.moveTo(e/2,d/3);a.lineTo(e,d/3);a.moveTo(e/2,2*d/3);a.lineTo(0,d);a.moveTo(e/2,2*d/3);a.lineTo(e,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",y);mxUtils.extend(I,mxShape);I.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};I.prototype.paintBackground=function(a,
+c,b,e,d){a.translate(c,b);a.begin();a.moveTo(0,d/4);a.lineTo(0,3*d/4);a.end();a.stroke();a.begin();a.moveTo(0,d/2);a.lineTo(e/6,d/2);a.end();a.stroke();a.ellipse(e/6,0,5*e/6,d);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",I);mxUtils.extend(O,mxEllipse);O.prototype.paintVertexShape=function(a,c,b,e,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+e/8,b+d);a.lineTo(c+7*e/8,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",O);mxUtils.extend(J,
+mxShape);J.prototype.paintVertexShape=function(a,c,b,e,d){a.translate(c,b);a.begin();a.moveTo(e,0);a.lineTo(0,d);a.moveTo(0,0);a.lineTo(e,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",J);mxUtils.extend(S,mxShape);S.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};S.prototype.paintBackground=function(a,c,b,e,d){a.translate(c,b);a.begin();a.moveTo(3*e/8,d/8*1.1);a.lineTo(5*e/8,0);a.end();a.stroke();a.ellipse(0,d/8,e,7*d/8);a.fillAndStroke()};
+S.prototype.paintForeground=function(a,c,b,e,d){a.begin();a.moveTo(3*e/8,d/8*1.1);a.lineTo(5*e/8,d/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",S);mxUtils.extend(C,mxRectangleShape);C.prototype.size=40;C.prototype.isHtmlAllowed=function(){return!1};C.prototype.getLabelBounds=function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,c)};C.prototype.paintBackground=function(a,c,b,e,
d){var k=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,c,b,e,k):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=C&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,c,b,e,k),a.restore()));k<d&&(a.setDashed(!0),a.begin(),a.moveTo(c+e/2,b+k),a.lineTo(c+e/2,b+d),a.end(),a.stroke())};C.prototype.paintForeground=function(a,
-c,b,e,d){var k=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,b,e,Math.min(d,k))};mxCellRenderer.registerShape("umlLifeline",C);mxUtils.extend(K,mxShape);K.prototype.width=60;K.prototype.height=30;K.prototype.corner=10;K.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,
-"height",this.height)*this.scale))};K.prototype.paintBackground=function(a,c,b,e,d){var k=this.corner,g=Math.min(e,Math.max(k,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),f=Math.min(d,Math.max(1.5*k,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),n=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);n!=mxConstants.NONE&&(a.setFillColor(n),a.rect(c,b,e,d),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=
-mxConstants.NONE?(this.getGradientBounds(a,c,b,e,d),a.setGradient(this.fill,this.gradient,c,b,e,d,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,b);a.lineTo(c+g,b);a.lineTo(c+g,b+Math.max(0,f-1.5*k));a.lineTo(c+Math.max(0,g-k),b+f);a.lineTo(c,b+f);a.close();a.fillAndStroke();a.begin();a.moveTo(c+g,b);a.lineTo(c+e,b);a.lineTo(c+e,b+d);a.lineTo(c,b+d);a.lineTo(c,b+f);a.stroke()};mxCellRenderer.registerShape("umlFrame",K);mxPerimeter.LifelinePerimeter=function(a,c,b,e){e=C.prototype.size;
+c,b,e,d){var k=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,b,e,Math.min(d,k))};mxCellRenderer.registerShape("umlLifeline",C);mxUtils.extend(L,mxShape);L.prototype.width=60;L.prototype.height=30;L.prototype.corner=10;L.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))};L.prototype.paintBackground=function(a,c,b,e,d){var k=this.corner,g=Math.min(e,Math.max(k,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),f=Math.min(d,Math.max(1.5*k,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),n=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);n!=mxConstants.NONE&&(a.setFillColor(n),a.rect(c,b,e,d),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=
+mxConstants.NONE?(this.getGradientBounds(a,c,b,e,d),a.setGradient(this.fill,this.gradient,c,b,e,d,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,b);a.lineTo(c+g,b);a.lineTo(c+g,b+Math.max(0,f-1.5*k));a.lineTo(c+Math.max(0,g-k),b+f);a.lineTo(c,b+f);a.close();a.fillAndStroke();a.begin();a.moveTo(c+g,b);a.lineTo(c+e,b);a.lineTo(c+e,b+d);a.lineTo(c,b+d);a.lineTo(c,b+f);a.stroke()};mxCellRenderer.registerShape("umlFrame",L);mxPerimeter.LifelinePerimeter=function(a,c,b,e){e=C.prototype.size;
null!=c&&(e=mxUtils.getValue(c.style,"size",e)*c.view.scale);c=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;b.x<a.getCenterX()&&(c=-1*(c+1));return new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y+e,b.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,c,b,e){e=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);
mxPerimeter.BackbonePerimeter=function(a,c,b,e){e=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;null!=c.style.backboneSize&&(e+=parseFloat(c.style.backboneSize)*c.view.scale/2-1);if("south"==c.style[mxConstants.STYLE_DIRECTION]||"north"==c.style[mxConstants.STYLE_DIRECTION])return b.x<a.getCenterX()&&(e=-1*(e+1)),new mxPoint(a.getCenterX()+e,Math.min(a.y+a.height,Math.max(a.y,b.y)));b.y<a.getCenterY()&&(e=-1*(e+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,b.x)),
a.getCenterY()+e)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,b,e){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",A.prototype.size))*c.view.scale))),c.style),c,b,e)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,e,d){var k=c.prototype.size;
-null!=b&&(k=mxUtils.getValue(b.style,"size",k));var g=a.x,f=a.y,n=a.width,U=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(k=U*Math.max(0,Math.min(1,k)),f=[new mxPoint(g,f),new mxPoint(g+n,f+k),new mxPoint(g+n,f+U),new mxPoint(g,f+U-k),new mxPoint(g,f)]):(k=n*Math.max(0,Math.min(1,k)),f=[new mxPoint(g+k,f),new mxPoint(g+n,f),new mxPoint(g+n-k,f+U),new mxPoint(g,
-f+U),new mxPoint(g+k,f)]);U=a.getCenterX();a=a.getCenterY();a=new mxPoint(U,a);d&&(e.x<g||e.x>g+n?a.y=e.y:a.x=e.x);return mxUtils.getPerimeterPoint(f,a,e)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,b,d){var k=e.prototype.size;null!=c&&(k=mxUtils.getValue(c.style,"size",k));var g=a.x,f=a.y,n=a.width,v=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;
-c==mxConstants.DIRECTION_EAST?(k=n*Math.max(0,Math.min(1,k)),f=[new mxPoint(g+k,f),new mxPoint(g+n-k,f),new mxPoint(g+n,f+v),new mxPoint(g,f+v),new mxPoint(g+k,f)]):c==mxConstants.DIRECTION_WEST?(k=n*Math.max(0,Math.min(1,k)),f=[new mxPoint(g,f),new mxPoint(g+n,f),new mxPoint(g+n-k,f+v),new mxPoint(g+k,f+v),new mxPoint(g,f)]):c==mxConstants.DIRECTION_NORTH?(k=v*Math.max(0,Math.min(1,k)),f=[new mxPoint(g,f+k),new mxPoint(g+n,f),new mxPoint(g+n,f+v),new mxPoint(g,f+v-k),new mxPoint(g,f+k)]):(k=v*Math.max(0,
-Math.min(1,k)),f=[new mxPoint(g,f),new mxPoint(g+n,f+k),new mxPoint(g+n,f+v-k),new mxPoint(g,f+v),new mxPoint(g,f)]);v=a.getCenterX();a=a.getCenterY();a=new mxPoint(v,a);d&&(b.x<g||b.x>g+n?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(f,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,b,e){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),k=d?t.prototype.fixedSize:t.prototype.size;null!=c&&(k=mxUtils.getValue(c.style,
-"size",k));var g=a.x,f=a.y,n=a.width,v=a.height,U=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(d=d?Math.max(0,Math.min(n,k)):n*Math.max(0,Math.min(1,k)),f=[new mxPoint(g,f),new mxPoint(g+n-d,f),new mxPoint(g+n,a),new mxPoint(g+n-d,f+v),new mxPoint(g,f+v),new mxPoint(g+d,a),new mxPoint(g,f)]):c==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(n,k)):n*Math.max(0,
-Math.min(1,k)),f=[new mxPoint(g+d,f),new mxPoint(g+n,f),new mxPoint(g+n-d,a),new mxPoint(g+n,f+v),new mxPoint(g+d,f+v),new mxPoint(g,a),new mxPoint(g+d,f)]):c==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(v,k)):v*Math.max(0,Math.min(1,k)),f=[new mxPoint(g,f+d),new mxPoint(U,f),new mxPoint(g+n,f+d),new mxPoint(g+n,f+v),new mxPoint(U,f+v-d),new mxPoint(g,f+v),new mxPoint(g,f+d)]):(d=d?Math.max(0,Math.min(v,k)):v*Math.max(0,Math.min(1,k)),f=[new mxPoint(g,f),new mxPoint(U,f+d),new mxPoint(g+
-n,f),new mxPoint(g+n,f+v-d),new mxPoint(U,f+v),new mxPoint(g,f+v-d),new mxPoint(g,f)]);U=new mxPoint(U,a);e&&(b.x<g||b.x>g+n?U.y=b.y:U.x=b.x);return mxUtils.getPerimeterPoint(f,U,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,b,e){var d=F.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,"size",d));var k=a.x,g=a.y,f=a.width,n=a.height,v=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,
-mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=n*Math.max(0,Math.min(1,d)),g=[new mxPoint(v,g),new mxPoint(k+f,g+d),new mxPoint(k+f,g+n-d),new mxPoint(v,g+n),new mxPoint(k,g+n-d),new mxPoint(k,g+d),new mxPoint(v,g)]):(d=f*Math.max(0,Math.min(1,d)),g=[new mxPoint(k+d,g),new mxPoint(k+f-d,g),new mxPoint(k+f,a),new mxPoint(k+f-d,g+n),new mxPoint(k+d,g+n),new mxPoint(k,a),new mxPoint(k+d,g)]);v=new mxPoint(v,a);e&&(b.x<k||b.x>k+
-f?v.y=b.y:v.x=b.x);return mxUtils.getPerimeterPoint(g,v,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(N,mxShape);N.prototype.size=10;N.prototype.paintBackground=function(a,c,b,e,d){var k=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,b);a.ellipse((e-k)/2,0,k,k);a.fillAndStroke();a.begin();a.moveTo(e/2,k);a.lineTo(e/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",N);mxUtils.extend(R,mxShape);R.prototype.size=
-10;R.prototype.inset=2;R.prototype.paintBackground=function(a,c,b,e,d){var k=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.begin();a.moveTo(e/2,k+g);a.lineTo(e/2,d);a.end();a.stroke();a.begin();a.moveTo((e-k)/2-g,k/2);a.quadTo((e-k)/2-g,k+g,e/2,k+g);a.quadTo((e+k)/2+g,k+g,(e+k)/2+g,k/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",R);mxUtils.extend(ba,mxShape);ba.prototype.paintBackground=
+null!=b&&(k=mxUtils.getValue(b.style,"size",k));var g=a.x,f=a.y,n=a.width,K=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(k=K*Math.max(0,Math.min(1,k)),f=[new mxPoint(g,f),new mxPoint(g+n,f+k),new mxPoint(g+n,f+K),new mxPoint(g,f+K-k),new mxPoint(g,f)]):(k=n*Math.max(0,Math.min(1,k)),f=[new mxPoint(g+k,f),new mxPoint(g+n,f),new mxPoint(g+n-k,f+K),new mxPoint(g,
+f+K),new mxPoint(g+k,f)]);K=a.getCenterX();a=a.getCenterY();a=new mxPoint(K,a);d&&(e.x<g||e.x>g+n?a.y=e.y:a.x=e.x);return mxUtils.getPerimeterPoint(f,a,e)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,b,d){var k=e.prototype.size;null!=c&&(k=mxUtils.getValue(c.style,"size",k));var g=a.x,f=a.y,n=a.width,K=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;
+c==mxConstants.DIRECTION_EAST?(k=n*Math.max(0,Math.min(1,k)),f=[new mxPoint(g+k,f),new mxPoint(g+n-k,f),new mxPoint(g+n,f+K),new mxPoint(g,f+K),new mxPoint(g+k,f)]):c==mxConstants.DIRECTION_WEST?(k=n*Math.max(0,Math.min(1,k)),f=[new mxPoint(g,f),new mxPoint(g+n,f),new mxPoint(g+n-k,f+K),new mxPoint(g+k,f+K),new mxPoint(g,f)]):c==mxConstants.DIRECTION_NORTH?(k=K*Math.max(0,Math.min(1,k)),f=[new mxPoint(g,f+k),new mxPoint(g+n,f),new mxPoint(g+n,f+K),new mxPoint(g,f+K-k),new mxPoint(g,f+k)]):(k=K*Math.max(0,
+Math.min(1,k)),f=[new mxPoint(g,f),new mxPoint(g+n,f+k),new mxPoint(g+n,f+K-k),new mxPoint(g,f+K),new mxPoint(g,f)]);K=a.getCenterX();a=a.getCenterY();a=new mxPoint(K,a);d&&(b.x<g||b.x>g+n?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(f,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,b,e){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),k=d?t.prototype.fixedSize:t.prototype.size;null!=c&&(k=mxUtils.getValue(c.style,
+"size",k));var g=a.x,f=a.y,n=a.width,K=a.height,y=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(d=d?Math.max(0,Math.min(n,k)):n*Math.max(0,Math.min(1,k)),f=[new mxPoint(g,f),new mxPoint(g+n-d,f),new mxPoint(g+n,a),new mxPoint(g+n-d,f+K),new mxPoint(g,f+K),new mxPoint(g+d,a),new mxPoint(g,f)]):c==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(n,k)):n*Math.max(0,
+Math.min(1,k)),f=[new mxPoint(g+d,f),new mxPoint(g+n,f),new mxPoint(g+n-d,a),new mxPoint(g+n,f+K),new mxPoint(g+d,f+K),new mxPoint(g,a),new mxPoint(g+d,f)]):c==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(K,k)):K*Math.max(0,Math.min(1,k)),f=[new mxPoint(g,f+d),new mxPoint(y,f),new mxPoint(g+n,f+d),new mxPoint(g+n,f+K),new mxPoint(y,f+K-d),new mxPoint(g,f+K),new mxPoint(g,f+d)]):(d=d?Math.max(0,Math.min(K,k)):K*Math.max(0,Math.min(1,k)),f=[new mxPoint(g,f),new mxPoint(y,f+d),new mxPoint(g+
+n,f),new mxPoint(g+n,f+K-d),new mxPoint(y,f+K),new mxPoint(g,f+K-d),new mxPoint(g,f)]);y=new mxPoint(y,a);e&&(b.x<g||b.x>g+n?y.y=b.y:y.x=b.x);return mxUtils.getPerimeterPoint(f,y,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,b,e){var d=E.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,"size",d));var k=a.x,g=a.y,f=a.width,n=a.height,y=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,
+mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=n*Math.max(0,Math.min(1,d)),g=[new mxPoint(y,g),new mxPoint(k+f,g+d),new mxPoint(k+f,g+n-d),new mxPoint(y,g+n),new mxPoint(k,g+n-d),new mxPoint(k,g+d),new mxPoint(y,g)]):(d=f*Math.max(0,Math.min(1,d)),g=[new mxPoint(k+d,g),new mxPoint(k+f-d,g),new mxPoint(k+f,a),new mxPoint(k+f-d,g+n),new mxPoint(k+d,g+n),new mxPoint(k,a),new mxPoint(k+d,g)]);y=new mxPoint(y,a);e&&(b.x<k||b.x>k+
+f?y.y=b.y:y.x=b.x);return mxUtils.getPerimeterPoint(g,y,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(P,mxShape);P.prototype.size=10;P.prototype.paintBackground=function(a,c,b,e,d){var k=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,b);a.ellipse((e-k)/2,0,k,k);a.fillAndStroke();a.begin();a.moveTo(e/2,k);a.lineTo(e/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",P);mxUtils.extend(T,mxShape);T.prototype.size=
+10;T.prototype.inset=2;T.prototype.paintBackground=function(a,c,b,e,d){var k=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.begin();a.moveTo(e/2,k+g);a.lineTo(e/2,d);a.end();a.stroke();a.begin();a.moveTo((e-k)/2-g,k/2);a.quadTo((e-k)/2-g,k+g,e/2,k+g);a.quadTo((e+k)/2+g,k+g,(e+k)/2+g,k/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",T);mxUtils.extend(ba,mxShape);ba.prototype.paintBackground=
function(a,c,b,e,d){a.translate(c,b);a.begin();a.moveTo(0,0);a.quadTo(e,0,e,d/2);a.quadTo(e,d,0,d);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",ba);mxUtils.extend(Y,mxShape);Y.prototype.inset=2;Y.prototype.paintBackground=function(a,c,b,e,d){var k=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.ellipse(0,k,e-2*k,d-2*k);a.fillAndStroke();a.begin();a.moveTo(e/2,0);a.quadTo(e,0,e,d/2);a.quadTo(e,d,e/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",
-Y);mxUtils.extend(G,mxCylinder);G.prototype.jettyWidth=32;G.prototype.jettyHeight=12;G.prototype.redrawPath=function(a,c,b,e,d,k){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,f=.3*d-c/2,n=.7*d-c/2;k?(a.moveTo(b,f),a.lineTo(g,f),a.lineTo(g,f+c),a.lineTo(b,f+c),a.moveTo(b,n),a.lineTo(g,n),a.lineTo(g,n+c),a.lineTo(b,n+c)):(a.moveTo(b,0),a.lineTo(e,0),a.lineTo(e,d),a.lineTo(b,d),
-a.lineTo(b,n+c),a.lineTo(0,n+c),a.lineTo(0,n),a.lineTo(b,n),a.lineTo(b,f+c),a.lineTo(0,f+c),a.lineTo(0,f),a.lineTo(b,f),a.close());a.end()};mxCellRenderer.registerShape("component",G);mxUtils.extend(aa,mxDoubleEllipse);aa.prototype.outerStroke=!0;aa.prototype.paintVertexShape=function(a,c,b,e,d){var k=Math.min(4,Math.min(e/5,d/5));0<e&&0<d&&(a.ellipse(c+k,b+k,e-2*k,d-2*k),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,b,e,d),a.stroke())};mxCellRenderer.registerShape("endState",
-aa);mxUtils.extend(ea,aa);ea.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ea);mxUtils.extend(fa,mxArrowConnector);fa.prototype.defaultWidth=4;fa.prototype.isOpenEnded=function(){return!0};fa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};fa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",fa);mxUtils.extend(O,mxArrowConnector);O.prototype.defaultWidth=
-10;O.prototype.defaultArrowWidth=20;O.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};O.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};O.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",O);mxUtils.extend(ha,mxActor);
-ha.prototype.size=30;ha.prototype.isRoundable=function(){return!0};ha.prototype.redrawPath=function(a,c,b,e,d){c=Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(0,c),new mxPoint(e,0),new mxPoint(e,d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput",ha);mxUtils.extend(T,mxRectangleShape);T.prototype.dx=20;T.prototype.dy=20;
-T.prototype.isHtmlAllowed=function(){return!1};T.prototype.paintForeground=function(a,c,b,e,d){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var k=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,k=Math.max(k,Math.min(e*g,d*g));g=Math.max(k,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));k=Math.max(k,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c,
-b+k);a.lineTo(c+e,b+k);a.end();a.stroke();a.begin();a.moveTo(c+g,b);a.lineTo(c+g,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",T);mxUtils.extend(W,mxActor);W.prototype.dx=20;W.prototype.dy=20;W.prototype.redrawPath=function(a,c,b,e,d){c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var k=mxUtils.getValue(this.style,
+Y);mxUtils.extend(F,mxCylinder);F.prototype.jettyWidth=32;F.prototype.jettyHeight=12;F.prototype.redrawPath=function(a,c,b,e,d,k){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,f=.3*d-c/2,n=.7*d-c/2;k?(a.moveTo(b,f),a.lineTo(g,f),a.lineTo(g,f+c),a.lineTo(b,f+c),a.moveTo(b,n),a.lineTo(g,n),a.lineTo(g,n+c),a.lineTo(b,n+c)):(a.moveTo(b,0),a.lineTo(e,0),a.lineTo(e,d),a.lineTo(b,d),
+a.lineTo(b,n+c),a.lineTo(0,n+c),a.lineTo(0,n),a.lineTo(b,n),a.lineTo(b,f+c),a.lineTo(0,f+c),a.lineTo(0,f),a.lineTo(b,f),a.close());a.end()};mxCellRenderer.registerShape("component",F);mxUtils.extend(aa,mxDoubleEllipse);aa.prototype.outerStroke=!0;aa.prototype.paintVertexShape=function(a,c,b,e,d){var k=Math.min(4,Math.min(e/5,d/5));0<e&&0<d&&(a.ellipse(c+k,b+k,e-2*k,d-2*k),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,b,e,d),a.stroke())};mxCellRenderer.registerShape("endState",
+aa);mxUtils.extend(ea,aa);ea.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ea);mxUtils.extend(fa,mxArrowConnector);fa.prototype.defaultWidth=4;fa.prototype.isOpenEnded=function(){return!0};fa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};fa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",fa);mxUtils.extend(Q,mxArrowConnector);Q.prototype.defaultWidth=
+10;Q.prototype.defaultArrowWidth=20;Q.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Q.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Q.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Q);mxUtils.extend(ha,mxActor);
+ha.prototype.size=30;ha.prototype.isRoundable=function(){return!0};ha.prototype.redrawPath=function(a,c,b,e,d){c=Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(0,c),new mxPoint(e,0),new mxPoint(e,d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput",ha);mxUtils.extend(V,mxRectangleShape);V.prototype.dx=20;V.prototype.dy=20;
+V.prototype.isHtmlAllowed=function(){return!1};V.prototype.paintForeground=function(a,c,b,e,d){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var k=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,k=Math.max(k,Math.min(e*g,d*g));g=Math.max(k,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));k=Math.max(k,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c,
+b+k);a.lineTo(c+e,b+k);a.end();a.stroke();a.begin();a.moveTo(c+g,b);a.lineTo(c+g,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",V);mxUtils.extend(W,mxActor);W.prototype.dx=20;W.prototype.dy=20;W.prototype.redrawPath=function(a,c,b,e,d){c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var k=mxUtils.getValue(this.style,
mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(e,0),new mxPoint(e,b),new mxPoint(c,b),new mxPoint(c,d),new mxPoint(0,d)],this.isRounded,k,!0);a.end()};mxCellRenderer.registerShape("corner",W);mxUtils.extend(la,mxActor);la.prototype.redrawPath=function(a,c,b,e,d){a.moveTo(0,0);a.lineTo(0,d);a.end();a.moveTo(e,0);a.lineTo(e,d);a.end();a.moveTo(0,d/2);a.lineTo(e,d/2);a.end()};mxCellRenderer.registerShape("crossbar",la);mxUtils.extend(ma,mxActor);
ma.prototype.dx=20;ma.prototype.dy=20;ma.prototype.redrawPath=function(a,c,b,e,d){c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(e,0),new mxPoint(e,b),new mxPoint((e+c)/2,b),new mxPoint((e+c)/2,d),
new mxPoint((e-c)/2,d),new mxPoint((e-c)/2,b),new mxPoint(0,b)],this.isRounded,k,!0);a.end()};mxCellRenderer.registerShape("tee",ma);mxUtils.extend(X,mxActor);X.prototype.arrowWidth=.3;X.prototype.arrowSize=.2;X.prototype.redrawPath=function(a,c,b,e,d){var k=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));b=(d-k)/2;var k=b+k,g=mxUtils.getValue(this.style,
mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,b),new mxPoint(e-c,b),new mxPoint(e-c,0),new mxPoint(e,d/2),new mxPoint(e-c,d),new mxPoint(e-c,k),new mxPoint(0,k)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",X);mxUtils.extend(ia,mxActor);ia.prototype.redrawPath=function(a,c,b,e,d){var k=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",X.prototype.arrowWidth))));c=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"arrowSize",X.prototype.arrowSize))));b=(d-k)/2;var k=b+k,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d/2),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(e-c,b),new mxPoint(e-c,0),new mxPoint(e,d/2),new mxPoint(e-c,d),new mxPoint(e-c,k),new mxPoint(c,k),new mxPoint(c,d)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",ia);mxUtils.extend(M,mxActor);M.prototype.size=.1;M.prototype.redrawPath=function(a,c,
-b,e,d){c=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(c,0);a.lineTo(e,0);a.quadTo(e-2*c,d/2,e,d);a.lineTo(c,d);a.quadTo(c-2*c,d/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",M);mxUtils.extend(L,mxActor);L.prototype.redrawPath=function(a,c,b,e,d){a.moveTo(0,0);a.quadTo(e,0,e,d/2);a.quadTo(e,d,0,d);a.close();a.end()};mxCellRenderer.registerShape("or",L);mxUtils.extend(ja,mxActor);ja.prototype.redrawPath=function(a,c,b,e,d){a.moveTo(0,
-0);a.quadTo(e,0,e,d/2);a.quadTo(e,d,0,d);a.quadTo(e/2,d/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",ja);mxUtils.extend(P,mxActor);P.prototype.size=20;P.prototype.isRoundable=function(){return!0};P.prototype.redrawPath=function(a,c,b,e,d){c=Math.min(e/2,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(e-c,0),new mxPoint(e,.8*c),new mxPoint(e,
-d),new mxPoint(0,d),new mxPoint(0,.8*c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("loopLimit",P);mxUtils.extend(S,mxActor);S.prototype.size=.375;S.prototype.isRoundable=function(){return!0};S.prototype.redrawPath=function(a,c,b,e,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(e,0),new mxPoint(e,d-c),new mxPoint(e/
-2,d),new mxPoint(0,d-c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",S);mxUtils.extend(ga,mxEllipse);ga.prototype.paintVertexShape=function(a,c,b,e,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+e/2,b+d);a.lineTo(c+e,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",ga);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(a,c,b,e,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);
+"arrowSize",X.prototype.arrowSize))));b=(d-k)/2;var k=b+k,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d/2),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(e-c,b),new mxPoint(e-c,0),new mxPoint(e,d/2),new mxPoint(e-c,d),new mxPoint(e-c,k),new mxPoint(c,k),new mxPoint(c,d)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",ia);mxUtils.extend(N,mxActor);N.prototype.size=.1;N.prototype.redrawPath=function(a,c,
+b,e,d){c=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(c,0);a.lineTo(e,0);a.quadTo(e-2*c,d/2,e,d);a.lineTo(c,d);a.quadTo(c-2*c,d/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",N);mxUtils.extend(M,mxActor);M.prototype.redrawPath=function(a,c,b,e,d){a.moveTo(0,0);a.quadTo(e,0,e,d/2);a.quadTo(e,d,0,d);a.close();a.end()};mxCellRenderer.registerShape("or",M);mxUtils.extend(ja,mxActor);ja.prototype.redrawPath=function(a,c,b,e,d){a.moveTo(0,
+0);a.quadTo(e,0,e,d/2);a.quadTo(e,d,0,d);a.quadTo(e/2,d/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",ja);mxUtils.extend(R,mxActor);R.prototype.size=20;R.prototype.isRoundable=function(){return!0};R.prototype.redrawPath=function(a,c,b,e,d){c=Math.min(e/2,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(e-c,0),new mxPoint(e,.8*c),new mxPoint(e,
+d),new mxPoint(0,d),new mxPoint(0,.8*c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("loopLimit",R);mxUtils.extend(U,mxActor);U.prototype.size=.375;U.prototype.isRoundable=function(){return!0};U.prototype.redrawPath=function(a,c,b,e,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(e,0),new mxPoint(e,d-c),new mxPoint(e/
+2,d),new mxPoint(0,d-c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",U);mxUtils.extend(ga,mxEllipse);ga.prototype.paintVertexShape=function(a,c,b,e,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+e/2,b+d);a.lineTo(c+e,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",ga);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(a,c,b,e,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);
a.begin();a.moveTo(c,b+d/2);a.lineTo(c+e,b+d/2);a.end();a.stroke();a.begin();a.moveTo(c+e/2,b);a.lineTo(c+e/2,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",ta);mxUtils.extend(H,mxEllipse);H.prototype.paintVertexShape=function(a,c,b,e,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*e,b+.145*d);a.lineTo(c+.855*e,b+.855*d);a.end();a.stroke();a.begin();a.moveTo(c+.855*e,b+.145*d);a.lineTo(c+.145*e,b+.855*d);a.end();a.stroke()};
mxCellRenderer.registerShape("sumEllipse",H);mxUtils.extend(oa,mxRhombus);oa.prototype.paintVertexShape=function(a,c,b,e,d){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+d/2);a.lineTo(c+e,b+d/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",oa);mxUtils.extend(ca,mxEllipse);ca.prototype.paintVertexShape=function(a,c,b,e,d){a.begin();a.moveTo(c,b);a.lineTo(c+e,b);a.lineTo(c+e/2,b+d/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,
b+d);a.lineTo(c+e,b+d);a.lineTo(c+e/2,b+d/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",ca);mxUtils.extend(da,mxEllipse);da.prototype.paintVertexShape=function(a,c,b,e,d){var k=b+d-5;a.begin();a.moveTo(c,b);a.lineTo(c,b+d);a.moveTo(c,k);a.lineTo(c+10,k-5);a.moveTo(c,k);a.lineTo(c+10,k+5);a.moveTo(c,k);a.lineTo(c+e,k);a.moveTo(c+e,b);a.lineTo(c+e,b+d);a.moveTo(c+e,k);a.lineTo(c+e-10,k-5);a.moveTo(c+e,k);a.lineTo(c+e-10,k+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",
@@ -2582,12 +2585,12 @@ d):a.moveTo(c,b+d),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(c,b-th
wa);mxUtils.extend(za,mxActor);za.prototype.redrawPath=function(a,c,b,e,d){c=Math.min(e,d/2);a.moveTo(0,0);a.lineTo(e-c,0);a.quadTo(e,0,e,d/2);a.quadTo(e,d,e-c,d);a.lineTo(0,d);a.close();a.end()};mxCellRenderer.registerShape("delay",za);mxUtils.extend(na,mxActor);na.prototype.size=.2;na.prototype.redrawPath=function(a,c,b,e,d){c=Math.min(d,e);var k=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(d-k)/2;b=c+k;var g=(e-k)/2,k=g+k;a.moveTo(0,c);a.lineTo(g,c);a.lineTo(g,
0);a.lineTo(k,0);a.lineTo(k,c);a.lineTo(e,c);a.lineTo(e,b);a.lineTo(k,b);a.lineTo(k,d);a.lineTo(g,d);a.lineTo(g,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.registerShape("cross",na);mxUtils.extend(ka,mxActor);ka.prototype.size=.25;ka.prototype.redrawPath=function(a,c,b,e,d){c=Math.min(e,d/2);b=Math.min(e-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*e);a.moveTo(0,d/2);a.lineTo(b,0);a.lineTo(e-c,0);a.quadTo(e,0,e,d/2);a.quadTo(e,d,e-c,d);a.lineTo(b,d);a.close();a.end()};
mxCellRenderer.registerShape("display",ka);mxUtils.extend(ra,mxConnector);ra.prototype.origPaintEdgeShape=ra.prototype.paintEdgeShape;ra.prototype.paintEdgeShape=function(a,c,b){for(var e=[],d=0;d<c.length;d++)e.push(mxUtils.clone(c[d]));var d=a.state.dashed,k=a.state.fixDash;ra.prototype.origPaintEdgeShape.apply(this,[a,e,b]);3<=a.state.strokeWidth&&(e=mxUtils.getValue(this.style,"fillColor",null),null!=e&&(a.setStrokeColor(e),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(d,k),ra.prototype.origPaintEdgeShape.apply(this,
-[a,c,b])))};mxCellRenderer.registerShape("filledEdge",ra);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var c=this.format.getSelectionState(),b=a.apply(this,arguments);"umlFrame"==c.style.shape&&b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return b}}();mxMarker.addMarker("dash",function(a,c,b,e,d,k,g,f,n,v){var q=d*(g+n+1),t=k*(g+n+1);return function(){a.begin();
-a.moveTo(e.x-q/2-t/2,e.y-t/2+q/2);a.lineTo(e.x+t/2-3*q/2,e.y-3*t/2-q/2);a.stroke()}});mxMarker.addMarker("cross",function(a,c,b,e,d,k,g,f,n,v){var q=d*(g+n+1),t=k*(g+n+1);return function(){a.begin();a.moveTo(e.x-q/2-t/2,e.y-t/2+q/2);a.lineTo(e.x+t/2-3*q/2,e.y-3*t/2-q/2);a.moveTo(e.x-q/2+t/2,e.y-t/2-q/2);a.lineTo(e.x-t/2-3*q/2,e.y-3*t/2+q/2);a.stroke()}});mxMarker.addMarker("circle",Ea);mxMarker.addMarker("circlePlus",function(a,c,b,e,d,k,g,f,n,v){var q=e.clone(),t=Ea.apply(this,arguments),y=d*(g+
-2*n),l=k*(g+2*n);return function(){t.apply(this,arguments);a.begin();a.moveTo(q.x-d*n,q.y-k*n);a.lineTo(q.x-2*y+d*n,q.y-2*l+k*n);a.moveTo(q.x-y-l+k*n,q.y-l+y-d*n);a.lineTo(q.x+l-y-k*n,q.y-l-y+d*n);a.stroke()}});mxMarker.addMarker("halfCircle",function(a,c,b,e,d,k,g,f,n,v){var q=d*(g+n+1),t=k*(g+n+1),y=e.clone();e.x-=q;e.y-=t;return function(){a.begin();a.moveTo(y.x-t,y.y+q);a.quadTo(e.x-t,e.y+q,e.x,e.y);a.quadTo(e.x+t,e.y-q,y.x+t,y.y-q);a.stroke()}});mxMarker.addMarker("async",function(a,c,b,e,d,
-k,g,f,n,v){c=d*n*1.118;b=k*n*1.118;d*=g+n;k*=g+n;var q=e.clone();q.x-=c;q.y-=b;e.x+=1*-d-c;e.y+=1*-k-b;return function(){a.begin();a.moveTo(q.x,q.y);f?a.lineTo(q.x-d-k/2,q.y-k+d/2):a.lineTo(q.x+k/2-d,q.y-k-d/2);a.lineTo(q.x-d,q.y-k);a.close();v?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,b,e,d,k,g,f,n,v,q){k*=f+v;g*=f+v;var t=d.clone();return function(){c.begin();c.moveTo(t.x,t.y);n?c.lineTo(t.x-k-g/a,t.y-g+k/a):c.lineTo(t.x+g/a-k,t.y-
+[a,c,b])))};mxCellRenderer.registerShape("filledEdge",ra);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var c=this.format.getSelectionState(),b=a.apply(this,arguments);"umlFrame"==c.style.shape&&b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return b}}();mxMarker.addMarker("dash",function(a,c,b,e,d,k,g,f,n,y){var q=d*(g+n+1),t=k*(g+n+1);return function(){a.begin();
+a.moveTo(e.x-q/2-t/2,e.y-t/2+q/2);a.lineTo(e.x+t/2-3*q/2,e.y-3*t/2-q/2);a.stroke()}});mxMarker.addMarker("cross",function(a,c,b,e,d,k,g,f,n,y){var q=d*(g+n+1),t=k*(g+n+1);return function(){a.begin();a.moveTo(e.x-q/2-t/2,e.y-t/2+q/2);a.lineTo(e.x+t/2-3*q/2,e.y-3*t/2-q/2);a.moveTo(e.x-q/2+t/2,e.y-t/2-q/2);a.lineTo(e.x-t/2-3*q/2,e.y-3*t/2+q/2);a.stroke()}});mxMarker.addMarker("circle",Ea);mxMarker.addMarker("circlePlus",function(a,c,b,e,d,k,g,f,n,y){var q=e.clone(),t=Ea.apply(this,arguments),x=d*(g+
+2*n),l=k*(g+2*n);return function(){t.apply(this,arguments);a.begin();a.moveTo(q.x-d*n,q.y-k*n);a.lineTo(q.x-2*x+d*n,q.y-2*l+k*n);a.moveTo(q.x-x-l+k*n,q.y-l+x-d*n);a.lineTo(q.x+l-x-k*n,q.y-l-x+d*n);a.stroke()}});mxMarker.addMarker("halfCircle",function(a,c,b,e,d,k,g,f,n,y){var q=d*(g+n+1),t=k*(g+n+1),x=e.clone();e.x-=q;e.y-=t;return function(){a.begin();a.moveTo(x.x-t,x.y+q);a.quadTo(e.x-t,e.y+q,e.x,e.y);a.quadTo(e.x+t,e.y-q,x.x+t,x.y-q);a.stroke()}});mxMarker.addMarker("async",function(a,c,b,e,d,
+k,g,f,n,y){c=d*n*1.118;b=k*n*1.118;d*=g+n;k*=g+n;var q=e.clone();q.x-=c;q.y-=b;e.x+=1*-d-c;e.y+=1*-k-b;return function(){a.begin();a.moveTo(q.x,q.y);f?a.lineTo(q.x-d-k/2,q.y-k+d/2):a.lineTo(q.x+k/2-d,q.y-k-d/2);a.lineTo(q.x-d,q.y-k);a.close();y?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,b,e,d,k,g,f,n,q,y){k*=f+q;g*=f+q;var t=d.clone();return function(){c.begin();c.moveTo(t.x,t.y);n?c.lineTo(t.x-k-g/a,t.y-g+k/a):c.lineTo(t.x+g/a-k,t.y-
g-k/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Fa=function(a,c,b){return ya(a,["width"],c,function(c,e,d,k,g){g=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(k.x+e*c/4+d*g/2,k.y+d*c/4-e*g/2)},function(c,e,d,k,g,f){c=Math.sqrt(mxUtils.ptSegDistSq(k.x,k.y,g.x,g.y,f.x,f.y));a.style.width=Math.round(2*c)/a.view.scale-b})},ya=function(a,c,b,e,d){return Z(a,c,function(c){var d=a.absolutePoints,k=d.length-1;c=a.view.translate;var g=a.view.scale,f=b?d[0]:d[k],d=b?d[1]:d[k-
-1],k=d.x-f.x,n=d.y-f.y,v=Math.sqrt(k*k+n*n),f=e.call(this,v,k/v,n/v,f,d);return new mxPoint(f.x/g-c.x,f.y/g-c.y)},function(c,e,k){var g=a.absolutePoints,f=g.length-1;c=a.view.translate;var n=a.view.scale,v=b?g[0]:g[f],g=b?g[1]:g[f-1],f=g.x-v.x,q=g.y-v.y,t=Math.sqrt(f*f+q*q);e.x=(e.x+c.x)*n;e.y=(e.y+c.y)*n;d.call(this,t,f/t,q/t,v,g,e,k)})},va=function(a){return function(c){return[Z(c,["arrowWidth","arrowSize"],function(c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",X.prototype.arrowWidth))),
+1],k=d.x-f.x,n=d.y-f.y,q=Math.sqrt(k*k+n*n),f=e.call(this,q,k/q,n/q,f,d);return new mxPoint(f.x/g-c.x,f.y/g-c.y)},function(c,e,k){var g=a.absolutePoints,f=g.length-1;c=a.view.translate;var n=a.view.scale,q=b?g[0]:g[f],g=b?g[1]:g[f-1],f=g.x-q.x,y=g.y-q.y,t=Math.sqrt(f*f+y*y);e.x=(e.x+c.x)*n;e.y=(e.y+c.y)*n;d.call(this,t,f/t,y/t,q,g,e,k)})},va=function(a){return function(c){return[Z(c,["arrowWidth","arrowSize"],function(c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",X.prototype.arrowWidth))),
e=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",X.prototype.arrowSize)));return new mxPoint(c.x+(1-e)*c.width,c.y+(1-b)*c.height/2)},function(c,b){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(c.y+c.height/2-b.y)/c.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(c.x+c.width-b.x)/c.width))})]}},Ma=function(a,c,b){return function(e){var d=[Z(e,["size"],function(b){var e=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,
"size",c)))))*a;return new mxPoint(b.x+e,b.y+e)},function(c,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(c.width,b.x-c.x),Math.min(c.height,b.y-c.y)))/a)})];b&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(qa(e));return d}},Ga=function(a,c,b,e,d){b=null!=b?b:1;return function(k){var g=[Z(k,["size"],function(c){var b=null!=d?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,e=parseFloat(mxUtils.getValue(this.state.style,"size",b?d:a));return new mxPoint(c.x+
Math.max(0,Math.min(c.width,e*(b?1:c.width))),c.getCenterY())},function(a,c,e){var g=null!=d?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=g?c.x-a.x:Math.max(0,Math.min(b,(c.x-a.x)/a.width));g&&!mxEvent.isAltDown(e.getEvent())&&(a=k.view.graph.snap(a));this.state.style.size=a},null,e)];c&&mxUtils.getValue(k.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(qa(k));return g}},Na=function(a){return function(c){var b=[Z(c,["size"],function(c){var b=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,
@@ -2605,25 +2608,25 @@ Math.round(100*(e-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.ro
3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(n.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-
parseFloat(a.style.startWidth))<c&&(a.style.endWidth=a.style.startWidth))})));return b},swimlane:function(a){var c=[Z(a,[mxConstants.STYLE_STARTSIZE],function(c){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(c.getCenterX(),c.y+Math.max(0,Math.min(c.height,b))):new mxPoint(c.x+Math.max(0,Math.min(c.width,b)),c.getCenterY())},function(c,b){a.style[mxConstants.STYLE_STARTSIZE]=
1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(c.height,b.y-c.y))):Math.round(Math.max(0,Math.min(c.width,b.x-c.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));c.push(qa(a,b/2))}return c},label:Da(),ext:Da(),rectangle:Da(),triangle:Da(),rhombus:Da(),umlLifeline:function(a){return[Z(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,
-parseFloat(mxUtils.getValue(this.state.style,"size",C.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},umlFrame:function(a){return[Z(a,["width","height"],function(a){var c=Math.max(K.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",K.prototype.width))),b=Math.max(1.5*K.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",K.prototype.height)));
-return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.width=Math.round(Math.max(K.prototype.corner,Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*K.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]},process:function(a){var c=[Z(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size))));return new mxPoint(a.x+a.width*c,a.y+a.height/4)},function(a,c){this.state.style.size=Math.max(0,Math.min(.5,
+parseFloat(mxUtils.getValue(this.state.style,"size",C.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},umlFrame:function(a){return[Z(a,["width","height"],function(a){var c=Math.max(L.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",L.prototype.width))),b=Math.max(1.5*L.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",L.prototype.height)));
+return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.width=Math.round(Math.max(L.prototype.corner,Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*L.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]},process:function(a){var c=[Z(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size))));return new mxPoint(a.x+a.width*c,a.y+a.height/4)},function(a,c){this.state.style.size=Math.max(0,Math.min(.5,
(c.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(qa(a));return c},cross:function(a){return[Z(a,["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",na.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var b=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/b*2,Math.max(0,a.getCenterX()-c.x)/b*2)))})]},
note:function(a){return[Z(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size)))));return new mxPoint(a.x+a.width-c,a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},manualInput:function(a){var c=[Z(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",ha.prototype.size)));
-return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(qa(a));return c},dataStorage:function(a){return[Z(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",M.prototype.size))));return new mxPoint(a.x+(1-c)*a.width,a.getCenterY())},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-
+return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(qa(a));return c},dataStorage:function(a){return[Z(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(a.x+(1-c)*a.width,a.getCenterY())},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-
c.x)/a.width))})]},callout:function(a){var c=[Z(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",A.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position)));mxUtils.getValue(this.state.style,"base",A.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-c)},function(a,c){mxUtils.getValue(this.state.style,"base",A.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,
a.y+a.height-c.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),Z(a,["position2"],function(a){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",A.prototype.position2)));return new mxPoint(a.x+c*a.width,a.y+a.height)},function(a,c){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),Z(a,["base"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",A.prototype.size))),
b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position))),e=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",A.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+e),a.y+a.height-c)},function(a,c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,c.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,
-!1)&&c.push(qa(a));return c},internalStorage:function(a){var c=[Z(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",T.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",T.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,
+!1)&&c.push(qa(a));return c},internalStorage:function(a){var c=[Z(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",V.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",V.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,
!1)&&c.push(qa(a));return c},corner:function(a){return[Z(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",W.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",W.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},tee:function(a){return[Z(a,["dx","dy"],function(a){var c=
Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ma.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ma.prototype.dy)));return new mxPoint(a.x+(a.width+c)/2,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,c.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},singleArrow:va(1),doubleArrow:va(.5),folder:function(a){return[Z(a,["tabWidth","tabHeight"],function(a){var c=
Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",p.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",p.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);return new mxPoint(a.x+c,a.y+b)},function(a,c){var b=Math.max(0,Math.min(a.width,c.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&
(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},document:function(a){return[Z(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",B.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},tape:function(a){return[Z(a,["size"],function(a){var c=Math.max(0,
-Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",x.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c*a.height/2)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(c.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[Z(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",S.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+
-a.height-c.y)/a.height))})]},step:Ga(t.prototype.size,!0,null,!0,t.prototype.fixedSize),hexagon:Ga(F.prototype.size,!0,.5,!0),curlyBracket:Ga(k.prototype.size,!1),display:Ga(ka.prototype.size,!1),cube:Ma(1,a.prototype.size,!1),card:Ma(.5,u.prototype.size,!0),loopLimit:Ma(.5,P.prototype.size,!0),trapezoid:Na(.5),parallelogram:Na(1)};Graph.createHandle=Z;Graph.handleFactory=Ha;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=
+Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",v.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c*a.height/2)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(c.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[Z(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",U.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+
+a.height-c.y)/a.height))})]},step:Ga(t.prototype.size,!0,null,!0,t.prototype.fixedSize),hexagon:Ga(E.prototype.size,!0,.5,!0),curlyBracket:Ga(k.prototype.size,!1),display:Ga(ka.prototype.size,!1),cube:Ma(1,a.prototype.size,!1),card:Ma(.5,u.prototype.size,!0),loopLimit:Ma(.5,R.prototype.size,!0),trapezoid:Na(.5),parallelogram:Na(1)};Graph.createHandle=Z;Graph.handleFactory=Ha;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=
this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=Ha[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=Ha[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=
mxConstants.SHAPE_CONNECTOR);a=Ha[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Ia=new mxPoint(1,0),Ja=new mxPoint(1,0),va=mxUtils.toRadians(-30),Ia=mxUtils.getRotatedPoint(Ia,Math.cos(va),Math.sin(va)),va=mxUtils.toRadians(-150),Ja=mxUtils.getRotatedPoint(Ja,Math.cos(va),Math.sin(va));mxEdgeStyle.IsometricConnector=function(a,c,b,e,d){var k=a.view;e=null!=e&&0<e.length?e[0]:null;var g=a.absolutePoints,f=g[0],g=g[g.length-1];null!=
-e&&(e=k.transformControlPoint(a,e));null==f&&null!=c&&(f=new mxPoint(c.getCenterX(),c.getCenterY()));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));var n=Ia.x,v=Ia.y,q=Ja.x,t=Ja.y,y="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=f){a=function(a,c,b){a-=l.x;var e=c-l.y;c=(t*a-q*e)/(n*t-v*q);a=(v*a-n*e)/(v*q-n*t);y?(b&&(l=new mxPoint(l.x+n*c,l.y+v*c),d.push(l)),l=new mxPoint(l.x+q*a,l.y+t*a)):(b&&(l=new mxPoint(l.x+q*a,l.y+t*a),d.push(l)),l=new mxPoint(l.x+
-n*c,l.y+v*c));d.push(l)};var l=f;null==e&&(e=new mxPoint(f.x+(g.x-f.x)/2,f.y+(g.y-f.y)/2));a(e.x,e.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Oa=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,c){if(c==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Oa.apply(this,arguments)};b.prototype.constraints=[];f.prototype.getConstraints=function(a,c,b){a=[];var e=
+e&&(e=k.transformControlPoint(a,e));null==f&&null!=c&&(f=new mxPoint(c.getCenterX(),c.getCenterY()));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));var n=Ia.x,q=Ia.y,y=Ja.x,t=Ja.y,x="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=f){a=function(a,c,b){a-=l.x;var e=c-l.y;c=(t*a-y*e)/(n*t-q*y);a=(q*a-n*e)/(q*y-n*t);x?(b&&(l=new mxPoint(l.x+n*c,l.y+q*c),d.push(l)),l=new mxPoint(l.x+y*a,l.y+t*a)):(b&&(l=new mxPoint(l.x+y*a,l.y+t*a),d.push(l)),l=new mxPoint(l.x+
+n*c,l.y+q*c));d.push(l)};var l=f;null==e&&(e=new mxPoint(f.x+(g.x-f.x)/2,f.y+(g.y-f.y)/2));a(e.x,e.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Oa=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,c){if(c==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Oa.apply(this,arguments)};b.prototype.constraints=[];f.prototype.getConstraints=function(a,c,b){a=[];var e=
Math.tan(mxUtils.toRadians(30)),d=(.5-e)/2,e=Math.min(c,b/(.5+e));c=(c-e)/2;b=(b-e)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b+.25*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*e,b+e*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+e,b+.25*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+e,b+.75*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*e,b+(1-d)*e));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,c,b+.75*e));return a};A.prototype.getConstraints=function(a,c,b){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b-e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b-e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,
@@ -2638,17 +2641,17 @@ Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(n
p.prototype.getConstraints=function(a,c,b){a=[];var e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*e,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0)),a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,e,d)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+e),d))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*e,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-e,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-e,d)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-e),d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,c,.25*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.75*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.75*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};T.prototype.constraints=mxRectangleShape.prototype.constraints;M.prototype.constraints=mxRectangleShape.prototype.constraints;ga.prototype.constraints=mxEllipse.prototype.constraints;ta.prototype.constraints=mxEllipse.prototype.constraints;
+0),!1,null,0,.75*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};V.prototype.constraints=mxRectangleShape.prototype.constraints;N.prototype.constraints=mxRectangleShape.prototype.constraints;ga.prototype.constraints=mxEllipse.prototype.constraints;ta.prototype.constraints=mxEllipse.prototype.constraints;
H.prototype.constraints=mxEllipse.prototype.constraints;wa.prototype.constraints=mxEllipse.prototype.constraints;ha.prototype.constraints=mxRectangleShape.prototype.constraints;za.prototype.constraints=mxRectangleShape.prototype.constraints;ka.prototype.getConstraints=function(a,c,b){a=[];var e=Math.min(c,b/2),d=Math.min(c-e,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-e),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-e,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-e,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-e),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));return a};P.prototype.constraints=mxRectangleShape.prototype.constraints;S.prototype.constraints=
+0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-e),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-e,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-e,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-e),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));return a};R.prototype.constraints=mxRectangleShape.prototype.constraints;U.prototype.constraints=
mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
-.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];v.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,
-1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];G.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,
+.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,
+1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];F.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,
1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,
1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];m.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,
-1),!1)];x.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];t.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),
+1),!1)];v.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];t.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),
!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
-.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=
+.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];P.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=
[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,
.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,
.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,
@@ -2665,14 +2668,14 @@ mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxC
0),!1,null,g,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b-.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b));a.push(new mxConnectionConstraint(new mxPoint(.5,
1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b-.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,k));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,k));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(c+d),k));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,k));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,k));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,k));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,e));return a};C.prototype.constraints=
-null;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)];ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,
+null;M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,
.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];Y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
Actions.prototype.init=function(){function a(a){d.escape();var b=d.getDeletableCells(d.getSelectionCells());if(null!=b&&0<b.length){var f=d.selectParentAfterDelete?d.model.getParents(b):null;d.removeCells(b,a);if(null!=f){a=[];for(b=0;b<f.length;b++)d.model.contains(f[b])&&(d.model.isVertex(f[b])||d.model.isEdge(f[b]))&&a.push(f[b]);d.setSelectionCells(a)}}}var b=this.editorUi,f=b.editor,d=f.graph,l=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",
function(){d.openLink(b.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var d=mxUtils.parseXml(a);f.graph.setSelectionCells(f.graph.importGraphModel(d.documentElement))}catch(c){mxUtils.alert(mxResources.get("invalidOrMissingFile")+
": "+c.message)}}));b.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=l;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=l;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=l;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,296,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container,
620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){b.showDialog((new PageSetupDialog(b)).container,320,220,!0,!0)}).isEnabled=l;this.addAction("print...",function(){b.showDialog((new PrintDialog(b)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){b.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){b.redo()},null,"sprite-redo",mxClient.IS_WIN?
Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){mxClipboard.cut(d)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){mxClipboard.copy(d)},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&mxClipboard.paste(d)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){d.getModel().beginUpdate();
-try{var b=mxClipboard.paste(d);if(null!=b){a=!0;for(var f=0;f<b.length&&a;f++)a=a&&d.model.isEdge(b[f]);var c=d.view.translate,e=d.view.scale,k=c.x,q=c.y,c=null;if(1==b.length&&a){var n=d.getCellGeometry(b[0]);null!=n&&(c=n.getTerminalPoint(!0))}c=null!=c?c:d.getBoundingBoxFromGeometry(b,a);if(null!=c){var g=Math.round(d.snap(d.popupMenuHandler.triggerX/e-k)),y=Math.round(d.snap(d.popupMenuHandler.triggerY/e-q));d.cellsMoved(b,g-c.x,y-c.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("copySize",
+try{var b=mxClipboard.paste(d);if(null!=b){a=!0;for(var f=0;f<b.length&&a;f++)a=a&&d.model.isEdge(b[f]);var c=d.view.translate,e=d.view.scale,k=c.x,q=c.y,c=null;if(1==b.length&&a){var n=d.getCellGeometry(b[0]);null!=n&&(c=n.getTerminalPoint(!0))}c=null!=c?c:d.getBoundingBoxFromGeometry(b,a);if(null!=c){var g=Math.round(d.snap(d.popupMenuHandler.triggerX/e-k)),x=Math.round(d.snap(d.popupMenuHandler.triggerY/e-q));d.cellsMoved(b,g-c.x,x-c.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("copySize",
function(a){a=d.getSelectionCell();d.isEnabled()&&null!=a&&d.getModel().isVertex(a)&&(a=d.getCellGeometry(a),null!=a&&(b.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",function(a){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=b.copiedSize){d.getModel().beginUpdate();try{var f=d.getSelectionCells();for(a=0;a<f.length;a++)if(d.getModel().isVertex(f[a])){var l=d.getCellGeometry(f[a]);null!=l&&(l=l.clone(),l.width=b.copiedSize.width,l.height=
b.copiedSize.height,d.getModel().setGeometry(f[a],l))}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){d.setSelectionCells(d.duplicateCells())},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(){d.turnShapes(d.getSelectionCells())},
null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",function(){d.selectVertices()},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){d.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){d.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){d.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();
@@ -2688,15 +2691,15 @@ mxUtils.bind(this,function(c){a.cellEditor.restoreSelection(q);null!=c&&a.insert
null!=e&&d.isWrapping(f)?(e=e.clone(),e.height=c.text.boundingBox.height/d.view.scale,d.getModel().setGeometry(f,e)):d.updateCellSize(f)}}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=d.getView().getState(d.getSelectionCell());if(null!=a){d.stopEditing();a="1"==a.style.html?null:"1";d.getModel().beginUpdate();try{for(var f=d.getSelectionCells(),l=0;l<f.length;l++)if(state=d.getView().getState(f[l]),null!=state){var c=mxUtils.getValue(state.style,
"html","0");if("1"==c&&null==a){var e=d.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(e=e.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var k=document.createElement("div");k.innerHTML=e;e=mxUtils.extractTextWithWhitespace(k.childNodes);d.cellLabelChanged(state.cell,e);d.setCellStyles("html",a,[f[l]])}else"0"==c&&"1"==a&&(e=mxUtils.htmlEntities(d.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(e=e.replace(/\n/g,"<br/>")),d.cellLabelChanged(state.cell,
d.sanitizeHtml(e)),d.setCellStyles("html",a,[f[l]]))}b.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=a?a:"0"],"cells",f))}finally{d.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=d.getView().getState(d.getSelectionCell()),b="wrap";d.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(b=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,b)});this.addAction("rotation",function(){var a="0",f=d.getView().getState(d.getSelectionCell());
-null!=f&&(a=f.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(b,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");b.showDialog(a.container,375,80,!0,!0);a.init()});this.addAction("resetView",function(){d.zoomTo(1);b.resetScrollbars()},null,null,Editor.ctrlKey+"+H");this.addAction("zoomIn",function(a){d.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");
-this.addAction("zoomOut",function(a){d.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var a=d.isSelectionEmpty()?d.getGraphBounds():d.getBoundingBox(d.getSelectionCells()),b=d.view.translate,f=d.view.scale;a.width/=f;a.height/=f;a.x=a.x/f-b.x;a.y=a.y/f-b.y;var f=d.container.clientWidth-10,c=d.container.clientHeight-10,e=Math.floor(20*Math.min(f/a.width,c/a.height))/20;d.zoomTo(e);mxUtils.hasScrollbars(d.container)&&(d.container.scrollTop=
-(a.y+b.y)*e-Math.max((c-a.height*e)/2+5,0),d.container.scrollLeft=(a.x+b.x)*e-Math.max((f-a.width*e)/2+5,0))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,b=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/a.width/b,(d.container.clientHeight-10)/a.height/b))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(),d.container.scrollTop=a.y*d.view.scale-1,d.container.scrollLeft=
-Math.min(a.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,b=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/(2*a.width)/b,(d.container.clientHeight-10)/a.height/b))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(),d.container.scrollTop=Math.min(a.y,(d.container.scrollHeight-d.container.clientHeight)/
-2),d.container.scrollLeft=Math.min(a.x,(d.container.scrollWidth-d.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();d.zoomTo(Math.floor(20*(d.container.clientWidth-10)/d.pageFormat.width/d.pageScale)/20);if(mxUtils.hasScrollbars(d.container)){var a=d.getPagePadding();d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)}}));this.put("customZoom",
-new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*d.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&d.zoomTo(a/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*d.pageScale),
-mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&b.setPageScale(a/100)}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var m=null,m=this.addAction("grid",function(){d.setGridEnabled(!d.isGridEnabled());b.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");m.setToggleAction(!0);m.setSelectedCallback(function(){return d.isGridEnabled()});m.setEnabled(!1);m=this.addAction("guides",
-function(){d.graphHandler.guidesEnabled=!d.graphHandler.guidesEnabled;b.fireEvent(new mxEventObject("guidesEnabledChanged"))});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});m.setEnabled(!1);m=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled())});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});m=this.addAction("collapseExpand",function(){var a=new ChangePageSetup(b);
-a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!d.foldingEnabled;d.model.execute(a)});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.foldingEnabled});m.isEnabled=l;m=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.scrollbars});m=this.addAction("pageView",mxUtils.bind(this,function(){b.setPageVisible(!d.pageVisible)}));m.setToggleAction(!0);m.setSelectedCallback(function(){return d.pageVisible});
+null!=f&&(a=f.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(b,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");b.showDialog(a.container,375,80,!0,!0);a.init()});this.addAction("resetView",function(){d.zoomTo(1);b.resetScrollbars()},null,null,Editor.ctrlKey+"+H");this.addAction("zoomIn",function(a){"fast"==urlParams.zoom?d.lazyZoom(!0,!0):d.zoomIn()},null,
+null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(a){"fast"==urlParams.zoom?d.lazyZoom(!1,!0):d.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var a=d.isSelectionEmpty()?d.getGraphBounds():d.getBoundingBox(d.getSelectionCells()),b=d.view.translate,f=d.view.scale;a.width/=f;a.height/=f;a.x=a.x/f-b.x;a.y=a.y/f-b.y;var f=d.container.clientWidth-10,c=d.container.clientHeight-10,e=Math.floor(20*Math.min(f/a.width,
+c/a.height))/20;d.zoomTo(e);mxUtils.hasScrollbars(d.container)&&(d.container.scrollTop=(a.y+b.y)*e-Math.max((c-a.height*e)/2+5,0),d.container.scrollLeft=(a.x+b.x)*e-Math.max((f-a.width*e)/2+5,0))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,b=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/a.width/b,(d.container.clientHeight-10)/a.height/b))/20);mxUtils.hasScrollbars(d.container)&&
+(a=d.getPagePadding(),d.container.scrollTop=a.y*d.view.scale-1,d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,b=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/(2*a.width)/b,(d.container.clientHeight-10)/a.height/b))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(),
+d.container.scrollTop=Math.min(a.y,(d.container.scrollHeight-d.container.clientHeight)/2),d.container.scrollLeft=Math.min(a.x,(d.container.scrollWidth-d.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();d.zoomTo(Math.floor(20*(d.container.clientWidth-10)/d.pageFormat.width/d.pageScale)/20);if(mxUtils.hasScrollbars(d.container)){var a=d.getPagePadding();d.container.scrollLeft=Math.min(a.x*
+d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*d.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&d.zoomTo(a/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,
+function(){var a=new FilenameDialog(this.editorUi,parseInt(100*d.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&b.setPageScale(a/100)}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var m=null,m=this.addAction("grid",function(){d.setGridEnabled(!d.isGridEnabled());b.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");m.setToggleAction(!0);m.setSelectedCallback(function(){return d.isGridEnabled()});
+m.setEnabled(!1);m=this.addAction("guides",function(){d.graphHandler.guidesEnabled=!d.graphHandler.guidesEnabled;b.fireEvent(new mxEventObject("guidesEnabledChanged"))});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});m.setEnabled(!1);m=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled())});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});m=this.addAction("collapseExpand",
+function(){var a=new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!d.foldingEnabled;d.model.execute(a)});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.foldingEnabled});m.isEnabled=l;m=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.scrollbars});m=this.addAction("pageView",mxUtils.bind(this,function(){b.setPageVisible(!d.pageVisible)}));m.setToggleAction(!0);m.setSelectedCallback(function(){return d.pageVisible});
m=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionArrowsEnabled});m=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());b.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});
m=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});m.isEnabled=l;m=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});m.setToggleAction(!0);m.setSelectedCallback(function(){return b.editor.autosave});m.isEnabled=l;m.visible=!1;this.addAction("help",function(){var a=
"";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+a+".html")});var p=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){p||(b.showDialog((new AboutDialog(b)).container,320,280,!0,!0,function(){p=!1}),p=!0)},null,null,"F1"));m=mxUtils.bind(this,function(a,b,f,c){return this.addAction(a,function(){if(null!=f&&d.cellEditor.isContentEditing())f();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var a=
@@ -2726,23 +2729,23 @@ DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E
DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.reportEnabled=!0;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};
DrawioFile.prototype.synchronizeFile=function(a,b){this.savingFile?null!=b&&b({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,b):this.updateFile(a,b)};
DrawioFile.prototype.updateFile=function(a,b,f,d){null!=f&&f()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():this.getLatestVersion(mxUtils.bind(this,function(l){try{null!=f&&f()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():null!=l?this.mergeFile(l,a,b,d):this.reloadFile(a,b))}catch(m){null!=b&&b(m)}}),b))};
-DrawioFile.prototype.mergeFile=function(a,b,f,d){var l=!0;try{this.stats.fileMerged++;var m=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),p=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=p&&0<p.length){this.shadowPages=p;this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;var u=[this.ui.diffPages(null!=d?d:m,this.shadowPages)];if(!this.ignorePatches(u)){var x=this.ui.patchPages(m,
-u[0]);d={};var B=this.ui.getHashValueForPages(x,d),m={},c=this.ui.getHashValueForPages(this.shadowPages,m);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",u,"checksum",c==B,B);if(null!=B&&B!=c){var e=this.compressReportData(this.getAnonymizedXmlForPages(p)),k=this.compressReportData(this.getAnonymizedXmlForPages(x)),q=this.ui.hashValue(a.getCurrentEtag()),n=this.ui.hashValue(this.getCurrentEtag());this.checksumError(f,u,"Shadow Details: "+JSON.stringify(d)+
+DrawioFile.prototype.mergeFile=function(a,b,f,d){var l=!0;try{this.stats.fileMerged++;var m=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),p=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=p&&0<p.length){this.shadowPages=p;this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;var u=[this.ui.diffPages(null!=d?d:m,this.shadowPages)];if(!this.ignorePatches(u)){var v=this.ui.patchPages(m,
+u[0]);d={};var B=this.ui.getHashValueForPages(v,d),m={},c=this.ui.getHashValueForPages(this.shadowPages,m);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",u,"checksum",c==B,B);if(null!=B&&B!=c){var e=this.compressReportData(this.getAnonymizedXmlForPages(p)),k=this.compressReportData(this.getAnonymizedXmlForPages(v)),q=this.ui.hashValue(a.getCurrentEtag()),n=this.ui.hashValue(this.getCurrentEtag());this.checksumError(f,u,"Shadow Details: "+JSON.stringify(d)+
"\nChecksum: "+B+"\nCurrent: "+c+"\nCurrent Details: "+JSON.stringify(m)+"\nFrom: "+q+"\nTo: "+n+"\n\nFile Data:\n"+e+"\nPatched Shadow:\n"+k,null,"mergeFile");return}this.patch(u,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw l=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(A){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
-null!=f&&f(A);try{if(l)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,A);else{var g=this.getCurrentUser(),y=null!=g?g.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),y,A)}}catch(t){}}};
+null!=f&&f(A);try{if(l)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,A);else{var g=this.getCurrentUser(),x=null!=g?g.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,A)}}catch(t){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var b=new mxCodec(mxUtils.createXmlDocument()),f=b.document.createElement("mxfile");if(null!=a)for(var d=0;d<a.length;d++){var l=b.encode(new mxGraphModel(a[d].root));"1"!=urlParams.dev&&(l=this.ui.anonymizeNode(l,!0));l.setAttribute("id",a[d].getId());a[d].viewState&&this.ui.editor.graph.saveViewState(a[d].viewState,l,!0);f.appendChild(l)}return mxUtils.getPrettyXml(f)};
DrawioFile.prototype.compressReportData=function(a,b,f){b=null!=b?b:1E4;null!=f&&null!=a&&a.length>f?a=a.substring(0,f)+"[...]":null!=a&&a.length>b&&(a=Graph.compress(a)+"\n");return a};
DrawioFile.prototype.checksumError=function(a,b,f,d,l){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=b)for(a=0;a<b.length;a++)this.ui.anonymizePatch(b[a]);var m=mxUtils.bind(this,function(a){var d=this.compressReportData(JSON.stringify(b,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
25E3):"n/a";this.sendErrorReport("Checksum Error in "+l+" "+this.getHash(),(null!=f?f:"")+"\n\nPatches:\n"+d+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==d?m(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==d?m(a):m(null)}),function(){})}else{var p=this.getCurrentUser(),u=null!=p?p.id:"unknown";EditorUi.logError("Checksum Error in "+l+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+u+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
-try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:l,label:"user_"+u+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(x){}}}catch(x){}};
-DrawioFile.prototype.sendErrorReport=function(a,b,f,d){try{var l=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),p=this.getCurrentUser(),u=null!=p?this.ui.hashValue(p.id):"unknown",x=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",B=this.getTitle(),c=B.lastIndexOf("."),p="xml";0<c&&(p=B.substring(c));var e=null!=f?f.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
-":\n\nBrowser="+navigator.userAgent+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+p+")\nUser="+u+x+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=b?"\n\n"+b:"")+
+try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:l,label:"user_"+u+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(v){}}}catch(v){}};
+DrawioFile.prototype.sendErrorReport=function(a,b,f,d){try{var l=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),p=this.getCurrentUser(),u=null!=p?this.ui.hashValue(p.id):"unknown",v=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",B=this.getTitle(),c=B.lastIndexOf("."),p="xml";0<c&&(p=B.substring(c));var e=null!=f?f.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
+":\n\nBrowser="+navigator.userAgent+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+p+")\nUser="+u+v+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=b?"\n\n"+b:"")+
(null!=f?"\n\nError: "+f.message:"")+"\n\nStack:\n"+e+"\n\nShadow:\n"+l+"\n\nData:\n"+m,d)}catch(k){}};
DrawioFile.prototype.reloadFile=function(a,b){try{this.ui.spinner.stop();var f=mxUtils.bind(this,function(){this.stats.fileReloaded++;this.reportEnabled=!1;var b=this.ui.editor.graph.getViewState(),f=this.ui.editor.graph.getSelectionCells(),m=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(m,b,f);null!=this.backupPatch&&this.patch([this.backupPatch]);var d=this.ui.getCurrentFile();null!=d&&(d.stats=
this.stats);null!=a&&a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):f()}catch(d){null!=b&&b(d)}};DrawioFile.prototype.copyFile=function(a,b){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(a){for(var b=!0,f=0;f<a.length&&b;f++)b=b&&0==Object.keys(a[f]).length;return b};
-DrawioFile.prototype.patch=function(a,b){var f=this.ui.editor.undoManager,d=f.history.slice(),l=f.indexOfNextAdd,m=this.ui.editor.graph;m.container.style.visibility="hidden";var p=this.changeListenerEnabled;this.changeListenerEnabled=!1;var u=m.foldingEnabled,x=m.mathEnabled,B=m.cellRenderer.redraw;m.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());B.apply(this,arguments)};m.model.beginUpdate();try{for(var c=
-0;c<a.length;c++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[c],!0,b,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{m.container.style.visibility="";m.model.endUpdate();m.cellRenderer.redraw=B;this.changeListenerEnabled=p;f.history=d;f.indexOfNextAdd=l;f.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)x!=
+DrawioFile.prototype.patch=function(a,b){var f=this.ui.editor.undoManager,d=f.history.slice(),l=f.indexOfNextAdd,m=this.ui.editor.graph;m.container.style.visibility="hidden";var p=this.changeListenerEnabled;this.changeListenerEnabled=!1;var u=m.foldingEnabled,v=m.mathEnabled,B=m.cellRenderer.redraw;m.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());B.apply(this,arguments)};m.model.beginUpdate();try{for(var c=
+0;c<a.length;c++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[c],!0,b,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{m.container.style.visibility="";m.model.endUpdate();m.cellRenderer.redraw=B;this.changeListenerEnabled=p;f.history=d;f.indexOfNextAdd=l;f.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)v!=
m.mathEnabled?(this.ui.editor.updateGraphComponents(),m.refresh()):(u!=m.foldingEnabled?m.view.revalidate():m.view.validate(),m.sizeDidChange());this.ui.updateTabContainer()}};
DrawioFile.prototype.save=function(a,b,f,d,l,m){try{if(this.isEditable())if(!l&&this.invalidChecksum)if(null!=f)f({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=b&&b();else if(null!=f)f({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(p){if(null!=f)f(p);else throw p;}};
DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed()))};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var a=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=a?"false"!=a:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(a,b,f){};DrawioFile.prototype.saveFile=function(a,b,f,d){};
@@ -2813,7 +2816,7 @@ Editor.fastCompress=function(a){return null==a||0==a.length||"undefined"===typeo
(b=e[0].getAttribute("data-mxgraph"),null!=b?(e=JSON.parse(b),null!=e&&null!=e.xml&&(e=mxUtils.parseXml(e.xml),a=e.documentElement)):(e=e[0].getElementsByTagName("div"),0<e.length&&(b=mxUtils.getTextContent(e[0]),b=Graph.decompress(b),0<b.length&&(e=mxUtils.parseXml(b),a=e.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(b=a.getAttribute("content"),null!=b&&"<"!=b.charAt(0)&&"%"!=b.charAt(0)&&(b=unescape(window.atob?atob(b):Base64.decode(cont,b))),null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b)),
null!=b&&0<b.length)a=mxUtils.parseXml(b).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||c||(e=null,"diagram"==a.nodeName?e=a:"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),0<b.length&&(e=b[Math.max(0,Math.min(b.length-1,urlParams.page||0))])),null!=e&&(a=Editor.parseDiagramNode(e)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||(a=null);return a};Editor.parseDiagramNode=function(a){var c=mxUtils.trim(mxUtils.getTextContent(a)),b=null;0<
c.length?(a=Graph.decompress(c),null!=a&&0<a.length&&(b=mxUtils.parseXml(a).documentElement)):(a=mxUtils.getChildNodes(a),0<a.length&&(b=mxUtils.createXmlDocument(),b.appendChild(b.importNode(a[0],!0)),b=b.documentElement));return b};Editor.getDiagramNodeXml=function(a){var c=mxUtils.getTextContent(a),b=null;0<c.length?b=Graph.decompress(c):null!=a.firstChild&&(b=mxUtils.getXml(a.firstChild));return b};Editor.extractGraphModelFromPng=function(a){var c=null;try{var b=a.substring(a.indexOf(",")+1),
-e=window.atob&&!mxClient.IS_SF?atob(b):Base64.decode(b,!0);EditorUi.parsePng(e,mxUtils.bind(this,function(a,b,d){a=e.substring(a+8,a+8+d);"zTXt"==b?(d=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,d)&&(a=pako.inflateRaw(a.substring(d+2),{to:"string"}).replace(/\+/g," "),null!=a&&0<a.length&&(c=a))):"tEXt"==b&&(a=a.split(String.fromCharCode(0)),1<a.length&&("mxGraphModel"==a[0]||"mxfile"==a[0])&&(c=a[1]));if(null!=c||"IDAT"==b)return!0}))}catch(Q){}null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));
+e=window.atob&&!mxClient.IS_SF?atob(b):Base64.decode(b,!0);EditorUi.parsePng(e,mxUtils.bind(this,function(a,b,d){a=e.substring(a+8,a+8+d);"zTXt"==b?(d=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,d)&&(a=pako.inflateRaw(a.substring(d+2),{to:"string"}).replace(/\+/g," "),null!=a&&0<a.length&&(c=a))):"tEXt"==b&&(a=a.split(String.fromCharCode(0)),1<a.length&&("mxGraphModel"==a[0]||"mxfile"==a[0])&&(c=a[1]));if(null!=c||"IDAT"==b)return!0}))}catch(S){}null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));
null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));return c};Editor.extractParserError=function(a,c){var b=null,e=null!=a?a.getElementsByTagName("parsererror"):null;null!=e&&0<e.length&&(b=c||mxResources.get("invalidChars"),e=e[0].getElementsByTagName("div"),0<e.length&&(b=mxUtils.getTextContent(e[0])));return b};Editor.configure=function(a,c){if(null!=a){Editor.config=a;Editor.configVersion=a.version;Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=
a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=a.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=a.autosaveDelay||DrawioFile.prototype.autosaveDelay;null!=a.templateFile&&(EditorUi.templateFile=a.templateFile);null!=a.globalVars&&
(Editor.globalVars=a.globalVars);null!=a.compressXml&&(Editor.compressXml=a.compressXml);a.customFonts&&(Menus.prototype.defaultFonts=a.customFonts.concat(Menus.prototype.defaultFonts));a.customPresetColors&&(ColorDialog.prototype.presetColors=a.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=a.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=a.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=a.css){var b=document.createElement("style");
@@ -2824,7 +2827,7 @@ b=0;b<a.plugins.length;b++)mxscript(a.plugins[b])}};Editor.GOOGLE_FONTS="https:/
null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(c){c=null!=c&&"mxlibrary"!=c.nodeName?this.extractGraphModel(c):null;if(null!=c){var b=c.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],e=b.getElementsByTagName("div");null!=e&&0<e.length&&(b=e[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==c.nodeName){b=c.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=
b&&""!=b)b!=this.graph.currentStyle&&(e=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=e&&(d=new mxCodec(e.ownerDocument),d.decode(e,this.graph.getStylesheet())));else if(e=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=e){var d=new mxCodec(e.ownerDocument);d.decode(e,this.graph.getStylesheet())}this.graph.currentStyle=b;this.graph.mathEnabled="1"==urlParams.math||
"1"==c.getAttribute("math");b=c.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==c.getAttribute("shadow"),!1);if(b=
-c.getAttribute("extFonts"))try{for(b=b.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}}),e=0;e<b.length;e++)this.graph.addExtFont(b[e].name,b[e].url)}catch(Q){console.log("ExtFonts format error: "+Q.message)}}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var b=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=b.apply(this,arguments);null!=this.graph.currentStyle&&
+c.getAttribute("extFonts"))try{for(b=b.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}}),e=0;e<b.length;e++)this.graph.addExtFont(b[e].name,b[e].url)}catch(S){console.log("ExtFonts format error: "+S.message)}}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var b=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=b.apply(this,arguments);null!=this.graph.currentStyle&&
"default-style2"!=this.graph.currentStyle&&c.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&c.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));c.setAttribute("math",this.graph.mathEnabled?"1":"0");c.setAttribute("shadow",this.graph.shadowVisible?"1":"0");if(null!=this.graph.extFonts&&0<this.graph.extFonts.length){var e=this.graph.extFonts.map(function(a){return a.name+"^"+a.url});c.setAttribute("extFonts",e.join("|"))}return c};Editor.prototype.isDataSvg=
function(a){try{var c=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=c&&(null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(J){}return!1};Editor.prototype.extractGraphModel=function(a,c){return Editor.extractGraphModel.apply(this,arguments)};var f=Editor.prototype.resetGraph;
Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();f.apply(this,arguments)};var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){d.apply(this,
@@ -2840,68 +2843,68 @@ b.onerror=function(){c(EditorUi.prototype.svgBrokenImage.src)};b.src=a}};Editor.
n)}else null!=f&&b.setAttribute(g,f)})(f[n])});b("image","xlink:href");b("img","src");0==d&&c(a)};Editor.prototype.base64Encode=function(a){for(var c="",b=0,e=a.length,d,k,g;b<e;){d=a.charCodeAt(b++)&255;if(b==e){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4);c+="==";break}k=a.charCodeAt(b++);if(b==e){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>
2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(k&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((k&15)<<2);c+="=";break}g=a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(k&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((k&15)<<2|(g&192)>>6);
c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return c};Editor.prototype.loadUrl=function(a,c,b,e,d,k){try{var g=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);d=null!=d?d:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=c){var e=a.getText();if(g){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=
-mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var e=Array(a.length),d=0;d<a.length;d++)e[d]=String.fromCharCode(a[d]);e=e.join("")}k=null!=k?k:"data:image/png;base64,";e=k+this.base64Encode(e)}c(e)}}else null!=b&&b({code:App.ERROR_UNKNOWN},a)}),function(){null!=b&&b({code:App.ERROR_UNKNOWN})},g,this.timeout,function(){d&&null!=b&&b({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(R){null!=b&&b(R)}};Editor.prototype.loadFonts=function(a){if(null!=this.fontCss&&null==this.resolvedFontCss){var c=
+mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var e=Array(a.length),d=0;d<a.length;d++)e[d]=String.fromCharCode(a[d]);e=e.join("")}k=null!=k?k:"data:image/png;base64,";e=k+this.base64Encode(e)}c(e)}}else null!=b&&b({code:App.ERROR_UNKNOWN},a)}),function(){null!=b&&b({code:App.ERROR_UNKNOWN})},g,this.timeout,function(){d&&null!=b&&b({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(T){null!=b&&b(T)}};Editor.prototype.loadFonts=function(a){if(null!=this.fontCss&&null==this.resolvedFontCss){var c=
function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.fontCss.split("url("),e=0,d={},k=mxUtils.bind(this,function(){if(0==e){for(var k=[b[0]],g=1;g<b.length;g++){var f=b[g].indexOf(")");k.push('url("');k.push(d[c(b[g].substring(0,f))]);k.push('"'+b[g].substring(f))}this.resolvedFontCss=k.join("");a()}});if(0<b.length)for(var g=1;g<b.length;g++){var f=b[g].indexOf(")"),n=null,q=b[g].indexOf("format(",f);0<q&&(n=c(b[g].substring(q+7,b[g].indexOf(")",
q))));mxUtils.bind(this,function(a){if(null==d[a]){d[a]=a;e++;var c="application/x-font-ttf";if("svg"==n||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==n||"embedded-opentype"==n||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==n||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==n||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==n||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==n||/(\.sfnt)($|\?)/i.test(a))c=
"application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){d[a]=c;e--;k()}),mxUtils.bind(this,function(a){e--;k()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(b[g].substring(0,f)),n)}}else a()};Editor.prototype.addMathCss=function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var c=document.getElementsByTagName("style"),b=0;b<c.length;b++)0<mxUtils.getTextContent(c[b]).indexOf("MathJax")&&
-a[0].appendChild(c[b].cloneNode(!0))};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||(null==this.graph.extFonts||0==this.graph.extFonts.length)&&this.useCanvasForExport};Editor.prototype.exportToCanvas=function(a,c,b,e,d,k,g,f,n,q,t,l,y,A){k=null!=k?k:!0;l=null!=l?l:this.graph;y=null!=y?y:0;var v=n?null:l.background;v==mxConstants.NONE&&(v=null);null==v&&(v=e);null==v&&0==n&&(v=this.graph.defaultPageBackgroundColor);this.convertImages(l.getSvg(v,null,null,A,null,null!=
-g?g:!0,null,null,null,q),mxUtils.bind(this,function(b){var e=new Image;e.onload=mxUtils.bind(this,function(){try{var g=document.createElement("canvas"),n=parseInt(b.getAttribute("width")),q=parseInt(b.getAttribute("height"));f=null!=f?f:1;null!=c&&(f=k?Math.min(1,Math.min(3*c/(4*q),c/n)):c/n);n=Math.ceil(f*n)+2*y;q=Math.ceil(f*q)+2*y;g.setAttribute("width",n);g.setAttribute("height",q);var t=g.getContext("2d");null!=v&&(t.beginPath(),t.rect(0,0,n,q),t.fillStyle=v,t.fill());t.scale(f,f);mxClient.IS_SF?
-window.setTimeout(function(){t.drawImage(e,y/f,y/f);a(g)},0):(t.drawImage(e,y/f,y/f),a(g))}catch(ia){null!=d&&d(ia)}});e.onerror=function(a){null!=d&&d(a)};try{q&&this.graph.addSvgShadow(b);var g=mxUtils.bind(this,function(){if(null!=this.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.resolvedFontCss;b.getElementsByTagName("defs")[0].appendChild(a)}l.mathEnabled&&this.addMathCss(b);e.src=this.createSvgDataUri(mxUtils.getXml(b))});this.loadFonts(g)}catch(W){null!=
-d&&d(W)}}),b,t)};Editor.prototype.writeGraphModelToPng=function(a,c,b,e,d){function k(a,c){var b=n;n+=c;return a.substring(b,n)}function g(a){a=k(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function f(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var n=0;if(k(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(k(a,4),
-"IHDR"!=k(a,4))null!=d&&d();else{k(a,17);d=a.substring(0,n);do{var q=g(a);if("IDAT"==k(a,4)){d=a.substring(0,n-8);b=b+String.fromCharCode(0)+("zTXt"==c?String.fromCharCode(0):"")+e;e=4294967295;e=EditorUi.prototype.updateCRC(e,c,0,4);e=EditorUi.prototype.updateCRC(e,b,0,b.length);d+=f(b.length)+c+b+f(e^4294967295);d+=a.substring(n-8,a.length);break}d+=a.substring(n-8,n-4+q);k(a,q);k(a,4)}while(q);return"data:image/png;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink=
-"https://desk.draw.io/support/solutions/articles/16000091426";var l=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,c){l.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var m=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){m.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,c){var b=null;null!=a.editor.graph.getModel().getParent(c)?
-b=c.getId():null!=a.currentPage&&(b=a.currentPage.getId());return b});if(null!=window.StyleFormatPanel){var p=Format.prototype.init;Format.prototype.init=function(){p.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var u=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?u.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=
-this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var x=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=x.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var c=this.editorUi,b=c.editor.graph,e=this.createOption(mxResources.get("shadow"),function(){return b.shadowVisible},function(a){var e=new ChangePageSetup(c);
-e.ignoreColor=!0;e.ignoreImage=!0;e.shadowVisible=a;b.model.execute(e)},{install:function(a){this.listener=function(){a(b.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});Editor.shadowOptionEnabled||(e.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(e,60));a.appendChild(e)}return a};var B=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=B.apply(this,
-arguments);var c=this.editorUi,b=c.editor.graph;if(b.isEnabled()){var e=c.getCurrentFile();if(null!=e&&e.isAutosaveOptional()){var d=this.createOption(mxResources.get("autosave"),function(){return c.editor.autosave},function(a){c.editor.setAutosave(a);c.editor.autosave&&e.isModified()&&e.fileChanged()},{install:function(a){this.listener=function(){a(c.editor.autosave)};c.editor.addListener("autosaveChanged",this.listener)},destroy:function(){c.editor.removeListener(this.listener)}});a.appendChild(d)}}if(this.isMathOptionVisible()&&
-b.isEnabled()&&"undefined"!==typeof MathJax){d=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return b.mathEnabled},function(a){c.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(b.mathEnabled)};c.addListener("mathEnabledChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});d.style.paddingTop="5px";a.appendChild(d);var k=c.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");
-k.style.position="relative";k.style.marginLeft="6px";k.style.top="2px";d.appendChild(k)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=
-[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",
-dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
-{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",
-type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",
-type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
-{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",
-min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},
-{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",
-min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0},{name:"imageAlign",
-dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",type:"float",min:0,defVal:24},{name:"arcSize",
-dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=
-[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,
-max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",
-defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=
-[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",
-font:"#ffffff"},{fill:"#aa00ff",stroke:"#7700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#ffffff"},{fill:"#f0a30a",stroke:"#BD7000",font:"#ffffff"},{fill:"#e3c800",stroke:"#B09500",font:"#ffffff"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},
-{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",
-stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=
-null;StyleFormatPanel.prototype.findCommonProperties=function(a,c,b){if(null!=c){var e=function(a){if(null!=a)if(b)for(var e=0;e<a.length;e++)c[a[e].name]=a[e];else for(var d in c){for(var k=!1,e=0;e<a.length;e++)if(a[e].name==d&&a[e].type==c[d].type){k=!0;break}k||delete c[d]}},d=this.editorUi.editor.graph.view.getState(a);null!=d&&null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,
-Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),e(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{e(JSON.parse(a))}catch(C){}}};var c=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));c.apply(this,arguments);if(Editor.enableCustomProperties){for(var b=
-{},e=a.vertices,d=a.edges,k=0;k<e.length;k++)this.findCommonProperties(e[k],b,0==k);for(k=0;k<d.length;k++)this.findCommonProperties(d[k],b,0==e.length&&0==k);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(),b,a))}};var e=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));
-c.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";c.style.marginRight="2px";a.appendChild(c);c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);
-mxUtils.br(a);return e.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,c,b){function e(a,c,b,e){l.getModel().beginUpdate();try{var d=[],k=[];if(null!=b.index){for(var g=[],f=b.parentRow.nextSibling;f&&f.getAttribute("data-pName")==a;)g.push(f.getAttribute("data-pValue")),f=f.nextSibling;b.index<g.length?null!=e?g.splice(e,1):g[b.index]=c:g.push(c);null!=b.size&&g.length>b.size&&(g=g.slice(0,b.size));c=g.join(",");null!=b.countProperty&&
-(l.setCellStyles(b.countProperty,g.length,l.getSelectionCells()),d.push(b.countProperty),k.push(g.length))}l.setCellStyles(a,c,l.getSelectionCells());d.push(a);k.push(c);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var n=b.dependentPropsDefVal[a],q=b.dependentPropsVals[a];if(q.length>c)q=q.slice(0,c);else for(var y=q.length;y<c;y++)q.push(n);q=q.join(",");l.setCellStyles(b.dependentProps[a],q,l.getSelectionCells());d.push(b.dependentProps[a]);k.push(q)}if("function"==typeof b.onChange)b.onChange(l,
-c);t.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",k,"cells",l.getSelectionCells()))}finally{l.getModel().endUpdate()}}function d(c,b,e){var d=mxUtils.getOffset(a,!0),k=mxUtils.getOffset(c,!0);b.style.position="absolute";b.style.left=k.x-d.x+"px";b.style.top=k.y-d.y+"px";b.style.width=c.offsetWidth+"px";b.style.height=c.offsetHeight-(e?4:0)+"px";b.style.zIndex=5}function k(a,c,b){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px";
-d.style.border="1px solid black";d.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(t,function(k){this.editorUi.pickColor(c,function(c){d.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":c;e(a,c,b)});mxEvent.consume(k)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function g(a,c,b,d,k,g,f){null!=c&&(c=c.split(","),y.push({name:a,values:c,type:b,defVal:d,countProperty:k,
-parentRow:g,isDeletable:!0,flipBkg:f}));btn=mxUtils.button("+",mxUtils.bind(t,function(c){for(var n=g,t=0;null!=n.nextSibling;)if(n.nextSibling.getAttribute("data-pName")==a)n=n.nextSibling,t++;else break;var l={type:b,parentRow:g,index:t,isDeletable:!0,defVal:d,countProperty:k},t=q(a,"",l,0==t%2,f);e(a,d,l);n.parentNode.insertBefore(t,n.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function f(a,c,b,e,d,k,g){if(0<d){var f=Array(d);
-c=null!=c?c.split(","):[];for(var n=0;n<d;n++)f[n]=null!=c[n]?c[n]:null!=e?e:"";y.push({name:a,values:f,type:b,defVal:e,parentRow:k,flipBkg:g,size:d})}return document.createElement("div")}function n(a,c,b){var d=document.createElement("input");d.type="checkbox";d.checked="1"==c;mxEvent.addListener(d,"change",function(){e(a,d.checked?"1":"0",b)});return d}function q(c,b,q,l,y){var A=q.dispName,z=q.type,v=document.createElement("tr");v.className="gePropRow"+(y?"Dark":"")+(l?"Alt":"")+" gePropNonHeaderRow";
-v.setAttribute("data-pName",c);v.setAttribute("data-pValue",b);l=!1;null!=q.index&&(v.setAttribute("data-index",q.index),A=(null!=A?A:"")+"["+q.index+"]",l=!0);var C=document.createElement("td");C.className="gePropRowCell";C.innerHTML=mxUtils.htmlEntities(mxResources.get(A,null,A));l&&(C.style.textAlign="right");v.appendChild(C);C=document.createElement("td");C.className="gePropRowCell";if("color"==z)C.appendChild(k(c,b,q));else if("bool"==z||"boolean"==z)C.appendChild(n(c,b,q));else if("enum"==z){var m=
-q.enumList;for(y=0;y<m.length;y++)if(A=m[y],A.val==b){C.innerHTML=mxUtils.htmlEntities(mxResources.get(A.dispName,null,A.dispName));break}mxEvent.addListener(C,"click",mxUtils.bind(t,function(){var k=document.createElement("select");d(C,k);for(var g=0;g<m.length;g++){var f=m[g],n=document.createElement("option");n.value=mxUtils.htmlEntities(f.val);n.innerHTML=mxUtils.htmlEntities(mxResources.get(f.dispName,null,f.dispName));k.appendChild(n)}k.value=b;a.appendChild(k);mxEvent.addListener(k,"change",
-function(){var a=mxUtils.htmlEntities(k.value);e(c,a,q)});k.focus();mxEvent.addListener(k,"blur",function(){a.removeChild(k)})}))}else"dynamicArr"==z?C.appendChild(g(c,b,q.subType,q.subDefVal,q.countProperty,v,y)):"staticArr"==z?C.appendChild(f(c,b,q.subType,q.subDefVal,q.size,v,y)):(C.innerHTML=b,mxEvent.addListener(C,"click",mxUtils.bind(t,function(){function k(){var a=g.value,a=0==a.length&&"string"!=z?0:a;q.allowAuto&&("auto"==a.trim().toLowerCase()?(a="auto",z="string"):(a=parseFloat(a),a=isNaN(a)?
-0:a));null!=q.min&&a<q.min?a=q.min:null!=q.max&&a>q.max&&(a=q.max);a=mxUtils.htmlEntities(("int"==z?parseInt(a):a)+"");e(c,a,q)}var g=document.createElement("input");d(C,g,!0);g.value=b;g.className="gePropEditor";"int"!=z&&"float"!=z||q.allowAuto||(g.type="number",g.step="int"==z?"1":"any",null!=q.min&&(g.min=parseFloat(q.min)),null!=q.max&&(g.max=parseFloat(q.max)));a.appendChild(g);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&k()});g.focus();mxEvent.addListener(g,"blur",function(){k()})})));
-q.isDeletable&&(y=mxUtils.button("-",mxUtils.bind(t,function(a){e(c,"",q,q.index);mxEvent.consume(a)})),y.style.height="16px",y.style.width="25px",y.style["float"]="right",y.className="geColorBtn",C.appendChild(y));v.appendChild(C);return v}var t=this,l=this.editorUi.editor.graph,y=[];a.style.position="relative";a.style.padding="0";var v=document.createElement("table");v.style.whiteSpace="nowrap";v.style.width="100%";var A=document.createElement("tr");A.className="gePropHeader";var z=document.createElement("th");
-z.className="gePropHeaderCell";var m=document.createElement("img");m.src=Sidebar.prototype.expandedImage;z.appendChild(m);mxUtils.write(z,mxResources.get("property"));A.style.cursor="pointer";var p=function(){var c=v.querySelectorAll(".gePropNonHeaderRow"),b;if(t.editorUi.propertiesCollapsed){m.src=Sidebar.prototype.collapsedImage;b="none";for(var e=a.childNodes.length-1;0<=e;e--)try{var d=a.childNodes[e],k=d.nodeName.toUpperCase();"INPUT"!=k&&"SELECT"!=k||a.removeChild(d)}catch(oa){}}else m.src=
-Sidebar.prototype.expandedImage,b="";for(e=0;e<c.length;e++)c[e].style.display=b};mxEvent.addListener(A,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;p()});A.appendChild(z);z=document.createElement("th");z.className="gePropHeaderCell";z.innerHTML=mxResources.get("value");A.appendChild(z);v.appendChild(A);var D=!1,E=!1,F;for(F in c)if(A=c[F],"function"!=typeof A.isVisible||A.isVisible(b,this)){var I=null!=b.style[F]?mxUtils.htmlEntities(b.style[F]+""):A.defVal;if("separator"==
-A.type)E=!E;else{if("staticArr"==A.type)A.size=parseInt(b.style[A.sizeProperty]||c[A.sizeProperty].defVal)||0;else if(null!=A.dependentProps){for(var u=A.dependentProps,x=[],V=[],z=0;z<u.length;z++){var B=b.style[u[z]];V.push(c[u[z]].subDefVal);x.push(null!=B?B.split(","):[])}A.dependentPropsDefVal=V;A.dependentPropsVals=x}v.appendChild(q(F,I,A,D,E));D=!D}}for(z=0;z<y.length;z++)for(A=y[z],c=A.parentRow,b=0;b<A.values.length;b++)F=q(A.name,A.values[b],{type:A.type,parentRow:A.parentRow,isDeletable:A.isDeletable,
-index:b,defVal:A.defVal,countProperty:A.countProperty,size:A.size},0==b%2,A.flipBkg),c.parentNode.insertBefore(F,c.nextSibling),c=F;a.appendChild(v);p();return a};StyleFormatPanel.prototype.addStyles=function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){e.getModel().beginUpdate();try{var b=e.getSelectionCells();for(c=0;c<b.length;c++){for(var d=e.getModel().getStyle(b[c]),g=0;g<k.length;g++)d=mxUtils.removeStylename(d,k[g]);var f=e.getModel().isVertex(b[c])?e.defaultVertexStyle:
-e.defaultEdgeStyle;null!=a?(d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(f,mxConstants.STYLE_GRADIENTCOLOR,null)),d=""==a.fill?mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(f,mxConstants.STYLE_FILLCOLOR,null)),d=""==a.stroke?mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(f,mxConstants.STYLE_STROKECOLOR,
-null)),e.getModel().isVertex(b[c])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(f,mxConstants.STYLE_FONTCOLOR,null)))):(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(f,mxConstants.STYLE_FILLCOLOR,"#ffffff")),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(f,mxConstants.STYLE_STROKECOLOR,"#000000")),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(f,mxConstants.STYLE_GRADIENTCOLOR,null)),e.getModel().isVertex(b[c])&&
-(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(f,mxConstants.STYLE_FONTCOLOR,null))));e.getModel().setStyle(b[c],d)}}finally{e.getModel().endUpdate()}});c.className="geStyleButton";c.style.width="36px";c.style.height="30px";c.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":
-c.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?c.style.background="url('"+Dialog.prototype.noColorImage+"')":c.style.backgroundColor=""==a.fill?mxUtils.getValue(e.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"):a.fill||mxUtils.getValue(e.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"),c.style.border=a.stroke==mxConstants.NONE?"1px solid transparent":""==a.stroke?"1px solid "+
-mxUtils.getValue(e.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"):"1px solid "+(a.stroke||mxUtils.getValue(e.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"));else{var b=mxUtils.getValue(e.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.getValue(e.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=b;c.style.border="1px solid "+g}d.appendChild(c)}d.innerHTML="";for(var b=
-0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(d),c(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var e=this.editorUi.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d);var k="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");
-null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var g=document.createElement("div");g.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+a[0].appendChild(c[b].cloneNode(!0))};Editor.prototype.addFontCss=function(a){var c=a.getElementsByTagName("defs");null!=this.fontCss&&null!=c&&0<c.length&&(a=a.ownerDocument,a=null!=a.createElementNS?a.createElementNS(mxConstants.NS_SVG,"style"):a.createElement("style"),a.setAttribute("type","text/css"),mxUtils.setTextContent(a,this.fontCss),c[0][0].appendChild(a))};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||(null==this.graph.extFonts||0==this.graph.extFonts.length)&&
+this.useCanvasForExport};Editor.prototype.exportToCanvas=function(a,c,b,e,d,k,g,f,n,q,t,l,x,A){k=null!=k?k:!0;l=null!=l?l:this.graph;x=null!=x?x:0;var y=n?null:l.background;y==mxConstants.NONE&&(y=null);null==y&&(y=e);null==y&&0==n&&(y=this.graph.defaultPageBackgroundColor);this.convertImages(l.getSvg(y,null,null,A,null,null!=g?g:!0,null,null,null,q),mxUtils.bind(this,function(b){var e=new Image;e.onload=mxUtils.bind(this,function(){try{var g=document.createElement("canvas"),n=parseInt(b.getAttribute("width")),
+q=parseInt(b.getAttribute("height"));f=null!=f?f:1;null!=c&&(f=k?Math.min(1,Math.min(3*c/(4*q),c/n)):c/n);n=Math.ceil(f*n)+2*x;q=Math.ceil(f*q)+2*x;g.setAttribute("width",n);g.setAttribute("height",q);var t=g.getContext("2d");null!=y&&(t.beginPath(),t.rect(0,0,n,q),t.fillStyle=y,t.fill());t.scale(f,f);mxClient.IS_SF?window.setTimeout(function(){t.drawImage(e,x/f,x/f);a(g)},0):(t.drawImage(e,x/f,x/f),a(g))}catch(ia){null!=d&&d(ia)}});e.onerror=function(a){null!=d&&d(a)};try{q&&this.graph.addSvgShadow(b);
+var g=mxUtils.bind(this,function(){if(null!=this.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.resolvedFontCss;b.getElementsByTagName("defs")[0].appendChild(a)}l.mathEnabled&&this.addMathCss(b);e.src=this.createSvgDataUri(mxUtils.getXml(b))});this.loadFonts(g)}catch(W){null!=d&&d(W)}}),b,t)};Editor.prototype.writeGraphModelToPng=function(a,c,b,e,d){function k(a,c){var b=n;n+=c;return a.substring(b,n)}function g(a){a=k(a,4);return a.charCodeAt(3)+
+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function f(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var n=0;if(k(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(k(a,4),"IHDR"!=k(a,4))null!=d&&d();else{k(a,17);d=a.substring(0,n);do{var q=g(a);if("IDAT"==k(a,4)){d=a.substring(0,n-8);b=b+String.fromCharCode(0)+("zTXt"==c?String.fromCharCode(0):
+"")+e;e=4294967295;e=EditorUi.prototype.updateCRC(e,c,0,4);e=EditorUi.prototype.updateCRC(e,b,0,b.length);d+=f(b.length)+c+b+f(e^4294967295);d+=a.substring(n-8,a.length);break}d+=a.substring(n-8,n-4+q);k(a,q);k(a,4)}while(q);return"data:image/png;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";var l=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,c){l.apply(this,
+arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var m=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){m.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,c){var b=null;null!=a.editor.graph.getModel().getParent(c)?b=c.getId():null!=a.currentPage&&(b=a.currentPage.getId());return b});if(null!=window.StyleFormatPanel){var p=Format.prototype.init;
+Format.prototype.init=function(){p.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var u=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?u.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=
+function(a){return!1};var v=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=v.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var c=this.editorUi,b=c.editor.graph,e=this.createOption(mxResources.get("shadow"),function(){return b.shadowVisible},function(a){var e=new ChangePageSetup(c);e.ignoreColor=!0;e.ignoreImage=!0;e.shadowVisible=a;b.model.execute(e)},{install:function(a){this.listener=function(){a(b.shadowVisible)};
+c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});Editor.shadowOptionEnabled||(e.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(e,60));a.appendChild(e)}return a};var B=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=B.apply(this,arguments);var c=this.editorUi,b=c.editor.graph;if(b.isEnabled()){var e=c.getCurrentFile();if(null!=e&&e.isAutosaveOptional()){var d=
+this.createOption(mxResources.get("autosave"),function(){return c.editor.autosave},function(a){c.editor.setAutosave(a);c.editor.autosave&&e.isModified()&&e.fileChanged()},{install:function(a){this.listener=function(){a(c.editor.autosave)};c.editor.addListener("autosaveChanged",this.listener)},destroy:function(){c.editor.removeListener(this.listener)}});a.appendChild(d)}}if(this.isMathOptionVisible()&&b.isEnabled()&&"undefined"!==typeof MathJax){d=this.createOption(mxResources.get("mathematicalTypesetting"),
+function(){return b.mathEnabled},function(a){c.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(b.mathEnabled)};c.addListener("mathEnabledChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});d.style.paddingTop="5px";a.appendChild(d);var k=c.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");k.style.position="relative";k.style.marginLeft="6px";k.style.top="2px";d.appendChild(k)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=
+[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",
+dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",
+type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",
+dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=
+[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=
+[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=
+[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",
+type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",
+type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=
+[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",
+dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=
+[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",
+min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",
+min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=[{name:"dx",dispName:"Width1",
+type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=
+[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},
+{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#aa00ff",stroke:"#7700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#ffffff"},{fill:"#f0a30a",stroke:"#BD7000",font:"#ffffff"},{fill:"#e3c800",
+stroke:"#B09500",font:"#ffffff"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},
+{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",
+stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(a,c,b){if(null!=c){var e=function(a){if(null!=a)if(b)for(var e=0;e<a.length;e++)c[a[e].name]=a[e];else for(var d in c){for(var k=!1,e=0;e<a.length;e++)if(a[e].name==d&&a[e].type==c[d].type){k=!0;break}k||delete c[d]}},d=this.editorUi.editor.graph.view.getState(a);null!=d&&
+null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),e(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{e(JSON.parse(a))}catch(C){}}};var c=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=
+this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));c.apply(this,arguments);if(Editor.enableCustomProperties){for(var b={},e=a.vertices,d=a.edges,k=0;k<e.length;k++)this.findCommonProperties(e[k],b,0==k);for(k=0;k<d.length;k++)this.findCommonProperties(d[k],b,0==e.length&&0==k);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(),
+b,a))}};var e=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";c.style.marginRight="2px";a.appendChild(c);c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,
+function(a){this.editorUi.actions.get("pasteStyle").funct()}));c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return e.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,c,b){function e(a,c,b,e){l.getModel().beginUpdate();try{var d=[],k=[];if(null!=b.index){for(var g=[],f=b.parentRow.nextSibling;f&&
+f.getAttribute("data-pName")==a;)g.push(f.getAttribute("data-pValue")),f=f.nextSibling;b.index<g.length?null!=e?g.splice(e,1):g[b.index]=c:g.push(c);null!=b.size&&g.length>b.size&&(g=g.slice(0,b.size));c=g.join(",");null!=b.countProperty&&(l.setCellStyles(b.countProperty,g.length,l.getSelectionCells()),d.push(b.countProperty),k.push(g.length))}l.setCellStyles(a,c,l.getSelectionCells());d.push(a);k.push(c);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var n=b.dependentPropsDefVal[a],
+q=b.dependentPropsVals[a];if(q.length>c)q=q.slice(0,c);else for(var x=q.length;x<c;x++)q.push(n);q=q.join(",");l.setCellStyles(b.dependentProps[a],q,l.getSelectionCells());d.push(b.dependentProps[a]);k.push(q)}if("function"==typeof b.onChange)b.onChange(l,c);t.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",k,"cells",l.getSelectionCells()))}finally{l.getModel().endUpdate()}}function d(c,b,e){var d=mxUtils.getOffset(a,!0),k=mxUtils.getOffset(c,!0);b.style.position="absolute";
+b.style.left=k.x-d.x+"px";b.style.top=k.y-d.y+"px";b.style.width=c.offsetWidth+"px";b.style.height=c.offsetHeight-(e?4:0)+"px";b.style.zIndex=5}function k(a,c,b){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(t,function(k){this.editorUi.pickColor(c,function(c){d.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+
+"')":c;e(a,c,b)});mxEvent.consume(k)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function g(a,c,b,d,k,g,f){null!=c&&(c=c.split(","),x.push({name:a,values:c,type:b,defVal:d,countProperty:k,parentRow:g,isDeletable:!0,flipBkg:f}));btn=mxUtils.button("+",mxUtils.bind(t,function(c){for(var n=g,t=0;null!=n.nextSibling;)if(n.nextSibling.getAttribute("data-pName")==a)n=n.nextSibling,t++;else break;var l={type:b,parentRow:g,index:t,isDeletable:!0,
+defVal:d,countProperty:k},t=q(a,"",l,0==t%2,f);e(a,d,l);n.parentNode.insertBefore(t,n.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function f(a,c,b,e,d,k,g){if(0<d){var f=Array(d);c=null!=c?c.split(","):[];for(var n=0;n<d;n++)f[n]=null!=c[n]?c[n]:null!=e?e:"";x.push({name:a,values:f,type:b,defVal:e,parentRow:k,flipBkg:g,size:d})}return document.createElement("div")}function n(a,c,b){var d=document.createElement("input");d.type=
+"checkbox";d.checked="1"==c;mxEvent.addListener(d,"change",function(){e(a,d.checked?"1":"0",b)});return d}function q(c,b,q,l,x){var z=q.dispName,A=q.type,y=document.createElement("tr");y.className="gePropRow"+(x?"Dark":"")+(l?"Alt":"")+" gePropNonHeaderRow";y.setAttribute("data-pName",c);y.setAttribute("data-pValue",b);l=!1;null!=q.index&&(y.setAttribute("data-index",q.index),z=(null!=z?z:"")+"["+q.index+"]",l=!0);var C=document.createElement("td");C.className="gePropRowCell";C.innerHTML=mxUtils.htmlEntities(mxResources.get(z,
+null,z));l&&(C.style.textAlign="right");y.appendChild(C);C=document.createElement("td");C.className="gePropRowCell";if("color"==A)C.appendChild(k(c,b,q));else if("bool"==A||"boolean"==A)C.appendChild(n(c,b,q));else if("enum"==A){var m=q.enumList;for(x=0;x<m.length;x++)if(z=m[x],z.val==b){C.innerHTML=mxUtils.htmlEntities(mxResources.get(z.dispName,null,z.dispName));break}mxEvent.addListener(C,"click",mxUtils.bind(t,function(){var k=document.createElement("select");d(C,k);for(var g=0;g<m.length;g++){var f=
+m[g],n=document.createElement("option");n.value=mxUtils.htmlEntities(f.val);n.innerHTML=mxUtils.htmlEntities(mxResources.get(f.dispName,null,f.dispName));k.appendChild(n)}k.value=b;a.appendChild(k);mxEvent.addListener(k,"change",function(){var a=mxUtils.htmlEntities(k.value);e(c,a,q)});k.focus();mxEvent.addListener(k,"blur",function(){a.removeChild(k)})}))}else"dynamicArr"==A?C.appendChild(g(c,b,q.subType,q.subDefVal,q.countProperty,y,x)):"staticArr"==A?C.appendChild(f(c,b,q.subType,q.subDefVal,q.size,
+y,x)):(C.innerHTML=b,mxEvent.addListener(C,"click",mxUtils.bind(t,function(){function k(){var a=g.value,a=0==a.length&&"string"!=A?0:a;q.allowAuto&&("auto"==a.trim().toLowerCase()?(a="auto",A="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=q.min&&a<q.min?a=q.min:null!=q.max&&a>q.max&&(a=q.max);a=mxUtils.htmlEntities(("int"==A?parseInt(a):a)+"");e(c,a,q)}var g=document.createElement("input");d(C,g,!0);g.value=b;g.className="gePropEditor";"int"!=A&&"float"!=A||q.allowAuto||(g.type="number",g.step=
+"int"==A?"1":"any",null!=q.min&&(g.min=parseFloat(q.min)),null!=q.max&&(g.max=parseFloat(q.max)));a.appendChild(g);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&k()});g.focus();mxEvent.addListener(g,"blur",function(){k()})})));q.isDeletable&&(x=mxUtils.button("-",mxUtils.bind(t,function(a){e(c,"",q,q.index);mxEvent.consume(a)})),x.style.height="16px",x.style.width="25px",x.style["float"]="right",x.className="geColorBtn",C.appendChild(x));y.appendChild(C);return y}var t=this,l=this.editorUi.editor.graph,
+x=[];a.style.position="relative";a.style.padding="0";var A=document.createElement("table");A.style.whiteSpace="nowrap";A.style.width="100%";var z=document.createElement("tr");z.className="gePropHeader";var y=document.createElement("th");y.className="gePropHeaderCell";var m=document.createElement("img");m.src=Sidebar.prototype.expandedImage;y.appendChild(m);mxUtils.write(y,mxResources.get("property"));z.style.cursor="pointer";var p=function(){var c=A.querySelectorAll(".gePropNonHeaderRow"),b;if(t.editorUi.propertiesCollapsed){m.src=
+Sidebar.prototype.collapsedImage;b="none";for(var e=a.childNodes.length-1;0<=e;e--)try{var d=a.childNodes[e],k=d.nodeName.toUpperCase();"INPUT"!=k&&"SELECT"!=k||a.removeChild(d)}catch(oa){}}else m.src=Sidebar.prototype.expandedImage,b="";for(e=0;e<c.length;e++)c[e].style.display=b};mxEvent.addListener(z,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;p()});z.appendChild(y);y=document.createElement("th");y.className="gePropHeaderCell";y.innerHTML=mxResources.get("value");
+z.appendChild(y);A.appendChild(z);var G=!1,D=!1,E;for(E in c)if(z=c[E],"function"!=typeof z.isVisible||z.isVisible(b,this)){var I=null!=b.style[E]?mxUtils.htmlEntities(b.style[E]+""):z.defVal;if("separator"==z.type)D=!D;else{if("staticArr"==z.type)z.size=parseInt(b.style[z.sizeProperty]||c[z.sizeProperty].defVal)||0;else if(null!=z.dependentProps){for(var u=z.dependentProps,O=[],v=[],y=0;y<u.length;y++){var B=b.style[u[y]];v.push(c[u[y]].subDefVal);O.push(null!=B?B.split(","):[])}z.dependentPropsDefVal=
+v;z.dependentPropsVals=O}A.appendChild(q(E,I,z,G,D));G=!G}}for(y=0;y<x.length;y++)for(z=x[y],c=z.parentRow,b=0;b<z.values.length;b++)E=q(z.name,z.values[b],{type:z.type,parentRow:z.parentRow,isDeletable:z.isDeletable,index:b,defVal:z.defVal,countProperty:z.countProperty,size:z.size},0==b%2,z.flipBkg),c.parentNode.insertBefore(E,c.nextSibling),c=E;a.appendChild(A);p();return a};StyleFormatPanel.prototype.addStyles=function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){e.getModel().beginUpdate();
+try{var b=e.getSelectionCells();for(c=0;c<b.length;c++){for(var d=e.getModel().getStyle(b[c]),g=0;g<k.length;g++)d=mxUtils.removeStylename(d,k[g]);var f=e.getModel().isVertex(b[c])?e.defaultVertexStyle:e.defaultEdgeStyle;null!=a?(d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(f,mxConstants.STYLE_GRADIENTCOLOR,null)),d=""==a.fill?mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(f,mxConstants.STYLE_FILLCOLOR,
+null)),d=""==a.stroke?mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(f,mxConstants.STYLE_STROKECOLOR,null)),e.getModel().isVertex(b[c])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(f,mxConstants.STYLE_FONTCOLOR,null)))):(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(f,mxConstants.STYLE_FILLCOLOR,"#ffffff")),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(f,
+mxConstants.STYLE_STROKECOLOR,"#000000")),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(f,mxConstants.STYLE_GRADIENTCOLOR,null)),e.getModel().isVertex(b[c])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(f,mxConstants.STYLE_FONTCOLOR,null))));e.getModel().setStyle(b[c],d)}}finally{e.getModel().endUpdate()}});c.className="geStyleButton";c.style.width="36px";c.style.height="30px";c.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&
+(mxClient.IS_QUIRKS||10>document.documentMode)?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":c.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?c.style.background="url('"+Dialog.prototype.noColorImage+"')":c.style.backgroundColor=""==a.fill?mxUtils.getValue(e.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"):a.fill||mxUtils.getValue(e.defaultVertexStyle,
+mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"),c.style.border=a.stroke==mxConstants.NONE?"1px solid transparent":""==a.stroke?"1px solid "+mxUtils.getValue(e.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"):"1px solid "+(a.stroke||mxUtils.getValue(e.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"));else{var b=mxUtils.getValue(e.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.getValue(e.defaultVertexStyle,
+mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=b;c.style.border="1px solid "+g}d.appendChild(c)}d.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(d),c(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var e=this.editorUi.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight="20px";
+a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d);var k="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var g=document.createElement("div");g.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var f=document.createElement("div");f.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
1<this.defaultColorSchemes.length&&(a.appendChild(g),a.appendChild(f));mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(g);b(f);c(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&
(b=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),b.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),b.style.width="202px",b.style.marginBottom="2px",a.appendChild(b));var e=this.editorUi.editor.graph,d=e.view.getState(e.getSelectionCell());1==e.getSelectionCount()&&null!=d&&null!=d.shape&&null!=d.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
@@ -2912,58 +2915,58 @@ a.button,c.relatedTarget=a.relatedTarget}catch(C){}}k.apply(this,arguments);wind
this.layoutManager.getLayout=function(a){var c=this.graph.getCellStyle(a);if(null!=c){if("rack"==c.childLayout){var b=new mxStackLayout(this.graph,!1);b.gridSize=null!=c.rackUnitSize?parseFloat(c.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;b.fill=!0;b.marginLeft=c.marginLeft||0;b.marginRight=c.marginRight||0;b.marginTop=c.marginTop||0;b.marginBottom=c.marginBottom||0;b.allowGaps=c.allowGaps||0;b.resizeParent=!1;return b}if("undefined"!==typeof mxTableLayout&&"tableLayout"==
c.childLayout)return b=new mxTableLayout(this.graph),b.rows=c.tableRows||2,b.columns=c.tableColumns||2,b.colPercentages=c.colPercentages,b.rowPercentages=c.rowPercentages,b.equalColumns="1"==mxUtils.getValue(c,"equalColumns",b.colPercentages?"0":"1"),b.equalRows="1"==mxUtils.getValue(c,"equalRows",b.rowPercentages?"0":"1"),b.resizeParent="1"==mxUtils.getValue(c,"resizeParent","1"),b.border=c.tableBorder||b.border,b.marginLeft=c.marginLeft||0,b.marginRight=c.marginRight||0,b.marginTop=c.marginTop||
0,b.marginBottom=c.marginBottom||0,b.autoAddCol="1"==mxUtils.getValue(c,"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(c,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=c.colWidths||"100",b.rowHeights=c.rowHeights||"50",b}return e.apply(this,arguments)};this.updateGlobalUrlVariables()};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));
-if(null!=a)for(var c in a)this.globalVars[c]=a[c]}catch(V){null!=window.console&&console.log("Error in vars URL parameter: "+V)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var q=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var c=q.apply(this,arguments);null==c&&null!=this.globalVars&&(c=this.globalVars[a]);return c};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=
-this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var n=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,c,b,e,d,k,g,f,q,t,l){var y=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&&(y=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var A=n.apply(this,arguments);if(l&&null!=this.extFonts&&0<this.extFonts.length){var z=
-A.ownerDocument,v=null!=z.createElementNS?z.createElementNS(mxConstants.NS_SVG,"style"):z.createElement("style");null!=z.setAttributeNS?v.setAttributeNS("type","text/css"):v.setAttribute("type","text/css");for(var C="",m=0;m<this.extFonts.length;m++)var p=this.extFonts[m].name,D=this.extFonts[m].url,C=0==D.indexOf(Editor.GOOGLE_FONTS)?C+("@import url("+D+");"):C+('@font-face {font-family: "'+p+'";src: url("'+D+'");}');v.appendChild(z.createTextNode(C));A.getElementsByTagName("defs")[0].appendChild(v)}null!=
-y&&(this.stylesheet=y,this.refresh());return A};var g=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=g.apply(this,arguments);if(this.mathEnabled){var c=this.container.getBoundingClientRect(),b=this.container.scrollTop-c.y,e=this.container.scrollLeft-c.x,d=a.drawText;a.drawText=function(a,c){if(null!=a.text&&null!=a.text.node&&null==a.text.node.ownerSVGElement){var k=a.text.node.style.transform;a.text.node.style.transform="";var g=a.text.node.getBoundingClientRect(),
-f=a.text.node.cloneNode(!0);a.text.node.style.transform=k;f.style.transformOrigin="";for(var n=f.getElementsByTagName("math");0<n.length;)n[0].parentNode.removeChild(n[0]);var n=c.state.scale*a.text.scale,q=(g.x+e)/a.text.scale+c.state.dx,t=(g.y+b)/a.text.scale+c.state.dy,l=g.width,g=g.height,y=c.root.ownerDocument.createElementNS(mxConstants.NS_SVG,"foreignObject");y.setAttribute("x",q*n);y.setAttribute("y",t*n);y.setAttribute("width",l);y.setAttribute("height",g);f.style.top="0px";f.style.left=
-"0px";var A=a.text.getTextRotation(),z=a.text.margin.x,v=a.text.margin.y,k=(2*g*v-g*n*v)/n,k="translate("+c.format((2*l*z-l*n*z)/n)+","+c.format(k)+")";0!=A&&(k+=" rotate("+A+")");y.setAttribute("transform-origin",c.format((q-z*l)*n)+" "+c.format((t-v*g)*n));y.setAttribute("transform",k+" scale("+n+")");y.appendChild(f);c.root.ownerSVGElement.appendChild(y)}else d.apply(this,arguments)}}return a};var y=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return y.apply(this,
-arguments)&&!mxClient.IS_SF};var A=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){A.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
-this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var t=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=
-function(){t.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions)){for(var c=0;c<a.actions.length;c++){var b=a.actions[c];if(null!=b.open)if(this.isCustomLink(b.open)){if(!this.customLinkClicked(b.open))return}else this.openLink(b.open)}this.model.beginUpdate();try{for(c=0;c<a.actions.length;c++)b=a.actions[c],null!=b.toggle&&this.toggleCells(this.getCellsForAction(b.toggle,
-!0)),null!=b.show&&this.setCellsVisible(this.getCellsForAction(b.show,!0),!0),null!=b.hide&&this.setCellsVisible(this.getCellsForAction(b.hide,!0),!1)}finally{this.model.endUpdate()}for(c=0;c<a.actions.length;c++){var b=a.actions[c],e=[];null!=b.select&&this.isEnabled()&&(e=this.getCellsForAction(b.select),this.setSelectionCells(e));null!=b.highlight&&(e=this.getCellsForAction(b.highlight),this.highlightCells(e,b.highlight.color,b.highlight.duration,b.highlight.opacity));null!=b.scroll&&(e=this.getCellsForAction(b.scroll));
-0<e.length&&this.scrollCellToVisible(e[0])}}};Graph.prototype.updateCustomLinksForCell=function(a,c){var b=this.getLinkForCell(c);null!=b&&"data:action/json,"==b.substring(0,17)&&this.setLinkForCell(c,this.updateCustomLink(a,b));if(this.isHtmlLabel(c)){var e=document.createElement("div");e.innerHTML=this.getLabel(c);for(var d=e.getElementsByTagName("a"),k=!1,g=0;g<d.length;g++)b=d[g].getAttribute("href"),null!=b&&"data:action/json,"==b.substring(0,17)&&(d[g].setAttribute("href",this.updateCustomLink(a,
-b)),k=!0);k&&this.labelChanged(c,e.innerHTML)}};Graph.prototype.updateCustomLink=function(a,c){if("data:action/json,"==c.substring(0,17))try{var b=JSON.parse(c.substring(17));null!=b.actions&&(this.updateCustomLinkActions(a,b.actions),c="data:action/json,"+JSON.stringify(b))}catch(J){}return c};Graph.prototype.updateCustomLinkActions=function(a,c){for(var b=0;b<c.length;b++){var e=c[b];this.updateCustomLinkAction(a,e.toggle);this.updateCustomLinkAction(a,e.show);this.updateCustomLinkAction(a,e.hide);
-this.updateCustomLinkAction(a,e.select);this.updateCustomLinkAction(a,e.highlight);this.updateCustomLinkAction(a,e.scroll)}};Graph.prototype.updateCustomLinkAction=function(a,c){if(null!=c&&null!=c.cells){for(var b=[],e=0;e<c.cells.length;e++)if("*"==c.cells[e])b.push(c.cells[e]);else{var d=a[c.cells[e]];null!=d?""!=d&&b.push(d):b.push(c.cells[e])}c.cells=b}};Graph.prototype.getCellsForAction=function(a,c){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,null,null,c))};Graph.prototype.getCellsById=
-function(a){var c=[];if(null!=a)for(var b=0;b<a.length;b++)if("*"==a[b])var e=this.getDefaultParent(),c=c.concat(this.model.filterDescendants(function(a){return a!=e},e));else{var d=this.model.getCell(a[b]);null!=d&&c.push(d)}return c};Graph.prototype.getCellsForTags=function(a,c,b,e){var d=[];if(null!=a){c=null!=c?c:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var k=0,g={},f=0;f<a.length;f++)0<a[f].length&&(g[a[f].toLowerCase()]=!0,k++);for(f=0;f<c.length;f++)if(e&&this.model.getParent(c[f])==
-this.model.root||this.model.isVertex(c[f])||this.model.isEdge(c[f])){var n=null!=c[f].value&&"object"==typeof c[f].value?mxUtils.trim(c[f].value.getAttribute(b)||""):"",q=!1;if(0<n.length){if(n=n.toLowerCase().split(" "),n.length>=a.length){for(var t=q=0;t<n.length&&q<k;t++)null!=g[n[t]]&&q++;q=q==k}}else q=0==a.length;q&&d.push(c[f])}}return d};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],!this.model.isVisible(a[c]))}finally{this.model.endUpdate()}};
-Graph.prototype.setCellsVisible=function(a,c){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],c)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(a,c,b,e){for(var d=0;d<a.length;d++)this.highlightCell(a[d],c,b,e)};Graph.prototype.highlightCell=function(a,c,b,e){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),k=new mxCellHighlight(this,
-c,d,!1);null!=e&&(k.opacity=e);k.highlight(a);window.setTimeout(function(){null!=k.shape&&(mxUtils.setPrefixedStyle(k.shape.node.style,"transition","all 1200ms ease-in-out"),k.shape.node.style.opacity=0);window.setTimeout(function(){k.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,c,b){b=null!=b?b:!1;var e=a.ownerDocument,d=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"filter"):e.createElement("filter");d.setAttribute("id",this.shadowId);var k=null!=e.createElementNS?
-e.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):e.createElement("feGaussianBlur");k.setAttribute("in","SourceAlpha");k.setAttribute("stdDeviation",this.svgShadowBlur);k.setAttribute("result","blur");d.appendChild(k);k=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feOffset"):e.createElement("feOffset");k.setAttribute("in","blur");k.setAttribute("dx",this.svgShadowSize);k.setAttribute("dy",this.svgShadowSize);k.setAttribute("result","offsetBlur");d.appendChild(k);k=null!=e.createElementNS?
-e.createElementNS(mxConstants.NS_SVG,"feFlood"):e.createElement("feFlood");k.setAttribute("flood-color",this.svgShadowColor);k.setAttribute("flood-opacity",this.svgShadowOpacity);k.setAttribute("result","offsetColor");d.appendChild(k);k=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feComposite"):e.createElement("feComposite");k.setAttribute("in","offsetColor");k.setAttribute("in2","offsetBlur");k.setAttribute("operator","in");k.setAttribute("result","offsetBlur");d.appendChild(k);
-k=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feBlend"):e.createElement("feBlend");k.setAttribute("in","SourceGraphic");k.setAttribute("in2","offsetBlur");d.appendChild(k);k=a.getElementsByTagName("defs");0==k.length?(e=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"defs"):e.createElement("defs"),null!=a.firstChild?a.insertBefore(e,a.firstChild):a.appendChild(e)):e=k[0];e.appendChild(d);b||(c=null!=c?c:a.getElementsByTagName("g")[0],null!=c&&(c.setAttribute("filter",
-"url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6),c=a.getAttribute("viewBox"),null!=c&&0<c.length&&(c=c.split(" "),3<c.length&&(w=parseFloat(c[2])+6,h=parseFloat(c[3])+6,a.setAttribute("viewBox",c[0]+" "+c[1]+" "+w+" "+h))))));return d};Graph.prototype.setShadowVisible=function(a,c){mxClient.IS_SVG&&(c=null!=c?c:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter",
-"url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),c&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),c,b=0;do c=this.model.getChildAt(this.model.root,b);while(b++<a&&"1"==mxUtils.getValue(this.getCellStyle(c),"locked","0"));null!=c&&this.setDefaultParent(c)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];
-mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+"/kubernetes.xml"];mxStencilRegistry.libraries.flowchart=
-[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=
-[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/transmission"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]=
-[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/abstract"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries.infographic=[SHAPES_PATH+"/mxInfographic.js"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=
-[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=
-[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];
-mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=
-[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];
-mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var c=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?c="mxgraph.er":"sysML"==a.substring(0,5)&&(c="mxgraph.sysml"));return c};var F=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,e,d,k,g,f,n,q){if(null!=b&&null==mxMarker.markers[b]){var t=this.getPackageForType(b);null!=t&&mxStencilRegistry.getStencil(t)}return F.apply(this,arguments)};PrintDialog.prototype.create=
-function(a,c){function b(){A.value=Math.max(1,Math.min(f,Math.max(parseInt(A.value),parseInt(y.value))));y.value=Math.max(1,Math.min(f,Math.min(parseInt(A.value),parseInt(y.value))))}function e(c){function b(c,b,k){var g=c.useCssTransforms,f=c.currentTranslate,n=c.currentScale,q=c.view.translate,t=c.view.scale;c.useCssTransforms&&(c.useCssTransforms=!1,c.currentTranslate=new mxPoint(0,0),c.currentScale=1,c.view.translate=new mxPoint(0,0),c.view.scale=1);var l=c.getGraphBounds(),y=0,z=0,A=ta.get(),
-m=1/c.pageScale,C=p.checked;if(C)var m=parseInt(S.value),D=parseInt(ga.value),m=Math.min(A.height*D/(l.height/c.view.scale),A.width*m/(l.width/c.view.scale));else m=parseInt(v.value)/(100*c.pageScale),isNaN(m)&&(e=1/c.pageScale,v.value="100 %");A=mxRectangle.fromRectangle(A);A.width=Math.ceil(A.width*e);A.height=Math.ceil(A.height*e);m*=e;!C&&c.pageVisible?(l=c.getPageLayout(),y-=l.x*A.width,z-=l.y*A.height):C=!0;if(null==b){b=PrintDialog.createPrintPreview(c,m,A,0,y,z,C);b.pageSelector=!1;b.mathEnabled=
-!1;y=a.getCurrentFile();null!=y&&(b.title=y.getTitle());var E=b.writeHead;b.writeHead=function(c){E.apply(this,arguments);null!=a.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),c.writeln("</style>"))};if("undefined"!==typeof MathJax){var F=b.renderPage;b.renderPage=function(a,c,b,e,d,k){var g=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var f=F.apply(this,arguments);mxClient.NO_FO=g;this.graph.mathEnabled?
-this.mathEnabled=this.mathEnabled||!0:f.className="geDisableMathJax";return f}}y=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(y=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());b.open(null,null,k,!0);null!=y&&(d.stylesheet=y,d.refresh())}else{A=c.background;if(null==A||""==A||A==mxConstants.NONE)A="#ffffff";b.backgroundColor=A;b.autoOrigin=C;b.appendGraph(c,m,y,z,k,!0)}g&&(c.useCssTransforms=g,c.currentTranslate=f,c.currentScale=n,c.view.translate=q,c.view.scale=t);return b}
-var e=parseInt(H.value)/100;isNaN(e)&&(e=1,H.value="100 %");var e=.75*e,k=y.value,g=A.value,f=!t.checked,q=null;f&&(f=k==n&&g==n);if(!f&&null!=a.pages&&a.pages.length){var l=0,f=a.pages.length-1;t.checked||(l=parseInt(k)-1,f=parseInt(g)-1);for(var z=l;z<=f;z++){var m=a.pages[z],k=m==a.currentPage?d:null;if(null==k){var k=a.createTemporaryGraph(d.getStylesheet()),g=!0,l=!1,C=null,D=null;null==m.viewState&&null==m.root&&a.updatePageRoot(m);null!=m.viewState&&(g=m.viewState.pageVisible,l=m.viewState.mathEnabled,
-C=m.viewState.background,D=m.viewState.backgroundImage);k.background=C;k.backgroundImage=null!=D?new mxImage(D.src,D.width,D.height):null;k.pageVisible=g;k.mathEnabled=l;var E=k.getGlobalVariable;k.getGlobalVariable=function(c){return"page"==c?m.getName():"pagenumber"==c?z+1:"pagecount"==c?null!=a.pages?a.pages.length:1:E.apply(this,arguments)};document.body.appendChild(k.container);a.updatePageRoot(m);k.model.setRoot(m.root)}q=b(k,q,z!=f);k!=d&&k.container.parentNode.removeChild(k.container)}}else q=
-b(d);null==q?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(q.mathEnabled&&(f=q.wnd.document,f.writeln('<script type="text/x-mathjax-config">'),f.writeln("MathJax.Hub.Config({"),f.writeln("showMathMenu: false,"),f.writeln('messageStyle: "none",'),f.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),f.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),f.writeln('"HTML-CSS": {'),f.writeln("imageFont: null"),f.writeln("},"),f.writeln("TeX: {"),
-f.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),f.writeln("},"),f.writeln("tex2jax: {"),f.writeln('\tignoreClass: "geDisableMathJax"'),f.writeln("},"),f.writeln("asciimath2jax: {"),f.writeln('\tignoreClass: "geDisableMathJax"'),f.writeln("}"),f.writeln("});"),c&&(f.writeln("MathJax.Hub.Queue(function () {"),f.writeln("window.print();"),f.writeln("});")),f.writeln("\x3c/script>"),f.writeln('<script type="text/javascript" src="'+DRAW_MATH_URL+'/MathJax.js">\x3c/script>')),
-q.closeDocument(),!q.mathEnabled&&c&&PrintDialog.printPreview(q))}var d=a.editor.graph,k=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,c||mxResources.get("print"));k.appendChild(g);var f=1,n=1,q=document.createElement("div");q.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";
-t.setAttribute("value","all");t.setAttribute("type","radio");t.setAttribute("name","pages-printdialog");q.appendChild(t);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));q.appendChild(g);mxUtils.br(q);var l=t.cloneNode(!0);t.setAttribute("checked","checked");l.setAttribute("value","range");q.appendChild(l);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");q.appendChild(g);var y=document.createElement("input");y.style.cssText="margin:0 8px 0 8px;";
-y.setAttribute("value","1");y.setAttribute("type","number");y.setAttribute("min","1");y.style.width="50px";q.appendChild(y);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));q.appendChild(g);var A=y.cloneNode(!0);q.appendChild(A);mxEvent.addListener(y,"focus",function(){l.checked=!0});mxEvent.addListener(A,"focus",function(){l.checked=!0});mxEvent.addListener(y,"change",b);mxEvent.addListener(A,"change",b);if(null!=a.pages&&(f=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==
-a.pages[g]){n=g+1;y.value=n;A.value=n;break}y.setAttribute("max",f);A.setAttribute("max",f);1<f&&k.appendChild(q);var z=document.createElement("div");z.style.marginBottom="10px";var m=document.createElement("input");m.style.marginRight="8px";m.setAttribute("value","adjust");m.setAttribute("type","radio");m.setAttribute("name","printZoom");z.appendChild(m);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));z.appendChild(g);var v=document.createElement("input");v.style.cssText=
-"margin:0 8px 0 8px;";v.setAttribute("value","100 %");v.style.width="50px";z.appendChild(v);mxEvent.addListener(v,"focus",function(){m.checked=!0});k.appendChild(z);var q=q.cloneNode(!1),p=m.cloneNode(!0);p.setAttribute("value","fit");m.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(p);q.appendChild(g);z=document.createElement("table");z.style.display="inline-block";var D=document.createElement("tbody"),
-E=document.createElement("tr"),F=E.cloneNode(!0),u=document.createElement("td"),x=u.cloneNode(!0),B=u.cloneNode(!0),I=u.cloneNode(!0),ja=u.cloneNode(!0),P=u.cloneNode(!0);u.style.textAlign="right";I.style.textAlign="right";mxUtils.write(u,mxResources.get("fitTo"));var S=document.createElement("input");S.style.cssText="margin:0 8px 0 8px;";S.setAttribute("value","1");S.setAttribute("min","1");S.setAttribute("type","number");S.style.width="40px";x.appendChild(S);g=document.createElement("span");mxUtils.write(g,
-mxResources.get("fitToSheetsAcross"));B.appendChild(g);mxUtils.write(I,mxResources.get("fitToBy"));var ga=S.cloneNode(!0);ja.appendChild(ga);mxEvent.addListener(S,"focus",function(){p.checked=!0});mxEvent.addListener(ga,"focus",function(){p.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));P.appendChild(g);E.appendChild(u);E.appendChild(x);E.appendChild(B);F.appendChild(I);F.appendChild(ja);F.appendChild(P);D.appendChild(E);D.appendChild(F);z.appendChild(D);
-q.appendChild(z);k.appendChild(q);q=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));q.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var ta=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);q.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));q.appendChild(g);
-var H=document.createElement("input");H.style.cssText="margin:0 8px 0 8px;";H.setAttribute("value","100 %");H.style.width="60px";q.appendChild(H);k.appendChild(q);g=document.createElement("div");g.style.cssText="text-align:right;margin:48px 0 0 0;";q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});q.className="geBtn";a.editor.cancelFirst&&g.appendChild(q);a.isOffline()||(z=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
-z.className="geBtn",g.appendChild(z));PrintDialog.previewEnabled&&(z=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();e(!1)}),z.className="geBtn",g.appendChild(z));z=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();e(!0)});z.className="geBtn gePrimaryBtn";g.appendChild(z);a.editor.cancelFirst||g.appendChild(q);k.appendChild(g);this.container=k};var z=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
-this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(z.apply(this,arguments),null!=this.mathEnabled&&
-this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var D=document.createElement("canvas"),E=new Image;E.onload=function(){try{D.getContext("2d").drawImage(E,0,0);var a=D.toDataURL("image/png");Editor.prototype.useCanvasForExport=
-null!=a&&6<a.length}catch(I){}};E.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(v){}})();
+if(null!=a)for(var c in a)this.globalVars[c]=a[c]}catch(O){null!=window.console&&console.log("Error in vars URL parameter: "+O)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var q=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var c=q.apply(this,arguments);null==c&&null!=this.globalVars&&(c=this.globalVars[a]);return c};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=
+this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var n=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,c,b,e,d,k,g,f,q,t,l){var x=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&&(x=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var z=n.apply(this,arguments);if(l&&null!=this.extFonts&&0<this.extFonts.length){var A=
+z.ownerDocument,y=null!=A.createElementNS?A.createElementNS(mxConstants.NS_SVG,"style"):A.createElement("style");null!=A.setAttributeNS?y.setAttributeNS("type","text/css"):y.setAttribute("type","text/css");for(var C="",m=0;m<this.extFonts.length;m++)var p=this.extFonts[m].name,G=this.extFonts[m].url,C=0==G.indexOf(Editor.GOOGLE_FONTS)?C+("@import url("+G+");"):C+('@font-face {font-family: "'+p+'";src: url("'+G+'");}');y.appendChild(A.createTextNode(C));z.getElementsByTagName("defs")[0].appendChild(y)}null!=
+x&&(this.stylesheet=x,this.refresh());return z};var g=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=g.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var c=a.drawText;a.drawText=function(a,b){if(null!=b.addForeignObject&&null!=a.text&&a.text.checkBounds()&&null!=a.text.node&&null==a.text.node.ownerSVGElement){b.save();var e=a.text.node.cloneNode(!0);e.style.transformOrigin="";e.style.transform="";e.style.top="0px";e.style.left=
+"0px";for(var d=e.getElementsByTagName("math");0<d.length;)d[0].parentNode.removeChild(d[0]);var k=a.text.scale,d=a.text.bounds.x/k,g=a.text.bounds.y/k,f=a.text.bounds.width/k,k=a.text.bounds.height/k;a.text.updateTransform(b,d,g,f,k);a.text.configureCanvas(b,d,g,f,k);var n=mxUtils.isNode(a.text.value)||a.text.dialect==mxConstants.DIALECT_STRICTHTML,q=n||b instanceof mxVmlCanvas2D?"html":"",t=a.text.value;n||"html"!=q||(t=mxUtils.htmlEntities(t,!1));"html"!=q||mxUtils.isNode(a.text.value)||(t=mxUtils.replaceTrailingNewlines(t,
+"<div><br></div>"));var t=!mxUtils.isNode(a.text.value)&&a.text.replaceLinefeeds&&"html"==q?t.replace(/\n/g,"<br/>"):t,l=a.text.textDirection;l!=mxConstants.TEXT_DIRECTION_AUTO||n||(l=a.text.getAutoDirection());l!=mxConstants.TEXT_DIRECTION_LTR&&l!=mxConstants.TEXT_DIRECTION_RTL&&(l=null);b.addForeignObject(d+b.state.dx,g+b.state.dy,f,k,t,a.text.align,a.text.valign,a.text.wrap,q,a.text.overflow,a.text.clipped,a.text.getTextRotation(),l,e,b.root.ownerSVGElement);b.restore()}else c.apply(this,arguments)}}return a};
+var x=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return x.apply(this,arguments)&&!mxClient.IS_SF};var A=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){A.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?
+null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,
+a.ownerSVGElement))}};var t=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){t.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions)){for(var c=0;c<a.actions.length;c++){var b=a.actions[c];if(null!=b.open)if(this.isCustomLink(b.open)){if(!this.customLinkClicked(b.open))return}else this.openLink(b.open)}this.model.beginUpdate();try{for(c=
+0;c<a.actions.length;c++)b=a.actions[c],null!=b.toggle&&this.toggleCells(this.getCellsForAction(b.toggle,!0)),null!=b.show&&this.setCellsVisible(this.getCellsForAction(b.show,!0),!0),null!=b.hide&&this.setCellsVisible(this.getCellsForAction(b.hide,!0),!1)}finally{this.model.endUpdate()}for(c=0;c<a.actions.length;c++){var b=a.actions[c],e=[];null!=b.select&&this.isEnabled()&&(e=this.getCellsForAction(b.select),this.setSelectionCells(e));null!=b.highlight&&(e=this.getCellsForAction(b.highlight),this.highlightCells(e,
+b.highlight.color,b.highlight.duration,b.highlight.opacity));null!=b.scroll&&(e=this.getCellsForAction(b.scroll));0<e.length&&this.scrollCellToVisible(e[0])}}};Graph.prototype.updateCustomLinksForCell=function(a,c){var b=this.getLinkForCell(c);null!=b&&"data:action/json,"==b.substring(0,17)&&this.setLinkForCell(c,this.updateCustomLink(a,b));if(this.isHtmlLabel(c)){var e=document.createElement("div");e.innerHTML=this.getLabel(c);for(var d=e.getElementsByTagName("a"),k=!1,g=0;g<d.length;g++)b=d[g].getAttribute("href"),
+null!=b&&"data:action/json,"==b.substring(0,17)&&(d[g].setAttribute("href",this.updateCustomLink(a,b)),k=!0);k&&this.labelChanged(c,e.innerHTML)}};Graph.prototype.updateCustomLink=function(a,c){if("data:action/json,"==c.substring(0,17))try{var b=JSON.parse(c.substring(17));null!=b.actions&&(this.updateCustomLinkActions(a,b.actions),c="data:action/json,"+JSON.stringify(b))}catch(J){}return c};Graph.prototype.updateCustomLinkActions=function(a,c){for(var b=0;b<c.length;b++){var e=c[b];this.updateCustomLinkAction(a,
+e.toggle);this.updateCustomLinkAction(a,e.show);this.updateCustomLinkAction(a,e.hide);this.updateCustomLinkAction(a,e.select);this.updateCustomLinkAction(a,e.highlight);this.updateCustomLinkAction(a,e.scroll)}};Graph.prototype.updateCustomLinkAction=function(a,c){if(null!=c&&null!=c.cells){for(var b=[],e=0;e<c.cells.length;e++)if("*"==c.cells[e])b.push(c.cells[e]);else{var d=a[c.cells[e]];null!=d?""!=d&&b.push(d):b.push(c.cells[e])}c.cells=b}};Graph.prototype.getCellsForAction=function(a,c){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,
+null,null,c))};Graph.prototype.getCellsById=function(a){var c=[];if(null!=a)for(var b=0;b<a.length;b++)if("*"==a[b])var e=this.getDefaultParent(),c=c.concat(this.model.filterDescendants(function(a){return a!=e},e));else{var d=this.model.getCell(a[b]);null!=d&&c.push(d)}return c};Graph.prototype.getCellsForTags=function(a,c,b,e){var d=[];if(null!=a){c=null!=c?c:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var k=0,g={},f=0;f<a.length;f++)0<a[f].length&&(g[a[f].toLowerCase()]=
+!0,k++);for(f=0;f<c.length;f++)if(e&&this.model.getParent(c[f])==this.model.root||this.model.isVertex(c[f])||this.model.isEdge(c[f])){var n=null!=c[f].value&&"object"==typeof c[f].value?mxUtils.trim(c[f].value.getAttribute(b)||""):"",q=!1;if(0<n.length){if(n=n.toLowerCase().split(" "),n.length>=a.length){for(var t=q=0;t<n.length&&q<k;t++)null!=g[n[t]]&&q++;q=q==k}}else q=0==a.length;q&&d.push(c[f])}}return d};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],
+!this.model.isVisible(a[c]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,c){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],c)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(a,c,b,e){for(var d=0;d<a.length;d++)this.highlightCell(a[d],c,b,e)};Graph.prototype.highlightCell=function(a,c,b,e){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,
+mxConstants.STYLE_STROKEWIDTH,1)+4),k=new mxCellHighlight(this,c,d,!1);null!=e&&(k.opacity=e);k.highlight(a);window.setTimeout(function(){null!=k.shape&&(mxUtils.setPrefixedStyle(k.shape.node.style,"transition","all 1200ms ease-in-out"),k.shape.node.style.opacity=0);window.setTimeout(function(){k.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,c,b){b=null!=b?b:!1;var e=a.ownerDocument,d=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"filter"):e.createElement("filter");
+d.setAttribute("id",this.shadowId);var k=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):e.createElement("feGaussianBlur");k.setAttribute("in","SourceAlpha");k.setAttribute("stdDeviation",this.svgShadowBlur);k.setAttribute("result","blur");d.appendChild(k);k=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feOffset"):e.createElement("feOffset");k.setAttribute("in","blur");k.setAttribute("dx",this.svgShadowSize);k.setAttribute("dy",this.svgShadowSize);k.setAttribute("result",
+"offsetBlur");d.appendChild(k);k=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feFlood"):e.createElement("feFlood");k.setAttribute("flood-color",this.svgShadowColor);k.setAttribute("flood-opacity",this.svgShadowOpacity);k.setAttribute("result","offsetColor");d.appendChild(k);k=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feComposite"):e.createElement("feComposite");k.setAttribute("in","offsetColor");k.setAttribute("in2","offsetBlur");k.setAttribute("operator","in");
+k.setAttribute("result","offsetBlur");d.appendChild(k);k=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feBlend"):e.createElement("feBlend");k.setAttribute("in","SourceGraphic");k.setAttribute("in2","offsetBlur");d.appendChild(k);k=a.getElementsByTagName("defs");0==k.length?(e=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"defs"):e.createElement("defs"),null!=a.firstChild?a.insertBefore(e,a.firstChild):a.appendChild(e)):e=k[0];e.appendChild(d);b||(c=null!=c?c:a.getElementsByTagName("g")[0],
+null!=c&&(c.setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6),c=a.getAttribute("viewBox"),null!=c&&0<c.length&&(c=c.split(" "),3<c.length&&(w=parseFloat(c[2])+6,h=parseFloat(c[3])+6,a.setAttribute("viewBox",c[0]+" "+c[1]+" "+w+" "+h))))));return d};Graph.prototype.setShadowVisible=function(a,c){mxClient.IS_SVG&&(c=null!=c?c:!0,(this.shadowVisible=
+a)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),c&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),c,b=0;do c=this.model.getChildAt(this.model.root,b);while(b++<a&&"1"==mxUtils.getValue(this.getCellStyle(c),"locked","0"));null!=c&&this.setDefaultParent(c)}};mxStencilRegistry.libraries.mockup=
+[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+
+"/kubernetes.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+
+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/transmission"]=
+[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/abstract"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries.infographic=[SHAPES_PATH+"/mxInfographic.js"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=
+[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=
+[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",
+STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];
+mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=
+[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var c=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?c="mxgraph.er":"sysML"==a.substring(0,5)&&(c="mxgraph.sysml"));return c};var E=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,e,d,k,g,f,n,q){if(null!=b&&null==mxMarker.markers[b]){var t=
+this.getPackageForType(b);null!=t&&mxStencilRegistry.getStencil(t)}return E.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){z.value=Math.max(1,Math.min(f,Math.max(parseInt(z.value),parseInt(x.value))));x.value=Math.max(1,Math.min(f,Math.min(parseInt(z.value),parseInt(x.value))))}function e(c){function b(c,b,k){var g=c.useCssTransforms,f=c.currentTranslate,n=c.currentScale,q=c.view.translate,t=c.view.scale;c.useCssTransforms&&(c.useCssTransforms=!1,c.currentTranslate=
+new mxPoint(0,0),c.currentScale=1,c.view.translate=new mxPoint(0,0),c.view.scale=1);var l=c.getGraphBounds(),x=0,A=0,z=ta.get(),m=1/c.pageScale,C=G.checked;if(C)var m=parseInt(U.value),y=parseInt(ga.value),m=Math.min(z.height*y/(l.height/c.view.scale),z.width*m/(l.width/c.view.scale));else m=parseInt(p.value)/(100*c.pageScale),isNaN(m)&&(e=1/c.pageScale,p.value="100 %");z=mxRectangle.fromRectangle(z);z.width=Math.ceil(z.width*e);z.height=Math.ceil(z.height*e);m*=e;!C&&c.pageVisible?(l=c.getPageLayout(),
+x-=l.x*z.width,A-=l.y*z.height):C=!0;if(null==b){b=PrintDialog.createPrintPreview(c,m,z,0,x,A,C);b.pageSelector=!1;b.mathEnabled=!1;x=a.getCurrentFile();null!=x&&(b.title=x.getTitle());var D=b.writeHead;b.writeHead=function(c){D.apply(this,arguments);null!=a.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),c.writeln("</style>"))};if("undefined"!==typeof MathJax){var E=b.renderPage;b.renderPage=function(a,c,b,e,d,k){var g=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&
+!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var f=E.apply(this,arguments);mxClient.NO_FO=g;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:f.className="geDisableMathJax";return f}}x=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(x=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());b.open(null,null,k,!0);null!=x&&(d.stylesheet=x,d.refresh())}else{z=c.background;if(null==z||""==z||z==mxConstants.NONE)z="#ffffff";b.backgroundColor=z;b.autoOrigin=C;
+b.appendGraph(c,m,x,A,k,!0)}g&&(c.useCssTransforms=g,c.currentTranslate=f,c.currentScale=n,c.view.translate=q,c.view.scale=t);return b}var e=parseInt(H.value)/100;isNaN(e)&&(e=1,H.value="100 %");var e=.75*e,k=x.value,g=z.value,f=!t.checked,q=null;f&&(f=k==n&&g==n);if(!f&&null!=a.pages&&a.pages.length){var l=0,f=a.pages.length-1;t.checked||(l=parseInt(k)-1,f=parseInt(g)-1);for(var A=l;A<=f;A++){var m=a.pages[A],k=m==a.currentPage?d:null;if(null==k){var k=a.createTemporaryGraph(d.getStylesheet()),g=
+!0,l=!1,C=null,y=null;null==m.viewState&&null==m.root&&a.updatePageRoot(m);null!=m.viewState&&(g=m.viewState.pageVisible,l=m.viewState.mathEnabled,C=m.viewState.background,y=m.viewState.backgroundImage);k.background=C;k.backgroundImage=null!=y?new mxImage(y.src,y.width,y.height):null;k.pageVisible=g;k.mathEnabled=l;var D=k.getGlobalVariable;k.getGlobalVariable=function(c){return"page"==c?m.getName():"pagenumber"==c?A+1:"pagecount"==c?null!=a.pages?a.pages.length:1:D.apply(this,arguments)};document.body.appendChild(k.container);
+a.updatePageRoot(m);k.model.setRoot(m.root)}q=b(k,q,A!=f);k!=d&&k.container.parentNode.removeChild(k.container)}}else q=b(d);null==q?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(q.mathEnabled&&(f=q.wnd.document,f.writeln('<script type="text/x-mathjax-config">'),f.writeln("MathJax.Hub.Config({"),f.writeln("showMathMenu: false,"),f.writeln('messageStyle: "none",'),f.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),f.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),
+f.writeln('"HTML-CSS": {'),f.writeln("imageFont: null"),f.writeln("},"),f.writeln("TeX: {"),f.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),f.writeln("},"),f.writeln("tex2jax: {"),f.writeln('\tignoreClass: "geDisableMathJax"'),f.writeln("},"),f.writeln("asciimath2jax: {"),f.writeln('\tignoreClass: "geDisableMathJax"'),f.writeln("}"),f.writeln("});"),c&&(f.writeln("MathJax.Hub.Queue(function () {"),f.writeln("window.print();"),f.writeln("});")),f.writeln("\x3c/script>"),
+f.writeln('<script type="text/javascript" src="'+DRAW_MATH_URL+'/MathJax.js">\x3c/script>')),q.closeDocument(),!q.mathEnabled&&c&&PrintDialog.printPreview(q))}var d=a.editor.graph,k=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,c||mxResources.get("print"));k.appendChild(g);var f=1,n=1,q=document.createElement("div");q.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";
+var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","all");t.setAttribute("type","radio");t.setAttribute("name","pages-printdialog");q.appendChild(t);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));q.appendChild(g);mxUtils.br(q);var l=t.cloneNode(!0);t.setAttribute("checked","checked");l.setAttribute("value","range");q.appendChild(l);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+
+":");q.appendChild(g);var x=document.createElement("input");x.style.cssText="margin:0 8px 0 8px;";x.setAttribute("value","1");x.setAttribute("type","number");x.setAttribute("min","1");x.style.width="50px";q.appendChild(x);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));q.appendChild(g);var z=x.cloneNode(!0);q.appendChild(z);mxEvent.addListener(x,"focus",function(){l.checked=!0});mxEvent.addListener(z,"focus",function(){l.checked=!0});mxEvent.addListener(x,"change",b);mxEvent.addListener(z,
+"change",b);if(null!=a.pages&&(f=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){n=g+1;x.value=n;z.value=n;break}x.setAttribute("max",f);z.setAttribute("max",f);1<f&&k.appendChild(q);var A=document.createElement("div");A.style.marginBottom="10px";var m=document.createElement("input");m.style.marginRight="8px";m.setAttribute("value","adjust");m.setAttribute("type","radio");m.setAttribute("name","printZoom");A.appendChild(m);g=document.createElement("span");
+mxUtils.write(g,mxResources.get("adjustTo"));A.appendChild(g);var p=document.createElement("input");p.style.cssText="margin:0 8px 0 8px;";p.setAttribute("value","100 %");p.style.width="50px";A.appendChild(p);mxEvent.addListener(p,"focus",function(){m.checked=!0});k.appendChild(A);var q=q.cloneNode(!1),G=m.cloneNode(!0);G.setAttribute("value","fit");m.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";
+g.appendChild(G);q.appendChild(g);A=document.createElement("table");A.style.display="inline-block";var y=document.createElement("tbody"),D=document.createElement("tr"),E=D.cloneNode(!0),u=document.createElement("td"),v=u.cloneNode(!0),B=u.cloneNode(!0),I=u.cloneNode(!0),ja=u.cloneNode(!0),R=u.cloneNode(!0);u.style.textAlign="right";I.style.textAlign="right";mxUtils.write(u,mxResources.get("fitTo"));var U=document.createElement("input");U.style.cssText="margin:0 8px 0 8px;";U.setAttribute("value",
+"1");U.setAttribute("min","1");U.setAttribute("type","number");U.style.width="40px";v.appendChild(U);g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsAcross"));B.appendChild(g);mxUtils.write(I,mxResources.get("fitToBy"));var ga=U.cloneNode(!0);ja.appendChild(ga);mxEvent.addListener(U,"focus",function(){G.checked=!0});mxEvent.addListener(ga,"focus",function(){G.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));R.appendChild(g);
+D.appendChild(u);D.appendChild(v);D.appendChild(B);E.appendChild(I);E.appendChild(ja);E.appendChild(R);y.appendChild(D);y.appendChild(E);A.appendChild(y);q.appendChild(A);k.appendChild(q);q=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));q.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var ta=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||
+mxConstants.PAGE_FORMAT_A4_PORTRAIT);q.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));q.appendChild(g);var H=document.createElement("input");H.style.cssText="margin:0 8px 0 8px;";H.setAttribute("value","100 %");H.style.width="60px";q.appendChild(H);k.appendChild(q);g=document.createElement("div");g.style.cssText="text-align:right;margin:48px 0 0 0;";q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});q.className="geBtn";a.editor.cancelFirst&&
+g.appendChild(q);a.isOffline()||(A=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),A.className="geBtn",g.appendChild(A));PrintDialog.previewEnabled&&(A=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();e(!1)}),A.className="geBtn",g.appendChild(A));A=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();e(!0)});A.className="geBtn gePrimaryBtn";g.appendChild(A);
+a.editor.cancelFirst||g.appendChild(q);k.appendChild(g);this.container=k};var z=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=
+this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(z.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var G=
+document.createElement("canvas"),D=new Image;D.onload=function(){try{G.getContext("2d").drawImage(D,0,0);var a=G.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(I){}};D.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(y){}})();
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,f,d){d.ui=a.ui;return f};a.afterDecode=function(a,f,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost="https://www.draw.io";EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";
EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":"https://rt.draw.io/cache";Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.logError=function(a,b,d,f,n){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,
d,f,n);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var c=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",e=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";n=null!=n?n:Error(a);(new Image).src=e+"/log?severity="+c+"&v="+encodeURIComponent(EditorUi.VERSION)+
@@ -2981,7 +2984,7 @@ g.style.color="white",g.style.fontFamily="Helvetica, Arial",g.style.fontSize="9p
k.charAt(k.length-1)&&(k+="..."),g.innerHTML=k,d.appendChild(g),c.status=g,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(g.style.left=Math.round(Math.max(0,a-g.offsetWidth/2))+"px",g.style.top=Math.round(Math.max(0,b+70-g.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(d,k)}));this.stop();return a}),g=!0);return g};var k=c.stop;c.stop=function(){k.call(this);this.active=!1;null!=
c.status&&(c.status.parentNode.removeChild(c.status),c.status=null)};c.pause=function(){return function(){}};return c};EditorUi.prototype.isCompatibleString=function(a){try{var c=mxUtils.parseXml(a),b=this.editor.extractGraphModel(c.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(q){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&
177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3)};EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;
-EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=a.apply(this,arguments);if(null==b)try{var d=c.indexOf("&lt;mxfile ");if(0<=d){var f=c.lastIndexOf("&lt;/mxfile&gt;");f>d&&(b=c.substring(d,f+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var n=mxUtils.parseXml(c),g=this.editor.extractGraphModel(n.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=g?mxUtils.getXml(g):""}catch(y){}return b};EditorUi.prototype.validateFileData=
+EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=a.apply(this,arguments);if(null==b)try{var d=c.indexOf("&lt;mxfile ");if(0<=d){var f=c.lastIndexOf("&lt;/mxfile&gt;");f>d&&(b=c.substring(d,f+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var n=mxUtils.parseXml(c),g=this.editor.extractGraphModel(n.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=g?mxUtils.getXml(g):""}catch(x){}return b};EditorUi.prototype.validateFileData=
function(a){if(null!=a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;c.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");
if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var f=d.length-1;0<=f;f--){var g=this.updatePageRoot(new DiagramPage(d[f]));null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[f+1]));c.model.execute(new ChangePage(this,g,0==f?g:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),
this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(f=0;f<b.length;f++)c.model.execute(new ChangePage(this,b[f],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,f,n,g,l,A,t,m,z){b=null!=b?b:this.editor.graph;n=null!=n?n:!1;t=null!=t?t:!0;var c,e=null;null==
@@ -3009,25 +3012,25 @@ c[d].getAttribute("id")&&c[d].setAttribute("id",d),a=new DiagramPage(c[d]),null=
this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var f=urlParams["layer-ids"].split(" ");a={};for(d=0;d<f.length;d++)a[f[d]]=!0;for(var g=this.editor.graph.getModel(),l=g.getChildren(g.root),d=0;d<l.length;d++){var A=l[d];g.setVisible(A,a[A.id]||!1)}}catch(t){}};EditorUi.prototype.getBaseFilename=function(a){var c=
this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(c)||/(\.html)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.png)$/i.test(c)||/(\.drawio)$/i.test(c))c=c.substring(0,c.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(c=c+"-"+this.currentPage.getName());return c};EditorUi.prototype.downloadFile=function(a,b,d,f,n,g,l,A,t,m){try{f=
null!=f?f:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(!n),e=c+"."+a;if("xml"==a){var k='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,f,n,null,null,null,b);this.saveData(e,a,k,"text/xml")}else if("html"==a)k=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(e,a,k,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?e=c+".png":"jpeg"==a&&(e=c+".jpg"),this.saveRequest(e,
-a,mxUtils.bind(this,function(c,b){try{var e=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var d=this.createDownloadRequest(c,a,f,b,l,n,A,t,m);this.editor.graph.pageVisible=e;return d}catch(R){this.handleError(R)}}));else{var q=null,y=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(e,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(q)}))});if("svg"==
-a){var p=this.editor.graph.background;if(l||p==mxConstants.NONE)p=null;var F=this.editor.graph.getSvg(p,null,null,null,null,f);d&&this.editor.graph.addSvgShadow(F);this.convertImages(F,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();y('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else e=c+".svg",q=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();
-y(a)}),f)}}catch(Q){this.handleError(Q)}};EditorUi.prototype.createDownloadRequest=function(a,b,d,f,n,g,l,A,t){var c=this.editor.graph,e=c.getGraphBounds();d=this.getFileData(!0,null,null,null,d,0==g?!1:"xmlpng"!=b);var k="",q="";if(e.width*e.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};e="0";"pdf"==b&&0==g&&(q="&allPages=1");if("xmlpng"==b&&(e="1",b="png",null!=this.pages&&null!=this.currentPage))for(g=0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){k=
+a,mxUtils.bind(this,function(c,b){try{var e=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var d=this.createDownloadRequest(c,a,f,b,l,n,A,t,m);this.editor.graph.pageVisible=e;return d}catch(T){this.handleError(T)}}));else{var q=null,x=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(e,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(q)}))});if("svg"==
+a){var p=this.editor.graph.background;if(l||p==mxConstants.NONE)p=null;var E=this.editor.graph.getSvg(p,null,null,null,null,f);d&&this.editor.graph.addSvgShadow(E);this.convertImages(E,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();x('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else e=c+".svg",q=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();
+x(a)}),f)}}catch(S){this.handleError(S)}};EditorUi.prototype.createDownloadRequest=function(a,b,d,f,n,g,l,A,t){var c=this.editor.graph,e=c.getGraphBounds();d=this.getFileData(!0,null,null,null,d,0==g?!1:"xmlpng"!=b);var k="",q="";if(e.width*e.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};e="0";"pdf"==b&&0==g&&(q="&allPages=1");if("xmlpng"==b&&(e="1",b="png",null!=this.pages&&null!=this.currentPage))for(g=0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){k=
"&from="+g;break}g=c.background;"png"==b&&n?g=mxConstants.NONE:n||null!=g&&g!=mxConstants.NONE||(g="#ffffff");n={globalVars:c.getExportVariables()};t&&(n.grid={size:c.gridSize,steps:c.view.gridSteps,color:c.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+k+q+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+f+"&embedXml="+e+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(n))+(null!=l?"&scale="+l:"")+(null!=A?"&border="+
A:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,d){var c=window.location.hash,e=mxUtils.bind(this,function(e){var d=null!=a.data?a.data:"";null!=e&&0<e.length&&(0<d.length&&(d+="\n"),d+=e);e=new LocalFile(this,"csv"!=a.format&&0<d.length?d:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);e.getHash=function(){return c};this.fileLoaded(e);"csv"==a.format&&this.importCsv(d,mxUtils.bind(this,
function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var k=null!=a.interval?parseInt(a.interval):6E4,f=null,g=mxUtils.bind(this,function(){var c=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){c===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),n()):this.handleError({message:mxResources.get("error")+
" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),n=mxUtils.bind(this,function(){window.clearTimeout(f);f=window.setTimeout(g,k)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){n();g()}));n();g()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var k=a.url;/^https?:\/\//.test(k)&&!this.editor.isCorsEnabledForUrl(k)&&(k=PROXY_URL+"?url="+encodeURIComponent(k));this.loadUrl(k,mxUtils.bind(this,function(a){e(a)}),mxUtils.bind(this,function(a){null!=d&&
d(a)}))}else e("")};EditorUi.prototype.updateDiagram=function(a){function c(a){var c=new mxCellOverlay(a.image||f.warningImage,a.tooltip,a.align,a.valign,a.offset);c.addListener(mxEvent.CLICK,function(c,b){d.alert(a.tooltip)});return c}var b=null,d=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var f=this.editor.graph,g=f.getModel();g.beginUpdate();var l=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var A=g.getCell(a.getAttribute("id"));
-if(null!=A){try{var t=a.getAttribute("value");if(null!=t){var m=mxUtils.parseXml(t).documentElement;if(null!=m)if("1"==m.getAttribute("replace-value"))g.setValue(A,m);else for(var z=m.attributes,p=0;p<z.length;p++)f.setAttributeForCell(A,z[p].nodeName,0<z[p].nodeValue.length?z[p].nodeValue:null)}}catch(K){null!=window.console&&console.log("Error in value for "+A.id+": "+K)}try{var E=a.getAttribute("style");null!=E&&f.model.setStyle(A,E)}catch(K){null!=window.console&&console.log("Error in style for "+
-A.id+": "+K)}try{var v=a.getAttribute("icon");if(null!=v){var u=0<v.length?JSON.parse(v):null;null!=u&&u.append||f.removeCellOverlays(A);null!=u&&f.addCellOverlay(A,c(u))}}catch(K){null!=window.console&&console.log("Error in icon for "+A.id+": "+K)}try{var x=a.getAttribute("geometry");if(null!=x){var x=JSON.parse(x),J=f.getCellGeometry(A);if(null!=J){J=J.clone();for(key in x){var B=parseFloat(x[key]);"dx"==key?J.x+=B:"dy"==key?J.y+=B:"dw"==key?J.width+=B:"dh"==key?J.height+=B:J[key]=parseFloat(x[key])}f.model.setGeometry(A,
-J)}}}catch(K){null!=window.console&&console.log("Error in icon for "+A.id+": "+K)}}}else if("model"==a.nodeName){for(var C=a.firstChild;null!=C&&C.nodeType!=mxConstants.NODETYPE_ELEMENT;)C=C.nextSibling;null!=C&&(new mxCodec(a.firstChild)).decode(C,g)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(f.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))f.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==
+if(null!=A){try{var t=a.getAttribute("value");if(null!=t){var m=mxUtils.parseXml(t).documentElement;if(null!=m)if("1"==m.getAttribute("replace-value"))g.setValue(A,m);else for(var z=m.attributes,p=0;p<z.length;p++)f.setAttributeForCell(A,z[p].nodeName,0<z[p].nodeValue.length?z[p].nodeValue:null)}}catch(L){null!=window.console&&console.log("Error in value for "+A.id+": "+L)}try{var D=a.getAttribute("style");null!=D&&f.model.setStyle(A,D)}catch(L){null!=window.console&&console.log("Error in style for "+
+A.id+": "+L)}try{var y=a.getAttribute("icon");if(null!=y){var u=0<y.length?JSON.parse(y):null;null!=u&&u.append||f.removeCellOverlays(A);null!=u&&f.addCellOverlay(A,c(u))}}catch(L){null!=window.console&&console.log("Error in icon for "+A.id+": "+L)}try{var v=a.getAttribute("geometry");if(null!=v){var v=JSON.parse(v),J=f.getCellGeometry(A);if(null!=J){J=J.clone();for(key in v){var B=parseFloat(v[key]);"dx"==key?J.x+=B:"dy"==key?J.y+=B:"dw"==key?J.width+=B:"dh"==key?J.height+=B:J[key]=parseFloat(v[key])}f.model.setGeometry(A,
+J)}}}catch(L){null!=window.console&&console.log("Error in icon for "+A.id+": "+L)}}}else if("model"==a.nodeName){for(var C=a.firstChild;null!=C&&C.nodeType!=mxConstants.NODETYPE_ELEMENT;)C=C.nextSibling;null!=C&&(new mxCodec(a.firstChild)).decode(C,g)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(f.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))f.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==
a.nodeName&&(l=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{g.endUpdate()}null!=l&&this.chromelessResize&&this.chromelessResize(!0,l)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,e="",d=c.lastIndexOf(".");0<=d&&(e=c.substring(d),c=c.substring(0,d));if(b)var f=new Date,d=f.getFullYear(),l=f.getMonth()+1,A=f.getDate(),t=f.getHours(),m=f.getMinutes(),f=f.getSeconds(),c=
c+(" "+(d+"-"+l+"-"+A+"-"+t+"-"+m+"-"+f));return c=mxResources.get("copyOf",[c])+e};EditorUi.prototype.fileLoaded=function(a,b){var c=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var e=!1;this.hideDialog();null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();
this.editor.undoManager.clear();this.setBackgroundImage(null);!b&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();b||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(a);a.addListener("descriptorChanged",
this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+
mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));e=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+
-a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(y){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(y){}}catch(y){this.fileLoadedError=y;null!=window.console&&(console.error(y),console.log("error in fileLoaded:",a,y));if(EditorUi.enableLogging&&
-!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=y&&null!=y.message?":err:"+encodeURIComponent(y.message):"")+(null!=y&&null!=y.stack?"&stack="+encodeURIComponent(y.stack):"")}catch(A){}var f=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):
-null!=c?this.fileLoaded(c):d()});b?f():this.handleError(y,mxResources.get("errorLoadingFile"),f,!0)}else d();return e};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,e=new mxGraphModel,d=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var f=0;f<a.length;f++){this.updatePageRoot(a[f]);var l=a[f].node.cloneNode(!1);l.removeAttribute("name");e.root=a[f].root;var A=d.encode(e);this.editor.graph.saveViewState(a[f].viewState,A,!0);A.removeAttribute("pageWidth");
+a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(x){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(x){}}catch(x){this.fileLoadedError=x;null!=window.console&&(console.error(x),console.log("error in fileLoaded:",a,x));if(EditorUi.enableLogging&&
+!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=x&&null!=x.message?":err:"+encodeURIComponent(x.message):"")+(null!=x&&null!=x.stack?"&stack="+encodeURIComponent(x.stack):"")}catch(A){}var f=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):
+null!=c?this.fileLoaded(c):d()});b?f():this.handleError(x,mxResources.get("errorLoadingFile"),f,!0)}else d();return e};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,e=new mxGraphModel,d=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var f=0;f<a.length;f++){this.updatePageRoot(a[f]);var l=a[f].node.cloneNode(!1);l.removeAttribute("name");e.root=a[f].root;var A=d.encode(e);this.editor.graph.saveViewState(a[f].viewState,A,!0);A.removeAttribute("pageWidth");
A.removeAttribute("pageHeight");l.appendChild(A);null!=b&&(b.eltCount+=l.getElementsByTagName("*").length,b.nodeCount+=l.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(l,function(a,c,b,e){return!e||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||"x"!=c&&"y"!=c&&"width"!=c&&"height"!=c?e&&"mxCell"==a.nodeName&&"previous"==c?null:b:Math.round(b)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,d){var c=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===
typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(c^=this.hashValue(a.nodeName,b,d));if(null!=a.attributes){null!=d&&(d.attrCount+=a.attributes.length);for(var e=0;e<a.attributes.length;e++){var k=a.attributes[e].name,f=null!=b?b(a,k,a.attributes[e].value,!0):a.attributes[e].value;null!=f&&(c^=this.hashValue(k,b,d)+this.hashValue(f,b,d))}}if(null!=a.childNodes)for(e=0;e<a.childNodes.length;e++)c=(c<<5)-c+this.hashValue(a.childNodes[e],b,d)<<0}else if(null!=a&&"function"!==
typeof a){a=String(a);b=0;null!=d&&(d.byteCount+=a.length);for(e=0;e<a.length;e++)b=(b<<5)-b+a.charCodeAt(e)<<0;c^=b}return c};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,d,f,n,g,l){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",
@@ -3037,18 +3040,18 @@ var b=c.lastChild,d=b.previousSibling;c.insertBefore(b,a);c.insertBefore(d,b)};E
this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var c=this.sidebar.palettes[a.getHash()],c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var e=null,f=mxUtils.bind(this,function(c,b){0==c.length&&a.isEditable()?(null==e&&(e=document.createElement("div"),e.className="geDropTarget",mxUtils.write(e,mxResources.get("dragElementsHere"))),b.appendChild(e)):this.addLibraryEntries(c,b)});null!=this.sidebar&&
null!=b&&this.sidebar.addEntries(b);d=null!=d&&0<d.length?d:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),d,!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(c);var l=k.parentNode.previousSibling;d=l.getAttribute("title");null!=d&&0<d.length&&".scratchpad"!=a.title&&l.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d);var t=document.createElement("div");t.style.position="absolute";t.style.right="0px";t.style.top="0px";t.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||
(t.style.backgroundColor="inherit");l.style.position="relative";var m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",mxResources.get("close"));m.setAttribute("valign","absmiddle");m.setAttribute("border","0");m.style.margin="0 3px";var z=null;if(".scratchpad"!=a.title||this.closableScratchpad)t.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});
-null!=z?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var p=this.editor.graph,E=null,v=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),u=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=E&&null!=E.parentNode&&E.parentNode.removeChild(E),E=m.cloneNode(!1),E.setAttribute("src",Editor.spinImage),E.setAttribute("title",
-mxResources.get("saving")),E.style.cursor="default",E.style.marginRight="2px",E.style.marginTop="-2px",t.insertBefore(E,t.firstChild),l.style.paddingRight=18*t.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=E&&null!=E.parentNode&&(E.parentNode.removeChild(E),l.style.paddingRight=18*t.childNodes.length+"px")})):null==z&&(z=m.cloneNode(!1),z.setAttribute("src",IMAGE_PATH+"/download.png"),z.setAttribute("title",mxResources.get("save")),t.insertBefore(z,t.firstChild),
-mxEvent.addListener(z,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==z||a.isModified()||(l.style.paddingRight=18*t.childNodes.length+"px",z.parentNode.removeChild(z),z=null)});mxEvent.consume(c)})),l.style.paddingRight=18*t.childNodes.length+"px")}),x=mxUtils.bind(this,function(a,c,d,f){a=p.cloneCells(mxUtils.sortCells(p.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var n=p.getCellGeometry(a[g]);null!=n&&
+null!=z?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var p=this.editor.graph,D=null,y=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),u=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=D&&null!=D.parentNode&&D.parentNode.removeChild(D),D=m.cloneNode(!1),D.setAttribute("src",Editor.spinImage),D.setAttribute("title",
+mxResources.get("saving")),D.style.cursor="default",D.style.marginRight="2px",D.style.marginTop="-2px",t.insertBefore(D,t.firstChild),l.style.paddingRight=18*t.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=D&&null!=D.parentNode&&(D.parentNode.removeChild(D),l.style.paddingRight=18*t.childNodes.length+"px")})):null==z&&(z=m.cloneNode(!1),z.setAttribute("src",IMAGE_PATH+"/download.png"),z.setAttribute("title",mxResources.get("save")),t.insertBefore(z,t.firstChild),
+mxEvent.addListener(z,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==z||a.isModified()||(l.style.paddingRight=18*t.childNodes.length+"px",z.parentNode.removeChild(z),z=null)});mxEvent.consume(c)})),l.style.paddingRight=18*t.childNodes.length+"px")}),v=mxUtils.bind(this,function(a,c,d,f){a=p.cloneCells(mxUtils.sortCells(p.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var n=p.getCellGeometry(a[g]);null!=n&&
n.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,f||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);u(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),J=mxUtils.bind(this,function(a){if(p.isSelectionEmpty())p.getRubberband().isActive()?(p.getRubberband().execute(a),p.getRubberband().reset()):this.showError(mxResources.get("error"),
-mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=p.getSelectionCells(),b=p.view.getBounds(c),d=p.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=p.view.translate.x;b.y-=p.view.translate.y;x(c,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){p.isMouseDown&&null!=p.panningManager&&null!=p.graphHandler.shape&&(p.graphHandler.shape.node.style.visibility="hidden",k.style.backgroundColor="#f1f3f4",k.style.cursor="copy",p.panningManager.stop(),
+mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=p.getSelectionCells(),b=p.view.getBounds(c),d=p.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=p.view.translate.x;b.y-=p.view.translate.y;v(c,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){p.isMouseDown&&null!=p.panningManager&&null!=p.graphHandler.shape&&(p.graphHandler.shape.node.style.visibility="hidden",k.style.backgroundColor="#f1f3f4",k.style.cursor="copy",p.panningManager.stop(),
p.autoScroll=!1,null!=p.graphHandler.guide&&p.graphHandler.guide.setVisible(!1),null!=p.graphHandler.hint&&(p.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){p.isMouseDown&&null!=p.panningManager&&null!=p.graphHandler&&(k.style.backgroundColor="",k.style.cursor="default",this.sidebar.showTooltips=!0,p.panningManager.stop(),p.graphHandler.reset(),p.isMouseDown=!1,p.autoScroll=!0,J(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,
function(a){p.isMouseDown&&null!=p.graphHandler.shape&&(p.graphHandler.shape.node.style.visibility="visible",k.style.backgroundColor="",k.style.cursor="",p.autoScroll=!0,null!=p.graphHandler.guide&&p.graphHandler.guide.setVisible(!0),null!=p.graphHandler.hint&&(p.graphHandler.hint.style.visibility="visible"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){k.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();
-a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.cursor="";k.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,g,n,q,l,t,y,z){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,q,l),c)],c[0].vertex=!0,x(c,new mxRectangle(0,
-0,q,l),a,mxEvent.isAltDown(a)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null);else{var A=!1,m=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var g=mxUtils.parseXml(c);if("mxlibrary"==g.documentElement.nodeName)try{var n=JSON.parse(mxUtils.getTextContent(g.documentElement));f(n,k);b=b.concat(n);u(a);this.spinner.stop();A=!0}catch(M){}else if("mxfile"==g.documentElement.nodeName)try{for(var q=g.documentElement.getElementsByTagName("diagram"),
-g=0;g<q.length;g++){var l=this.stringToCells(Editor.getDiagramNodeXml(q[g])),t=this.editor.graph.getBoundingBoxFromGeometry(l);x(l,new mxRectangle(0,0,t.width,t.height),a)}A=!0}catch(M){null!=window.console&&console.log("error in drop handler:",M)}}A||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)});null!=z&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?
-this.importVisio(z,function(a){m(a,"text/xml")},null,t):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,t)&&null!=z?this.parseFile(z,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?m(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):m(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"dragleave",
-function(a){k.style.cursor="";k.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",Editor.editImage);m.setAttribute("title",mxResources.get("edit"));t.insertBefore(m,t.firstChild);mxEvent.addListener(m,"click",v);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&v(a)});d=m.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));t.insertBefore(d,t.firstChild);mxEvent.addListener(d,
+a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.cursor="";k.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,g,n,q,l,t,z,x){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,q,l),c)],c[0].vertex=!0,v(c,new mxRectangle(0,
+0,q,l),a,mxEvent.isAltDown(a)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null);else{var m=!1,A=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var g=mxUtils.parseXml(c);if("mxlibrary"==g.documentElement.nodeName)try{var n=JSON.parse(mxUtils.getTextContent(g.documentElement));f(n,k);b=b.concat(n);u(a);this.spinner.stop();m=!0}catch(N){}else if("mxfile"==g.documentElement.nodeName)try{for(var q=g.documentElement.getElementsByTagName("diagram"),
+g=0;g<q.length;g++){var l=this.stringToCells(Editor.getDiagramNodeXml(q[g])),t=this.editor.graph.getBoundingBoxFromGeometry(l);v(l,new mxRectangle(0,0,t.width,t.height),a)}m=!0}catch(N){null!=window.console&&console.log("error in drop handler:",N)}}m||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)});null!=x&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?
+this.importVisio(x,function(a){A(a,"text/xml")},null,t):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,t)&&null!=x?this.parseFile(x,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?A(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):A(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"dragleave",
+function(a){k.style.cursor="";k.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",Editor.editImage);m.setAttribute("title",mxResources.get("edit"));t.insertBefore(m,t.firstChild);mxEvent.addListener(m,"click",y);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&y(a)});d=m.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));t.insertBefore(d,t.firstChild);mxEvent.addListener(d,
"click",J);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(d=document.createElement("span"),d.setAttribute("title",mxResources.get("help")),d.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(d,"?"),mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),t.insertBefore(d,t.firstChild))}l.appendChild(t);l.style.paddingRight=18*t.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=
function(a,b){for(var c=0;c<a.length;c++){var d=a[c],e=d.data;if(null!=e){var e=this.convertDataUri(e),f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(f+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(f+"image="+e,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(e=this.stringToCells(Graph.decompress(d.xml)),0<e.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(e,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=
function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.offline||EditorUi.isElectronApp||("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.createFooter=function(){return document.getElementById("geFooter")});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?
@@ -3059,101 +3062,101 @@ Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAM
!0;this.editor.graph.model.execute(a)});var c=new BackgroundImageDialog(this,mxUtils.bind(this,function(c){a(c)}));this.showDialog(c.container,360,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(a,b,d,f,n){a=new LibraryDialog(this,a,b,d,f,n);this.showDialog(a.container,640,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var b=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var c=
b.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&c.refresh()}));return c};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position="absolute";a.style.overflow="hidden";var b=document.createElement("a");b.className="geTitle";b.style.color="#DF6C0C";b.style.fontWeight="bold";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML=
'<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,d,f,n,g){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},
-e=null!=a&&null!=a.error?a.error:a;if(null!=e||null!=b){var k=mxUtils.htmlEntities(mxResources.get("unknownError")),l=mxResources.get("ok"),q=null;b=null!=b?b:mxResources.get("error");if(null!=e){null!=e.retry&&(l=mxResources.get("cancel"),q=function(){c();e.retry()});if(404==e.code||404==e.status||403==e.code){var k=403==e.code?null!=e.message?mxUtils.htmlEntities(e.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=n?n:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+
+e=null!=a&&null!=a.error?a.error:a;if(null!=e||null!=b){var k=mxUtils.htmlEntities(mxResources.get("unknownError")),q=mxResources.get("ok"),l=null;b=null!=b?b:mxResources.get("error");if(null!=e){null!=e.retry&&(q=mxResources.get("cancel"),l=function(){c();e.retry()});if(404==e.code||404==e.status||403==e.code){var k=403==e.code?null!=e.message?mxUtils.htmlEntities(e.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=n?n:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+
(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":"")),m=null!=g?g:window.location.hash;if(null!=m&&("#G"==m.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==m.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==e.code||404==e.status)){m="#U"==m.substring(0,2)?m.substring(45,
-m.lastIndexOf("%26ex")):m.substring(2);this.showError(b,k,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+m);this.handleError(a,b,d,f,n)}),q,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){e.innerHTML="";for(var a=0;a<c.length;a++){var b=document.createElement("option");mxUtils.write(b,c[a].displayName);b.value=a;e.appendChild(b);b=document.createElement("option");b.innerHTML="&nbsp;&nbsp;&nbsp;";
+m.lastIndexOf("%26ex")):m.substring(2);this.showError(b,k,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+m);this.handleError(a,b,d,f,n)}),l,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){e.innerHTML="";for(var a=0;a<c.length;a++){var b=document.createElement("option");mxUtils.write(b,c[a].displayName);b.value=a;e.appendChild(b);b=document.createElement("option");b.innerHTML="&nbsp;&nbsp;&nbsp;";
mxUtils.write(b,"<"+c[a].email+">");b.setAttribute("disabled","disabled");e.appendChild(b)}b=document.createElement("option");mxUtils.write(b,mxResources.get("addAccount"));b.value=c.length;e.appendChild(b)}var c=this.drive.getUsersList(),b=document.createElement("div"),d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+": ");b.appendChild(d);var e=document.createElement("select");e.style.width="200px";a();mxEvent.addListener(e,"change",mxUtils.bind(this,
function(){var b=e.value,d=c.length!=b;d&&this.drive.setUser(c[b]);this.drive.authorize(d,mxUtils.bind(this,function(){d||(c=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),!0)}));b.appendChild(e);b=new CustomDialog(this,b,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(b.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=d&&d()}),480,150);return}}null!=e.message?
-k=mxUtils.htmlEntities(e.message):null!=e.response&&null!=e.response.error?k=mxUtils.htmlEntities(e.response.error):"undefined"!==typeof window.App&&(e.code==App.ERROR_TIMEOUT?k=mxUtils.htmlEntities(mxResources.get("timeout")):e.code==App.ERROR_BUSY&&(k=mxUtils.htmlEntities(mxResources.get("busy"))))}var p=g=null;null!=e&&null!=e.helpLink&&(g=mxResources.get("help"),p=mxUtils.bind(this,function(){return this.editor.graph.openLink(e.helpLink)}));this.showError(b,k,l,d,q,null,null,g,p,null,null,null,
+k=mxUtils.htmlEntities(e.message):null!=e.response&&null!=e.response.error?k=mxUtils.htmlEntities(e.response.error):"undefined"!==typeof window.App&&(e.code==App.ERROR_TIMEOUT?k=mxUtils.htmlEntities(mxResources.get("timeout")):e.code==App.ERROR_BUSY&&(k=mxUtils.htmlEntities(mxResources.get("busy"))))}var p=g=null;null!=e&&null!=e.helpLink&&(g=mxResources.get("help"),p=mxUtils.bind(this,function(){return this.editor.graph.openLink(e.helpLink)}));this.showError(b,k,q,d,l,null,null,g,p,null,null,null,
f?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,d,f,n,g){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},f,n,null,null,null,null,e);this.showDialog(a.container,340,46+
-e,!0,g);a.init()};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,d,f){var c=a.toDataURL("image/"+d);if(6>=c.length||
-c==a.cloneNode(!1).toDataURL("image/"+d))throw{message:"Invalid image"};null!=b&&(c=this.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(b)));0<f&&(c=this.writeGraphModelToPng(c,"pHYs","dpi",f));return c};EditorUi.prototype.saveCanvas=function(a,b,d,f,n){var c="jpeg"==d?"jpg":d;f=this.getBaseFilename(f)+"."+c;a=this.createImageDataUri(a,b,d,n);this.saveData(f,c,a.substring(a.lastIndexOf(",")+1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&
-(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width="600px";c.textarea.style.height="380px";this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",
-!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,d,f,n){if(window.Blob&&navigator.msSaveOrOpenBlob)a=f?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",!0,b),d.close());else{var c=document.createElement("a"),e=!mxClient.IS_SF&&0>navigator.userAgent.indexOf("PaleMoon/")&&"undefined"!==typeof c.download;
-if(mxClient.IS_GC)var k=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),e=65==(k?parseInt(k[2],10):!1)?!1:e;if(e||this.isOffline()){c.href=URL.createObjectURL(f?this.base64ToBlob(a,d):new Blob([a],{type:d}));e?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(t){}}else this.createEchoRequest(a,b,d,f,n).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=
-function(a,b,d,f,n,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=n?"&format="+n:"")+(null!=g?"&base64="+g:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(f?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),f=Array(e),l=0;l<e;++l){for(var m=1024*l,t=Math.min(m+1024,d),p=Array(t-m),z=0;m<t;++z,++m)p[z]=c[m].charCodeAt(0);f[l]=new Uint8Array(p)}return new Blob(f,{type:b})};
-EditorUi.prototype.saveLocalFile=function(a,b,d,f,n,g,l){g=null!=g?g:!1;l=null!=l?l:"vsdx"!=n&&(!mxClient.IS_IOS||!navigator.standalone);n=this.getServiceCount(g);isLocalStorage&&n++;var c=4>=n?2:6<n?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(c,b){try{if("_blank"==b)if(null==d||"image/"!=d.substring(0,6)||"image/svg"==d.substring(0,9)&&!mxClient.IS_SVG){var e=window.open("about:blank");null==e?mxUtils.popup(a,!0):(e.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),e.document.close())}else this.openInNewWindow(a,
-d,f);else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,c,d,f):null!=c&&0<c.length&&this.pickFolder(b,mxUtils.bind(this,function(e){try{this.exportFile(a,c,d,f,b,e)}catch(E){this.handleError(E)}}))}catch(D){this.handleError(D)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,l,null,1<n,c,a,d,f);g=this.isServices(n)?n>c?390:270:160;this.showDialog(b.container,400,g,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,
-b,d){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var c=window.open("about:blank");null==c||null==c.document?mxUtils.popup(a,!0):("image/svg+xml"==b?c.document.write("<html>"+a+"</html>"):c.document.write('<html><img style="max-width:100%;" src="data:'+b+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),c.document.close())}else c=window.open("data:"+b+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null!=c&&null!=c.document||
-mxUtils.popup(a,!0)};var f=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");
-var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=
-d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=d.zIndex;var e=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});e.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){e.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height=
-"auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);
-b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}f.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,d,f,n){this.isLocalFileSave()?this.saveLocalFile(d,a,f,n,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,
-a,f,n,b,c)}),d,n,f)};EditorUi.prototype.saveRequest=function(a,b,d,f,n,g,l){l=null!=l?l:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);isLocalStorage&&c++;var e=4>=c?2:6<c?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var e=d("_blank"==c?null:a,c==App.MODE_DEVICE||"download"==c||null==c||"_blank"==c?"0":"1");null!=e&&(c==App.MODE_DEVICE||"download"==c||"_blank"==c?e.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,
-function(d){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+b;if(null!=f)try{this.exportFile(f,a,g,!0,c,d)}catch(v){this.handleError(v)}else this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=e.getStatus()&&299>=e.getStatus())try{this.exportFile(e.getText(),a,g,!0,c,d)}catch(v){this.handleError(v)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),
-mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,l,null,1<c,e,f,g,n);c=this.isServices(c)?4<c?390:270:160;this.showDialog(a.container,380,c,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,d,f,n,g){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=function(a,b,d,f,
-n,g,l,m,t,p){if(this.spinner.spin(document.body,mxResources.get("export")))try{var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;var e=b?null:this.editor.graph.background;e==mxConstants.NONE&&(e=null);null==e&&0==b&&(e="#ffffff");var k=this.editor.graph.getSvg(e,a,l,m,null,d,null,null,"blank"==p?"_blank":"self"==p?"_top":null,null,!0);f&&this.editor.graph.addSvgShadow(k);var q=this.getBaseFilename()+".svg",y=mxUtils.bind(this,function(a){this.spinner.stop();n&&a.setAttribute("content",this.getFileData(!0,
-null,null,null,d,t,null,null,null,!1));if(null!=this.editor.fontCss){var c=a.ownerDocument,c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"style"):c.createElement("style");c.setAttribute("type","text/css");mxUtils.setTextContent(c,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(c)}var b='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||
-b.length<=MAX_REQUEST_SIZE?this.saveData(q,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.editor.graph.mathEnabled&&this.editor.addMathCss(k);g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(k,y,this.thumbImageCache)):y(k)}catch(V){this.handleError(V)}};EditorUi.prototype.addRadiobox=function(a,b,d,f,n,g,l){return this.addCheckbox(a,d,f,n,g,l,!0,b)};EditorUi.prototype.addCheckbox=
-function(a,b,d,f,n,g,l,m){g=null!=g?g:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",l?"radio":"checkbox");l="geCheckbox-"+Editor.guid();c.id=l;null!=m&&c.setAttribute("name",m);d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);f&&c.setAttribute("disabled","disabled");g&&(a.appendChild(c),d=document.createElement("label"),mxUtils.write(d,b),d.setAttribute("for",l),a.appendChild(d),n||mxUtils.br(a));return c};EditorUi.prototype.addEditButton=
-function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),e="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(e=window.location.href);var f=document.createElement("select");f.style.width="120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));f.appendChild(d);d=document.createElement("option");
-d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");f.appendChild(d);a.appendChild(f);mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if("custom"==f.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:f.value="blank"},mxResources.get("url"),null,null,null,null,function(){f.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||
-b.checked)?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===f.value?"_blank":e:null},getEditInput:function(){return c},getEditSelect:function(){return f}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){l.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=f&&f!=mxConstants.NONE?"border:1px solid black;background-color:"+f:"background-position:center center;background-repeat:no-repeat;background-image:url('"+
-Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));d.appendChild(e);e=document.createElement("option");
-e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));d.appendChild(e);b&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(e));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var f="#0000ff",l=null,l=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;c()});mxEvent.consume(a)}));c();l.style.padding=
-mxClient.IS_FF?"4px 2px 4px 2px":"4px";l.style.marginLeft="4px";l.style.height="22px";l.style.width="22px";l.style.position="relative";l.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";l.className="geColorBtn";a.appendChild(l);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,d,f,n,g,l,m){var c=this.getCurrentFile(),e=[];f&&(e.push("lightbox=1"),"auto"!=a&&e.push("target="+
-a),null!=b&&b!=mxConstants.NONE&&e.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=n&&0<n.length&&e.push("edit="+encodeURIComponent(n)),g&&e.push("layers=1"),this.editor.graph.foldingEnabled&&e.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&e.push("page-id="+this.currentPage.getId());a=!0;null!=l?d="#U"+encodeURIComponent(l):(c=this.getCurrentFile(),m||null==c||c.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,
-null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+c.getHash(),a=!1));a&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&e.push("title="+encodeURIComponent(c.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host+"/")+(0<e.length?"?"+e.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,f,n,g,l,m,t,p,z){this.getBasenames();
-var c={};""!=n&&n!=mxConstants.NONE&&(c.highlight=n);"auto"!==f&&(c.target=f);t||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];l&&(d.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(d.push("zoom"),c.resize=!0);m&&d.push("layers");0<d.length&&(t&&d.push("lightbox"),c.toolbar=d.join(" "));null!=p&&0<p.length&&(c.edit=p);null!=a?c.url=a:c.xml=this.getFileData(!0,
-null,null,null,null,!l);b='<div class="mxgraph" style="'+(g?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";z(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+
-"/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,d,f){var c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("html"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var l=document.createElement("input");l.style.cssText=
-"margin-right:8px;margin-top:8px;margin-bottom:8px;";l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","type-embedhtmldialog");e=l.cloneNode(!0);e.setAttribute("value","copy");k.appendChild(e);var t=document.createElement("span");mxUtils.write(t,mxResources.get("includeCopyOfMyDiagram"));k.appendChild(t);mxUtils.br(k);k.appendChild(l);t=document.createElement("span");mxUtils.write(t,mxResources.get("publicDiagramUrl"));k.appendChild(t);var q=this.getCurrentFile();
-null==d&&null!=q&&q.constructor==window.DriveFile&&(t=document.createElement("a"),t.style.paddingLeft="12px",t.style.color="gray",t.setAttribute("href","javascript:void(0);"),mxUtils.write(t,mxResources.get("share")),k.appendChild(t),mxEvent.addListener(t,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(q.getId())})));e.setAttribute("checked","checked");null==d&&l.setAttribute("disabled","disabled");c.appendChild(k);var m=this.addLinkSection(c),p=this.addCheckbox(c,
-mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var 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%";c.appendChild(E);var v=this.addCheckbox(c,mxResources.get("fit"),!0),k=null!=this.pages&&1<this.pages.length,u=u=this.addCheckbox(c,mxResources.get("allPages"),k,!k),x=this.addCheckbox(c,mxResources.get("layers"),!0),J=this.addCheckbox(c,mxResources.get("lightbox"),
-!0),B=this.addEditButton(c,J),C=B.getEditInput();C.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled");C.checked&&J.checked?B.getEditSelect().removeAttribute("disabled"):B.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){f(l.checked?d:null,p.checked,E.value,m.getTarget(),m.getColor(),v.checked,u.checked,x.checked,J.checked,B.getLink())}),null,a,
-b);this.showDialog(a.container,340,384,!0,!0);e.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,f,n,g){var c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,a||mxResources.get("link"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var k=this.getCurrentFile(),e="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=k&&k.constructor==window.DriveFile&&
-!b){a=80;var e="https://desk.draw.io/support/solutions/articles/16000039384",l=document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var q=document.createElement("div");q.style.whiteSpace="normal";mxUtils.write(q,mxResources.get("linkAccountRequired"));l.appendChild(q);q=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(k.getId())}));q.style.marginTop=
-"12px";q.className="geBtn";l.appendChild(q);c.appendChild(l);q=document.createElement("a");q.style.paddingLeft="12px";q.style.color="gray";q.style.fontSize="11px";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("check"));l.appendChild(q);mxEvent.addListener(q,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,
-mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var m=null,p=null;if(null!=d||null!=f)a+=30,mxUtils.write(c,mxResources.get("width")+":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.marginRight="16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",c.appendChild(m),mxUtils.write(c,mxResources.get("height")+":"),
-p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px",p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=f+"px",c.appendChild(p),mxUtils.br(c);var v=this.addLinkSection(c,g);d=null!=this.pages&&1<this.pages.length;var u=null;if(null==k||k.constructor!=window.DriveFile||b)u=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var x=this.addCheckbox(c,mxResources.get("lightbox"),!0),J=this.addEditButton(c,x),B=J.getEditInput(),C=this.addCheckbox(c,mxResources.get("layers"),
-!0);C.style.marginLeft=B.style.marginLeft;C.style.marginBottom="16px";C.style.marginTop="8px";mxEvent.addListener(x,"change",function(){x.checked?(C.removeAttribute("disabled"),B.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"));B.checked&&x.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){n(v.getTarget(),v.getColor(),null==u?
-!0:u.checked,x.checked,J.getLink(),C.checked,null!=m?m.value:null,null!=p?p.value:null)}),null,mxResources.get("create"),e);this.showDialog(b.container,340,254+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):v.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,f,n){var c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,
-mxResources.get("image"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(n?"10":"4")+"px";c.appendChild(e);if(n){mxUtils.write(c,mxResources.get("zoom")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.style.marginRight="12px";k.value=this.lastExportZoom||"100%";c.appendChild(k);mxUtils.write(c,mxResources.get("borderWidth")+":");var l=document.createElement("input");l.setAttribute("type",
-"text");l.style.marginRight="16px";l.style.width="60px";l.style.marginLeft="4px";l.value=this.lastExportBorder||"0";c.appendChild(l);mxUtils.br(c)}var q=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),m=f?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),!0),e=this.editor.graph,p=f?null:this.addCheckbox(c,mxResources.get("transparentBackground"),e.background==mxConstants.NONE||null==e.background);null!=p&&(p.style.marginBottom="16px");a=
-new CustomDialog(this,c,mxUtils.bind(this,function(){var a=parseInt(k.value)/100||1,c=parseInt(l.value)||0;d(!q.checked,null!=m?m.checked:!1,null!=p?p.checked:!1,a,c)}),null,a,b);this.showDialog(a.container,300,(n?25:0)+(f?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,d,f,n,g,l,m){l=null!=l?l:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var e=this.editor.graph,k="jpeg"==m?196:300,q=document.createElement("h3");mxUtils.write(q,a);q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
-c.appendChild(q);mxUtils.write(c,mxResources.get("zoom")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight="12px";p.value=this.lastExportZoom||"100%";c.appendChild(p);mxUtils.write(c,mxResources.get("borderWidth")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.marginRight="16px";y.style.width="60px";y.style.marginLeft="4px";y.value=this.lastExportBorder||
-"0";c.appendChild(y);mxUtils.br(c);var A=this.addCheckbox(c,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=m),u=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,e.isSelectionEmpty()),x=document.createElement("input");x.style.marginTop="16px";x.style.marginRight="8px";x.style.marginLeft="24px";x.setAttribute("disabled","disabled");x.setAttribute("type","checkbox");g&&(c.appendChild(x),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),k+=26,mxEvent.addListener(u,"change",function(){u.checked?
-x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")}));e.isSelectionEmpty()||(x.setAttribute("checked","checked"),x.defaultChecked=!0);var B=this.addCheckbox(c,mxResources.get("shadow"),e.shadowVisible),C=document.createElement("input");C.style.marginTop="16px";C.style.marginRight="8px";C.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||C.setAttribute("disabled","disabled");b&&(c.appendChild(C),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),k+=
-26);var K=null;if("png"==m||"jpeg"==m)K=this.addCheckbox(c,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),k+=26;var N=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),l,null,null,"jpeg"!=m),R=null!=this.pages&&1<this.pages.length,ba=this.addCheckbox(c,R?mxResources.get("allPages"):"",R,!R,null,"jpeg"!=m);ba.style.marginLeft="24px";ba.style.marginBottom="16px";R||(ba.style.display="none");mxEvent.addListener(N,"change",function(){N.checked&&R?ba.removeAttribute("disabled"):
-ba.setAttribute("disabled","disabled")});l&&R||ba.setAttribute("disabled","disabled");var Y=document.createElement("select");Y.style.maxWidth="260px";Y.style.marginLeft="8px";Y.style.marginRight="10px";Y.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));Y.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));Y.appendChild(a);a=document.createElement("option");
-a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));Y.appendChild(a);"svg"==m&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(Y),mxUtils.br(c),mxUtils.br(c),k+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=y.value;this.lastExportZoom=p.value;n(p.value,A.checked,!u.checked,B.checked,N.checked,C.checked,y.value,x.checked,!ba.checked,Y.value,null!=K?K.checked:null)}),null,d,f);this.showDialog(d.container,340,k,!0,!0,null,
-null,null,null,!0);p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,f,l){var c=document.createElement("div");c.style.whiteSpace="nowrap";var e=this.editor.graph;if(null!=b){var k=document.createElement("h3");mxUtils.write(k,b);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(k)}var n=this.addCheckbox(c,mxResources.get("fit"),
-!0),q=this.addCheckbox(c,mxResources.get("shadow"),e.shadowVisible&&f,!f),m=this.addCheckbox(c,d),p=this.addCheckbox(c,mxResources.get("lightbox"),!0),u=this.addEditButton(c,p),v=u.getEditInput(),x=1<e.model.getChildCount(e.model.getRoot()),B=this.addCheckbox(c,mxResources.get("layers"),x,!x);B.style.marginLeft=v.style.marginLeft;B.style.marginBottom="12px";B.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(x&&B.removeAttribute("disabled"),v.removeAttribute("disabled")):
-(B.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"));v.checked&&p.checked?u.getEditSelect().removeAttribute("disabled"):u.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(n.checked,q.checked,m.checked,p.checked,u.getLink(),B.checked)}),null,mxResources.get("embed"),l);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,f,l,g,m,p){function c(c){var b=" ",k="";f&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+e,!0,g);a.init()};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||(!mxClient.IS_SF||!this.editor.graph.mathEnabled)&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,
+b,d,f){var c=a.toDataURL("image/"+d);if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/"+d))throw{message:"Invalid image"};null!=b&&(c=this.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(b)));0<f&&(c=this.writeGraphModelToPng(c,"pHYs","dpi",f));return c};EditorUi.prototype.saveCanvas=function(a,b,d,f,n){var c="jpeg"==d?"jpg":d;f=this.getBaseFilename(f)+"."+c;a=this.createImageDataUri(a,b,d,n);this.saveData(f,c,a.substring(a.lastIndexOf(",")+1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=
+function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width="600px";c.textarea.style.height="380px";this.showDialog(c.container,620,460,!0,!0,null,null,null,
+null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,d,f,n){if(window.Blob&&navigator.msSaveOrOpenBlob)a=f?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",!0,b),d.close());else{var c=document.createElement("a"),e=!mxClient.IS_SF&&0>navigator.userAgent.indexOf("PaleMoon/")&&
+"undefined"!==typeof c.download;if(mxClient.IS_GC)var k=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),e=65==(k?parseInt(k[2],10):!1)?!1:e;if(e||this.isOffline()){c.href=URL.createObjectURL(f?this.base64ToBlob(a,d):new Blob([a],{type:d}));e?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(t){}}else this.createEchoRequest(a,b,d,f,n).simulate(document,"_blank")}};
+EditorUi.prototype.createEchoRequest=function(a,b,d,f,n,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=n?"&format="+n:"")+(null!=g?"&base64="+g:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(f?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),f=Array(e),l=0;l<e;++l){for(var m=1024*l,t=Math.min(m+1024,d),p=Array(t-m),z=0;m<t;++z,++m)p[z]=c[m].charCodeAt(0);f[l]=new Uint8Array(p)}return new Blob(f,
+{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,f,n,g,l){g=null!=g?g:!1;l=null!=l?l:"vsdx"!=n&&(!mxClient.IS_IOS||!navigator.standalone);n=this.getServiceCount(g);isLocalStorage&&n++;var c=4>=n?2:6<n?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(c,b){try{if("_blank"==b)if(null==d||"image/"!=d.substring(0,6)||"image/svg"==d.substring(0,9)&&!mxClient.IS_SVG){var e=window.open("about:blank");null==e?mxUtils.popup(a,!0):(e.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),
+e.document.close())}else this.openInNewWindow(a,d,f);else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,c,d,f):null!=c&&0<c.length&&this.pickFolder(b,mxUtils.bind(this,function(e){try{this.exportFile(a,c,d,f,b,e)}catch(D){this.handleError(D)}}))}catch(G){this.handleError(G)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,l,null,1<n,c,a,d,f);g=this.isServices(n)?n>c?390:270:160;this.showDialog(b.container,400,g,!0,!0);b.init()};
+EditorUi.prototype.openInNewWindow=function(a,b,d){if(mxClient.IS_GC||mxClient.IS_EDGE||mxClient.IS_FF||11==document.documentMode||10==document.documentMode){var c=window.open("about:blank");null==c||null==c.document?mxUtils.popup(a,!0):("image/svg+xml"==b?c.document.write("<html>"+a+"</html>"):c.document.write('<html><img style="max-width:100%;" src="data:'+b+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),c.document.close())}else c=window.open("data:"+b+(d?";base64,"+a:";charset=utf8,"+
+encodeURIComponent(a))),null!=c&&null!=c.document||mxUtils.popup(a,!0)};var f=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);
+else{this.exportDialog=document.createElement("div");var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";
+mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=d.zIndex;var e=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});e.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){e.stop();
+this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+
+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}f.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,d,f,n){this.isLocalFileSave()?this.saveLocalFile(d,a,f,n,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,
+c){return this.createEchoRequest(d,a,f,n,b,c)}),d,n,f)};EditorUi.prototype.saveRequest=function(a,b,d,f,n,g,l){l=null!=l?l:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);isLocalStorage&&c++;var e=4>=c?2:6<c?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var e=d("_blank"==c?null:a,c==App.MODE_DEVICE||"download"==c||null==c||"_blank"==c?"0":"1");null!=e&&(c==App.MODE_DEVICE||"download"==c||"_blank"==c?e.simulate(document,"_blank"):
+this.pickFolder(c,mxUtils.bind(this,function(d){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+b;if(null!=f)try{this.exportFile(f,a,g,!0,c,d)}catch(y){this.handleError(y)}else this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=e.getStatus()&&299>=e.getStatus())try{this.exportFile(e.getText(),a,g,!0,c,d)}catch(y){this.handleError(y)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();
+this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,l,null,1<c,e,f,g,n);c=this.isServices(c)?4<c?390:270:160;this.showDialog(a.container,380,c,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,d,f,n,g){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=
+function(a,b,d,f,n,g,l,m,t,p){if(this.spinner.spin(document.body,mxResources.get("export")))try{var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;var e=b?null:this.editor.graph.background;e==mxConstants.NONE&&(e=null);null==e&&0==b&&(e="#ffffff");var k=this.editor.graph.getSvg(e,a,l,m,null,d,null,null,"blank"==p?"_blank":"self"==p?"_top":null,null,!0);f&&this.editor.graph.addSvgShadow(k);var q=this.getBaseFilename()+".svg",x=mxUtils.bind(this,function(a){this.spinner.stop();n&&a.setAttribute("content",
+this.getFileData(!0,null,null,null,d,t,null,null,null,!1));var c='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||c.length<=MAX_REQUEST_SIZE?this.saveData(q,"svg",c,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}))});this.editor.addFontCss(k);this.editor.graph.mathEnabled&&
+this.editor.addMathCss(k);g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(k,x,this.thumbImageCache)):x(k)}catch(O){this.handleError(O)}};EditorUi.prototype.addRadiobox=function(a,b,d,f,n,g,l){return this.addCheckbox(a,d,f,n,g,l,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,d,f,n,g,l,m){g=null!=g?g:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",l?"radio":"checkbox");l="geCheckbox-"+Editor.guid();c.id=
+l;null!=m&&c.setAttribute("name",m);d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);f&&c.setAttribute("disabled","disabled");g&&(a.appendChild(c),d=document.createElement("label"),mxUtils.write(d,b),d.setAttribute("for",l),a.appendChild(d),n||mxUtils.br(a));return c};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),e="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=
+App.MODE_BROWSER&&(e=window.location.href);var f=document.createElement("select");f.style.width="120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));f.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");f.appendChild(d);a.appendChild(f);mxEvent.addListener(f,"change",mxUtils.bind(this,
+function(){if("custom"==f.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:f.value="blank"},mxResources.get("url"),null,null,null,null,function(){f.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===f.value?"_blank":
+e:null},getEditInput:function(){return c},getEditSelect:function(){return f}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){l.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=f&&f!=mxConstants.NONE?"border:1px solid black;background-color:"+f:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");
+d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));d.appendChild(e);b&&
+(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(e));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var f="#0000ff",l=null,l=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;c()});mxEvent.consume(a)}));c();l.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";l.style.marginLeft="4px";l.style.height="22px";l.style.width=
+"22px";l.style.position="relative";l.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";l.className="geColorBtn";a.appendChild(l);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,d,f,n,g,l,m){var c=this.getCurrentFile(),e=[];f&&(e.push("lightbox=1"),"auto"!=a&&e.push("target="+a),null!=b&&b!=mxConstants.NONE&&e.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),
+null!=n&&0<n.length&&e.push("edit="+encodeURIComponent(n)),g&&e.push("layers=1"),this.editor.graph.foldingEnabled&&e.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&e.push("page-id="+this.currentPage.getId());a=!0;null!=l?d="#U"+encodeURIComponent(l):(c=this.getCurrentFile(),m||null==c||c.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):
+(d="#"+c.getHash(),a=!1));a&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&e.push("title="+encodeURIComponent(c.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host+"/")+(0<e.length?"?"+e.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,f,n,g,l,m,t,p,z){this.getBasenames();var c={};""!=n&&n!=mxConstants.NONE&&(c.highlight=n);"auto"!==f&&(c.target=f);t||(c.lightbox=
+!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];l&&(d.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(d.push("zoom"),c.resize=!0);m&&d.push("layers");0<d.length&&(t&&d.push("lightbox"),c.toolbar=d.join(" "));null!=p&&0<p.length&&(c.edit=p);null!=a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!l);b='<div class="mxgraph" style="'+(g?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":
+"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";z(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,d,f){var c=document.createElement("div");
+c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("html"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name",
+"type-embedhtmldialog");e=l.cloneNode(!0);e.setAttribute("value","copy");k.appendChild(e);var t=document.createElement("span");mxUtils.write(t,mxResources.get("includeCopyOfMyDiagram"));k.appendChild(t);mxUtils.br(k);k.appendChild(l);t=document.createElement("span");mxUtils.write(t,mxResources.get("publicDiagramUrl"));k.appendChild(t);var q=this.getCurrentFile();null==d&&null!=q&&q.constructor==window.DriveFile&&(t=document.createElement("a"),t.style.paddingLeft="12px",t.style.color="gray",t.setAttribute("href",
+"javascript:void(0);"),mxUtils.write(t,mxResources.get("share")),k.appendChild(t),mxEvent.addListener(t,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(q.getId())})));e.setAttribute("checked","checked");null==d&&l.setAttribute("disabled","disabled");c.appendChild(k);var m=this.addLinkSection(c),p=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";
+D.style.width="60px";D.style.marginLeft="4px";D.style.marginRight="12px";D.value="100%";c.appendChild(D);var y=this.addCheckbox(c,mxResources.get("fit"),!0),k=null!=this.pages&&1<this.pages.length,u=u=this.addCheckbox(c,mxResources.get("allPages"),k,!k),v=this.addCheckbox(c,mxResources.get("layers"),!0),J=this.addCheckbox(c,mxResources.get("lightbox"),!0),B=this.addEditButton(c,J),C=B.getEditInput();C.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?C.removeAttribute("disabled"):
+C.setAttribute("disabled","disabled");C.checked&&J.checked?B.getEditSelect().removeAttribute("disabled"):B.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){f(l.checked?d:null,p.checked,D.value,m.getTarget(),m.getColor(),y.checked,u.checked,v.checked,J.checked,B.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);e.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,f,n,g){var c=document.createElement("div");c.style.whiteSpace=
+"nowrap";var e=document.createElement("h3");mxUtils.write(e,a||mxResources.get("link"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var k=this.getCurrentFile(),e="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=k&&k.constructor==window.DriveFile&&!b){a=80;var e="https://desk.draw.io/support/solutions/articles/16000039384",l=document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
+var q=document.createElement("div");q.style.whiteSpace="normal";mxUtils.write(q,mxResources.get("linkAccountRequired"));l.appendChild(q);q=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(k.getId())}));q.style.marginTop="12px";q.className="geBtn";l.appendChild(q);c.appendChild(l);q=document.createElement("a");q.style.paddingLeft="12px";q.style.color="gray";q.style.fontSize="11px";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("check"));
+l.appendChild(q);mxEvent.addListener(q,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var m=null,p=null;if(null!=d||null!=f)a+=30,mxUtils.write(c,mxResources.get("width")+":"),m=document.createElement("input"),
+m.setAttribute("type","text"),m.style.marginRight="16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",c.appendChild(m),mxUtils.write(c,mxResources.get("height")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px",p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=f+"px",c.appendChild(p),mxUtils.br(c);var y=this.addLinkSection(c,g);d=null!=this.pages&&1<this.pages.length;var u=null;
+if(null==k||k.constructor!=window.DriveFile||b)u=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var v=this.addCheckbox(c,mxResources.get("lightbox"),!0),J=this.addEditButton(c,v),B=J.getEditInput(),C=this.addCheckbox(c,mxResources.get("layers"),!0);C.style.marginLeft=B.style.marginLeft;C.style.marginBottom="16px";C.style.marginTop="8px";mxEvent.addListener(v,"change",function(){v.checked?(C.removeAttribute("disabled"),B.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),B.setAttribute("disabled",
+"disabled"));B.checked&&v.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){n(y.getTarget(),y.getColor(),null==u?!0:u.checked,v.checked,J.getLink(),C.checked,null!=m?m.value:null,null!=p?p.value:null)}),null,mxResources.get("create"),e);this.showDialog(b.container,340,254+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():
+document.execCommand("selectAll",!1,null)):y.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,f,n){var c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("image"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(n?"10":"4")+"px";c.appendChild(e);if(n){mxUtils.write(c,mxResources.get("zoom")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginRight=
+"16px";k.style.width="60px";k.style.marginLeft="4px";k.style.marginRight="12px";k.value=this.lastExportZoom||"100%";c.appendChild(k);mxUtils.write(c,mxResources.get("borderWidth")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginRight="16px";l.style.width="60px";l.style.marginLeft="4px";l.value=this.lastExportBorder||"0";c.appendChild(l);mxUtils.br(c)}var q=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),m=f?null:this.addCheckbox(c,
+mxResources.get("includeCopyOfMyDiagram"),!0),e=this.editor.graph,p=f?null:this.addCheckbox(c,mxResources.get("transparentBackground"),e.background==mxConstants.NONE||null==e.background);null!=p&&(p.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){var a=parseInt(k.value)/100||1,c=parseInt(l.value)||0;d(!q.checked,null!=m?m.checked:!1,null!=p?p.checked:!1,a,c)}),null,a,b);this.showDialog(a.container,300,(n?25:0)+(f?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
+function(a,b,d,f,l,g,m,p){m=null!=m?m:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var e=this.editor.graph,k="jpeg"==p?196:300,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(n);mxUtils.write(c,mxResources.get("zoom")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight=
+"12px";q.value=this.lastExportZoom||"100%";c.appendChild(q);mxUtils.write(c,mxResources.get("borderWidth")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.marginRight="16px";x.style.width="60px";x.style.marginLeft="4px";x.value=this.lastExportBorder||"0";c.appendChild(x);mxUtils.br(c);var A=this.addCheckbox(c,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=p),u=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,e.isSelectionEmpty()),v=document.createElement("input");
+v.style.marginTop="16px";v.style.marginRight="8px";v.style.marginLeft="24px";v.setAttribute("disabled","disabled");v.setAttribute("type","checkbox");g&&(c.appendChild(v),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),k+=26,mxEvent.addListener(u,"change",function(){u.checked?v.removeAttribute("disabled"):v.setAttribute("disabled","disabled")}));e.isSelectionEmpty()||(v.setAttribute("checked","checked"),v.defaultChecked=!0);var B=this.addCheckbox(c,mxResources.get("shadow"),e.shadowVisible),
+C=document.createElement("input");C.style.marginTop="16px";C.style.marginRight="8px";C.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||C.setAttribute("disabled","disabled");b&&(c.appendChild(C),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),k+=26);var L=null;if("png"==p||"jpeg"==p)L=this.addCheckbox(c,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),k+=26;var P=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),m,null,null,
+"jpeg"!=p),T=null!=this.pages&&1<this.pages.length,ba=this.addCheckbox(c,T?mxResources.get("allPages"):"",T,!T,null,"jpeg"!=p);ba.style.marginLeft="24px";ba.style.marginBottom="16px";T||(ba.style.display="none");mxEvent.addListener(P,"change",function(){P.checked&&T?ba.removeAttribute("disabled"):ba.setAttribute("disabled","disabled")});m&&T||ba.setAttribute("disabled","disabled");var Y=document.createElement("select");Y.style.maxWidth="260px";Y.style.marginLeft="8px";Y.style.marginRight="10px";Y.className=
+"geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));Y.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));Y.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));Y.appendChild(a);"svg"==p&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(Y),mxUtils.br(c),mxUtils.br(c),
+k+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=x.value;this.lastExportZoom=q.value;l(q.value,A.checked,!u.checked,B.checked,P.checked,C.checked,x.value,v.checked,!ba.checked,Y.value,null!=L?L.checked:null)}),null,d,f);this.showDialog(d.container,340,k,!0,!0,null,null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,
+b,d,f,l){var c=document.createElement("div");c.style.whiteSpace="nowrap";var e=this.editor.graph;if(null!=b){var k=document.createElement("h3");mxUtils.write(k,b);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(k)}var n=this.addCheckbox(c,mxResources.get("fit"),!0),q=this.addCheckbox(c,mxResources.get("shadow"),e.shadowVisible&&f,!f),m=this.addCheckbox(c,d),p=this.addCheckbox(c,mxResources.get("lightbox"),!0),u=this.addEditButton(c,p),y=u.getEditInput(),
+v=1<e.model.getChildCount(e.model.getRoot()),B=this.addCheckbox(c,mxResources.get("layers"),v,!v);B.style.marginLeft=y.style.marginLeft;B.style.marginBottom="12px";B.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(v&&B.removeAttribute("disabled"),y.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),y.setAttribute("disabled","disabled"));y.checked&&p.checked?u.getEditSelect().removeAttribute("disabled"):u.getEditSelect().setAttribute("disabled","disabled")});
+b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(n.checked,q.checked,m.checked,p.checked,u.getLink(),B.checked)}),null,mxResources.get("embed"),l);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,f,l,g,m,p){function c(c){var b=" ",k="";f&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
EditorUi.drawHost+"/?client=1&lightbox=1"+(l?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",k+="cursor:pointer;");a&&(k+="max-width:100%;");var n="";d&&(n=' width="'+Math.round(e.width)+'" height="'+Math.round(e.height)+'"');m('<img src="'+c+'"'+n+(""!=k?' style="'+k+'"':"")+b+"/>")}var e=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=f?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null,
mxUtils.bind(this,function(a){p({message:mxResources.get("unknownError")})}),null,!0,d?2:1,null,b);else if(b=this.getFileData(!0),e.width*e.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var k="";d&&(k="&w="+Math.round(2*e.width)+"&h="+Math.round(2*e.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(f?"1":"0")+k+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?c("data:image/png;base64,"+n.getText()):p({message:mxResources.get("unknownError")})}))}else p({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(a,b,d,f,n,g,l){var c=this.editor.graph.getSvg(),e=c.getElementsByTagName("a");if(null!=e)for(var k=0;k<e.length;k++){var q=e[k].getAttribute("href");null!=q&&"#"==q.charAt(0)&&"_blank"==e[k].getAttribute("target")&&e[k].removeAttribute("target")}f&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var m=" ",p="";f&&(m="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.drawHost+"/?client=1&lightbox=1"+(n?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){l('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=p?' style="'+p+'"':"")+m+"/>")}))}else p="",f&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.drawHost+"/?client=1&lightbox=1"+(n?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),p+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),p+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=p&&c.setAttribute("style",p),l(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var c=Math.floor(a/31536E3);if(1<c)return c+" "+mxResources.get("years");
-c=Math.floor(a/2592E3);if(1<c)return c+" "+mxResources.get("months");c=Math.floor(a/86400);if(1<c)return c+" "+mxResources.get("days");c=Math.floor(a/3600);if(1<c)return c+" "+mxResources.get("hours");c=Math.floor(a/60);return 1<c?c+" "+mxResources.get("minutes"):1==c?c+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==a.nodeName){var d=a.getElementsByTagName("diagram");if(0<d.length){var c=
-d[0],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=c&&(a=Editor.parseDiagramNode(c))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(g){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){try{var c=this.editor.graph,e=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),
-document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,!0),c),e=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),f=c.getGlobalVariable,k=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(k.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==
-e&&(e=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=d.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"tEXt","mxfile",encodeURIComponent(e));a(f.substring(f.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(F){null!=b&&b(F)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,c.shadowVisible,null,c)}catch(A){null!=b&&b(A)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,f,l,g,m){m=b.background;
-m==mxConstants.NONE&&(m=null);g=b.getSvg(m,null,null,null,null,g);b.shadowVisible&&b.addSvgShadow(g);null!=a&&g.setAttribute("content",a);null!=d&&g.setAttribute("resource",d);if(null!=l)this.convertImages(g,mxUtils.bind(this,function(a){l((f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
-mxUtils.getXml(g)};EditorUi.prototype.exportImage=function(a,b,d,f,l,g,m,p,t,u,z){t=null!=t?t:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,l?this.getFileData(!0,null,null,null,d,p):null,t,null==this.pages||0==this.pages.length,z)}catch(v){"Invalid image"==v.message?this.downloadFile(t):
-this.handleError(v)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,f,null,null,g,m,u)}catch(E){this.spinner.stop(),this.handleError(E)}}};EditorUi.prototype.embedCssFonts=function(a,b){function c(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")}var d=a.split("url("),e=0;null==this.cachedFonts&&(this.cachedFonts={});var f=mxUtils.bind(this,function(){if(0==e){for(var a=[d[0]],f=1;f<d.length;f++){var k=
-d[f].indexOf(")");a.push('url("');a.push(this.cachedFonts[c(d[f].substring(0,k))]);a.push('"'+d[f].substring(k))}b(a.join(""))}});if(0<d.length){for(var l=1;l<d.length;l++){var m=d[l].indexOf(")"),t=null,p=d[l].indexOf("format(",m);0<p&&(t=c(d[l].substring(p+7,d[l].indexOf(")",p))));mxUtils.bind(this,function(a){if(null==this.cachedFonts[a]){this.cachedFonts[a]=a;e++;var c="application/x-font-ttf";if("svg"==t||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==t||"embedded-opentype"==t||/(\.otf)($|\?)/i.test(a))c=
-"application/x-font-opentype";else if("woff"==t||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==t||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==t||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==t||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&!this.editor.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){this.cachedFonts[a]=
-c;e--;f()}),mxUtils.bind(this,function(a){e--;f()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(d[l].substring(0,m)),t)}f()}else b(a)};EditorUi.prototype.loadFonts=function(a){null!=this.editor.fontCss&&null==this.editor.resolvedFontCss?this.embedCssFonts(this.editor.fontCss,mxUtils.bind(this,function(c){this.editor.resolvedFontCss=c;a()})):a()};EditorUi.prototype.embedExtFonts=function(a){var c=this.editor.graph.extFonts;if(null!=c&&0<c.length){var b="",d=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=
-{});for(var f=mxUtils.bind(this,function(){0==d&&this.embedCssFonts(b,a)}),g=0;g<c.length;g++){var l=c[g].name,m=c[g].url;0==m.indexOf(Editor.GOOGLE_FONTS)?null==this.cachedGoogleFonts[m]?(d++,this.loadUrl(m,mxUtils.bind(this,function(a){this.cachedGoogleFonts[m]=a;b+=a;d--;f()}),mxUtils.bind(this,function(a){d--;b+="@import url("+m+");";f()}))):b+=this.cachedGoogleFonts[m]:b+='@font-face {font-family: "'+l+'";src: url("'+m+'");}'}f()}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,f,l,
-g,m,p,t,u,z,D,E,v,x){try{g=null!=g?g:!0;m=null!=m?m:!0;D=null!=D?D:this.editor.graph;E=null!=E?E:0;var c=t?null:D.background;c==mxConstants.NONE&&(c=null);null==c&&(c=f);null==c&&0==t&&(c="#ffffff");this.convertImages(D.getSvg(null,null,null,v,null,m,null,null,null,u),mxUtils.bind(this,function(d){var e=new Image;e.onload=mxUtils.bind(this,function(){try{var f=function(){mxClient.IS_SF?window.setTimeout(function(){q.drawImage(e,E/p,E/p);a(k)},0):(q.drawImage(e,E/p,E/p),a(k))},k=document.createElement("canvas"),
-n=parseInt(d.getAttribute("width")),m=parseInt(d.getAttribute("height"));p=null!=p?p:1;null!=b&&(p=g?Math.min(1,Math.min(3*b/(4*m),b/n)):b/n);n=Math.ceil(p*n)+2*E;m=Math.ceil(p*m)+2*E;k.setAttribute("width",n);k.setAttribute("height",m);var q=k.getContext("2d");null!=c&&(q.beginPath(),q.rect(0,0,n,m),q.fillStyle=c,q.fill());q.scale(p,p);if(x){var t=D.view,z=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor)))),z="data:image/svg+xml;base64,"+z,y=D.gridSize*t.gridSteps*p,A=D.getGraphBounds(),
-C=A.x*p,v=A.y*p,u=new Image;u.src=z;u.onload=function(){for(var a=-Math.round(y-mxUtils.mod(t.translate.x*p-C,y)),c=-Math.round(y-mxUtils.mod(t.translate.y*p-v,y));a<n;a+=y)for(var b=c;b<m;b+=y)q.drawImage(u,a/p,b/p);f()}}else f()}catch(la){null!=l&&l(la)}});e.onerror=function(a){null!=l&&l(a)};try{u&&this.editor.graph.addSvgShadow(d);var f=function(a){var c=document.createElement("style");c.setAttribute("type","text/css");c.innerHTML=a;d.getElementsByTagName("defs")[0].appendChild(c)},k=mxUtils.bind(this,
-function(){null!=this.editor.resolvedFontCss&&f(this.editor.resolvedFontCss);D.mathEnabled&&this.editor.addMathCss(d);e.src=this.createSvgDataUri(mxUtils.getXml(d))});this.embedExtFonts(mxUtils.bind(this,function(a){null!=a&&f(a);this.loadFonts(k)}))}catch(N){null!=l&&l(N)}}),d,z)}catch(J){null!=l&&l(J)}};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,d=this;a.convert=function(c){if(null!=c){var e="http://"==c.substring(0,7)||"https://"==
-c.substring(0,8);e&&!navigator.onLine?c=d.svgBrokenImage.src:!e||c.substring(0,a.baseUrl.length)==a.baseUrl||d.crossOriginImages&&d.editor.isCorsEnabledForUrl(c)?"chrome-extension://"==c.substring(0,19)||mxClient.IS_CHROMEAPP||(c=b.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c)}return c};return a};EditorUi.prototype.convertImages=function(a,b,d,f){null==f&&(f=this.createImageUrlConverter());var c=0,e=d||{};d=mxUtils.bind(this,function(d,k){for(var g=a.getElementsByTagName(d),l=0;l<
-g.length;l++)mxUtils.bind(this,function(d){try{if(null!=d){var g=f.convert(d.getAttribute(k));if(null!=g&&"data:"!=g.substring(0,5)){var l=e[g];null==l?(c++,this.convertImageToDataUri(g,function(f){null!=f&&(e[g]=f,d.setAttribute(k,f));c--;0==c&&b(a)})):d.setAttribute(k,l)}else null!=g&&d.setAttribute(k,g)}}catch(v){}})(g[l])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,f,l,g,m){try{var c=!m&&(f||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||
-/(\.gif)($|\?)/i.test(a));l=null!=l?l:!0;var e=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var e=a.getText();if(c){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var e=Array(a.length),f=0;f<a.length;f++)e[f]=String.fromCharCode(a[f]);e=e.join("")}g=null!=g?g:"data:image/png;base64,";e=g+this.base64Encode(e)}b(e)}}else null!=
-d&&d({message:mxResources.get("error")+" "+a.getStatus()},a)}),function(a){null!=d&&d({message:mxResources.get("error")+" "+a.getStatus()})},c,this.timeout,function(){l&&null!=d&&d({code:App.ERROR_TIMEOUT,retry:e})})});e()}catch(F){null!=d&&d(F)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){try{var c=!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;b(this.svgBrokenImage.src)}),this.timeout);
-if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(d);c&&b(this.createSvgDataUri(a.getText()))}),function(){window.clearTimeout(d);c&&b(this.svgBrokenImage.src)});else{var e=new Image,f=this;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(d);if(c)try{var a=document.createElement("canvas"),k=a.getContext("2d");a.height=e.height;a.width=e.width;k.drawImage(e,0,0);b(a.toDataURL())}catch(t){b(f.svgBrokenImage.src)}};e.onerror=
-function(){window.clearTimeout(d);c&&b(f.svgBrokenImage.src)};e.src=a}}catch(y){b(this.svgBrokenImage.src)}};EditorUi.prototype.importXml=function(a,b,d,f,l){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var e=this.editor.graph;if(null!=a&&0<a.length){e.model.beginUpdate();try{var k=mxUtils.parseXml(a),n=this.editor.extractGraphModel(k.documentElement,null!=this.pages);if(null!=n&&"mxfile"==n.nodeName&&null!=this.pages){var m=n.getElementsByTagName("diagram");if(1==m.length)n=Editor.parseDiagramNode(m[0]);
-else if(1<m.length){a={};var k=[],q=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(n=Editor.parseDiagramNode(m[0]),f=!1,q=1);for(;q<m.length;q++){var p=m[q].getAttribute("id");m[q].removeAttribute("id");var u=this.updatePageRoot(new DiagramPage(m[q]));a[p]=m[q].getAttribute("id");var v=this.pages.length;null==u.getName()&&u.setName(mxResources.get("pageWithNumber",[v+1]));e.model.execute(new ChangePage(this,u,u,v,!0));k.push(u)}this.updatePageLinks(a,k)}}null!=n&&"mxGraphModel"===
+EditorUi.prototype.createEmbedSvg=function(a,b,d,f,l,g,m){var c=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!d),e=c.getElementsByTagName("a");if(null!=e)for(var k=0;k<e.length;k++){var n=e[k].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==e[k].getAttribute("target")&&e[k].removeAttribute("target")}f&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var q=" ",p="";f&&(q="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.drawHost+"/?client=1&lightbox=1"+(l?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){m('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=p?' style="'+p+'"':"")+q+"/>")}))}else p="",f&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.drawHost+"/?client=1&lightbox=1"+(l?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),p+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),p+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=p&&c.setAttribute("style",p),this.editor.addFontCss(c),this.editor.graph.mathEnabled&&this.editor.addMathCss(c),m(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-
+a)/1E3);var c=Math.floor(a/31536E3);if(1<c)return c+" "+mxResources.get("years");c=Math.floor(a/2592E3);if(1<c)return c+" "+mxResources.get("months");c=Math.floor(a/86400);if(1<c)return c+" "+mxResources.get("days");c=Math.floor(a/3600);if(1<c)return c+" "+mxResources.get("hours");c=Math.floor(a/60);return 1<c?c+" "+mxResources.get("minutes"):1==c?c+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==
+a.nodeName){var d=a.getElementsByTagName("diagram");if(0<d.length){var c=d[0],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=c&&(a=Editor.parseDiagramNode(c))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(g){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){try{var c=this.editor.graph,e=null;if(null!=
+d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,!0),c),e=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),f=c.getGlobalVariable,k=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(c.container);
+c.model.setRoot(k.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==e&&(e=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=d.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"tEXt","mxfile",encodeURIComponent(e));a(f.substring(f.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(E){null!=b&&b(E)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,c.shadowVisible,null,c)}catch(A){null!=
+b&&b(A)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,f,l,g,m){m=b.background;m==mxConstants.NONE&&(m=null);g=b.getSvg(m,null,null,null,null,g);b.shadowVisible&&b.addSvgShadow(g);null!=a&&g.setAttribute("content",a);null!=d&&g.setAttribute("resource",d);if(null!=l)this.convertImages(g,mxUtils.bind(this,function(a){l((f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(f?
+"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(g)};EditorUi.prototype.exportImage=function(a,b,d,f,l,g,m,p,t,u,z){t=null!=t?t:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,
+l?this.getFileData(!0,null,null,null,d,p):null,t,null==this.pages||0==this.pages.length,z)}catch(y){"Invalid image"==y.message?this.downloadFile(t):this.handleError(y)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,f,null,null,g,m,u)}catch(D){this.spinner.stop(),this.handleError(D)}}};EditorUi.prototype.embedCssFonts=function(a,b){function c(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")}
+var d=a.split("url("),e=0;null==this.cachedFonts&&(this.cachedFonts={});var f=mxUtils.bind(this,function(){if(0==e){for(var a=[d[0]],f=1;f<d.length;f++){var k=d[f].indexOf(")");a.push('url("');a.push(this.cachedFonts[c(d[f].substring(0,k))]);a.push('"'+d[f].substring(k))}b(a.join(""))}});if(0<d.length){for(var l=1;l<d.length;l++){var m=d[l].indexOf(")"),t=null,p=d[l].indexOf("format(",m);0<p&&(t=c(d[l].substring(p+7,d[l].indexOf(")",p))));mxUtils.bind(this,function(a){if(null==this.cachedFonts[a]){this.cachedFonts[a]=
+a;e++;var c="application/x-font-ttf";if("svg"==t||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==t||"embedded-opentype"==t||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==t||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==t||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==t||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==t||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&
+!this.editor.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){this.cachedFonts[a]=c;e--;f()}),mxUtils.bind(this,function(a){e--;f()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(d[l].substring(0,m)),t)}f()}else b(a)};EditorUi.prototype.loadFonts=function(a){null!=this.editor.fontCss&&null==this.editor.resolvedFontCss?this.embedCssFonts(this.editor.fontCss,mxUtils.bind(this,function(c){this.editor.resolvedFontCss=c;a()})):a()};EditorUi.prototype.embedExtFonts=
+function(a){var c=this.editor.graph.extFonts;if(null!=c&&0<c.length){var b="",d=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var f=mxUtils.bind(this,function(){0==d&&this.embedCssFonts(b,a)}),g=0;g<c.length;g++){var l=c[g].name,m=c[g].url;0==m.indexOf(Editor.GOOGLE_FONTS)?null==this.cachedGoogleFonts[m]?(d++,this.loadUrl(m,mxUtils.bind(this,function(a){this.cachedGoogleFonts[m]=a;b+=a;d--;f()}),mxUtils.bind(this,function(a){d--;b+="@import url("+m+");";f()}))):b+=this.cachedGoogleFonts[m]:
+b+='@font-face {font-family: "'+l+'";src: url("'+m+'");}'}f()}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,f,l,g,m,p,t,u,z,v,D,y,B){try{g=null!=g?g:!0;m=null!=m?m:!0;v=null!=v?v:this.editor.graph;D=null!=D?D:0;var c=t?null:v.background;c==mxConstants.NONE&&(c=null);null==c&&(c=f);null==c&&0==t&&(c="#ffffff");this.convertImages(v.getSvg(null,null,null,y,null,m,null,null,null,u),mxUtils.bind(this,function(d){var e=new Image;e.onload=mxUtils.bind(this,function(){try{var f=function(){mxClient.IS_SF?
+window.setTimeout(function(){m.drawImage(e,D/p,D/p);a(k)},0):(m.drawImage(e,D/p,D/p),a(k))},k=document.createElement("canvas"),n=parseInt(d.getAttribute("width")),q=parseInt(d.getAttribute("height"));p=null!=p?p:1;null!=b&&(p=g?Math.min(1,Math.min(3*b/(4*q),b/n)):b/n);n=Math.ceil(p*n)+2*D;q=Math.ceil(p*q)+2*D;k.setAttribute("width",n);k.setAttribute("height",q);var m=k.getContext("2d");null!=c&&(m.beginPath(),m.rect(0,0,n,q),m.fillStyle=c,m.fill());m.scale(p,p);if(B){var t=v.view,z=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor)))),
+z="data:image/svg+xml;base64,"+z,x=v.gridSize*t.gridSteps*p,C=v.getGraphBounds(),A=C.x*p,u=C.y*p,y=new Image;y.src=z;y.onload=function(){for(var a=-Math.round(x-mxUtils.mod(t.translate.x*p-A,x)),c=-Math.round(x-mxUtils.mod(t.translate.y*p-u,x));a<n;a+=x)for(var b=c;b<q;b+=x)m.drawImage(y,a/p,b/p);f()}}else f()}catch(la){null!=l&&l(la)}});e.onerror=function(a){null!=l&&l(a)};try{u&&this.editor.graph.addSvgShadow(d);var f=function(a){var c=document.createElement("style");c.setAttribute("type","text/css");
+c.innerHTML=a;d.getElementsByTagName("defs")[0].appendChild(c)},k=mxUtils.bind(this,function(){null!=this.editor.resolvedFontCss&&f(this.editor.resolvedFontCss);e.src=this.createSvgDataUri(mxUtils.getXml(d))});this.embedExtFonts(mxUtils.bind(this,function(a){null!=a&&f(a);this.loadFonts(k)}))}catch(P){null!=l&&l(P)}}),d,z)}catch(J){null!=l&&l(J)}};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,d=this;a.convert=function(c){if(null!=
+c){var e="http://"==c.substring(0,7)||"https://"==c.substring(0,8);e&&!navigator.onLine?c=d.svgBrokenImage.src:!e||c.substring(0,a.baseUrl.length)==a.baseUrl||d.crossOriginImages&&d.editor.isCorsEnabledForUrl(c)?"chrome-extension://"==c.substring(0,19)||mxClient.IS_CHROMEAPP||(c=b.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c)}return c};return a};EditorUi.prototype.convertImages=function(a,b,d,f){null==f&&(f=this.createImageUrlConverter());var c=0,e=d||{};d=mxUtils.bind(this,function(d,
+k){for(var g=a.getElementsByTagName(d),l=0;l<g.length;l++)mxUtils.bind(this,function(d){try{if(null!=d){var g=f.convert(d.getAttribute(k));if(null!=g&&"data:"!=g.substring(0,5)){var l=e[g];null==l?(c++,this.convertImageToDataUri(g,function(f){null!=f&&(e[g]=f,d.setAttribute(k,f));c--;0==c&&b(a)})):d.setAttribute(k,l)}else null!=g&&d.setAttribute(k,g)}}catch(y){}})(g[l])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,f,l,g,m){try{var c=!m&&(f||/(\.png)($|\?)/i.test(a)||
+/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a));l=null!=l?l:!0;var e=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var e=a.getText();if(c){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var e=Array(a.length),f=0;f<a.length;f++)e[f]=String.fromCharCode(a[f]);e=e.join("")}g=null!=g?g:"data:image/png;base64,";
+e=g+this.base64Encode(e)}b(e)}}else null!=d&&d({message:mxResources.get("error")+" "+a.getStatus()},a)}),function(a){null!=d&&d({message:mxResources.get("error")+" "+a.getStatus()})},c,this.timeout,function(){l&&null!=d&&d({code:App.ERROR_TIMEOUT,retry:e})})});e()}catch(E){null!=d&&d(E)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){try{var c=!0,d=window.setTimeout(mxUtils.bind(this,function(){c=
+!1;b(this.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(d);c&&b(this.createSvgDataUri(a.getText()))}),function(){window.clearTimeout(d);c&&b(this.svgBrokenImage.src)});else{var e=new Image,f=this;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(d);if(c)try{var a=document.createElement("canvas"),k=a.getContext("2d");a.height=e.height;a.width=e.width;k.drawImage(e,0,0);b(a.toDataURL())}catch(t){b(f.svgBrokenImage.src)}};
+e.onerror=function(){window.clearTimeout(d);c&&b(f.svgBrokenImage.src)};e.src=a}}catch(x){b(this.svgBrokenImage.src)}};EditorUi.prototype.importXml=function(a,b,d,f,l){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var e=this.editor.graph;if(null!=a&&0<a.length){e.model.beginUpdate();try{var k=mxUtils.parseXml(a),n=this.editor.extractGraphModel(k.documentElement,null!=this.pages);if(null!=n&&"mxfile"==n.nodeName&&null!=this.pages){var m=n.getElementsByTagName("diagram");if(1==m.length)n=Editor.parseDiagramNode(m[0]);
+else if(1<m.length){a={};var k=[],q=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(n=Editor.parseDiagramNode(m[0]),f=!1,q=1);for(;q<m.length;q++){var p=m[q].getAttribute("id");m[q].removeAttribute("id");var u=this.updatePageRoot(new DiagramPage(m[q]));a[p]=m[q].getAttribute("id");var y=this.pages.length;null==u.getName()&&u.setName(mxResources.get("pageWithNumber",[y+1]));e.model.execute(new ChangePage(this,u,u,y,!0));k.push(u)}this.updatePageLinks(a,k)}}null!=n&&"mxGraphModel"===
n.nodeName&&(c=e.importGraphModel(n,b,d,f))}finally{e.model.endUpdate()}}}catch(I){if(l)throw I;this.handleError(I)}return c};EditorUi.prototype.updatePageLinks=function(a,b){for(var c=0;c<b.length;c++)this.updatePageLinksForCell(a,b[c].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var c=document.createElement("div"),d=this.editor.graph,e=d.getLinkForCell(b);null!=e&&d.setLinkForCell(b,this.updatePageLink(a,e));if(d.isHtmlLabel(b)){c.innerHTML=d.getLabel(b);for(var f=c.getElementsByTagName("a"),
l=!1,m=0;m<f.length;m++)e=f[m].getAttribute("href"),null!=e&&(f[m].setAttribute("href",this.updatePageLink(a,e)),l=!0);l&&d.labelChanged(b,c.innerHTML)}for(m=0;m<d.model.getChildCount(b);m++)this.updatePageLinksForCell(a,d.model.getChildAt(b,m))};EditorUi.prototype.updatePageLink=function(a,b){if("data:page/id,"==b.substring(0,13)){var c=a[b.substring(b.indexOf(",")+1)];b=null!=c?"data:page/id,"+c:null}else if("data:action/json,"==b.substring(0,17))try{var d=JSON.parse(b.substring(17));if(null!=d.actions){for(var e=
-0;e<d.actions.length;e++){var f=d.actions[e];null!=f.open&&"data:page/id,"==f.open.substring(0,13)&&(c=a[f.open.substring(f.open.indexOf(",")+1)],null!=c?f.open="data:page/id,"+c:delete f.open)}b="data:action/json,"+JSON.stringify(d)}}catch(y){}return b};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,d,f){f=null!=f?f:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});
-var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var c=this.isRemoteVisioFormat(f);try{var e="UNKNOWN-VISIO",k=f.lastIndexOf(".");0<=k&&k<f.length&&(e=f.substring(k+1).toUpperCase());EditorUi.logEvent({category:e+"-MS-IMPORT-FILE",action:"filename_"+f,label:c?"remote":"local"})}catch(F){}if(c)if(null!=VSD_CONVERT_URL){c=new FormData;c.append("file1",a,f);var l=new XMLHttpRequest;l.open("POST",VSD_CONVERT_URL);l.responseType="blob";this.addRemoteServiceSecurityCheck(l);
-l.onreadystatechange=mxUtils.bind(this,function(){if(4==l.readyState)if(200<=l.status&&299>=l.status)try{var a=l.response;if("text/xml"==a.type){var c=new FileReader;c.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(E){d({message:mxResources.get("errorLoadingFile")})}});c.readAsText(a)}else this.doImportVisio(a,b,d,f)}catch(D){d(D)}else d({})});l.send(c)}else d({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});
-else try{this.doImportVisio(a,b,d,f)}catch(F){d(F)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.importGraphML=function(a,b,d){d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,
+0;e<d.actions.length;e++){var f=d.actions[e];null!=f.open&&"data:page/id,"==f.open.substring(0,13)&&(c=a[f.open.substring(f.open.indexOf(",")+1)],null!=c?f.open="data:page/id,"+c:delete f.open)}b="data:action/json,"+JSON.stringify(d)}}catch(x){}return b};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,d,f){f=null!=f?f:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});
+var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var c=this.isRemoteVisioFormat(f);try{var e="UNKNOWN-VISIO",k=f.lastIndexOf(".");0<=k&&k<f.length&&(e=f.substring(k+1).toUpperCase());EditorUi.logEvent({category:e+"-MS-IMPORT-FILE",action:"filename_"+f,label:c?"remote":"local"})}catch(E){}if(c)if(null!=VSD_CONVERT_URL){c=new FormData;c.append("file1",a,f);var l=new XMLHttpRequest;l.open("POST",VSD_CONVERT_URL);l.responseType="blob";this.addRemoteServiceSecurityCheck(l);
+l.onreadystatechange=mxUtils.bind(this,function(){if(4==l.readyState)if(200<=l.status&&299>=l.status)try{var a=l.response;if("text/xml"==a.type){var c=new FileReader;c.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(D){d({message:mxResources.get("errorLoadingFile")})}});c.readAsText(a)}else this.doImportVisio(a,b,d,f)}catch(G){d(G)}else d({})});l.send(c)}else d({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});
+else try{this.doImportVisio(a,b,d,f)}catch(E){d(E)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.importGraphML=function(a,b,d){d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,
b,d)}catch(n){d(n)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||this.handleError({message:mxResources.get("unknownError")})}catch(e){this.handleError(e)}else this.spinner.stop(),
this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,d){var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(n){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(n){null!=
window.console&&console.error(n),d(n)}}else d({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(c,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",c):mxscript("js/extensions.min.js",c))};EditorUi.prototype.generatePlantUmlImage=function(a,b,d,f){function c(a,c,b){c1=a>>2;c2=(a&3)<<4|c>>4;c3=(c&15)<<2|b>>6;c4=b&63;r="";r+=e(c1&63);r+=e(c2&63);r+=e(c3&
@@ -3176,19 +3179,19 @@ z=a.indexOf(";"),0<z&&(a=a.substring(0,z)+a.substring(a.indexOf(",",z+1))),u&&b.
this.isRemoteFileFormat(a,m)?(c=!0,this.parseFile(null!=t?t:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?k(a.responseText):null!=p&&p(null))}),m)):0==a.indexOf("PK")&&null!=t?(c=!0,this.importZipFile(t,k,mxUtils.bind(this,function(){e=this.insertTextAt(this.validateFileData(a),d,f,!0,null,u);p(e)}))):/(\.v(sd|dx))($|\?)/i.test(m)||/(\.vs(s|x))($|\?)/i.test(m)||(e=this.insertTextAt(this.validateFileData(a),d,f,!0,null,
u));c||null==p||p(e);return e};EditorUi.prototype.base64Encode=function(a){for(var c="",b=0,d=a.length,f,g,l;b<d;){f=a.charCodeAt(b++)&255;if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4);c+="==";break}g=a.charCodeAt(b++);if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&
3)<<4|(g&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2);c+="=";break}l=a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(g&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2|(l&192)>>6);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l&63)}return c};
-EditorUi.prototype.importFiles=function(a,b,d,f,l,g,m,p,t,u,z,x){b=null!=b?b:0;d=null!=d?d:0;f=null!=f?f:this.maxImageSize;u=null!=u?u:this.maxImageBytes;var c=null!=b&&null!=d,e=!0,k=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=z||this.resampleThreshold,q=0;q<a.length;q++)if("image/"==a[q].type.substring(0,6)&&a[q].size>n){k=!0;break}var y=mxUtils.bind(this,function(){var k=this.editor.graph,n=k.gridSize;l=null!=l?l:mxUtils.bind(this,function(a,b,d,e,f,g,k,l,n){return null!=a&&"<mxlibrary"==a.substring(0,
-10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,d,e,f,g,k,l,n,c,x)});g=null!=g?g:mxUtils.bind(this,function(a){k.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var t=a.length,q=t,y=[],v=mxUtils.bind(this,function(a,c){y[a]=c;if(0==--q){this.spinner.stop();if(null!=p)p(y);else{var b=[];k.getModel().beginUpdate();try{for(var d=0;d<y.length;d++){var e=y[d]();null!=e&&(b=b.concat(e))}}finally{k.getModel().endUpdate()}}g(b)}}),
-A=0;A<t;A++)mxUtils.bind(this,function(c){var g=a[c];if(null!=g){var t=new FileReader;t.onload=mxUtils.bind(this,function(a){if(null==m||m(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var t=a.target.result,p=t.indexOf(","),q=decodeURIComponent(escape(atob(t.substring(p+1)))),y=mxUtils.parseXml(q),q=y.getElementsByTagName("svg");if(0<q.length){var q=q[0],C=x?null:q.getAttribute("content");null!=C&&"<"!=C.charAt(0)&&"%"!=C.charAt(0)&&(C=unescape(window.atob?atob(C):Base64.decode(C,
-!0)));null!=C&&"%"==C.charAt(0)&&(C=decodeURIComponent(C));null==C||"<mxfile "!==C.substring(0,8)&&"<mxGraphModel "!==C.substring(0,14)?v(c,mxUtils.bind(this,function(){try{if(t.substring(0,p+1),null!=y){var a=y.getElementsByTagName("svg");if(0<a.length){var e=a[0],m=e.getAttribute("width"),q=e.getAttribute("height"),m=null!=m&&"%"!=m.charAt(m.length-1)?parseFloat(m):NaN,q=null!=q&&"%"!=q.charAt(q.length-1)?parseFloat(q):NaN,z=e.getAttribute("viewBox");if(null==z||0==z.length)e.setAttribute("viewBox",
-"0 0 "+m+" "+q);else if(isNaN(m)||isNaN(q)){var C=z.split(" ");3<C.length&&(m=parseFloat(C[2]),q=parseFloat(C[3]))}t=this.createSvgDataUri(mxUtils.getXml(e));var u=Math.min(1,Math.min(f/Math.max(1,m)),f/Math.max(1,q)),v=l(t,g.type,b+c*n,d+c*n,Math.max(1,Math.round(m*u)),Math.max(1,Math.round(q*u)),g.name);if(isNaN(m)||isNaN(q)){var A=new Image;A.onload=mxUtils.bind(this,function(){m=Math.max(1,A.width);q=Math.max(1,A.height);v[0].geometry.width=m;v[0].geometry.height=q;e.setAttribute("viewBox","0 0 "+
-m+" "+q);t=this.createSvgDataUri(mxUtils.getXml(e));var a=t.indexOf(";");0<a&&(t=t.substring(0,a)+t.substring(t.indexOf(",",a+1)));k.setCellStyles("image",t,[v[0]])});A.src=this.createSvgDataUri(mxUtils.getXml(e))}return v}}}catch(ca){}return null})):v(c,mxUtils.bind(this,function(){return l(C,"text/xml",b+c*n,d+c*n,0,0,g.name)}))}else v(c,mxUtils.bind(this,function(){return null}))}else{q=!1;if("image/png"==g.type){var A=x?null:this.extractGraphModelFromPng(a.target.result);if(null!=A&&0<A.length){var E=
-new Image;E.src=a.target.result;v(c,mxUtils.bind(this,function(){return l(A,"text/xml",b+c*n,d+c*n,E.width,E.height,g.name)}));q=!0}}q||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(k){this.resizeImage(k,a.target.result,
-mxUtils.bind(this,function(k,m,t){v(c,mxUtils.bind(this,function(){if(null!=k&&k.length<u){var q=e&&this.isResampleImage(a.target.result,z)?Math.min(1,Math.min(f/m,f/t)):1;return l(k,g.type,b+c*n,d+c*n,Math.round(m*q),Math.round(t*q),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),e,f,z)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else l(a.target.result,g.type,b+c*n,d+c*n,240,160,g.name,function(a){v(c,
-function(){return a})},g)});/(\.v(dx|sdx?))($|\?)/i.test(g.name)||/(\.vs(x|sx?))($|\?)/i.test(g.name)?l(null,g.type,b+c*n,d+c*n,240,160,g.name,function(a){v(c,function(){return a})},g):"image"==g.type.substring(0,5)?t.readAsDataURL(g):t.readAsText(g)}})(A)});if(k){k=[];for(q=0;q<a.length;q++)k.push(a[q]);a=k;this.confirmImageResize(function(a){e=a;y()},t)}else y()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():
+EditorUi.prototype.importFiles=function(a,b,d,f,l,g,m,p,t,u,z,v){b=null!=b?b:0;d=null!=d?d:0;f=null!=f?f:this.maxImageSize;u=null!=u?u:this.maxImageBytes;var c=null!=b&&null!=d,e=!0,k=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=z||this.resampleThreshold,q=0;q<a.length;q++)if("image/"==a[q].type.substring(0,6)&&a[q].size>n){k=!0;break}var x=mxUtils.bind(this,function(){var k=this.editor.graph,n=k.gridSize;l=null!=l?l:mxUtils.bind(this,function(a,b,d,e,f,k,g,l,n){return null!=a&&"<mxlibrary"==a.substring(0,
+10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,d,e,f,k,g,l,n,c,v)});g=null!=g?g:mxUtils.bind(this,function(a){k.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=a.length,t=q,x=[],y=mxUtils.bind(this,function(a,b){x[a]=b;if(0==--t){this.spinner.stop();if(null!=p)p(x);else{var c=[];k.getModel().beginUpdate();try{for(var d=0;d<x.length;d++){var e=x[d]();null!=e&&(c=c.concat(e))}}finally{k.getModel().endUpdate()}}g(c)}}),
+A=0;A<q;A++)mxUtils.bind(this,function(c){var g=a[c];if(null!=g){var q=new FileReader;q.onload=mxUtils.bind(this,function(a){if(null==m||m(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var q=a.target.result,t=q.indexOf(","),p=decodeURIComponent(escape(atob(q.substring(t+1)))),x=mxUtils.parseXml(p),p=x.getElementsByTagName("svg");if(0<p.length){var p=p[0],C=v?null:p.getAttribute("content");null!=C&&"<"!=C.charAt(0)&&"%"!=C.charAt(0)&&(C=unescape(window.atob?atob(C):Base64.decode(C,
+!0)));null!=C&&"%"==C.charAt(0)&&(C=decodeURIComponent(C));null==C||"<mxfile "!==C.substring(0,8)&&"<mxGraphModel "!==C.substring(0,14)?y(c,mxUtils.bind(this,function(){try{if(q.substring(0,t+1),null!=x){var a=x.getElementsByTagName("svg");if(0<a.length){var e=a[0],m=e.getAttribute("width"),p=e.getAttribute("height"),m=null!=m&&"%"!=m.charAt(m.length-1)?parseFloat(m):NaN,p=null!=p&&"%"!=p.charAt(p.length-1)?parseFloat(p):NaN,z=e.getAttribute("viewBox");if(null==z||0==z.length)e.setAttribute("viewBox",
+"0 0 "+m+" "+p);else if(isNaN(m)||isNaN(p)){var C=z.split(" ");3<C.length&&(m=parseFloat(C[2]),p=parseFloat(C[3]))}q=this.createSvgDataUri(mxUtils.getXml(e));var u=Math.min(1,Math.min(f/Math.max(1,m)),f/Math.max(1,p)),y=l(q,g.type,b+c*n,d+c*n,Math.max(1,Math.round(m*u)),Math.max(1,Math.round(p*u)),g.name);if(isNaN(m)||isNaN(p)){var A=new Image;A.onload=mxUtils.bind(this,function(){m=Math.max(1,A.width);p=Math.max(1,A.height);y[0].geometry.width=m;y[0].geometry.height=p;e.setAttribute("viewBox","0 0 "+
+m+" "+p);q=this.createSvgDataUri(mxUtils.getXml(e));var a=q.indexOf(";");0<a&&(q=q.substring(0,a)+q.substring(q.indexOf(",",a+1)));k.setCellStyles("image",q,[y[0]])});A.src=this.createSvgDataUri(mxUtils.getXml(e))}return y}}}catch(ca){}return null})):y(c,mxUtils.bind(this,function(){return l(C,"text/xml",b+c*n,d+c*n,0,0,g.name)}))}else y(c,mxUtils.bind(this,function(){return null}))}else{p=!1;if("image/png"==g.type){var A=v?null:this.extractGraphModelFromPng(a.target.result);if(null!=A&&0<A.length){var D=
+new Image;D.src=a.target.result;y(c,mxUtils.bind(this,function(){return l(A,"text/xml",b+c*n,d+c*n,D.width,D.height,g.name)}));p=!0}}p||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(k){this.resizeImage(k,a.target.result,
+mxUtils.bind(this,function(k,m,q){y(c,mxUtils.bind(this,function(){if(null!=k&&k.length<u){var p=e&&this.isResampleImage(a.target.result,z)?Math.min(1,Math.min(f/m,f/q)):1;return l(k,g.type,b+c*n,d+c*n,Math.round(m*p),Math.round(q*p),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),e,f,z)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else l(a.target.result,g.type,b+c*n,d+c*n,240,160,g.name,function(a){y(c,
+function(){return a})},g)});/(\.v(dx|sdx?))($|\?)/i.test(g.name)||/(\.vs(x|sx?))($|\?)/i.test(g.name)?l(null,g.type,b+c*n,d+c*n,240,160,g.name,function(a){y(c,function(){return a})},g):"image"==g.type.substring(0,5)?q.readAsDataURL(g):q.readAsText(g)}})(A)});if(k){k=[];for(q=0;q<a.length;q++)k.push(a[q]);a=k;this.confirmImageResize(function(a){e=a;x()},t)}else x()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():
function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(d,e){if(d||b)mxSettings.setResizeImages(d?e:null),mxSettings.save();c();a(e)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){e(a,!0)},function(a){e(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,
340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,d)};EditorUi.prototype.parseFile=function(a,b,d){d=null!=d?d:a.name;var c=new FormData;c.append("format","xml");c.append("upfile",a,d);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(c);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(g){}};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=
-function(a,b,d,f,l,g){l=null!=l?l:this.maxImageSize;var c=Math.max(1,a.width),e=Math.max(1,a.height);if(f&&this.isResampleImage(b,g))try{var k=Math.max(c/l,e/l);if(1<k){var n=Math.round(c/k),m=Math.round(e/k),p=document.createElement("canvas");p.width=n;p.height=m;p.getContext("2d").drawImage(a,0,0,n,m);var q=p.toDataURL();if(q.length<b.length){var u=document.createElement("canvas");u.width=n;u.height=m;var x=u.toDataURL();q!==x&&(b=q,c=n,e=m)}}}catch(V){}d(b,c,e)};EditorUi.prototype.crcTable=[];
-for(var d=0;256>d;d++)for(var l=d,m=0;8>m;m++)l=1==(l&1)?3988292384^l>>>1:l>>>1,EditorUi.prototype.crcTable[d]=l;EditorUi.prototype.updateCRC=function(a,b,d,f){for(var c=0;c<f;c++)a=EditorUi.prototype.crcTable[(a^b.charCodeAt(d+c))&255]^a>>>8;return a};EditorUi.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var c=-1,b=0;b<a.length;b++)c=c>>>8^this.crcTable[(c^a.charCodeAt(b))&255];return(c^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,f,l){function c(a,
+function(a,b,d,f,l,g){l=null!=l?l:this.maxImageSize;var c=Math.max(1,a.width),e=Math.max(1,a.height);if(f&&this.isResampleImage(b,g))try{var k=Math.max(c/l,e/l);if(1<k){var n=Math.round(c/k),m=Math.round(e/k),p=document.createElement("canvas");p.width=n;p.height=m;p.getContext("2d").drawImage(a,0,0,n,m);var q=p.toDataURL();if(q.length<b.length){var u=document.createElement("canvas");u.width=n;u.height=m;var v=u.toDataURL();q!==v&&(b=q,c=n,e=m)}}}catch(O){}d(b,c,e)};EditorUi.prototype.crcTable=[];
+for(var d=0;256>d;d++)for(var l=d,m=0;8>m;m++)l=1==(l&1)?3988292384^l>>>1:l>>>1,EditorUi.prototype.crcTable[d]=l;EditorUi.prototype.updateCRC=function(a,b,d,f){for(var c=0;c<f;c++)a=EditorUi.prototype.crcTable[(a^b.charCodeAt(d+c))&255]^a>>>8;return a};EditorUi.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var b=-1,c=0;c<a.length;c++)b=b>>>8^this.crcTable[(b^a.charCodeAt(c))&255];return(b^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,f,l){function c(a,
b){var c=n;n+=b;return a.substring(c,n)}function e(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function k(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var n=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=l&&l();else if(c(a,4),"IHDR"!=c(a,4))null!=l&&l();else{c(a,17);l=a.substring(0,n);do{var m=e(a);if("IDAT"==c(a,
4)){l=a.substring(0,n-8);"pHYs"==b&&"dpi"==d?(d=Math.round(f/.0254),d=k(d)+k(d)+String.fromCharCode(1)):d=d+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+f;f=4294967295;f=this.updateCRC(f,b,0,4);f=this.updateCRC(f,d,0,d.length);l+=k(d.length)+b+d+k(f^4294967295);l+=a.substring(n-8,a.length);break}l+=a.substring(n-8,n-4+m);c(a,m);c(a,4)}while(m);return"data:image/png;base64,"+(window.btoa?btoa(l):Base64.encode(l,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};
EditorUi.prototype.loadImage=function(a,b,d){try{var c=new Image;c.onload=function(){b(c)};null!=d&&(c.onerror=d);c.src=a}catch(n){if(null!=d)d(n);else throw n;}};var p=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph,d=b.cellEditor.startEditing;b.cellEditor.startEditing=function(c,e){var f=this.graph.getAttributeForCell(c,
@@ -3198,25 +3201,25 @@ this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.pl
b.addClickHandler=function(a,c,d){var e=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&mxEvent.consume(a);null!=e&&e(a,c)};g.call(this,a,c,d)};p.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,
360,null!=a.pages&&1<a.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var m=b.getExportVariables;b.getExportVariables=function(){var b=m.apply(this,arguments);b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};var u=b.getGlobalVariable;b.getGlobalVariable=function(b){return"page"==b&&null!=a.currentPage?a.currentPage.getName():
"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==b?null!=a.pages?a.pages.length:1:u.apply(this,arguments)};var t=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var e=c.getAttribute("href");if(null==e||!b.isCustomLink(e)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))t.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(e),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=
-function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var x=this.actions.get("print");x.setEnabled(!mxClient.IS_IOS||!navigator.standalone);x.visible=x.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",
+function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var v=this.actions.get("print");v.setEnabled(!mxClient.IS_IOS||!navigator.standalone);v.visible=v.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",
!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize"),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,
function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<
a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,
a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();
-a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(x=this.editor.graph.view,x.setUnit(mxSettings.getUnit()),x.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,x.unit),this.refresh());if("1"==urlParams.styledev){x=document.getElementById("geFooter");
-null!=x&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),x.appendChild(this.styleInput),
-this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var z=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:z.apply(this,arguments)}}x=document.getElementById("geInfo");
-null!=x&&x.parentNode.removeChild(x);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var D=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=D&&(D.parentNode.removeChild(D),D=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==D&&(!mxClient.IS_IE||10<document.documentMode)&&(D=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();
-a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=D&&(D.parentNode.removeChild(D),D=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,e=b.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(a)&&(g=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var k=
+a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(v=this.editor.graph.view,v.setUnit(mxSettings.getUnit()),v.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,v.unit),this.refresh());if("1"==urlParams.styledev){v=document.getElementById("geFooter");
+null!=v&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),v.appendChild(this.styleInput),
+this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var z=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:z.apply(this,arguments)}}v=document.getElementById("geInfo");
+null!=v&&v.parentNode.removeChild(v);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var B=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=B&&(B.parentNode.removeChild(B),B=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==B&&(!mxClient.IS_IE||10<document.documentMode)&&(B=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();
+a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=B&&(B.parentNode.removeChild(B),B=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,e=b.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(a)&&(g=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var k=
0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var l=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=l;var n=null,d=c.getElementsByTagName("img");null!=d&&1==d.length?(l=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)||(n=
-!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(l=c[0].getAttribute("href")));var m=!0,t=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(l,f,g,!0,n,null,m))});n&&l.length>this.resampleThreshold?this.confirmImageResize(function(a){m=a;t()},mxEvent.isControlDown(a)):t()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,
+!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(l=c[0].getAttribute("href")));var m=!0,p=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(l,f,g,!0,n,null,m))});n&&l.length>this.resampleThreshold?this.confirmImageResize(function(a){m=a;p()},mxEvent.isControlDown(a)):p()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,
Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",f,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(k,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();
"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b))try{for(var c=b.clipboardData||b.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var l=f[index];if("file"===l.kind){if(a.isEditing())this.importFiles([l.getAsFile()],
0,0,this.maxImageSize,function(b,c,d,e,f,g){a.insertImage(b,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var m=this.editor.graph.getInsertPoint();this.importFiles([l.getAsFile()],m.x,m.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(t){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){d.innerHTML="&nbsp;";d.focus();document.execCommand("selectAll",!1,null)},
0)}var b=this.editor.graph,d=document.createElement("div");d.setAttribute("autocomplete","off");d.setAttribute("autocorrect","off");d.setAttribute("autocapitalize","off");d.setAttribute("spellcheck","false");d.style.textRendering="optimizeSpeed";d.style.fontFamily="monospace";d.style.wordBreak="break-all";d.style.background="transparent";d.style.color="transparent";d.style.position="absolute";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.display="block";d.style.fontSize="1";d.style.zIndex=
"-1";d.style.resize="none";d.style.outline="none";d.style.width="1px";d.style.height="1px";mxUtils.setOpacity(d,0);d.contentEditable=!0;d.innerHTML="&nbsp;";var f=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||b.isEditing()||null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||
!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||f||(d.style.left=b.container.scrollLeft+10+"px",d.style.top=b.container.scrollTop+10+"px",b.container.appendChild(d),f=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){d.focus();document.execCommand("selectAll",!1,null)},0):(d.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var c=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!f||
-224!=c&&17!=c&&91!=c||(f=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),d.parentNode.removeChild(d),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(d,"copy",mxUtils.bind(this,function(c){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(d),a()}catch(y){this.handleError(y)}}));mxEvent.addListener(d,"cut",mxUtils.bind(this,function(c){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(d,!0),a()}catch(y){this.handleError(y)}}));mxEvent.addListener(d,
+224!=c&&17!=c&&91!=c||(f=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),d.parentNode.removeChild(d),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(d,"copy",mxUtils.bind(this,function(c){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(d),a()}catch(x){this.handleError(x)}}));mxEvent.addListener(d,"cut",mxUtils.bind(this,function(c){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(d,!0),a()}catch(x){this.handleError(x)}}));mxEvent.addListener(d,
"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&((new Date).getTime(),d.innerHTML="&nbsp;",d.focus(),null!=a.clipboardData&&this.pasteCells(a,d,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,d,!1)}),0))}),!0);var l=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==d?!0:l.apply(this,arguments)}};EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,
arguments);if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");0<c&&(b=this.getPageById(a.substring(c+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");if(a=this.getPageById(a.substring(b+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(a)};
EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(a){a.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(c){}this.fireEvent(new mxEventObject("styleChanged",
@@ -3225,9 +3228,9 @@ mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();thi
mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),
mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=mxUtils.getXml(c.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",
!1,null)}};EditorUi.prototype.pasteCells=function(a,b,d){if(!mxEvent.isConsumed(a)){var c=b;d&&null!=a.clipboardData&&(c=document.createElement("div"),c.innerHTML=a.clipboardData.getData("text/html"));var e=c.getElementsByTagName("span");if(null!=e&&0<e.length&&"application/vnd.lucid.chart.objects"===e[0].getAttribute("data-lucid-type")){var f=e[0].getAttribute("data-lucid-content");null!=f&&0<f.length&&(this.convertLucidChart(f,mxUtils.bind(this,function(a){var b=this.editor.graph;b.lastPasteXml==
-a?b.pasteCounter++:(b.lastPasteXml=a,b.pasteCounter=0);var c=b.pasteCounter*b.gridSize;b.setSelectionCells(this.importXml(a,c,c));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a))}else{var f=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(c):c.textContent),k=!1;try{var l=f.lastIndexOf("%3E");0<=l&&l<f.length-3&&(f=f.substring(0,l+3))}catch(F){}try{var e=c.getElementsByTagName("span"),m=null!=e&&0<
-e.length?mxUtils.trim(decodeURIComponent(e[0].textContent)):decodeURIComponent(f);this.isCompatibleString(m)&&(k=!0,f=m)}catch(F){}c=this.editor.graph;if(null!=f&&0<f.length){if(c.lastPasteXml==f?c.pasteCounter++:(c.lastPasteXml=f,c.pasteCounter=0),d=c.pasteCounter*c.gridSize,k||this.isCompatibleString(f)?c.setSelectionCells(this.importXml(f,d,d)):(k=c.getInsertPoint(),c.isMouseInsertPoint()&&(d=0,c.lastPasteXml==f&&0<c.pasteCounter&&c.pasteCounter--),c.setSelectionCells(this.insertTextAt(f,k.x+d,
-k.y+d,!0))),!c.isSelectionEmpty()){c.scrollCellToVisible(c.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(c.view.getState(c.getSelectionCell()));try{mxEvent.consume(a)}catch(F){}}}else d||(c.lastPasteXml=null,c.pasteCounter=0)}}b.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),
+a?b.pasteCounter++:(b.lastPasteXml=a,b.pasteCounter=0);var c=b.pasteCounter*b.gridSize;b.setSelectionCells(this.importXml(a,c,c));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a))}else{var f=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(c):c.textContent),k=!1;try{var l=f.lastIndexOf("%3E");0<=l&&l<f.length-3&&(f=f.substring(0,l+3))}catch(E){}try{var e=c.getElementsByTagName("span"),m=null!=e&&0<
+e.length?mxUtils.trim(decodeURIComponent(e[0].textContent)):decodeURIComponent(f);this.isCompatibleString(m)&&(k=!0,f=m)}catch(E){}c=this.editor.graph;if(null!=f&&0<f.length){if(c.lastPasteXml==f?c.pasteCounter++:(c.lastPasteXml=f,c.pasteCounter=0),d=c.pasteCounter*c.gridSize,k||this.isCompatibleString(f)?c.setSelectionCells(this.importXml(f,d,d)):(k=c.getInsertPoint(),c.isMouseInsertPoint()&&(d=0,c.lastPasteXml==f&&0<c.pasteCounter&&c.pasteCounter--),c.setSelectionCells(this.insertTextAt(f,k.x+d,
+k.y+d,!0))),!c.isSelectionEmpty()){c.scrollCellToVisible(c.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(c.view.getState(c.getSelectionCell()));try{mxEvent.consume(a)}catch(E){}}}else d||(c.lastPasteXml=null,c.pasteCounter=0)}}b.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),
mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?
this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?
d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,
@@ -3237,8 +3240,8 @@ this.editor.graph.container.appendChild(g):document.body.appendChild(g);return g
0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{var d=c.target.result,e=a.name;if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)&&(e=e.substring(0,e.length-4)+".drawio");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":e+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,
b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b)});if(/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,
e))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?f(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,e,b)}),mxUtils.bind(this,function(a){this.spinner.stop();
-this.handleError(a)}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(F){this.handleError(F,mxResources.get("errorLoadingFile"))}}else 0==d.indexOf("PK")?this.importZipFile(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,
-e,b)})):("image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,e,b))}}catch(F){this.handleError(F)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,d){var c=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=
+this.handleError(a)}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}}else 0==d.indexOf("PK")?this.importZipFile(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,
+e,b)})):("image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,e,b))}}catch(E){this.handleError(E)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,d){var c=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=
null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,d))});if(null!=a&&0<a.length)null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),
mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),
this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],d;for(d in a)b.push(d);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,e=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),
@@ -3253,38 +3256,38 @@ g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"
[g.name||this.defaultFilename]),n,mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),
"*")}):null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{m.init()}catch(W){l.postMessage(JSON.stringify({event:"draft",error:W.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var p=1==g.enableRecent,q=1==g.enableSearch,u=1==g.enableCustomTemp,m=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=g.callback?l.postMessage(JSON.stringify({event:"template",
xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,e,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,q?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,b,c){l.postMessage(JSON.stringify({event:"template",
-docUrl:a,info:b,name:c}),"*")}),null,null,u?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(m.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("textContent"==g.action){var y=this.getDiagramTextContent();l.postMessage(JSON.stringify({event:"textContent",data:y,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):
-null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var x=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,x):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var A=null!=g.xml?
-g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var C=this.editor.graph,B=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(A);l.postMessage(JSON.stringify(b),"*")}),N=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=this.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(A)));C!=this.editor.graph&&C.container.parentNode.removeChild(C.container);
-B(a)}),R=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=R){for(var ba=C.getGlobalVariable,C=this.createTemporaryGraph(C.getStylesheet()),Y,G=0;G<this.pages.length;G++)if(this.pages[G].getId()==R){Y=this.updatePageRoot(this.pages[G]);break}C.getGlobalVariable=function(a){return"page"==a?Y.getName():"pagenumber"==a?1:ba.apply(this,arguments)};document.body.appendChild(C.container);C.model.setRoot(Y.root)}if(null!=g.layerIds){for(var aa=
-C.model,ea=aa.getChildCells(aa.getRoot()),m={},G=0;G<g.layerIds.length;G++)m[g.layerIds[G]]=!0;for(G=0;G<ea.length;G++)aa.setVisible(ea[G],m[ea[G].id]||!1)}this.exportToCanvas(mxUtils.bind(this,function(a){N(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){N(null)}),null,null,g.scale,null,null,null,C)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=R?"&pageId="+R:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):
-"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(A))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?B("data:image/png;base64,"+a.getText()):N(null)}),mxUtils.bind(this,function(){N(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);x=this.createLoadMessage("export");if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var fa=this.getXmlFileData();x.xml=mxUtils.getXml(fa);x.data=
-this.getFileData(null,null,!0,null,null,null,fa);x.format=g.format}else if("html"==g.format)A=this.editor.getGraphXml(),x.data=this.getHtml(A,this.editor.graph),x.xml=mxUtils.getXml(A),x.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var O=this.editor.graph.background;O==mxConstants.NONE&&(O=null);x.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);x.format="svg";if(g.embedImages||null==g.embedImages){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,
-null!=g.spinKey?mxResources.get(g.spinKey):g.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==g.format?this.getEmbeddedSvg(x.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();x.data=this.createSvgDataUri(a);l.postMessage(JSON.stringify(x),"*")})):this.convertImages(this.editor.graph.getSvg(O),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();x.data=this.createSvgDataUri(mxUtils.getXml(a));l.postMessage(JSON.stringify(x),
-"*")}));return}var ha="xmlsvg"==g.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(O));x.data=this.createSvgDataUri(ha)}l.postMessage(JSON.stringify(x),"*")}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.title&&null!=this.buttonContainer&&(n=document.createElement("span"),
+docUrl:a,info:b,name:c}),"*")}),null,null,u?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(m.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("textContent"==g.action){var x=this.getDiagramTextContent();l.postMessage(JSON.stringify({event:"textContent",data:x,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):
+null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var v=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,v):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var A=null!=g.xml?
+g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var C=this.editor.graph,B=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(A);l.postMessage(JSON.stringify(b),"*")}),P=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=this.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(A)));C!=this.editor.graph&&C.container.parentNode.removeChild(C.container);
+B(a)}),T=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=T){for(var ba=C.getGlobalVariable,C=this.createTemporaryGraph(C.getStylesheet()),Y,F=0;F<this.pages.length;F++)if(this.pages[F].getId()==T){Y=this.updatePageRoot(this.pages[F]);break}C.getGlobalVariable=function(a){return"page"==a?Y.getName():"pagenumber"==a?1:ba.apply(this,arguments)};document.body.appendChild(C.container);C.model.setRoot(Y.root)}if(null!=g.layerIds){for(var aa=
+C.model,ea=aa.getChildCells(aa.getRoot()),m={},F=0;F<g.layerIds.length;F++)m[g.layerIds[F]]=!0;for(F=0;F<ea.length;F++)aa.setVisible(ea[F],m[ea[F].id]||!1)}this.exportToCanvas(mxUtils.bind(this,function(a){P(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){P(null)}),null,null,g.scale,null,null,null,C)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=T?"&pageId="+T:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):
+"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(A))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?B("data:image/png;base64,"+a.getText()):P(null)}),mxUtils.bind(this,function(){P(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);v=this.createLoadMessage("export");if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var fa=this.getXmlFileData();v.xml=mxUtils.getXml(fa);v.data=
+this.getFileData(null,null,!0,null,null,null,fa);v.format=g.format}else if("html"==g.format)A=this.editor.getGraphXml(),v.data=this.getHtml(A,this.editor.graph),v.xml=mxUtils.getXml(A),v.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var Q=this.editor.graph.background;Q==mxConstants.NONE&&(Q=null);v.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);v.format="svg";if(g.embedImages||null==g.embedImages){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,
+null!=g.spinKey?mxResources.get(g.spinKey):g.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==g.format?this.getEmbeddedSvg(v.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();v.data=this.createSvgDataUri(a);l.postMessage(JSON.stringify(v),"*")})):this.convertImages(this.editor.graph.getSvg(Q),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();v.data=this.createSvgDataUri(mxUtils.getXml(a));l.postMessage(JSON.stringify(v),
+"*")}));return}var ha="xmlsvg"==g.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(Q));v.data=this.createSvgDataUri(ha)}l.postMessage(JSON.stringify(v),"*")}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.title&&null!=this.buttonContainer&&(n=document.createElement("span"),
mxUtils.write(n,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(n),this.embedFilenameSpan=n),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):
-g.xml;else{"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(l):"remoteInvoke"==g.action?this.handleRemoteInvoke(g):"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):l.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}catch(W){this.handleError(W)}}var T=mxUtils.bind(this,function(e,g){c=!0;try{a(e,g)}catch(X){this.handleError(X)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var k=mxUtils.bind(this,function(){return"0"!=urlParams.pages||
+g.xml;else{"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(l):"remoteInvoke"==g.action?this.handleRemoteInvoke(g):"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):l.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}catch(W){this.handleError(W)}}var V=mxUtils.bind(this,function(e,g){c=!0;try{a(e,g)}catch(X){this.handleError(X)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var k=mxUtils.bind(this,function(){return"0"!=urlParams.pages||
null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});f=k();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=k();if(d!=f&&!c){var e=this.createLoadMessage("autosave");e.xml=d;d=JSON.stringify(e);(window.opener||window.parent).postMessage(d,"*")}f=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",
b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||l.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")});null!=g&&"function"===typeof g.substring&&
-"data:application/vnd.visio;base64,"==g.substring(0,34)?(k="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){T(a,e)},mxUtils.bind(this,function(a){this.handleError(a)}),k)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&
-299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&T(a.responseText,e)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){T(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=k(g),T(g,e))}}));var l=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";l.postMessage(g,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=
+"data:application/vnd.visio;base64,"==g.substring(0,34)?(k="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){V(a,e)},mxUtils.bind(this,function(a){this.handleError(a)}),k)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&
+299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&V(a.responseText,e)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){V(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=k(g),V(g,e))}}));var l=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";l.postMessage(g,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=
document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"0px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");b.className="geBigButton";"1"==urlParams.noSaveBtn?(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)):
(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,
function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className="geBigButton geBigStandardButton";b.style.marginLeft="6px";b.style.marginRight="20px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?
"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://about.draw.io/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=
-function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](c);if(null!=a[e].config)for(var l in a[e].config)f[l]=a[e].config[l];this.executeLayout(function(){f.execute(c.getDefaultParent(),0==d.length?null:d)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],e=[],f={};if(0<c.length){var l={},m=null,p=null,u=null,z=null,x=null,B=null,v=null,I=null,V="",J="auto",Q="auto",C=null,K=null,N=40,R=40,ba=100,
-Y=0,G=this.editor.graph;G.getGraphBounds();for(var aa=function(){null!=b?b(ka):(G.setSelectionCells(ka),G.scrollCellToVisible(G.getSelectionCell()))},ea=G.getFreeInsertPoint(),fa=ea.x,O=ea.y,ea=O,ha=null,T="auto",I=null,W=[],la=null,ma=null,X=0;X<c.length&&"#"==c[X].charAt(0);){a=c[X];for(X++;X<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[X].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[X].substring(1)),X++;if("#"!=a.charAt(1)){var ia=a.indexOf(":");if(0<ia){var M=mxUtils.trim(a.substring(1,
-ia)),L=mxUtils.trim(a.substring(ia+1));"label"==M?ha=G.sanitizeHtml(L):"labelname"==M&&0<L.length&&"-"!=L?z=L:"labels"==M&&0<L.length&&"-"!=L?x=JSON.parse(L):"style"==M?m=L:"parentstyle"==M?B=L:"stylename"==M&&0<L.length&&"-"!=L?u=L:"styles"==M&&0<L.length&&"-"!=L?p=JSON.parse(L):"identity"==M&&0<L.length&&"-"!=L?v=L:"parent"==M&&0<L.length&&"-"!=L?I=L:"namespace"==M&&0<L.length&&"-"!=L?V=L:"width"==M?J=L:"height"==M?Q=L:"left"==M&&0<L.length?C=L:"top"==M&&0<L.length?K=L:"ignore"==M?ma=L.split(","):
-"connect"==M?W.push(JSON.parse(L)):"link"==M?la=L:"padding"==M?Y=parseFloat(L):"edgespacing"==M?N=parseFloat(L):"nodespacing"==M?R=parseFloat(L):"levelspacing"==M?ba=parseFloat(L):"layout"==M&&(T=L)}}}if(null==c[X])throw Error(mxResources.get("invalidOrMissingFile"));var ja=this.editor.csvToArray(c[X]),M=ia=null;if(null!=v||null!=I)for(var P=0;P<ja.length;P++)v==ja[P]&&(ia=P),I==ja[P]&&(M=P);null==ha&&(ha="%"+ja[0]+"%");if(null!=W)for(var S=0;S<W.length;S++)null==l[W[S].to]&&(l[W[S].to]={});G.model.beginUpdate();
-try{for(P=X+1;P<c.length;P++){var ga=this.editor.csvToArray(c[P]);if(null==ga){var ta=40<c[P].length?c[P].substring(0,40)+"...":c[P];throw Error(P+" ("+ta+") "+mxResources.get("containsValidationErrors"));}if(ga.length==ja.length){var H=null,oa=null!=ia?V+ga[ia]:null;null!=oa&&(H=G.model.getCell(oa));var v=null!=H,ca=new mxCell(ha,new mxGeometry(fa,ea,0,0),m||"whiteSpace=wrap;html=1;");ca.vertex=!0;ca.id=oa;for(var da=0;da<ga.length;da++)G.setAttributeForCell(ca,ja[da],ga[da]);if(null!=z&&null!=x){var Aa=
-x[ca.getAttribute(z)];null!=Aa&&G.labelChanged(ca,Aa)}if(null!=u&&null!=p){var wa=p[ca.getAttribute(u)];null!=wa&&(ca.style=wa)}G.setAttributeForCell(ca,"placeholders","1");ca.style=G.replacePlaceholders(ca,ca.style);v&&(G.model.setGeometry(H,ca.geometry),G.model.setStyle(H,ca.style),0>mxUtils.indexOf(e,H)&&e.push(H));H=ca;if(!v)for(S=0;S<W.length;S++)l[W[S].to][H.getAttribute(W[S].to)]=H;null!=la&&"link"!=la&&(G.setLinkForCell(H,H.getAttribute(la)),G.setAttributeForCell(H,la,null));G.fireEvent(new mxEventObject("cellsInserted",
-"cells",[H]));var za=this.editor.graph.getPreferredSizeForCell(H);H.vertex&&(null!=C&&null!=H.getAttribute(C)&&(H.geometry.x=fa+parseFloat(H.getAttribute(C))),null!=K&&null!=H.getAttribute(K)&&(H.geometry.y=O+parseFloat(H.getAttribute(K))),"@"==J.charAt(0)&&null!=H.getAttribute(J.substring(1))?H.geometry.width=parseFloat(H.getAttribute(J.substring(1))):H.geometry.width="auto"==J?za.width+Y:parseFloat(J),"@"==Q.charAt(0)&&null!=H.getAttribute(Q.substring(1))?H.geometry.height=parseFloat(H.getAttribute(Q.substring(1))):
-H.geometry.height="auto"==Q?za.height+Y:parseFloat(Q),ea+=H.geometry.height+R);v?(null==f[oa]&&(f[oa]=[]),f[oa].push(H)):(I=null!=M?G.model.getCell(V+ga[M]):null,d.push(H),null!=I?(I.style=G.replacePlaceholders(I,B),G.addCell(H,I)):e.push(G.addCell(H)))}}for(var na=e.slice(),ka=e.slice(),S=0;S<W.length;S++)for(var ra=W[S],P=0;P<e.length;P++){var H=e[P],Ea=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d){G.setAttributeForCell(b,c.from,null);for(var d=d.split(","),e=0;e<d.length;e++){var f=
-l[c.to][d[e]];if(null!=f){var g=c.label;null!=c.fromlabel&&(g=(b.getAttribute(c.fromlabel)||"")+(g||""));null!=c.tolabel&&(g=(g||"")+(f.getAttribute(c.tolabel)||""));ka.push(G.insertEdge(null,null,g||"",c.invert?f:a,c.invert?a:f,c.style||G.createCurrentEdgeStyle()));mxUtils.remove(c.invert?a:f,na)}}}});Ea(H,H,ra);if(null!=f[H.id])for(da=0;da<f[H.id].length;da++)Ea(H,f[H.id][da],ra)}if(null!=ma)for(P=0;P<d.length;P++)for(H=d[P],da=0;da<ma.length;da++)G.setAttributeForCell(H,mxUtils.trim(ma[da]),null);
-if(0<e.length){var sa=new mxParallelEdgeLayout(G);sa.spacing=N;var pa=function(){0<sa.spacing&&sa.execute(G.getDefaultParent());for(var a=0;a<e.length;a++){var b=G.getCellGeometry(e[a]);b.x=Math.round(G.snap(b.x));b.y=Math.round(G.snap(b.y));"auto"==J&&(b.width=Math.round(G.snap(b.width)));"auto"==Q&&(b.height=Math.round(G.snap(b.height)))}};if("["==T.charAt(0)){var Ka=aa;G.view.validate();this.executeLayoutList(JSON.parse(T),function(){pa();Ka()});aa=null}else if("circle"==T){var Ba=new mxCircleLayout(G);
-Ba.resetEdges=!1;var La=Ba.isVertexIgnored;Ba.isVertexIgnored=function(a){return La.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){Ba.execute(G.getDefaultParent());pa()},!0,aa);aa=null}else if("horizontaltree"==T||"verticaltree"==T||"auto"==T&&ka.length==2*e.length-1&&1==na.length){G.view.validate();var Ca=new mxCompactTreeLayout(G,"horizontaltree"==T);Ca.levelDistance=R;Ca.edgeRouting=!1;Ca.resetEdges=!1;this.executeLayout(function(){Ca.execute(G.getDefaultParent(),
-0<na.length?na[0]:null)},!0,aa);aa=null}else if("horizontalflow"==T||"verticalflow"==T||"auto"==T&&1==na.length){G.view.validate();var xa=new mxHierarchicalLayout(G,"horizontalflow"==T?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);xa.intraCellSpacing=R;xa.parallelEdgeSpacing=N;xa.interRankCellSpacing=ba;xa.disableEdgeStyle=!1;this.executeLayout(function(){xa.execute(G.getDefaultParent(),ka);G.moveCells(ka,fa,O)},!0,aa);aa=null}else if("organic"==T||"auto"==T&&ka.length>e.length){G.view.validate();
-var ua=new mxFastOrganicLayout(G);ua.forceConstant=3*R;ua.resetEdges=!1;var Fa=ua.isVertexIgnored;ua.isVertexIgnored=function(a){return Fa.apply(this,arguments)||0>mxUtils.indexOf(e,a)};sa=new mxParallelEdgeLayout(G);sa.spacing=N;this.executeLayout(function(){ua.execute(G.getDefaultParent());pa()},!0,aa);aa=null}}this.hideDialog()}finally{G.model.endUpdate()}null!=aa&&aa()}}catch(ya){this.handleError(ya)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&
+function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](c);if(null!=a[e].config)for(var l in a[e].config)f[l]=a[e].config[l];this.executeLayout(function(){f.execute(c.getDefaultParent(),0==d.length?null:d)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],e=[],f={};if(0<c.length){var l={},m=null,p=null,u=null,z=null,v=null,B=null,y=null,I=null,O="",J="auto",S="auto",C=null,L=null,P=40,T=40,ba=100,
+Y=0,F=this.editor.graph;F.getGraphBounds();for(var aa=function(){null!=b?b(ka):(F.setSelectionCells(ka),F.scrollCellToVisible(F.getSelectionCell()))},ea=F.getFreeInsertPoint(),fa=ea.x,Q=ea.y,ea=Q,ha=null,V="auto",I=null,W=[],la=null,ma=null,X=0;X<c.length&&"#"==c[X].charAt(0);){a=c[X];for(X++;X<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[X].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[X].substring(1)),X++;if("#"!=a.charAt(1)){var ia=a.indexOf(":");if(0<ia){var N=mxUtils.trim(a.substring(1,
+ia)),M=mxUtils.trim(a.substring(ia+1));"label"==N?ha=F.sanitizeHtml(M):"labelname"==N&&0<M.length&&"-"!=M?z=M:"labels"==N&&0<M.length&&"-"!=M?v=JSON.parse(M):"style"==N?m=M:"parentstyle"==N?B=M:"stylename"==N&&0<M.length&&"-"!=M?u=M:"styles"==N&&0<M.length&&"-"!=M?p=JSON.parse(M):"identity"==N&&0<M.length&&"-"!=M?y=M:"parent"==N&&0<M.length&&"-"!=M?I=M:"namespace"==N&&0<M.length&&"-"!=M?O=M:"width"==N?J=M:"height"==N?S=M:"left"==N&&0<M.length?C=M:"top"==N&&0<M.length?L=M:"ignore"==N?ma=M.split(","):
+"connect"==N?W.push(JSON.parse(M)):"link"==N?la=M:"padding"==N?Y=parseFloat(M):"edgespacing"==N?P=parseFloat(M):"nodespacing"==N?T=parseFloat(M):"levelspacing"==N?ba=parseFloat(M):"layout"==N&&(V=M)}}}if(null==c[X])throw Error(mxResources.get("invalidOrMissingFile"));var ja=this.editor.csvToArray(c[X]),N=ia=null;if(null!=y||null!=I)for(var R=0;R<ja.length;R++)y==ja[R]&&(ia=R),I==ja[R]&&(N=R);null==ha&&(ha="%"+ja[0]+"%");if(null!=W)for(var U=0;U<W.length;U++)null==l[W[U].to]&&(l[W[U].to]={});F.model.beginUpdate();
+try{for(R=X+1;R<c.length;R++){var ga=this.editor.csvToArray(c[R]);if(null==ga){var ta=40<c[R].length?c[R].substring(0,40)+"...":c[R];throw Error(R+" ("+ta+") "+mxResources.get("containsValidationErrors"));}if(ga.length==ja.length){var H=null,oa=null!=ia?O+ga[ia]:null;null!=oa&&(H=F.model.getCell(oa));var y=null!=H,ca=new mxCell(ha,new mxGeometry(fa,ea,0,0),m||"whiteSpace=wrap;html=1;");ca.vertex=!0;ca.id=oa;for(var da=0;da<ga.length;da++)F.setAttributeForCell(ca,ja[da],ga[da]);if(null!=z&&null!=v){var Aa=
+v[ca.getAttribute(z)];null!=Aa&&F.labelChanged(ca,Aa)}if(null!=u&&null!=p){var wa=p[ca.getAttribute(u)];null!=wa&&(ca.style=wa)}F.setAttributeForCell(ca,"placeholders","1");ca.style=F.replacePlaceholders(ca,ca.style);y&&(F.model.setGeometry(H,ca.geometry),F.model.setStyle(H,ca.style),0>mxUtils.indexOf(e,H)&&e.push(H));H=ca;if(!y)for(U=0;U<W.length;U++)l[W[U].to][H.getAttribute(W[U].to)]=H;null!=la&&"link"!=la&&(F.setLinkForCell(H,H.getAttribute(la)),F.setAttributeForCell(H,la,null));F.fireEvent(new mxEventObject("cellsInserted",
+"cells",[H]));var za=this.editor.graph.getPreferredSizeForCell(H);H.vertex&&(null!=C&&null!=H.getAttribute(C)&&(H.geometry.x=fa+parseFloat(H.getAttribute(C))),null!=L&&null!=H.getAttribute(L)&&(H.geometry.y=Q+parseFloat(H.getAttribute(L))),"@"==J.charAt(0)&&null!=H.getAttribute(J.substring(1))?H.geometry.width=parseFloat(H.getAttribute(J.substring(1))):H.geometry.width="auto"==J?za.width+Y:parseFloat(J),"@"==S.charAt(0)&&null!=H.getAttribute(S.substring(1))?H.geometry.height=parseFloat(H.getAttribute(S.substring(1))):
+H.geometry.height="auto"==S?za.height+Y:parseFloat(S),ea+=H.geometry.height+T);y?(null==f[oa]&&(f[oa]=[]),f[oa].push(H)):(I=null!=N?F.model.getCell(O+ga[N]):null,d.push(H),null!=I?(I.style=F.replacePlaceholders(I,B),F.addCell(H,I)):e.push(F.addCell(H)))}}for(var na=e.slice(),ka=e.slice(),U=0;U<W.length;U++)for(var ra=W[U],R=0;R<e.length;R++){var H=e[R],Ea=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d){F.setAttributeForCell(b,c.from,null);for(var d=d.split(","),e=0;e<d.length;e++){var f=
+l[c.to][d[e]];if(null!=f){var g=c.label;null!=c.fromlabel&&(g=(b.getAttribute(c.fromlabel)||"")+(g||""));null!=c.tolabel&&(g=(g||"")+(f.getAttribute(c.tolabel)||""));ka.push(F.insertEdge(null,null,g||"",c.invert?f:a,c.invert?a:f,c.style||F.createCurrentEdgeStyle()));mxUtils.remove(c.invert?a:f,na)}}}});Ea(H,H,ra);if(null!=f[H.id])for(da=0;da<f[H.id].length;da++)Ea(H,f[H.id][da],ra)}if(null!=ma)for(R=0;R<d.length;R++)for(H=d[R],da=0;da<ma.length;da++)F.setAttributeForCell(H,mxUtils.trim(ma[da]),null);
+if(0<e.length){var sa=new mxParallelEdgeLayout(F);sa.spacing=P;var pa=function(){0<sa.spacing&&sa.execute(F.getDefaultParent());for(var a=0;a<e.length;a++){var b=F.getCellGeometry(e[a]);b.x=Math.round(F.snap(b.x));b.y=Math.round(F.snap(b.y));"auto"==J&&(b.width=Math.round(F.snap(b.width)));"auto"==S&&(b.height=Math.round(F.snap(b.height)))}};if("["==V.charAt(0)){var Ka=aa;F.view.validate();this.executeLayoutList(JSON.parse(V),function(){pa();Ka()});aa=null}else if("circle"==V){var Ba=new mxCircleLayout(F);
+Ba.resetEdges=!1;var La=Ba.isVertexIgnored;Ba.isVertexIgnored=function(a){return La.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){Ba.execute(F.getDefaultParent());pa()},!0,aa);aa=null}else if("horizontaltree"==V||"verticaltree"==V||"auto"==V&&ka.length==2*e.length-1&&1==na.length){F.view.validate();var Ca=new mxCompactTreeLayout(F,"horizontaltree"==V);Ca.levelDistance=T;Ca.edgeRouting=!1;Ca.resetEdges=!1;this.executeLayout(function(){Ca.execute(F.getDefaultParent(),
+0<na.length?na[0]:null)},!0,aa);aa=null}else if("horizontalflow"==V||"verticalflow"==V||"auto"==V&&1==na.length){F.view.validate();var xa=new mxHierarchicalLayout(F,"horizontalflow"==V?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);xa.intraCellSpacing=T;xa.parallelEdgeSpacing=P;xa.interRankCellSpacing=ba;xa.disableEdgeStyle=!1;this.executeLayout(function(){xa.execute(F.getDefaultParent(),ka);F.moveCells(ka,fa,Q)},!0,aa);aa=null}else if("organic"==V||"auto"==V&&ka.length>e.length){F.view.validate();
+var ua=new mxFastOrganicLayout(F);ua.forceConstant=3*T;ua.resetEdges=!1;var Fa=ua.isVertexIgnored;ua.isVertexIgnored=function(a){return Fa.apply(this,arguments)||0>mxUtils.indexOf(e,a)};sa=new mxParallelEdgeLayout(F);sa.spacing=P;this.executeLayout(function(){ua.execute(F.getDefaultParent());pa()},!0,aa);aa=null}}this.hideDialog()}finally{F.model.endUpdate()}null!=aa&&aa()}}catch(ya){this.handleError(ya)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&
null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&
(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d,!0);this.showDialog(a.container,560,130,!0,!0);a.init()};var u=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=u.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=
this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var f=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*
@@ -3298,7 +3301,7 @@ this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.
"4px";this.offlineStatus.style.padding="2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var f=window.applicationCache,l=null,b=mxUtils.bind(this,function(){var a=f.status,b;a==f.CHECKING&&(a=f.DOWNLOADING);switch(a){case f.UNCACHED:b=
"";break;case f.IDLE:b="min"==uiTheme?"":'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case f.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';break;case f.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case f.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b=
'<img title="Unknown" border="0" src="'+IMAGE_PATH+'/clear.gif"/>'}a!=l&&(this.offlineStatus.innerHTML=b,l=a)});mxEvent.addListener(f,"checking",b);mxEvent.addListener(f,"noupdate",b);mxEvent.addListener(f,"downloading",b);mxEvent.addListener(f,"progress",b);mxEvent.addListener(f,"cached",b);mxEvent.addListener(f,"updateready",b);mxEvent.addListener(f,"obsolete",b);mxEvent.addListener(f,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=
-function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var x=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){x.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);
+function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var v=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){v.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);
this.actions.get("autosave").setEnabled(null!=d&&d.isEditable()&&d.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));
this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=d);this.actions.get("makeCopy").setEnabled(null!=d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==d||!d.isRestricted()));this.actions.get("publishLink").setEnabled(null!=d&&!d.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);
this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=d&&d.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=d);this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};
@@ -3306,41 +3309,41 @@ var B=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=thi
"svg",mxUtils.getXml(c.getSvg(f,l,g)),"image/svg+xml");else{var e=a.getFileData(!0,null,null,null,null,!0),k=c.getGraphBounds(),n=Math.floor(k.width*l/c.view.scale),p=Math.floor(k.height*l/c.view.scale);if(e.length<=MAX_REQUEST_SIZE&&n*p<MAX_AREA)if(a.hideDialog(),"png"!=d&&"jpg"!=d&&"jpeg"!=d||!a.isExportToCanvas()){var q={globalVars:c.getExportVariables()};a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):
"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<m?"&dpi="+m:"")+"&bg="+(null!=f?f:"none")+"&w="+n+"&h="+p+"&border="+g+"&xml="+encodeURIComponent(e))})}else"png"==d?a.exportImage(l,null==f||"none"==f,!0,!1,!1,g,!0,!1,null,null,m):a.exportImage(l,!1,!0,!1,!1,g,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var d=0;d<this.pages.length;d++){var f=
a;this.currentPage!=this.pages[d]&&(f=this.createTemporaryGraph(a.getStylesheet()),f.model.setRoot(this.pages[d].root));b+=this.pages[d].getName()+" "+f.getIndexableText()+" "}else b=a.getIndexableText();this.editor.graph.setEnabled(!0);return b};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
-c.appendChild(d);var f=document.createElement("div");f.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";f.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var g={};try{var l=mxSettings.getCustomLibraries();for(a=0;a<l.length;a++){var m=l[a];if("R"==m.substring(0,1)){var p=JSON.parse(decodeURIComponent(m.substring(1)));g[p[0]]={id:p[0],title:p[1],downloadUrl:p[2]}}}}catch(F){}this.remoteInvoke("getCustomLibraries",null,null,function(a){f.innerHTML=
+c.appendChild(d);var f=document.createElement("div");f.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";f.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var g={};try{var l=mxSettings.getCustomLibraries();for(a=0;a<l.length;a++){var m=l[a];if("R"==m.substring(0,1)){var p=JSON.parse(decodeURIComponent(m.substring(1)));g[p[0]]={id:p[0],title:p[1],downloadUrl:p[2]}}}}catch(E){}this.remoteInvoke("getCustomLibraries",null,null,function(a){f.innerHTML=
"";if(0==a.length)f.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];g[d.id]&&(b[d.id]=d);var e=this.addCheckbox(f,d.title,g[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,e)}},mxUtils.bind(this,function(a){f.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,
-mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));f.appendChild(b)}));c.appendChild(f);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==g[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(v){this.handleError(v,
+mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));f.appendChild(b)}));c.appendChild(f);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==g[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(y){this.handleError(y,
mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));for(c in g)b[c]||this.closeLibrary(new RemoteLibrary(this,null,g[c]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1}};EditorUi.prototype.remoteInvokeCallbacks=
-[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];null!=c&&(a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp),this.remoteInvokeCallbacks[b.callbackId]=null)};EditorUi.prototype.remoteInvoke=
-function(a,b,d,f,l){var c=!0,e=window.setTimeout(mxUtils.bind(this,function(){c=!1;l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),k=mxUtils.bind(this,function(){window.clearTimeout(e);c&&f.apply(this,arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:k,error:l});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};
-EditorUi.prototype.handleRemoteInvoke=function(a){var b=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var c=a.funtionName,d=this.remoteInvokableFns[c];if(null!=d&&"function"===typeof this[c]){var f=a.functionArgs;Array.isArray(f)||(f=[]);if(d.isAsync)f.push(function(){b(Array.prototype.slice.apply(arguments))}),f.push(function(a){b(null,a||"Unkown Error")}),
-this[c].apply(this,f);else{var g=this[c].apply(this,f);b([g])}}else b(null,"Invalid Call: "+c+" is not found.")}catch(y){b(null,"Invalid Call: An error occured, "+y.message)}};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=
-a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,d){var c=this.getCurrentFile();null!=c?c.addComment(a,b,d):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=
-function(a,b){var c=this.getCurrentFile();return null!=c?c.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var c=this.getCurrentFile();null!=c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();
-return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")}})();
-var CommentsWindow=function(a,b,f,d,l,m){function p(){for(var a=t.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==t&&b++;F.style.display=0==b?"block":"none"}function u(a,b,c,d){function e(){b.removeChild(l);b.removeChild(m);k.style.display="block";f.style.display="block"}g={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),k=b.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
-"geCommentEditTxtArea";l.style.minHeight=f.offsetHeight+"px";l.value=a.content;b.insertBefore(l,f);var m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),p()):e();g=null});n.className="geCommentEditBtn";m.appendChild(n);var t=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=l.value;mxUtils.write(f,a.content);e();c(a);g=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this,
-function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(t.click(),mxEvent.consume(a)):27==a.keyCode&&(n.click(),mxEvent.consume(a)))}));t.focus();t.className="geCommentEditBtn gePrimaryBtn";m.appendChild(t);b.insertBefore(m,f);k.style.display="none";f.style.display="none";l.focus()}function x(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),e=a.timeSince(d);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
+[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];if(null==c)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,
+a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,d,f,l){var c=!0,e=window.setTimeout(mxUtils.bind(this,function(){c=!1;l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),k=mxUtils.bind(this,function(){window.clearTimeout(e);c&&f.apply(this,arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:k,error:l});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,
+msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a){var b=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var c=a.funtionName,d=this.remoteInvokableFns[c];if(null!=d&&"function"===typeof this[c]){var f=a.functionArgs;Array.isArray(f)||(f=[]);if(d.isAsync)f.push(function(){b(Array.prototype.slice.apply(arguments))}),
+f.push(function(a){b(null,a||"Unkown Error")}),this[c].apply(this,f);else{var g=this[c].apply(this,f);b([g])}}else b(null,"Invalid Call: "+c+" is not found.")}catch(x){b(null,"Invalid Call: An error occured, "+x.message)}};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=
+function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,d){var c=this.getCurrentFile();null!=c?c.addComment(a,b,d):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=
+a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile();return null!=c?c.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var c=this.getCurrentFile();null!=c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=
+function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")}})();
+var CommentsWindow=function(a,b,f,d,l,m){function p(){for(var a=t.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==t&&b++;E.style.display=0==b?"block":"none"}function u(a,b,c,d){function e(){b.removeChild(l);b.removeChild(m);k.style.display="block";f.style.display="block"}g={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),k=b.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
+"geCommentEditTxtArea";l.style.minHeight=f.offsetHeight+"px";l.value=a.content;b.insertBefore(l,f);var m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),p()):e();g=null});n.className="geCommentEditBtn";m.appendChild(n);var q=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=l.value;mxUtils.write(f,a.content);e();c(a);g=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this,
+function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(q.click(),mxEvent.consume(a)):27==a.keyCode&&(n.click(),mxEvent.consume(a)))}));q.focus();q.className="geCommentEditBtn gePrimaryBtn";m.appendChild(q);b.insertBefore(m,f);k.style.display="none";f.style.display="none";l.focus()}function v(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),e=a.timeSince(d);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function B(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function c(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function e(a){a.style.border="";a.removeChild(a.busyImg)}function k(b,d,f,l,m){function z(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
-"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});N.appendChild(e);d&&(e.style.display="none")}function C(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=v;a(b);return{pdiv:d,replies:c}}function y(d,f,g,m,n){function p(){B(v);b.addReply(z,function(a){z.id=a;b.replies.push(z);e(v);g&&g()},function(b){t();c(v);a.handleError(b,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},m,n)}function t(){u(z,v,function(a){p()},!0)}var q=C().pdiv,z=a.newComment(d,a.getCurrentUser());z.pCommentId=b.id;null==b.replies&&(b.replies=[]);var v=k(z,b.replies,q,l+1);f?t():p()}if(m||!b.isResolved){F.style.display="none";var v=document.createElement("div");v.className="geCommentContainer";v.setAttribute("data-commentId",b.id);v.style.marginLeft=20*l+5+"px";b.isResolved&&"dark"!=uiTheme&&(v.style.backgroundColor="ghostWhite");
-var A=document.createElement("div");A.className="geCommentHeader";var D=document.createElement("img");D.className="geCommentUserImg";D.src=b.user.pictureUrl||Editor.userImage;A.appendChild(D);D=document.createElement("div");D.className="geCommentHeaderTxt";A.appendChild(D);var K=document.createElement("div");K.className="geCommentUsername";mxUtils.write(K,b.user.displayName||"");D.appendChild(K);K=document.createElement("div");K.className="geCommentDate";K.setAttribute("data-commentId",b.id);x(b,
-K);D.appendChild(K);v.appendChild(A);A=document.createElement("div");A.className="geCommentTxt";mxUtils.write(A,b.content||"");v.appendChild(A);A=document.createElement("div");A.className="geCommentActions";var N=document.createElement("ul");N.className="geCommentActionsList";A.appendChild(N);q||0!=l&&!n||z(mxResources.get("reply"),function(){y("",!0)},b.isResolved);D=a.getCurrentUser();null==D||D.id!=b.user.id||q||(z(mxResources.get("edit"),function(){function d(){u(b,v,function(){B(v);b.editComment(b.content,
-function(){e(v)},function(b){c(v);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}d()},b.isResolved),z(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){B(v);b.deleteComment(function(){for(var a=C(b).replies,c=0;c<a.length;c++)t.removeChild(a[c]);for(c=0;c<d.length;c++)if(d[c]==b){d.splice(c,1);break}F.style.display=0==t.getElementsByTagName("div").length?"block":"none"},function(b){c(v);a.handleError(b,null,null,
+"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});P.appendChild(e);d&&(e.style.display="none")}function C(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=y;a(b);return{pdiv:d,replies:c}}function x(d,f,g,m,p){function n(){B(v);b.addReply(z,function(a){z.id=a;b.replies.push(z);e(v);g&&g()},function(b){q();c(v);a.handleError(b,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},m,p)}function q(){u(z,v,function(a){n()},!0)}var t=C().pdiv,z=a.newComment(d,a.getCurrentUser());z.pCommentId=b.id;null==b.replies&&(b.replies=[]);var v=k(z,b.replies,t,l+1);f?q():n()}if(m||!b.isResolved){E.style.display="none";var y=document.createElement("div");y.className="geCommentContainer";y.setAttribute("data-commentId",b.id);y.style.marginLeft=20*l+5+"px";b.isResolved&&"dark"!=uiTheme&&(y.style.backgroundColor="ghostWhite");
+var A=document.createElement("div");A.className="geCommentHeader";var G=document.createElement("img");G.className="geCommentUserImg";G.src=b.user.pictureUrl||Editor.userImage;A.appendChild(G);G=document.createElement("div");G.className="geCommentHeaderTxt";A.appendChild(G);var L=document.createElement("div");L.className="geCommentUsername";mxUtils.write(L,b.user.displayName||"");G.appendChild(L);L=document.createElement("div");L.className="geCommentDate";L.setAttribute("data-commentId",b.id);v(b,
+L);G.appendChild(L);y.appendChild(A);A=document.createElement("div");A.className="geCommentTxt";mxUtils.write(A,b.content||"");y.appendChild(A);A=document.createElement("div");A.className="geCommentActions";var P=document.createElement("ul");P.className="geCommentActionsList";A.appendChild(P);q||0!=l&&!n||z(mxResources.get("reply"),function(){x("",!0)},b.isResolved);G=a.getCurrentUser();null==G||G.id!=b.user.id||q||(z(mxResources.get("edit"),function(){function d(){u(b,y,function(){B(y);b.editComment(b.content,
+function(){e(y)},function(b){c(y);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}d()},b.isResolved),z(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){B(y);b.deleteComment(function(){for(var a=C(b).replies,c=0;c<a.length;c++)t.removeChild(a[c]);for(c=0;c<d.length;c++)if(d[c]==b){d.splice(c,1);break}E.style.display=0==t.getElementsByTagName("div").length?"block":"none"},function(b){c(y);a.handleError(b,null,null,
null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));q||0!=l||z(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=C(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),
-l=0;l<k.length;l++)k[l]!=c.parentNode&&(k[l].style.display=d);E||(e[g].style.display="none")}p()}b.isResolved?y(mxResources.get("reOpened")+": ",!0,c,!1,!0):y(mxResources.get("markedAsResolved"),!1,c,!0)});v.appendChild(A);null!=f?t.insertBefore(v,f.nextSibling):t.appendChild(v);for(f=0;null!=b.replies&&f<b.replies.length;f++)A=b.replies[f],A.isResolved=b.isResolved,k(A,b.replies,null,l+1,m);null!=g&&(g.comment.id==b.id?(m=b.content,b.content=g.comment.content,u(b,v,g.saveCallback,g.deleteOnCancel),
-b.content=m):null==g.comment.id&&g.comment.pCommentId==b.id&&(t.appendChild(g.div),u(g.comment,g.div,g.saveCallback,g.deleteOnCancel)));return v}}var q=!a.canComment(),n=a.canReplyToReplies(),g=null,y=document.createElement("div");y.className="geCommentsWin";y.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var A=EditorUi.compactUi?"26px":"30px",t=document.createElement("div");t.className="geCommentsList";t.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":
-Dialog.backdropColor;t.style.bottom=parseInt(A)+7+"px";y.appendChild(t);var F=document.createElement("span");F.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(F,mxResources.get("noCommentsFound"));var z=document.createElement("div");z.className="geToolbarContainer geCommentsToolbar";z.style.height=A;z.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";z.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(z.style.filter=
-"none");A=document.createElement("a");A.className="geButton";mxClient.IS_QUIRKS&&(A.style.filter="none");if(!q){var D=A.cloneNode();D.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';D.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(D,"click",function(b){function d(){u(f,g,function(b){B(g);a.addComment(b,function(a){b.id=a;v.push(b);e(g)},function(b){c(g);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},
-!0)}var f=a.newComment("",a.getCurrentUser()),g=k(f,v,null,0);d();b.preventDefault();mxEvent.consume(b)});z.appendChild(D)}D=A.cloneNode();D.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';D.setAttribute("title",mxResources.get("showResolved"));var E=!1;"dark"==uiTheme&&(D.style.filter="invert(100%)");mxEvent.addListener(D,"click",function(a){this.className=(E=!E)?"geButton geCheckedBtn":"geButton";I();a.preventDefault();mxEvent.consume(a)});z.appendChild(D);a.commentsRefreshNeeded()&&
-(D=A.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',D.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(D.style.filter="invert(100%)"),mxEvent.addListener(D,"click",function(a){I();a.preventDefault();mxEvent.consume(a)}),z.appendChild(D));a.commentsSaveNeeded()&&(A=A.cloneNode(),A.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',A.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&
-(A.style.filter="invert(100%)"),mxEvent.addListener(A,"click",function(a){m();a.preventDefault();mxEvent.consume(a)}),z.appendChild(A));y.appendChild(z);var v=[],I=mxUtils.bind(this,function(){this.hasError=!1;if(null!=g){g.div=g.div.cloneNode(!0);var b=g.div.querySelector(".geCommentEditTxtArea"),c=g.div.querySelector(".geCommentEditBtns");g.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}t.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+
-'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});t.innerHTML="";t.appendChild(F);F.style.display="block";v=a;for(a=0;a<v.length;a++)b(v[a].replies),k(v[a],v,
-null,0,E);null!=g&&null==g.comment.id&&null==g.comment.pCommentId&&(t.appendChild(g.div),u(g.comment,g.div,g.saveCallback,g.deleteOnCancel))},mxUtils.bind(this,function(a){t.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?": "+a.message:""));this.hasError=!0})):t.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});I();this.refreshComments=I;z=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(x(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}
-if(this.window.isVisible()){for(var b=t.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<v.length;d++)a(v[d])}});setInterval(z,6E4);this.refreshCommentsTime=z;this.window=new mxWindow(mxResources.get("comments"),y,b,f,d,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var V=mxUtils.bind(this,function(){var a=this.window.getX(),
-b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",V);this.destroy=function(){mxEvent.removeListener(window,"resize",V);this.window.destroy()}},ConfirmDialog=function(a,b,f,d,l,m,p,u,x,B,c){var e=document.createElement("div");e.style.textAlign="center";c=null!=c?c:44;var k=document.createElement("div");k.style.padding="6px";k.style.overflow="auto";k.style.maxHeight=c+"px";k.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(k.style.height="60px");mxUtils.write(k,b);
+l=0;l<k.length;l++)k[l]!=c.parentNode&&(k[l].style.display=d);D||(e[g].style.display="none")}p()}b.isResolved?x(mxResources.get("reOpened")+": ",!0,c,!1,!0):x(mxResources.get("markedAsResolved"),!1,c,!0)});y.appendChild(A);null!=f?t.insertBefore(y,f.nextSibling):t.appendChild(y);for(f=0;null!=b.replies&&f<b.replies.length;f++)A=b.replies[f],A.isResolved=b.isResolved,k(A,b.replies,null,l+1,m);null!=g&&(g.comment.id==b.id?(m=b.content,b.content=g.comment.content,u(b,y,g.saveCallback,g.deleteOnCancel),
+b.content=m):null==g.comment.id&&g.comment.pCommentId==b.id&&(t.appendChild(g.div),u(g.comment,g.div,g.saveCallback,g.deleteOnCancel)));return y}}var q=!a.canComment(),n=a.canReplyToReplies(),g=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var A=EditorUi.compactUi?"26px":"30px",t=document.createElement("div");t.className="geCommentsList";t.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":
+Dialog.backdropColor;t.style.bottom=parseInt(A)+7+"px";x.appendChild(t);var E=document.createElement("span");E.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(E,mxResources.get("noCommentsFound"));var z=document.createElement("div");z.className="geToolbarContainer geCommentsToolbar";z.style.height=A;z.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";z.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(z.style.filter=
+"none");A=document.createElement("a");A.className="geButton";mxClient.IS_QUIRKS&&(A.style.filter="none");if(!q){var G=A.cloneNode();G.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';G.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(G,"click",function(b){function d(){u(f,g,function(b){B(g);a.addComment(b,function(a){b.id=a;y.push(b);e(g)},function(b){c(g);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},
+!0)}var f=a.newComment("",a.getCurrentUser()),g=k(f,y,null,0);d();b.preventDefault();mxEvent.consume(b)});z.appendChild(G)}G=A.cloneNode();G.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';G.setAttribute("title",mxResources.get("showResolved"));var D=!1;"dark"==uiTheme&&(G.style.filter="invert(100%)");mxEvent.addListener(G,"click",function(a){this.className=(D=!D)?"geButton geCheckedBtn":"geButton";I();a.preventDefault();mxEvent.consume(a)});z.appendChild(G);a.commentsRefreshNeeded()&&
+(G=A.cloneNode(),G.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',G.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(G.style.filter="invert(100%)"),mxEvent.addListener(G,"click",function(a){I();a.preventDefault();mxEvent.consume(a)}),z.appendChild(G));a.commentsSaveNeeded()&&(A=A.cloneNode(),A.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',A.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&
+(A.style.filter="invert(100%)"),mxEvent.addListener(A,"click",function(a){m();a.preventDefault();mxEvent.consume(a)}),z.appendChild(A));x.appendChild(z);var y=[],I=mxUtils.bind(this,function(){this.hasError=!1;if(null!=g){g.div=g.div.cloneNode(!0);var b=g.div.querySelector(".geCommentEditTxtArea"),c=g.div.querySelector(".geCommentEditBtns");g.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}t.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+
+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});t.innerHTML="";t.appendChild(E);E.style.display="block";y=a;for(a=0;a<y.length;a++)b(y[a].replies),k(y[a],y,
+null,0,D);null!=g&&null==g.comment.id&&null==g.comment.pCommentId&&(t.appendChild(g.div),u(g.comment,g.div,g.saveCallback,g.deleteOnCancel))},mxUtils.bind(this,function(a){t.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?": "+a.message:""));this.hasError=!0})):t.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});I();this.refreshComments=I;z=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(v(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}
+if(this.window.isVisible()){for(var b=t.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<y.length;d++)a(y[d])}});setInterval(z,6E4);this.refreshCommentsTime=z;this.window=new mxWindow(mxResources.get("comments"),x,b,f,d,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var O=mxUtils.bind(this,function(){var a=this.window.getX(),
+b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",O);this.destroy=function(){mxEvent.removeListener(window,"resize",O);this.window.destroy()}},ConfirmDialog=function(a,b,f,d,l,m,p,u,v,B,c){var e=document.createElement("div");e.style.textAlign="center";c=null!=c?c:44;var k=document.createElement("div");k.style.padding="6px";k.style.overflow="auto";k.style.maxHeight=c+"px";k.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(k.style.height="60px");mxUtils.write(k,b);
e.appendChild(k);null!=B&&(k=document.createElement("div"),k.style.padding="6px 0 6px 0",b=document.createElement("img"),b.setAttribute("src",B),k.appendChild(b),e.appendChild(k));B=document.createElement("div");B.style.textAlign="center";B.style.whiteSpace="nowrap";var q=document.createElement("input");q.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(q.checked)});m.className="geBtn";null!=u&&(m.innerHTML=u+"<br>"+m.innerHTML,m.style.paddingBottom=
-"8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");a.editor.cancelFirst&&B.appendChild(m);var n=mxUtils.button(l||mxResources.get("ok"),function(){a.hideDialog();null!=f&&f(q.checked)});B.appendChild(n);null!=p?(n.innerHTML=p+"<br>"+n.innerHTML+"<br>",n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.className="geBtn",n.style.width="40%"):n.className="geBtn gePrimaryBtn";a.editor.cancelFirst||B.appendChild(m);e.appendChild(B);x?(B.style.marginTop=
+"8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");a.editor.cancelFirst&&B.appendChild(m);var n=mxUtils.button(l||mxResources.get("ok"),function(){a.hideDialog();null!=f&&f(q.checked)});B.appendChild(n);null!=p?(n.innerHTML=p+"<br>"+n.innerHTML+"<br>",n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.className="geBtn",n.style.width="40%"):n.className="geBtn gePrimaryBtn";a.editor.cancelFirst||B.appendChild(m);e.appendChild(B);v?(B.style.marginTop=
"10px",k=document.createElement("p"),k.style.marginTop="20px",k.appendChild(q),l=document.createElement("span"),mxUtils.write(l," "+mxResources.get("rememberThisSetting")),k.appendChild(l),e.appendChild(k),mxEvent.addListener(l,"click",function(a){q.checked=!q.checked;mxEvent.consume(a)})):B.style.marginTop="12px";this.init=function(){n.focus()};this.container=e};function DiagramPage(a,b){this.node=a;null!=b?this.node.setAttribute("id",b):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,b,f){this.ui=a;this.page=b;this.previous=this.name=f}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(a,b,f){this.ui=a;this.oldIndex=b;this.newIndex=f}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
@@ -3355,7 +3358,7 @@ this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pa
a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft=a.view.translate.x*a.view.scale+b.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+b.viewState.scrollTop),f=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?1!=MathJax.Hub.queue.pending||null==this.editor||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){null!=this.editor&&this.editor.graph.refresh()})):
"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var f=b.getProperty("edit").changes,l=0;l<f.length;l++)if(f[l]instanceof SelectPage||f[l]instanceof RenamePage||f[l]instanceof MovePage||f[l]instanceof mxRootChange){d();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
EditorUi.prototype.restoreViewState=function(a,b,f){a=null!=a?this.getPageById(a.getId()):null;var d=this.editor.graph;null!=a&&null!=this.currentPage&&null!=this.pages&&(a!=this.currentPage?this.selectPage(a,!0,b):(d.setViewState(b),this.editor.updateGraphComponents(),d.view.revalidate(),d.sizeDidChange()),d.container.scrollLeft=d.view.translate.x*d.view.scale+b.scrollLeft,d.container.scrollTop=d.view.translate.y*d.view.scale+b.scrollTop,d.restoreSelection(f))};
-Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),f=parseFloat(a.getAttribute("pageScale")),d=parseFloat(a.getAttribute("pageWidth")),l=parseFloat(a.getAttribute("pageHeight")),m=a.getAttribute("background"),p=a.getAttribute("backgroundImage"),p=null!=p&&0<p.length?JSON.parse(p):null,u=a.getAttribute("extFonts");if(u)try{u=u.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}})}catch(x){console.log("ExtFonts format error: "+x.message)}return{gridEnabled:"0"!=
+Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),f=parseFloat(a.getAttribute("pageScale")),d=parseFloat(a.getAttribute("pageWidth")),l=parseFloat(a.getAttribute("pageHeight")),m=a.getAttribute("background"),p=a.getAttribute("backgroundImage"),p=null!=p&&0<p.length?JSON.parse(p):null,u=a.getAttribute("extFonts");if(u)try{u=u.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}})}catch(v){console.log("ExtFonts format error: "+v.message)}return{gridEnabled:"0"!=
a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=m&&0<m.length?m:null,backgroundImage:null!=p?new mxImage(p.src,p.width,p.height):null,pageScale:isNaN(f)?mxGraph.prototype.pageScale:f,pageFormat:isNaN(d)||isNaN(l)?"undefined"===
typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat():new mxRectangle(0,0,d,l),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,extFonts:u||[]}};
Graph.prototype.saveViewState=function(a,b,f){f||(b.setAttribute("grid",null==a||a.gridEnabled?"1":"0"),b.setAttribute("gridSize",null!=a?a.gridSize:mxGraph.prototype.gridSize),b.setAttribute("guides",null==a||a.guidesEnabled?"1":"0"),b.setAttribute("tooltips",null==a||a.tooltips?"1":"0"),b.setAttribute("connect",null==a||a.connect?"1":"0"),b.setAttribute("arrows",null==a||a.arrows?"1":"0"),b.setAttribute("page",null==a&&this.defaultPageVisible||null!=a&&a.pageVisible?"1":"0"),b.setAttribute("fold",
@@ -3384,8 +3387,8 @@ EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&nul
f)/this.pages.length)+1),l=null,m=0;m<this.pages.length;m++)mxUtils.bind(this,function(d,c){this.pages[d]==this.currentPage?(c.className="geActivePage",c.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#fff"):c.className="geInactivePage";c.setAttribute("draggable","true");mxEvent.addListener(c,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),l=d):mxEvent.consume(b)}));mxEvent.addListener(c,"dragend",mxUtils.bind(this,function(a){l=
null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null!=l&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=l&&d!=l&&this.movePage(l,d);a.stopPropagation();a.preventDefault()}));b.appendChild(c)})(m,this.createTabForPage(this.pages[m],d,this.pages[m]!=this.currentPage,m+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);d=this.createPageMenuTab();
this.tabContainer.appendChild(d);d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(b.clientWidth>this.tabContainer.clientWidth-f){null!=d&&(d.style.position="absolute",d.style.right="0px",b.style.marginRight="30px");var p=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");p.style.position="absolute";p.style.right=this.editor.chromeless?"29px":"55px";p.style.fontSize="13pt";this.tabContainer.appendChild(p);var u=this.createControlTab(4,"&nbsp;&#10095;");
-u.style.position="absolute";u.style.right=this.editor.chromeless?"0px":"29px";u.style.fontSize="13pt";this.tabContainer.appendChild(u);var x=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=x+"px";mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,x-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(u,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(p,0<b.scrollLeft?100:
-50);mxUtils.setOpacity(u,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(u,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,x-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(u,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+u.style.position="absolute";u.style.right=this.editor.chromeless?"0px":"29px";u.style.fontSize="13pt";this.tabContainer.appendChild(u);var v=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=v+"px";mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,v-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(u,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(p,0<b.scrollLeft?100:
+50);mxUtils.setOpacity(u,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(u,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,v-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(u,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(a){var b=document.createElement("div");b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.whiteSpace="nowrap";b.style.boxSizing="border-box";b.style.position="relative";b.style.overflow="hidden";b.style.textAlign="center";b.style.marginLeft="-1px";b.style.height=this.tabContainer.clientHeight+"px";b.style.padding="12px 4px 8px 4px";b.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #e8eaed";b.style.borderTopStyle="none";b.style.borderBottomStyle=
"none";b.style.backgroundColor=this.tabContainer.style.backgroundColor;b.style.cursor="move";b.style.color="gray";a&&(mxEvent.addListener(b,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(b.style.backgroundColor="dark"==uiTheme?"black":"#e8eaed",mxEvent.consume(a))})),mxEvent.addListener(b,"mouseleave",mxUtils.bind(this,function(a){b.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return b};
EditorUi.prototype.createControlTab=function(a,b){var f=this.createTab(!0);f.style.lineHeight=this.tabContainerHeight+"px";f.style.paddingTop=a+"px";f.style.cursor="pointer";f.style.width="30px";f.innerHTML=b;null!=f.firstChild&&null!=f.firstChild.style&&mxUtils.setOpacity(f.firstChild,40);return f};
@@ -3395,7 +3398,7 @@ function(){this.removePage(f)}),b),a.addItem(mxResources.get("rename"),null,mxUt
mxEvent.getClientX(a),l=mxEvent.getClientY(a);b.popup(d,l,null,a);this.setCurrentMenu(b);mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
EditorUi.prototype.createTabForPage=function(a,b,f,d){f=this.createTab(f);var l=a.getName()||mxResources.get("untitled"),m=a.getId();f.setAttribute("title",l+(null!=m?" ("+m+")":"")+" ["+d+"]");mxUtils.write(f,l);f.style.maxWidth=b+"px";f.style.width=b+"px";this.addTabListeners(a,f);42<b&&(f.style.textOverflow="ellipsis");return f};
EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var f=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var d=!1,l=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){d=null!=this.currentMenu;l=a==this.currentPage;f.isMouseDown||l||this.selectPage(a)}),null,mxUtils.bind(this,function(m){if(f.isEnabled()&&!f.isMouseDown&&(mxEvent.isTouchEvent(m)&&l||mxEvent.isPopupTrigger(m))){f.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!d){var p=new mxPopupMenu(this.createPageMenu(a));p.div.className+=" geMenubarMenu";p.smartSeparators=!0;p.showDisabled=!0;p.autoExpand=!0;p.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(p,arguments);this.resetCurrentMenu();p.destroy()});var u=mxEvent.getClientX(m),x=mxEvent.getClientY(m);p.popup(u,x,null,m);this.setCurrentMenu(p,b)}mxEvent.consume(m)}}))};
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!d){var p=new mxPopupMenu(this.createPageMenu(a));p.div.className+=" geMenubarMenu";p.smartSeparators=!0;p.showDisabled=!0;p.autoExpand=!0;p.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(p,arguments);this.resetCurrentMenu();p.destroy()});var u=mxEvent.getClientX(m),v=mxEvent.getClientY(m);p.popup(u,v,null,m);this.setCurrentMenu(p,b)}mxEvent.consume(m)}}))};
EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(f,d){f.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),d);f.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),d);f.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),d);var l=this.getCurrentFile();null!=l&&l.constructor!=LocalFile&&(f.addSeparator(d),f.addItem(mxResources.get("link"),
null,mxUtils.bind(this,function(){var b=this.getSearch("create title mode url drive splash state".split(" ")),b=b+((0==b.length?"?":"&")+"page-id="+a.getId()),b=window.location.protocol+"//"+window.location.host+"/"+b+"#"+l.getHash(),b=new EmbedDialog(this,b);this.showDialog(b.container,440,240,!0,!0);b.init()}),d));f.addSeparator(d);f.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,mxResources.get("copyOf",[a.getName()]))}),d)})};
(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(b){a.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,f,d){d.ui=a.ui;return f};a.afterDecode=function(a,f,d){a=d.oldIndex;d.oldIndex=d.newIndex;d.newIndex=a;return d};mxCodecRegistry.register(a)})();
@@ -3403,34 +3406,34 @@ null,mxUtils.bind(this,function(){var b=this.getSearch("create title mode url dr
(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),b="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,d,l){l.setAttribute("relatedPage",d.relatedPage.getId());null==d.index&&(l.setAttribute("name",d.relatedPage.getName()),null!=d.relatedPage.viewState&&l.setAttribute("viewState",JSON.stringify(d.relatedPage.viewState,function(a,d){return 0>mxUtils.indexOf(b,
a)?d:void 0})),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,l));return l};a.beforeDecode=function(a,b,l){l.ui=a.ui;l.relatedPage=l.ui.getPageById(b.getAttribute("relatedPage"));if(null==l.relatedPage){var d=b.ownerDocument.createElement("diagram");d.setAttribute("id",b.getAttribute("relatedPage"));d.setAttribute("name",b.getAttribute("name"));l.relatedPage=new DiagramPage(d);d=b.getAttribute("viewState");null!=d&&(l.relatedPage.viewState=JSON.parse(d),b.removeAttribute("viewState"));
b=b.cloneNode(!0);d=b.firstChild;if(null!=d)for(l.relatedPage.root=a.decodeCell(d,!1),l=d.nextSibling,d.parentNode.removeChild(d),d=l;null!=d;){l=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var f=d.getAttribute("id");null==a.lookup(f)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=l}}return b};a.afterDecode=function(a,b,l){l.index=l.previousIndex;return l};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png";EditorUi.prototype.altShiftActions[68]=
-"selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,d,f,u,x){d=null!=d?d:!1;null==f&&(f=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var l=f.slice(),c=[],e=0;e<f.length;e++){var k=this.view.getState(f[e]),m=null!=k?k.style:this.getCellStyle(f[e]);"1"==mxUtils.getValue(m,"treeFolding","0")&&(this.traverse(f[e],!0,mxUtils.bind(this,function(a,b){null!=b&&c.push(b);a!=f[e]&&c.push(a);return a==f[e]||!this.model.isCollapsed(a)})),
-this.model.setCollapsed(f[e],a))}for(e=0;e<c.length;e++)this.model.setVisible(c[e],!a);f=l;f=b.apply(this,arguments)}finally{this.model.endUpdate()}return f};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return y.isVertex(a)&&f(a)}function d(a){var b=!1;null!=a&&(b=g.view.getState(a),b="1"==(null!=b?b.style:g.getCellStyle(a)).treeMoving);
-return b}function f(a){var b=!1;null!=a&&(a=y.getParent(a),b=g.view.getState(a),b="tree"==(null!=b?b.style:g.getCellStyle(a)).containerType);return b}function u(a){var b=!1;null!=a&&(a=y.getParent(a),b=g.view.getState(a),g.view.getState(a),b=null!=(null!=b?b.style:g.getCellStyle(a)).childLayout);return b}function x(a){a=g.view.getState(a);if(null!=a){var b=g.getIncomingEdges(a.cell);if(0<b.length&&(b=g.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==
-a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function B(a,b){b=null!=b?b:!0;g.model.beginUpdate();try{var c=g.model.getParent(a),d=g.getIncomingEdges(a),e=g.cloneCells([d[0],a]);g.model.setTerminal(e[0],g.model.getTerminal(d[0],!0),!0);var f=x(a),k=c.geometry;f==mxConstants.DIRECTION_SOUTH||
+"selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,d,f,u,v){d=null!=d?d:!1;null==f&&(f=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var l=f.slice(),c=[],e=0;e<f.length;e++){var k=this.view.getState(f[e]),m=null!=k?k.style:this.getCellStyle(f[e]);"1"==mxUtils.getValue(m,"treeFolding","0")&&(this.traverse(f[e],!0,mxUtils.bind(this,function(a,b){null!=b&&c.push(b);a!=f[e]&&c.push(a);return a==f[e]||!this.model.isCollapsed(a)})),
+this.model.setCollapsed(f[e],a))}for(e=0;e<c.length;e++)this.model.setVisible(c[e],!a);f=l;f=b.apply(this,arguments)}finally{this.model.endUpdate()}return f};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return x.isVertex(a)&&f(a)}function d(a){var b=!1;null!=a&&(b=g.view.getState(a),b="1"==(null!=b?b.style:g.getCellStyle(a)).treeMoving);
+return b}function f(a){var b=!1;null!=a&&(a=x.getParent(a),b=g.view.getState(a),b="tree"==(null!=b?b.style:g.getCellStyle(a)).containerType);return b}function u(a){var b=!1;null!=a&&(a=x.getParent(a),b=g.view.getState(a),g.view.getState(a),b=null!=(null!=b?b.style:g.getCellStyle(a)).childLayout);return b}function v(a){a=g.view.getState(a);if(null!=a){var b=g.getIncomingEdges(a.cell);if(0<b.length&&(b=g.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==
+a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function B(a,b){b=null!=b?b:!0;g.model.beginUpdate();try{var c=g.model.getParent(a),d=g.getIncomingEdges(a),e=g.cloneCells([d[0],a]);g.model.setTerminal(e[0],g.model.getTerminal(d[0],!0),!0);var f=v(a),k=c.geometry;f==mxConstants.DIRECTION_SOUTH||
f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;g.view.currentRoot!=c&&(e[1].geometry.x-=k.x,e[1].geometry.y-=k.y);var l=g.view.getState(a),m=g.view.scale;if(null!=l){var n=mxRectangle.fromRectangle(l);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*m:n.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*m;var p=g.getOutgoingEdges(g.model.getTerminal(d[0],
-!0));if(null!=p){for(var t=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,q=k=d=0;q<p.length;q++){var z=g.model.getTerminal(p[q],!1);if(f==x(z)){var u=g.view.getState(z);z!=a&&null!=u&&(t&&b!=u.getCenterX()<l.getCenterX()||!t&&b!=u.getCenterY()<l.getCenterY())&&mxUtils.intersects(n,u)&&(d=10+Math.max(d,(Math.min(n.x+n.width,u.x+u.width)-Math.max(n.x,u.x))/m),k=10+Math.max(k,(Math.min(n.y+n.height,u.y+u.height)-Math.max(n.y,u.y))/m))}}t?k=0:d=0;for(q=0;q<p.length;q++)if(z=g.model.getTerminal(p[q],
-!1),f==x(z)&&(u=g.view.getState(z),z!=a&&null!=u&&(t&&b!=u.getCenterX()<l.getCenterX()||!t&&b!=u.getCenterY()<l.getCenterY()))){var v=[];g.traverse(u.cell,!0,function(a,b){null!=b&&v.push(b);v.push(a);return!0});g.moveCells(v,(b?1:-1)*d,(b?1:-1)*k)}}}return g.addCells(e,c)}finally{g.model.endUpdate()}}function c(a){g.model.beginUpdate();try{var b=x(a),c=g.getIncomingEdges(a),d=g.cloneCells([c[0],a]);g.model.setTerminal(c[0],d[1],!1);g.model.setTerminal(d[0],d[1],!0);g.model.setTerminal(d[0],a,!1);
+!0));if(null!=p){for(var q=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,t=k=d=0;t<p.length;t++){var z=g.model.getTerminal(p[t],!1);if(f==v(z)){var u=g.view.getState(z);z!=a&&null!=u&&(q&&b!=u.getCenterX()<l.getCenterX()||!q&&b!=u.getCenterY()<l.getCenterY())&&mxUtils.intersects(n,u)&&(d=10+Math.max(d,(Math.min(n.x+n.width,u.x+u.width)-Math.max(n.x,u.x))/m),k=10+Math.max(k,(Math.min(n.y+n.height,u.y+u.height)-Math.max(n.y,u.y))/m))}}q?k=0:d=0;for(t=0;t<p.length;t++)if(z=g.model.getTerminal(p[t],
+!1),f==v(z)&&(u=g.view.getState(z),z!=a&&null!=u&&(q&&b!=u.getCenterX()<l.getCenterX()||!q&&b!=u.getCenterY()<l.getCenterY()))){var C=[];g.traverse(u.cell,!0,function(a,b){null!=b&&C.push(b);C.push(a);return!0});g.moveCells(C,(b?1:-1)*d,(b?1:-1)*k)}}}return g.addCells(e,c)}finally{g.model.endUpdate()}}function c(a){g.model.beginUpdate();try{var b=v(a),c=g.getIncomingEdges(a),d=g.cloneCells([c[0],a]);g.model.setTerminal(c[0],d[1],!1);g.model.setTerminal(d[0],d[1],!0);g.model.setTerminal(d[0],a,!1);
var e=g.model.getParent(a),f=e.geometry,k=[];g.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);g.traverse(a,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});var l=a.geometry.width+40,m=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?l=0:b==mxConstants.DIRECTION_NORTH?(l=0,m=-m):b==mxConstants.DIRECTION_WEST?(l=-l,m=0):b==mxConstants.DIRECTION_EAST&&(m=0);g.moveCells(k,l,m);return g.addCells(d,e)}finally{g.model.endUpdate()}}function e(a){g.model.beginUpdate();try{var b=
-g.model.getParent(a),c=g.getIncomingEdges(a),d=g.cloneCells([c[0],a]);g.model.setTerminal(d[0],a,!0);var c=g.getOutgoingEdges(a),e=b.geometry,f=[];g.view.currentRoot==b&&(e=new mxRectangle);for(var k=0;k<c.length;k++){var l=g.model.getTerminal(c[k],!1);null!=l&&f.push(l)}var m=g.view.getBounds(f),n=x(a),p=g.view.translate,t=g.view.scale;n==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/t-p.x-e.x+10,d[1].geometry.y+=d[1].geometry.height-
-e.y+40):n==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/t-p.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height+e.y+40):(d[1].geometry.x=n==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width+e.x+40):d[1].geometry.x+(d[1].geometry.width-e.x+40),d[1].geometry.y=null==m?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(m.y+m.height)/t-p.y+-e.y+10);return g.addCells(d,b)}finally{g.model.endUpdate()}}function k(a,
-b,c){a=g.getOutgoingEdges(a);c=g.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=g.view.getState(g.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function q(a,b){var c=x(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
-c==mxConstants.DIRECTION_WEST)==d&&c!=b?n.actions.get("selectParent").funct():c==b?(d=g.getOutgoingEdges(a),null!=d&&0<d.length&&g.setSelectionCell(g.model.getTerminal(d[0],!1))):(c=g.getIncomingEdges(a),null!=c&&0<c.length&&(d=k(g.model.getTerminal(c[0],!0),d,a),c=g.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&g.setSelectionCell(d[c].cell)))))}var n=this,g=n.editor.graph,y=g.getModel(),A=n.menus.createPopupMenu;
+g.model.getParent(a),c=g.getIncomingEdges(a),d=g.cloneCells([c[0],a]);g.model.setTerminal(d[0],a,!0);var c=g.getOutgoingEdges(a),e=b.geometry,f=[];g.view.currentRoot==b&&(e=new mxRectangle);for(var k=0;k<c.length;k++){var l=g.model.getTerminal(c[k],!1);null!=l&&f.push(l)}var m=g.view.getBounds(f),n=v(a),p=g.view.translate,q=g.view.scale;n==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/q-p.x-e.x+10,d[1].geometry.y+=d[1].geometry.height-
+e.y+40):n==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/q-p.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height+e.y+40):(d[1].geometry.x=n==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width+e.x+40):d[1].geometry.x+(d[1].geometry.width-e.x+40),d[1].geometry.y=null==m?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(m.y+m.height)/q-p.y+-e.y+10);return g.addCells(d,b)}finally{g.model.endUpdate()}}function k(a,
+b,c){a=g.getOutgoingEdges(a);c=g.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=g.view.getState(g.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function q(a,b){var c=v(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
+c==mxConstants.DIRECTION_WEST)==d&&c!=b?n.actions.get("selectParent").funct():c==b?(d=g.getOutgoingEdges(a),null!=d&&0<d.length&&g.setSelectionCell(g.model.getTerminal(d[0],!1))):(c=g.getIncomingEdges(a),null!=c&&0<c.length&&(d=k(g.model.getTerminal(c[0],!0),d,a),c=g.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&g.setSelectionCell(d[c].cell)))))}var n=this,g=n.editor.graph,x=g.getModel(),A=n.menus.createPopupMenu;
n.menus.createPopupMenu=function(a,c,d){A.apply(this,arguments);if(1==g.getSelectionCount()){c=g.getSelectionCell();var e=g.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(g.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(g.getSelectionCell())&&(a.addSeparator(),0<g.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};n.actions.addAction("selectChildren",function(){if(g.isEnabled()&&
1==g.getSelectionCount()){var a=g.getSelectionCell(),a=g.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(g.model.getTerminal(a[c],!1));g.setSelectionCells(b)}}},null,null,"Alt+Shift+X");n.actions.addAction("selectSiblings",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var a=g.getSelectionCell(),a=g.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=g.getOutgoingEdges(g.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(g.model.getTerminal(a[c],
!1));g.setSelectionCells(b)}}},null,null,"Alt+Shift+S");n.actions.addAction("selectParent",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var a=g.getSelectionCell(),a=g.getIncomingEdges(a);null!=a&&0<a.length&&g.setSelectionCell(g.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");n.actions.addAction("selectDescendants",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var a=g.getSelectionCell(),b=[];g.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});g.setSelectionCells(b)}},
-null,null,"Alt+Shift+D");var t=g.removeCells;g.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var d=[],e=0;e<a.length;e++){var k=a[e];y.isEdge(k)&&f(k)&&(d.push(k),k=y.getTerminal(k,!1));b(k)?(g.traverse(k,!0,function(a,b){null!=b&&d.push(b);d.push(a);return!0}),k=g.getIncomingEdges(a[e]),a=a.concat(k)):d.push(a[e])}a=d;return t.apply(this,arguments)};n.hoverIcons.getStateAt=function(a,c,
-d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var F=g.duplicateCells;g.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=g.view.getState(d[e]);if(null!=f&&b(f.cell))for(var k=g.getIncomingEdges(f.cell),f=0;f<k.length;f++)mxUtils.remove(k[f],a)}this.model.beginUpdate();try{var l=F.call(this,a,c);if(l.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var m=g.getIncomingEdges(l[e]),k=g.getIncomingEdges(a[e]);
-if(0==m.length&&0<k.length){var n=this.cloneCell(k[0]);this.addEdge(n,g.getDefaultParent(),this.model.getTerminal(k[0],!0),l[e])}}}finally{this.model.endUpdate()}return l};var z=g.moveCells;g.moveCells=function(a,c,d,e,f,k,l){var m=null;this.model.beginUpdate();try{var n=f,p=this.view.getState(f),t=null!=p?p.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(t,"treeFolding","0")){for(var q=0;q<a.length;q++)if(b(a[q])||g.model.isEdge(a[q])&&null==g.model.getTerminal(a[q],!0)){f=g.model.getParent(a[q]);
-break}if(null!=n&&f!=n&&null!=this.view.getState(a[0])){var u=g.getIncomingEdges(a[0]);if(0<u.length){var v=g.view.getState(g.model.getTerminal(u[0],!0));if(null!=v){var y=g.view.getState(n);null!=y&&(c=(y.getCenterX()-v.getCenterX())/g.view.scale,d=(y.getCenterY()-v.getCenterY())/g.view.scale)}}}}m=z.apply(this,arguments);if(null!=m&&null!=a&&m.length==a.length)for(q=0;q<m.length;q++)if(this.model.isEdge(m[q]))b(n)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[q],!0))&&this.model.setTerminal(m[q],
-n,!0);else if(b(a[q])&&(u=g.getIncomingEdges(a[q]),0<u.length))if(!e)b(n)&&0>mxUtils.indexOf(a,this.model.getTerminal(u[0],!0))&&this.model.setTerminal(u[0],n,!0);else if(0==g.getIncomingEdges(m[q]).length){p=n;if(null==p||p==g.model.getParent(a[q]))p=g.model.getTerminal(u[0],!0);e=this.cloneCell(u[0]);this.addEdge(e,g.getDefaultParent(),p,m[q])}}finally{this.model.endUpdate()}return m};if(null!=n.sidebar){var D=n.sidebar.dropAndConnect;n.sidebar.dropAndConnect=function(a,c,d,e){var f=g.model,k=null;
-f.beginUpdate();try{if(k=D.apply(this,arguments),b(a))for(var l=0;l<k.length;l++)if(f.isEdge(k[l])&&null==f.getTerminal(k[l],!0)){f.setTerminal(k[l],a,!0);var m=g.getCellGeometry(k[l]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return k}}var E={88:n.actions.get("selectChildren"),84:n.actions.get("selectSubtree"),80:n.actions.get("selectParent"),83:n.actions.get("selectSiblings")},v=n.onKeyDown;n.onKeyDown=function(a){try{if(g.isEnabled()&&!g.isEditing()&&
+null,null,"Alt+Shift+D");var t=g.removeCells;g.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var d=[],e=0;e<a.length;e++){var k=a[e];x.isEdge(k)&&f(k)&&(d.push(k),k=x.getTerminal(k,!1));b(k)?(g.traverse(k,!0,function(a,b){null!=b&&d.push(b);d.push(a);return!0}),k=g.getIncomingEdges(a[e]),a=a.concat(k)):d.push(a[e])}a=d;return t.apply(this,arguments)};n.hoverIcons.getStateAt=function(a,c,
+d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var E=g.duplicateCells;g.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=g.view.getState(d[e]);if(null!=f&&b(f.cell))for(var k=g.getIncomingEdges(f.cell),f=0;f<k.length;f++)mxUtils.remove(k[f],a)}this.model.beginUpdate();try{var l=E.call(this,a,c);if(l.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var m=g.getIncomingEdges(l[e]),k=g.getIncomingEdges(a[e]);
+if(0==m.length&&0<k.length){var n=this.cloneCell(k[0]);this.addEdge(n,g.getDefaultParent(),this.model.getTerminal(k[0],!0),l[e])}}}finally{this.model.endUpdate()}return l};var z=g.moveCells;g.moveCells=function(a,c,d,e,f,k,l){var m=null;this.model.beginUpdate();try{var n=f,p=this.view.getState(f),q=null!=p?p.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(q,"treeFolding","0")){for(var t=0;t<a.length;t++)if(b(a[t])||g.model.isEdge(a[t])&&null==g.model.getTerminal(a[t],!0)){f=g.model.getParent(a[t]);
+break}if(null!=n&&f!=n&&null!=this.view.getState(a[0])){var u=g.getIncomingEdges(a[0]);if(0<u.length){var v=g.view.getState(g.model.getTerminal(u[0],!0));if(null!=v){var x=g.view.getState(n);null!=x&&(c=(x.getCenterX()-v.getCenterX())/g.view.scale,d=(x.getCenterY()-v.getCenterY())/g.view.scale)}}}}m=z.apply(this,arguments);if(null!=m&&null!=a&&m.length==a.length)for(t=0;t<m.length;t++)if(this.model.isEdge(m[t]))b(n)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[t],!0))&&this.model.setTerminal(m[t],
+n,!0);else if(b(a[t])&&(u=g.getIncomingEdges(a[t]),0<u.length))if(!e)b(n)&&0>mxUtils.indexOf(a,this.model.getTerminal(u[0],!0))&&this.model.setTerminal(u[0],n,!0);else if(0==g.getIncomingEdges(m[t]).length){p=n;if(null==p||p==g.model.getParent(a[t]))p=g.model.getTerminal(u[0],!0);e=this.cloneCell(u[0]);this.addEdge(e,g.getDefaultParent(),p,m[t])}}finally{this.model.endUpdate()}return m};if(null!=n.sidebar){var G=n.sidebar.dropAndConnect;n.sidebar.dropAndConnect=function(a,c,d,e){var f=g.model,k=null;
+f.beginUpdate();try{if(k=G.apply(this,arguments),b(a))for(var l=0;l<k.length;l++)if(f.isEdge(k[l])&&null==f.getTerminal(k[l],!0)){f.setTerminal(k[l],a,!0);var m=g.getCellGeometry(k[l]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return k}}var D={88:n.actions.get("selectChildren"),84:n.actions.get("selectSubtree"),80:n.actions.get("selectParent"),83:n.actions.get("selectSiblings")},y=n.onKeyDown;n.onKeyDown=function(a){try{if(g.isEnabled()&&!g.isEditing()&&
b(g.getSelectionCell())&&1==g.getSelectionCount()){var d=null;0<g.getIncomingEdges(g.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?c(g.getSelectionCell()):e(g.getSelectionCell()):13==a.which&&(d=B(g.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&g.model.isEdge(d[0])?g.setSelectionCell(g.model.getTerminal(d[0],!1)):g.setSelectionCell(d[d.length-1]),null!=n.hoverIcons&&n.hoverIcons.update(g.view.getState(g.getSelectionCell())),g.startEditingAtCell(g.getSelectionCell()),
-mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var f=E[a.keyCode];null!=f&&(f.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(q(g.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(q(g.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(q(g.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(q(g.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(R){console.log("error",
-R)}mxEvent.isConsumed(a)||v.apply(this,arguments)};var I=g.connectVertex;g.connectVertex=function(a,d,f,k,l,m){var n=g.getIncomingEdges(a);return b(a)&&0<n.length?(f=x(a),k=f==mxConstants.DIRECTION_EAST||f==mxConstants.DIRECTION_WEST,l=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,f==d?e(a):k==l?c(a):B(a,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)):I.call(this,a,d,f,k,l,m)};g.getSubtree=function(a){var c=[a];!d(a)&&!b(a)||u(a)||g.traverse(a,!0,function(a,b){null!=
-b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var V=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){V.apply(this,arguments);(d(this.state.cell)||b(this.state.cell))&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="18px",
+mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var f=D[a.keyCode];null!=f&&(f.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(q(g.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(q(g.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(q(g.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(q(g.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(T){console.log("error",
+T)}mxEvent.isConsumed(a)||y.apply(this,arguments)};var I=g.connectVertex;g.connectVertex=function(a,d,f,k,l,m){var n=g.getIncomingEdges(a);return b(a)&&0<n.length?(f=v(a),k=f==mxConstants.DIRECTION_EAST||f==mxConstants.DIRECTION_WEST,l=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,f==d?e(a):k==l?c(a):B(a,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)):I.call(this,a,d,f,k,l,m)};g.getSubtree=function(a){var c=[a];!d(a)&&!b(a)||u(a)||g.traverse(a,!0,function(a,b){null!=
+b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var O=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){O.apply(this,arguments);(d(this.state.cell)||b(this.state.cell))&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="18px",
this.moveHandle.style.height="18px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a));this.graph.graphHandler.cells=this.graph.getSubtree(this.state.cell);this.graph.graphHandler.bounds=this.state.view.getBounds(this.graph.graphHandler.cells);this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);
-this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var J=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){J.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var Q=mxVertexHandler.prototype.destroy;
-mxVertexHandler.prototype.destroy=function(a,b){Q.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=d.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");
+this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var J=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){J.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var S=mxVertexHandler.prototype.destroy;
+mxVertexHandler.prototype.destroy=function(a,b){S.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=d.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");
a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");b.vertex=!0;var d=new mxCell("Topic",
new mxGeometry(320,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;");d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;b.insertEdge(f,!0);d.insertEdge(f,!1);var c=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");
c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");e.geometry.relative=!0;e.edge=!0;b.insertEdge(e,!0);c.insertEdge(e,!1);var k=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;");k.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
@@ -3460,7 +3463,7 @@ mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7
"#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.prototype.inactiveTabBackgroundColor=
"#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!0;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var m=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=
function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px");m.apply(this,arguments)};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var u=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>f&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",
-b.shortcut):u.apply(this,arguments)};var x=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){x.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height=
+b.shortcut):u.apply(this,arguments)};var v=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){v.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height=
"24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"));"none"!=a.style.display&&(a.style.display="inline-block")}};var B=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){B.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage=
"url("+Editor.shareImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px"}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=document.createElement("div");a.style.display="inline-block";a.style.position="relative";a.style.marginTop="8px";a.style.marginRight="4px";var b=document.createElement("a");b.className="geMenuItem gePrimaryBtn";b.style.marginLeft=
"8px";b.style.padding="6px";"1"==urlParams.noSaveBtn?(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),
@@ -3495,16 +3498,16 @@ b.funct,null,mxResources.get("redo")+" ("+b.shortcut+")",b,"data:image/svg+xml;b
d([c("",function(){m.popupMenuHandler.hideMenu();var a=m.view.scale,b=m.view.translate.x,c=m.view.translate.y;l.actions.get("resetView").funct();1E-5>Math.abs(a-m.view.scale)&&b==m.view.translate.x&&c==m.view.translate.y&&l.actions.get(m.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
640<=f?c("",b.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",b,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
null,640<=f?c("",e.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",e,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
-null],60)}b=l.menus.get("language");null!=b&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=f?(null==N&&(e=u.addMenu("",b.funct),e.setAttribute("title",mxResources.get("language")),e.className="geToolbarButton",e.style.backgroundImage="url("+Editor.globeImage+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.position="absolute",e.style.height="24px",e.style.width="24px",e.style.zIndex="1",e.style.right="8px",e.style.cursor=
-"pointer",e.style.top="1"==urlParams.embed?"12px":"11px",p.appendChild(e),N=e),l.buttonContainer.style.paddingRight="34px"):(l.buttonContainer.style.paddingRight="4px",null!=N&&(N.parentNode.removeChild(N),N=null))}n.apply(this,arguments);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(k);null==urlParams.clibs&&
+null],60)}b=l.menus.get("language");null!=b&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=f?(null==P&&(e=u.addMenu("",b.funct),e.setAttribute("title",mxResources.get("language")),e.className="geToolbarButton",e.style.backgroundImage="url("+Editor.globeImage+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.position="absolute",e.style.height="24px",e.style.width="24px",e.style.zIndex="1",e.style.right="8px",e.style.cursor=
+"pointer",e.style.top="1"==urlParams.embed?"12px":"11px",p.appendChild(e),P=e),l.buttonContainer.style.paddingRight="34px"):(l.buttonContainer.style.paddingRight="4px",null!=P&&(P.parentNode.removeChild(P),P=null))}n.apply(this,arguments);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(k);null==urlParams.clibs&&
null==urlParams.libs||b(this);var l=this,m=l.editor.graph;l.toolbar=this.createToolbar(l.createDiv("geToolbar"));l.defaultLibraryName=mxResources.get("untitledLibrary");var p=document.createElement("div");p.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var q=null,u=new Menubar(l,p);l.statusContainer=l.createStatusContainer();l.statusContainer.style.position="relative";
-l.statusContainer.style.maxWidth="";l.statusContainer.style.marginTop="7px";l.statusContainer.style.marginLeft="6px";l.statusContainer.style.color="gray";l.statusContainer.style.cursor="default";l.editor.addListener("statusChanged",mxUtils.bind(this,function(){l.setStatusText(l.editor.getStatus())}));var x=l.descriptorChanged;l.descriptorChanged=function(){x.apply(this,arguments);var a=l.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":
+l.statusContainer.style.maxWidth="";l.statusContainer.style.marginTop="7px";l.statusContainer.style.marginLeft="6px";l.statusContainer.style.color="gray";l.statusContainer.style.cursor="default";l.editor.addListener("statusChanged",mxUtils.bind(this,function(){l.setStatusText(l.editor.getStatus())}));var v=l.descriptorChanged;l.descriptorChanged=function(){v.apply(this,arguments);var a=l.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":
"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);p.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else p.removeAttribute("title")};l.setStatusText(l.editor.getStatus());p.appendChild(l.statusContainer);l.buttonContainer=document.createElement("div");l.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";p.appendChild(l.buttonContainer);l.menubarContainer=l.buttonContainer;
-l.tabContainer=document.createElement("div");l.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var k=l.diagramContainer.parentNode,B=document.createElement("div");B.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";l.diagramContainer.style.top="47px";var Q=l.menus.get("viewZoom");
-if(null!=Q){this.tabContainer.style.right="70px";var C=u.addMenu("100%",Q.funct);C.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");C.style.whiteSpace="nowrap";C.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";C.style.backgroundPosition="right 6px center";C.style.backgroundRepeat="no-repeat";C.style.backgroundColor="#ffffff";C.style.paddingRight="10px";C.style.display="block";C.style.position="absolute";C.style.textDecoration="none";C.style.textDecoration="none";
-C.style.right="0px";C.style.bottom="0px";C.style.overflow="hidden";C.style.visibility="hidden";C.style.textAlign="center";C.style.color="#000";C.style.fontSize="12px";C.style.color="#707070";C.style.width="59px";C.style.cursor="pointer";C.style.borderTop="1px solid lightgray";C.style.borderLeft="1px solid lightgray";C.style.height=parseInt(l.tabContainerHeight)-1+"px";C.style.lineHeight=parseInt(l.tabContainerHeight)+1+"px";B.appendChild(C);Q=mxUtils.bind(this,function(){C.innerHTML=Math.round(100*
-l.editor.graph.view.scale)+"%"});l.editor.graph.view.addListener(mxEvent.EVENT_SCALE,Q);l.editor.addListener("resetGraphView",Q);l.editor.addListener("pageSelected",Q);var K=l.setGraphEnabled;l.setGraphEnabled=function(){K.apply(this,arguments);null!=this.tabContainer&&(C.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}B.appendChild(l.tabContainer);B.appendChild(p);B.appendChild(l.diagramContainer);
-k.appendChild(B);l.updateTabContainer();var N=null;e();mxEvent.addListener(window,"resize",function(){e();null!=l.sidebarWindow&&l.sidebarWindow.window.fit();null!=l.formatWindow&&l.formatWindow.window.fit();null!=l.actions.outlineWindow&&l.actions.outlineWindow.window.fit();null!=l.actions.layersWindow&&l.actions.layersWindow.window.fit();null!=l.menus.tagsWindow&&l.menus.tagsWindow.window.fit();null!=l.menus.findWindow&&l.menus.findWindow.window.fit()})}}};
+l.tabContainer=document.createElement("div");l.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var k=l.diagramContainer.parentNode,B=document.createElement("div");B.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";l.diagramContainer.style.top="47px";var S=l.menus.get("viewZoom");
+if(null!=S){this.tabContainer.style.right="70px";var C=u.addMenu("100%",S.funct);C.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");C.style.whiteSpace="nowrap";C.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";C.style.backgroundPosition="right 6px center";C.style.backgroundRepeat="no-repeat";C.style.backgroundColor="#ffffff";C.style.paddingRight="10px";C.style.display="block";C.style.position="absolute";C.style.textDecoration="none";C.style.textDecoration="none";
+C.style.right="0px";C.style.bottom="0px";C.style.overflow="hidden";C.style.visibility="hidden";C.style.textAlign="center";C.style.color="#000";C.style.fontSize="12px";C.style.color="#707070";C.style.width="59px";C.style.cursor="pointer";C.style.borderTop="1px solid lightgray";C.style.borderLeft="1px solid lightgray";C.style.height=parseInt(l.tabContainerHeight)-1+"px";C.style.lineHeight=parseInt(l.tabContainerHeight)+1+"px";B.appendChild(C);S=mxUtils.bind(this,function(){C.innerHTML=Math.round(100*
+l.editor.graph.view.scale)+"%"});l.editor.graph.view.addListener(mxEvent.EVENT_SCALE,S);l.editor.addListener("resetGraphView",S);l.editor.addListener("pageSelected",S);var L=l.setGraphEnabled;l.setGraphEnabled=function(){L.apply(this,arguments);null!=this.tabContainer&&(C.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}B.appendChild(l.tabContainer);B.appendChild(p);B.appendChild(l.diagramContainer);
+k.appendChild(B);l.updateTabContainer();var P=null;e();mxEvent.addListener(window,"resize",function(){e();null!=l.sidebarWindow&&l.sidebarWindow.window.fit();null!=l.formatWindow&&l.formatWindow.window.fit();null!=l.actions.outlineWindow&&l.actions.outlineWindow.window.fit();null!=l.actions.layersWindow&&l.actions.layersWindow.window.fit();null!=l.menus.tagsWindow&&l.menus.tagsWindow.window.fit();null!=l.menus.findWindow&&l.menus.findWindow.window.fit()})}}};
(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var b=EditorUi.initTheme;EditorUi.initTheme=function(){b.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();DrawioComment=function(a,b,f,d,l,m,p){this.file=a;this.id=b;this.content=f;this.modifiedDate=d;this.createdDate=l;this.isResolved=m;this.user=p;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,b,f,d,l){b()};DrawioComment.prototype.editComment=function(a,b,f){b()};DrawioComment.prototype.deleteComment=function(a,b){a()};DrawioUser=function(a,b,f,d,l){this.id=a;this.email=b;this.displayName=f;this.pictureUrl=d;this.locale=l};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncsv=CSV\ndark=Dark\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Download draw.io Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedbackToDrawIo=Send your feedback to draw.io\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrwaDiag=draw.io diagram\nunknownErr=Unkown Error\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound=Gliffy diagram "{1}" found. Importing\nconfAGliffyDiagImported=Gliffy diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported Gliffy diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing Gliffy diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching Gliffy diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished.\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,b,f){this.init(a,b,f)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://www.draw.io/";GraphViewer.prototype.imageBaseUrl="https://www.draw.io/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.allowZoomIn=!1;
GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;
@@ -3530,23 +3533,23 @@ this.handlingResize||(m=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))
a.style.height&&this.autoFit?a.offsetHeight:void 0;if(0<a.offsetWidth&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>f)){var m=null;null!=f&&b.height+2*this.graph.border>f-2&&(m=(f-2*this.graph.border-2)/b.height);this.fitGraph(m)}else this.widthIsEmpty||0!=this.graphConfig.resize||""==a.style.height?(this.graph.view.setTranslate(Math.floor(this.graph.border-b.x/this.graph.view.scale),Math.floor(this.graph.border-b.y/this.graph.view.scale)),l=a.offsetWidth):
this.graph.center((!this.widthIsEmpty||b.width<this.minWidth)&&1!=this.graphConfig.resize);a.style.minWidth=d});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(p,0):p();this.positionGraph=function(){b=this.graph.getGraphBounds();l=null;p()}};GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"};
GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=b+"px"};
-GraphViewer.prototype.showLayers=function(a,b){var f=this.graphConfig.layers,f=null!=f?f.split(" "):[],d=this.graphConfig.layerIds,l=null!=d&&0<d.length;if(0<f.length||l||null!=b){var m=null!=b?b.getModel():null,p=a.getModel();p.beginUpdate();try{for(var u=p.getChildCount(p.root),x=0;x<u;x++)p.setVisible(p.getChildAt(p.root,x),null!=b?m.isVisible(m.getChildAt(m.root,x)):!1);if(null==m)if(l)for(x=0;x<d.length;x++)p.setVisible(p.getCell(d[x]),!0);else for(x=0;x<f.length;x++)p.setVisible(p.getChildAt(p.root,
-parseInt(f[x])),!0)}finally{p.endUpdate()}}};
+GraphViewer.prototype.showLayers=function(a,b){var f=this.graphConfig.layers,f=null!=f?f.split(" "):[],d=this.graphConfig.layerIds,l=null!=d&&0<d.length;if(0<f.length||l||null!=b){var m=null!=b?b.getModel():null,p=a.getModel();p.beginUpdate();try{for(var u=p.getChildCount(p.root),v=0;v<u;v++)p.setVisible(p.getChildAt(p.root,v),null!=b?m.isVisible(m.getChildAt(m.root,v)):!1);if(null==m)if(l)for(v=0;v<d.length;v++)p.setVisible(p.getCell(d[v]),!0);else for(v=0;v<f.length;v++)p.setVisible(p.getChildAt(p.root,
+parseInt(f[v])),!0)}finally{p.endUpdate()}}};
GraphViewer.prototype.addToolbar=function(){function a(a,b,d,e){var g=document.createElement("div");g.style.borderRight="1px solid #d0d0d0";g.style.padding="3px 6px 3px 6px";mxEvent.addListener(g,"click",a);null!=d&&g.setAttribute("title",d);g.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);null==e||e?(mxEvent.addListener(g,"mouseenter",function(){g.style.backgroundColor="#ddd"}),mxEvent.addListener(g,"mouseleave",
function(){g.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),g.style.cursor="pointer"):mxUtils.setOpacity(g,30);g.appendChild(a);f.appendChild(g);c++;return g}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var f=b.ownerDocument.createElement("div");f.style.position="absolute";f.style.overflow="hidden";f.style.boxSizing="border-box";
f.style.whiteSpace="nowrap";f.style.textAlign="left";f.style.zIndex=this.toolbarZIndex;f.style.backgroundColor="#eee";f.style.height=this.toolbarHeight+"px";this.toolbar=f;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(f.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(f,30);var d=null,l=null,m=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this,
function(){mxUtils.setOpacity(f,0);d=null;l=window.setTimeout(mxUtils.bind(this,function(){f.style.display="none";l=null}),100)}),a||200)}),p=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);f.style.display="";mxUtils.setOpacity(f,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(p(30),m())}));mxEvent.addListener(f,mxClient.IS_POINTER?
-"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(a){p(100)}));mxEvent.addListener(f,"mousemove",mxUtils.bind(this,function(a){p(100);mxEvent.consume(a)}));mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||p(30)}));var u=this.graph,x=u.getTolerance();u.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();
-this.scrollLeft=u.container.scrollLeft;this.scrollTop=u.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-u.container.scrollLeft)<x&&Math.abs(this.scrollTop-u.container.scrollTop)<x&&Math.abs(this.startX-b.getGraphX())<x&&Math.abs(this.startY-b.getGraphY())<x&&(0<parseFloat(f.style.opacity||0)?m():p(30))}})}for(var B=this.toolbarItems,c=0,e=null,k=null,q=0;q<B.length;q++){var n=B[q];if("pages"==n){k=b.ownerDocument.createElement("div");
-k.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(k,70);var g=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");g.style.borderRightStyle="none";g.style.paddingLeft="0px";g.style.paddingRight="0px";f.appendChild(k);var y=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
-1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");y.style.paddingLeft="0px";y.style.paddingRight="0px";n=mxUtils.bind(this,function(){k.innerHTML="";mxUtils.write(k,this.currentPage+1+" / "+this.diagrams.length);k.style.display=1<this.diagrams.length?"inline-block":"none";g.style.display=k.style.display;y.style.display=k.style.display});this.addListener("graphChanged",n);n()}else if("zoom"==n)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
+"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(a){p(100)}));mxEvent.addListener(f,"mousemove",mxUtils.bind(this,function(a){p(100);mxEvent.consume(a)}));mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||p(30)}));var u=this.graph,v=u.getTolerance();u.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();
+this.scrollLeft=u.container.scrollLeft;this.scrollTop=u.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-u.container.scrollLeft)<v&&Math.abs(this.scrollTop-u.container.scrollTop)<v&&Math.abs(this.startX-b.getGraphX())<v&&Math.abs(this.startY-b.getGraphY())<v&&(0<parseFloat(f.style.opacity||0)?m():p(30))}})}for(var B=this.toolbarItems,c=0,e=null,k=null,q=0;q<B.length;q++){var n=B[q];if("pages"==n){k=b.ownerDocument.createElement("div");
+k.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(k,70);var g=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");g.style.borderRightStyle="none";g.style.paddingLeft="0px";g.style.paddingRight="0px";f.appendChild(k);var x=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");x.style.paddingLeft="0px";x.style.paddingRight="0px";n=mxUtils.bind(this,function(){k.innerHTML="";mxUtils.write(k,this.currentPage+1+" / "+this.diagrams.length);k.style.display=1<this.diagrams.length?"inline-block":"none";g.style.display=k.style.display;x.style.display=k.style.display});this.addListener("graphChanged",n);n()}else if("zoom"==n)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==n){if(this.layersEnabled){var A=this.graph.getModel(),t=a(mxUtils.bind(this,function(a){if(null!=e)e.parentNode.removeChild(e),
e=null;else{e=this.graph.createLayersDialog();mxEvent.addListener(e,"mouseleave",function(){e.parentNode.removeChild(e);e=null});a=t.getBoundingClientRect();e.style.width="140px";e.style.padding="2px 0px 2px 0px";e.style.border="1px solid #d0d0d0";e.style.backgroundColor="#eee";e.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";e.style.fontSize="11px";e.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(e,80);var b=mxUtils.getDocumentScrollOrigin(document);e.style.left=b.x+a.left+
"px";e.style.top=b.y+a.bottom+"px";document.body.appendChild(e)}}),Editor.layersImage,mxResources.get("layers")||"Layers");A.addListener(mxEvent.CHANGE,function(){t.style.display=1<A.getChildCount(A.root)?"inline-block":"none"});t.style.display=1<A.getChildCount(A.root)?"inline-block":"none"}}else"lightbox"==n?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(n=this.graphConfig["toolbar-buttons"][n],
null!=n&&a(null==n.enabled||n.enabled?n.handler:function(){},n.image,n.title,n.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*c);null!=this.graphConfig.title&&(B=b.ownerDocument.createElement("div"),B.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",B.setAttribute("title",this.graphConfig.title),mxUtils.write(B,this.graphConfig.title),mxUtils.setOpacity(B,
-70),f.appendChild(B));this.minToolbarWidth=34*c;var F=b.style.border,B=mxUtils.bind(this,function(){f.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";f.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-c.left,top:a.top-
-c.top,bottom:a.bottom-c.top,right:a.right-c.left};f.style.left=a.left+"px";"bottom"==this.graphConfig["toolbar-position"]?f.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(f.style.marginTop=-this.toolbarHeight+"px",f.style.top=a.top+1+"px"):f.style.top=a.top+"px";"1px solid transparent"==F&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(f);var d=mxUtils.bind(this,function(){null!=f.parentNode&&f.parentNode.removeChild(f);null!=e&&(e.parentNode.removeChild(e),
-e=null);b.style.border=F});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==f||a==e)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})}else f.style.top=-this.toolbarHeight+"px",b.appendChild(f)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",B):B()};
+70),f.appendChild(B));this.minToolbarWidth=34*c;var E=b.style.border,B=mxUtils.bind(this,function(){f.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";f.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-c.left,top:a.top-
+c.top,bottom:a.bottom-c.top,right:a.right-c.left};f.style.left=a.left+"px";"bottom"==this.graphConfig["toolbar-position"]?f.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(f.style.marginTop=-this.toolbarHeight+"px",f.style.top=a.top+1+"px"):f.style.top=a.top+"px";"1px solid transparent"==E&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(f);var d=mxUtils.bind(this,function(){null!=f.parentNode&&f.parentNode.removeChild(f);null!=e&&(e.parentNode.removeChild(e),
+e=null);b.style.border=E});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==f||a==e)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})}else f.style.top=-this.toolbarHeight+"px",b.appendChild(f)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",B):B()};
GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(f,d){if(null==d){var l=mxEvent.getSource(f);"a"==l.nodeName.toLowerCase()&&(d=l.getAttribute("href"))}null!=b?null==d||a.isExternalProtocol(d)||a.isBlankLink(d)||a.customLinkClicked(d)?mxEvent.consume(f):window.setTimeout(function(){b.destroy()},0):null!=d&&null==b&&a.isCustomLink(d)&&(mxEvent.isTouchEvent(f)||!mxEvent.isPopupTrigger(f))&&
a.customLinkClicked(d)&&mxEvent.consume(f)}),mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
GraphViewer.prototype.showLightbox=function(a,b,f){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){a=null!=a?a:null!=this.graphConfig.editable?this.graphConfig.editable:!0;f={client:1,lightbox:1,target:null!=f?f:"blank"};a&&(f.edit=this.graphConfig.edit||"_blank");if(null!=b?b:1)f.close=1;this.layersEnabled&&(f.layers=1);null!=this.graphConfig&&0!=this.graphConfig.nav&&(f.nav=1);null!=this.graphConfig&&null!=this.graphConfig.highlight&&
@@ -3556,10 +3559,10 @@ GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScro
var f=document.createElement("img");f.setAttribute("border","0");f.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(f.style.position="absolute",f.style.right="32px",f.style.top=a.y+32+"px"):f.style.cssText="position:fixed;top:32px;right:32px;";f.style.cursor="pointer";mxEvent.addListener(f,"click",function(){l.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds?this.graphConfig.layerIds.join(" "):
null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var d=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";
var l=new EditorUi(new Editor(!0),document.createElement("div"),!0);l.editor.editBlankUrl=this.editBlankUrl;l.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=d;l.refresh=function(){};var m=mxUtils.bind(this,function(a){27==a.keyCode&&l.destroy()}),p=l.destroy;l.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",m);document.body.removeChild(b);document.body.removeChild(f);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;p.apply(this,
-arguments)};var u=l.editor.graph,x=u.container;x.style.overflow="hidden";this.lightboxChrome?(x.style.border="1px solid #c0c0c0",x.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",m)):(b.style.display="none",f.style.display="none");var B=this;u.getImageFromBundles=function(a){return B.getImageUrl(a)};var c=l.createTemporaryGraph;l.createTemporaryGraph=function(){var a=c.apply(this,arguments);a.getImageFromBundles=function(a){return B.getImageUrl(a)};return a};this.graphConfig.move&&
-(u.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(x.style,"border-radius","4px"),x.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(x.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(x.style,"transition","all .25s ease-in-out"));this.addClickHandler(u,l);window.setTimeout(mxUtils.bind(this,function(){x.style.outline="none";x.style.zIndex=this.lightboxZIndex;
-f.style.zIndex=this.lightboxZIndex;document.body.appendChild(x);document.body.appendChild(f);l.setFileData(this.xml);mxUtils.setPrefixedStyle(x.style,"transform","rotateY(0deg)");l.chromelessToolbar.style.bottom="60px";l.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(l.chromelessToolbar);l.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(x.style.position="absolute",x.style.display="block",x.style.left=a.x+"px",x.style.top=a.y+"px",x.style.width=
-document.body.clientWidth-80+"px",x.style.height=document.body.clientHeight-80+"px",x.style.backgroundColor="white",l.chromelessToolbar.style.display="block",l.chromelessToolbar.style.position="absolute",l.chromelessToolbar.style.bottom="",l.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");l.lightboxFit();l.chromelessResize();this.showLayers(u,this.graph);mxEvent.addListener(b,"click",function(){l.destroy()})}),0);return l};
+arguments)};var u=l.editor.graph,v=u.container;v.style.overflow="hidden";this.lightboxChrome?(v.style.border="1px solid #c0c0c0",v.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",m)):(b.style.display="none",f.style.display="none");var B=this;u.getImageFromBundles=function(a){return B.getImageUrl(a)};var c=l.createTemporaryGraph;l.createTemporaryGraph=function(){var a=c.apply(this,arguments);a.getImageFromBundles=function(a){return B.getImageUrl(a)};return a};this.graphConfig.move&&
+(u.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(v.style,"border-radius","4px"),v.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(v.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(v.style,"transition","all .25s ease-in-out"));this.addClickHandler(u,l);window.setTimeout(mxUtils.bind(this,function(){v.style.outline="none";v.style.zIndex=this.lightboxZIndex;
+f.style.zIndex=this.lightboxZIndex;document.body.appendChild(v);document.body.appendChild(f);l.setFileData(this.xml);mxUtils.setPrefixedStyle(v.style,"transform","rotateY(0deg)");l.chromelessToolbar.style.bottom="60px";l.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(l.chromelessToolbar);l.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(v.style.position="absolute",v.style.display="block",v.style.left=a.x+"px",v.style.top=a.y+"px",v.style.width=
+document.body.clientWidth-80+"px",v.style.height=document.body.clientHeight-80+"px",v.style.backgroundColor="white",l.chromelessToolbar.style.display="block",l.chromelessToolbar.style.position="absolute",l.chromelessToolbar.style.bottom="",l.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");l.lightboxFit();l.chromelessResize();this.showLayers(u,this.graph);mxEvent.addListener(b,"click",function(){l.destroy()})}),0);return l};
GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(f){throw a.innerHTML=f.message,f;}})};
GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var f=0;f<b.length;f++)a.push(b[f]);return a}for(var d=document.getElementsByTagName("*"),b=[],f=0;f<d.length;f++){var l=d[f].className;null!=l&&0<l.length&&(l=l.split(" "),0<=mxUtils.indexOf(l,a)&&b.push(d[f]))}return b};
GraphViewer.createViewerForElement=function(a,b){var f=a.getAttribute("data-mxgraph");if(null!=f){var d=JSON.parse(f),l=function(f){f=mxUtils.parseXml(f);f=new GraphViewer(a,f.documentElement,d);null!=b&&b(f)};null!=d.url?GraphViewer.getUrl(d.url,function(a){l(a)}):l(d.xml)}};
@@ -3567,7 +3570,7 @@ GraphViewer.initCss=function(){try{var a=document.createElement("style");a.type=
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,f){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var d=0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;d.open("GET",a);d.onload=function(){b(null!=d.getText?d.getText():d.responseText)};d.onerror=f;d.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(f,d){function l(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function m(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function p(b,c){if(!b.resizedAttached)b.resizedAttached=
new l,b.resizedAttached.add(c);else if(b.resizedAttached){b.resizedAttached.add(c);return}b.resizeSensor=document.createElement("div");b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
-b.appendChild(b.resizeSensor);"static"==m(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],k=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};k();var p=!1,t=function(){b.resizedAttached&&(p&&(b.resizedAttached.call(),p=!1),a(t))};a(t);var u,x,B,E,v=function(){if((B=b.offsetWidth)!=u||(E=b.offsetHeight)!=x)p=!0,u=B,x=E;k()},I=function(a,b,c){a.attachEvent?
-a.attachEvent("on"+b,c):a.addEventListener(b,c)};I(d,"scroll",v);I(f,"scroll",v)}var u=function(){GraphViewer.resizeSensorEnabled&&d()},x=Object.prototype.toString.call(f),B="[object Array]"===x||"[object NodeList]"===x||"[object HTMLCollection]"===x||"undefined"!==typeof jQuery&&f instanceof jQuery||"undefined"!==typeof Elements&&f instanceof Elements;if(B)for(var x=0,c=f.length;x<c;x++)p(f[x],u);else p(f,u);this.detach=function(){if(B)for(var a=0,c=f.length;a<c;a++)b.detach(f[a]);else b.detach(f)}};
+b.appendChild(b.resizeSensor);"static"==m(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],k=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};k();var p=!1,t=function(){b.resizedAttached&&(p&&(b.resizedAttached.call(),p=!1),a(t))};a(t);var u,v,B,D,y=function(){if((B=b.offsetWidth)!=u||(D=b.offsetHeight)!=v)p=!0,u=B,v=D;k()},I=function(a,b,c){a.attachEvent?
+a.attachEvent("on"+b,c):a.addEventListener(b,c)};I(d,"scroll",y);I(f,"scroll",y)}var u=function(){GraphViewer.resizeSensorEnabled&&d()},v=Object.prototype.toString.call(f),B="[object Array]"===v||"[object NodeList]"===v||"[object HTMLCollection]"===v||"undefined"!==typeof jQuery&&f instanceof jQuery||"undefined"!==typeof Elements&&f instanceof Elements;if(B)for(var v=0,c=f.length;v<c;v++)p(f[v],u);else p(f,u);this.detach=function(){if(B)for(var a=0,c=f.length;a<c;a++)b.detach(f[a]);else b.detach(f)}};
b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})();
(function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();